From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 00:13:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5A1FC7F4; Sun, 25 Aug 2013 00:13:54 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 477C52C44; Sun, 25 Aug 2013 00:13:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7P0DsvP072040; Sun, 25 Aug 2013 00:13:54 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7P0DrHX072025; Sun, 25 Aug 2013 00:13:53 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308250013.r7P0DrHX072025@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 00:13:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254820 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 00:13:54 -0000 Author: dumbbell Date: Sun Aug 25 00:13:53 2013 New Revision: 254820 URL: http://svnweb.freebsd.org/changeset/base/254820 Log: drm: Use driver-provided "use_msi" callback to determine if MSI is blacklisted For now, keep the static array for i915. But eventually, it should be moved to a callback in the driver itself. Modified: head/sys/dev/drm2/drmP.h head/sys/dev/drm2/drm_drv.c Modified: head/sys/dev/drm2/drmP.h ============================================================================== --- head/sys/dev/drm2/drmP.h Sat Aug 24 23:54:06 2013 (r254819) +++ head/sys/dev/drm2/drmP.h Sun Aug 25 00:13:53 2013 (r254820) @@ -698,6 +698,7 @@ struct drm_gem_object { struct drm_driver_info { int (*load)(struct drm_device *, unsigned long flags); + int (*use_msi)(struct drm_device *, unsigned long flags); int (*firstopen)(struct drm_device *); int (*open)(struct drm_device *, struct drm_file *); void (*preclose)(struct drm_device *, struct drm_file *file_priv); @@ -829,8 +830,10 @@ struct drm_device { struct drm_driver_info *driver; drm_pci_id_list_t *id_entry; /* PCI ID, name, and chipset private */ - u_int16_t pci_device; /* PCI device id */ - u_int16_t pci_vendor; /* PCI vendor id */ + uint16_t pci_device; /* PCI device id */ + uint16_t pci_vendor; /* PCI vendor id */ + uint16_t pci_subdevice; /* PCI subsystem device id */ + uint16_t pci_subvendor; /* PCI subsystem vendor id */ char *unique; /* Unique identifier: e.g., busid */ int unique_len; /* Length of unique field */ Modified: head/sys/dev/drm2/drm_drv.c ============================================================================== --- head/sys/dev/drm2/drm_drv.c Sat Aug 24 23:54:06 2013 (r254819) +++ head/sys/dev/drm2/drm_drv.c Sun Aug 25 00:13:53 2013 (r254820) @@ -209,13 +209,22 @@ static struct drm_msi_blacklist_entry dr {0, 0} }; -static int drm_msi_is_blacklisted(int vendor, int device) +static int drm_msi_is_blacklisted(struct drm_device *dev, unsigned long flags) { int i = 0; + if (dev->driver->use_msi != NULL) { + int use_msi; + + use_msi = dev->driver->use_msi(dev, flags); + + return (!use_msi); + } + + /* TODO: Maybe move this to a callback in i915? */ for (i = 0; drm_msi_blacklist[i].vendor != 0; i++) { - if ((drm_msi_blacklist[i].vendor == vendor) && - (drm_msi_blacklist[i].device == device)) { + if ((drm_msi_blacklist[i].vendor == dev->pci_vendor) && + (drm_msi_blacklist[i].device == dev->pci_device)) { return 1; } } @@ -264,10 +273,16 @@ int drm_attach(device_t kdev, drm_pci_id dev->pci_vendor = pci_get_vendor(dev->device); dev->pci_device = pci_get_device(dev->device); + dev->pci_subvendor = pci_get_subvendor(dev->device); + dev->pci_subdevice = pci_get_subdevice(dev->device); + + id_entry = drm_find_description(dev->pci_vendor, + dev->pci_device, idlist); + dev->id_entry = id_entry; if (drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) { if (drm_msi && - !drm_msi_is_blacklisted(dev->pci_vendor, dev->pci_device)) { + !drm_msi_is_blacklisted(dev, dev->id_entry->driver_private)) { msicount = pci_msi_count(dev->device); DRM_DEBUG("MSI count = %d\n", msicount); if (msicount > 1) @@ -297,10 +312,6 @@ int drm_attach(device_t kdev, drm_pci_id mtx_init(&dev->event_lock, "drmev", NULL, MTX_DEF); sx_init(&dev->dev_struct_lock, "drmslk"); - id_entry = drm_find_description(dev->pci_vendor, - dev->pci_device, idlist); - dev->id_entry = id_entry; - error = drm_load(dev); if (error == 0) error = drm_create_cdevs(kdev); From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 00:22:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2D1AF991; Sun, 25 Aug 2013 00:22:35 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1AA9B2CA5; Sun, 25 Aug 2013 00:22:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7P0MY83076717; Sun, 25 Aug 2013 00:22:34 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7P0MYEN076715; Sun, 25 Aug 2013 00:22:34 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308250022.r7P0MYEN076715@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 00:22:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254821 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 00:22:35 -0000 Author: dumbbell Date: Sun Aug 25 00:22:34 2013 New Revision: 254821 URL: http://svnweb.freebsd.org/changeset/base/254821 Log: drm: Fix cleanup if device initialization fails This plugs some memory leaks. Modified: head/sys/dev/drm2/drm_drv.c Modified: head/sys/dev/drm2/drm_drv.c ============================================================================== --- head/sys/dev/drm2/drm_drv.c Sun Aug 25 00:13:53 2013 (r254820) +++ head/sys/dev/drm2/drm_drv.c Sun Aug 25 00:22:34 2013 (r254821) @@ -313,8 +313,22 @@ int drm_attach(device_t kdev, drm_pci_id sx_init(&dev->dev_struct_lock, "drmslk"); error = drm_load(dev); - if (error == 0) - error = drm_create_cdevs(kdev); + if (error) + goto error; + + error = drm_create_cdevs(kdev); + if (error) + goto error; + + return (error); +error: + if (dev->irqr) { + bus_release_resource(dev->device, SYS_RES_IRQ, + dev->irqrid, dev->irqr); + } + if (dev->msi_enabled) { + pci_release_msi(dev->device); + } return (error); } @@ -572,7 +586,7 @@ static int drm_load(struct drm_device *d DRM_ERROR("Request to enable bus-master failed.\n"); DRM_UNLOCK(dev); if (retcode != 0) - goto error; + goto error1; } DRM_INFO("Initialized %s %d.%d.%d %s\n", @@ -586,7 +600,9 @@ static int drm_load(struct drm_device *d error1: delete_unrhdr(dev->drw_unrhdr); + drm_gem_destroy(dev); error: + drm_ctxbitmap_cleanup(dev); drm_sysctl_cleanup(dev); DRM_LOCK(dev); drm_lastclose(dev); From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 00:34:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9A017E64; Sun, 25 Aug 2013 00:34:45 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 87EB72D34; Sun, 25 Aug 2013 00:34:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7P0Yjbv082833; Sun, 25 Aug 2013 00:34:45 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7P0Yjru082831; Sun, 25 Aug 2013 00:34:45 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308250034.r7P0Yjru082831@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 00:34:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254822 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 00:34:45 -0000 Author: dumbbell Date: Sun Aug 25 00:34:44 2013 New Revision: 254822 URL: http://svnweb.freebsd.org/changeset/base/254822 Log: drm: In drm_mmap_single, try ttm_bo_mmap_single() before drm_gem_mmap_single() In drivers such as the Radeon driver, the DRIVER_GEM features flag is set but TTM is used to mmap buffer object. Modified: head/sys/dev/drm2/drmP.h head/sys/dev/drm2/drm_drv.c Modified: head/sys/dev/drm2/drmP.h ============================================================================== --- head/sys/dev/drm2/drmP.h Sun Aug 25 00:22:34 2013 (r254821) +++ head/sys/dev/drm2/drmP.h Sun Aug 25 00:34:44 2013 (r254822) @@ -913,7 +913,7 @@ struct drm_device { struct drm_minor *control; /**< Control node for card */ struct drm_minor *primary; /**< render type primary screen head */ - void *drm_ttm_bo; + void *drm_ttm_bdev; struct unrhdr *drw_unrhdr; /* RB tree of drawable infos */ RB_HEAD(drawable_tree, bsd_drm_drawable_info) drw_head; Modified: head/sys/dev/drm2/drm_drv.c ============================================================================== --- head/sys/dev/drm2/drm_drv.c Sun Aug 25 00:22:34 2013 (r254821) +++ head/sys/dev/drm2/drm_drv.c Sun Aug 25 00:34:44 2013 (r254822) @@ -993,11 +993,11 @@ drm_mmap_single(struct cdev *kdev, vm_oo struct drm_device *dev; dev = drm_get_device_from_kdev(kdev); - if ((dev->driver->driver_features & DRIVER_GEM) != 0) { - return (drm_gem_mmap_single(dev, offset, size, obj_res, nprot)); - } else if (dev->drm_ttm_bo != NULL) { - return (ttm_bo_mmap_single(dev->drm_ttm_bo, offset, size, + if (dev->drm_ttm_bdev != NULL) { + return (ttm_bo_mmap_single(dev->drm_ttm_bdev, offset, size, obj_res, nprot)); + } else if ((dev->driver->driver_features & DRIVER_GEM) != 0) { + return (drm_gem_mmap_single(dev, offset, size, obj_res, nprot)); } else { return (ENODEV); } From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 01:55:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 700996B4; Sun, 25 Aug 2013 01:55:15 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5DABE2066; Sun, 25 Aug 2013 01:55:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7P1tF3a026624; Sun, 25 Aug 2013 01:55:15 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7P1tF3w026623; Sun, 25 Aug 2013 01:55:15 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201308250155.r7P1tF3w026623@svn.freebsd.org> From: Alfred Perlstein Date: Sun, 25 Aug 2013 01:55:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254823 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 01:55:15 -0000 Author: alfred Date: Sun Aug 25 01:55:14 2013 New Revision: 254823 URL: http://svnweb.freebsd.org/changeset/base/254823 Log: Remove the #ifdef OFED from the 20 byte mac in struct llentry. With this change it is now possible to build the entire infiniband stack as modules and load it dynamically including IP over IB. Modified: head/sys/net/if_llatbl.h Modified: head/sys/net/if_llatbl.h ============================================================================== --- head/sys/net/if_llatbl.h Sun Aug 25 00:34:44 2013 (r254822) +++ head/sys/net/if_llatbl.h Sun Aug 25 01:55:14 2013 (r254823) @@ -75,9 +75,7 @@ struct llentry { union { uint64_t mac_aligned; uint16_t mac16[3]; -#ifdef OFED uint8_t mac8[20]; /* IB needs 20 bytes. */ -#endif } ll_addr; /* XXX af-private? */ From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 02:07:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 49BCFA97; Sun, 25 Aug 2013 02:07:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 371DE20E4; Sun, 25 Aug 2013 02:07:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7P27T6A033198; Sun, 25 Aug 2013 02:07:29 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7P27SE3033192; Sun, 25 Aug 2013 02:07:28 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201308250207.r7P27SE3033192@svn.freebsd.org> From: Adrian Chadd Date: Sun, 25 Aug 2013 02:07:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254824 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 02:07:29 -0000 Author: adrian Date: Sun Aug 25 02:07:28 2013 New Revision: 254824 URL: http://svnweb.freebsd.org/changeset/base/254824 Log: Update the MEM_UOP_RETIRED PMC operation for sandy bridge and sandy bridge Xeon. Summary: These are PEBS events but they're also available as normal counter/sample events. The source table (Table 19-2) lists the base versions (LOAD, STLB_MISS, SPLIT, ALL) but it says they must be qualified with other values. This particular commit fleshes out those umask values. Source: * Linux; SDM June 2013, Volume 3B, Table 19-2 and 18-21. Tested: * Sandy Bridge (non-Xeon) Modified: head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/pmc_events.h Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Sun Aug 25 01:55:14 2013 (r254823) +++ head/sys/dev/hwpmc/hwpmc_core.c Sun Aug 25 02:07:28 2013 (r254824) @@ -1514,19 +1514,21 @@ static struct iap_event_descr iap_events IAPDESCR(CEH_00H, 0xCE, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(CFH_00H, 0xCF, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + /* Sandy Bridge / Sandy Bridge Xeon - 11, 12, 21, 41, 42, 81, 82 */ IAPDESCR(D0H_00H, 0xD0, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(D0H_01H, 0xD0, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(D0H_02H, 0xD0, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(D0H_10H, 0xD0, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(D0H_20H, 0xD0, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(D0H_40H, 0xD0, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(D0H_80H, 0xD0, 0X80, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAPDESCR(D0H_01H, 0xD0, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), + IAPDESCR(D0H_02H, 0xD0, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), + IAPDESCR(D0H_10H, 0xD0, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), + IAPDESCR(D0H_11H, 0xD0, 0x11, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(D0H_12H, 0xD0, 0x12, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(D0H_20H, 0xD0, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), + IAPDESCR(D0H_21H, 0xD0, 0x21, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(D0H_40H, 0xD0, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), + IAPDESCR(D0H_41H, 0xD0, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(D0H_42H, 0xD0, 0x42, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(D0H_80H, 0xD0, 0x80, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), + IAPDESCR(D0H_81H, 0xD0, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(D0H_82H, 0xD0, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(D1H_01H, 0xD1, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), Modified: head/sys/dev/hwpmc/pmc_events.h ============================================================================== --- head/sys/dev/hwpmc/pmc_events.h Sun Aug 25 01:55:14 2013 (r254823) +++ head/sys/dev/hwpmc/pmc_events.h Sun Aug 25 02:07:28 2013 (r254824) @@ -1053,9 +1053,16 @@ __PMC_EV(IAP, EVENT_D0H_00H) \ __PMC_EV(IAP, EVENT_D0H_01H) \ __PMC_EV(IAP, EVENT_D0H_02H) \ __PMC_EV(IAP, EVENT_D0H_10H) \ +__PMC_EV(IAP, EVENT_D0H_11H) \ +__PMC_EV(IAP, EVENT_D0H_12H) \ __PMC_EV(IAP, EVENT_D0H_20H) \ +__PMC_EV(IAP, EVENT_D0H_21H) \ __PMC_EV(IAP, EVENT_D0H_40H) \ +__PMC_EV(IAP, EVENT_D0H_41H) \ +__PMC_EV(IAP, EVENT_D0H_42H) \ __PMC_EV(IAP, EVENT_D0H_80H) \ +__PMC_EV(IAP, EVENT_D0H_81H) \ +__PMC_EV(IAP, EVENT_D0H_82H) \ __PMC_EV(IAP, EVENT_D1H_01H) \ __PMC_EV(IAP, EVENT_D1H_02H) \ __PMC_EV(IAP, EVENT_D1H_04H) \ @@ -3286,12 +3293,13 @@ __PMC_EV_ALIAS("FP_ASSIST.ANY", IAP_EVEN __PMC_EV_ALIAS("ROB_MISC_EVENTS.LBR_INSERTS", IAP_EVENT_CCH_20H) \ __PMC_EV_ALIAS("MEM_TRANS_RETIRED.LOAD_LATENCY", IAP_EVENT_CDH_01H) \ __PMC_EV_ALIAS("MEM_TRANS_RETIRED.PRECISE_STORE", IAP_EVENT_CDH_02H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOADS", IAP_EVENT_D0H_01H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STORES", IAP_EVENT_D0H_02H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS", IAP_EVENT_D0H_10H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK", IAP_EVENT_D0H_20H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT", IAP_EVENT_D0H_40H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED_ALL", IAP_EVENT_D0H_80H) \ +__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS_LOADS", IAP_EVENT_D0H_11H) \ +__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS_STORES", IAP_EVENT_D0H_12H) \ +__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK_LOADS", IAP_EVENT_D0H_21H) \ +__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_LOADS", IAP_EVENT_D0H_41H) \ +__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ +__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_LOADS", IAP_EVENT_D0H_81H) \ +__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_STORES", IAP_EVENT_D0H_82H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L1_HIT", IAP_EVENT_D1H_01H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L2_HIT", IAP_EVENT_D1H_02H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.LLC_HIT", IAP_EVENT_D1H_04H) \ @@ -3517,12 +3525,13 @@ __PMC_EV_ALIAS("FP_ASSIST.ANY", IAP_EVEN __PMC_EV_ALIAS("ROB_MISC_EVENTS.LBR_INSERTS", IAP_EVENT_CCH_20H) \ __PMC_EV_ALIAS("MEM_TRANS_RETIRED.LOAD_LATENCY", IAP_EVENT_CDH_01H) \ __PMC_EV_ALIAS("MEM_TRANS_RETIRED.PRECISE_STORE", IAP_EVENT_CDH_02H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOADS", IAP_EVENT_D0H_01H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STORES", IAP_EVENT_D0H_02H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS", IAP_EVENT_D0H_10H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK", IAP_EVENT_D0H_20H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT", IAP_EVENT_D0H_40H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED_ALL", IAP_EVENT_D0H_80H) \ +__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS_LOADS", IAP_EVENT_D0H_11H) \ +__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS_STORES", IAP_EVENT_D0H_12H) \ +__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK_LOADS", IAP_EVENT_D0H_21H) \ +__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_LOADS", IAP_EVENT_D0H_41H) \ +__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ +__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_LOADS", IAP_EVENT_D0H_81H) \ +__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_STORES", IAP_EVENT_D0H_82H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L1_HIT", IAP_EVENT_D1H_01H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L2_HIT", IAP_EVENT_D1H_02H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.LLC_HIT", IAP_EVENT_D1H_04H) \ From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 06:30:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 290997FF; Sun, 25 Aug 2013 06:30:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mail0.glenbarber.us (mail0.glenbarber.us [IPv6:2607:fc50:1:2300:1001:1001:1001:face]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D75AD2B08; Sun, 25 Aug 2013 06:30:57 +0000 (UTC) Received: from glenbarber.us (unknown [IPv6:2001:470:8:1205:9918:e8ea:58d:40a5]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id 49B3C25D7; Sun, 25 Aug 2013 06:30:56 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us 49B3C25D7 Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Sun, 25 Aug 2013 02:30:54 -0400 From: Glen Barber To: Andre Oppermann Subject: Re: svn commit: r254799 - in head/sys: dev/cas dev/hatm dev/iscsi_initiator dev/lge dev/mwl kern sys Message-ID: <20130825063054.GA65644@glenbarber.us> References: <201308241657.r7OGvie8033186@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FCuugMFkClbJLl1L" Content-Disposition: inline In-Reply-To: <201308241657.r7OGvie8033186@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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 06:30:58 -0000 --FCuugMFkClbJLl1L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 24, 2013 at 04:57:44PM +0000, Andre Oppermann wrote: > Author: andre > Date: Sat Aug 24 16:57:44 2013 > New Revision: 254799 > URL: http://svnweb.freebsd.org/changeset/base/254799 >=20 > Log: > Add an mbuf pointer parameter to (*ext_free) to give the external > free function access to the mbuf the external memory was attached > to. > =20 > Mechanically adjust all users to include the mbuf parameter. > =20 > This fixes a long standing annoyance for external free functions. > Before one had to sacrifice one of the argument pointers for this. > =20 > Modified: head/sys/kern/uipc_mbuf.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/uipc_mbuf.c Sat Aug 24 16:55:53 2013 (r254798) > +++ head/sys/kern/uipc_mbuf.c Sat Aug 24 16:57:44 2013 (r254799) > @@ -247,8 +247,8 @@ m_freem(struct mbuf *mb) > */ > int > m_extadd(struct mbuf *mb, caddr_t buf, u_int size, > - void (*freef)(void *, void *), void *arg1, void *arg2, int flags, in= t type, > - int wait) > + void (*freef)(struct mbuf *, void *, void *), void *arg1, void *arg2, > + int flags, int type, int wait) > { > KASSERT(type !=3D EXT_CLUSTER, ("%s: EXT_CLUSTER not allowed", __func__= )); > =20 I think this breaks head/. cc -c -O2 -pipe -fno-strict-aliasing -std=3Dc99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -nostdinc -I. -I/src/sys -I/src/sys/contrib/altq -I/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -DGPROF -DGPROF4 -DGUPROF -fno-builtin -mno-aes -mno-avx -mno-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector -Werror -pg /src/sys/kern/uipc_cow.c /src/sys/kern/uipc_cow.c:164:2: error: incompatible pointer types passing 'void (void *, void *)' to parameter of type 'void (*)(struct mbuf *, void *, void *)' [-Werror,-Wincompatible-pointer-types] MEXTADD(m0, sf_buf_kva(sf), PAGE_SIZE, socow_iodone, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /src/sys/sys/mbuf.h:760:50: note: expanded from macro 'MEXTADD' (void )m_extadd((m), (caddr_t)(buf), (size), (free), (arg1), (arg2),\ ^~~~~~ /src/sys/sys/mbuf.h:898:14: note: passing argument to parameter here void (*)(struct mbuf *, void *, void *), void *, void *, ^ 1 error generated. *** Error code 1 Stop. bmake[1]: stopped in /obj/i386.i386/src/sys/LINT *** Error code 1 http://tinderbox.freebsd.org/tinderbox-head-build-HEAD-i386-i386.full Glen --FCuugMFkClbJLl1L Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQEcBAEBCAAGBQJSGaSeAAoJEFJPDDeguUaj1D4H/0uYt6ibBP30Clg1JmlkCTpF i1uOKg+kJU4p92BAp8GMbr6Vnv6Id0BBvJeV+ttvXTlNGmgp3i9m7sG5cOHFj8j/ gAiFAQ766L90MDg6cWS1XTecYRM7+EJUOQTD4xUJb6CyWGUoIExtTczPjeZKTR0y tHSFB3uYIOyBGKQtzIYLCjg/ofCpTYKvMb3+jZgpi23bSndLBTb/ppqynueTYRG9 5niUI+JDRJQXNX16q0YETYW7wYqbeQ9R+qZ6IVkVxtYZCOroET262sJodvLTWWzM kqLL1KP24jdvQJ/OacL0b0NqcVf96ZQl0BTTvpSj2LB4KLpVM65HK4NgtCNhGNQ= =C60/ -----END PGP SIGNATURE----- --FCuugMFkClbJLl1L-- From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 06:56:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 004ACD86; Sun, 25 Aug 2013 06:56:47 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ea0-x22a.google.com (mail-ea0-x22a.google.com [IPv6:2a00:1450:4013:c01::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EF4382C1D; Sun, 25 Aug 2013 06:56:46 +0000 (UTC) Received: by mail-ea0-f170.google.com with SMTP id h14so1026941eak.1 for ; Sat, 24 Aug 2013 23:56:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=TqNAPWYQ/ejQMvPdbBitYKeKoHEwKU8R73MXSmI4M8o=; b=HswZyybm3vgSzIF/1hrQIM3Zc3MaSB71hFpO+tNCUzIlsAzz6+LjsKmOX7Iouosa7e +J/tuuRufTF3W2H3UKrbRDSZXwmeRPi5+bZfNTnGn/FdWspzJioKMapNZvzGUXi45XoI EafQuFyMMCIFna/0kNQ0koVS1TaUO3RXNyBe2Q9iQyeFmBPaMAAidCmChSScvHLO0Xqy d+JHhbHWYuzr8BNyMBo/ca6qiuJ03kFZTBpdcQnYsdh/dW2zcRUe4I6WTPLOAP52Okwo yXz5F65msxN4EDiceJpQf4gE9WepmZJXiz96VRoFJTZtZs2RwZimt3nuP0Eucb9Vdejx r1YQ== MIME-Version: 1.0 X-Received: by 10.14.1.131 with SMTP id 3mr833656eed.57.1377413804660; Sat, 24 Aug 2013 23:56:44 -0700 (PDT) Sender: hiren.panchasara@gmail.com Received: by 10.14.105.137 with HTTP; Sat, 24 Aug 2013 23:56:44 -0700 (PDT) In-Reply-To: <201308250207.r7P27SE3033192@svn.freebsd.org> References: <201308250207.r7P27SE3033192@svn.freebsd.org> Date: Sat, 24 Aug 2013 23:56:44 -0700 X-Google-Sender-Auth: -3Q0TOIzoHKKqIXAQgPpYsj10NU Message-ID: Subject: Re: svn commit: r254824 - head/sys/dev/hwpmc From: hiren panchasara To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head , svn-src-all , src-committers X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 06:56:48 -0000 On Sat, Aug 24, 2013 at 7:07 PM, Adrian Chadd wrote: > Author: adrian > Date: Sun Aug 25 02:07:28 2013 > New Revision: 254824 > URL: http://svnweb.freebsd.org/changeset/base/254824 > > Log: > Update the MEM_UOP_RETIRED PMC operation for sandy bridge and sandy > bridge Xeon. > > Summary: These are PEBS events but they're also available as normal > counter/sample events. The source table (Table 19-2) lists the > base versions (LOAD, STLB_MISS, SPLIT, ALL) but it says they must > be qualified with other values. This particular commit fleshes > out those umask values. > > Source: > > * Linux; SDM June 2013, Volume 3B, Table 19-2 and 18-21. > > Tested: > > * Sandy Bridge (non-Xeon) > > Modified: > head/sys/dev/hwpmc/hwpmc_core.c > head/sys/dev/hwpmc/pmc_events.h > > Modified: head/sys/dev/hwpmc/hwpmc_core.c > > ============================================================================== > --- head/sys/dev/hwpmc/hwpmc_core.c Sun Aug 25 01:55:14 2013 > (r254823) > +++ head/sys/dev/hwpmc/hwpmc_core.c Sun Aug 25 02:07:28 2013 > (r254824) > @@ -1514,19 +1514,21 @@ static struct iap_event_descr iap_events > IAPDESCR(CEH_00H, 0xCE, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), > IAPDESCR(CFH_00H, 0xCF, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), > > + /* Sandy Bridge / Sandy Bridge Xeon - 11, 12, 21, 41, 42, 81, 82 */ > IAPDESCR(D0H_00H, 0xD0, 0x00, IAP_F_FM | IAP_F_CC), > - IAPDESCR(D0H_01H, 0xD0, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | > - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), > - IAPDESCR(D0H_02H, 0xD0, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | > - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), > - IAPDESCR(D0H_10H, 0xD0, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | > - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), > - IAPDESCR(D0H_20H, 0xD0, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | > - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), > - IAPDESCR(D0H_40H, 0xD0, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB | > - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), > - IAPDESCR(D0H_80H, 0xD0, 0X80, IAP_F_FM | IAP_F_SB | IAP_F_IB | > - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), > + IAPDESCR(D0H_01H, 0xD0, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | > IAP_F_IB | IAP_F_IBX | IAP_F_HW), > This is unnecessarily going above 80-columns. Thanks, Hiren > + IAPDESCR(D0H_02H, 0xD0, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | > IAP_F_HW), > + IAPDESCR(D0H_10H, 0xD0, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | > IAP_F_HW), > + IAPDESCR(D0H_11H, 0xD0, 0x11, IAP_F_FM | IAP_F_SB | IAP_F_SBX), > + IAPDESCR(D0H_12H, 0xD0, 0x12, IAP_F_FM | IAP_F_SB | IAP_F_SBX), > + IAPDESCR(D0H_20H, 0xD0, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | > IAP_F_HW), > + IAPDESCR(D0H_21H, 0xD0, 0x21, IAP_F_FM | IAP_F_SB | IAP_F_SBX), > + IAPDESCR(D0H_40H, 0xD0, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | > IAP_F_HW), > + IAPDESCR(D0H_41H, 0xD0, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_SBX), > + IAPDESCR(D0H_42H, 0xD0, 0x42, IAP_F_FM | IAP_F_SB | IAP_F_SBX), > + IAPDESCR(D0H_80H, 0xD0, 0x80, IAP_F_FM | IAP_F_IB | IAP_F_IBX | > IAP_F_HW), > + IAPDESCR(D0H_81H, 0xD0, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_SBX), > + IAPDESCR(D0H_82H, 0xD0, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_SBX), > > IAPDESCR(D1H_01H, 0xD1, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_SB | > IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), > > Modified: head/sys/dev/hwpmc/pmc_events.h > > ============================================================================== > --- head/sys/dev/hwpmc/pmc_events.h Sun Aug 25 01:55:14 2013 > (r254823) > +++ head/sys/dev/hwpmc/pmc_events.h Sun Aug 25 02:07:28 2013 > (r254824) > @@ -1053,9 +1053,16 @@ __PMC_EV(IAP, EVENT_D0H_00H) \ > __PMC_EV(IAP, EVENT_D0H_01H) \ > __PMC_EV(IAP, EVENT_D0H_02H) \ > __PMC_EV(IAP, EVENT_D0H_10H) \ > +__PMC_EV(IAP, EVENT_D0H_11H) \ > +__PMC_EV(IAP, EVENT_D0H_12H) \ > __PMC_EV(IAP, EVENT_D0H_20H) \ > +__PMC_EV(IAP, EVENT_D0H_21H) \ > __PMC_EV(IAP, EVENT_D0H_40H) \ > +__PMC_EV(IAP, EVENT_D0H_41H) \ > +__PMC_EV(IAP, EVENT_D0H_42H) \ > __PMC_EV(IAP, EVENT_D0H_80H) \ > +__PMC_EV(IAP, EVENT_D0H_81H) \ > +__PMC_EV(IAP, EVENT_D0H_82H) \ > __PMC_EV(IAP, EVENT_D1H_01H) \ > __PMC_EV(IAP, EVENT_D1H_02H) \ > __PMC_EV(IAP, EVENT_D1H_04H) \ > @@ -3286,12 +3293,13 @@ __PMC_EV_ALIAS("FP_ASSIST.ANY", IAP_EVEN > __PMC_EV_ALIAS("ROB_MISC_EVENTS.LBR_INSERTS", IAP_EVENT_CCH_20H) \ > __PMC_EV_ALIAS("MEM_TRANS_RETIRED.LOAD_LATENCY", IAP_EVENT_CDH_01H) \ > __PMC_EV_ALIAS("MEM_TRANS_RETIRED.PRECISE_STORE", IAP_EVENT_CDH_02H) \ > -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOADS", IAP_EVENT_D0H_01H) \ > -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STORES", IAP_EVENT_D0H_02H) \ > -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS", IAP_EVENT_D0H_10H) \ > -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK", IAP_EVENT_D0H_20H) \ > -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT", IAP_EVENT_D0H_40H) \ > -__PMC_EV_ALIAS("MEM_UOP_RETIRED_ALL", IAP_EVENT_D0H_80H) \ > +__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS_LOADS", IAP_EVENT_D0H_11H) \ > +__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS_STORES", IAP_EVENT_D0H_12H) \ > +__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK_LOADS", IAP_EVENT_D0H_21H) > \ > +__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_LOADS", IAP_EVENT_D0H_41H) \ > +__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ > +__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_LOADS", IAP_EVENT_D0H_81H) \ > +__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_STORES", IAP_EVENT_D0H_82H) > \ > __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L1_HIT", IAP_EVENT_D1H_01H) \ > __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L2_HIT", IAP_EVENT_D1H_02H) \ > __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.LLC_HIT", IAP_EVENT_D1H_04H) \ > @@ -3517,12 +3525,13 @@ __PMC_EV_ALIAS("FP_ASSIST.ANY", IAP_EVEN > __PMC_EV_ALIAS("ROB_MISC_EVENTS.LBR_INSERTS", IAP_EVENT_CCH_20H) \ > __PMC_EV_ALIAS("MEM_TRANS_RETIRED.LOAD_LATENCY", IAP_EVENT_CDH_01H) \ > __PMC_EV_ALIAS("MEM_TRANS_RETIRED.PRECISE_STORE", IAP_EVENT_CDH_02H) \ > -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOADS", IAP_EVENT_D0H_01H) \ > -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STORES", IAP_EVENT_D0H_02H) \ > -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS", IAP_EVENT_D0H_10H) \ > -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK", IAP_EVENT_D0H_20H) \ > -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT", IAP_EVENT_D0H_40H) \ > -__PMC_EV_ALIAS("MEM_UOP_RETIRED_ALL", IAP_EVENT_D0H_80H) \ > +__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS_LOADS", IAP_EVENT_D0H_11H) \ > +__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS_STORES", IAP_EVENT_D0H_12H) \ > +__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK_LOADS", IAP_EVENT_D0H_21H) > \ > +__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_LOADS", IAP_EVENT_D0H_41H) \ > +__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ > +__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_LOADS", IAP_EVENT_D0H_81H) \ > +__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_STORES", IAP_EVENT_D0H_82H) > \ > __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L1_HIT", IAP_EVENT_D1H_01H) \ > __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L2_HIT", IAP_EVENT_D1H_02H) \ > __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.LLC_HIT", IAP_EVENT_D1H_04H) \ > From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 06:58:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 620C0FDF; Sun, 25 Aug 2013 06:58:52 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4F8EF2C39; Sun, 25 Aug 2013 06:58:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7P6wq70090258; Sun, 25 Aug 2013 06:58:52 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7P6wqY4090257; Sun, 25 Aug 2013 06:58:52 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201308250658.r7P6wqY4090257@svn.freebsd.org> From: Joel Dahl Date: Sun, 25 Aug 2013 06:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254825 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 06:58:52 -0000 Author: joel (doc committer) Date: Sun Aug 25 06:58:51 2013 New Revision: 254825 URL: http://svnweb.freebsd.org/changeset/base/254825 Log: mdoc fixes. Modified: head/share/man/man9/pfil.9 Modified: head/share/man/man9/pfil.9 ============================================================================== --- head/share/man/man9/pfil.9 Sun Aug 25 02:07:28 2013 (r254824) +++ head/share/man/man9/pfil.9 Sun Aug 25 06:58:51 2013 (r254825) @@ -71,6 +71,7 @@ typedef int (*pfil_func_t)(void *arg, st .Fn pfil_wlock "struct pfil_head *" .Ft void .Fn pfil_wunlock "struct pfil_head *" +.Ed .Sh DESCRIPTION The .Nm @@ -241,7 +242,7 @@ Fine-grained locking was added in lock export was added in .Fx 10.0 . .Sh BUGS -.Pp When a +When a .Vt pfil_head is being modified, no traffic is diverted (to avoid deadlock). From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 06:59:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D44FC1A2; Sun, 25 Aug 2013 06:59:30 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C0DB32C3F; Sun, 25 Aug 2013 06:59:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7P6xUKm090506; Sun, 25 Aug 2013 06:59:30 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7P6xUXm090505; Sun, 25 Aug 2013 06:59:30 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201308250659.r7P6xUXm090505@svn.freebsd.org> From: Joel Dahl Date: Sun, 25 Aug 2013 06:59:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254826 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 06:59:30 -0000 Author: joel (doc committer) Date: Sun Aug 25 06:59:30 2013 New Revision: 254826 URL: http://svnweb.freebsd.org/changeset/base/254826 Log: Remove EOL whitespace. Modified: head/share/man/man9/timeout.9 Modified: head/share/man/man9/timeout.9 ============================================================================== --- head/share/man/man9/timeout.9 Sun Aug 25 06:58:51 2013 (r254825) +++ head/share/man/man9/timeout.9 Sun Aug 25 06:59:30 2013 (r254826) @@ -256,7 +256,7 @@ after the callout function returns. .Pp The .Fn callout_init_rw -and the +and the .Fn callout_init_rm fuctions serve the need of using rwlocks and rmlocks in conjunction with callouts. From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 07:46:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0665EC68; Sun, 25 Aug 2013 07:46:19 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E80A52E6E; Sun, 25 Aug 2013 07:46:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7P7kI5B016310; Sun, 25 Aug 2013 07:46:18 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7P7kIIV016308; Sun, 25 Aug 2013 07:46:18 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201308250746.r7P7kIIV016308@svn.freebsd.org> From: Jeremie Le Hen Date: Sun, 25 Aug 2013 07:46:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254827 - head/etc/defaults X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 07:46:19 -0000 Author: jlh Date: Sun Aug 25 07:46:18 2013 New Revision: 254827 URL: http://svnweb.freebsd.org/changeset/base/254827 Log: Move daily_status_security_noamd next to 200.chkmounts's variables. Modified: head/etc/defaults/periodic.conf Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Sun Aug 25 06:59:30 2013 (r254826) +++ head/etc/defaults/periodic.conf Sun Aug 25 07:46:18 2013 (r254827) @@ -166,7 +166,6 @@ daily_local="/etc/daily.local" # Loca # 450.status-security above. daily_status_security_inline="NO" # Run inline ? daily_status_security_output="root" # user or /file -daily_status_security_noamd="NO" # Don't check amd mounts daily_status_security_logdir="/var/log" # Directory for logs daily_status_security_diff_flags="-b -u" # flags for diff output @@ -180,6 +179,7 @@ daily_status_security_neggrpperm_enable= daily_status_security_chkmounts_enable="YES" #daily_status_security_chkmounts_ignore="^amd:" # Don't check matching # FS types +daily_status_security_noamd="NO" # Don't check amd mounts # 300.chkuid0 daily_status_security_chkuid0_enable="YES" From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 08:42:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DE1A1965; Sun, 25 Aug 2013 08:42:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B14BD2143; Sun, 25 Aug 2013 08:42:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7P8gpGx047696; Sun, 25 Aug 2013 08:42:51 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7P8gpCl047694; Sun, 25 Aug 2013 08:42:51 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201308250842.r7P8gpCl047694@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 25 Aug 2013 08:42:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254828 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 08:42:51 -0000 Author: hselasky Date: Sun Aug 25 08:42:50 2013 New Revision: 254828 URL: http://svnweb.freebsd.org/changeset/base/254828 Log: Bugfix: The endpoint profile should only be checked in device mode when allocating USB transfers and not in host mode. Reported by: George Mitchell Modified: head/sys/dev/usb/controller/dwc_otg.c head/sys/dev/usb/controller/musb_otg.c Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Sun Aug 25 07:46:18 2013 (r254827) +++ head/sys/dev/usb/controller/dwc_otg.c Sun Aug 25 08:42:50 2013 (r254828) @@ -3968,7 +3968,6 @@ done: static void dwc_otg_xfer_setup(struct usb_setup_params *parm) { - const struct usb_hw_ep_profile *pf; struct usb_xfer *xfer; void *last_obj; uint32_t ntd; @@ -4011,16 +4010,21 @@ dwc_otg_xfer_setup(struct usb_setup_para */ last_obj = NULL; + ep_no = xfer->endpointno & UE_ADDR; + /* - * get profile stuff + * Check for a valid endpoint profile in USB device mode: */ - ep_no = xfer->endpointno & UE_ADDR; - dwc_otg_get_hw_ep_profile(parm->udev, &pf, ep_no); + if (xfer->flags_int.usb_mode == USB_MODE_DEVICE) { + const struct usb_hw_ep_profile *pf; - if (pf == NULL) { - /* should not happen */ - parm->err = USB_ERR_INVAL; - return; + dwc_otg_get_hw_ep_profile(parm->udev, &pf, ep_no); + + if (pf == NULL) { + /* should not happen */ + parm->err = USB_ERR_INVAL; + return; + } } /* align data */ Modified: head/sys/dev/usb/controller/musb_otg.c ============================================================================== --- head/sys/dev/usb/controller/musb_otg.c Sun Aug 25 07:46:18 2013 (r254827) +++ head/sys/dev/usb/controller/musb_otg.c Sun Aug 25 08:42:50 2013 (r254828) @@ -4026,7 +4026,6 @@ done: static void musbotg_xfer_setup(struct usb_setup_params *parm) { - const struct usb_hw_ep_profile *pf; struct musbotg_softc *sc; struct usb_xfer *xfer; void *last_obj; @@ -4088,12 +4087,14 @@ musbotg_xfer_setup(struct usb_setup_para */ last_obj = NULL; + ep_no = xfer->endpointno & UE_ADDR; + /* - * get profile stuff + * Check for a valid endpoint profile in USB device mode: */ - if (ntd) { + if (xfer->flags_int.usb_mode == USB_MODE_DEVICE) { + const struct usb_hw_ep_profile *pf; - ep_no = xfer->endpointno & UE_ADDR; musbotg_get_hw_ep_profile(parm->udev, &pf, ep_no); if (pf == NULL) { @@ -4101,9 +4102,6 @@ musbotg_xfer_setup(struct usb_setup_para parm->err = USB_ERR_INVAL; return; } - } else { - ep_no = 0; - pf = NULL; } /* align data */ From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 08:56:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CC455C80; Sun, 25 Aug 2013 08:56:09 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B853D21D5; Sun, 25 Aug 2013 08:56:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7P8u9E1054188; Sun, 25 Aug 2013 08:56:09 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7P8u9tw054187; Sun, 25 Aug 2013 08:56:09 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201308250856.r7P8u9tw054187@svn.freebsd.org> From: Jeremie Le Hen Date: Sun, 25 Aug 2013 08:56:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254829 - head/usr.sbin/periodic X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 08:56:09 -0000 Author: jlh Date: Sun Aug 25 08:56:09 2013 New Revision: 254829 URL: http://svnweb.freebsd.org/changeset/base/254829 Log: Export a PERIODIC environment variable from periodic(8). This will allow periodic security scripts to know if they have been called in a daily or a weekly context. Modified: head/usr.sbin/periodic/periodic.sh Modified: head/usr.sbin/periodic/periodic.sh ============================================================================== --- head/usr.sbin/periodic/periodic.sh Sun Aug 25 08:42:50 2013 (r254828) +++ head/usr.sbin/periodic/periodic.sh Sun Aug 25 08:56:09 2013 (r254829) @@ -76,6 +76,7 @@ shift arg=$1 tmp_output=`mktemp ${TMPDIR:-/tmp}/periodic.XXXXXXXXXX` +export PERIODIC="$arg${PERIODIC:+ }${PERIODIC}" # Execute each executable file in the directory list. If the x bit is not # set, assume the user didn't really want us to muck with it (it's a From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 09:40:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 772CF638; Sun, 25 Aug 2013 09:40:16 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6487A23BC; Sun, 25 Aug 2013 09:40:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7P9eGtd078120; Sun, 25 Aug 2013 09:40:16 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7P9eGdM078119; Sun, 25 Aug 2013 09:40:16 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201308250940.r7P9eGdM078119@svn.freebsd.org> From: Andre Oppermann Date: Sun, 25 Aug 2013 09:40:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254830 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 09:40:16 -0000 Author: andre Date: Sun Aug 25 09:40:15 2013 New Revision: 254830 URL: http://svnweb.freebsd.org/changeset/base/254830 Log: Adjust socow_iodone() after r254799. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/uipc_cow.c Modified: head/sys/kern/uipc_cow.c ============================================================================== --- head/sys/kern/uipc_cow.c Sun Aug 25 08:56:09 2013 (r254829) +++ head/sys/kern/uipc_cow.c Sun Aug 25 09:40:15 2013 (r254830) @@ -70,10 +70,10 @@ struct netsend_cow_stats { static struct netsend_cow_stats socow_stats; -static void socow_iodone(void *addr, void *args); +static void socow_iodone(struct mbuf *m, void *addr, void *args); static void -socow_iodone(void *addr, void *args) +socow_iodone(struct mbuf *m, void *addr, void *args) { struct sf_buf *sf; vm_page_t pp; From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 09:41:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9969C780; Sun, 25 Aug 2013 09:41:38 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 870FC23EF; Sun, 25 Aug 2013 09:41:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7P9fc6s080165; Sun, 25 Aug 2013 09:41:38 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7P9fcMl080163; Sun, 25 Aug 2013 09:41:38 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201308250941.r7P9fcMl080163@svn.freebsd.org> From: Andre Oppermann Date: Sun, 25 Aug 2013 09:41:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254831 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 09:41:38 -0000 Author: andre Date: Sun Aug 25 09:41:37 2013 New Revision: 254831 URL: http://svnweb.freebsd.org/changeset/base/254831 Log: Remove unnecessary setup of the m->pkthdr.header pointer. Sponsored by: The FreeBSD Foundation Modified: head/sys/net/if_fddisubr.c head/sys/net/if_iso88025subr.c Modified: head/sys/net/if_fddisubr.c ============================================================================== --- head/sys/net/if_fddisubr.c Sun Aug 25 09:40:15 2013 (r254830) +++ head/sys/net/if_fddisubr.c Sun Aug 25 09:41:37 2013 (r254831) @@ -390,7 +390,6 @@ fddi_input(ifp, m) goto dropanyway; } fh = mtod(m, struct fddi_header *); - m->m_pkthdr.header = (void *)fh; /* * Discard packet if interface is not up. Modified: head/sys/net/if_iso88025subr.c ============================================================================== --- head/sys/net/if_iso88025subr.c Sun Aug 25 09:40:15 2013 (r254830) +++ head/sys/net/if_iso88025subr.c Sun Aug 25 09:41:37 2013 (r254831) @@ -476,7 +476,6 @@ iso88025_input(ifp, m) goto dropanyway; } th = mtod(m, struct iso88025_header *); - m->m_pkthdr.header = (void *)th; /* * Discard packet if interface is not up. From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 09:45:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A65AA907; Sun, 25 Aug 2013 09:45:26 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 92EDE2416; Sun, 25 Aug 2013 09:45:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7P9jQDt081509; Sun, 25 Aug 2013 09:45:26 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7P9jQtl081508; Sun, 25 Aug 2013 09:45:26 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201308250945.r7P9jQtl081508@svn.freebsd.org> From: Andre Oppermann Date: Sun, 25 Aug 2013 09:45:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254832 - head/sys/ofed/drivers/net/mlx4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 09:45:26 -0000 Author: andre Date: Sun Aug 25 09:45:26 2013 New Revision: 254832 URL: http://svnweb.freebsd.org/changeset/base/254832 Log: Change m->pkthdr.header to m->pkthdr.PH_loc.ptr after r254804 to transiently store pointers to packet headers. Sponsored by: The FreeBSD Foundation Modified: head/sys/ofed/drivers/net/mlx4/en_frag.c Modified: head/sys/ofed/drivers/net/mlx4/en_frag.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_frag.c Sun Aug 25 09:41:37 2013 (r254831) +++ head/sys/ofed/drivers/net/mlx4/en_frag.c Sun Aug 25 09:45:26 2013 (r254832) @@ -87,7 +87,7 @@ static void flush_session(struct mlx4_en u16 more) { struct mbuf *mb = session->fragments; - struct ip *iph = mb->m_pkthdr.header; + struct ip *iph = mb->m_pkthdr.PH_loc.ptr; struct net_device *dev = mb->m_pkthdr.rcvif; /* Update IP length and checksum */ @@ -132,7 +132,7 @@ int mlx4_en_rx_frags(struct mlx4_en_priv u16 offset; iph = (struct ip *)(mtod(mb, char *) + ETHER_HDR_LEN); - mb->m_pkthdr.header = iph; + mb->m_pkthdr.PH_loc.ptr = iph; ip_len = ntohs(iph->ip_len); ip_hlen = iph->ip_hl * 4; data_len = ip_len - ip_hlen; From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 09:46:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4F987A4C; Sun, 25 Aug 2013 09:46:04 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 238DF241E; Sun, 25 Aug 2013 09:46:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7P9k42d081661; Sun, 25 Aug 2013 09:46:04 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7P9k3iQ081660; Sun, 25 Aug 2013 09:46:03 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308250946.r7P9k3iQ081660@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 09:46:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254833 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 09:46:04 -0000 Author: dumbbell Date: Sun Aug 25 09:46:03 2013 New Revision: 254833 URL: http://svnweb.freebsd.org/changeset/base/254833 Log: drm: Import Linux commit cd004b3f4cd4169815c82bf9e424fda06978898a Author: Shirish S Date: Thu Aug 30 07:04:06 2012 +0000 drm: edid: add support for E-DDC The current logic for probing ddc is limited to 2 blocks (256 bytes), this patch adds support for the 4 block (512) data. To do this, a single 8-bit segment index is passed to the display via the I2C address 30h. Data from the selected segment is then immediately read via the regular DDC2 address using a repeated I2C 'START' signal. Signed-off-by: Shirish S Reviewed-by: Jean Delvare Reviewed-by: Daniel Vetter Reviewed-by: Ville Syrjala Signed-off-by: Dave Airlie Modified: head/sys/dev/drm2/drm_edid.c Modified: head/sys/dev/drm2/drm_edid.c ============================================================================== --- head/sys/dev/drm2/drm_edid.c Sun Aug 25 09:45:26 2013 (r254832) +++ head/sys/dev/drm2/drm_edid.c Sun Aug 25 09:46:03 2013 (r254833) @@ -253,6 +253,8 @@ drm_do_probe_ddc_edid(device_t adapter, int block, int len) { unsigned char start = block * EDID_LENGTH; + unsigned char segment = block >> 1; + unsigned char xfers = segment ? 3 : 2; int ret, retries = 5; /* The core i2c driver will automatically retry the transfer if the @@ -264,6 +266,11 @@ drm_do_probe_ddc_edid(device_t adapter, do { struct iic_msg msgs[] = { { + .slave = DDC_SEGMENT_ADDR << 1, + .flags = 0, + .len = 1, + .buf = &segment, + }, { .slave = DDC_ADDR << 1, .flags = IIC_M_WR, .len = 1, @@ -275,7 +282,13 @@ drm_do_probe_ddc_edid(device_t adapter, .buf = buf, } }; - ret = iicbus_transfer(adapter, msgs, 2); + + /* + * Avoid sending the segment addr to not upset non-compliant ddc + * monitors. + */ + ret = iicbus_transfer(adapter, &msgs[3 - xfers], xfers); + if (ret != 0) DRM_DEBUG_KMS("iicbus_transfer countdown %d error %d\n", retries, ret); From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 09:49:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 81D46BA8; Sun, 25 Aug 2013 09:49:01 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6E658242C; Sun, 25 Aug 2013 09:49:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7P9n1r7082514; Sun, 25 Aug 2013 09:49:01 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7P9n127082508; Sun, 25 Aug 2013 09:49:01 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201308250949.r7P9n127082508@svn.freebsd.org> From: Andre Oppermann Date: Sun, 25 Aug 2013 09:49:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254834 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 09:49:01 -0000 Author: andre Date: Sun Aug 25 09:49:00 2013 New Revision: 254834 URL: http://svnweb.freebsd.org/changeset/base/254834 Log: For now limit printf(9) %x of the 64bit pkthdr.csum_flags field to 32bits. The upper 32bits are not occupied for now. Sponsored by: The FreeBSD Foundation Modified: head/sys/netinet/sctp_input.c head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun Aug 25 09:46:03 2013 (r254833) +++ head/sys/netinet/sctp_input.c Sun Aug 25 09:49:00 2013 (r254834) @@ -6026,7 +6026,7 @@ sctp_input_with_port(struct mbuf *i_pak, "sctp_input(): Packet of length %d received on %s with csum_flags 0x%x.\n", m->m_pkthdr.len, if_name(m->m_pkthdr.rcvif), - m->m_pkthdr.csum_flags); + (int)m->m_pkthdr.csum_flags); if (m->m_flags & M_FLOWID) { mflowid = m->m_pkthdr.flowid; use_mflowid = 1; Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Sun Aug 25 09:46:03 2013 (r254833) +++ head/sys/netinet6/sctp6_usrreq.c Sun Aug 25 09:49:00 2013 (r254834) @@ -112,7 +112,7 @@ sctp6_input_with_port(struct mbuf **i_pa "sctp6_input(): Packet of length %d received on %s with csum_flags 0x%x.\n", m->m_pkthdr.len, if_name(m->m_pkthdr.rcvif), - m->m_pkthdr.csum_flags); + (int)m->m_pkthdr.csum_flags); if (m->m_flags & M_FLOWID) { mflowid = m->m_pkthdr.flowid; use_mflowid = 1; From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 09:53:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A0E2DDA7; Sun, 25 Aug 2013 09:53:00 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8E8162481; Sun, 25 Aug 2013 09:53:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7P9r0BK085758; Sun, 25 Aug 2013 09:53:00 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7P9r0lN085757; Sun, 25 Aug 2013 09:53:00 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308250953.r7P9r0lN085757@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 09:53:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254835 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 09:53:00 -0000 Author: dumbbell Date: Sun Aug 25 09:53:00 2013 New Revision: 254835 URL: http://svnweb.freebsd.org/changeset/base/254835 Log: drm: Fix typo in KASSERT message: s/Dandling/Dangling/ Modified: head/sys/dev/drm2/drm_gem.c Modified: head/sys/dev/drm2/drm_gem.c ============================================================================== --- head/sys/dev/drm2/drm_gem.c Sun Aug 25 09:49:00 2013 (r254834) +++ head/sys/dev/drm2/drm_gem.c Sun Aug 25 09:53:00 2013 (r254835) @@ -163,7 +163,7 @@ void drm_gem_object_reference(struct drm_gem_object *obj) { - KASSERT(obj->refcount > 0, ("Dandling obj %p", obj)); + KASSERT(obj->refcount > 0, ("Dangling obj %p", obj)); refcount_acquire(&obj->refcount); } From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 09:58:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 83647F3A; Sun, 25 Aug 2013 09:58:32 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5729624A5; Sun, 25 Aug 2013 09:58:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7P9wWAg087373; Sun, 25 Aug 2013 09:58:32 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7P9wVcr087371; Sun, 25 Aug 2013 09:58:31 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308250958.r7P9wVcr087371@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 09:58:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254836 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 09:58:32 -0000 Author: dumbbell Date: Sun Aug 25 09:58:31 2013 New Revision: 254836 URL: http://svnweb.freebsd.org/changeset/base/254836 Log: drm: Support gem_open_object() and gem_close_object() callbacks ... in struct drm_driver_info. Modified: head/sys/dev/drm2/drmP.h head/sys/dev/drm2/drm_gem.c Modified: head/sys/dev/drm2/drmP.h ============================================================================== --- head/sys/dev/drm2/drmP.h Sun Aug 25 09:53:00 2013 (r254835) +++ head/sys/dev/drm2/drmP.h Sun Aug 25 09:58:31 2013 (r254836) @@ -737,6 +737,8 @@ struct drm_driver_info { int (*gem_init_object)(struct drm_gem_object *obj); void (*gem_free_object)(struct drm_gem_object *obj); + int (*gem_open_object)(struct drm_gem_object *, struct drm_file *); + void (*gem_close_object)(struct drm_gem_object *, struct drm_file *); struct cdev_pager_ops *gem_pager_ops; Modified: head/sys/dev/drm2/drm_gem.c ============================================================================== --- head/sys/dev/drm2/drm_gem.c Sun Aug 25 09:53:00 2013 (r254835) +++ head/sys/dev/drm2/drm_gem.c Sun Aug 25 09:58:31 2013 (r254836) @@ -242,24 +242,40 @@ int drm_gem_handle_create(struct drm_file *file_priv, struct drm_gem_object *obj, uint32_t *handle) { - int error; + struct drm_device *dev = obj->dev; + int ret; - error = drm_gem_name_create(&file_priv->object_names, obj, handle); - if (error != 0) - return (error); + ret = drm_gem_name_create(&file_priv->object_names, obj, handle); + if (ret != 0) + return (ret); drm_gem_object_handle_reference(obj); + + if (dev->driver->gem_open_object) { + ret = dev->driver->gem_open_object(obj, file_priv); + if (ret) { + drm_gem_handle_delete(file_priv, *handle); + return ret; + } + } + return (0); } int drm_gem_handle_delete(struct drm_file *file_priv, uint32_t handle) { + struct drm_device *dev; struct drm_gem_object *obj; obj = drm_gem_names_remove(&file_priv->object_names, handle); if (obj == NULL) return (EINVAL); + + dev = obj->dev; + if (dev->driver->gem_close_object) + dev->driver->gem_close_object(obj, file_priv); drm_gem_object_handle_unreference_unlocked(obj); + return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 10:02:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 77FF42C1; Sun, 25 Aug 2013 10:02:00 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6475C24E6; Sun, 25 Aug 2013 10:02:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PA20V4090624; Sun, 25 Aug 2013 10:02:00 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PA20Ih090623; Sun, 25 Aug 2013 10:02:00 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251002.r7PA20Ih090623@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 10:02:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254837 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 10:02:00 -0000 Author: dumbbell Date: Sun Aug 25 10:01:59 2013 New Revision: 254837 URL: http://svnweb.freebsd.org/changeset/base/254837 Log: drm: Call "gem_close_object" driver callback from drm_gem_object_release_handle() This fixes leakage of "bo_va" for Cayman and following card generations. Modified: head/sys/dev/drm2/drm_gem.c Modified: head/sys/dev/drm2/drm_gem.c ============================================================================== --- head/sys/dev/drm2/drm_gem.c Sun Aug 25 09:58:31 2013 (r254836) +++ head/sys/dev/drm2/drm_gem.c Sun Aug 25 10:01:59 2013 (r254837) @@ -328,9 +328,17 @@ drm_gem_open(struct drm_device *dev, str static int drm_gem_object_release_handle(uint32_t name, void *ptr, void *arg) { + struct drm_file *file_priv; struct drm_gem_object *obj; + struct drm_device *dev; + file_priv = arg; obj = ptr; + dev = obj->dev; + + if (dev->driver->gem_close_object) + dev->driver->gem_close_object(obj, file_priv); + drm_gem_object_handle_unreference(obj); return (0); } @@ -340,7 +348,7 @@ drm_gem_release(struct drm_device *dev, { drm_gem_names_foreach(&file_priv->object_names, - drm_gem_object_release_handle, NULL); + drm_gem_object_release_handle, file_priv); drm_gem_names_fini(&file_priv->object_names); } From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 10:04:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CB505415; Sun, 25 Aug 2013 10:04:10 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B88D024F4; Sun, 25 Aug 2013 10:04:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PA4ALF091199; Sun, 25 Aug 2013 10:04:10 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PA4Ad2091198; Sun, 25 Aug 2013 10:04:10 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251004.r7PA4Ad2091198@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 10:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254838 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 10:04:10 -0000 Author: dumbbell Date: Sun Aug 25 10:04:10 2013 New Revision: 254838 URL: http://svnweb.freebsd.org/changeset/base/254838 Log: drm: In drm_gem_name_create(), verify argument before acquiring lock Submitted by: J.R. Oldroyd Modified: head/sys/dev/drm2/drm_gem_names.c Modified: head/sys/dev/drm2/drm_gem_names.c ============================================================================== --- head/sys/dev/drm2/drm_gem_names.c Sun Aug 25 10:01:59 2013 (r254837) +++ head/sys/dev/drm2/drm_gem_names.c Sun Aug 25 10:04:10 2013 (r254838) @@ -132,12 +132,12 @@ drm_gem_name_create(struct drm_gem_names { struct drm_gem_name *np; - np = malloc(sizeof(struct drm_gem_name), M_GEM_NAMES, M_WAITOK); - mtx_lock(&names->lock); if (*name != 0) { - mtx_unlock(&names->lock); return (EALREADY); } + + np = malloc(sizeof(struct drm_gem_name), M_GEM_NAMES, M_WAITOK); + mtx_lock(&names->lock); np->name = alloc_unr(names->unr); if (np->name == -1) { mtx_unlock(&names->lock); From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 10:13:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B308F7BA; Sun, 25 Aug 2013 10:13:23 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A0AD4255E; Sun, 25 Aug 2013 10:13:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PADNDH096667; Sun, 25 Aug 2013 10:13:23 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PADNtk096666; Sun, 25 Aug 2013 10:13:23 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251013.r7PADNtk096666@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 10:13:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254840 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 10:13:23 -0000 Author: dumbbell Date: Sun Aug 25 10:13:23 2013 New Revision: 254840 URL: http://svnweb.freebsd.org/changeset/base/254840 Log: drm: Use DRM_IF_MAJOR & DRM_IF_MINOR from drm_core.h Modified: head/sys/dev/drm2/drm_ioctl.c Modified: head/sys/dev/drm2/drm_ioctl.c ============================================================================== --- head/sys/dev/drm2/drm_ioctl.c Sun Aug 25 10:08:58 2013 (r254839) +++ head/sys/dev/drm2/drm_ioctl.c Sun Aug 25 10:13:23 2013 (r254840) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); */ #include +#include /* * Beginning in revision 1.1 of the DRM interface, getunique will return @@ -255,10 +256,6 @@ int drm_getcap(struct drm_device *dev, v return 0; } - -#define DRM_IF_MAJOR 1 -#define DRM_IF_MINOR 2 - int drm_setversion(struct drm_device *dev, void *data, struct drm_file *file_priv) { From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 10:28:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8FD6DA9B; Sun, 25 Aug 2013 10:28:02 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7D55025F3; Sun, 25 Aug 2013 10:28:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PAS24B003450; Sun, 25 Aug 2013 10:28:02 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PAS2j5003449; Sun, 25 Aug 2013 10:28:02 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251028.r7PAS2j5003449@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 10:28:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254841 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 10:28:02 -0000 Author: dumbbell Date: Sun Aug 25 10:28:02 2013 New Revision: 254841 URL: http://svnweb.freebsd.org/changeset/base/254841 Log: drm: Import list_for_each_entry_safe_from() macro Modified: head/sys/dev/drm2/drm_linux_list.h Modified: head/sys/dev/drm2/drm_linux_list.h ============================================================================== --- head/sys/dev/drm2/drm_linux_list.h Sun Aug 25 10:13:23 2013 (r254840) +++ head/sys/dev/drm2/drm_linux_list.h Sun Aug 25 10:28:02 2013 (r254841) @@ -144,6 +144,11 @@ list_del_init(struct list_head *entry) { &pos->member != (head); \ pos = n, n = list_entry(n->member.next, __typeof(*n), member)) +#define list_for_each_entry_safe_from(pos, n, head, member) \ + for (n = list_entry(pos->member.next, __typeof(*pos), member); \ + &pos->member != (head); \ + pos = n, n = list_entry(n->member.next, __typeof(*n), member)) + #define list_first_entry(ptr, type, member) \ list_entry((ptr)->next, type, member) From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 10:57:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2A0C8FD3; Sun, 25 Aug 2013 10:57:13 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 15CD12726; Sun, 25 Aug 2013 10:57:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PAvD6K018933; Sun, 25 Aug 2013 10:57:13 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PAv9Pt018914; Sun, 25 Aug 2013 10:57:09 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201308251057.r7PAv9Pt018914@svn.freebsd.org> From: Andre Oppermann Date: Sun, 25 Aug 2013 10:57:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254842 - in head/sys: compat/ndis dev/cas dev/hatm dev/if_ndis dev/iscsi_initiator dev/lge dev/mwl dev/wb 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 10:57:13 -0000 Author: andre Date: Sun Aug 25 10:57:09 2013 New Revision: 254842 URL: http://svnweb.freebsd.org/changeset/base/254842 Log: Give (*ext_free) an int return value allowing for very sophisticated external mbuf buffer management capabilities in the future. For now only EXT_FREE_OK is defined with current legacy behavior. Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/ndis/kern_ndis.c head/sys/compat/ndis/ndis_var.h head/sys/dev/cas/if_cas.c head/sys/dev/hatm/if_hatm_intr.c head/sys/dev/if_ndis/if_ndis.c head/sys/dev/iscsi_initiator/isc_soc.c head/sys/dev/lge/if_lge.c head/sys/dev/mwl/if_mwl.c head/sys/dev/wb/if_wb.c head/sys/kern/subr_mbpool.c head/sys/kern/uipc_cow.c head/sys/kern/uipc_mbuf.c head/sys/kern/uipc_syscalls.c head/sys/sys/mbpool.h head/sys/sys/mbuf.h head/sys/sys/sf_buf.h Modified: head/sys/compat/ndis/kern_ndis.c ============================================================================== --- head/sys/compat/ndis/kern_ndis.c Sun Aug 25 10:28:02 2013 (r254841) +++ head/sys/compat/ndis/kern_ndis.c Sun Aug 25 10:57:09 2013 (r254842) @@ -482,16 +482,14 @@ ndis_return(dobj, arg) KeReleaseSpinLock(&block->nmb_returnlock, irql); } -void -ndis_return_packet(buf, arg) - void *buf; /* not used */ - void *arg; +int +ndis_return_packet(struct mbuf *m, void *buf, void *arg) { ndis_packet *p; ndis_miniport_block *block; if (arg == NULL) - return; + return (EXT_FREE_OK); p = arg; @@ -500,7 +498,7 @@ ndis_return_packet(buf, arg) /* Release packet when refcount hits zero, otherwise return. */ if (p->np_refcnt) - return; + return (EXT_FREE_OK); block = ((struct ndis_softc *)p->np_softc)->ndis_block; @@ -512,6 +510,8 @@ ndis_return_packet(buf, arg) IoQueueWorkItem(block->nmb_returnitem, (io_workitem_func)kernndis_functbl[7].ipt_wrap, WORKQUEUE_CRITICAL, block); + + return (EXT_FREE_OK); } void Modified: head/sys/compat/ndis/ndis_var.h ============================================================================== --- head/sys/compat/ndis/ndis_var.h Sun Aug 25 10:28:02 2013 (r254841) +++ head/sys/compat/ndis/ndis_var.h Sun Aug 25 10:57:09 2013 (r254842) @@ -1743,7 +1743,7 @@ extern int ndis_halt_nic(void *); extern int ndis_shutdown_nic(void *); extern int ndis_pnpevent_nic(void *, int); extern int ndis_init_nic(void *); -extern void ndis_return_packet(void *, void *); +extern int ndis_return_packet(struct mbuf *, void *, void *); extern int ndis_init_dma(void *); extern int ndis_destroy_dma(void *); extern int ndis_create_sysctls(void *); Modified: head/sys/dev/cas/if_cas.c ============================================================================== --- head/sys/dev/cas/if_cas.c Sun Aug 25 10:28:02 2013 (r254841) +++ head/sys/dev/cas/if_cas.c Sun Aug 25 10:57:09 2013 (r254842) @@ -132,7 +132,7 @@ static void cas_detach(struct cas_softc static int cas_disable_rx(struct cas_softc *sc); static int cas_disable_tx(struct cas_softc *sc); static void cas_eint(struct cas_softc *sc, u_int status); -static void cas_free(struct mbuf *m, void *arg1, void* arg2); +static int cas_free(struct mbuf *m, void *arg1, void* arg2); static void cas_init(void *xsc); static void cas_init_locked(struct cas_softc *sc); static void cas_init_regs(struct cas_softc *sc); @@ -1887,7 +1887,7 @@ cas_rint(struct cas_softc *sc) #endif } -static void +static int cas_free(struct mbuf *m, void *arg1, void *arg2) { struct cas_rxdsoft *rxds; @@ -1904,7 +1904,7 @@ cas_free(struct mbuf *m, void *arg1, voi rxds = &sc->sc_rxdsoft[idx]; #endif if (refcount_release(&rxds->rxds_refcount) == 0) - return; + return (EXT_FREE_OK); /* * NB: this function can be called via m_freem(9) within @@ -1915,6 +1915,7 @@ cas_free(struct mbuf *m, void *arg1, voi cas_add_rxdesc(sc, idx); if (locked == 0) CAS_UNLOCK(sc); + return (EXT_FREE_OK); } static inline void Modified: head/sys/dev/hatm/if_hatm_intr.c ============================================================================== --- head/sys/dev/hatm/if_hatm_intr.c Sun Aug 25 10:28:02 2013 (r254841) +++ head/sys/dev/hatm/if_hatm_intr.c Sun Aug 25 10:57:09 2013 (r254842) @@ -260,7 +260,7 @@ hatm_mbuf_page_alloc(struct hatm_softc * /* * Free an mbuf and put it onto the free list. */ -static void +static int hatm_mbuf0_free(struct mbuf *m, void *buf, void *args) { struct hatm_softc *sc = args; @@ -270,8 +270,9 @@ hatm_mbuf0_free(struct mbuf *m, void *bu ("freeing unused mbuf %x", c->hdr.flags)); c->hdr.flags &= ~MBUF_USED; hatm_ext_free(&sc->mbuf_list[0], (struct mbufx_free *)c); + return (EXT_FREE_OK); } -static void +static int hatm_mbuf1_free(struct mbuf *m, void *buf, void *args) { struct hatm_softc *sc = args; @@ -281,6 +282,7 @@ hatm_mbuf1_free(struct mbuf *m, void *bu ("freeing unused mbuf %x", c->hdr.flags)); c->hdr.flags &= ~MBUF_USED; hatm_ext_free(&sc->mbuf_list[1], (struct mbufx_free *)c); + return (EXT_FREE_OK); } static void @@ -461,7 +463,7 @@ hatm_rx_buffer(struct hatm_softc *sc, u_ hatm_mbuf0_free, c0, sc, M_PKTHDR, EXT_EXTREF); m->m_data += MBUF0_OFFSET; } else - hatm_mbuf0_free(NULL, c0, sc); + (void)hatm_mbuf0_free(NULL, c0, sc); } else { struct mbuf1_chunk *c1; @@ -485,7 +487,7 @@ hatm_rx_buffer(struct hatm_softc *sc, u_ hatm_mbuf1_free, c1, sc, M_PKTHDR, EXT_EXTREF); m->m_data += MBUF1_OFFSET; } else - hatm_mbuf1_free(NULL, c1, sc); + (void)hatm_mbuf1_free(NULL, c1, sc); } return (m); Modified: head/sys/dev/if_ndis/if_ndis.c ============================================================================== --- head/sys/dev/if_ndis/if_ndis.c Sun Aug 25 10:28:02 2013 (r254841) +++ head/sys/dev/if_ndis/if_ndis.c Sun Aug 25 10:57:09 2013 (r254842) @@ -1401,7 +1401,7 @@ ndis_rxeof(adapter, packets, pktcnt) p = packets[i]; if (p->np_oob.npo_status == NDIS_STATUS_SUCCESS) { p->np_refcnt++; - ndis_return_packet(p, block); + (void)ndis_return_packet(NULL ,p, block); } } return; @@ -1414,7 +1414,7 @@ ndis_rxeof(adapter, packets, pktcnt) if (ndis_ptom(&m0, p)) { device_printf(sc->ndis_dev, "ptom failed\n"); if (p->np_oob.npo_status == NDIS_STATUS_SUCCESS) - ndis_return_packet(p, block); + (void)ndis_return_packet(NULL, p, block); } else { #ifdef notdef if (p->np_oob.npo_status == NDIS_STATUS_RESOURCES) { Modified: head/sys/dev/iscsi_initiator/isc_soc.c ============================================================================== --- head/sys/dev/iscsi_initiator/isc_soc.c Sun Aug 25 10:28:02 2013 (r254841) +++ head/sys/dev/iscsi_initiator/isc_soc.c Sun Aug 25 10:57:09 2013 (r254842) @@ -68,7 +68,7 @@ static int ou_refcnt = 0; /* | function for freeing external storage for mbuf */ -static void +static int ext_free(struct mbuf *m, void *a, void *b) { pduq_t *pq = b; @@ -78,6 +78,7 @@ ext_free(struct mbuf *m, void *a, void * free(pq->buf, M_ISCSIBUF); pq->buf = NULL; } + return (EXT_FREE_OK); } int Modified: head/sys/dev/lge/if_lge.c ============================================================================== --- head/sys/dev/lge/if_lge.c Sun Aug 25 10:28:02 2013 (r254841) +++ head/sys/dev/lge/if_lge.c Sun Aug 25 10:57:09 2013 (r254842) @@ -122,7 +122,7 @@ static int lge_detach(device_t); static int lge_alloc_jumbo_mem(struct lge_softc *); static void lge_free_jumbo_mem(struct lge_softc *); static void *lge_jalloc(struct lge_softc *); -static void lge_jfree(struct mbuf *, void *, void *); +static int lge_jfree(struct mbuf *, void *, void *); static int lge_newbuf(struct lge_softc *, struct lge_rx_desc *, struct mbuf *); static int lge_encap(struct lge_softc *, struct mbuf *, u_int32_t *); @@ -846,7 +846,7 @@ lge_jalloc(sc) /* * Release a jumbo buffer. */ -static void +static int lge_jfree(struct mbuf *m, void *buf, void *args) { struct lge_softc *sc; @@ -873,7 +873,7 @@ lge_jfree(struct mbuf *m, void *buf, voi SLIST_REMOVE_HEAD(&sc->lge_jinuse_listhead, jpool_entries); SLIST_INSERT_HEAD(&sc->lge_jfree_listhead, entry, jpool_entries); - return; + return (EXT_FREE_OK); } /* Modified: head/sys/dev/mwl/if_mwl.c ============================================================================== --- head/sys/dev/mwl/if_mwl.c Sun Aug 25 10:28:02 2013 (r254841) +++ head/sys/dev/mwl/if_mwl.c Sun Aug 25 10:57:09 2013 (r254842) @@ -2621,7 +2621,7 @@ mwl_rxbuf_init(struct mwl_softc *sc, str return 0; } -static void +static int mwl_ext_free(struct mbuf *m, void *data, void *arg) { struct mwl_softc *sc = arg; @@ -2637,6 +2637,7 @@ mwl_ext_free(struct mbuf *m, void *data, sc->sc_rxblocked = 0; mwl_hal_intrset(sc->sc_mh, sc->sc_imask); } + return (EXT_FREE_OK); } struct mwl_frame_bar { Modified: head/sys/dev/wb/if_wb.c ============================================================================== --- head/sys/dev/wb/if_wb.c Sun Aug 25 10:28:02 2013 (r254841) +++ head/sys/dev/wb/if_wb.c Sun Aug 25 10:57:09 2013 (r254842) @@ -142,7 +142,7 @@ static int wb_probe(device_t); static int wb_attach(device_t); static int wb_detach(device_t); -static void wb_bfree(void *addr, void *args); +static int wb_bfree(struct mbuf *, void *addr, void *args); static int wb_newbuf(struct wb_softc *, struct wb_chain_onefrag *, struct mbuf *); static int wb_encap(struct wb_softc *, struct wb_chain *, struct mbuf *); @@ -822,12 +822,11 @@ wb_list_rx_init(sc) return(0); } -static void -wb_bfree(buf, args) - void *buf; - void *args; +static int +wb_bfree(struct mbuf *m, void *buf, void *args) { + return (EXT_FREE_OK); } /* Modified: head/sys/kern/subr_mbpool.c ============================================================================== --- head/sys/kern/subr_mbpool.c Sun Aug 25 10:28:02 2013 (r254841) +++ head/sys/kern/subr_mbpool.c Sun Aug 25 10:57:09 2013 (r254842) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include MODULE_VERSION(libmbpool, 1); @@ -282,10 +283,12 @@ mbp_free(struct mbpool *p, void *ptr) /* * Mbuf system external mbuf free routine */ -void +int mbp_ext_free(struct mbuf *m, void *buf, void *arg) { mbp_free(arg, buf); + + return (EXT_FREE_OK); } /* Modified: head/sys/kern/uipc_cow.c ============================================================================== --- head/sys/kern/uipc_cow.c Sun Aug 25 10:28:02 2013 (r254841) +++ head/sys/kern/uipc_cow.c Sun Aug 25 10:57:09 2013 (r254842) @@ -70,9 +70,9 @@ struct netsend_cow_stats { static struct netsend_cow_stats socow_stats; -static void socow_iodone(struct mbuf *m, void *addr, void *args); +static int socow_iodone(struct mbuf *m, void *addr, void *args); -static void +static int socow_iodone(struct mbuf *m, void *addr, void *args) { struct sf_buf *sf; @@ -94,6 +94,7 @@ socow_iodone(struct mbuf *m, void *addr, vm_page_free(pp); vm_page_unlock(pp); socow_stats.iodone++; + return (EXT_FREE_OK); } int Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Sun Aug 25 10:28:02 2013 (r254841) +++ head/sys/kern/uipc_mbuf.c Sun Aug 25 10:57:09 2013 (r254842) @@ -247,7 +247,7 @@ m_freem(struct mbuf *mb) */ int m_extadd(struct mbuf *mb, caddr_t buf, u_int size, - void (*freef)(struct mbuf *, void *, void *), void *arg1, void *arg2, + int (*freef)(struct mbuf *, void *, void *), void *arg1, void *arg2, int flags, int type, int wait) { KASSERT(type != EXT_CLUSTER, ("%s: EXT_CLUSTER not allowed", __func__)); @@ -321,7 +321,7 @@ mb_free_ext(struct mbuf *m) case EXT_EXTREF: KASSERT(m->m_ext.ext_free != NULL, ("%s: ext_free not set", __func__)); - (*(m->m_ext.ext_free))(m, m->m_ext.ext_arg1, + (void)(*(m->m_ext.ext_free))(m, m->m_ext.ext_arg1, m->m_ext.ext_arg2); break; default: Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Sun Aug 25 10:28:02 2013 (r254841) +++ head/sys/kern/uipc_syscalls.c Sun Aug 25 10:57:09 2013 (r254842) @@ -1854,7 +1854,7 @@ struct sendfile_sync { /* * Detach mapped page and release resources back to the system. */ -void +int sf_buf_mext(struct mbuf *mb, void *addr, void *args) { vm_page_t m; @@ -1873,13 +1873,14 @@ sf_buf_mext(struct mbuf *mb, void *addr, vm_page_free(m); vm_page_unlock(m); if (addr == NULL) - return; + return (EXT_FREE_OK); sfs = addr; mtx_lock(&sfs->mtx); KASSERT(sfs->count> 0, ("Sendfile sync botchup count == 0")); if (--sfs->count == 0) cv_signal(&sfs->cv); mtx_unlock(&sfs->mtx); + return (EXT_FREE_OK); } /* @@ -2315,14 +2316,14 @@ retry_space: m0 = m_get((mnw ? M_NOWAIT : M_WAITOK), MT_DATA); if (m0 == NULL) { error = (mnw ? EAGAIN : ENOBUFS); - sf_buf_mext(NULL, NULL, sf); + (void)sf_buf_mext(NULL, NULL, sf); break; } if (m_extadd(m0, (caddr_t )sf_buf_kva(sf), PAGE_SIZE, sf_buf_mext, sfs, sf, M_RDONLY, EXT_SFBUF, (mnw ? M_NOWAIT : M_WAITOK)) != 0) { error = (mnw ? EAGAIN : ENOBUFS); - sf_buf_mext(NULL, NULL, sf); + (void)sf_buf_mext(NULL, NULL, sf); m_freem(m0); break; } Modified: head/sys/sys/mbpool.h ============================================================================== --- head/sys/sys/mbpool.h Sun Aug 25 10:28:02 2013 (r254841) +++ head/sys/sys/mbpool.h Sun Aug 25 10:57:09 2013 (r254842) @@ -69,7 +69,7 @@ void *mbp_alloc(struct mbpool *, bus_add void mbp_free(struct mbpool *, void *); /* free a chunk that is an external mbuf */ -void mbp_ext_free(struct mbuf *, void *, void *); +int mbp_ext_free(struct mbuf *, void *, void *); /* free all buffers that are marked to be on the card */ void mbp_card_free(struct mbpool *); Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Sun Aug 25 10:28:02 2013 (r254841) +++ head/sys/sys/mbuf.h Sun Aug 25 10:57:09 2013 (r254842) @@ -165,7 +165,7 @@ struct m_ext { uint32_t ext_size; /* size of buffer, for ext_free */ uint32_t ext_type:8, /* type of external storage */ ext_flags:24; /* external storage mbuf flags */ - void (*ext_free) /* free routine if not the usual */ + int (*ext_free) /* free routine if not the usual */ (struct mbuf *, void *, void *); void *ext_arg1; /* optional argument pointer */ void *ext_arg2; /* optional argument pointer */ @@ -366,6 +366,11 @@ struct mbuf { "\30EXT_FLAG_EXP4" /* + * Return values for (*ext_free). + */ +#define EXT_FREE_OK 0 /* Normal return */ + +/* * Flags indicating checksum, segmentation and other offload work to be * done, or already done, by hardware or lower layers. It is split into * separate inbound and outbound flags. @@ -895,7 +900,7 @@ int m_apply(struct mbuf *, int, int, int m_append(struct mbuf *, int, c_caddr_t); void m_cat(struct mbuf *, struct mbuf *); int m_extadd(struct mbuf *, caddr_t, u_int, - void (*)(struct mbuf *, void *, void *), void *, void *, + int (*)(struct mbuf *, void *, void *), void *, void *, int, int, int); struct mbuf *m_collapse(struct mbuf *, int, int); void m_copyback(struct mbuf *, int, int, c_caddr_t); Modified: head/sys/sys/sf_buf.h ============================================================================== --- head/sys/sys/sf_buf.h Sun Aug 25 10:28:02 2013 (r254841) +++ head/sys/sys/sf_buf.h Sun Aug 25 10:57:09 2013 (r254842) @@ -67,6 +67,6 @@ extern counter_u64_t sfstat[sizeof(struc struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); void sf_buf_free(struct sf_buf *sf); -void sf_buf_mext(struct mbuf *mb, void *addr, void *args); +int sf_buf_mext(struct mbuf *mb, void *addr, void *args); #endif /* !_SYS_SF_BUF_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 10:57:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 779EC194; Sun, 25 Aug 2013 10:57:49 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 64A27272B; Sun, 25 Aug 2013 10:57:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PAvnwg019150; Sun, 25 Aug 2013 10:57:49 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PAvnNp019148; Sun, 25 Aug 2013 10:57:49 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308251057.r7PAvnNp019148@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 25 Aug 2013 10:57:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254843 - in head: bin/sh tools/regression/bin/sh/parser X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 10:57:49 -0000 Author: jilles Date: Sun Aug 25 10:57:48 2013 New Revision: 254843 URL: http://svnweb.freebsd.org/changeset/base/254843 Log: sh: Disallow empty simple commands. As per POSIX, a simple command must have at least one redirection, assignment word or command word. These occured in rare cases such as eval "f()" . The extension of allowing no commands inside { }, if, while, for, etc. remains. Added: head/tools/regression/bin/sh/parser/empty-cmd1.0 (contents, props changed) Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Sun Aug 25 10:57:09 2013 (r254842) +++ head/bin/sh/parser.c Sun Aug 25 10:57:48 2013 (r254843) @@ -573,7 +573,7 @@ TRACE(("expecting DO got %s %s\n", tokna synexpect(TEND); checkkwd = CHKKWD | CHKALIAS; break; - /* Handle an empty command like other simple commands. */ + /* A simple command must have at least one redirection or word. */ case TBACKGND: case TSEMI: case TAND: @@ -581,16 +581,12 @@ TRACE(("expecting DO got %s %s\n", tokna case TPIPE: case TENDCASE: case TFALLTHRU: - /* - * An empty command before a ; doesn't make much sense, and - * should certainly be disallowed in the case of `if ;'. - */ + case TEOF: + case TNL: + case TRP: if (!redir) synexpect(-1); - case TNL: - case TEOF: case TWORD: - case TRP: tokpushback++; n1 = simplecmd(rpp, redir); return n1; Added: head/tools/regression/bin/sh/parser/empty-cmd1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parser/empty-cmd1.0 Sun Aug 25 10:57:48 2013 (r254843) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +! (eval ': || f()') 2>/dev/null From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 11:01:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8CD93309; Sun, 25 Aug 2013 11:01:19 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7A593276A; Sun, 25 Aug 2013 11:01:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PB1JXx022490; Sun, 25 Aug 2013 11:01:19 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PB1Js5022489; Sun, 25 Aug 2013 11:01:19 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201308251101.r7PB1Js5022489@svn.freebsd.org> From: Andre Oppermann Date: Sun, 25 Aug 2013 11:01:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254844 - head/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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 11:01:19 -0000 Author: andre Date: Sun Aug 25 11:01:18 2013 New Revision: 254844 URL: http://svnweb.freebsd.org/changeset/base/254844 Log: Bump FreeBSD_version after the struct mbuf changes in r254780, r254799, r254804, r254807, and r254842. Sponsored by: The FreeBSD Foundation Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Aug 25 10:57:48 2013 (r254843) +++ head/sys/sys/param.h Sun Aug 25 11:01:18 2013 (r254844) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000049 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000050 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 11:21:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 16BE7871; Sun, 25 Aug 2013 11:21:04 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 048F22847; Sun, 25 Aug 2013 11:21:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PBL3DK033481; Sun, 25 Aug 2013 11:21:03 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PBL3VW033480; Sun, 25 Aug 2013 11:21:03 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201308251121.r7PBL3VW033480@svn.freebsd.org> From: Andrew Turner Date: Sun, 25 Aug 2013 11:21:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254845 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 11:21:04 -0000 Author: andrew Date: Sun Aug 25 11:21:03 2013 New Revision: 254845 URL: http://svnweb.freebsd.org/changeset/base/254845 Log: Add the unwind information to irq_entry so we can pass through it when unwinding the stack. Modified: head/sys/arm/arm/irq_dispatch.S Modified: head/sys/arm/arm/irq_dispatch.S ============================================================================== --- head/sys/arm/arm/irq_dispatch.S Sun Aug 25 11:01:18 2013 (r254844) +++ head/sys/arm/arm/irq_dispatch.S Sun Aug 25 11:21:03 2013 (r254845) @@ -89,6 +89,7 @@ AST_LOCALS ASENTRY_NP(irq_entry) sub lr, lr, #0x00000004 /* Adjust the lr */ PUSHFRAMEINSVC /* Push an interrupt frame */ + UNWINDSVCFRAME mov r0, sp /* arg for dispatcher */ mov r1, #0 From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 11:23:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3A4E1A8B; Sun, 25 Aug 2013 11:23:39 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 277312857; Sun, 25 Aug 2013 11:23:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PBNd0e034381; Sun, 25 Aug 2013 11:23:39 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PBNdnj034380; Sun, 25 Aug 2013 11:23:39 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201308251123.r7PBNdnj034380@svn.freebsd.org> From: Andrew Turner Date: Sun, 25 Aug 2013 11:23:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254847 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 11:23:39 -0000 Author: andrew Date: Sun Aug 25 11:23:38 2013 New Revision: 254847 URL: http://svnweb.freebsd.org/changeset/base/254847 Log: Add the frame information to cpu_switch to allow us to unwind out of it, for example when dumping threads in the kernel debugger. Modified: head/sys/arm/arm/swtch.S Modified: head/sys/arm/arm/swtch.S ============================================================================== --- head/sys/arm/arm/swtch.S Sun Aug 25 11:21:10 2013 (r254846) +++ head/sys/arm/arm/swtch.S Sun Aug 25 11:23:38 2013 (r254847) @@ -218,6 +218,11 @@ END(cpu_throw) ENTRY(cpu_switch) stmfd sp!, {r4-r7, lr} sub sp, sp, #4; +#ifdef __ARM_EABI__ + .save {r4-r7, lr} + .pad #4 +#endif + mov r6, r2 /* Save the mutex */ .Lswitch_resume: From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 11:34:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 12413D5B; Sun, 25 Aug 2013 11:34:38 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E50E728C6; Sun, 25 Aug 2013 11:34:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PBYbQD039892; Sun, 25 Aug 2013 11:34:37 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PBYbIG039886; Sun, 25 Aug 2013 11:34:37 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251134.r7PBYbIG039886@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 11:34:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254848 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 11:34:38 -0000 Author: dumbbell Date: Sun Aug 25 11:34:37 2013 New Revision: 254848 URL: http://svnweb.freebsd.org/changeset/base/254848 Log: drm: Import drm_pcie_get_speed_cap_mask() in drm_pci.c This comes with several PCI_VENDOR_ID_* defines which should go in a more central place. Modified: head/sys/dev/drm2/drmP.h head/sys/dev/drm2/drm_pci.c Modified: head/sys/dev/drm2/drmP.h ============================================================================== --- head/sys/dev/drm2/drmP.h Sun Aug 25 11:23:38 2013 (r254847) +++ head/sys/dev/drm2/drmP.h Sun Aug 25 11:34:37 2013 (r254848) @@ -1421,5 +1421,22 @@ do { \ #define EREMOTEIO ENXIO #define ERESTARTSYS ERESTART +#define PCI_VENDOR_ID_APPLE 0x106b +#define PCI_VENDOR_ID_ASUSTEK 0x1043 +#define PCI_VENDOR_ID_ATI 0x1002 +#define PCI_VENDOR_ID_DELL 0x1028 +#define PCI_VENDOR_ID_HP 0x103c +#define PCI_VENDOR_ID_IBM 0x1014 +#define PCI_VENDOR_ID_INTEL 0x8086 +#define PCI_VENDOR_ID_SERVERWORKS 0x1166 +#define PCI_VENDOR_ID_SONY 0x104d +#define PCI_VENDOR_ID_VIA 0x1106 + +#define DRM_PCIE_SPEED_25 1 +#define DRM_PCIE_SPEED_50 2 +#define DRM_PCIE_SPEED_80 4 + +extern int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *speed_mask); + #endif /* __KERNEL__ */ #endif /* _DRM_P_H_ */ Modified: head/sys/dev/drm2/drm_pci.c ============================================================================== --- head/sys/dev/drm2/drm_pci.c Sun Aug 25 11:23:38 2013 (r254847) +++ head/sys/dev/drm2/drm_pci.c Sun Aug 25 11:34:37 2013 (r254848) @@ -123,3 +123,53 @@ drm_pci_free(struct drm_device *dev, drm } /*@}*/ + +int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *mask) +{ + device_t root; + int pos; + u32 lnkcap = 0, lnkcap2 = 0; + + *mask = 0; + if (!drm_device_is_pcie(dev)) + return -EINVAL; + + root = device_get_parent(dev->device); + + pos = 0; + pci_find_cap(root, PCIY_EXPRESS, &pos); + if (!pos) + return -EINVAL; + + /* we've been informed via and serverworks don't make the cut */ + if (pci_get_vendor(root) == PCI_VENDOR_ID_VIA || + pci_get_vendor(root) == PCI_VENDOR_ID_SERVERWORKS) + return -EINVAL; + + lnkcap = pci_read_config(root, pos + PCIER_LINK_CAP, 4); + lnkcap2 = pci_read_config(root, pos + PCIER_LINK_CAP2, 4); + + lnkcap &= PCIEM_LINK_CAP_MAX_SPEED; + lnkcap2 &= 0xfe; + +#define PCI_EXP_LNKCAP2_SLS_2_5GB 0x02 /* Supported Link Speed 2.5GT/s */ +#define PCI_EXP_LNKCAP2_SLS_5_0GB 0x04 /* Supported Link Speed 5.0GT/s */ +#define PCI_EXP_LNKCAP2_SLS_8_0GB 0x08 /* Supported Link Speed 8.0GT/s */ + + if (lnkcap2) { /* PCIE GEN 3.0 */ + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_2_5GB) + *mask |= DRM_PCIE_SPEED_25; + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_5_0GB) + *mask |= DRM_PCIE_SPEED_50; + if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_8_0GB) + *mask |= DRM_PCIE_SPEED_80; + } else { + if (lnkcap & 1) + *mask |= DRM_PCIE_SPEED_25; + if (lnkcap & 2) + *mask |= DRM_PCIE_SPEED_50; + } + + DRM_INFO("probing gen 2 caps for device %x:%x = %x/%x\n", pci_get_vendor(root), pci_get_device(root), lnkcap, lnkcap2); + return 0; +} From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 11:42:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C5FBB310; Sun, 25 Aug 2013 11:42:53 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B37102947; Sun, 25 Aug 2013 11:42:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PBgr3I044456; Sun, 25 Aug 2013 11:42:53 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PBgrG2044454; Sun, 25 Aug 2013 11:42:53 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308251142.r7PBgrG2044454@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 25 Aug 2013 11:42:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254849 - in head: bin/sh tools/regression/bin/sh/builtins X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 11:42:53 -0000 Author: jilles Date: Sun Aug 25 11:42:53 2013 New Revision: 254849 URL: http://svnweb.freebsd.org/changeset/base/254849 Log: sh: Recognize "--" as end of options in alias builtin. Aliases starting with "-" (which are non-POSIX) will need to be preceded by an alias not starting with "-" or the newly added "--". Added: head/tools/regression/bin/sh/builtins/alias4.0 (contents, props changed) Modified: head/bin/sh/alias.c Modified: head/bin/sh/alias.c ============================================================================== --- head/bin/sh/alias.c Sun Aug 25 11:34:37 2013 (r254848) +++ head/bin/sh/alias.c Sun Aug 25 11:42:53 2013 (r254849) @@ -237,17 +237,19 @@ printaliases(void) } int -aliascmd(int argc, char **argv) +aliascmd(int argc __unused, char **argv __unused) { char *n, *v; int ret = 0; struct alias *ap; - if (argc == 1) { + nextopt(""); + + if (*argptr == NULL) { printaliases(); return (0); } - while ((n = *++argv) != NULL) { + while ((n = *argptr++) != NULL) { if ((v = strchr(n+1, '=')) == NULL) /* n+1: funny ksh stuff */ if ((ap = lookupalias(n, 0)) == NULL) { warning("%s: not found", n); Added: head/tools/regression/bin/sh/builtins/alias4.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/alias4.0 Sun Aug 25 11:42:53 2013 (r254849) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +unalias -a +alias -- From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 11:55:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0C689A56; Sun, 25 Aug 2013 11:55:40 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qa0-x234.google.com (mail-qa0-x234.google.com [IPv6:2607:f8b0:400d:c00::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8816F29C8; Sun, 25 Aug 2013 11:55:39 +0000 (UTC) Received: by mail-qa0-f52.google.com with SMTP id l18so462834qak.18 for ; Sun, 25 Aug 2013 04:55:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Lws4o24Z4FVZYzceIA8Bw2rwyVDxRmE+98JUkTg7SkQ=; b=FGD3q/Iu+Cg/iOBNykvOMMOEbBJ7dEzCA1HBGVvVs2nOMh+xM/3bS2WDsrurfaq7HV Jr5ajhag3+40+xubI/GFCyyydxLXsgt40TnozLt78ZP5FJaaW9mmuj+hmAXlMSo4cHqF g+LR3uvO/rSGyH8RF+VLYi8kdYz3WYtMjtqr/TcPyyPndy+MlEKOX8lF2KQxOPbIHMp9 8GrEBc5lLaMwXkYPDqzzAVTWUyuUosCpxWDy6BVyqRwWVDbDTV5axS3ITj8abhjrolGO fzx/FVWjJ/NqtIYx0GqpsZwTog3ZB7As9QYv5lQZwlYyGdkfvJrIjttCKUyGbduqrdC9 i/jQ== MIME-Version: 1.0 X-Received: by 10.224.23.134 with SMTP id r6mr9929819qab.34.1377431738660; Sun, 25 Aug 2013 04:55:38 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.128.70 with HTTP; Sun, 25 Aug 2013 04:55:38 -0700 (PDT) In-Reply-To: References: <201308250207.r7P27SE3033192@svn.freebsd.org> Date: Sun, 25 Aug 2013 04:55:38 -0700 X-Google-Sender-Auth: iGrMFgL66R0p4iY8mb7Qp888pMo Message-ID: Subject: Re: svn commit: r254824 - head/sys/dev/hwpmc From: Adrian Chadd To: hiren panchasara Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head , svn-src-all , src-committers X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 11:55:40 -0000 Ah, damnit! Thanks for catching that. Sorry, normally I use editor macros to catch this, but for some reason, the "I'm over 80 columns wide" macro isn't in vim. Let me fix this. -adrian On 24 August 2013 23:56, hiren panchasara wrote: > > > > On Sat, Aug 24, 2013 at 7:07 PM, Adrian Chadd wrote: > >> Author: adrian >> Date: Sun Aug 25 02:07:28 2013 >> New Revision: 254824 >> URL: http://svnweb.freebsd.org/changeset/base/254824 >> >> Log: >> Update the MEM_UOP_RETIRED PMC operation for sandy bridge and sandy >> bridge Xeon. >> >> Summary: These are PEBS events but they're also available as normal >> counter/sample events. The source table (Table 19-2) lists the >> base versions (LOAD, STLB_MISS, SPLIT, ALL) but it says they must >> be qualified with other values. This particular commit fleshes >> out those umask values. >> >> Source: >> >> * Linux; SDM June 2013, Volume 3B, Table 19-2 and 18-21. >> >> Tested: >> >> * Sandy Bridge (non-Xeon) >> >> Modified: >> head/sys/dev/hwpmc/hwpmc_core.c >> head/sys/dev/hwpmc/pmc_events.h >> >> Modified: head/sys/dev/hwpmc/hwpmc_core.c >> >> ============================================================================== >> --- head/sys/dev/hwpmc/hwpmc_core.c Sun Aug 25 01:55:14 2013 >> (r254823) >> +++ head/sys/dev/hwpmc/hwpmc_core.c Sun Aug 25 02:07:28 2013 >> (r254824) >> @@ -1514,19 +1514,21 @@ static struct iap_event_descr iap_events >> IAPDESCR(CEH_00H, 0xCE, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), >> IAPDESCR(CFH_00H, 0xCF, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), >> >> + /* Sandy Bridge / Sandy Bridge Xeon - 11, 12, 21, 41, 42, 81, 82 */ >> IAPDESCR(D0H_00H, 0xD0, 0x00, IAP_F_FM | IAP_F_CC), >> - IAPDESCR(D0H_01H, 0xD0, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | >> - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), >> - IAPDESCR(D0H_02H, 0xD0, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | >> - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), >> - IAPDESCR(D0H_10H, 0xD0, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | >> - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), >> - IAPDESCR(D0H_20H, 0xD0, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | >> - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), >> - IAPDESCR(D0H_40H, 0xD0, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB | >> - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), >> - IAPDESCR(D0H_80H, 0xD0, 0X80, IAP_F_FM | IAP_F_SB | IAP_F_IB | >> - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), >> + IAPDESCR(D0H_01H, 0xD0, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | >> IAP_F_IB | IAP_F_IBX | IAP_F_HW), >> > > This is unnecessarily going above 80-columns. > > Thanks, > Hiren > >> + IAPDESCR(D0H_02H, 0xD0, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | >> IAP_F_HW), >> + IAPDESCR(D0H_10H, 0xD0, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | >> IAP_F_HW), >> + IAPDESCR(D0H_11H, 0xD0, 0x11, IAP_F_FM | IAP_F_SB | IAP_F_SBX), >> + IAPDESCR(D0H_12H, 0xD0, 0x12, IAP_F_FM | IAP_F_SB | IAP_F_SBX), >> + IAPDESCR(D0H_20H, 0xD0, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | >> IAP_F_HW), >> + IAPDESCR(D0H_21H, 0xD0, 0x21, IAP_F_FM | IAP_F_SB | IAP_F_SBX), >> + IAPDESCR(D0H_40H, 0xD0, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | >> IAP_F_HW), >> + IAPDESCR(D0H_41H, 0xD0, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_SBX), >> + IAPDESCR(D0H_42H, 0xD0, 0x42, IAP_F_FM | IAP_F_SB | IAP_F_SBX), >> + IAPDESCR(D0H_80H, 0xD0, 0x80, IAP_F_FM | IAP_F_IB | IAP_F_IBX | >> IAP_F_HW), >> + IAPDESCR(D0H_81H, 0xD0, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_SBX), >> + IAPDESCR(D0H_82H, 0xD0, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_SBX), >> >> IAPDESCR(D1H_01H, 0xD1, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_SB | >> IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), >> >> Modified: head/sys/dev/hwpmc/pmc_events.h >> >> ============================================================================== >> --- head/sys/dev/hwpmc/pmc_events.h Sun Aug 25 01:55:14 2013 >> (r254823) >> +++ head/sys/dev/hwpmc/pmc_events.h Sun Aug 25 02:07:28 2013 >> (r254824) >> @@ -1053,9 +1053,16 @@ __PMC_EV(IAP, EVENT_D0H_00H) \ >> __PMC_EV(IAP, EVENT_D0H_01H) \ >> __PMC_EV(IAP, EVENT_D0H_02H) \ >> __PMC_EV(IAP, EVENT_D0H_10H) \ >> +__PMC_EV(IAP, EVENT_D0H_11H) \ >> +__PMC_EV(IAP, EVENT_D0H_12H) \ >> __PMC_EV(IAP, EVENT_D0H_20H) \ >> +__PMC_EV(IAP, EVENT_D0H_21H) \ >> __PMC_EV(IAP, EVENT_D0H_40H) \ >> +__PMC_EV(IAP, EVENT_D0H_41H) \ >> +__PMC_EV(IAP, EVENT_D0H_42H) \ >> __PMC_EV(IAP, EVENT_D0H_80H) \ >> +__PMC_EV(IAP, EVENT_D0H_81H) \ >> +__PMC_EV(IAP, EVENT_D0H_82H) \ >> __PMC_EV(IAP, EVENT_D1H_01H) \ >> __PMC_EV(IAP, EVENT_D1H_02H) \ >> __PMC_EV(IAP, EVENT_D1H_04H) \ >> @@ -3286,12 +3293,13 @@ __PMC_EV_ALIAS("FP_ASSIST.ANY", IAP_EVEN >> __PMC_EV_ALIAS("ROB_MISC_EVENTS.LBR_INSERTS", IAP_EVENT_CCH_20H) \ >> __PMC_EV_ALIAS("MEM_TRANS_RETIRED.LOAD_LATENCY", IAP_EVENT_CDH_01H) \ >> __PMC_EV_ALIAS("MEM_TRANS_RETIRED.PRECISE_STORE", IAP_EVENT_CDH_02H) \ >> -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOADS", IAP_EVENT_D0H_01H) \ >> -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STORES", IAP_EVENT_D0H_02H) \ >> -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS", IAP_EVENT_D0H_10H) \ >> -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK", IAP_EVENT_D0H_20H) \ >> -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT", IAP_EVENT_D0H_40H) \ >> -__PMC_EV_ALIAS("MEM_UOP_RETIRED_ALL", IAP_EVENT_D0H_80H) \ >> +__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS_LOADS", IAP_EVENT_D0H_11H) \ >> +__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS_STORES", IAP_EVENT_D0H_12H) \ >> +__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK_LOADS", IAP_EVENT_D0H_21H) >> \ >> +__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_LOADS", IAP_EVENT_D0H_41H) \ >> +__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ >> +__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_LOADS", IAP_EVENT_D0H_81H) \ >> +__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_STORES", IAP_EVENT_D0H_82H) >> \ >> __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L1_HIT", IAP_EVENT_D1H_01H) \ >> __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L2_HIT", IAP_EVENT_D1H_02H) \ >> __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.LLC_HIT", IAP_EVENT_D1H_04H) \ >> @@ -3517,12 +3525,13 @@ __PMC_EV_ALIAS("FP_ASSIST.ANY", IAP_EVEN >> __PMC_EV_ALIAS("ROB_MISC_EVENTS.LBR_INSERTS", IAP_EVENT_CCH_20H) \ >> __PMC_EV_ALIAS("MEM_TRANS_RETIRED.LOAD_LATENCY", IAP_EVENT_CDH_01H) \ >> __PMC_EV_ALIAS("MEM_TRANS_RETIRED.PRECISE_STORE", IAP_EVENT_CDH_02H) \ >> -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOADS", IAP_EVENT_D0H_01H) \ >> -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STORES", IAP_EVENT_D0H_02H) \ >> -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS", IAP_EVENT_D0H_10H) \ >> -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK", IAP_EVENT_D0H_20H) \ >> -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT", IAP_EVENT_D0H_40H) \ >> -__PMC_EV_ALIAS("MEM_UOP_RETIRED_ALL", IAP_EVENT_D0H_80H) \ >> +__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS_LOADS", IAP_EVENT_D0H_11H) \ >> +__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS_STORES", IAP_EVENT_D0H_12H) \ >> +__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK_LOADS", IAP_EVENT_D0H_21H) >> \ >> +__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_LOADS", IAP_EVENT_D0H_41H) \ >> +__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ >> +__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_LOADS", IAP_EVENT_D0H_81H) \ >> +__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_STORES", IAP_EVENT_D0H_82H) >> \ >> __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L1_HIT", IAP_EVENT_D1H_01H) \ >> __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L2_HIT", IAP_EVENT_D1H_02H) \ >> __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.LLC_HIT", IAP_EVENT_D1H_04H) \ >> > > From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 12:02:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0ACEDEB6; Sun, 25 Aug 2013 12:02:21 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EC5A72A4D; Sun, 25 Aug 2013 12:02:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PC2KoW055182; Sun, 25 Aug 2013 12:02:20 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PC2K6N055181; Sun, 25 Aug 2013 12:02:20 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201308251202.r7PC2K6N055181@svn.freebsd.org> From: Adrian Chadd Date: Sun, 25 Aug 2013 12:02:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254850 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 12:02:21 -0000 Author: adrian Date: Sun Aug 25 12:02:20 2013 New Revision: 254850 URL: http://svnweb.freebsd.org/changeset/base/254850 Log: Fix a >80 character long line, introduced in my previous commit. Noticed by: hiren Modified: head/sys/dev/hwpmc/hwpmc_core.c Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Sun Aug 25 11:42:53 2013 (r254849) +++ head/sys/dev/hwpmc/hwpmc_core.c Sun Aug 25 12:02:20 2013 (r254850) @@ -1516,7 +1516,8 @@ static struct iap_event_descr iap_events /* Sandy Bridge / Sandy Bridge Xeon - 11, 12, 21, 41, 42, 81, 82 */ IAPDESCR(D0H_00H, 0xD0, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(D0H_01H, 0xD0, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), + IAPDESCR(D0H_01H, 0xD0, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | + IAP_F_IBX | IAP_F_HW), IAPDESCR(D0H_02H, 0xD0, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), IAPDESCR(D0H_10H, 0xD0, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), IAPDESCR(D0H_11H, 0xD0, 0x11, IAP_F_FM | IAP_F_SB | IAP_F_SBX), From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 12:07:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 14F20175; Sun, 25 Aug 2013 12:07:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E59102A5E; Sun, 25 Aug 2013 12:07:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PC7Y69057077; Sun, 25 Aug 2013 12:07:34 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PC7YpQ057074; Sun, 25 Aug 2013 12:07:34 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201308251207.r7PC7YpQ057074@svn.freebsd.org> From: Ed Maste Date: Sun, 25 Aug 2013 12:07:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254851 - in head/contrib/llvm/tools/lldb/source: . Plugins/Process/gdb-remote X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 12:07:35 -0000 Author: emaste Date: Sun Aug 25 12:07:34 2013 New Revision: 254851 URL: http://svnweb.freebsd.org/changeset/base/254851 Log: Disable lldb target support not (currently) of interest - Remote iOS debugging - OS X symbol provider, core files - PECOFF object files - Linux platform support Sponsored by: DARPA, AFRL Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp head/contrib/llvm/tools/lldb/source/lldb.cpp Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp ============================================================================== --- head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Sun Aug 25 12:02:20 2013 (r254850) +++ head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Sun Aug 25 12:07:34 2013 (r254851) @@ -57,7 +57,6 @@ #include "lldb/Host/Host.h" #include "Plugins/Process/Utility/InferiorCallPOSIX.h" #include "Plugins/Process/Utility/StopInfoMachException.h" -#include "Plugins/Platform/MacOSX/PlatformRemoteiOS.h" #include "Utility/StringExtractorGDBRemote.h" #include "GDBRemoteRegisterContext.h" #include "ProcessGDBRemote.h" @@ -1809,6 +1808,7 @@ ProcessGDBRemote::DoDestroy () if (log) log->Printf ("ProcessGDBRemote::DoDestroy()"); +#if 0 // XXX Currently no iOS target support on FreeBSD // There is a bug in older iOS debugservers where they don't shut down the process // they are debugging properly. If the process is sitting at a breakpoint or an exception, // this can cause problems with restarting. So we check to see if any of our threads are stopped @@ -1912,6 +1912,7 @@ ProcessGDBRemote::DoDestroy () } } } +#endif // Interrupt if our inferior is running... int exit_status = SIGABRT; Modified: head/contrib/llvm/tools/lldb/source/lldb.cpp ============================================================================== --- head/contrib/llvm/tools/lldb/source/lldb.cpp Sun Aug 25 12:02:20 2013 (r254850) +++ head/contrib/llvm/tools/lldb/source/lldb.cpp Sun Aug 25 12:07:34 2013 (r254851) @@ -29,7 +29,6 @@ #include "Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h" #include "Plugins/Disassembler/llvm/DisassemblerLLVMC.h" #include "Plugins/Instruction/ARM/EmulateInstructionARM.h" -#include "Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.h" #include "Plugins/SymbolVendor/ELF/SymbolVendorELF.h" #include "Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h" #include "Plugins/ObjectFile/ELF/ObjectFileELF.h" @@ -38,10 +37,8 @@ #include "Plugins/SymbolFile/Symtab/SymbolFileSymtab.h" #include "Plugins/UnwindAssembly/x86/UnwindAssembly-x86.h" #include "Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h" -#include "Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h" #include "Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h" #include "Plugins/Platform/FreeBSD/PlatformFreeBSD.h" -#include "Plugins/Platform/Linux/PlatformLinux.h" #include "Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h" #ifndef LLDB_DISABLE_PYTHON #include "Plugins/OperatingSystem/Python/OperatingSystemPython.h" @@ -60,8 +57,6 @@ #include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h" #endif -#include "Plugins/Process/mach-core/ProcessMachCore.h" - #if defined(__linux__) or defined(__FreeBSD__) #include "Plugins/Process/elf-core/ProcessElfCore.h" #endif @@ -109,10 +104,8 @@ lldb_private::Initialize () UnwindAssemblyInstEmulation::Initialize(); UnwindAssembly_x86::Initialize(); EmulateInstructionARM::Initialize (); - ObjectFilePECOFF::Initialize (); DynamicLoaderPOSIXDYLD::Initialize (); PlatformFreeBSD::Initialize(); - PlatformLinux::Initialize(); SymbolFileDWARFDebugMap::Initialize(); ItaniumABILanguageRuntime::Initialize(); #ifndef LLDB_DISABLE_PYTHON @@ -130,8 +123,6 @@ lldb_private::Initialize () ObjectContainerUniversalMachO::Initialize(); ObjectFileMachO::Initialize(); ProcessKDP::Initialize(); - ProcessMachCore::Initialize(); - SymbolVendorMacOSX::Initialize(); PlatformDarwinKernel::Initialize(); PlatformRemoteiOS::Initialize(); PlatformMacOSX::Initialize(); @@ -193,10 +184,8 @@ lldb_private::Terminate () UnwindAssembly_x86::Terminate(); UnwindAssemblyInstEmulation::Terminate(); EmulateInstructionARM::Terminate (); - ObjectFilePECOFF::Terminate (); DynamicLoaderPOSIXDYLD::Terminate (); PlatformFreeBSD::Terminate(); - PlatformLinux::Terminate(); SymbolFileDWARFDebugMap::Terminate(); ItaniumABILanguageRuntime::Terminate(); #ifndef LLDB_DISABLE_PYTHON @@ -210,9 +199,7 @@ lldb_private::Terminate () AppleObjCRuntimeV1::Terminate(); ObjectContainerUniversalMachO::Terminate(); ObjectFileMachO::Terminate(); - ProcessMachCore::Terminate(); ProcessKDP::Terminate(); - SymbolVendorMacOSX::Terminate(); PlatformMacOSX::Terminate(); PlatformDarwinKernel::Terminate(); PlatformRemoteiOS::Terminate(); From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 12:11:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 29D47301; Sun, 25 Aug 2013 12:11:49 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id EABA32A98; Sun, 25 Aug 2013 12:11:48 +0000 (UTC) Received: from bender.Home (97e5e46b.skybroadband.com [151.229.228.107]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id A4EF95DFF7; Sun, 25 Aug 2013 12:11:40 +0000 (UTC) Date: Sun, 25 Aug 2013 13:11:34 +0100 From: Andrew Turner To: Grzegorz Bernacki Subject: Re: svn commit: r251370 - head/sys/arm/arm Message-ID: <20130825131134.11815f5d@bender.Home> In-Reply-To: <201306040921.r549LI8t021617@svn.freebsd.org> References: <201306040921.r549LI8t021617@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Zbigniew Bodek , freebsd-arm@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 12:11:49 -0000 On Tue, 4 Jun 2013 09:21:18 +0000 (UTC) Grzegorz Bernacki wrote: > Author: gber > Date: Tue Jun 4 09:21:18 2013 > New Revision: 251370 > URL: http://svnweb.freebsd.org/changeset/base/251370 > > Log: > Implement pmap_copy() for ARMv6/v7. > > Copy the given range of mappings from the source map to the > destination map, thereby reducing the number of VM faults on fork. > > Submitted by: Zbigniew Bodek > Sponsored by: The FreeBSD Foundation, Semihalf > > Modified: > head/sys/arm/arm/pmap-v6.c This change leads to a deadlock when I attempt to run make buildworld on my PandaBoard. The problem is you are locking pvh_global_lock, src_pmap, and dst_pmap then calling pmap_alloc_l2_bucket. This may unlock pvh_global_lock and dst_pmap, but it has no knowledge of src_pmap so it will keep it locked. If another thread needs to lock src_pmap, for example the pagedaemon may in pmap_clearbit, it will lock pvh_global_lock. This will succeed when pmap_alloc_l2_bucket unlocks it. It will then attempt to lock src_pmap but, as it is already locked, it will wait for pmap_copy to unlock it. At this point pmap_alloc_l2_bucket will attempt to lock pvh_global_lock again, however this lock is already held so it waits for the other thread to unlock it. At this point both threads are waiting on each other causing a deadlock. I don't know enough about the pmap or vm code to be able to fix this, other than reverting this commit. Andrew > > Modified: head/sys/arm/arm/pmap-v6.c > ============================================================================== > --- head/sys/arm/arm/pmap-v6.c Tue Jun 4 07:37:06 2013 > (r251369) +++ head/sys/arm/arm/pmap-v6.c Tue Jun 4 09:21:18 > 2013 (r251370) @@ -2966,6 +2966,126 @@ void > pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, > vm_size_t len, vm_offset_t src_addr) > { > + struct l2_bucket *l2b_src, *l2b_dst; > + struct pv_entry *pve; > + vm_offset_t addr; > + vm_offset_t end_addr; > + vm_offset_t next_bucket; > + u_int flags; > + boolean_t l2b_alloc; > + > + CTR4(KTR_PMAP, "%s: VA = 0x%08x, len = 0x%08x. Will %s\n", > __func__, > + src_addr, len, (dst_addr != src_addr) ? "exit" : "copy"); > + > + if (dst_addr != src_addr) > + return; > + > + rw_wlock(&pvh_global_lock); > + if (dst_pmap < src_pmap) { > + PMAP_LOCK(dst_pmap); > + PMAP_LOCK(src_pmap); > + } else { > + PMAP_LOCK(src_pmap); > + PMAP_LOCK(dst_pmap); > + } > + > + end_addr = src_addr + len; > + addr = src_addr; > + /* > + * Iterate through all used l2_buckets in a given range. > + */ > + while (addr < end_addr) { > + pt_entry_t *src_ptep, *dst_ptep; > + pt_entry_t src_pte; > + > + next_bucket = L2_NEXT_BUCKET(addr); > + /* > + * If the next bucket VA is out of the > + * copy range then set it to end_addr in order > + * to copy all mappings until the given limit. > + */ > + if (next_bucket > end_addr) > + next_bucket = end_addr; > + > + l2b_src = pmap_get_l2_bucket(src_pmap, addr); > + if (l2b_src == NULL) { > + addr = next_bucket; > + continue; > + } > + src_ptep = &l2b_src->l2b_kva[l2pte_index(addr)]; > + > + while (addr < next_bucket) { > + vm_page_t srcmpte; > + > + src_pte = *src_ptep; > + srcmpte = PHYS_TO_VM_PAGE(l2pte_pa(src_pte)); > + /* > + * We only virtual copy managed pages > + */ > + if (srcmpte && (srcmpte->oflags & > VPO_UNMANAGED) == 0) { > + l2b_alloc = FALSE; > + l2b_dst = > pmap_get_l2_bucket(dst_pmap, addr); > + /* > + * Check if the allocation of another > + * l2_bucket is necessary. > + */ > + if (l2b_dst == NULL) { > + l2b_dst = > pmap_alloc_l2_bucket(dst_pmap, > + addr); > + l2b_alloc = TRUE; > + } > + if (l2b_dst == NULL) > + goto out; > + > + dst_ptep = > &l2b_dst->l2b_kva[l2pte_index(addr)]; + > + if (*dst_ptep == 0 && > + (pve = > pmap_get_pv_entry(dst_pmap, TRUE))) { > + /* > + * Check whether the source > mapping is > + * writable and set the > proper flag > + * for a copied mapping so > that right > + * permissions could be set > on the > + * access fault. > + */ > + flags = 0; > + if ((src_pte & L2_APX) == 0) > + flags = PVF_WRITE; > + pmap_enter_pv(srcmpte, pve, > dst_pmap, > + addr, flags); > + /* > + * Clear the modified and > + * accessed (referenced) > flags > + * and don't set the wired > flag > + * during the copy. > + */ > + *dst_ptep = src_pte; > + *dst_ptep &= ~L2_S_REF; > + *dst_ptep |= L2_APX; > + /* > + * Update stats > + */ > + l2b_dst->l2b_occupancy++; > + > dst_pmap->pm_stats.resident_count++; > + } else { > + /* > + * If the l2_bucket was > acquired as > + * a result of allocation > then free it. > + */ > + if (l2b_alloc) > + > pmap_free_l2_bucket(dst_pmap, > + l2b_dst, 1); > + goto out; > + } > + } > + addr += PAGE_SIZE; > + src_ptep++; > + } > + } > +out: > + rw_wunlock(&pvh_global_lock); > + PMAP_UNLOCK(src_pmap); > + PMAP_UNLOCK(dst_pmap); > } > > > > From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 12:20:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9734F75F; Sun, 25 Aug 2013 12:20:57 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8288C2AF8; Sun, 25 Aug 2013 12:20:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PCKv0p065741; Sun, 25 Aug 2013 12:20:57 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PCKvJa065739; Sun, 25 Aug 2013 12:20:57 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251220.r7PCKvJa065739@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 12:20:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254852 - in head: sys/dev/drm2 tools/tools tools/tools/drm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 12:20:57 -0000 Author: dumbbell Date: Sun Aug 25 12:20:57 2013 New Revision: 254852 URL: http://svnweb.freebsd.org/changeset/base/254852 Log: drm: Update drm_pciids.h based on Linux 3.8 This header can be easily updated using the new "gen-drm_pciids" script, available in tools/tools/drm. The script uses the Linux' drm_pciids.h header for new IDs, the FreeBSD's one because we add the name of the device to each IDs, and the PCI IDs database (misc/pciids port) to fill this name automatically for new IDS. To call the script: tools/tools/drm/gen-drm_pciids \ /path/to/linux/drm_pciids.h \ /path/to/freebsd/drm_pciids.h \ /path/to/pciids/pci.ids Added: head/tools/tools/drm/ head/tools/tools/drm/README (contents, props changed) head/tools/tools/drm/gen-drm_pciids (contents, props changed) Modified: head/sys/dev/drm2/drm_pciids.h head/tools/tools/README Modified: head/sys/dev/drm2/drm_pciids.h ============================================================================== --- head/sys/dev/drm2/drm_pciids.h Sun Aug 25 12:07:34 2013 (r254851) +++ head/sys/dev/drm2/drm_pciids.h Sun Aug 25 12:20:57 2013 (r254852) @@ -1,14 +1,348 @@ /* * $FreeBSD$ */ + /* - This file is auto-generated from the drm_pciids.txt in the DRM CVS - Please contact dri-devel@lists.sf.net to add new cards to this list -*/ + * Generated by gen-drm_pciids from: + * o previous FreeBSD's drm_pciids.h + * o Linux' drm_pciids.h + * o the PCI ID repository (http://pciids.sourceforge.net/) + * + * See tools/tools/drm/gen-drm_pciids. + */ + +#define ffb_PCI_IDS \ + {0, 0, 0, NULL} + +#define gamma_PCI_IDS \ + {0x3D3D, 0x0008, 0, "3DLabs GLINT Gamma G1"}, \ + {0, 0, 0, NULL} + +#define i810_PCI_IDS \ + {0x8086, 0x1132, 0, "Intel i815 GMCH"}, \ + {0x8086, 0x7121, 0, "Intel i810 GMCH"}, \ + {0x8086, 0x7123, 0, "Intel i810-DC100 GMCH"}, \ + {0x8086, 0x7125, 0, "Intel i810E GMCH"}, \ + {0, 0, 0, NULL} + +#define i830_PCI_IDS \ + {0x8086, 0x2562, 0, "Intel i845G GMCH"}, \ + {0x8086, 0x2572, 0, "Intel i865G GMCH"}, \ + {0x8086, 0x3577, 0, "Intel i830M GMCH"}, \ + {0x8086, 0x3582, 0, "Intel i852GM/i855GM GMCH"}, \ + {0, 0, 0, NULL} + +#define i915_PCI_IDS \ + {0x8086, 0x0042, CHIP_I9XX|CHIP_I915, "Intel IronLake"}, \ + {0x8086, 0x0046, CHIP_I9XX|CHIP_I915, "Intel IronLake"}, \ + {0x8086, 0x0102, CHIP_I9XX|CHIP_I915, "Intel SandyBridge"}, \ + {0x8086, 0x0106, CHIP_I9XX|CHIP_I915, "Intel SandyBridge (M)"}, \ + {0x8086, 0x010A, CHIP_I9XX|CHIP_I915, "Intel SandyBridge (M)"}, \ + {0x8086, 0x0112, CHIP_I9XX|CHIP_I915, "Intel SandyBridge"}, \ + {0x8086, 0x0116, CHIP_I9XX|CHIP_I915, "Intel SandyBridge (M)"}, \ + {0x8086, 0x0122, CHIP_I9XX|CHIP_I915, "Intel SandyBridge"}, \ + {0x8086, 0x0126, CHIP_I9XX|CHIP_I915, "Intel SandyBridge (M)"}, \ + {0x8086, 0x0152, CHIP_I9XX|CHIP_I915, "Intel IvyBridge"}, \ + {0x8086, 0x0156, CHIP_I9XX|CHIP_I915, "Intel IvyBridge (M)"}, \ + {0x8086, 0x015A, CHIP_I9XX|CHIP_I915, "Intel IvyBridge (S)"}, \ + {0x8086, 0x0162, CHIP_I9XX|CHIP_I915, "Intel IvyBridge"}, \ + {0x8086, 0x0166, CHIP_I9XX|CHIP_I915, "Intel IvyBridge (M)"}, \ + {0x8086, 0x016A, CHIP_I9XX|CHIP_I915, "Intel IvyBridge (S)"}, \ + {0x8086, 0x2562, CHIP_I8XX, "Intel i845G GMCH"}, \ + {0x8086, 0x2572, CHIP_I8XX, "Intel i865G GMCH"}, \ + {0x8086, 0x2582, CHIP_I9XX|CHIP_I915, "Intel i915G"}, \ + {0x8086, 0x258A, CHIP_I9XX|CHIP_I915, "Intel E7221 (i915)"}, \ + {0x8086, 0x2592, CHIP_I9XX|CHIP_I915, "Intel i915GM"}, \ + {0x8086, 0x2772, CHIP_I9XX|CHIP_I915, "Intel i945G"}, \ + {0x8086, 0x27A2, CHIP_I9XX|CHIP_I915, "Intel i945GM"}, \ + {0x8086, 0x27AE, CHIP_I9XX|CHIP_I915, "Intel i945GME"}, \ + {0x8086, 0x2972, CHIP_I9XX|CHIP_I965, "Intel i946GZ"}, \ + {0x8086, 0x2982, CHIP_I9XX|CHIP_I965, "Intel i965G"}, \ + {0x8086, 0x2992, CHIP_I9XX|CHIP_I965, "Intel i965Q"}, \ + {0x8086, 0x29A2, CHIP_I9XX|CHIP_I965, "Intel i965G"}, \ + {0x8086, 0x29B2, CHIP_I9XX|CHIP_I915, "Intel Q35"}, \ + {0x8086, 0x29C2, CHIP_I9XX|CHIP_I915, "Intel G33"}, \ + {0x8086, 0x29D2, CHIP_I9XX|CHIP_I915, "Intel Q33"}, \ + {0x8086, 0x2A02, CHIP_I9XX|CHIP_I965, "Intel i965GM"}, \ + {0x8086, 0x2A12, CHIP_I9XX|CHIP_I965, "Intel i965GME/GLE"}, \ + {0x8086, 0x2A42, CHIP_I9XX|CHIP_I965, "Mobile Intel® GM45 Express Chipset"}, \ + {0x8086, 0x2E02, CHIP_I9XX|CHIP_I965, "Intel Eaglelake"}, \ + {0x8086, 0x2E12, CHIP_I9XX|CHIP_I965, "Intel Q45/Q43"}, \ + {0x8086, 0x2E22, CHIP_I9XX|CHIP_I965, "Intel G45/G43"}, \ + {0x8086, 0x2E32, CHIP_I9XX|CHIP_I965, "Intel G41"}, \ + {0x8086, 0x2E42, CHIP_I9XX|CHIP_I915, "Intel G43 ?"}, \ + {0x8086, 0x2E92, CHIP_I9XX|CHIP_I915, "Intel G43 ?"}, \ + {0x8086, 0x3577, CHIP_I8XX, "Intel i830M GMCH"}, \ + {0x8086, 0x3582, CHIP_I8XX, "Intel i852GM/i855GM GMCH"}, \ + {0x8086, 0x358E, CHIP_I8XX, "Intel i852GM/i855GM GMCH"}, \ + {0x8086, 0xA001, CHIP_I9XX|CHIP_I965, "Intel Pineview"}, \ + {0x8086, 0xA011, CHIP_I9XX|CHIP_I965, "Intel Pineview (M)"}, \ + {0, 0, 0, NULL} + +#define imagine_PCI_IDS \ + {0x105D, 0x2309, IMAGINE_128, "Imagine 128"}, \ + {0x105D, 0x2339, IMAGINE_128_2, "Imagine 128-II"}, \ + {0x105D, 0x493D, IMAGINE_T2R, "Ticket to Ride"}, \ + {0x105D, 0x5348, IMAGINE_REV4, "Revolution IV"}, \ + {0, 0, 0, NULL} + +#define mach64_PCI_IDS \ + {0x1002, 0x4742, 0, "3D Rage Pro AGP 1X/2X"}, \ + {0x1002, 0x4744, 0, "3D Rage Pro AGP 1X"}, \ + {0x1002, 0x4749, 0, "3D Rage Pro"}, \ + {0x1002, 0x474C, 0, "Rage XC"}, \ + {0x1002, 0x474D, 0, "Rage XL AGP 2X"}, \ + {0x1002, 0x474E, 0, "Rage XC AGP"}, \ + {0x1002, 0x474F, 0, "Rage XL"}, \ + {0x1002, 0x4750, 0, "3D Rage Pro 215GP"}, \ + {0x1002, 0x4751, 0, "3D Rage Pro 215GQ"}, \ + {0x1002, 0x4752, 0, "Rage XL"}, \ + {0x1002, 0x4753, 0, "Rage XC"}, \ + {0x1002, 0x4C42, 0, "3D Rage LT Pro AGP-133"}, \ + {0x1002, 0x4C44, 0, "3D Rage LT Pro AGP-66"}, \ + {0x1002, 0x4C49, 0, "3D Rage LT Pro"}, \ + {0x1002, 0x4C4D, 0, "Rage Mobility P/M AGP 2X"}, \ + {0x1002, 0x4C4E, 0, "Rage Mobility L AGP 2X"}, \ + {0x1002, 0x4C50, 0, "3D Rage LT Pro"}, \ + {0x1002, 0x4C51, 0, "3D Rage LT Pro"}, \ + {0x1002, 0x4C52, 0, "Rage Mobility P/M"}, \ + {0x1002, 0x4C53, 0, "Rage Mobility L"}, \ + {0, 0, 0, NULL} + +#define mga_PCI_IDS \ + {0x102B, 0x0520, MGA_CARD_TYPE_G200, "Matrox G200 (PCI)"}, \ + {0x102B, 0x0521, MGA_CARD_TYPE_G200, "Matrox G200 (AGP)"}, \ + {0x102B, 0x0525, MGA_CARD_TYPE_G400, "Matrox G400/G450 (AGP)"}, \ + {0x102B, 0x2527, MGA_CARD_TYPE_G550, "Matrox G550 (AGP)"}, \ + {0, 0, 0, NULL} + +#define nv_PCI_IDS \ + {0x10DE, 0x0020, NV04, "NVidia RIVA TNT"}, \ + {0x10DE, 0x0028, NV04, "NVidia RIVA TNT2"}, \ + {0x10DE, 0x0029, NV04, "NVidia RIVA TNT2 Ultra"}, \ + {0x10DE, 0x002A, NV04, "NVidia Unknown TNT2"}, \ + {0x10DE, 0x002C, NV04, "NVidia Vanta"}, \ + {0x10DE, 0x002D, NV04, "NVidia RIVA TNT2 Model 64"}, \ + {0x10DE, 0x0040, NV40, "NVidia GeForce 6800 Ultra"}, \ + {0x10DE, 0x0041, NV40, "NVidia GeForce 6800"}, \ + {0x10DE, 0x0042, NV40, "NVidia GeForce 6800 LE"}, \ + {0x10DE, 0x0043, NV40, "NVidia 0x0043"}, \ + {0x10DE, 0x0045, NV40, "NVidia GeForce 6800 GT"}, \ + {0x10DE, 0x0046, NV40, "NVidia GeForce 6800 GT"}, \ + {0x10DE, 0x0049, NV40, "NVidia 0x0049"}, \ + {0x10DE, 0x004E, NV40, "NVidia Quadro FX 4000"}, \ + {0x10DE, 0x0090, NV40, "NVidia 0x0090"}, \ + {0x10DE, 0x0091, NV40, "NVidia GeForce 7800 GTX"}, \ + {0x10DE, 0x0092, NV40, "NVidia 0x0092"}, \ + {0x10DE, 0x0093, NV40, "NVidia 0x0093"}, \ + {0x10DE, 0x0094, NV40, "NVidia 0x0094"}, \ + {0x10DE, 0x0098, NV40, "NVidia 0x0098"}, \ + {0x10DE, 0x0099, NV40, "NVidia GeForce Go 7800 GTX"}, \ + {0x10DE, 0x009C, NV40, "NVidia 0x009C"}, \ + {0x10DE, 0x009D, NV40, "NVidia Quadro FX 4500"}, \ + {0x10DE, 0x009E, NV40, "NVidia 0x009E"}, \ + {0x10DE, 0x00A0, NV04, "NVidia Aladdin TNT2"}, \ + {0x10DE, 0x00C0, NV40, "NVidia 0x00C0"}, \ + {0x10DE, 0x00C1, NV40, "NVidia GeForce 6800"}, \ + {0x10DE, 0x00C2, NV40, "NVidia GeForce 6800 LE"}, \ + {0x10DE, 0x00C8, NV40, "NVidia GeForce Go 6800"}, \ + {0x10DE, 0x00C9, NV40, "NVidia GeForce Go 6800 Ultra"}, \ + {0x10DE, 0x00CC, NV40, "NVidia Quadro FX Go1400"}, \ + {0x10DE, 0x00CD, NV40, "NVidia Quadro FX 3450/4000 SDI"}, \ + {0x10DE, 0x00CE, NV40, "NVidia Quadro FX 1400"}, \ + {0x10DE, 0x00F0, NV40, "Nvidia GeForce 6600 GT"}, \ + {0x10DE, 0x00F1, NV40, "Nvidia GeForce 6600 GT"}, \ + {0x10DE, 0x0100, NV10, "NVidia GeForce 256"}, \ + {0x10DE, 0x0101, NV10, "NVidia GeForce DDR"}, \ + {0x10DE, 0x0103, NV10, "NVidia Quadro"}, \ + {0x10DE, 0x0110, NV10, "NVidia GeForce2 MX/MX 400"}, \ + {0x10DE, 0x0111, NV10, "NVidia GeForce2 MX 100/200"}, \ + {0x10DE, 0x0112, NV10, "NVidia GeForce2 Go"}, \ + {0x10DE, 0x0113, NV10, "NVidia Quadro2 MXR/EX/Go"}, \ + {0x10DE, 0x0140, NV40, "NVidia GeForce 6600 GT"}, \ + {0x10DE, 0x0141, NV40, "NVidia GeForce 6600"}, \ + {0x10DE, 0x0142, NV40, "NVidia GeForce 6600 LE"}, \ + {0x10DE, 0x0143, NV40, "NVidia 0x0143"}, \ + {0x10DE, 0x0144, NV40, "NVidia GeForce Go 6600"}, \ + {0x10DE, 0x0145, NV40, "NVidia GeForce 6610 XL"}, \ + {0x10DE, 0x0146, NV40, "NVidia GeForce Go 6600 TE/6200 TE"}, \ + {0x10DE, 0x0147, NV40, "NVidia GeForce 6700 XL"}, \ + {0x10DE, 0x0148, NV40, "NVidia GeForce Go 6600"}, \ + {0x10DE, 0x0149, NV40, "NVidia GeForce Go 6600 GT"}, \ + {0x10DE, 0x014B, NV40, "NVidia 0x014B"}, \ + {0x10DE, 0x014C, NV40, "NVidia 0x014C"}, \ + {0x10DE, 0x014D, NV40, "NVidia 0x014D"}, \ + {0x10DE, 0x014E, NV40, "NVidia Quadro FX 540"}, \ + {0x10DE, 0x014F, NV40, "NVidia GeForce 6200"}, \ + {0x10DE, 0x0150, NV10, "NVidia GeForce2 GTS"}, \ + {0x10DE, 0x0151, NV10, "NVidia GeForce2 Ti"}, \ + {0x10DE, 0x0152, NV10, "NVidia GeForce2 Ultra"}, \ + {0x10DE, 0x0153, NV10, "NVidia Quadro2 Pro"}, \ + {0x10DE, 0x0160, NV40, "NVidia 0x0160"}, \ + {0x10DE, 0x0161, NV40, "NVidia GeForce 6200 TurboCache(TM)"}, \ + {0x10DE, 0x0162, NV40, "NVidia GeForce 6200SE TurboCache(TM)"}, \ + {0x10DE, 0x0163, NV40, "NVidia 0x0163"}, \ + {0x10DE, 0x0164, NV40, "NVidia GeForce Go 6200"}, \ + {0x10DE, 0x0165, NV40, "NVidia Quadro NVS 285"}, \ + {0x10DE, 0x0166, NV40, "NVidia GeForce Go 6400"}, \ + {0x10DE, 0x0167, NV40, "NVidia GeForce Go 6200"}, \ + {0x10DE, 0x0168, NV40, "NVidia GeForce Go 6400"}, \ + {0x10DE, 0x0169, NV40, "NVidia 0x0169"}, \ + {0x10DE, 0x016B, NV40, "NVidia 0x016B"}, \ + {0x10DE, 0x016C, NV40, "NVidia 0x016C"}, \ + {0x10DE, 0x016D, NV40, "NVidia 0x016D"}, \ + {0x10DE, 0x016E, NV40, "NVidia 0x016E"}, \ + {0x10DE, 0x0170, NV10, "NVidia GeForce4 MX 460"}, \ + {0x10DE, 0x0171, NV10, "NVidia GeForce4 MX 440"}, \ + {0x10DE, 0x0172, NV10, "NVidia GeForce4 MX 420"}, \ + {0x10DE, 0x0173, NV10, "NVidia GeForce4 MX 440-SE"}, \ + {0x10DE, 0x0174, NV10, "NVidia GeForce4 440 Go"}, \ + {0x10DE, 0x0175, NV10, "NVidia GeForce4 420 Go"}, \ + {0x10DE, 0x0176, NV10, "NVidia GeForce4 420 Go 32M"}, \ + {0x10DE, 0x0177, NV10, "NVidia GeForce4 460 Go"}, \ + {0x10DE, 0x0178, NV10, "NVidia Quadro4 550 XGL"}, \ + {0x10DE, 0x0179, NV10, "NVidia GeForce4"}, \ + {0x10DE, 0x017A, NV10, "NVidia Quadro4 NVS"}, \ + {0x10DE, 0x017C, NV10, "NVidia Quadro4 500 GoGL"}, \ + {0x10DE, 0x017D, NV10, "NVidia GeForce4 410 Go 16M"}, \ + {0x10DE, 0x0181, NV10, "NVidia GeForce4 MX 440 with AGP8X"}, \ + {0x10DE, 0x0182, NV10, "NVidia GeForce4 MX 440SE with AGP8X"}, \ + {0x10DE, 0x0183, NV10, "NVidia GeForce4 MX 420 with AGP8X"}, \ + {0x10DE, 0x0185, NV10, "NVidia GeForce4 MX 4000"}, \ + {0x10DE, 0x0186, NV10, "NVidia GeForce4 448 Go"}, \ + {0x10DE, 0x0187, NV10, "NVidia GeForce4 488 Go"}, \ + {0x10DE, 0x0188, NV10, "NVidia Quadro4 580 XGL"}, \ + {0x10DE, 0x0189, NV10, "NVidia GeForce4 MX with AGP8X (Mac)"}, \ + {0x10DE, 0x018A, NV10, "NVidia Quadro4 280 NVS"}, \ + {0x10DE, 0x018B, NV10, "NVidia Quadro4 380 XGL"}, \ + {0x10DE, 0x018C, NV10, "NVidia Quadro NVS 50 PCI"}, \ + {0x10DE, 0x018D, NV10, "NVidia GeForce4 448 Go"}, \ + {0x10DE, 0x01A0, NV10, "NVidia GeForce2 Integrated GPU"}, \ + {0x10DE, 0x01F0, NV10, "NVidia GeForce4 MX Integrated GPU"}, \ + {0x10DE, 0x0200, NV20, "NVidia GeForce3"}, \ + {0x10DE, 0x0201, NV20, "NVidia GeForce3 Ti 200"}, \ + {0x10DE, 0x0202, NV20, "NVidia GeForce3 Ti 500"}, \ + {0x10DE, 0x0203, NV20, "NVidia Quadro DCC"}, \ + {0x10DE, 0x0210, NV40, "NVidia 0x0210"}, \ + {0x10DE, 0x0211, NV40, "NVidia GeForce 6800"}, \ + {0x10DE, 0x0212, NV40, "NVidia GeForce 6800 LE"}, \ + {0x10DE, 0x0215, NV40, "NVidia GeForce 6800 GT"}, \ + {0x10DE, 0x0220, NV40, "NVidia 0x0220"}, \ + {0x10DE, 0x0221, NV40, "NVidia GeForce 6200"}, \ + {0x10DE, 0x0222, NV40, "NVidia 0x0222"}, \ + {0x10DE, 0x0228, NV40, "NVidia 0x0228"}, \ + {0x10DE, 0x0250, NV20, "NVidia GeForce4 Ti 4600"}, \ + {0x10DE, 0x0251, NV20, "NVidia GeForce4 Ti 4400"}, \ + {0x10DE, 0x0252, NV20, "NVidia 0x0252"}, \ + {0x10DE, 0x0253, NV20, "NVidia GeForce4 Ti 4200"}, \ + {0x10DE, 0x0258, NV20, "NVidia Quadro4 900 XGL"}, \ + {0x10DE, 0x0259, NV20, "NVidia Quadro4 750 XGL"}, \ + {0x10DE, 0x025B, NV20, "NVidia Quadro4 700 XGL"}, \ + {0x10DE, 0x0280, NV20, "NVidia GeForce4 Ti 4800"}, \ + {0x10DE, 0x0281, NV20, "NVidia GeForce4 Ti 4200 with AGP8X"}, \ + {0x10DE, 0x0282, NV20, "NVidia GeForce4 Ti 4800 SE"}, \ + {0x10DE, 0x0286, NV20, "NVidia GeForce4 4200 Go"}, \ + {0x10DE, 0x0288, NV20, "NVidia Quadro4 980 XGL"}, \ + {0x10DE, 0x0289, NV20, "NVidia Quadro4 780 XGL"}, \ + {0x10DE, 0x028C, NV20, "NVidia Quadro4 700 GoGL"}, \ + {0x10DE, 0x0301, NV30, "NVidia GeForce FX 5800 Ultra"}, \ + {0x10DE, 0x0302, NV30, "NVidia GeForce FX 5800"}, \ + {0x10DE, 0x0308, NV30, "NVidia Quadro FX 2000"}, \ + {0x10DE, 0x0309, NV30, "NVidia Quadro FX 1000"}, \ + {0x10DE, 0x0311, NV30, "NVidia GeForce FX 5600 Ultra"}, \ + {0x10DE, 0x0312, NV30, "NVidia GeForce FX 5600"}, \ + {0x10DE, 0x0313, NV30, "NVidia 0x0313"}, \ + {0x10DE, 0x0314, NV30, "NVidia GeForce FX 5600SE"}, \ + {0x10DE, 0x0316, NV30, "NVidia 0x0316"}, \ + {0x10DE, 0x0317, NV30, "NVidia 0x0317"}, \ + {0x10DE, 0x031A, NV30, "NVidia GeForce FX Go5600"}, \ + {0x10DE, 0x031B, NV30, "NVidia GeForce FX Go5650"}, \ + {0x10DE, 0x031C, NV30, "NVidia Quadro FX Go700"}, \ + {0x10DE, 0x031D, NV30, "NVidia 0x031D"}, \ + {0x10DE, 0x031E, NV30, "NVidia 0x031E"}, \ + {0x10DE, 0x031F, NV30, "NVidia 0x031F"}, \ + {0x10DE, 0x0320, NV30, "NVidia GeForce FX 5200"}, \ + {0x10DE, 0x0321, NV30, "NVidia GeForce FX 5200 Ultra"}, \ + {0x10DE, 0x0322, NV30, "NVidia GeForce FX 5200"}, \ + {0x10DE, 0x0323, NV30, "NVidia GeForce FX 5200SE"}, \ + {0x10DE, 0x0324, NV30, "NVidia GeForce FX Go5200"}, \ + {0x10DE, 0x0325, NV30, "NVidia GeForce FX Go5250"}, \ + {0x10DE, 0x0326, NV30, "NVidia GeForce FX 5500"}, \ + {0x10DE, 0x0327, NV30, "NVidia GeForce FX 5100"}, \ + {0x10DE, 0x0328, NV30, "NVidia GeForce FX Go5200 32M/64M"}, \ + {0x10DE, 0x0329, NV30, "NVidia GeForce FX 5200 (Mac)"}, \ + {0x10DE, 0x032A, NV30, "NVidia Quadro NVS 280 PCI"}, \ + {0x10DE, 0x032B, NV30, "NVidia Quadro FX 500/600 PCI"}, \ + {0x10DE, 0x032C, NV30, "NVidia GeForce FX Go53xx Series"}, \ + {0x10DE, 0x032D, NV30, "NVidia GeForce FX Go5100"}, \ + {0x10DE, 0x032F, NV30, "NVidia 0x032F"}, \ + {0x10DE, 0x0330, NV30, "NVidia GeForce FX 5900 Ultra"}, \ + {0x10DE, 0x0331, NV30, "NVidia GeForce FX 5900"}, \ + {0x10DE, 0x0332, NV30, "NVidia GeForce FX 5900XT"}, \ + {0x10DE, 0x0333, NV30, "NVidia GeForce FX 5950 Ultra"}, \ + {0x10DE, 0x0334, NV30, "NVidia GeForce FX 5900ZT"}, \ + {0x10DE, 0x0338, NV30, "NVidia Quadro FX 3000"}, \ + {0x10DE, 0x033F, NV30, "NVidia Quadro FX 700"}, \ + {0x10DE, 0x0341, NV30, "NVidia GeForce FX 5700 Ultra"}, \ + {0x10DE, 0x0342, NV30, "NVidia GeForce FX 5700"}, \ + {0x10DE, 0x0343, NV30, "NVidia GeForce FX 5700LE"}, \ + {0x10DE, 0x0344, NV30, "NVidia GeForce FX 5700VE"}, \ + {0x10DE, 0x0345, NV30, "NVidia 0x0345"}, \ + {0x10DE, 0x0347, NV30, "NVidia GeForce FX Go5700"}, \ + {0x10DE, 0x0348, NV30, "NVidia GeForce FX Go5700"}, \ + {0x10DE, 0x0349, NV30, "NVidia 0x0349"}, \ + {0x10DE, 0x034B, NV30, "NVidia 0x034B"}, \ + {0x10DE, 0x034C, NV30, "NVidia Quadro FX Go1000"}, \ + {0x10DE, 0x034E, NV30, "NVidia Quadro FX 1100"}, \ + {0x10DE, 0x034F, NV30, "NVidia 0x034F"}, \ + {0, 0, 0, NULL} + +#define r128_PCI_IDS \ + {0x1002, 0x4C45, 0, "ATI Rage 128 Mobility LE (PCI)"}, \ + {0x1002, 0x4C46, 0, "ATI Rage 128 Mobility LF (AGP)"}, \ + {0x1002, 0x4D46, 0, "ATI Rage 128 Mobility MF (AGP)"}, \ + {0x1002, 0x4D4C, 0, "ATI Rage 128 Mobility ML (AGP)"}, \ + {0x1002, 0x5041, 0, "ATI Rage 128 Pro PA (PCI)"}, \ + {0x1002, 0x5042, 0, "ATI Rage 128 Pro PB (AGP)"}, \ + {0x1002, 0x5043, 0, "ATI Rage 128 Pro PC (AGP)"}, \ + {0x1002, 0x5044, 0, "ATI Rage 128 Pro PD (PCI)"}, \ + {0x1002, 0x5045, 0, "ATI Rage 128 Pro PE (AGP)"}, \ + {0x1002, 0x5046, 0, "ATI Rage 128 Pro PF (AGP)"}, \ + {0x1002, 0x5047, 0, "ATI Rage 128 Pro PG (PCI)"}, \ + {0x1002, 0x5048, 0, "ATI Rage 128 Pro PH (AGP)"}, \ + {0x1002, 0x5049, 0, "ATI Rage 128 Pro PI (AGP)"}, \ + {0x1002, 0x504A, 0, "ATI Rage 128 Pro PJ (PCI)"}, \ + {0x1002, 0x504B, 0, "ATI Rage 128 Pro PK (AGP)"}, \ + {0x1002, 0x504C, 0, "ATI Rage 128 Pro PL (AGP)"}, \ + {0x1002, 0x504D, 0, "ATI Rage 128 Pro PM (PCI)"}, \ + {0x1002, 0x504E, 0, "ATI Rage 128 Pro PN (AGP)"}, \ + {0x1002, 0x504F, 0, "ATI Rage 128 Pro PO (AGP)"}, \ + {0x1002, 0x5050, 0, "ATI Rage 128 Pro PP (PCI)"}, \ + {0x1002, 0x5051, 0, "ATI Rage 128 Pro PQ (AGP)"}, \ + {0x1002, 0x5052, 0, "ATI Rage 128 Pro PR (PCI)"}, \ + {0x1002, 0x5053, 0, "ATI Rage 128 Pro PS (PCI)"}, \ + {0x1002, 0x5054, 0, "ATI Rage 128 Pro PT (AGP)"}, \ + {0x1002, 0x5055, 0, "ATI Rage 128 Pro PU (AGP)"}, \ + {0x1002, 0x5056, 0, "ATI Rage 128 Pro PV (PCI)"}, \ + {0x1002, 0x5057, 0, "ATI Rage 128 Pro PW (AGP)"}, \ + {0x1002, 0x5058, 0, "ATI Rage 128 Pro PX (AGP)"}, \ + {0x1002, 0x5245, 0, "ATI Rage 128 RE (PCI)"}, \ + {0x1002, 0x5246, 0, "ATI Rage 128 RF (AGP)"}, \ + {0x1002, 0x5247, 0, "ATI Rage 128 RG (AGP)"}, \ + {0x1002, 0x524B, 0, "ATI Rage 128 RK (PCI)"}, \ + {0x1002, 0x524C, 0, "ATI Rage 128 RL (AGP)"}, \ + {0x1002, 0x534D, 0, "ATI Rage 128 SM (AGP)"}, \ + {0x1002, 0x5446, 0, "ATI Rage 128 Pro Ultra TF (AGP)"}, \ + {0x1002, 0x544C, 0, "ATI Rage 128 Pro Ultra TL (AGP)"}, \ + {0x1002, 0x5452, 0, "ATI Rage 128 Pro Ultra TR (AGP)"}, \ + {0, 0, 0, NULL} + #define radeon_PCI_IDS \ {0x1002, 0x3150, CHIP_RV380|RADEON_IS_MOBILITY, "ATI Radeon Mobility X600 M24"}, \ + {0x1002, 0x3151, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "M24 [FireMV 2400]"}, \ {0x1002, 0x3152, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Radeon Mobility X300 M24"}, \ {0x1002, 0x3154, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FireGL M24 GL"}, \ + {0x1002, 0x3155, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "RV380 [FireMV 2400]"}, \ {0x1002, 0x3E50, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI Radeon RV380 X600"}, \ {0x1002, 0x3E54, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI FireGL V3200 RV380"}, \ {0x1002, 0x4136, CHIP_RS100|RADEON_IS_IGP, "ATI Radeon RS100 IGP 320"}, \ @@ -46,6 +380,7 @@ {0x1002, 0x4A4F, CHIP_R420|RADEON_NEW_MEMMAP, "ATI Radeon JO R420 X800 SE"}, \ {0x1002, 0x4A50, CHIP_R420|RADEON_NEW_MEMMAP, "ATI Radeon JP R420 X800 XT PE"}, \ {0x1002, 0x4A54, CHIP_R420|RADEON_NEW_MEMMAP, "ATI Radeon JT R420 AIW X800 VE"}, \ + {0x1002, 0x4B48, CHIP_R420|RADEON_NEW_MEMMAP, "R481 [Radeon X850 PCIe]"}, \ {0x1002, 0x4B49, CHIP_R420|RADEON_NEW_MEMMAP, "ATI Radeon R481 X850 XT"}, \ {0x1002, 0x4B4A, CHIP_R420|RADEON_NEW_MEMMAP, "ATI Radeon R481 X850 SE"}, \ {0x1002, 0x4B4B, CHIP_R420|RADEON_NEW_MEMMAP, "ATI Radeon R481 X850 Pro"}, \ @@ -57,6 +392,7 @@ {0x1002, 0x4C64, CHIP_RV250|RADEON_IS_MOBILITY, "ATI Radeon Ld RV250 Mobility 9000 M9"}, \ {0x1002, 0x4C66, CHIP_RV250, "ATI Radeon Lf RV250 Mobility 9000 M9 / FireMV 2400 PCI"}, \ {0x1002, 0x4C67, CHIP_RV250|RADEON_IS_MOBILITY, "ATI Radeon Lg RV250 Mobility 9000 M9"}, \ + {0x1002, 0x4C6E, CHIP_RV280|RADEON_IS_MOBILITY, "Radeon RV250 Ln [Radeon Mobility 9000 M9] (Secondary)"}, \ {0x1002, 0x4E44, CHIP_R300, "ATI Radeon ND R300 9700 Pro"}, \ {0x1002, 0x4E45, CHIP_R300, "ATI Radeon NE R300 9500 Pro / 9700"}, \ {0x1002, 0x4E46, CHIP_R300, "ATI Radeon NF R300 9600TX"}, \ @@ -108,41 +444,199 @@ {0x1002, 0x5835, CHIP_RS300|RADEON_IS_IGP|RADEON_IS_MOBILITY, "ATI Radeon RS300 Mobility IGP"}, \ {0x1002, 0x5954, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_IGPGART, "ATI RS480 XPRESS 200G"}, \ {0x1002, 0x5955, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART, "ATI Radeon XPRESS 200M 5955"}, \ - {0x1002, 0x5974, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART, "ATI Radeon RS482 XPRESS 200"}, \ - {0x1002, 0x5975, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART, "ATI Radeon RS485 XPRESS 1100 IGP"}, \ {0x1002, 0x5960, CHIP_RV280, "ATI Radeon RV280 9250"}, \ {0x1002, 0x5961, CHIP_RV280, "ATI Radeon RV280 9200"}, \ {0x1002, 0x5962, CHIP_RV280, "ATI Radeon RV280 9200"}, \ {0x1002, 0x5964, CHIP_RV280, "ATI Radeon RV280 9200 SE"}, \ {0x1002, 0x5965, CHIP_RV280, "ATI FireMV 2200 PCI"}, \ {0x1002, 0x5969, CHIP_RV100, "ATI ES1000 RN50"}, \ - {0x1002, 0x5a41, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_IGPGART, "ATI Radeon XPRESS 200 5A41 (PCIE)"}, \ - {0x1002, 0x5a42, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART, "ATI Radeon XPRESS 200M 5A42 (PCIE)"}, \ - {0x1002, 0x5a61, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_IGPGART, "ATI Radeon RC410 XPRESS 200"}, \ - {0x1002, 0x5a62, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART, "ATI Radeon RC410 XPRESS 200M"}, \ - {0x1002, 0x5b60, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI Radeon RV370 X300 SE"}, \ - {0x1002, 0x5b62, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI Radeon RV370 X600 Pro"}, \ - {0x1002, 0x5b63, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI Radeon RV370 X550"}, \ - {0x1002, 0x5b64, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI FireGL V3100 (RV370) 5B64"}, \ - {0x1002, 0x5b65, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI FireMV 2200 PCIE (RV370) 5B65"}, \ - {0x1002, 0x5c61, CHIP_RV280|RADEON_IS_MOBILITY, "ATI Radeon RV280 Mobility"}, \ - {0x1002, 0x5c63, CHIP_RV280|RADEON_IS_MOBILITY, "ATI Radeon RV280 Mobility"}, \ - {0x1002, 0x5d48, CHIP_R423|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon X800 XT M28"}, \ - {0x1002, 0x5d49, CHIP_R423|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility FireGL V5100 M28"}, \ - {0x1002, 0x5d4a, CHIP_R423|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon X800 M28"}, \ - {0x1002, 0x5d4c, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850"}, \ - {0x1002, 0x5d4d, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850 XT PE"}, \ - {0x1002, 0x5d4e, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850 SE"}, \ - {0x1002, 0x5d4f, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850 Pro"}, \ - {0x1002, 0x5d50, CHIP_R423|RADEON_NEW_MEMMAP, "ATI unknown Radeon / FireGL R480"}, \ - {0x1002, 0x5d52, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850 XT"}, \ - {0x1002, 0x5d57, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R423 X800 XT"}, \ - {0x1002, 0x5e48, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI FireGL V5000 RV410"}, \ - {0x1002, 0x5e4a, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700 XT"}, \ - {0x1002, 0x5e4b, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700 Pro"}, \ - {0x1002, 0x5e4c, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700 SE"}, \ - {0x1002, 0x5e4d, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700"}, \ - {0x1002, 0x5e4f, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700 SE"}, \ + {0x1002, 0x5974, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART, "ATI Radeon RS482 XPRESS 200"}, \ + {0x1002, 0x5975, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART, "ATI Radeon RS485 XPRESS 1100 IGP"}, \ + {0x1002, 0x5A41, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_IGPGART, "ATI Radeon XPRESS 200 5A41 (PCIE)"}, \ + {0x1002, 0x5A42, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART, "ATI Radeon XPRESS 200M 5A42 (PCIE)"}, \ + {0x1002, 0x5A61, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_IGPGART, "ATI Radeon RC410 XPRESS 200"}, \ + {0x1002, 0x5A62, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART, "ATI Radeon RC410 XPRESS 200M"}, \ + {0x1002, 0x5B60, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI Radeon RV370 X300 SE"}, \ + {0x1002, 0x5B62, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI Radeon RV370 X600 Pro"}, \ + {0x1002, 0x5B63, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI Radeon RV370 X550"}, \ + {0x1002, 0x5B64, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI FireGL V3100 (RV370) 5B64"}, \ + {0x1002, 0x5B65, CHIP_RV380|RADEON_NEW_MEMMAP, "ATI FireMV 2200 PCIE (RV370) 5B65"}, \ + {0x1002, 0x5C61, CHIP_RV280|RADEON_IS_MOBILITY, "ATI Radeon RV280 Mobility"}, \ + {0x1002, 0x5C63, CHIP_RV280|RADEON_IS_MOBILITY, "ATI Radeon RV280 Mobility"}, \ + {0x1002, 0x5D48, CHIP_R423|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon X800 XT M28"}, \ + {0x1002, 0x5D49, CHIP_R423|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility FireGL V5100 M28"}, \ + {0x1002, 0x5D4A, CHIP_R423|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon X800 M28"}, \ + {0x1002, 0x5D4C, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850"}, \ + {0x1002, 0x5D4D, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850 XT PE"}, \ + {0x1002, 0x5D4E, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850 SE"}, \ + {0x1002, 0x5D4F, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850 Pro"}, \ + {0x1002, 0x5D50, CHIP_R423|RADEON_NEW_MEMMAP, "ATI unknown Radeon / FireGL R480"}, \ + {0x1002, 0x5D52, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R480 X850 XT"}, \ + {0x1002, 0x5D57, CHIP_R423|RADEON_NEW_MEMMAP, "ATI Radeon R423 X800 XT"}, \ + {0x1002, 0x5E48, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI FireGL V5000 RV410"}, \ + {0x1002, 0x5E4A, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700 XT"}, \ + {0x1002, 0x5E4B, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700 Pro"}, \ + {0x1002, 0x5E4C, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700 SE"}, \ + {0x1002, 0x5E4D, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700"}, \ + {0x1002, 0x5E4F, CHIP_RV410|RADEON_NEW_MEMMAP, "ATI Radeon RV410 X700 SE"}, \ + {0x1002, 0x6700, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman GL XT [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6701, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman GL XT [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6702, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman GL XT [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6703, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman GL XT [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6704, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman PRO GL [FirePro V7900]"}, \ + {0x1002, 0x6705, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman GL PRO [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6706, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6707, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman LE GL [FirePro V5900]"}, \ + {0x1002, 0x6708, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6709, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6718, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman XT [Radeon HD 6970]"}, \ + {0x1002, 0x6719, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman PRO [Radeon HD 6950]"}, \ + {0x1002, 0x671C, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Antilles [Radeon HD 6990]"}, \ + {0x1002, 0x671D, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Antilles [AMD Radeon HD 6990]"}, \ + {0x1002, 0x671F, CHIP_CAYMAN|RADEON_NEW_MEMMAP, "Cayman [Radeon HD 6900 Series]"}, \ + {0x1002, 0x6720, CHIP_BARTS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Blackcomb [Radeon HD 6900M series]"}, \ + {0x1002, 0x6721, CHIP_BARTS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Blackcomb [Mobility Radeon HD 6000 series]"}, \ + {0x1002, 0x6722, CHIP_BARTS|RADEON_NEW_MEMMAP, "Barts GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6723, CHIP_BARTS|RADEON_NEW_MEMMAP, "Barts GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6724, CHIP_BARTS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Blackcomb [Mobility Radeon HD 6000 series]"}, \ + {0x1002, 0x6725, CHIP_BARTS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Blackcomb [Mobility Radeon HD 6000 series]"}, \ + {0x1002, 0x6726, CHIP_BARTS|RADEON_NEW_MEMMAP, "Barts GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6727, CHIP_BARTS|RADEON_NEW_MEMMAP, "Barts GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6728, CHIP_BARTS|RADEON_NEW_MEMMAP, "Barts GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6729, CHIP_BARTS|RADEON_NEW_MEMMAP, "Barts GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6738, CHIP_BARTS|RADEON_NEW_MEMMAP, "Barts XT [Radeon HD 6800 Series]"}, \ + {0x1002, 0x6739, CHIP_BARTS|RADEON_NEW_MEMMAP, "Barts PRO [Radeon HD 6800 Series]"}, \ + {0x1002, 0x673E, CHIP_BARTS|RADEON_NEW_MEMMAP, "Barts LE [AMD Radeon HD 6700 Series]"}, \ + {0x1002, 0x6740, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Whistler XT [AMD Radeon HD 6700M Series]"}, \ + {0x1002, 0x6741, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Whistler [AMD Radeon HD 6600M Series]"}, \ + {0x1002, 0x6742, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Whistler LE [AMD Radeon HD 6625M Graphics]"}, \ + {0x1002, 0x6743, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Whistler [Radeon E6760]"}, \ + {0x1002, 0x6744, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Whistler [ATI Mobility Radeon HD 6000 series]"}, \ + {0x1002, 0x6745, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Whistler"}, \ + {0x1002, 0x6746, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6747, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6748, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6749, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks [FirePro V4900]"}, \ + {0x1002, 0x674A, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks [AMD FirePro V3900]"}, \ + {0x1002, 0x6750, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks [AMD Radeon HD 6570]"}, \ + {0x1002, 0x6751, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks [Radeon HD 7600A Series]"}, \ + {0x1002, 0x6758, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks [Radeon HD 6670]"}, \ + {0x1002, 0x6759, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks [Radeon HD 6570]"}, \ + {0x1002, 0x675B, CHIP_TURKS|RADEON_NEW_MEMMAP, "Unknown device name"}, \ + {0x1002, 0x675D, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks [Radeon HD 7500 Series]"}, \ + {0x1002, 0x675F, CHIP_TURKS|RADEON_NEW_MEMMAP, "Turks LE [Radeon HD 5500/7510 Series]"}, \ + {0x1002, 0x6760, CHIP_CAICOS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Caicos [Radeon HD 6400M/7400M Series]"}, \ + {0x1002, 0x6761, CHIP_CAICOS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Seymour LP [Radeon HD 6430M]"}, \ + {0x1002, 0x6762, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos GL [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6763, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Seymour [Radeon E6460]"}, \ + {0x1002, 0x6764, CHIP_CAICOS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Seymour [Mobility Radeon HD 6000 series]"}, \ + {0x1002, 0x6765, CHIP_CAICOS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Seymour [Mobility Radeon HD 6000 series]"}, \ + {0x1002, 0x6766, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos"}, \ + {0x1002, 0x6767, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos"}, \ + {0x1002, 0x6768, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos"}, \ + {0x1002, 0x6770, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos [Radeon HD 6400 Series]"}, \ + {0x1002, 0x6771, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos"}, \ + {0x1002, 0x6772, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos [Radeon HD 7400A Series]"}, \ + {0x1002, 0x6778, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos [Radeon HD 7000 Series]"}, \ + {0x1002, 0x6779, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos [Radeon HD 6450]"}, \ + {0x1002, 0x677B, CHIP_CAICOS|RADEON_NEW_MEMMAP, "Caicos [Radeon HD 7400 Series]"}, \ + {0x1002, 0x6780, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6784, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6788, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x678A, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti [ATI FirePro V (FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6790, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti"}, \ + {0x1002, 0x6791, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti"}, \ + {0x1002, 0x6792, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti"}, \ + {0x1002, 0x6798, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti XT [Radeon HD 7970]"}, \ + {0x1002, 0x6799, CHIP_TAHITI|RADEON_NEW_MEMMAP, "New Zealand [Radeon HD 7990]"}, \ + {0x1002, 0x679A, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti PRO [Radeon HD 7950]"}, \ + {0x1002, 0x679B, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti [Radeon HD 7900 Series]"}, \ + {0x1002, 0x679E, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti LE [Radeon HD 7800 Series]"}, \ + {0x1002, 0x679F, CHIP_TAHITI|RADEON_NEW_MEMMAP, "Tahiti"}, \ + {0x1002, 0x6800, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Wimbledon XT [Radeon HD 7970M]"}, \ + {0x1002, 0x6801, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Wimbledon"}, \ + {0x1002, 0x6802, CHIP_PITCAIRN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Wimbledon"}, \ + {0x1002, 0x6806, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn"}, \ + {0x1002, 0x6808, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn [ATI FirePro V(FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6809, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn [ATI FirePro V(FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6810, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn"}, \ + {0x1002, 0x6811, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn"}, \ + {0x1002, 0x6816, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn"}, \ + {0x1002, 0x6817, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn"}, \ + {0x1002, 0x6818, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn [Radeon HD 7800]"}, \ + {0x1002, 0x6819, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn PRO [Radeon HD 7800]"}, \ + {0x1002, 0x6820, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Radeon HD 8800M Series"}, \ + {0x1002, 0x6821, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Radeon HD 8800M Series"}, \ + {0x1002, 0x6823, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Radeon HD 8800M Series"}, \ + {0x1002, 0x6824, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Chelsea [Radeon HD 7700M Series]"}, \ + {0x1002, 0x6825, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Cape Verde [Radeon HD 7800M Series]"}, \ + {0x1002, 0x6826, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Chelsea [Radeon HD 7700M Series]"}, \ + {0x1002, 0x6827, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Cape Verde [Radeon HD 7800M Series]"}, \ + {0x1002, 0x6828, CHIP_VERDE|RADEON_NEW_MEMMAP, "Cape Verde"}, \ + {0x1002, 0x6829, CHIP_VERDE|RADEON_NEW_MEMMAP, "Cape Verde"}, \ + {0x1002, 0x682B, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Radeon HD 8800M Series"}, \ + {0x1002, 0x682D, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Unknown device name"}, \ + {0x1002, 0x682F, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Cape Verde [Radeon HD 7700M Series]"}, \ + {0x1002, 0x6830, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Cape Verde [Radeon HD 7800M Series]"}, \ + {0x1002, 0x6831, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Cape Verde [AMD Radeon HD 7700M Series]"}, \ + {0x1002, 0x6837, CHIP_VERDE|RADEON_NEW_MEMMAP, "Cape Verde LE [Radeon HD 7700 Series]"}, \ + {0x1002, 0x6838, CHIP_VERDE|RADEON_NEW_MEMMAP, "Cape Verde"}, \ + {0x1002, 0x6839, CHIP_VERDE|RADEON_NEW_MEMMAP, "Cape Verde"}, \ + {0x1002, 0x683B, CHIP_VERDE|RADEON_NEW_MEMMAP, "Cape Verde [Radeon HD 7700 Series]"}, \ + {0x1002, 0x683D, CHIP_VERDE|RADEON_NEW_MEMMAP, "Cape Verde [Radeon HD 7700 Series]"}, \ + {0x1002, 0x683F, CHIP_VERDE|RADEON_NEW_MEMMAP, "Cape Verde PRO [Radeon HD 7700 Series]"}, \ + {0x1002, 0x6840, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Thames XT/GL [Radeon HD 7600M Series]"}, \ + {0x1002, 0x6841, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Thames [Radeon 7500M/7600M Series]"}, \ + {0x1002, 0x6842, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Thames LE [Radeon HD 7000M Series]"}, \ + {0x1002, 0x6843, CHIP_TURKS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Thames [Radeon HD 7670M]"}, \ + {0x1002, 0x6849, CHIP_TURKS|RADEON_NEW_MEMMAP, "Lombok [AMD Radeon HD 7400 Series]"}, \ + {0x1002, 0x684C, CHIP_PITCAIRN|RADEON_NEW_MEMMAP, "Pitcairn [ATI FirePro V(FireGL V) Graphics Adapter]"}, \ + {0x1002, 0x6850, CHIP_TURKS|RADEON_NEW_MEMMAP, "Lombok GL AIO [Radeon HD 7570]"}, \ + {0x1002, 0x6858, CHIP_TURKS|RADEON_NEW_MEMMAP, "Lombok [Radeon HD 7400 series]"}, \ + {0x1002, 0x6859, CHIP_TURKS|RADEON_NEW_MEMMAP, "Unknown device name"}, \ + {0x1002, 0x6880, CHIP_CYPRESS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Cypress"}, \ + {0x1002, 0x6888, CHIP_CYPRESS|RADEON_NEW_MEMMAP, "Cypress [FirePro 3D V8800]"}, \ + {0x1002, 0x6889, CHIP_CYPRESS|RADEON_NEW_MEMMAP, "Cypress [FirePro V7800]"}, \ + {0x1002, 0x688A, CHIP_CYPRESS|RADEON_NEW_MEMMAP, "Cypress XT [FirePro 3D V9800]"}, \ + {0x1002, 0x688C, CHIP_CYPRESS|RADEON_NEW_MEMMAP, "Cypress [AMD FireStream 9370]"}, \ + {0x1002, 0x688D, CHIP_CYPRESS|RADEON_NEW_MEMMAP, "Cypress [AMD FireStream 9350]"}, \ + {0x1002, 0x6898, CHIP_CYPRESS|RADEON_NEW_MEMMAP, "Cypress XT [Radeon HD 5870]"}, \ + {0x1002, 0x6899, CHIP_CYPRESS|RADEON_NEW_MEMMAP, "Cypress PRO [Radeon HD 5800 Series]"}, \ + {0x1002, 0x689B, CHIP_CYPRESS|RADEON_NEW_MEMMAP, "Cypress [Radeon HD 6800 Series]"}, \ + {0x1002, 0x689C, CHIP_HEMLOCK|RADEON_NEW_MEMMAP, "Hemlock [Radeon HD 5900 Series]"}, \ + {0x1002, 0x689D, CHIP_HEMLOCK|RADEON_NEW_MEMMAP, "Hemlock [ATI Radeon HD 5900 Series]"}, \ + {0x1002, 0x689E, CHIP_CYPRESS|RADEON_NEW_MEMMAP, "Cypress LE [Radeon HD 5800 Series]"}, \ + {0x1002, 0x68A0, CHIP_JUNIPER|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 5870"}, \ + {0x1002, 0x68A1, CHIP_JUNIPER|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Broadway PRO [Mobility Radeon HD 5800 Series]"}, \ + {0x1002, 0x68A8, CHIP_JUNIPER|RADEON_NEW_MEMMAP, "Broadway [ATI Mobility Radeon HD 6800 Series]"}, \ + {0x1002, 0x68A9, CHIP_JUNIPER|RADEON_NEW_MEMMAP, "Juniper XT [FirePro 3D V5800]"}, \ + {0x1002, 0x68B0, CHIP_JUNIPER|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Unknown device name"}, \ + {0x1002, 0x68B8, CHIP_JUNIPER|RADEON_NEW_MEMMAP, "Juniper [Radeon HD 5700 Series]"}, \ + {0x1002, 0x68B9, CHIP_JUNIPER|RADEON_NEW_MEMMAP, "Juniper [Radeon HD 5600/5700]"}, \ + {0x1002, 0x68BA, CHIP_JUNIPER|RADEON_NEW_MEMMAP, "Juniper XT [AMD Radeon HD 6000 Series]"}, \ + {0x1002, 0x68BE, CHIP_JUNIPER|RADEON_NEW_MEMMAP, "Juniper [Radeon HD 5700 Series]"}, \ + {0x1002, 0x68BF, CHIP_JUNIPER|RADEON_NEW_MEMMAP, "Juniper LE [Radeon HD 6700 Series]"}, \ + {0x1002, 0x68C0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Madison [Mobility Radeon HD 5000 Series]"}, \ + {0x1002, 0x68C1, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Madison [Radeon HD 5000M Series]"}, \ + {0x1002, 0x68C7, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Pinewood [Radeon HD 5570]"}, \ + {0x1002, 0x68C8, CHIP_REDWOOD|RADEON_NEW_MEMMAP, "FirePro V4800"}, \ + {0x1002, 0x68C9, CHIP_REDWOOD|RADEON_NEW_MEMMAP, "Redwood [FirePro 3800 (FireGL)]"}, \ + {0x1002, 0x68D8, CHIP_REDWOOD|RADEON_NEW_MEMMAP, "Redwood [Radeon HD 5670]"}, \ + {0x1002, 0x68D9, CHIP_REDWOOD|RADEON_NEW_MEMMAP, "Redwood PRO [Radeon HD 5500 Series]"}, \ + {0x1002, 0x68DA, CHIP_REDWOOD|RADEON_NEW_MEMMAP, "Redwood PRO [Radeon HD 5500 Series]"}, \ + {0x1002, 0x68DE, CHIP_REDWOOD|RADEON_NEW_MEMMAP, "Redwood"}, \ + {0x1002, 0x68E0, CHIP_CEDAR|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Manhattan [Mobility Radeon HD 5400 Series]"}, \ + {0x1002, 0x68E1, CHIP_CEDAR|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Manhattan [Mobility Radeon HD 5430 Series]"}, \ + {0x1002, 0x68E4, CHIP_CEDAR|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Robson CE [AMD Radeon HD 6300 Series]"}, \ + {0x1002, 0x68E5, CHIP_CEDAR|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "Robson LE [AMD Radeon HD 6300M Series]"}, \ + {0x1002, 0x68E8, CHIP_CEDAR|RADEON_NEW_MEMMAP, "Cedar"}, \ + {0x1002, 0x68E9, CHIP_CEDAR|RADEON_NEW_MEMMAP, "Cedar [ATI FirePro (FireGL) Graphics Adapter]"}, \ + {0x1002, 0x68F1, CHIP_CEDAR|RADEON_NEW_MEMMAP, "Cedar [FirePro 2460]"}, \ + {0x1002, 0x68F2, CHIP_CEDAR|RADEON_NEW_MEMMAP, "Cedar [FirePro 2270]"}, \ + {0x1002, 0x68F8, CHIP_CEDAR|RADEON_NEW_MEMMAP, "Cedar [Radeon HD 7300 Series]"}, \ + {0x1002, 0x68F9, CHIP_CEDAR|RADEON_NEW_MEMMAP, "Cedar PRO [Radeon HD 5450/6350]"}, \ + {0x1002, 0x68FA, CHIP_CEDAR|RADEON_NEW_MEMMAP, "EG Cedar [Radeon HD 7300 Series]"}, \ + {0x1002, 0x68FE, CHIP_CEDAR|RADEON_NEW_MEMMAP, "Cedar LE"}, \ {0x1002, 0x7100, CHIP_R520|RADEON_NEW_MEMMAP, "ATI Radeon X1800"}, \ {0x1002, 0x7101, CHIP_R520|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon X1800 XT"}, \ {0x1002, 0x7102, CHIP_R520|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon X1800"}, \ @@ -240,15 +734,15 @@ {0x1002, 0x7297, CHIP_RV560|RADEON_NEW_MEMMAP, "ATI RV560"}, \ {0x1002, 0x7834, CHIP_RS300|RADEON_IS_IGP|RADEON_NEW_MEMMAP, "ATI Radeon RS350 9000/9100 IGP"}, \ {0x1002, 0x7835, CHIP_RS300|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Radeon RS350 Mobility IGP"}, \ - {0x1002, 0x793f, CHIP_RS600|RADEON_IS_IGP|RADEON_NEW_MEMMAP, "ATI Radeon X1200"}, \ + {0x1002, 0x791E, CHIP_RS690|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS690 X1250 IGP"}, \ + {0x1002, 0x791F, CHIP_RS690|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS690 X1270 IGP"}, \ + {0x1002, 0x793F, CHIP_RS600|RADEON_IS_IGP|RADEON_NEW_MEMMAP, "ATI Radeon X1200"}, \ {0x1002, 0x7941, CHIP_RS600|RADEON_IS_IGP|RADEON_NEW_MEMMAP, "ATI Radeon X1200"}, \ {0x1002, 0x7942, CHIP_RS600|RADEON_IS_IGP|RADEON_NEW_MEMMAP, "ATI Radeon X1200"}, \ - {0x1002, 0x791e, CHIP_RS690|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS690 X1250 IGP"}, \ - {0x1002, 0x791f, CHIP_RS690|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS690 X1270 IGP"}, \ - {0x1002, 0x796c, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS740 HD2100 IGP"}, \ - {0x1002, 0x796d, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS740 HD2100 IGP"}, \ - {0x1002, 0x796e, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS740 HD2100 IGP"}, \ - {0x1002, 0x796f, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS740 HD2100 IGP"}, \ + {0x1002, 0x796C, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS740 HD2100 IGP"}, \ + {0x1002, 0x796D, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS740 HD2100 IGP"}, \ + {0x1002, 0x796E, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS740 HD2100 IGP"}, \ + {0x1002, 0x796F, CHIP_RS740|RADEON_IS_IGP|RADEON_NEW_MEMMAP|RADEON_IS_IGPGART, "ATI Radeon RS740 HD2100 IGP"}, \ {0x1002, 0x9400, CHIP_R600|RADEON_NEW_MEMMAP, "ATI Radeon HD 2900 XT"}, \ {0x1002, 0x9401, CHIP_R600|RADEON_NEW_MEMMAP, "ATI Radeon HD 2900 XT"}, \ {0x1002, 0x9402, CHIP_R600|RADEON_NEW_MEMMAP, "ATI Radeon HD 2900 XT"}, \ @@ -257,6 +751,41 @@ {0x1002, 0x940A, CHIP_R600|RADEON_NEW_MEMMAP, "ATI FireGL V8650"}, \ {0x1002, 0x940B, CHIP_R600|RADEON_NEW_MEMMAP, "ATI FireGL V8600"}, \ {0x1002, 0x940F, CHIP_R600|RADEON_NEW_MEMMAP, "ATI FireGL V7600"}, \ + {0x1002, 0x9440, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ + {0x1002, 0x9441, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4870 X2"}, \ + {0x1002, 0x9442, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ + {0x1002, 0x9443, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4850 X2"}, \ + {0x1002, 0x9444, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI FirePro V8750 (FireGL)"}, \ + {0x1002, 0x9446, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI FirePro V7760 (FireGL)"}, \ + {0x1002, 0x944A, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4850"}, \ + {0x1002, 0x944B, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4850 X2"}, \ + {0x1002, 0x944C, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ + {0x1002, 0x944E, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI FirePro RV770"}, \ + {0x1002, 0x9450, CHIP_RV770|RADEON_NEW_MEMMAP, "AMD FireStream 9270"}, \ + {0x1002, 0x9452, CHIP_RV770|RADEON_NEW_MEMMAP, "AMD FireStream 9250"}, \ + {0x1002, 0x9456, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI FirePro V8700 (FireGL)"}, \ + {0x1002, 0x945A, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4870"}, \ + {0x1002, 0x945B, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon M98"}, \ + {0x1002, 0x945E, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "RV770"}, \ + {0x1002, 0x9460, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ + {0x1002, 0x9462, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ + {0x1002, 0x946A, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M7750"}, \ + {0x1002, 0x946B, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI M98"}, \ + {0x1002, 0x947A, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI M98"}, \ + {0x1002, 0x947B, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI M98"}, \ + {0x1002, 0x9480, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4650"}, \ + {0x1002, 0x9487, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ + {0x1002, 0x9488, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4670"}, \ + {0x1002, 0x9489, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M5750"}, \ + {0x1002, 0x948A, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "RV730"}, \ + {0x1002, 0x948F, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ + {0x1002, 0x9490, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4670"}, \ + {0x1002, 0x9491, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI RADEON E4600"}, \ + {0x1002, 0x9495, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4600 Series"}, \ + {0x1002, 0x9498, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4650"}, \ + {0x1002, 0x949C, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI FirePro V7750 (FireGL)"}, \ + {0x1002, 0x949E, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI FirePro V5700 (FireGL)"}, \ + {0x1002, 0x949F, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI FirePro V3750 (FireGL)"}, \ {0x1002, 0x94A0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4830"}, \ {0x1002, 0x94A1, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4850"}, \ {0x1002, 0x94A3, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M7740"}, \ @@ -290,6 +819,16 @@ {0x1002, 0x9515, CHIP_RV670|RADEON_NEW_MEMMAP, "ATI Radeon HD3850"}, \ {0x1002, 0x9517, CHIP_RV670|RADEON_NEW_MEMMAP, "ATI Radeon HD3690"}, \ {0x1002, 0x9519, CHIP_RV670|RADEON_NEW_MEMMAP, "AMD Firestream 9170"}, \ + {0x1002, 0x9540, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon HD 4550"}, \ + {0x1002, 0x9541, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon RV710"}, \ + {0x1002, 0x9542, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon RV710"}, \ + {0x1002, 0x954E, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon RV710"}, \ + {0x1002, 0x954F, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon HD 4350"}, \ + {0x1002, 0x9552, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4300 Series"}, \ + {0x1002, 0x9553, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ + {0x1002, 0x9555, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ + {0x1002, 0x9557, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro RG220"}, \ + {0x1002, 0x955F, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "RV710 [Mobility Radeon HD 4330]"}, \ {0x1002, 0x9580, CHIP_RV630|RADEON_NEW_MEMMAP, "ATI RV630"}, \ {0x1002, 0x9581, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 2600"}, \ {0x1002, 0x9583, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 2600 XT"}, \ @@ -303,468 +842,147 @@ {0x1002, 0x958D, CHIP_RV630|RADEON_NEW_MEMMAP, "ATI FireGL V3600"}, \ {0x1002, 0x958E, CHIP_RV630|RADEON_NEW_MEMMAP, "ATI Radeon HD 2600 LE"}, \ {0x1002, 0x958F, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility FireGL Graphics Processor"}, \ + {0x1002, 0x9590, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3600 Series"}, \ + {0x1002, 0x9591, CHIP_RV635|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 3650"}, \ + {0x1002, 0x9593, CHIP_RV635|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 3670"}, \ + {0x1002, 0x9595, CHIP_RV635|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility FireGL V5700"}, \ + {0x1002, 0x9596, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3650 AGP"}, \ + {0x1002, 0x9597, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3600 PRO"}, \ + {0x1002, 0x9598, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3600 XT"}, \ + {0x1002, 0x9599, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3600 PRO"}, \ + {0x1002, 0x959B, CHIP_RV635|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility FireGL V5725"}, \ {0x1002, 0x95C0, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI Radeon HD 3470"}, \ + {0x1002, 0x95C2, CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 3430"}, \ + {0x1002, 0x95C4, CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 3400 Series"}, \ {0x1002, 0x95C5, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI Radeon HD 3450"}, \ {0x1002, 0x95C6, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI Radeon HD 3450"}, \ {0x1002, 0x95C7, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI Radeon HD 3430"}, \ {0x1002, 0x95C9, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI Radeon HD 3450"}, \ - {0x1002, 0x95C2, CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 3430"}, \ - {0x1002, 0x95C4, CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 3400 Series"}, \ {0x1002, 0x95CC, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI FirePro V3700"}, \ {0x1002, 0x95CD, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI FireMV 2450"}, \ {0x1002, 0x95CE, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI FireMV 2260"}, \ - {0x1002, 0x95CF, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI FireMV 2260"}, \ - {0x1002, 0x9590, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3600 Series"}, \ - {0x1002, 0x9596, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3650 AGP"}, \ - {0x1002, 0x9597, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3600 PRO"}, \ - {0x1002, 0x9598, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3600 XT"}, \ - {0x1002, 0x9599, CHIP_RV635|RADEON_NEW_MEMMAP, "ATI ATI Radeon HD 3600 PRO"}, \ - {0x1002, 0x9591, CHIP_RV635|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 3650"}, \ - {0x1002, 0x9593, CHIP_RV635|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 3670"}, \ - {0x1002, 0x9595, CHIP_RV635|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility FireGL V5700"}, \ - {0x1002, 0x959B, CHIP_RV635|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility FireGL V5725"}, \ - {0x1002, 0x9610, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 3200 Graphics"}, \ - {0x1002, 0x9611, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3100 Graphics"}, \ - {0x1002, 0x9612, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 3200 Graphics"}, \ - {0x1002, 0x9613, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3100 Graphics"}, \ - {0x1002, 0x9614, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3300 Graphics"}, \ - {0x1002, 0x9615, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3200 Graphics"}, \ - {0x1002, 0x9616, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3000 Graphics"}, \ - {0x1002, 0x9710, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 4200"}, \ - {0x1002, 0x9711, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 4100"}, \ - {0x1002, 0x9712, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon HD 4200"}, \ - {0x1002, 0x9713, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon 4100"}, \ - {0x1002, 0x9714, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI RS880"}, \ - {0x1002, 0x9715, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 4250"}, \ - {0x1002, 0x9440, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ - {0x1002, 0x9441, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4870 X2"}, \ - {0x1002, 0x9442, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ - {0x1002, 0x9443, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4850 X2"}, \ - {0x1002, 0x944C, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ - {0x1002, 0x9450, CHIP_RV770|RADEON_NEW_MEMMAP, "AMD FireStream 9270"}, \ - {0x1002, 0x9452, CHIP_RV770|RADEON_NEW_MEMMAP, "AMD FireStream 9250"}, \ - {0x1002, 0x9444, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI FirePro V8750 (FireGL)"}, \ - {0x1002, 0x9446, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI FirePro V7760 (FireGL)"}, \ - {0x1002, 0x9456, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI FirePro V8700 (FireGL)"}, \ - {0x1002, 0x944E, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI FirePro RV770"}, \ - {0x1002, 0x944A, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4850"}, \ - {0x1002, 0x944B, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4850 X2"}, \ - {0x1002, 0x945A, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4870"}, \ - {0x1002, 0x945B, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon M98"}, \ - {0x1002, 0x9460, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ - {0x1002, 0x9462, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ - {0x1002, 0x946A, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M7750"}, \ - {0x1002, 0x946B, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI M98"}, \ - {0x1002, 0x947A, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI M98"}, \ - {0x1002, 0x947B, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI M98"}, \ - {0x1002, 0x9487, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ - {0x1002, 0x948F, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ - {0x1002, 0x9490, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4670"}, \ - {0x1002, 0x9495, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4600 Series"}, \ - {0x1002, 0x9498, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4650"}, \ - {0x1002, 0x9480, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4650"}, \ - {0x1002, 0x9488, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4670"}, \ - {0x1002, 0x9489, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M5750"}, \ - {0x1002, 0x9491, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI RADEON E4600"}, \ - {0x1002, 0x949C, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI FirePro V7750 (FireGL)"}, \ - {0x1002, 0x949E, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI FirePro V5700 (FireGL)"}, \ - {0x1002, 0x949F, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI FirePro V3750 (FireGL)"}, \ - {0x1002, 0x9540, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon HD 4550"}, \ - {0x1002, 0x9541, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon RV710"}, \ - {0x1002, 0x9542, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon RV710"}, \ - {0x1002, 0x954E, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon RV710"}, \ - {0x1002, 0x954F, CHIP_RV710|RADEON_NEW_MEMMAP, "ATI Radeon HD 4350"}, \ - {0x1002, 0x9552, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4300 Series"}, \ - {0x1002, 0x9553, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ - {0x1002, 0x9555, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ - {0x1002, 0x9557, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro RG220"}, \ - {0, 0, 0, NULL} - -#define r128_PCI_IDS \ - {0x1002, 0x4c45, 0, "ATI Rage 128 Mobility LE (PCI)"}, \ - {0x1002, 0x4c46, 0, "ATI Rage 128 Mobility LF (AGP)"}, \ - {0x1002, 0x4d46, 0, "ATI Rage 128 Mobility MF (AGP)"}, \ - {0x1002, 0x4d4c, 0, "ATI Rage 128 Mobility ML (AGP)"}, \ - {0x1002, 0x5041, 0, "ATI Rage 128 Pro PA (PCI)"}, \ - {0x1002, 0x5042, 0, "ATI Rage 128 Pro PB (AGP)"}, \ - {0x1002, 0x5043, 0, "ATI Rage 128 Pro PC (AGP)"}, \ - {0x1002, 0x5044, 0, "ATI Rage 128 Pro PD (PCI)"}, \ - {0x1002, 0x5045, 0, "ATI Rage 128 Pro PE (AGP)"}, \ - {0x1002, 0x5046, 0, "ATI Rage 128 Pro PF (AGP)"}, \ - {0x1002, 0x5047, 0, "ATI Rage 128 Pro PG (PCI)"}, \ - {0x1002, 0x5048, 0, "ATI Rage 128 Pro PH (AGP)"}, \ - {0x1002, 0x5049, 0, "ATI Rage 128 Pro PI (AGP)"}, \ - {0x1002, 0x504A, 0, "ATI Rage 128 Pro PJ (PCI)"}, \ - {0x1002, 0x504B, 0, "ATI Rage 128 Pro PK (AGP)"}, \ - {0x1002, 0x504C, 0, "ATI Rage 128 Pro PL (AGP)"}, \ - {0x1002, 0x504D, 0, "ATI Rage 128 Pro PM (PCI)"}, \ - {0x1002, 0x504E, 0, "ATI Rage 128 Pro PN (AGP)"}, \ - {0x1002, 0x504F, 0, "ATI Rage 128 Pro PO (AGP)"}, \ - {0x1002, 0x5050, 0, "ATI Rage 128 Pro PP (PCI)"}, \ - {0x1002, 0x5051, 0, "ATI Rage 128 Pro PQ (AGP)"}, \ - {0x1002, 0x5052, 0, "ATI Rage 128 Pro PR (PCI)"}, \ - {0x1002, 0x5053, 0, "ATI Rage 128 Pro PS (PCI)"}, \ - {0x1002, 0x5054, 0, "ATI Rage 128 Pro PT (AGP)"}, \ - {0x1002, 0x5055, 0, "ATI Rage 128 Pro PU (AGP)"}, \ - {0x1002, 0x5056, 0, "ATI Rage 128 Pro PV (PCI)"}, \ - {0x1002, 0x5057, 0, "ATI Rage 128 Pro PW (AGP)"}, \ - {0x1002, 0x5058, 0, "ATI Rage 128 Pro PX (AGP)"}, \ - {0x1002, 0x5245, 0, "ATI Rage 128 RE (PCI)"}, \ - {0x1002, 0x5246, 0, "ATI Rage 128 RF (AGP)"}, \ - {0x1002, 0x5247, 0, "ATI Rage 128 RG (AGP)"}, \ - {0x1002, 0x524b, 0, "ATI Rage 128 RK (PCI)"}, \ - {0x1002, 0x524c, 0, "ATI Rage 128 RL (AGP)"}, \ - {0x1002, 0x534d, 0, "ATI Rage 128 SM (AGP)"}, \ - {0x1002, 0x5446, 0, "ATI Rage 128 Pro Ultra TF (AGP)"}, \ - {0x1002, 0x544C, 0, "ATI Rage 128 Pro Ultra TL (AGP)"}, \ - {0x1002, 0x5452, 0, "ATI Rage 128 Pro Ultra TR (AGP)"}, \ - {0, 0, 0, NULL} - -#define mga_PCI_IDS \ - {0x102b, 0x0520, MGA_CARD_TYPE_G200, "Matrox G200 (PCI)"}, \ - {0x102b, 0x0521, MGA_CARD_TYPE_G200, "Matrox G200 (AGP)"}, \ - {0x102b, 0x0525, MGA_CARD_TYPE_G400, "Matrox G400/G450 (AGP)"}, \ - {0x102b, 0x2527, MGA_CARD_TYPE_G550, "Matrox G550 (AGP)"}, \ - {0, 0, 0, NULL} - -#define mach64_PCI_IDS \ - {0x1002, 0x4749, 0, "3D Rage Pro"}, \ - {0x1002, 0x4750, 0, "3D Rage Pro 215GP"}, \ - {0x1002, 0x4751, 0, "3D Rage Pro 215GQ"}, \ - {0x1002, 0x4742, 0, "3D Rage Pro AGP 1X/2X"}, \ - {0x1002, 0x4744, 0, "3D Rage Pro AGP 1X"}, \ - {0x1002, 0x4c49, 0, "3D Rage LT Pro"}, \ - {0x1002, 0x4c50, 0, "3D Rage LT Pro"}, \ - {0x1002, 0x4c51, 0, "3D Rage LT Pro"}, \ - {0x1002, 0x4c42, 0, "3D Rage LT Pro AGP-133"}, \ - {0x1002, 0x4c44, 0, "3D Rage LT Pro AGP-66"}, \ - {0x1002, 0x474c, 0, "Rage XC"}, \ - {0x1002, 0x474f, 0, "Rage XL"}, \ - {0x1002, 0x4752, 0, "Rage XL"}, \ - {0x1002, 0x4753, 0, "Rage XC"}, \ - {0x1002, 0x474d, 0, "Rage XL AGP 2X"}, \ - {0x1002, 0x474e, 0, "Rage XC AGP"}, \ - {0x1002, 0x4c52, 0, "Rage Mobility P/M"}, \ - {0x1002, 0x4c53, 0, "Rage Mobility L"}, \ - {0x1002, 0x4c4d, 0, "Rage Mobility P/M AGP 2X"}, \ - {0x1002, 0x4c4e, 0, "Rage Mobility L AGP 2X"}, \ - {0, 0, 0, NULL} - -#define sis_PCI_IDS \ - {0x1039, 0x0300, 0, "SiS 300/305"}, \ - {0x1039, 0x5300, 0, "SiS 540"}, \ - {0x1039, 0x6300, 0, "SiS 630"}, \ - {0x1039, 0x6330, SIS_CHIP_315, "SiS 661"}, \ - {0x1039, 0x7300, 0, "SiS 730"}, \ - {0x18CA, 0x0040, SIS_CHIP_315, "Volari V3XT/V5/V8"}, \ - {0x18CA, 0x0042, SIS_CHIP_315, "Volari Unknown"}, \ - {0, 0, 0, NULL} - -#define tdfx_PCI_IDS \ - {0x121a, 0x0003, 0, "3dfx Voodoo Banshee"}, \ - {0x121a, 0x0004, 0, "3dfx Voodoo3 2000"}, \ - {0x121a, 0x0005, 0, "3dfx Voodoo3 3000"}, \ - {0x121a, 0x0007, 0, "3dfx Voodoo4 4500"}, \ - {0x121a, 0x0009, 0, "3dfx Voodoo5 5500"}, \ - {0x121a, 0x000b, 0, "3dfx Voodoo4 4200"}, \ - {0, 0, 0, NULL} - -#define viadrv_PCI_IDS \ - {0x1106, 0x3022, 0, "VIA CLE266 3022"}, \ - {0x1106, 0x3118, VIA_PRO_GROUP_A, "VIA CN400 / PM8X0"}, \ - {0x1106, 0x3122, 0, "VIA CLE266"}, \ - {0x1106, 0x7205, 0, "VIA KM400"}, \ - {0x1106, 0x3108, 0, "VIA K8M800"}, \ - {0x1106, 0x3344, 0, "VIA CN700 / VM800 / P4M800Pro"}, \ - {0x1106, 0x3343, 0, "VIA P4M890"}, \ - {0x1106, 0x3230, VIA_DX9_0, "VIA K8M890"}, \ - {0x1106, 0x3157, VIA_PRO_GROUP_A, "VIA CX700"}, \ - {0x1106, 0x3371, VIA_DX9_0, "VIA P4M900 / VN896"}, \ - {0, 0, 0, NULL} - -#define i810_PCI_IDS \ - {0x8086, 0x7121, 0, "Intel i810 GMCH"}, \ - {0x8086, 0x7123, 0, "Intel i810-DC100 GMCH"}, \ - {0x8086, 0x7125, 0, "Intel i810E GMCH"}, \ - {0x8086, 0x1132, 0, "Intel i815 GMCH"}, \ - {0, 0, 0, NULL} - -#define i830_PCI_IDS \ - {0x8086, 0x3577, 0, "Intel i830M GMCH"}, \ - {0x8086, 0x2562, 0, "Intel i845G GMCH"}, \ - {0x8086, 0x3582, 0, "Intel i852GM/i855GM GMCH"}, \ - {0x8086, 0x2572, 0, "Intel i865G GMCH"}, \ - {0, 0, 0, NULL} - -#define gamma_PCI_IDS \ - {0x3d3d, 0x0008, 0, "3DLabs GLINT Gamma G1"}, \ + {0x1002, 0x95CF, CHIP_RV620|RADEON_NEW_MEMMAP, "ATI FireMV 2260"}, \ + {0x1002, 0x9610, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 3200 Graphics"}, \ + {0x1002, 0x9611, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3100 Graphics"}, \ + {0x1002, 0x9612, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 3200 Graphics"}, \ + {0x1002, 0x9613, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3100 Graphics"}, \ + {0x1002, 0x9614, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3300 Graphics"}, \ + {0x1002, 0x9615, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3200 Graphics"}, \ + {0x1002, 0x9616, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3000 Graphics"}, \ + {0x1002, 0x9640, CHIP_SUMO|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "BeaverCreek [Radeon HD 6550D]"}, \ + {0x1002, 0x9641, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "BeaverCreek [Mobility Radeon HD 6620G]"}, \ + {0x1002, 0x9642, CHIP_SUMO2|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo [Radeon HD 6370D]"}, \ + {0x1002, 0x9643, CHIP_SUMO2|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo [Radeon HD 6380G]"}, \ + {0x1002, 0x9644, CHIP_SUMO2|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo [Radeon HD 6410D]"}, \ + {0x1002, 0x9645, CHIP_SUMO2|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo [Radeon HD 6410D]"}, \ + {0x1002, 0x9647, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "BeaverCreek [Radeon HD 6520G]"}, \ + {0x1002, 0x9648, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo [Radeon HD 6480G]"}, \ + {0x1002, 0x9649, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo [Radeon HD 6480G]"}, \ + {0x1002, 0x964A, CHIP_SUMO|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "BeaverCreek [Radeon HD 6530D]"}, \ + {0x1002, 0x964B, CHIP_SUMO|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo"}, \ + {0x1002, 0x964C, CHIP_SUMO|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo"}, \ + {0x1002, 0x964E, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo"}, \ + {0x1002, 0x964F, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Sumo"}, \ + {0x1002, 0x9710, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 4200"}, \ + {0x1002, 0x9711, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 4100"}, \ + {0x1002, 0x9712, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon HD 4200"}, \ + {0x1002, 0x9713, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon 4100"}, \ + {0x1002, 0x9714, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI RS880"}, \ + {0x1002, 0x9715, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 4250"}, \ + {0x1002, 0x9802, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Wrestler [Radeon HD 6310]"}, \ + {0x1002, 0x9803, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Wrestler [Radeon HD 6310]"}, \ + {0x1002, 0x9804, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Wrestler [Radeon HD 6250]"}, \ + {0x1002, 0x9805, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Wrestler [Radeon HD 6250]"}, \ + {0x1002, 0x9806, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Wrestler [Radeon HD 6320]"}, \ + {0x1002, 0x9807, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Wrestler [Radeon HD 6290]"}, \ + {0x1002, 0x9808, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Wrestler [Radeon HD 7340]"}, \ + {0x1002, 0x9809, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Wrestler [Radeon HD 7310]"}, \ + {0x1002, 0x980A, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Wrestler [Radeon HD 7290]"}, \ + {0x1002, 0x9900, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Unknown device name"}, \ + {0x1002, 0x9901, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7660D]"}, \ + {0x1002, 0x9903, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7640G]"}, \ + {0x1002, 0x9904, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7560D]"}, \ + {0x1002, 0x9905, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [FirePro A300 Series Graphics]"}, \ + {0x1002, 0x9906, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [FirePro A300 Series Graphics]"}, \ + {0x1002, 0x9907, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7620G]"}, \ + {0x1002, 0x9908, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7600G]"}, \ + {0x1002, 0x9909, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7500G]"}, \ + {0x1002, 0x990A, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7500G]"}, \ + {0x1002, 0x990F, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Unknown device name"}, \ + {0x1002, 0x9910, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7660G]"}, \ + {0x1002, 0x9913, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7640G]"}, \ + {0x1002, 0x9917, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7620G]"}, \ + {0x1002, 0x9918, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7600G]"}, \ + {0x1002, 0x9919, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7500G]"}, \ + {0x1002, 0x9990, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7520G]"}, \ + {0x1002, 0x9991, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7540D]"}, \ + {0x1002, 0x9992, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7420G]"}, \ + {0x1002, 0x9993, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7480D]"}, \ + {0x1002, 0x9994, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7400G]"}, \ + {0x1002, 0x99A0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7520G]"}, \ + {0x1002, 0x99A2, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7420G]"}, \ + {0x1002, 0x99A4, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "Trinity [Radeon HD 7400G]"}, \ {0, 0, 0, NULL} #define savage_PCI_IDS \ - {0x5333, 0x8a20, S3_SAVAGE3D, "Savage 3D"}, \ - {0x5333, 0x8a21, S3_SAVAGE3D, "Savage 3D/MV"}, \ - {0x5333, 0x8a22, S3_SAVAGE4, "Savage4"}, \ - {0x5333, 0x8a23, S3_SAVAGE4, "Savage4"}, \ - {0x5333, 0x8c10, S3_SAVAGE_MX, "Savage/MX-MV"}, \ - {0x5333, 0x8c11, S3_SAVAGE_MX, "Savage/MX"}, \ - {0x5333, 0x8c12, S3_SAVAGE_MX, "Savage/IX-MV"}, \ - {0x5333, 0x8c13, S3_SAVAGE_MX, "Savage/IX"}, \ - {0x5333, 0x8c22, S3_SUPERSAVAGE, "SuperSavage MX/128"}, \ - {0x5333, 0x8c24, S3_SUPERSAVAGE, "SuperSavage MX/64"}, \ - {0x5333, 0x8c26, S3_SUPERSAVAGE, "SuperSavage MX/64C"}, \ - {0x5333, 0x8c2a, S3_SUPERSAVAGE, "SuperSavage IX/128 SDR"}, \ - {0x5333, 0x8c2b, S3_SUPERSAVAGE, "SuperSavage IX/128 DDR"}, \ - {0x5333, 0x8c2c, S3_SUPERSAVAGE, "SuperSavage IX/64 SDR"}, \ - {0x5333, 0x8c2d, S3_SUPERSAVAGE, "SuperSavage IX/64 DDR"}, \ - {0x5333, 0x8c2e, S3_SUPERSAVAGE, "SuperSavage IX/C SDR"}, \ - {0x5333, 0x8c2f, S3_SUPERSAVAGE, "SuperSavage IX/C DDR"}, \ - {0x5333, 0x8a25, S3_PROSAVAGE, "ProSavage PM133"}, \ - {0x5333, 0x8a26, S3_PROSAVAGE, "ProSavage KM133"}, \ - {0x5333, 0x8d01, S3_TWISTER, "ProSavage Twister PN133"}, \ - {0x5333, 0x8d02, S3_TWISTER, "ProSavage Twister KN133"}, \ - {0x5333, 0x8d03, S3_PROSAVAGEDDR, "ProSavage DDR"}, \ - {0x5333, 0x8d04, S3_PROSAVAGEDDR, "ProSavage DDR-K"}, \ - {0, 0, 0, NULL} - -#define ffb_PCI_IDS \ + {0x5333, 0x8A20, S3_SAVAGE3D, "Savage 3D"}, \ + {0x5333, 0x8A21, S3_SAVAGE3D, "Savage 3D/MV"}, \ + {0x5333, 0x8A22, S3_SAVAGE4, "Savage4"}, \ + {0x5333, 0x8A23, S3_SAVAGE4, "Savage4"}, \ + {0x5333, 0x8A25, S3_PROSAVAGE, "ProSavage PM133"}, \ + {0x5333, 0x8A26, S3_PROSAVAGE, "ProSavage KM133"}, \ + {0x5333, 0x8C10, S3_SAVAGE_MX, "Savage/MX-MV"}, \ + {0x5333, 0x8C11, S3_SAVAGE_MX, "Savage/MX"}, \ + {0x5333, 0x8C12, S3_SAVAGE_MX, "Savage/IX-MV"}, \ + {0x5333, 0x8C13, S3_SAVAGE_MX, "Savage/IX"}, \ + {0x5333, 0x8C22, S3_SUPERSAVAGE, "SuperSavage MX/128"}, \ + {0x5333, 0x8C24, S3_SUPERSAVAGE, "SuperSavage MX/64"}, \ + {0x5333, 0x8C26, S3_SUPERSAVAGE, "SuperSavage MX/64C"}, \ + {0x5333, 0x8C2A, S3_SUPERSAVAGE, "SuperSavage IX/128 SDR"}, \ + {0x5333, 0x8C2B, S3_SUPERSAVAGE, "SuperSavage IX/128 DDR"}, \ + {0x5333, 0x8C2C, S3_SUPERSAVAGE, "SuperSavage IX/64 SDR"}, \ + {0x5333, 0x8C2D, S3_SUPERSAVAGE, "SuperSavage IX/64 DDR"}, \ + {0x5333, 0x8C2E, S3_SUPERSAVAGE, "SuperSavage IX/C SDR"}, \ + {0x5333, 0x8C2F, S3_SUPERSAVAGE, "SuperSavage IX/C DDR"}, \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 12:27:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 56E3CA97; Sun, 25 Aug 2013 12:27:16 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2A2462B20; Sun, 25 Aug 2013 12:27:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PCRGPt067827; Sun, 25 Aug 2013 12:27:16 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PCRGog067825; Sun, 25 Aug 2013 12:27:16 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251227.r7PCRGog067825@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 12:27:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254853 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 12:27:16 -0000 Author: dumbbell Date: Sun Aug 25 12:27:15 2013 New Revision: 254853 URL: http://svnweb.freebsd.org/changeset/base/254853 Log: drm: Import drm_fixed.h from Linux 3.8 Added: head/sys/dev/drm2/drm_fixed.h (contents, props changed) Added: head/sys/dev/drm2/drm_fixed.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/drm2/drm_fixed.h Sun Aug 25 12:27:15 2013 (r254853) @@ -0,0 +1,72 @@ +/* + * Copyright 2009 Red Hat Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: Dave Airlie + */ + +#include +__FBSDID("$FreeBSD$"); + +#ifndef DRM_FIXED_H +#define DRM_FIXED_H + +typedef union dfixed { + u32 full; +} fixed20_12; + + +#define dfixed_const(A) (u32)(((A) << 12))/* + ((B + 0.000122)*4096)) */ +#define dfixed_const_half(A) (u32)(((A) << 12) + 2048) +#define dfixed_const_666(A) (u32)(((A) << 12) + 2731) +#define dfixed_const_8(A) (u32)(((A) << 12) + 3277) +#define dfixed_mul(A, B) ((u64)((u64)(A).full * (B).full + 2048) >> 12) +#define dfixed_init(A) { .full = dfixed_const((A)) } +#define dfixed_init_half(A) { .full = dfixed_const_half((A)) } +#define dfixed_trunc(A) ((A).full >> 12) +#define dfixed_frac(A) ((A).full & ((1 << 12) - 1)) + +static inline u32 dfixed_floor(fixed20_12 A) +{ + u32 non_frac = dfixed_trunc(A); + + return dfixed_const(non_frac); +} + +static inline u32 dfixed_ceil(fixed20_12 A) +{ + u32 non_frac = dfixed_trunc(A); + + if (A.full > dfixed_const(non_frac)) + return dfixed_const(non_frac + 1); + else + return dfixed_const(non_frac); +} + +static inline u32 dfixed_div(fixed20_12 A, fixed20_12 B) +{ + u64 tmp = ((u64)A.full << 13); + + do_div(tmp, B.full); + tmp += 1; + tmp /= 2; + return lower_32_bits(tmp); +} +#endif From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 12:38:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 40C07E28 for ; Sun, 25 Aug 2013 12:38:51 +0000 (UTC) (envelope-from zbb@semihalf.com) Received: from mail-qa0-f50.google.com (mail-qa0-f50.google.com [209.85.216.50]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 00F182BA0 for ; Sun, 25 Aug 2013 12:38:50 +0000 (UTC) Received: by mail-qa0-f50.google.com with SMTP id o13so1116989qaj.2 for ; Sun, 25 Aug 2013 05:38:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=X5zAqWbInfB2AQu8UDIvgvsToVtR20DBJ3IZkx6c2X0=; b=SUKnwNfTkyEl0okhMw9nhzK2/9tVytFQ9qUoqo+wpYfNsq9Y17TqJBXm7NB5vutYcK zCqpzQKIR8Atef3A2lLjhiYSU+5qZ4TFFg3QxHMao6EOsdCiCdXzJYYeFqnQ1ZuVanuu K8PKb+DcNeQeSnsMJeV1D9qRmEfhSDcwbcewy67X3cHDHp/Paua/TYdaLVw1HTGK076b th1cJI4tfI3igqGi+Kz3tmfgDV7XT3gvsaRazurV/uKJm2PqcJeY+pqHjv9ngMDYy2F1 Alplt/QQ1H7hEG9jvITSP1XiHD26us8HZCIsCNVeScy33U+ISIjRoBD2X/aW1msHjJP5 7qpw== X-Gm-Message-State: ALoCoQkKQcSZFXOKSWn67bwcwMXoog5/9LCsCakRPnF3/0y+bRSpfIbUsu03E/NCDVvgM3/cV9DE MIME-Version: 1.0 X-Received: by 10.49.0.198 with SMTP id 6mr11198379qeg.48.1377434324485; Sun, 25 Aug 2013 05:38:44 -0700 (PDT) Received: by 10.49.8.20 with HTTP; Sun, 25 Aug 2013 05:38:44 -0700 (PDT) In-Reply-To: <20130825131134.11815f5d@bender.Home> References: <201306040921.r549LI8t021617@svn.freebsd.org> <20130825131134.11815f5d@bender.Home> Date: Sun, 25 Aug 2013 14:38:44 +0200 Message-ID: Subject: Re: svn commit: r251370 - head/sys/arm/arm From: Zbigniew Bodek To: Andrew Turner 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, Grzegorz Bernacki , src-committers@freebsd.org, "freebsd-arm@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 12:38:51 -0000 2013/8/25 Andrew Turner > On Tue, 4 Jun 2013 09:21:18 +0000 (UTC) > Grzegorz Bernacki wrote: > > > Author: gber > > Date: Tue Jun 4 09:21:18 2013 > > New Revision: 251370 > > URL: http://svnweb.freebsd.org/changeset/base/251370 > > > > Log: > > Implement pmap_copy() for ARMv6/v7. > > > > Copy the given range of mappings from the source map to the > > destination map, thereby reducing the number of VM faults on fork. > > > > Submitted by: Zbigniew Bodek > > Sponsored by: The FreeBSD Foundation, Semihalf > > > > Modified: > > head/sys/arm/arm/pmap-v6.c > > This change leads to a deadlock when I attempt to run make buildworld > on my PandaBoard. The problem is you are locking > pvh_global_lock, src_pmap, and dst_pmap then calling > pmap_alloc_l2_bucket. > > This may unlock pvh_global_lock and dst_pmap, but it has no knowledge > of src_pmap so it will keep it locked. > > If another thread needs to lock src_pmap, for example the pagedaemon > may in pmap_clearbit, it will lock pvh_global_lock. This will succeed > when pmap_alloc_l2_bucket unlocks it. It will then attempt to lock > src_pmap but, as it is already locked, it will wait for pmap_copy to > unlock it. > > At this point pmap_alloc_l2_bucket will attempt to lock pvh_global_lock > again, however this lock is already held so it waits for the other > thread to unlock it. > > At this point both threads are waiting on each other causing a deadlock. > > I don't know enough about the pmap or vm code to be able to fix this, > other than reverting this commit. > > Andrew > Hello Andrew, Yes, you are right. We've already discussed this with Olivier (who found this and informed me) and decided to comment this out after committing superpages support. Currently there is no other way to fix this due to pmap_alloc_l2_bucket() implementation. If you are in a great hurry with the commit reversal/commenting out pmap_copy() then I see no problem to do so. Best regards Zbyszek Bodek From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 12:44:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8D4981BE; Sun, 25 Aug 2013 12:44:04 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7A5E12BF0; Sun, 25 Aug 2013 12:44:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PCi4Wn077193; Sun, 25 Aug 2013 12:44:04 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PCi4IQ077191; Sun, 25 Aug 2013 12:44:04 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201308251244.r7PCi4IQ077191@svn.freebsd.org> From: Michael Tuexen Date: Sun, 25 Aug 2013 12:44:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254854 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 12:44:04 -0000 Author: tuexen Date: Sun Aug 25 12:44:03 2013 New Revision: 254854 URL: http://svnweb.freebsd.org/changeset/base/254854 Log: Provide human readable debug output. Modified: head/sys/netinet/sctp_input.c head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun Aug 25 12:27:15 2013 (r254853) +++ head/sys/netinet/sctp_input.c Sun Aug 25 12:44:03 2013 (r254854) @@ -6023,10 +6023,10 @@ sctp_input_with_port(struct mbuf *i_pak, } #endif SCTPDBG(SCTP_DEBUG_CRCOFFLOAD, - "sctp_input(): Packet of length %d received on %s with csum_flags 0x%x.\n", + "sctp_input(): Packet of length %d received on %s with csum_flags 0x%b.\n", m->m_pkthdr.len, if_name(m->m_pkthdr.rcvif), - (int)m->m_pkthdr.csum_flags); + (int)m->m_pkthdr.csum_flags, CSUM_BITS); if (m->m_flags & M_FLOWID) { mflowid = m->m_pkthdr.flowid; use_mflowid = 1; Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Sun Aug 25 12:27:15 2013 (r254853) +++ head/sys/netinet6/sctp6_usrreq.c Sun Aug 25 12:44:03 2013 (r254854) @@ -109,10 +109,10 @@ sctp6_input_with_port(struct mbuf **i_pa } #endif SCTPDBG(SCTP_DEBUG_CRCOFFLOAD, - "sctp6_input(): Packet of length %d received on %s with csum_flags 0x%x.\n", + "sctp6_input(): Packet of length %d received on %s with csum_flags 0x%b.\n", m->m_pkthdr.len, if_name(m->m_pkthdr.rcvif), - (int)m->m_pkthdr.csum_flags); + (int)m->m_pkthdr.csum_flags, CSUM_BITS); if (m->m_flags & M_FLOWID) { mflowid = m->m_pkthdr.flowid; use_mflowid = 1; From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 12:58:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7E231763; Sun, 25 Aug 2013 12:58:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 515392C7B; Sun, 25 Aug 2013 12:58:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PCwZPv084128; Sun, 25 Aug 2013 12:58:35 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PCwZpM084126; Sun, 25 Aug 2013 12:58:35 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201308251258.r7PCwZpM084126@svn.freebsd.org> From: Adrian Chadd Date: Sun, 25 Aug 2013 12:58:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254855 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 12:58:35 -0000 Author: adrian Date: Sun Aug 25 12:58:34 2013 New Revision: 254855 URL: http://svnweb.freebsd.org/changeset/base/254855 Log: Update the mis-predicted branch PMC names (for sandy bridge) to not clash. The SDM (June 2013) tables on these are rather confusing. Yes, they assign the same name (BR_MISP_RETIRED.ALL_BRANCHES) to two codes (C5H/00H and C5H/04H.) The latter however is the PEBS version. So, to make it easier to see the difference - and yes, we can use both without having to actually enable the PEBS specific bits! - just rename the PEBS one to _PS so there's no clashing. Tested: * Sandy bridge Modified: head/sys/dev/hwpmc/pmc_events.h Modified: head/sys/dev/hwpmc/pmc_events.h ============================================================================== --- head/sys/dev/hwpmc/pmc_events.h Sun Aug 25 12:44:03 2013 (r254854) +++ head/sys/dev/hwpmc/pmc_events.h Sun Aug 25 12:58:34 2013 (r254855) @@ -3282,7 +3282,7 @@ __PMC_EV_ALIAS("BR_INST_RETIRED.FAR_BRAN __PMC_EV_ALIAS("BR_MISP_RETIRED.ALL_BRANCHES", IAP_EVENT_C5H_00H) \ __PMC_EV_ALIAS("BR_MISP_RETIRED.CONDITIONAL", IAP_EVENT_C5H_01H) \ __PMC_EV_ALIAS("BR_MISP_RETIRED.NEAR_CALL", IAP_EVENT_C5H_02H) \ -__PMC_EV_ALIAS("BR_MISP_RETIRED.ALL_BRANCHES", IAP_EVENT_C5H_04H) \ +__PMC_EV_ALIAS("BR_MISP_RETIRED.ALL_BRANCHES_PS", IAP_EVENT_C5H_04H) \ __PMC_EV_ALIAS("BR_MISP_RETIRED.NOT_TAKEN", IAP_EVENT_C5H_10H) \ __PMC_EV_ALIAS("BR_MISP_RETIRED.TAKEN", IAP_EVENT_C5H_20H) \ __PMC_EV_ALIAS("FP_ASSIST.X87_OUTPUT", IAP_EVENT_CAH_02H) \ @@ -3514,7 +3514,7 @@ __PMC_EV_ALIAS("BR_INST_RETIRED.FAR_BRAN __PMC_EV_ALIAS("BR_MISP_RETIRED.ALL_BRANCHES", IAP_EVENT_C5H_00H) \ __PMC_EV_ALIAS("BR_MISP_RETIRED.CONDITIONAL", IAP_EVENT_C5H_01H) \ __PMC_EV_ALIAS("BR_MISP_RETIRED.NEAR_CALL", IAP_EVENT_C5H_02H) \ -__PMC_EV_ALIAS("BR_MISP_RETIRED.ALL_BRANCHES", IAP_EVENT_C5H_04H) \ +__PMC_EV_ALIAS("BR_MISP_RETIRED.ALL_BRANCHES_PS", IAP_EVENT_C5H_04H) \ __PMC_EV_ALIAS("BR_MISP_RETIRED.NOT_TAKEN", IAP_EVENT_C5H_10H) \ __PMC_EV_ALIAS("BR_MISP_RETIRED.TAKEN", IAP_EVENT_C5H_20H) \ __PMC_EV_ALIAS("FP_ASSIST.X87_OUTPUT", IAP_EVENT_CAH_02H) \ From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 13:10:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1C0979E1; Sun, 25 Aug 2013 13:10:04 +0000 (UTC) (envelope-from roberto@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0915D2CE1; Sun, 25 Aug 2013 13:10:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PDA3xM090498; Sun, 25 Aug 2013 13:10:03 GMT (envelope-from roberto@svn.freebsd.org) Received: (from roberto@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PDA3Yq090496; Sun, 25 Aug 2013 13:10:03 GMT (envelope-from roberto@svn.freebsd.org) Message-Id: <201308251310.r7PDA3Yq090496@svn.freebsd.org> From: Ollivier Robert Date: Sun, 25 Aug 2013 13:10:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254856 - stable/9/sys/crypto/aesni X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 13:10:04 -0000 Author: roberto Date: Sun Aug 25 13:10:03 2013 New Revision: 254856 URL: http://svnweb.freebsd.org/changeset/base/254856 Log: Merge r226837 & r226839 from head: r226837: Improve AES-NI performance for AES-XTS: - Operate on uint64_t types when doing XORing, etc. instead of uint8_t. - Don't bzero() temporary block for every AES block. Do it once for entire data block. - AES-NI is available only on little endian architectures. Simplify code that takes block number from IV. r226839: Update Copyright. Modified: stable/9/sys/crypto/aesni/aesni_wrap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/crypto/aesni/aesni_wrap.c ============================================================================== --- stable/9/sys/crypto/aesni/aesni_wrap.c Sun Aug 25 12:58:34 2013 (r254855) +++ stable/9/sys/crypto/aesni/aesni_wrap.c Sun Aug 25 13:10:03 2013 (r254856) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2010 Konstantin Belousov - * Copyright (c) 2010 Pawel Jakub Dawidek + * Copyright (c) 2010-2011 Pawel Jakub Dawidek * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -87,33 +87,33 @@ aesni_decrypt_ecb(int rounds, const void #define AES_XTS_ALPHA 0x87 /* GF(2^128) generator polynomial */ static void -aesni_crypt_xts_block(int rounds, const void *key_schedule, uint8_t *tweak, - const uint8_t *from, uint8_t *to, int do_encrypt) +aesni_crypt_xts_block(int rounds, const void *key_schedule, uint64_t *tweak, + const uint64_t *from, uint64_t *to, uint64_t *block, int do_encrypt) { - uint8_t block[AES_XTS_BLOCKSIZE]; - u_int i, carry_in, carry_out; + int carry; - for (i = 0; i < AES_XTS_BLOCKSIZE; i++) - block[i] = from[i] ^ tweak[i]; + block[0] = from[0] ^ tweak[0]; + block[1] = from[1] ^ tweak[1]; if (do_encrypt) - aesni_enc(rounds - 1, key_schedule, block, to, NULL); + aesni_enc(rounds - 1, key_schedule, (uint8_t *)block, (uint8_t *)to, NULL); else - aesni_dec(rounds - 1, key_schedule, block, to, NULL); + aesni_dec(rounds - 1, key_schedule, (uint8_t *)block, (uint8_t *)to, NULL); - for (i = 0; i < AES_XTS_BLOCKSIZE; i++) - to[i] ^= tweak[i]; + to[0] ^= tweak[0]; + to[1] ^= tweak[1]; /* Exponentiate tweak. */ - carry_in = 0; - for (i = 0; i < AES_XTS_BLOCKSIZE; i++) { - carry_out = tweak[i] & 0x80; - tweak[i] = (tweak[i] << 1) | (carry_in ? 1 : 0); - carry_in = carry_out; - } - if (carry_in) - tweak[0] ^= AES_XTS_ALPHA; - bzero(block, sizeof(block)); + carry = ((tweak[0] & 0x8000000000000000ULL) > 0); + tweak[0] <<= 1; + if (tweak[1] & 0x8000000000000000ULL) { + uint8_t *twk = (uint8_t *)tweak; + + twk[0] ^= AES_XTS_ALPHA; + } + tweak[1] <<= 1; + if (carry) + tweak[1] |= 1; } static void @@ -121,32 +121,33 @@ aesni_crypt_xts(int rounds, const void * const void *tweak_schedule, size_t len, const uint8_t *from, uint8_t *to, const uint8_t iv[AES_BLOCK_LEN], int do_encrypt) { + uint64_t block[AES_XTS_BLOCKSIZE / 8]; uint8_t tweak[AES_XTS_BLOCKSIZE]; - uint64_t blocknum; size_t i; /* * Prepare tweak as E_k2(IV). IV is specified as LE representation * of a 64-bit block number which we allow to be passed in directly. */ - bcopy(iv, &blocknum, AES_XTS_IVSIZE); - for (i = 0; i < AES_XTS_IVSIZE; i++) { - tweak[i] = blocknum & 0xff; - blocknum >>= 8; - } +#if BYTE_ORDER == LITTLE_ENDIAN + bcopy(iv, tweak, AES_XTS_IVSIZE); /* Last 64 bits of IV are always zero. */ bzero(tweak + AES_XTS_IVSIZE, AES_XTS_IVSIZE); +#else +#error Only LITTLE_ENDIAN architectures are supported. +#endif aesni_enc(rounds - 1, tweak_schedule, tweak, tweak, NULL); len /= AES_XTS_BLOCKSIZE; for (i = 0; i < len; i++) { - aesni_crypt_xts_block(rounds, data_schedule, tweak, from, to, - do_encrypt); + aesni_crypt_xts_block(rounds, data_schedule, (uint64_t *)tweak, + (const uint64_t *)from, (uint64_t *)to, block, do_encrypt); from += AES_XTS_BLOCKSIZE; to += AES_XTS_BLOCKSIZE; } bzero(tweak, sizeof(tweak)); + bzero(block, sizeof(block)); } static void From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 13:30:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DA0A2F1A; Sun, 25 Aug 2013 13:30:37 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C7A722DB0; Sun, 25 Aug 2013 13:30:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PDUbgr002270; Sun, 25 Aug 2013 13:30:37 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PDUbPi002269; Sun, 25 Aug 2013 13:30:37 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201308251330.r7PDUbPi002269@svn.freebsd.org> From: Andre Oppermann Date: Sun, 25 Aug 2013 13:30:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254857 - head/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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 13:30:37 -0000 Author: andre Date: Sun Aug 25 13:30:37 2013 New Revision: 254857 URL: http://svnweb.freebsd.org/changeset/base/254857 Log: Fix CSUM compatibility mapping. SCTP is a layer 4 protocol. Submitted by: tuexen Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Sun Aug 25 13:10:03 2013 (r254856) +++ head/sys/sys/mbuf.h Sun Aug 25 13:30:37 2013 (r254857) @@ -418,7 +418,7 @@ struct mbuf { #define CSUM_IP_VALID CSUM_L3_VALID #define CSUM_DATA_VALID CSUM_L4_VALID #define CSUM_PSEUDO_HDR CSUM_L4_CALC -#define CSUM_SCTP_VALID CSUM_L3_VALID +#define CSUM_SCTP_VALID CSUM_L4_VALID #define CSUM_DELAY_DATA (CSUM_TCP|CSUM_UDP) #define CSUM_DELAY_IP CSUM_IP /* Only v4, no v6 IP hdr csum */ #define CSUM_DELAY_DATA_IPV6 (CSUM_TCP_IPV6|CSUM_UDP_IPV6) From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 14:27:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D32DEB92; Sun, 25 Aug 2013 14:27:14 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BF1EE2034; Sun, 25 Aug 2013 14:27:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PEREuB034691; Sun, 25 Aug 2013 14:27:14 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PEREFU034689; Sun, 25 Aug 2013 14:27:14 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251427.r7PEREFU034689@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 14:27:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254858 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 14:27:15 -0000 Author: dumbbell Date: Sun Aug 25 14:27:14 2013 New Revision: 254858 URL: http://svnweb.freebsd.org/changeset/base/254858 Log: drm: Add missing bits to drmP.h, required by the Radeon driver Some of the FreeBSD-specific definitions are moved to drm_os_freebsd.h. But there's still work to do to clean it up and reduce the diff with Linux' drmP.h. Added: head/sys/dev/drm2/drm_os_freebsd.h (contents, props changed) Modified: head/sys/dev/drm2/drmP.h Modified: head/sys/dev/drm2/drmP.h ============================================================================== --- head/sys/dev/drm2/drmP.h Sun Aug 25 13:30:37 2013 (r254857) +++ head/sys/dev/drm2/drmP.h Sun Aug 25 14:27:14 2013 (r254858) @@ -1,9 +1,15 @@ -/* drmP.h -- Private header for Direct Rendering Manager -*- linux-c -*- - * Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com +/** + * \file drmP.h + * Private header for Direct Rendering Manager + * + * \author Rickard E. (Rik) Faith + * \author Gareth Hughes */ -/*- + +/* * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. + * Copyright (c) 2009-2010, Code Aurora Forum. * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a @@ -24,11 +30,6 @@ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Rickard E. (Rik) Faith - * Gareth Hughes - * */ #include @@ -39,9 +40,6 @@ __FBSDID("$FreeBSD$"); #if defined(_KERNEL) || defined(__KERNEL__) -struct drm_device; -struct drm_file; - #include #include #include @@ -99,12 +97,19 @@ struct drm_file; #include #include +#include + #include #include #include #include -#include + +struct drm_file; +struct drm_device; + +#include #include +#include #include "opt_compat.h" #include "opt_drm.h" @@ -120,6 +125,10 @@ struct drm_file; #undef DRM_LINUX #define DRM_LINUX 0 +/***********************************************************************/ +/** \name DRM template customization defaults */ +/*@{*/ + /* driver capabilities and requirements mask */ #define DRIVER_USE_AGP 0x1 #define DRIVER_REQUIRE_AGP 0x2 @@ -135,8 +144,8 @@ struct drm_file; #define DRIVER_IRQ_VBL2 0x800 #define DRIVER_GEM 0x1000 #define DRIVER_MODESET 0x2000 -#define DRIVER_USE_PLATFORM_DEVICE 0x4000 -#define DRIVER_LOCKLESS_IRQ 0x8000 +#define DRIVER_PRIME 0x4000 +#define DRIVER_LOCKLESS_IRQ 0x8000 #define DRM_HASH_SIZE 16 /* Size of key hash table */ @@ -177,7 +186,10 @@ SYSCTL_DECL(_hw_drm); #define DRM_MAX_CTXBITMAP (PAGE_SIZE * 8) - /* Internal types and structures */ +/***********************************************************************/ +/** \name Internal types and structures */ +/*@{*/ + #define DRM_ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) #define DRM_MIN(a,b) ((a)<(b)?(a):(b)) #define DRM_MAX(a,b) ((a)>(b)?(a):(b)) @@ -228,12 +240,6 @@ typedef void irqreturn_t; #define IRQ_HANDLED /* nothing */ #define IRQ_NONE /* nothing */ -#define unlikely(x) __builtin_expect(!!(x), 0) -#define likely(x) __builtin_expect(!!(x), 1) -#define container_of(ptr, type, member) ({ \ - __typeof( ((type *)0)->member ) *__mptr = (ptr); \ - (type *)( (char *)__mptr - offsetof(type,member) );}) - enum { DRM_IS_NOT_AGP, DRM_IS_AGP, @@ -255,16 +261,6 @@ enum { #define time_after_eq(a,b) ((long)(b) - (long)(a) <= 0) #define drm_msleep(x, msg) pause((msg), ((int64_t)(x)) * hz / 1000) -typedef vm_paddr_t dma_addr_t; -typedef uint64_t u64; -typedef uint32_t u32; -typedef uint16_t u16; -typedef uint8_t u8; -typedef int64_t s64; -typedef int32_t s32; -typedef int16_t s16; -typedef int8_t s8; - /* DRM_READMEMORYBARRIER() prevents reordering of reads. * DRM_WRITEMEMORYBARRIER() prevents reordering of writes. * DRM_MEMORYBARRIER() prevents reordering of reads and writes. @@ -312,16 +308,6 @@ typedef int8_t s8; #define DRM_GET_USER_UNCHECKED(val, uaddr) \ ((val) = fuword32(uaddr), 0) -#define cpu_to_le32(x) htole32(x) -#define le32_to_cpu(x) le32toh(x) - -#define DRM_HZ hz -#define DRM_UDELAY(udelay) DELAY(udelay) -#define DRM_MDELAY(msecs) do { int loops = (msecs); \ - while (loops--) DELAY(1000); \ - } while (0) -#define DRM_TIME_SLICE (hz/20) /* Time slice for GLXContexts */ - #define DRM_GET_PRIV_SAREA(_dev, _ctx, _map) do { \ (_map) = (_dev)->context_sareas[_ctx]; \ } while(0) @@ -372,6 +358,18 @@ for ( ret = 0 ; !ret && !(condition) ; ) __func__ , ##__VA_ARGS__); \ } while (0) +#define dev_err(dev, fmt, ...) \ + device_printf((dev), "error: " fmt, ## __VA_ARGS__) +#define dev_warn(dev, fmt, ...) \ + device_printf((dev), "warning: " fmt, ## __VA_ARGS__) +#define dev_info(dev, fmt, ...) \ + device_printf((dev), "info: " fmt, ## __VA_ARGS__) +#define dev_dbg(dev, fmt, ...) do { \ + if ((drm_debug_flag& DRM_DEBUGBITS_KMS) != 0) { \ + device_printf((dev), "debug: " fmt, ## __VA_ARGS__); \ + } \ +} while (0) + typedef struct drm_pci_id_list { int vendor; @@ -387,7 +385,7 @@ struct drm_msi_blacklist_entry }; #define DRM_AUTH 0x1 -#define DRM_MASTER 0x2 +#define DRM_MASTER 0x2 #define DRM_ROOT_ONLY 0x4 #define DRM_CONTROL_ALLOW 0x8 #define DRM_UNLOCKED 0x10 @@ -397,7 +395,9 @@ typedef struct drm_ioctl_desc { int (*func)(struct drm_device *dev, void *data, struct drm_file *file_priv); int flags; + unsigned int cmd_drv; } drm_ioctl_desc_t; + /** * Creates a driver or general drm_ioctl_desc array entry for the given * ioctl, for use by drm_ioctl(). @@ -405,6 +405,9 @@ typedef struct drm_ioctl_desc { #define DRM_IOCTL_DEF(ioctl, func, flags) \ [DRM_IOCTL_NR(ioctl)] = {ioctl, func, flags} +#define DRM_IOCTL_DEF_DRV(ioctl, _func, _flags) \ + [DRM_IOCTL_NR(DRM_##ioctl)] = {.cmd = DRM_##ioctl, .func = _func, .flags = _flags, .cmd_drv = DRM_IOCTL_##ioctl} + typedef struct drm_magic_entry { drm_magic_t magic; struct drm_file *priv; @@ -417,28 +420,30 @@ typedef struct drm_magic_head { } drm_magic_head_t; typedef struct drm_buf { - int idx; /* Index into master buflist */ - int total; /* Buffer size */ - int order; /* log-base-2(total) */ - int used; /* Amount of buffer in use (for DMA) */ - unsigned long offset; /* Byte offset (used internally) */ - void *address; /* Address of buffer */ - unsigned long bus_address; /* Bus address of buffer */ - struct drm_buf *next; /* Kernel-only: used for free list */ - __volatile__ int pending; /* On hardware DMA queue */ - struct drm_file *file_priv; /* Unique identifier of holding process */ - int context; /* Kernel queue for this buffer */ + int idx; /**< Index into master buflist */ + int total; /**< Buffer size */ + int order; /**< log-base-2(total) */ + int used; /**< Amount of buffer in use (for DMA) */ + unsigned long offset; /**< Byte offset (used internally) */ + void *address; /**< Address of buffer */ + unsigned long bus_address; /**< Bus address of buffer */ + struct drm_buf *next; /**< Kernel-only: used for free list */ + __volatile__ int waiting; /**< On kernel DMA queue */ + __volatile__ int pending; /**< On hardware DMA queue */ + struct drm_file *file_priv; /**< Private of holding file descr */ + int context; /**< Kernel queue for this buffer */ + int while_locked; /**< Dispatch this buffer while locked */ enum { - DRM_LIST_NONE = 0, - DRM_LIST_FREE = 1, - DRM_LIST_WAIT = 2, - DRM_LIST_PEND = 3, - DRM_LIST_PRIO = 4, + DRM_LIST_NONE = 0, + DRM_LIST_FREE = 1, + DRM_LIST_WAIT = 2, + DRM_LIST_PEND = 3, + DRM_LIST_PRIO = 4, DRM_LIST_RECLAIM = 5 - } list; /* Which list we're on */ + } list; /**< Which list we're on */ - int dev_priv_size; /* Size of buffer private stoarge */ - void *dev_private; /* Per-buffer private storage */ + int dev_priv_size; /**< Size of buffer private storage */ + void *dev_private; /**< Per-buffer private storage */ } drm_buf_t; typedef struct drm_freelist { @@ -478,6 +483,14 @@ struct drm_pending_event { void (*destroy)(struct drm_pending_event *event); }; +/* initial implementaton using a linked list - todo hashtab */ +struct drm_prime_file_private { + struct list_head head; +#ifdef DUMBBELL_WIP + struct mutex lock; +#endif /* DUMBBELL_WIP */ +}; + typedef TAILQ_HEAD(drm_file_list, drm_file) drm_file_list_t; struct drm_file { TAILQ_ENTRY(drm_file) link; @@ -500,6 +513,8 @@ struct drm_file { struct list_head event_list; int event_space; struct selinfo event_poll; + + struct drm_prime_file_private prime; }; typedef struct drm_lock_data { @@ -518,17 +533,21 @@ typedef struct drm_lock_data { * concurrently accessed, so no locking is needed. */ typedef struct drm_device_dma { - drm_buf_entry_t bufs[DRM_MAX_ORDER+1]; - int buf_count; - drm_buf_t **buflist; /* Vector of pointers info bufs */ - int seg_count; - int page_count; - unsigned long *pagelist; - unsigned long byte_count; + + struct drm_buf_entry bufs[DRM_MAX_ORDER + 1]; /**< buffers, grouped by their size order */ + int buf_count; /**< total number of buffers */ + struct drm_buf **buflist; /**< Vector of pointers into drm_device_dma::bufs */ + int seg_count; + int page_count; /**< number of pages */ + unsigned long *pagelist; /**< page list */ + unsigned long byte_count; enum { _DRM_DMA_USE_AGP = 0x01, - _DRM_DMA_USE_SG = 0x02 + _DRM_DMA_USE_SG = 0x02, + _DRM_DMA_USE_FB = 0x04, + _DRM_DMA_USE_PCI_RO = 0x08 } flags; + } drm_device_dma_t; typedef struct drm_agp_mem { @@ -593,28 +612,13 @@ struct drm_vblank_info { int inmodeset; /* Display driver is setting mode */ }; -/* Size of ringbuffer for vblank timestamps. Just double-buffer - * in initial implementation. - */ -#define DRM_VBLANKTIME_RBSIZE 2 - -/* Flags and return codes for get_vblank_timestamp() driver function. */ -#define DRM_CALLED_FROM_VBLIRQ 1 -#define DRM_VBLANKTIME_SCANOUTPOS_METHOD (1 << 0) -#define DRM_VBLANKTIME_INVBL (1 << 1) - -/* get_scanout_position() return flags */ -#define DRM_SCANOUTPOS_VALID (1 << 0) -#define DRM_SCANOUTPOS_INVBL (1 << 1) -#define DRM_SCANOUTPOS_ACCURATE (1 << 2) - /* location of GART table */ #define DRM_ATI_GART_MAIN 1 #define DRM_ATI_GART_FB 2 -#define DRM_ATI_GART_PCI 1 +#define DRM_ATI_GART_PCI 1 #define DRM_ATI_GART_PCIE 2 -#define DRM_ATI_GART_IGP 3 +#define DRM_ATI_GART_IGP 3 struct drm_ati_pcigart_info { int gart_table_location; @@ -686,10 +690,58 @@ struct drm_gem_object { uint32_t pending_write_domain; void *driver_private; + +#ifdef DUMBBELL_WIP + /* dma buf exported from this GEM object */ + struct dma_buf *export_dma_buf; + + /* dma buf attachment backing this object */ + struct dma_buf_attachment *import_attach; +#endif /* DUMBBELL_WIP */ }; #include "drm_crtc.h" +/* per-master structure */ +struct drm_master { + + u_int refcount; /* refcount for this master */ + + struct list_head head; /**< each minor contains a list of masters */ + struct drm_minor *minor; /**< link back to minor we are a master for */ + + char *unique; /**< Unique identifier: e.g., busid */ + int unique_len; /**< Length of unique field */ + int unique_size; /**< amount allocated */ + + int blocked; /**< Blocked due to VC switch? */ + + /** \name Authentication */ + /*@{ */ + struct drm_open_hash magiclist; + struct list_head magicfree; + /*@} */ + + struct drm_lock_data lock; /**< Information on hardware lock */ + + void *driver_priv; /**< Private structure for driver to use */ +}; + +/* Size of ringbuffer for vblank timestamps. Just double-buffer + * in initial implementation. + */ +#define DRM_VBLANKTIME_RBSIZE 2 + +/* Flags and return codes for get_vblank_timestamp() driver function. */ +#define DRM_CALLED_FROM_VBLIRQ 1 +#define DRM_VBLANKTIME_SCANOUTPOS_METHOD (1 << 0) +#define DRM_VBLANKTIME_INVBL (1 << 1) + +/* get_scanout_position() return flags */ +#define DRM_SCANOUTPOS_VALID (1 << 0) +#define DRM_SCANOUTPOS_INVBL (1 << 1) +#define DRM_SCANOUTPOS_ACCURATE (1 << 2) + #ifndef DMA_BIT_MASK #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : (1ULL<<(n)) - 1) #endif @@ -761,7 +813,7 @@ struct drm_driver_info { * * \param dev DRM device handle * - * \returns + * \returns * One of three values is returned depending on whether or not the * card is absolutely \b not AGP (return of 0), absolutely \b is AGP * (return of 1), or may or may not be AGP (return of 2). @@ -816,6 +868,7 @@ struct drm_cmdline_mode { enum drm_connector_force force; }; + struct drm_pending_vblank_event { struct drm_pending_event base; int pipe; @@ -825,8 +878,9 @@ struct drm_pending_vblank_event { /* Length for the array of resource pointers for drm_get_resource_*. */ #define DRM_MAX_PCI_RESOURCE 6 -/** - * DRM device functions structure +/** + * DRM device structure. This structure represent a complete card that + * may contain multiple heads. */ struct drm_device { struct drm_driver_info *driver; @@ -950,8 +1004,14 @@ struct drm_device { void *sysctl_private; char busid_str[128]; int modesetting; + + int switch_power_state; }; +#define DRM_SWITCH_POWER_ON 0 +#define DRM_SWITCH_POWER_OFF 1 +#define DRM_SWITCH_POWER_CHANGING 2 + static __inline__ int drm_core_check_feature(struct drm_device *dev, int feature) { @@ -1031,6 +1091,41 @@ extern int drm_open_helper(struct cdev DRM_STRUCTPROC *p, struct drm_device *dev); +#ifdef DUMBBELL_WIP +extern int drm_gem_prime_handle_to_fd(struct drm_device *dev, + struct drm_file *file_priv, uint32_t handle, uint32_t flags, + int *prime_fd); +extern int drm_gem_prime_fd_to_handle(struct drm_device *dev, + struct drm_file *file_priv, int prime_fd, uint32_t *handle); + +extern int drm_prime_handle_to_fd_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv); +extern int drm_prime_fd_to_handle_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv); + +#ifdef DUMBBELL_WIP +/* + * See drm_prime.c + * -- dumbbell@ + */ +extern int drm_prime_sg_to_page_addr_arrays(struct sg_table *sgt, vm_page_t *pages, + dma_addr_t *addrs, int max_pages); +#endif /* DUMBBELL_WIP */ +extern struct sg_table *drm_prime_pages_to_sg(vm_page_t *pages, int nr_pages); +extern void drm_prime_gem_destroy(struct drm_gem_object *obj, struct sg_table *sg); + + +void drm_prime_init_file_private(struct drm_prime_file_private *prime_fpriv); +void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv); +int drm_prime_add_imported_buf_handle(struct drm_prime_file_private *prime_fpriv, struct dma_buf *dma_buf, uint32_t handle); +int drm_prime_lookup_imported_buf_handle(struct drm_prime_file_private *prime_fpriv, struct dma_buf *dma_buf, uint32_t *handle); +void drm_prime_remove_imported_buf_handle(struct drm_prime_file_private *prime_fpriv, struct dma_buf *dma_buf); + +int drm_prime_add_dma_buf(struct drm_device *dev, struct drm_gem_object *obj); +int drm_prime_lookup_obj(struct drm_device *dev, struct dma_buf *buf, + struct drm_gem_object **obj); +#endif /* DUMBBELL_WIP */ + /* Memory management support (drm_memory.c) */ void drm_mem_init(void); void drm_mem_uninit(void); @@ -1319,6 +1414,8 @@ void drm_gem_pager_dtr(void *obj); struct ttm_bo_device; int ttm_bo_mmap_single(struct ttm_bo_device *bdev, vm_ooffset_t *offset, vm_size_t size, struct vm_object **obj_res, int nprot); +struct ttm_buffer_object; +void ttm_bo_release_mmap(struct ttm_buffer_object *bo); void drm_device_lock_mtx(struct drm_device *dev); void drm_device_unlock_mtx(struct drm_device *dev); @@ -1407,36 +1504,13 @@ static __inline__ void drm_core_dropmap( { } -#define KIB_NOTYET() \ -do { \ - if (drm_debug_flag && drm_notyet_flag) \ - printf("NOTYET: %s at %s:%d\n", __func__, __FILE__, __LINE__); \ -} while (0) - -#define KTR_DRM KTR_DEV -#define KTR_DRM_REG KTR_SPARE3 - -/* Error codes conversion from Linux to FreeBSD. */ -/* XXXKIB what is the right code for EREMOTEIO on FreeBSD? */ -#define EREMOTEIO ENXIO -#define ERESTARTSYS ERESTART - -#define PCI_VENDOR_ID_APPLE 0x106b -#define PCI_VENDOR_ID_ASUSTEK 0x1043 -#define PCI_VENDOR_ID_ATI 0x1002 -#define PCI_VENDOR_ID_DELL 0x1028 -#define PCI_VENDOR_ID_HP 0x103c -#define PCI_VENDOR_ID_IBM 0x1014 -#define PCI_VENDOR_ID_INTEL 0x8086 -#define PCI_VENDOR_ID_SERVERWORKS 0x1166 -#define PCI_VENDOR_ID_SONY 0x104d -#define PCI_VENDOR_ID_VIA 0x1106 - #define DRM_PCIE_SPEED_25 1 #define DRM_PCIE_SPEED_50 2 #define DRM_PCIE_SPEED_80 4 extern int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *speed_mask); +#define drm_can_sleep() (DRM_HZ & 1) + #endif /* __KERNEL__ */ #endif /* _DRM_P_H_ */ Added: head/sys/dev/drm2/drm_os_freebsd.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/drm2/drm_os_freebsd.h Sun Aug 25 14:27:14 2013 (r254858) @@ -0,0 +1,144 @@ +/** + * \file drm_os_freebsd.h + * OS abstraction macros. + */ + +#include +__FBSDID("$FreeBSD$"); + +#if _BYTE_ORDER == _BIG_ENDIAN +#define __BIG_ENDIAN 4321 +#else +#define __LITTLE_ENDIAN 1234 +#endif + +#define cpu_to_le16(x) htole16(x) +#define le16_to_cpu(x) le16toh(x) +#define cpu_to_le32(x) htole32(x) +#define le32_to_cpu(x) le32toh(x) + +#define cpu_to_be16(x) htobe16(x) +#define be16_to_cpu(x) be16toh(x) +#define cpu_to_be32(x) htobe32(x) +#define be32_to_cpu(x) be32toh(x) +#define be32_to_cpup(x) be32toh(*x) + +typedef vm_paddr_t dma_addr_t; +typedef uint64_t u64; +typedef uint32_t u32; +typedef uint16_t u16; +typedef uint8_t u8; +typedef int64_t s64; +typedef int32_t s32; +typedef int16_t s16; +typedef int8_t s8; +typedef int32_t __be32; + +#define unlikely(x) __builtin_expect(!!(x), 0) +#define likely(x) __builtin_expect(!!(x), 1) +#define container_of(ptr, type, member) ({ \ + __typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) + +#define DRM_HZ hz +#define DRM_UDELAY(udelay) DELAY(udelay) +#define DRM_MDELAY(msecs) do { int loops = (msecs); \ + while (loops--) DELAY(1000); \ + } while (0) +#define DRM_MSLEEP(msecs) drm_msleep((msecs), "drm_msleep") +#define DRM_TIME_SLICE (hz/20) /* Time slice for GLXContexts */ + +#define do_div(a, b) ((a) /= (b)) +#define lower_32_bits(n) ((u32)(n)) + +#define min_t(type, x, y) ({ \ + type __min1 = (x); \ + type __min2 = (y); \ + __min1 < __min2 ? __min1 : __min2; }) + +#define max_t(type, x, y) ({ \ + type __max1 = (x); \ + type __max2 = (y); \ + __max1 > __max2 ? __max1 : __max2; }) + +#define memset_io(a, b, c) memset((a), (b), (c)) +#define memcpy_fromio(a, b, c) memcpy((a), (b), (c)) +#define memcpy_toio(a, b, c) memcpy((a), (b), (c)) + +/* XXXKIB what is the right code for the FreeBSD ? */ +/* kib@ used ENXIO here -- dumbbell@ */ +#define EREMOTEIO EIO +#define ERESTARTSYS ERESTART + +#define KTR_DRM KTR_DEV +#define KTR_DRM_REG KTR_SPARE3 + +#define PCI_VENDOR_ID_APPLE 0x106b +#define PCI_VENDOR_ID_ASUSTEK 0x1043 +#define PCI_VENDOR_ID_ATI 0x1002 +#define PCI_VENDOR_ID_DELL 0x1028 +#define PCI_VENDOR_ID_HP 0x103c +#define PCI_VENDOR_ID_IBM 0x1014 +#define PCI_VENDOR_ID_INTEL 0x8086 +#define PCI_VENDOR_ID_SERVERWORKS 0x1166 +#define PCI_VENDOR_ID_SONY 0x104d +#define PCI_VENDOR_ID_VIA 0x1106 + +#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) +#define hweight32(i) bitcount32(i) + +static inline unsigned long +roundup_pow_of_two(unsigned long x) +{ + return (1UL << flsl(x - 1)); +} + +/** + * ror32 - rotate a 32-bit value right + * @word: value to rotate + * @shift: bits to roll + * + * Source: include/linux/bitops.h + */ +static inline uint32_t ror32(uint32_t word, unsigned int shift) +{ + return (word >> shift) | (word << (32 - shift)); +} + +#define IS_ALIGNED(x, y) (((x) & ((y) - 1)) == 0) +#define get_unaligned(ptr) \ + ({ __typeof__(*(ptr)) __tmp; \ + memcpy(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) + +#if _BYTE_ORDER == _LITTLE_ENDIAN +/* Taken from linux/include/linux/unaligned/le_struct.h. */ +struct __una_u32 { u32 x; } __packed; + +static inline u32 __get_unaligned_cpu32(const void *p) +{ + const struct __una_u32 *ptr = (const struct __una_u32 *)p; + return ptr->x; +} + +static inline u32 get_unaligned_le32(const void *p) +{ + return __get_unaligned_cpu32((const u8 *)p); +} +#else +/* Taken from linux/include/linux/unaligned/le_byteshift.h. */ +static inline u32 __get_unaligned_le32(const u8 *p) +{ + return p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24; +} + +static inline u32 get_unaligned_le32(const void *p) +{ + return __get_unaligned_le32((const u8 *)p); +} +#endif + +#define KIB_NOTYET() \ +do { \ + if (drm_debug_flag && drm_notyet_flag) \ + printf("NOTYET: %s at %s:%d\n", __func__, __FILE__, __LINE__); \ +} while (0) From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 14:29:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F31C1CF8; Sun, 25 Aug 2013 14:29:47 +0000 (UTC) (envelope-from roberto@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CFC012066; Sun, 25 Aug 2013 14:29:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PETl86035522; Sun, 25 Aug 2013 14:29:47 GMT (envelope-from roberto@svn.freebsd.org) Received: (from roberto@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PETlY7035520; Sun, 25 Aug 2013 14:29:47 GMT (envelope-from roberto@svn.freebsd.org) Message-Id: <201308251429.r7PETlY7035520@svn.freebsd.org> From: Ollivier Robert Date: Sun, 25 Aug 2013 14:29:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254859 - stable/9/sys/geom/eli X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 14:29:48 -0000 Author: roberto Date: Sun Aug 25 14:29:47 2013 New Revision: 254859 URL: http://svnweb.freebsd.org/changeset/base/254859 Log: MFC r226840: AESNI-related commit, from a long time ago: Before this change when GELI detected hardware crypto acceleration it will start only one worker thread. For software crypto it will start by default N worker threads where N is the number of available CPUs. This is not optimal if hardware crypto is AES-NI, which uses CPU for AES calculations. Change that to always start one worker thread for every available CPU. Number of worker threads per GELI provider can be easly reduced with kern.geom.eli.threads sysctl/tunable and even for software crypto it should be reduced when using more providers. While here, when number of threads exceeds number of CPUs avilable don't reduce this number, assume the user knows what he is doing. Submitted by: Michael Moll Modified: stable/9/sys/geom/eli/g_eli.c stable/9/sys/geom/eli/g_eli.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/eli/g_eli.c ============================================================================== --- stable/9/sys/geom/eli/g_eli.c Sun Aug 25 14:27:14 2013 (r254858) +++ stable/9/sys/geom/eli/g_eli.c Sun Aug 25 14:29:47 2013 (r254859) @@ -444,16 +444,15 @@ g_eli_worker(void *arg) sc = wr->w_softc; #ifdef SMP /* Before sched_bind() to a CPU, wait for all CPUs to go on-line. */ - if (mp_ncpus > 1 && sc->sc_crypto == G_ELI_CRYPTO_SW && - g_eli_threads == 0) { + if (sc->sc_cpubind) { while (!smp_started) tsleep(wr, 0, "geli:smp", hz / 4); } #endif thread_lock(curthread); sched_prio(curthread, PUSER); - if (sc->sc_crypto == G_ELI_CRYPTO_SW && g_eli_threads == 0) - sched_bind(curthread, wr->w_number); + if (sc->sc_cpubind) + sched_bind(curthread, wr->w_number % mp_ncpus); thread_unlock(curthread); G_ELI_DEBUG(1, "Thread %s started.", curthread->td_proc->p_comm); @@ -810,11 +809,7 @@ g_eli_create(struct gctl_req *req, struc threads = g_eli_threads; if (threads == 0) threads = mp_ncpus; - else if (threads > mp_ncpus) { - /* There is really no need for too many worker threads. */ - threads = mp_ncpus; - G_ELI_DEBUG(0, "Reducing number of threads to %u.", threads); - } + sc->sc_cpubind = (mp_ncpus > 1 && threads == mp_ncpus); for (i = 0; i < threads; i++) { if (g_eli_cpu_is_disabled(i)) { G_ELI_DEBUG(1, "%s: CPU %u disabled, skipping.", @@ -854,9 +849,6 @@ g_eli_create(struct gctl_req *req, struc goto failed; } LIST_INSERT_HEAD(&sc->sc_workers, wr, w_next); - /* If we have hardware support, one thread is enough. */ - if (sc->sc_crypto == G_ELI_CRYPTO_HW) - break; } /* Modified: stable/9/sys/geom/eli/g_eli.h ============================================================================== --- stable/9/sys/geom/eli/g_eli.h Sun Aug 25 14:27:14 2013 (r254858) +++ stable/9/sys/geom/eli/g_eli.h Sun Aug 25 14:29:47 2013 (r254859) @@ -190,6 +190,7 @@ struct g_eli_softc { size_t sc_sectorsize; u_int sc_bytes_per_sector; u_int sc_data_per_sector; + boolean_t sc_cpubind; /* Only for software cryptography. */ struct bio_queue_head sc_queue; From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 14:33:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8C848E7E; Sun, 25 Aug 2013 14:33:50 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 796BC20AD; Sun, 25 Aug 2013 14:33:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PEXopj038877; Sun, 25 Aug 2013 14:33:50 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PEXoxF038875; Sun, 25 Aug 2013 14:33:50 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251433.r7PEXoxF038875@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 14:33:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254860 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 14:33:50 -0000 Author: dumbbell Date: Sun Aug 25 14:33:49 2013 New Revision: 254860 URL: http://svnweb.freebsd.org/changeset/base/254860 Log: drm: Update drm_atomic.h, now that projects/atomic64 is in HEAD Submitted by: jkim@ Modified: head/sys/dev/drm2/drm_atomic.h Modified: head/sys/dev/drm2/drm_atomic.h ============================================================================== --- head/sys/dev/drm2/drm_atomic.h Sun Aug 25 14:29:47 2013 (r254859) +++ head/sys/dev/drm2/drm_atomic.h Sun Aug 25 14:33:49 2013 (r254860) @@ -32,62 +32,51 @@ #include __FBSDID("$FreeBSD$"); -/* Many of these implementations are rather fake, but good enough. */ +typedef uint32_t atomic_t; +typedef uint64_t atomic64_t; -typedef u_int32_t atomic_t; +#define BITS_TO_LONGS(x) howmany(x, sizeof(long) * NBBY) -#define atomic_set(p, v) (*(p) = (v)) -#define atomic_read(p) (*(p)) -#define atomic_inc(p) atomic_add_int(p, 1) -#define atomic_dec(p) atomic_subtract_int(p, 1) -#define atomic_add(n, p) atomic_add_int(p, n) -#define atomic_sub(n, p) atomic_subtract_int(p, n) +#define atomic_set(p, v) atomic_store_rel_int(p, v) +#define atomic_read(p) atomic_load_acq_int(p) -static __inline atomic_t -test_and_set_bit(int b, volatile void *p) -{ - int s = splhigh(); - unsigned int m = 1<> 5), 1 << (b & 0x1f)); -} - -static __inline void -set_bit(int b, volatile void *p) -{ - atomic_set_int(((volatile int *)p) + (b >> 5), 1 << (b & 0x1f)); -} - -static __inline int -test_bit(int b, volatile void *p) -{ - return ((volatile int *)p)[b >> 5] & (1 << (b & 0x1f)); -} +#define atomic_add(v, p) atomic_add_int(p, v) +#define atomic_sub(v, p) atomic_subtract_int(p, v) +#define atomic_inc(p) atomic_add(1, p) +#define atomic_dec(p) atomic_sub(1, p) + +#define atomic_add_return(v, p) (atomic_fetchadd_int(p, v) + (v)) +#define atomic_sub_return(v, p) (atomic_fetchadd_int(p, -(v)) - (v)) +#define atomic_inc_return(p) atomic_add_return(1, p) +#define atomic_dec_return(p) atomic_sub_return(1, p) + +#define atomic_add_and_test(v, p) (atomic_add_return(v, p) == 0) +#define atomic_sub_and_test(v, p) (atomic_sub_return(v, p) == 0) +#define atomic_inc_and_test(p) (atomic_inc_return(p) == 0) +#define atomic_dec_and_test(p) (atomic_dec_return(p) == 0) + +#define atomic_xchg(p, v) atomic_swap_int(p, v) +#define atomic64_xchg(p, v) atomic_swap_64(p, v) + +#define clear_bit(b, p) \ + atomic_clear_int((volatile u_int *)(p) + (b) / 32, 1 << (b) % 32) +#define set_bit(b, p) \ + atomic_set_int((volatile u_int *)(p) + (b) / 32, 1 << (b) % 32) +#define test_bit(b, p) \ + (atomic_load_acq_int((volatile u_int *)(p) + (b) / 32) & (1 << (b) % 32)) +#define test_and_set_bit(b, p) \ + atomic_testandset_int((volatile u_int *)(p) + (b) / 32, b) static __inline int find_first_zero_bit(volatile void *p, int max) { - int b; - volatile int *ptr = (volatile int *)p; + volatile int *np = p; + int i, n; - for (b = 0; b < max; b += 32) { - if (ptr[b >> 5] != ~0) { - for (;;) { - if ((ptr[b >> 5] & (1 << (b & 0x1f))) == 0) - return b; - b++; - } - } + for (i = 0; i < max / (NBBY * sizeof(int)); i++) { + n = ~np[i]; + if (n != 0) + return (i * NBBY * sizeof(int) + ffs(n) - 1); } - return max; + return (max); } - -#define BITS_TO_LONGS(x) (howmany((x), NBBY * sizeof(long))) From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 14:39:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4B305FFE; Sun, 25 Aug 2013 14:39:52 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 27ED420D2; Sun, 25 Aug 2013 14:39:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PEdqsr040732; Sun, 25 Aug 2013 14:39:52 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PEdpav040729; Sun, 25 Aug 2013 14:39:51 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251439.r7PEdpav040729@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 14:39:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254861 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 14:39:52 -0000 Author: dumbbell Date: Sun Aug 25 14:39:51 2013 New Revision: 254861 URL: http://svnweb.freebsd.org/changeset/base/254861 Log: drm/ttm: Import Linux commit 63d0a4195560362e2e00a3ad38fc331d34e1da9b Author: Maarten Lankhorst Date: Tue Jan 15 14:56:37 2013 +0100 drm/ttm: remove lru_lock around ttm_bo_reserve There should no longer be assumptions that reserve will always succeed with the lru lock held, so we can safely break the whole atomic reserve/lru thing. As a bonus this fixes most lockdep annotations for reservations. Signed-off-by: Maarten Lankhorst Reviewed-by: Jerome Glisse Modified: head/sys/dev/drm2/ttm/ttm_bo.c head/sys/dev/drm2/ttm/ttm_bo_driver.h head/sys/dev/drm2/ttm/ttm_execbuf_util.c Modified: head/sys/dev/drm2/ttm/ttm_bo.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 14:33:49 2013 (r254860) +++ head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 14:39:51 2013 (r254861) @@ -196,13 +196,13 @@ int ttm_bo_del_from_lru(struct ttm_buffe return put_count; } -int ttm_bo_reserve_locked(struct ttm_buffer_object *bo, +int ttm_bo_reserve_nolru(struct ttm_buffer_object *bo, bool interruptible, bool no_wait, bool use_sequence, uint32_t sequence) { int ret; - while (unlikely(atomic_read(&bo->reserved) != 0)) { + while (unlikely(atomic_xchg(&bo->reserved, 1) != 0)) { /** * Deadlock avoidance for multi-bo reserving. */ @@ -224,22 +224,35 @@ int ttm_bo_reserve_locked(struct ttm_buf return -EBUSY; ret = ttm_bo_wait_unreserved_locked(bo, interruptible); + if (unlikely(ret)) return ret; } - atomic_set(&bo->reserved, 1); if (use_sequence) { + bool wake_up = false; /** * Wake up waiters that may need to recheck for deadlock, * if we decreased the sequence number. */ if (unlikely((bo->val_seq - sequence < (1 << 31)) || !bo->seq_valid)) - wakeup(bo); + wake_up = true; + /* + * In the worst case with memory ordering these values can be + * seen in the wrong order. However since we call wake_up_all + * in that case, this will hopefully not pose a problem, + * and the worst case would only cause someone to accidentally + * hit -EAGAIN in ttm_bo_reserve when they see old value of + * val_seq. However this would only happen if seq_valid was + * written before val_seq was, and just means some slightly + * increased cpu usage + */ bo->val_seq = sequence; bo->seq_valid = true; + if (wake_up) + wakeup(bo); } else { bo->seq_valid = false; } @@ -268,14 +281,14 @@ int ttm_bo_reserve(struct ttm_buffer_obj int put_count = 0; int ret; - mtx_lock(&glob->lru_lock); - ret = ttm_bo_reserve_locked(bo, interruptible, no_wait, use_sequence, - sequence); - if (likely(ret == 0)) + ret = ttm_bo_reserve_nolru(bo, interruptible, no_wait, use_sequence, + sequence); + if (likely(ret == 0)) { + mtx_lock(&glob->lru_lock); put_count = ttm_bo_del_from_lru(bo); - mtx_unlock(&glob->lru_lock); - - ttm_bo_list_ref_sub(bo, put_count, true); + mtx_unlock(&glob->lru_lock); + ttm_bo_list_ref_sub(bo, put_count, true); + } return ret; } @@ -488,7 +501,7 @@ static void ttm_bo_cleanup_refs_or_queue int ret; mtx_lock(&glob->lru_lock); - ret = ttm_bo_reserve_locked(bo, false, true, false, 0); + ret = ttm_bo_reserve_nolru(bo, false, true, false, 0); mtx_lock(&bdev->fence_lock); (void) ttm_bo_wait(bo, false, false, true); @@ -580,7 +593,7 @@ static int ttm_bo_cleanup_refs_and_unloc return ret; mtx_lock(&glob->lru_lock); - ret = ttm_bo_reserve_locked(bo, false, true, false, 0); + ret = ttm_bo_reserve_nolru(bo, false, true, false, 0); /* * We raced, and lost, someone else holds the reservation now, @@ -644,7 +657,14 @@ static int ttm_bo_delayed_delete(struct refcount_acquire(&nentry->list_kref); } - ret = ttm_bo_reserve_locked(entry, false, !remove_all, false, 0); + ret = ttm_bo_reserve_nolru(entry, false, true, false, 0); + if (remove_all && ret) { + mtx_unlock(&glob->lru_lock); + ret = ttm_bo_reserve_nolru(entry, false, false, + false, 0); + mtx_lock(&glob->lru_lock); + } + if (!ret) ret = ttm_bo_cleanup_refs_and_unlock(entry, false, !remove_all); @@ -796,7 +816,7 @@ static int ttm_mem_evict_first(struct tt mtx_lock(&glob->lru_lock); list_for_each_entry(bo, &man->lru, lru) { - ret = ttm_bo_reserve_locked(bo, false, true, false, 0); + ret = ttm_bo_reserve_nolru(bo, false, true, false, 0); if (!ret) break; } @@ -1737,7 +1757,7 @@ static int ttm_bo_swapout(struct ttm_mem mtx_lock(&glob->lru_lock); list_for_each_entry(bo, &glob->swap_lru, swap) { - ret = ttm_bo_reserve_locked(bo, false, true, false, 0); + ret = ttm_bo_reserve_nolru(bo, false, true, false, 0); if (!ret) break; } Modified: head/sys/dev/drm2/ttm/ttm_bo_driver.h ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo_driver.h Sun Aug 25 14:33:49 2013 (r254860) +++ head/sys/dev/drm2/ttm/ttm_bo_driver.h Sun Aug 25 14:39:51 2013 (r254861) @@ -791,16 +791,7 @@ extern void ttm_mem_io_unlock(struct ttm * to make room for a buffer already reserved. (Buffers are reserved before * they are evicted). The following algorithm prevents such deadlocks from * occurring: - * 1) Buffers are reserved with the lru spinlock held. Upon successful - * reservation they are removed from the lru list. This stops a reserved buffer - * from being evicted. However the lru spinlock is released between the time - * a buffer is selected for eviction and the time it is reserved. - * Therefore a check is made when a buffer is reserved for eviction, that it - * is still the first buffer in the lru list, before it is removed from the - * list. @check_lru == 1 forces this check. If it fails, the function returns - * -EINVAL, and the caller should then choose a new buffer to evict and repeat - * the procedure. - * 2) Processes attempting to reserve multiple buffers other than for eviction, + * Processes attempting to reserve multiple buffers other than for eviction, * (typically execbuf), should first obtain a unique 32-bit * validation sequence number, * and call this function with @use_sequence == 1 and @sequence == the unique @@ -833,7 +824,7 @@ extern int ttm_bo_reserve(struct ttm_buf /** - * ttm_bo_reserve_locked: + * ttm_bo_reserve_nolru: * * @bo: A pointer to a struct ttm_buffer_object. * @interruptible: Sleep interruptible if waiting. @@ -841,9 +832,7 @@ extern int ttm_bo_reserve(struct ttm_buf * @use_sequence: If @bo is already reserved, Only sleep waiting for * it to become unreserved if @sequence < (@bo)->sequence. * - * Must be called with struct ttm_bo_global::lru_lock held, - * and will not remove reserved buffers from the lru lists. - * The function may release the LRU spinlock if it needs to sleep. + * Will not remove reserved buffers from the lru lists. * Otherwise identical to ttm_bo_reserve. * * Returns: @@ -856,7 +845,7 @@ extern int ttm_bo_reserve(struct ttm_buf * -EDEADLK: Bo already reserved using @sequence. This error code will only * be returned if @use_sequence is set to true. */ -extern int ttm_bo_reserve_locked(struct ttm_buffer_object *bo, +extern int ttm_bo_reserve_nolru(struct ttm_buffer_object *bo, bool interruptible, bool no_wait, bool use_sequence, uint32_t sequence); Modified: head/sys/dev/drm2/ttm/ttm_execbuf_util.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_execbuf_util.c Sun Aug 25 14:33:49 2013 (r254860) +++ head/sys/dev/drm2/ttm/ttm_execbuf_util.c Sun Aug 25 14:39:51 2013 (r254861) @@ -150,7 +150,7 @@ retry_locked: struct ttm_buffer_object *bo = entry->bo; retry_this_bo: - ret = ttm_bo_reserve_locked(bo, true, true, true, val_seq); + ret = ttm_bo_reserve_nolru(bo, true, true, true, val_seq); switch (ret) { case 0: break; From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 14:41:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 17E3B1EF; Sun, 25 Aug 2013 14:41:23 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 03F582101; Sun, 25 Aug 2013 14:41:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PEfMg5043211; Sun, 25 Aug 2013 14:41:22 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PEfMJs043209; Sun, 25 Aug 2013 14:41:22 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251441.r7PEfMJs043209@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 14:41:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254862 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 14:41:23 -0000 Author: dumbbell Date: Sun Aug 25 14:41:22 2013 New Revision: 254862 URL: http://svnweb.freebsd.org/changeset/base/254862 Log: drm/ttm: Import Linux commit 7a1863084c9d90ce4b67d645bf9b0f1612e68f62 Author: Maarten Lankhorst Date: Tue Jan 15 14:56:48 2013 +0100 drm/ttm: cleanup ttm_eu_reserve_buffers handling With the lru lock no longer required for protecting reservations we can just do a ttm_bo_reserve_nolru on -EBUSY, and handle all errors in a single path. Signed-off-by: Maarten Lankhorst Reviewed-by: Jerome Glisse Modified: head/sys/dev/drm2/ttm/ttm_bo.c head/sys/dev/drm2/ttm/ttm_execbuf_util.c Modified: head/sys/dev/drm2/ttm/ttm_bo.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 14:39:51 2013 (r254861) +++ head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 14:41:22 2013 (r254862) @@ -659,10 +659,8 @@ static int ttm_bo_delayed_delete(struct ret = ttm_bo_reserve_nolru(entry, false, true, false, 0); if (remove_all && ret) { - mtx_unlock(&glob->lru_lock); ret = ttm_bo_reserve_nolru(entry, false, false, false, 0); - mtx_lock(&glob->lru_lock); } if (!ret) Modified: head/sys/dev/drm2/ttm/ttm_execbuf_util.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_execbuf_util.c Sun Aug 25 14:39:51 2013 (r254861) +++ head/sys/dev/drm2/ttm/ttm_execbuf_util.c Sun Aug 25 14:41:22 2013 (r254862) @@ -83,19 +83,6 @@ static void ttm_eu_list_ref_sub(struct l } } -static int ttm_eu_wait_unreserved_locked(struct list_head *list, - struct ttm_buffer_object *bo) -{ - int ret; - - ttm_eu_del_from_lru_locked(list); - ret = ttm_bo_wait_unreserved_locked(bo, true); - if (unlikely(ret != 0)) - ttm_eu_backoff_reservation_locked(list); - return ret; -} - - void ttm_eu_backoff_reservation(struct list_head *list) { struct ttm_validate_buffer *entry; @@ -149,19 +136,21 @@ retry_locked: list_for_each_entry(entry, list, head) { struct ttm_buffer_object *bo = entry->bo; -retry_this_bo: ret = ttm_bo_reserve_nolru(bo, true, true, true, val_seq); switch (ret) { case 0: break; case -EBUSY: - ret = ttm_eu_wait_unreserved_locked(list, bo); - if (unlikely(ret != 0)) { - mtx_unlock(&glob->lru_lock); - ttm_eu_list_ref_sub(list); - return ret; - } - goto retry_this_bo; + ttm_eu_del_from_lru_locked(list); + ret = ttm_bo_reserve_nolru(bo, true, false, + true, val_seq); + if (!ret) + break; + + if (unlikely(ret != -EAGAIN)) + goto err; + + /* fallthrough */ case -EAGAIN: ttm_eu_backoff_reservation_locked(list); ttm_eu_list_ref_sub(list); @@ -172,18 +161,13 @@ retry_this_bo: } goto retry_locked; default: - ttm_eu_backoff_reservation_locked(list); - mtx_unlock(&glob->lru_lock); - ttm_eu_list_ref_sub(list); - return ret; + goto err; } entry->reserved = true; if (unlikely(atomic_read(&bo->cpu_writers) > 0)) { - ttm_eu_backoff_reservation_locked(list); - mtx_unlock(&glob->lru_lock); - ttm_eu_list_ref_sub(list); - return -EBUSY; + ret = -EBUSY; + goto err; } } @@ -192,6 +176,12 @@ retry_this_bo: ttm_eu_list_ref_sub(list); return 0; + +err: + ttm_eu_backoff_reservation_locked(list); + mtx_unlock(&glob->lru_lock); + ttm_eu_list_ref_sub(list); + return ret; } void ttm_eu_fence_buffer_objects(struct list_head *list, void *sync_obj) From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 14:47:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 45CF7414; Sun, 25 Aug 2013 14:47:23 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 32A602146; Sun, 25 Aug 2013 14:47:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PElNYd045174; Sun, 25 Aug 2013 14:47:23 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PElMhR045172; Sun, 25 Aug 2013 14:47:22 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251447.r7PElMhR045172@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 14:47:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254863 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 14:47:23 -0000 Author: dumbbell Date: Sun Aug 25 14:47:22 2013 New Revision: 254863 URL: http://svnweb.freebsd.org/changeset/base/254863 Log: drm/ttm: Import Linux commit 5e45d7dfd74100d622f9cdc70bfd1f9fae1671de Author: Maarten Lankhorst Date: Tue Jan 15 14:57:05 2013 +0100 drm/ttm: add ttm_bo_reserve_slowpath Instead of dropping everything, waiting for the bo to be unreserved and trying over, a better strategy would be to do a blocking wait. This can be mapped a lot better to a mutex_lock-like call. Signed-off-by: Maarten Lankhorst Reviewed-by: Jerome Glisse Approved by: kib@ Modified: head/sys/dev/drm2/ttm/ttm_bo.c head/sys/dev/drm2/ttm/ttm_bo_driver.h Modified: head/sys/dev/drm2/ttm/ttm_bo.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 14:41:22 2013 (r254862) +++ head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 14:47:22 2013 (r254863) @@ -293,6 +293,56 @@ int ttm_bo_reserve(struct ttm_buffer_obj return ret; } +int ttm_bo_reserve_slowpath_nolru(struct ttm_buffer_object *bo, + bool interruptible, uint32_t sequence) +{ + bool wake_up = false; + int ret; + + while (unlikely(atomic_xchg(&bo->reserved, 1) != 0)) { + if (bo->seq_valid && sequence == bo->val_seq) { + DRM_ERROR( + "%s: bo->seq_valid && sequence == bo->val_seq", + __func__); + } + + ret = ttm_bo_wait_unreserved_locked(bo, interruptible); + + if (unlikely(ret)) + return ret; + } + + if ((bo->val_seq - sequence < (1 << 31)) || !bo->seq_valid) + wake_up = true; + + /** + * Wake up waiters that may need to recheck for deadlock, + * if we decreased the sequence number. + */ + bo->val_seq = sequence; + bo->seq_valid = true; + if (wake_up) + wakeup(bo); + + return 0; +} + +int ttm_bo_reserve_slowpath(struct ttm_buffer_object *bo, + bool interruptible, uint32_t sequence) +{ + struct ttm_bo_global *glob = bo->glob; + int put_count, ret; + + ret = ttm_bo_reserve_slowpath_nolru(bo, interruptible, sequence); + if (likely(!ret)) { + mtx_lock(&glob->lru_lock); + put_count = ttm_bo_del_from_lru(bo); + mtx_unlock(&glob->lru_lock); + ttm_bo_list_ref_sub(bo, put_count, true); + } + return ret; +} + void ttm_bo_unreserve_locked(struct ttm_buffer_object *bo) { ttm_bo_add_to_lru(bo); Modified: head/sys/dev/drm2/ttm/ttm_bo_driver.h ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo_driver.h Sun Aug 25 14:41:22 2013 (r254862) +++ head/sys/dev/drm2/ttm/ttm_bo_driver.h Sun Aug 25 14:47:22 2013 (r254863) @@ -822,6 +822,36 @@ extern int ttm_bo_reserve(struct ttm_buf bool interruptible, bool no_wait, bool use_sequence, uint32_t sequence); +/** + * ttm_bo_reserve_slowpath_nolru: + * @bo: A pointer to a struct ttm_buffer_object. + * @interruptible: Sleep interruptible if waiting. + * @sequence: Set (@bo)->sequence to this value after lock + * + * This is called after ttm_bo_reserve returns -EAGAIN and we backed off + * from all our other reservations. Because there are no other reservations + * held by us, this function cannot deadlock any more. + * + * Will not remove reserved buffers from the lru lists. + * Otherwise identical to ttm_bo_reserve_slowpath. + */ +extern int ttm_bo_reserve_slowpath_nolru(struct ttm_buffer_object *bo, + bool interruptible, + uint32_t sequence); + + +/** + * ttm_bo_reserve_slowpath: + * @bo: A pointer to a struct ttm_buffer_object. + * @interruptible: Sleep interruptible if waiting. + * @sequence: Set (@bo)->sequence to this value after lock + * + * This is called after ttm_bo_reserve returns -EAGAIN and we backed off + * from all our other reservations. Because there are no other reservations + * held by us, this function cannot deadlock any more. + */ +extern int ttm_bo_reserve_slowpath(struct ttm_buffer_object *bo, + bool interruptible, uint32_t sequence); /** * ttm_bo_reserve_nolru: From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 14:52:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E0E77579; Sun, 25 Aug 2013 14:52:20 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B3E052183; Sun, 25 Aug 2013 14:52:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PEqKmX048711; Sun, 25 Aug 2013 14:52:20 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PEqKWI048709; Sun, 25 Aug 2013 14:52:20 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251452.r7PEqKWI048709@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 14:52:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254864 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 14:52:21 -0000 Author: dumbbell Date: Sun Aug 25 14:52:20 2013 New Revision: 254864 URL: http://svnweb.freebsd.org/changeset/base/254864 Log: drm/ttm: Import Linux commit f2d476a110bc24fde008698ae9018c99e803e25c Author: Maarten Lankhorst Date: Tue Jan 15 14:57:10 2013 +0100 drm/ttm: use ttm_bo_reserve_slowpath_nolru in ttm_eu_reserve_buffers, v2 This requires re-use of the seqno, which increases fairness slightly. Instead of spinning with a new seqno every time we keep the current one, but still drop all other reservations we hold. Only when we succeed, we try to get back our other reservations again. This should increase fairness slightly as well. Changes since v1: - Increase val_seq before calling ttm_bo_reserve_slowpath_nolru and retrying to take all entries to prevent a race. Signed-off-by: Maarten Lankhorst Reviewed-by: Jerome Glisse Approved by: kib@ Modified: head/sys/dev/drm2/ttm/ttm_execbuf_util.c Modified: head/sys/dev/drm2/ttm/ttm_execbuf_util.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_execbuf_util.c Sun Aug 25 14:47:22 2013 (r254863) +++ head/sys/dev/drm2/ttm/ttm_execbuf_util.c Sun Aug 25 14:52:20 2013 (r254864) @@ -130,12 +130,16 @@ int ttm_eu_reserve_buffers(struct list_h glob = entry->bo->glob; mtx_lock(&glob->lru_lock); -retry_locked: val_seq = entry->bo->bdev->val_seq++; +retry_locked: list_for_each_entry(entry, list, head) { struct ttm_buffer_object *bo = entry->bo; + /* already slowpath reserved? */ + if (entry->reserved) + continue; + ret = ttm_bo_reserve_nolru(bo, true, true, true, val_seq); switch (ret) { case 0: @@ -153,12 +157,26 @@ retry_locked: /* fallthrough */ case -EAGAIN: ttm_eu_backoff_reservation_locked(list); + + /* + * temporarily increase sequence number every retry, + * to prevent us from seeing our old reservation + * sequence when someone else reserved the buffer, + * but hasn't updated the seq_valid/seqno members yet. + */ + val_seq = entry->bo->bdev->val_seq++; + ttm_eu_list_ref_sub(list); - ret = ttm_bo_wait_unreserved_locked(bo, true); + ret = ttm_bo_reserve_slowpath_nolru(bo, true, val_seq); if (unlikely(ret != 0)) { mtx_unlock(&glob->lru_lock); return ret; } + entry->reserved = true; + if (unlikely(atomic_read(&bo->cpu_writers) > 0)) { + ret = -EBUSY; + goto err; + } goto retry_locked; default: goto err; From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 14:53:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AA1186D7; Sun, 25 Aug 2013 14:53:40 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7D7062199; Sun, 25 Aug 2013 14:53:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PEretP049133; Sun, 25 Aug 2013 14:53:40 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PEreKR049131; Sun, 25 Aug 2013 14:53:40 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251453.r7PEreKR049131@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 14:53:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254865 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 14:53:40 -0000 Author: dumbbell Date: Sun Aug 25 14:53:39 2013 New Revision: 254865 URL: http://svnweb.freebsd.org/changeset/base/254865 Log: drm/ttm: Import Linux commit cc4c0c4de3c775be22072ec3251f2e581b63d9a0 Author: Maarten Lankhorst Date: Tue Jan 15 14:57:28 2013 +0100 drm/ttm: unexport ttm_bo_wait_unreserved All legitimate users of this function outside ttm_bo.c are gone, now it's only an implementation detail. Signed-off-by: Maarten Lankhorst Reviewed-by: Jerome Glisse Approved by: kib@ Modified: head/sys/dev/drm2/ttm/ttm_bo.c head/sys/dev/drm2/ttm/ttm_bo_driver.h Modified: head/sys/dev/drm2/ttm/ttm_bo.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 14:52:20 2013 (r254864) +++ head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 14:53:39 2013 (r254865) @@ -131,7 +131,7 @@ static void ttm_bo_release_list(struct t ttm_mem_global_free(bdev->glob->mem_glob, acc_size); } -int +static int ttm_bo_wait_unreserved_locked(struct ttm_buffer_object *bo, bool interruptible) { const char *wmsg; Modified: head/sys/dev/drm2/ttm/ttm_bo_driver.h ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo_driver.h Sun Aug 25 14:52:20 2013 (r254864) +++ head/sys/dev/drm2/ttm/ttm_bo_driver.h Sun Aug 25 14:53:39 2013 (r254865) @@ -899,18 +899,6 @@ extern void ttm_bo_unreserve(struct ttm_ */ extern void ttm_bo_unreserve_locked(struct ttm_buffer_object *bo); -/** - * ttm_bo_wait_unreserved - * - * @bo: A pointer to a struct ttm_buffer_object. - * - * Wait for a struct ttm_buffer_object to become unreserved. - * This is typically used in the execbuf code to relax cpu-usage when - * a potential deadlock condition backoff. - */ -extern int ttm_bo_wait_unreserved_locked(struct ttm_buffer_object *bo, - bool interruptible); - /* * ttm_bo_util.c */ From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 14:55:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A2725832; Sun, 25 Aug 2013 14:55:08 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8FC9721AC; Sun, 25 Aug 2013 14:55:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PEt8fX049812; Sun, 25 Aug 2013 14:55:08 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PEt8ao049811; Sun, 25 Aug 2013 14:55:08 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251455.r7PEt8ao049811@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 14:55:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254866 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 14:55:08 -0000 Author: dumbbell Date: Sun Aug 25 14:55:08 2013 New Revision: 254866 URL: http://svnweb.freebsd.org/changeset/base/254866 Log: drm/ttm: Import Linux commit 630541863b29f88c7ab34e647758344e4cd1eafd Author: Dave Airlie Date: Wed Jan 16 14:25:44 2013 +1000 ttm: don't destroy old mm_node on memcpy failure When we are using memcpy to move objects around, and we fail to memcpy due to lack of memory to populate or failure to finish the copy, we don't want to destroy the mm_node that has been copied into old_copy. While working on a new kms driver that uses memcpy, if I overallocated bo's up to the memory limits, and eviction failed, then machine would oops soon after due to having an active bo with an already freed drm_mm embedded in it, freeing it a second time didn't end well. Reviewed-by: Jerome Glisse Signed-off-by: Dave Airlie Approved by: kib@ Modified: head/sys/dev/drm2/ttm/ttm_bo_util.c Modified: head/sys/dev/drm2/ttm/ttm_bo_util.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo_util.c Sun Aug 25 14:53:39 2013 (r254865) +++ head/sys/dev/drm2/ttm/ttm_bo_util.c Sun Aug 25 14:55:08 2013 (r254866) @@ -321,8 +321,12 @@ int ttm_bo_move_memcpy(struct ttm_buffer if (ttm->state == tt_unpopulated) { ret = ttm->bdev->driver->ttm_tt_populate(ttm); - if (ret) + if (ret) { + /* if we fail here don't nuke the mm node + * as the bo still owns it */ + old_copy.mm_node = NULL; goto out1; + } } add = 0; @@ -346,8 +350,11 @@ int ttm_bo_move_memcpy(struct ttm_buffer prot); } else ret = ttm_copy_io_page(new_iomap, old_iomap, page); - if (ret) + if (ret) { + /* failing here, means keep old copy as-is */ + old_copy.mm_node = NULL; goto out1; + } } mb(); out2: From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 14:56:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 27A48971; Sun, 25 Aug 2013 14:56:15 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 14B3D21B3; Sun, 25 Aug 2013 14:56:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PEuEnD049984; Sun, 25 Aug 2013 14:56:14 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PEuEF1049983; Sun, 25 Aug 2013 14:56:14 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251456.r7PEuEF1049983@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 14:56:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254867 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 14:56:15 -0000 Author: dumbbell Date: Sun Aug 25 14:56:14 2013 New Revision: 254867 URL: http://svnweb.freebsd.org/changeset/base/254867 Log: drm/ttm: Import Linux commit 014b34409fb2015f63663b6cafdf557fdf289628 Author: Dave Airlie Date: Wed Jan 16 15:58:34 2013 +1000 ttm: on move memory failure don't leave a node dangling if we have a move notify callback, when moving fails, we call move notify the opposite way around, however this ends up with *mem containing the mm_node from the bo, which means we double free it. This is a follow on to the previous fix. Reviewed-by: Jerome Glisse Signed-off-by: Dave Airlie Approved by: kib@ Modified: head/sys/dev/drm2/ttm/ttm_bo.c Modified: head/sys/dev/drm2/ttm/ttm_bo.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 14:55:08 2013 (r254866) +++ head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 14:56:14 2013 (r254867) @@ -475,6 +475,7 @@ static int ttm_bo_handle_move_mem(struct bo->mem = tmp_mem; bdev->driver->move_notify(bo, mem); bo->mem = *mem; + *mem = tmp_mem; } goto out_err; From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 14:58:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ED323AE6; Sun, 25 Aug 2013 14:58:44 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DA47E21C8; Sun, 25 Aug 2013 14:58:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PEwiFP050780; Sun, 25 Aug 2013 14:58:44 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PEwiVX050779; Sun, 25 Aug 2013 14:58:44 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251458.r7PEwiVX050779@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 14:58:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254868 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 14:58:45 -0000 Author: dumbbell Date: Sun Aug 25 14:58:44 2013 New Revision: 254868 URL: http://svnweb.freebsd.org/changeset/base/254868 Log: drm/ttm: Import Linux commit ff7c60c580d9722f820d85c9c58ca55ecc1ee7c4 Author: Daniel Vetter Date: Mon Jan 14 15:08:14 2013 +0100 drm/ttm: fix fence locking in ttm_buffer_object_transfer, 2nd try This fixes up commit e8e89622ed361c46bf90ba4828e685a8b603f7e5 Author: Daniel Vetter Date: Tue Dec 18 22:25:11 2012 +0100 drm/ttm: fix fence locking in ttm_buffer_object_transfer which leaves behind a might_sleep in atomic context, since the fence_lock spinlock is held over a kmalloc(GFP_KERNEL) call. The fix is to revert the above commit and only take the lock where we need it, around the call to ->sync_obj_ref. v2: Fixup things noticed by Maarten Lankhorst: - Brown paper bag locking bug. - No need for kzalloc if we clear the entire thing on the next line. - check for bo->sync_obj (totally unlikely race, but still someone else could have snuck in) and clear fbo->sync_obj if it's cleared already. Reported-by: Dave Airlie Cc: Jerome Glisse Cc: Maarten Lankhorst Signed-off-by: Daniel Vetter Signed-off-by: Dave Airlie Approved by: kib@ Modified: head/sys/dev/drm2/ttm/ttm_bo_util.c Modified: head/sys/dev/drm2/ttm/ttm_bo_util.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo_util.c Sun Aug 25 14:56:14 2013 (r254867) +++ head/sys/dev/drm2/ttm/ttm_bo_util.c Sun Aug 25 14:58:44 2013 (r254868) @@ -400,11 +400,13 @@ static void ttm_transfered_destroy(struc static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo, - void *sync_obj, struct ttm_buffer_object **new_obj) + struct ttm_buffer_object **new_obj) { struct ttm_buffer_object *fbo; + struct ttm_bo_device *bdev = bo->bdev; + struct ttm_bo_driver *driver = bdev->driver; - fbo = malloc(sizeof(*fbo), M_TTM_TRANSF_OBJ, M_ZERO | M_WAITOK); + fbo = malloc(sizeof(*fbo), M_TTM_TRANSF_OBJ, M_WAITOK); *fbo = *bo; /** @@ -419,7 +421,12 @@ ttm_buffer_object_transfer(struct ttm_bu fbo->vm_node = NULL; atomic_set(&fbo->cpu_writers, 0); - fbo->sync_obj = sync_obj; + mtx_lock(&bdev->fence_lock); + if (bo->sync_obj) + fbo->sync_obj = driver->sync_obj_ref(bo->sync_obj); + else + fbo->sync_obj = NULL; + mtx_unlock(&bdev->fence_lock); refcount_init(&fbo->list_kref, 1); refcount_init(&fbo->kref, 1); fbo->destroy = &ttm_transfered_destroy; @@ -599,7 +606,6 @@ int ttm_bo_move_accel_cleanup(struct ttm int ret; struct ttm_buffer_object *ghost_obj; void *tmp_obj = NULL; - void *sync_obj_ref; mtx_lock(&bdev->fence_lock); if (bo->sync_obj) { @@ -632,14 +638,11 @@ int ttm_bo_move_accel_cleanup(struct ttm */ set_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags); - - sync_obj_ref = bo->bdev->driver->sync_obj_ref(bo->sync_obj); mtx_unlock(&bdev->fence_lock); - /* ttm_buffer_object_transfer accesses bo->sync_obj */ - ret = ttm_buffer_object_transfer(bo, sync_obj_ref, &ghost_obj); if (tmp_obj) driver->sync_obj_unref(&tmp_obj); + ret = ttm_buffer_object_transfer(bo, &ghost_obj); if (ret) return ret; From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 15:00:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CAC03C39; Sun, 25 Aug 2013 15:00:34 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B61F121DD; Sun, 25 Aug 2013 15:00:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PF0Yrc053517; Sun, 25 Aug 2013 15:00:34 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PF0YbN053515; Sun, 25 Aug 2013 15:00:34 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308251500.r7PF0YbN053515@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 25 Aug 2013 15:00:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r254869 - stable/8/lib/libc/gen X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 15:00:34 -0000 Author: jilles Date: Sun Aug 25 15:00:34 2013 New Revision: 254869 URL: http://svnweb.freebsd.org/changeset/base/254869 Log: MFC r250412: posix_spawn_file_actions_addopen(3): Correct error for bad file descriptor. As per POSIX.1-2008, posix_spawn_file_actions_add* return [EBADF] if a file descriptor is negative, not [EINVAL]. The bug was only in the manual page; the code is correct. Modified: stable/8/lib/libc/gen/posix_spawn_file_actions_addopen.3 Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/gen/posix_spawn_file_actions_addopen.3 ============================================================================== --- stable/8/lib/libc/gen/posix_spawn_file_actions_addopen.3 Sun Aug 25 14:58:44 2013 (r254868) +++ stable/8/lib/libc/gen/posix_spawn_file_actions_addopen.3 Sun Aug 25 15:00:34 2013 (r254869) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Mar 24, 2008 +.Dd May 9, 2013 .Dt POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 3 .Os .Sh NAME @@ -145,7 +145,7 @@ otherwise, an error number is returned t These functions fail if: .Bl -tag -width Er -.It Bq Er EINVAL +.It Bq Er EBADF The value specified by .Fa fildes or From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 15:00:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C463FD5F; Sun, 25 Aug 2013 15:00:48 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B21B12206; Sun, 25 Aug 2013 15:00:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PF0mcN053747; Sun, 25 Aug 2013 15:00:48 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PF0mCq053746; Sun, 25 Aug 2013 15:00:48 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251500.r7PF0mCq053746@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 15:00:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254870 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 15:00:48 -0000 Author: dumbbell Date: Sun Aug 25 15:00:48 2013 New Revision: 254870 URL: http://svnweb.freebsd.org/changeset/base/254870 Log: drm/ttm: Make ttm_bo_wait() call uninterruptible in page fault handler This fixes a crash where a SIGLALRM, heavily used by X.Org, would interrupt the wait, causing the page fault to fail and the "Xorg" process to receive a SIGSEGV. Approved by: kib@ Modified: head/sys/dev/drm2/ttm/ttm_bo_vm.c Modified: head/sys/dev/drm2/ttm/ttm_bo_vm.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo_vm.c Sun Aug 25 15:00:34 2013 (r254869) +++ head/sys/dev/drm2/ttm/ttm_bo_vm.c Sun Aug 25 15:00:48 2013 (r254870) @@ -154,7 +154,23 @@ reserve: mtx_lock(&bdev->fence_lock); if (test_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags)) { - ret = ttm_bo_wait(bo, false, true, false); + /* + * Here, the behavior differs between Linux and FreeBSD. + * + * On Linux, the wait is interruptible (3rd argument to + * ttm_bo_wait). There must be some mechanism to resume + * page fault handling, once the signal is processed. + * + * On FreeBSD, the wait is uninteruptible. This is not a + * problem as we can't end up with an unkillable process + * here, because the wait will eventually time out. + * + * An example of this situation is the Xorg process + * which uses SIGALRM internally. The signal could + * interrupt the wait, causing the page fault to fail + * and the process to receive SIGSEGV. + */ + ret = ttm_bo_wait(bo, false, false, false); mtx_unlock(&bdev->fence_lock); if (unlikely(ret != 0)) { retval = VM_PAGER_ERROR; From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 15:01:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DAEC1EB4; Sun, 25 Aug 2013 15:01:35 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AE2A62215; Sun, 25 Aug 2013 15:01:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PF1ZLZ054016; Sun, 25 Aug 2013 15:01:35 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PF1ZIV054015; Sun, 25 Aug 2013 15:01:35 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251501.r7PF1ZIV054015@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 15:01:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254871 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 15:01:35 -0000 Author: dumbbell Date: Sun Aug 25 15:01:35 2013 New Revision: 254871 URL: http://svnweb.freebsd.org/changeset/base/254871 Log: drm/ttm: Fix style errors Modified: head/sys/dev/drm2/ttm/ttm_bo.c Modified: head/sys/dev/drm2/ttm/ttm_bo.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 15:00:48 2013 (r254870) +++ head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 15:01:35 2013 (r254871) @@ -202,7 +202,7 @@ int ttm_bo_reserve_nolru(struct ttm_buff { int ret; - while (unlikely(atomic_xchg(&bo->reserved, 1) != 0)) { + while (unlikely(atomic_xchg(&bo->reserved, 1) != 0)) { /** * Deadlock avoidance for multi-bo reserving. */ @@ -230,28 +230,28 @@ int ttm_bo_reserve_nolru(struct ttm_buff } if (use_sequence) { - bool wake_up = false; + bool wake_up = false; /** * Wake up waiters that may need to recheck for deadlock, * if we decreased the sequence number. */ if (unlikely((bo->val_seq - sequence < (1 << 31)) || !bo->seq_valid)) - wake_up = true; + wake_up = true; - /* - * In the worst case with memory ordering these values can be - * seen in the wrong order. However since we call wake_up_all - * in that case, this will hopefully not pose a problem, - * and the worst case would only cause someone to accidentally - * hit -EAGAIN in ttm_bo_reserve when they see old value of - * val_seq. However this would only happen if seq_valid was - * written before val_seq was, and just means some slightly - * increased cpu usage - */ + /* + * In the worst case with memory ordering these values can be + * seen in the wrong order. However since we call wake_up_all + * in that case, this will hopefully not pose a problem, + * and the worst case would only cause someone to accidentally + * hit -EAGAIN in ttm_bo_reserve when they see old value of + * val_seq. However this would only happen if seq_valid was + * written before val_seq was, and just means some slightly + * increased cpu usage + */ bo->val_seq = sequence; bo->seq_valid = true; - if (wake_up) + if (wake_up) wakeup(bo); } else { bo->seq_valid = false; From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 15:01:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 376F1FC7; Sun, 25 Aug 2013 15:01:44 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 246D52217; Sun, 25 Aug 2013 15:01:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PF1iiB054143; Sun, 25 Aug 2013 15:01:44 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PF1hTP054142; Sun, 25 Aug 2013 15:01:43 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308251501.r7PF1hTP054142@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 25 Aug 2013 15:01:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r254872 - stable/8/lib/libc/gen X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 15:01:44 -0000 Author: jilles Date: Sun Aug 25 15:01:43 2013 New Revision: 254872 URL: http://svnweb.freebsd.org/changeset/base/254872 Log: MFC 250421: posix_spawn_file_actions_adddup2(3): Document difference with dup2(). The ability to clear a file descriptor's close-on-exec flag via posix_spawn_file_actions_adddup2() is in fact proposed in Austin Group issue #411. Modified: stable/8/lib/libc/gen/posix_spawn_file_actions_addopen.3 Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/gen/posix_spawn_file_actions_addopen.3 ============================================================================== --- stable/8/lib/libc/gen/posix_spawn_file_actions_addopen.3 Sun Aug 25 15:01:35 2013 (r254871) +++ stable/8/lib/libc/gen/posix_spawn_file_actions_addopen.3 Sun Aug 25 15:01:43 2013 (r254872) @@ -123,7 +123,19 @@ to be duplicated as dup2(fildes, newfildes) .Ed .Pp -had been called) when a new process is spawned using this file actions object. +had been called) when a new process is spawned using this file actions object, +except that the +.Dv FD_CLOEXEC +flag for +.Fa newfildes +is cleared even if +.Fa fildes +is equal to +.Fa newfildes . +The difference from +.Fn dup2 +is useful for passing a particular file descriptor +to a particular child process. .Pp The .Fn posix_spawn_file_actions_addclose @@ -169,7 +181,16 @@ The and .Fn posix_spawn_file_actions_addclose functions conform to -.St -p1003.1-2001 . +.St -p1003.1-2001 , +with the exception of the behavior of +.Fn posix_spawn_file_actions_adddup2 +if +.Fa fildes +is equal to +.Fa newfildes +(clearing +.Dv FD_CLOEXEC ) . +A future update of the Standard is expected to require this behavior, .Sh HISTORY The .Fn posix_spawn_file_actions_addopen , From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 15:05:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C14B21EE; Sun, 25 Aug 2013 15:05:22 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AE9D22245; Sun, 25 Aug 2013 15:05:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PF5MiW055574; Sun, 25 Aug 2013 15:05:22 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PF5MSN055573; Sun, 25 Aug 2013 15:05:22 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251505.r7PF5MSN055573@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 15:05:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254873 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 15:05:22 -0000 Author: dumbbell Date: Sun Aug 25 15:05:22 2013 New Revision: 254873 URL: http://svnweb.freebsd.org/changeset/base/254873 Log: drm/ttm: When removing a range of pages from a pool, remove all of them Submitted by: Mark Kettenis and Jonathan Gray from OpenBSD Approved by: kib@ Modified: head/sys/dev/drm2/ttm/ttm_page_alloc.c Modified: head/sys/dev/drm2/ttm/ttm_page_alloc.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_page_alloc.c Sun Aug 25 15:01:43 2013 (r254872) +++ head/sys/dev/drm2/ttm/ttm_page_alloc.c Sun Aug 25 15:05:22 2013 (r254873) @@ -320,6 +320,7 @@ static int ttm_page_pool_free(struct ttm vm_page_t *pages_to_free; unsigned freed_pages = 0, npages_to_free = nr_free; + unsigned i; if (NUM_PAGES_TO_ALLOC < nr_free) npages_to_free = NUM_PAGES_TO_ALLOC; @@ -338,7 +339,8 @@ restart: /* We can only remove NUM_PAGES_TO_ALLOC at a time. */ if (freed_pages >= NUM_PAGES_TO_ALLOC) { /* remove range of pages from the pool */ - TAILQ_REMOVE(&pool->list, p, plinks.q); + for (i = 0; i < freed_pages; i++) + TAILQ_REMOVE(&pool->list, pages_to_free[i], plinks.q); ttm_pool_update_free_locked(pool, freed_pages); /** @@ -373,7 +375,8 @@ restart: /* remove range of pages from the pool */ if (freed_pages) { - TAILQ_REMOVE(&pool->list, p, plinks.q); + for (i = 0; i < freed_pages; i++) + TAILQ_REMOVE(&pool->list, pages_to_free[i], plinks.q); ttm_pool_update_free_locked(pool, freed_pages); nr_free -= freed_pages; From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 15:06:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 85B93345; Sun, 25 Aug 2013 15:06:49 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 728742255; Sun, 25 Aug 2013 15:06:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PF6nfk055978; Sun, 25 Aug 2013 15:06:49 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PF6nKT055977; Sun, 25 Aug 2013 15:06:49 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251506.r7PF6nKT055977@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 15:06:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254874 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 15:06:49 -0000 Author: dumbbell Date: Sun Aug 25 15:06:48 2013 New Revision: 254874 URL: http://svnweb.freebsd.org/changeset/base/254874 Log: drm/ttm: Improve comment in ttm_bo_vm_ctor() about lack of ref acquisition Approved by: kib@ Modified: head/sys/dev/drm2/ttm/ttm_bo_vm.c Modified: head/sys/dev/drm2/ttm/ttm_bo_vm.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo_vm.c Sun Aug 25 15:05:22 2013 (r254873) +++ head/sys/dev/drm2/ttm/ttm_bo_vm.c Sun Aug 25 15:06:48 2013 (r254874) @@ -285,8 +285,16 @@ ttm_bo_vm_ctor(void *handle, vm_ooffset_ { /* - * We don't acquire a reference on bo->kref here, because it was - * already done in ttm_bo_mmap_single(). + * On Linux, a reference to the buffer object is acquired here. + * The reason is that this function is not called when the + * mmap() is initialized, but only when a process forks for + * instance. Therefore on Linux, the reference on the bo is + * acquired either in ttm_bo_mmap() or ttm_bo_vm_open(). It's + * then released in ttm_bo_vm_close(). + * + * Here, this function is called during mmap() intialization. + * Thus, the reference acquired in ttm_bo_mmap_single() is + * sufficient. */ *color = 0; From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 15:12:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DEF8B4F8; Sun, 25 Aug 2013 15:12:26 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CC78322C4; Sun, 25 Aug 2013 15:12:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PFCQj2060075; Sun, 25 Aug 2013 15:12:26 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PFCQwO060074; Sun, 25 Aug 2013 15:12:26 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251512.r7PFCQwO060074@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 15:12:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254875 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 15:12:27 -0000 Author: dumbbell Date: Sun Aug 25 15:12:26 2013 New Revision: 254875 URL: http://svnweb.freebsd.org/changeset/base/254875 Log: ttm: "to_page->valid = VM_PAGE_BITS_ALL" before vm_page_dirty(to_page) Approved by; kib@ Modified: head/sys/dev/drm2/ttm/ttm_tt.c Modified: head/sys/dev/drm2/ttm/ttm_tt.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_tt.c Sun Aug 25 15:06:48 2013 (r254874) +++ head/sys/dev/drm2/ttm/ttm_tt.c Sun Aug 25 15:12:26 2013 (r254875) @@ -353,8 +353,8 @@ int ttm_tt_swapout(struct ttm_tt *ttm, v continue; to_page = vm_page_grab(obj, i, VM_ALLOC_NORMAL); pmap_copy_page(from_page, to_page); - vm_page_dirty(to_page); to_page->valid = VM_PAGE_BITS_ALL; + vm_page_dirty(to_page); vm_page_xunbusy(to_page); } vm_object_pip_wakeup(obj); From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 15:15:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F394866F; Sun, 25 Aug 2013 15:15:55 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C55A622DC; Sun, 25 Aug 2013 15:15:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PFFtn1061232; Sun, 25 Aug 2013 15:15:55 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PFFt7T061230; Sun, 25 Aug 2013 15:15:55 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251515.r7PFFt7T061230@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 15:15:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254876 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 15:15:56 -0000 Author: dumbbell Date: Sun Aug 25 15:15:55 2013 New Revision: 254876 URL: http://svnweb.freebsd.org/changeset/base/254876 Log: drm/ttm: Fix unmap of buffer object Add a new ttm_bo_release_mmap() function to unmap pages in a vm_object_t. Pages are freed when the buffer object is later released. This function is called in ttm_bo_unmap_virtual_locked(), replacing Linux' unmap_mapping_range(). In particular this is called when a buffer object is about to be moved, so that its mapping is invalidated. However, we don't use this function in ttm_bo_vm_dtor(), because the vm_object_t is already marked as OBJ_DEAD and the pages will be unmapped. Approved by: kib@ Modified: head/sys/dev/drm2/ttm/ttm_bo.c head/sys/dev/drm2/ttm/ttm_bo_vm.c Modified: head/sys/dev/drm2/ttm/ttm_bo.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 15:12:26 2013 (r254875) +++ head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 15:15:55 2013 (r254876) @@ -1634,13 +1634,8 @@ bool ttm_mem_reg_is_pci(struct ttm_bo_de void ttm_bo_unmap_virtual_locked(struct ttm_buffer_object *bo) { - struct ttm_bo_device *bdev = bo->bdev; - /* off_t offset = (off_t)bo->addr_space_offset;XXXKIB */ - /* off_t holelen = ((off_t)bo->mem.num_pages) << PAGE_SHIFT;XXXKIB */ - if (!bdev->dev_mapping) - return; - /* unmap_mapping_range(bdev->dev_mapping, offset, holelen, 1); XXXKIB */ + ttm_bo_release_mmap(bo); ttm_mem_io_free_vm(bo); } Modified: head/sys/dev/drm2/ttm/ttm_bo_vm.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo_vm.c Sun Aug 25 15:12:26 2013 (r254875) +++ head/sys/dev/drm2/ttm/ttm_bo_vm.c Sun Aug 25 15:15:55 2013 (r254876) @@ -361,6 +361,33 @@ out_unref: return ret; } +void +ttm_bo_release_mmap(struct ttm_buffer_object *bo) +{ + vm_object_t vm_obj; + vm_page_t m; + int i; + + vm_obj = cdev_pager_lookup(bo); + if (vm_obj == NULL) { + return; + } + + VM_OBJECT_WLOCK(vm_obj); +retry: + for (i = 0; i < bo->num_pages; i++) { + m = vm_page_lookup(vm_obj, i); + if (m == NULL) + continue; + if (vm_page_sleep_if_busy(m, "ttm_unm")) + goto retry; + cdev_pager_free_page(vm_obj, m); + } + VM_OBJECT_WUNLOCK(vm_obj); + + vm_object_deallocate(vm_obj); +} + #if 0 int ttm_fbdev_mmap(struct vm_area_struct *vma, struct ttm_buffer_object *bo) { From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 15:26:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 60BCC8F4; Sun, 25 Aug 2013 15:26:46 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4E1A0233A; Sun, 25 Aug 2013 15:26:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PFQkUg066992; Sun, 25 Aug 2013 15:26:46 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PFQkwW066991; Sun, 25 Aug 2013 15:26:46 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251526.r7PFQkwW066991@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 15:26:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254877 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 15:26:46 -0000 Author: dumbbell Date: Sun Aug 25 15:26:45 2013 New Revision: 254877 URL: http://svnweb.freebsd.org/changeset/base/254877 Log: drm/ttm: Fix style in ttm_bo_release_mmap() Modified: head/sys/dev/drm2/ttm/ttm_bo_vm.c Modified: head/sys/dev/drm2/ttm/ttm_bo_vm.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo_vm.c Sun Aug 25 15:15:55 2013 (r254876) +++ head/sys/dev/drm2/ttm/ttm_bo_vm.c Sun Aug 25 15:26:45 2013 (r254877) @@ -369,9 +369,8 @@ ttm_bo_release_mmap(struct ttm_buffer_ob int i; vm_obj = cdev_pager_lookup(bo); - if (vm_obj == NULL) { + if (vm_obj == NULL) return; - } VM_OBJECT_WLOCK(vm_obj); retry: From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 15:29:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 011ADB5A; Sun, 25 Aug 2013 15:29:23 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E22852355; Sun, 25 Aug 2013 15:29:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PFTNCE067872; Sun, 25 Aug 2013 15:29:23 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PFTNG5067870; Sun, 25 Aug 2013 15:29:23 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251529.r7PFTNG5067870@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 15:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254878 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 15:29:24 -0000 Author: dumbbell Date: Sun Aug 25 15:29:23 2013 New Revision: 254878 URL: http://svnweb.freebsd.org/changeset/base/254878 Log: drm/ttm: Fix a reversed condition and add missing locks This allows to run OpenGL applications on at least two test machines with the Radeon driver. Approved by: kib@ Modified: head/sys/dev/drm2/ttm/ttm_bo.c Modified: head/sys/dev/drm2/ttm/ttm_bo.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 15:26:45 2013 (r254877) +++ head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 15:29:23 2013 (r254878) @@ -145,7 +145,7 @@ ttm_bo_wait_unreserved_locked(struct ttm flags = 0; wmsg = "ttbowu"; } - while (!ttm_bo_is_reserved(bo)) { + while (ttm_bo_is_reserved(bo)) { ret = -msleep(bo, &bo->glob->lru_lock, flags, wmsg, 0); if (ret != 0) break; @@ -281,14 +281,15 @@ int ttm_bo_reserve(struct ttm_buffer_obj int put_count = 0; int ret; + mtx_lock(&bo->glob->lru_lock); ret = ttm_bo_reserve_nolru(bo, interruptible, no_wait, use_sequence, sequence); if (likely(ret == 0)) { - mtx_lock(&glob->lru_lock); put_count = ttm_bo_del_from_lru(bo); mtx_unlock(&glob->lru_lock); ttm_bo_list_ref_sub(bo, put_count, true); - } + } else + mtx_unlock(&bo->glob->lru_lock); return ret; } @@ -333,13 +334,14 @@ int ttm_bo_reserve_slowpath(struct ttm_b struct ttm_bo_global *glob = bo->glob; int put_count, ret; + mtx_lock(&glob->lru_lock); ret = ttm_bo_reserve_slowpath_nolru(bo, interruptible, sequence); if (likely(!ret)) { - mtx_lock(&glob->lru_lock); put_count = ttm_bo_del_from_lru(bo); mtx_unlock(&glob->lru_lock); ttm_bo_list_ref_sub(bo, put_count, true); - } + } else + mtx_unlock(&glob->lru_lock); return ret; } From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 15:33:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8D774DF4; Sun, 25 Aug 2013 15:33:18 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7ACF823A1; Sun, 25 Aug 2013 15:33:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PFXIGA071167; Sun, 25 Aug 2013 15:33:18 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PFXIWQ071166; Sun, 25 Aug 2013 15:33:18 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251533.r7PFXIWQ071166@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 15:33:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254879 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 15:33:18 -0000 Author: dumbbell Date: Sun Aug 25 15:33:17 2013 New Revision: 254879 URL: http://svnweb.freebsd.org/changeset/base/254879 Log: drm/ttm: Remove unused VM_ALLOC_DMA32 define Modified: head/sys/dev/drm2/ttm/ttm_page_alloc.c Modified: head/sys/dev/drm2/ttm/ttm_page_alloc.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_page_alloc.c Sun Aug 25 15:29:23 2013 (r254878) +++ head/sys/dev/drm2/ttm/ttm_page_alloc.c Sun Aug 25 15:33:17 2013 (r254879) @@ -49,8 +49,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#define VM_ALLOC_DMA32 VM_ALLOC_RESERVED1 - #define NUM_PAGES_TO_ALLOC (PAGE_SIZE/sizeof(vm_page_t)) #define SMALL_ALLOCATION 16 #define FREE_ALL_PAGES (~0U) From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 15:38:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C59CAFBF; Sun, 25 Aug 2013 15:38:17 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B218423D1; Sun, 25 Aug 2013 15:38:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PFcHpu072748; Sun, 25 Aug 2013 15:38:17 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PFcG3D072742; Sun, 25 Aug 2013 15:38:16 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251538.r7PFcG3D072742@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 15:38:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254880 - in head/sys/dev/drm2: . ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 15:38:17 -0000 Author: dumbbell Date: Sun Aug 25 15:38:16 2013 New Revision: 254880 URL: http://svnweb.freebsd.org/changeset/base/254880 Log: drm: Use the new drm_atomic.h, following the merge of projects/atomic64 Submitted by: jkim@ Modified: head/sys/dev/drm2/drm_gem.c head/sys/dev/drm2/drm_irq.c head/sys/dev/drm2/ttm/ttm_bo.c head/sys/dev/drm2/ttm/ttm_bo_util.c head/sys/dev/drm2/ttm/ttm_bo_vm.c Modified: head/sys/dev/drm2/drm_gem.c ============================================================================== --- head/sys/dev/drm2/drm_gem.c Sun Aug 25 15:33:17 2013 (r254879) +++ head/sys/dev/drm2/drm_gem.c Sun Aug 25 15:38:16 2013 (r254880) @@ -121,7 +121,7 @@ drm_gem_private_object_init(struct drm_d obj->vm_obj = NULL; obj->refcount = 1; - atomic_set(&obj->handle_count, 0); + atomic_store_rel_int(&obj->handle_count, 0); obj->size = size; return (0); Modified: head/sys/dev/drm2/drm_irq.c ============================================================================== --- head/sys/dev/drm2/drm_irq.c Sun Aug 25 15:33:17 2013 (r254879) +++ head/sys/dev/drm2/drm_irq.c Sun Aug 25 15:38:16 2013 (r254880) @@ -786,7 +786,7 @@ int drm_vblank_get(struct drm_device *de mtx_lock(&dev->vbl_lock); /* Going from 0->1 means we have to enable interrupts again */ - if (atomic_fetchadd_int(&dev->vblank_refcount[crtc], 1) == 0) { + if (atomic_add_return(1, &dev->vblank_refcount[crtc]) == 1) { mtx_lock(&dev->vblank_time_lock); if (!dev->vblank_enabled[crtc]) { /* Enable vblank irqs under vblank_time_lock protection. @@ -831,7 +831,7 @@ void drm_vblank_put(struct drm_device *d ("Too many drm_vblank_put for crtc %d", crtc)); /* Last user schedules interrupt disable */ - if (atomic_fetchadd_int(&dev->vblank_refcount[crtc], -1) == 1 && + if (atomic_dec_and_test(&dev->vblank_refcount[crtc]) && (drm_vblank_offdelay > 0)) callout_reset(&dev->vblank_disable_callout, (drm_vblank_offdelay * DRM_HZ) / 1000, Modified: head/sys/dev/drm2/ttm/ttm_bo.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 15:33:17 2013 (r254879) +++ head/sys/dev/drm2/ttm/ttm_bo.c Sun Aug 25 15:38:16 2013 (r254880) @@ -1723,7 +1723,8 @@ int ttm_bo_wait(struct ttm_buffer_object if (driver->sync_obj_signaled(bo->sync_obj)) { void *tmp_obj = bo->sync_obj; bo->sync_obj = NULL; - clear_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags); + atomic_clear_long(&bo->priv_flags, + 1UL << TTM_BO_PRIV_FLAG_MOVING); mtx_unlock(&bdev->fence_lock); driver->sync_obj_unref(&tmp_obj); mtx_lock(&bdev->fence_lock); @@ -1746,8 +1747,8 @@ int ttm_bo_wait(struct ttm_buffer_object if (likely(bo->sync_obj == sync_obj)) { void *tmp_obj = bo->sync_obj; bo->sync_obj = NULL; - clear_bit(TTM_BO_PRIV_FLAG_MOVING, - &bo->priv_flags); + atomic_clear_long(&bo->priv_flags, + 1UL << TTM_BO_PRIV_FLAG_MOVING); mtx_unlock(&bdev->fence_lock); driver->sync_obj_unref(&sync_obj); driver->sync_obj_unref(&tmp_obj); Modified: head/sys/dev/drm2/ttm/ttm_bo_util.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo_util.c Sun Aug 25 15:33:17 2013 (r254879) +++ head/sys/dev/drm2/ttm/ttm_bo_util.c Sun Aug 25 15:38:16 2013 (r254880) @@ -637,7 +637,8 @@ int ttm_bo_move_accel_cleanup(struct ttm * operation has completed. */ - set_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags); + atomic_set_long(&bo->priv_flags, + 1UL << TTM_BO_PRIV_FLAG_MOVING); mtx_unlock(&bdev->fence_lock); if (tmp_obj) driver->sync_obj_unref(&tmp_obj); Modified: head/sys/dev/drm2/ttm/ttm_bo_vm.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo_vm.c Sun Aug 25 15:33:17 2013 (r254879) +++ head/sys/dev/drm2/ttm/ttm_bo_vm.c Sun Aug 25 15:38:16 2013 (r254880) @@ -153,7 +153,8 @@ reserve: */ mtx_lock(&bdev->fence_lock); - if (test_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags)) { + if ((atomic_load_acq_long(&bo->priv_flags) & + (1UL << TTM_BO_PRIV_FLAG_MOVING)) != 0) { /* * Here, the behavior differs between Linux and FreeBSD. * From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 18:09:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7E15857D; Sun, 25 Aug 2013 18:09:12 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5BD3D2A3A; Sun, 25 Aug 2013 18:09:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PI9Cjs052981; Sun, 25 Aug 2013 18:09:12 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PI9CsE052978; Sun, 25 Aug 2013 18:09:12 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251809.r7PI9CsE052978@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 18:09:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254882 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 18:09:12 -0000 Author: dumbbell Date: Sun Aug 25 18:09:11 2013 New Revision: 254882 URL: http://svnweb.freebsd.org/changeset/base/254882 Log: vga_pci: Add API to map the Video BIOS Here are two new functions to map and unmap the Video BIOS: void * vga_pci_map_bios(device_t dev, size_t *size); void vga_pci_unmap_bios(device_t dev, void *bios); The BIOS is either taken from the shadow copy made by the System BIOS at boot time if the given device was used for the default display (i386, amd64 and ia64 only), or from the PCI expansion ROM. Additionally, one can determine if a given device was the default display at boot time using the following new function: void vga_pci_unmap_bios(device_t dev, void *bios); Modified: head/sys/dev/pci/pcivar.h head/sys/dev/pci/vga_pci.c Modified: head/sys/dev/pci/pcivar.h ============================================================================== --- head/sys/dev/pci/pcivar.h Sun Aug 25 17:26:05 2013 (r254881) +++ head/sys/dev/pci/pcivar.h Sun Aug 25 18:09:11 2013 (r254882) @@ -517,4 +517,11 @@ extern uint32_t pci_generation; struct pci_map *pci_find_bar(device_t dev, int reg); int pci_bar_enabled(device_t dev, struct pci_map *pm); +#define VGA_PCI_BIOS_SHADOW_ADDR 0xC0000 +#define VGA_PCI_BIOS_SHADOW_SIZE 131072 + +int vga_pci_is_boot_display(device_t dev); +void * vga_pci_map_bios(device_t dev, size_t *size); +void vga_pci_unmap_bios(device_t dev, void *bios); + #endif /* _PCIVAR_H_ */ Modified: head/sys/dev/pci/vga_pci.c ============================================================================== --- head/sys/dev/pci/vga_pci.c Sun Aug 25 17:26:05 2013 (r254881) +++ head/sys/dev/pci/vga_pci.c Sun Aug 25 18:09:11 2013 (r254882) @@ -46,6 +46,11 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(__amd64__) || defined(__i386__) || defined(__ia64__) +#include +#include +#endif + #include #include @@ -67,6 +72,99 @@ TUNABLE_INT("hw.pci.default_vgapci_unit" SYSCTL_INT(_hw_pci, OID_AUTO, default_vgapci_unit, CTLFLAG_RDTUN, &vga_pci_default_unit, -1, "Default VGA-compatible display"); +int +vga_pci_is_boot_display(device_t dev) +{ + + /* + * Return true if the given device is the default display used + * at boot time. + */ + + return ( + (pci_get_class(dev) == PCIC_DISPLAY || + (pci_get_class(dev) == PCIC_OLD && + pci_get_subclass(dev) == PCIS_OLD_VGA)) && + device_get_unit(dev) == vga_pci_default_unit); +} + +void * +vga_pci_map_bios(device_t dev, size_t *size) +{ + int rid; + struct resource *res; + +#if defined(__amd64__) || defined(__i386__) || defined(__ia64__) + if (vga_pci_is_boot_display(dev)) { + /* + * On x86, the System BIOS copy the default display + * device's Video BIOS at a fixed location in system + * memory (0xC0000, 128 kBytes long) at boot time. + * + * We use this copy for the default boot device, because + * the original ROM may not be valid after boot. + */ + + printf("%s: Mapping BIOS shadow\n", __func__); + *size = VGA_PCI_BIOS_SHADOW_SIZE; + return (pmap_mapbios(VGA_PCI_BIOS_SHADOW_ADDR, *size)); + } +#endif + + printf("%s: Mapping PCI expansion ROM\n", __func__); + rid = PCIR_BIOS; + res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (res == NULL) { + return (NULL); + } + + *size = rman_get_size(res); + return (rman_get_virtual(res)); +} + +void +vga_pci_unmap_bios(device_t dev, void *bios) +{ + int rid; + struct resource *res; + + if (bios == NULL) { + return; + } + +#if defined(__amd64__) || defined(__i386__) || defined(__ia64__) + if (vga_pci_is_boot_display(dev)) { + /* We mapped the BIOS shadow copy located at 0xC0000. */ + printf("%s: Unmapping BIOS shadow\n", __func__); + pmap_unmapdev((vm_offset_t)bios, VGA_PCI_BIOS_SHADOW_SIZE); + + return; + } +#endif + + /* + * FIXME: We returned only the virtual address of the resource + * to the caller. Now, to get the resource struct back, we + * allocate it again: the struct exists once in memory in + * device softc. Therefore, we release twice now to release the + * reference we just obtained to get the structure back and the + * caller's reference. + */ + + printf("%s: Unmapping PCI expansion ROM\n", __func__); + rid = PCIR_BIOS; + res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + + KASSERT(res != NULL, + ("%s: Can't get BIOS resource back", __func__)); + KASSERT(bios == rman_get_virtual(res), + ("%s: Given BIOS address doesn't match " + "resource virtual address", __func__)); + + bus_release_resource(dev, SYS_RES_MEMORY, rid, bios); + bus_release_resource(dev, SYS_RES_MEMORY, rid, bios); +} + static int vga_pci_probe(device_t dev) { From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 18:23:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 81751988; Sun, 25 Aug 2013 18:23:16 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6E95D2B06; Sun, 25 Aug 2013 18:23:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PING8M061615; Sun, 25 Aug 2013 18:23:16 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PINGdW061614; Sun, 25 Aug 2013 18:23:16 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251823.r7PINGdW061614@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 18:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254883 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 18:23:16 -0000 Author: dumbbell Date: Sun Aug 25 18:23:15 2013 New Revision: 254883 URL: http://svnweb.freebsd.org/changeset/base/254883 Log: vga_pci: Remove left-over debugging printf()'s Modified: head/sys/dev/pci/vga_pci.c Modified: head/sys/dev/pci/vga_pci.c ============================================================================== --- head/sys/dev/pci/vga_pci.c Sun Aug 25 18:09:11 2013 (r254882) +++ head/sys/dev/pci/vga_pci.c Sun Aug 25 18:23:15 2013 (r254883) @@ -105,13 +105,11 @@ vga_pci_map_bios(device_t dev, size_t *s * the original ROM may not be valid after boot. */ - printf("%s: Mapping BIOS shadow\n", __func__); *size = VGA_PCI_BIOS_SHADOW_SIZE; return (pmap_mapbios(VGA_PCI_BIOS_SHADOW_ADDR, *size)); } #endif - printf("%s: Mapping PCI expansion ROM\n", __func__); rid = PCIR_BIOS; res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (res == NULL) { @@ -135,7 +133,6 @@ vga_pci_unmap_bios(device_t dev, void *b #if defined(__amd64__) || defined(__i386__) || defined(__ia64__) if (vga_pci_is_boot_display(dev)) { /* We mapped the BIOS shadow copy located at 0xC0000. */ - printf("%s: Unmapping BIOS shadow\n", __func__); pmap_unmapdev((vm_offset_t)bios, VGA_PCI_BIOS_SHADOW_SIZE); return; @@ -151,7 +148,6 @@ vga_pci_unmap_bios(device_t dev, void *b * caller's reference. */ - printf("%s: Unmapping PCI expansion ROM\n", __func__); rid = PCIR_BIOS; res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 19:10:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 37304299; Sun, 25 Aug 2013 19:10:22 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0C2672D52; Sun, 25 Aug 2013 19:10:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PJALGI086458; Sun, 25 Aug 2013 19:10:21 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PJALEe086457; Sun, 25 Aug 2013 19:10:21 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251910.r7PJALEe086457@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 19:10:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r254884 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 19:10:22 -0000 Author: dumbbell Date: Sun Aug 25 19:10:21 2013 New Revision: 254884 URL: http://svnweb.freebsd.org/changeset/base/254884 Log: Increase limit in preparation of the Radeon KMS driver import Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Sun Aug 25 18:23:15 2013 (r254883) +++ svnadmin/conf/sizelimit.conf Sun Aug 25 19:10:21 2013 (r254884) @@ -22,6 +22,7 @@ brooks des dim +dumbbell ed gnn gonzo From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 19:37:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CBB4A5A3; Sun, 25 Aug 2013 19:37:16 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B34B72E44; Sun, 25 Aug 2013 19:37:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PJbGAY099866; Sun, 25 Aug 2013 19:37:16 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PJbGPl099859; Sun, 25 Aug 2013 19:37:16 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251937.r7PJbGPl099859@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 19:37:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254885 - in head: sys/contrib/dev/drm2 sys/contrib/dev/drm2/radeonkmsfw sys/dev/drm2 sys/dev/drm2/radeon sys/dev/drm2/radeon/reg_srcs sys/modules/drm2 sys/modules/drm2/drm2 sys/modules... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 19:37:16 -0000 Author: dumbbell Date: Sun Aug 25 19:37:15 2013 New Revision: 254885 URL: http://svnweb.freebsd.org/changeset/base/254885 Log: drm/radeon: Import the Radeon KMS driver This driver is based on Linux 3.8 and a previous effort by kan@. More informations about this project can be found on the FreeBSD wiki: https://wiki.freebsd.org/AMD_GPU The driver is split into: sys/dev/drm2: The driver sources. sys/modules/drm2/radeonkmw: The driver main kernel module's Makefile. sys/modules/drm2/radeonkmsfw: All firmware kernel module Makefiles. There's one directory and one Makefile for each firmware. sys/contrib/dev/drm2/radeonkmsfw: All firmware binary sources. tools/tools/drm/radeon Tools to update firmwares or regenerate some headers. Merging the driver to FreeBSD 9.x may be possible but not a priority for now. Help from: kib@, kan@ Tested by: avg@, kwm@, ray@, Alexander Yerenkow , Anders Bolt-Evensen , Denis Djubajlo , J.R. Oldroyd , Mikaël Urankar , Pierre-Emmanuel Pédron , Sam Fourman Jr. , Wade , (probably other I forgot...) HW donations: kyzh, Yakaz Added: head/sys/contrib/dev/drm2/ head/sys/contrib/dev/drm2/radeonkmsfw/ head/sys/contrib/dev/drm2/radeonkmsfw/ARUBA_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/ARUBA_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/ARUBA_rlc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/BARTS_mc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/BARTS_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/BARTS_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/BTC_rlc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/CAICOS_mc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/CAICOS_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/CAICOS_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/CAYMAN_mc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/CAYMAN_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/CAYMAN_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/CAYMAN_rlc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/CEDAR_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/CEDAR_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/CEDAR_rlc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/CYPRESS_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/CYPRESS_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/CYPRESS_rlc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/CYPRESS_uvd.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/HAINAN_ce.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/HAINAN_mc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/HAINAN_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/HAINAN_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/HAINAN_rlc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/JUNIPER_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/JUNIPER_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/JUNIPER_rlc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/LICENSE.radeon head/sys/contrib/dev/drm2/radeonkmsfw/Makefile (contents, props changed) head/sys/contrib/dev/drm2/radeonkmsfw/OLAND_ce.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/OLAND_mc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/OLAND_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/OLAND_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/OLAND_rlc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/PALM_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/PALM_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/PITCAIRN_ce.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/PITCAIRN_mc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/PITCAIRN_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/PITCAIRN_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/PITCAIRN_rlc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/R100_cp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/R200_cp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/R300_cp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/R420_cp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/R520_cp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/R600_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/R600_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/R600_rlc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/R700_rlc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/README (contents, props changed) head/sys/contrib/dev/drm2/radeonkmsfw/REDWOOD_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/REDWOOD_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/REDWOOD_rlc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RS600_cp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RS690_cp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RS780_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RS780_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RV610_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RV610_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RV620_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RV620_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RV630_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RV630_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RV635_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RV635_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RV670_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RV670_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RV710_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RV710_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RV710_uvd.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RV730_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RV730_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RV770_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/RV770_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/SUMO2_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/SUMO2_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/SUMO_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/SUMO_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/SUMO_rlc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/SUMO_uvd.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/TAHITI_ce.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/TAHITI_mc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/TAHITI_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/TAHITI_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/TAHITI_rlc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/TAHITI_uvd.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/TURKS_mc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/TURKS_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/TURKS_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/VERDE_ce.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/VERDE_mc.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/VERDE_me.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/VERDE_pfp.bin.uu head/sys/contrib/dev/drm2/radeonkmsfw/VERDE_rlc.bin.uu head/sys/dev/drm2/ati_pcigart.c (contents, props changed) head/sys/dev/drm2/radeon/ head/sys/dev/drm2/radeon/ObjectID.h (contents, props changed) head/sys/dev/drm2/radeon/README (contents, props changed) head/sys/dev/drm2/radeon/atom-bits.h (contents, props changed) head/sys/dev/drm2/radeon/atom-names.h (contents, props changed) head/sys/dev/drm2/radeon/atom-types.h (contents, props changed) head/sys/dev/drm2/radeon/atom.c (contents, props changed) head/sys/dev/drm2/radeon/atom.h (contents, props changed) head/sys/dev/drm2/radeon/atombios.h (contents, props changed) head/sys/dev/drm2/radeon/atombios_crtc.c (contents, props changed) head/sys/dev/drm2/radeon/atombios_dp.c (contents, props changed) head/sys/dev/drm2/radeon/atombios_encoders.c (contents, props changed) head/sys/dev/drm2/radeon/atombios_i2c.c (contents, props changed) head/sys/dev/drm2/radeon/avivod.h (contents, props changed) head/sys/dev/drm2/radeon/cayman_blit_shaders.c (contents, props changed) head/sys/dev/drm2/radeon/cayman_blit_shaders.h (contents, props changed) head/sys/dev/drm2/radeon/cayman_reg_safe.h (contents, props changed) head/sys/dev/drm2/radeon/evergreen.c (contents, props changed) head/sys/dev/drm2/radeon/evergreen_blit_kms.c (contents, props changed) head/sys/dev/drm2/radeon/evergreen_blit_shaders.c (contents, props changed) head/sys/dev/drm2/radeon/evergreen_blit_shaders.h (contents, props changed) head/sys/dev/drm2/radeon/evergreen_cs.c (contents, props changed) head/sys/dev/drm2/radeon/evergreen_hdmi.c (contents, props changed) head/sys/dev/drm2/radeon/evergreen_reg.h (contents, props changed) head/sys/dev/drm2/radeon/evergreen_reg_safe.h (contents, props changed) head/sys/dev/drm2/radeon/evergreend.h (contents, props changed) head/sys/dev/drm2/radeon/ni.c (contents, props changed) head/sys/dev/drm2/radeon/ni_reg.h (contents, props changed) head/sys/dev/drm2/radeon/nid.h (contents, props changed) head/sys/dev/drm2/radeon/r100.c (contents, props changed) head/sys/dev/drm2/radeon/r100_reg_safe.h (contents, props changed) head/sys/dev/drm2/radeon/r100_track.h (contents, props changed) head/sys/dev/drm2/radeon/r100d.h (contents, props changed) head/sys/dev/drm2/radeon/r200.c (contents, props changed) head/sys/dev/drm2/radeon/r200_reg_safe.h (contents, props changed) head/sys/dev/drm2/radeon/r300.c (contents, props changed) head/sys/dev/drm2/radeon/r300_cmdbuf.c (contents, props changed) head/sys/dev/drm2/radeon/r300_reg.h (contents, props changed) head/sys/dev/drm2/radeon/r300_reg_safe.h (contents, props changed) head/sys/dev/drm2/radeon/r300d.h (contents, props changed) head/sys/dev/drm2/radeon/r420.c (contents, props changed) head/sys/dev/drm2/radeon/r420_reg_safe.h (contents, props changed) head/sys/dev/drm2/radeon/r420d.h (contents, props changed) head/sys/dev/drm2/radeon/r500_reg.h (contents, props changed) head/sys/dev/drm2/radeon/r520.c (contents, props changed) head/sys/dev/drm2/radeon/r520d.h (contents, props changed) head/sys/dev/drm2/radeon/r600.c (contents, props changed) head/sys/dev/drm2/radeon/r600_audio.c (contents, props changed) head/sys/dev/drm2/radeon/r600_blit.c (contents, props changed) head/sys/dev/drm2/radeon/r600_blit_kms.c (contents, props changed) head/sys/dev/drm2/radeon/r600_blit_shaders.c (contents, props changed) head/sys/dev/drm2/radeon/r600_blit_shaders.h (contents, props changed) head/sys/dev/drm2/radeon/r600_cp.c (contents, props changed) head/sys/dev/drm2/radeon/r600_cp.h (contents, props changed) head/sys/dev/drm2/radeon/r600_cs.c (contents, props changed) head/sys/dev/drm2/radeon/r600_cs.h (contents, props changed) head/sys/dev/drm2/radeon/r600_hdmi.c (contents, props changed) head/sys/dev/drm2/radeon/r600_reg.h (contents, props changed) head/sys/dev/drm2/radeon/r600_reg_safe.h (contents, props changed) head/sys/dev/drm2/radeon/r600d.h (contents, props changed) head/sys/dev/drm2/radeon/radeon.h (contents, props changed) head/sys/dev/drm2/radeon/radeon_acpi.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_acpi.h (contents, props changed) head/sys/dev/drm2/radeon/radeon_agp.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_asic.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_asic.h (contents, props changed) head/sys/dev/drm2/radeon/radeon_atombios.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_atpx_handler.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_benchmark.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_bios.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_blit_common.h (contents, props changed) head/sys/dev/drm2/radeon/radeon_clocks.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_combios.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_connectors.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_cp.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_cs.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_cursor.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_device.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_display.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_drm.h (contents, props changed) head/sys/dev/drm2/radeon/radeon_drv.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_drv.h (contents, props changed) head/sys/dev/drm2/radeon/radeon_encoders.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_family.h (contents, props changed) head/sys/dev/drm2/radeon/radeon_fb.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_fence.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_gart.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_gem.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_gem.h (contents, props changed) head/sys/dev/drm2/radeon/radeon_i2c.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_ioc32.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_irq.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_irq_kms.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_irq_kms.h (contents, props changed) head/sys/dev/drm2/radeon/radeon_kms.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_kms.h (contents, props changed) head/sys/dev/drm2/radeon/radeon_legacy_crtc.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_legacy_encoders.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_legacy_tv.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_mem.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_mode.h (contents, props changed) head/sys/dev/drm2/radeon/radeon_object.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_object.h (contents, props changed) head/sys/dev/drm2/radeon/radeon_pm.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_prime.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_reg.h (contents, props changed) head/sys/dev/drm2/radeon/radeon_ring.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_sa.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_semaphore.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_state.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_test.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_trace.h (contents, props changed) head/sys/dev/drm2/radeon/radeon_trace_points.c (contents, props changed) head/sys/dev/drm2/radeon/radeon_ttm.c (contents, props changed) head/sys/dev/drm2/radeon/reg_srcs/ head/sys/dev/drm2/radeon/reg_srcs/cayman (contents, props changed) head/sys/dev/drm2/radeon/reg_srcs/evergreen (contents, props changed) head/sys/dev/drm2/radeon/reg_srcs/r100 (contents, props changed) head/sys/dev/drm2/radeon/reg_srcs/r200 (contents, props changed) head/sys/dev/drm2/radeon/reg_srcs/r300 (contents, props changed) head/sys/dev/drm2/radeon/reg_srcs/r420 (contents, props changed) head/sys/dev/drm2/radeon/reg_srcs/r600 (contents, props changed) head/sys/dev/drm2/radeon/reg_srcs/rn50 (contents, props changed) head/sys/dev/drm2/radeon/reg_srcs/rs600 (contents, props changed) head/sys/dev/drm2/radeon/reg_srcs/rv515 (contents, props changed) head/sys/dev/drm2/radeon/rn50_reg_safe.h (contents, props changed) head/sys/dev/drm2/radeon/rs100d.h (contents, props changed) head/sys/dev/drm2/radeon/rs400.c (contents, props changed) head/sys/dev/drm2/radeon/rs400d.h (contents, props changed) head/sys/dev/drm2/radeon/rs600.c (contents, props changed) head/sys/dev/drm2/radeon/rs600_reg_safe.h (contents, props changed) head/sys/dev/drm2/radeon/rs600d.h (contents, props changed) head/sys/dev/drm2/radeon/rs690.c (contents, props changed) head/sys/dev/drm2/radeon/rs690d.h (contents, props changed) head/sys/dev/drm2/radeon/rv200d.h (contents, props changed) head/sys/dev/drm2/radeon/rv250d.h (contents, props changed) head/sys/dev/drm2/radeon/rv350d.h (contents, props changed) head/sys/dev/drm2/radeon/rv515.c (contents, props changed) head/sys/dev/drm2/radeon/rv515_reg_safe.h (contents, props changed) head/sys/dev/drm2/radeon/rv515d.h (contents, props changed) head/sys/dev/drm2/radeon/rv770.c (contents, props changed) head/sys/dev/drm2/radeon/rv770d.h (contents, props changed) head/sys/dev/drm2/radeon/si.c (contents, props changed) head/sys/dev/drm2/radeon/si_blit_shaders.c (contents, props changed) head/sys/dev/drm2/radeon/si_blit_shaders.h (contents, props changed) head/sys/dev/drm2/radeon/si_reg.h (contents, props changed) head/sys/dev/drm2/radeon/sid.h (contents, props changed) head/sys/modules/drm2/radeonkms/ head/sys/modules/drm2/radeonkms/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/ head/sys/modules/drm2/radeonkmsfw/ARUBA_me/ head/sys/modules/drm2/radeonkmsfw/ARUBA_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/ARUBA_pfp/ head/sys/modules/drm2/radeonkmsfw/ARUBA_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/ARUBA_rlc/ head/sys/modules/drm2/radeonkmsfw/ARUBA_rlc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/BARTS_mc/ head/sys/modules/drm2/radeonkmsfw/BARTS_mc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/BARTS_me/ head/sys/modules/drm2/radeonkmsfw/BARTS_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/BARTS_pfp/ head/sys/modules/drm2/radeonkmsfw/BARTS_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/BTC_rlc/ head/sys/modules/drm2/radeonkmsfw/BTC_rlc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/CAICOS_mc/ head/sys/modules/drm2/radeonkmsfw/CAICOS_mc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/CAICOS_me/ head/sys/modules/drm2/radeonkmsfw/CAICOS_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/CAICOS_pfp/ head/sys/modules/drm2/radeonkmsfw/CAICOS_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/CAYMAN_mc/ head/sys/modules/drm2/radeonkmsfw/CAYMAN_mc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/CAYMAN_me/ head/sys/modules/drm2/radeonkmsfw/CAYMAN_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/CAYMAN_pfp/ head/sys/modules/drm2/radeonkmsfw/CAYMAN_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/CAYMAN_rlc/ head/sys/modules/drm2/radeonkmsfw/CAYMAN_rlc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/CEDAR_me/ head/sys/modules/drm2/radeonkmsfw/CEDAR_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/CEDAR_pfp/ head/sys/modules/drm2/radeonkmsfw/CEDAR_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/CEDAR_rlc/ head/sys/modules/drm2/radeonkmsfw/CEDAR_rlc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/CYPRESS_me/ head/sys/modules/drm2/radeonkmsfw/CYPRESS_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/CYPRESS_pfp/ head/sys/modules/drm2/radeonkmsfw/CYPRESS_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/CYPRESS_rlc/ head/sys/modules/drm2/radeonkmsfw/CYPRESS_rlc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/CYPRESS_uvd/ head/sys/modules/drm2/radeonkmsfw/CYPRESS_uvd/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/HAINAN_ce/ head/sys/modules/drm2/radeonkmsfw/HAINAN_ce/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/HAINAN_mc/ head/sys/modules/drm2/radeonkmsfw/HAINAN_mc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/HAINAN_me/ head/sys/modules/drm2/radeonkmsfw/HAINAN_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/HAINAN_pfp/ head/sys/modules/drm2/radeonkmsfw/HAINAN_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/HAINAN_rlc/ head/sys/modules/drm2/radeonkmsfw/HAINAN_rlc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/JUNIPER_me/ head/sys/modules/drm2/radeonkmsfw/JUNIPER_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/JUNIPER_pfp/ head/sys/modules/drm2/radeonkmsfw/JUNIPER_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/JUNIPER_rlc/ head/sys/modules/drm2/radeonkmsfw/JUNIPER_rlc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/Makefile.inc (contents, props changed) head/sys/modules/drm2/radeonkmsfw/OLAND_ce/ head/sys/modules/drm2/radeonkmsfw/OLAND_ce/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/OLAND_mc/ head/sys/modules/drm2/radeonkmsfw/OLAND_mc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/OLAND_me/ head/sys/modules/drm2/radeonkmsfw/OLAND_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/OLAND_pfp/ head/sys/modules/drm2/radeonkmsfw/OLAND_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/OLAND_rlc/ head/sys/modules/drm2/radeonkmsfw/OLAND_rlc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/PALM_me/ head/sys/modules/drm2/radeonkmsfw/PALM_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/PALM_pfp/ head/sys/modules/drm2/radeonkmsfw/PALM_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/PITCAIRN_ce/ head/sys/modules/drm2/radeonkmsfw/PITCAIRN_ce/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/PITCAIRN_mc/ head/sys/modules/drm2/radeonkmsfw/PITCAIRN_mc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/PITCAIRN_me/ head/sys/modules/drm2/radeonkmsfw/PITCAIRN_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/PITCAIRN_pfp/ head/sys/modules/drm2/radeonkmsfw/PITCAIRN_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/PITCAIRN_rlc/ head/sys/modules/drm2/radeonkmsfw/PITCAIRN_rlc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/R100_cp/ head/sys/modules/drm2/radeonkmsfw/R100_cp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/R200_cp/ head/sys/modules/drm2/radeonkmsfw/R200_cp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/R300_cp/ head/sys/modules/drm2/radeonkmsfw/R300_cp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/R420_cp/ head/sys/modules/drm2/radeonkmsfw/R420_cp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/R520_cp/ head/sys/modules/drm2/radeonkmsfw/R520_cp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/R600_me/ head/sys/modules/drm2/radeonkmsfw/R600_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/R600_pfp/ head/sys/modules/drm2/radeonkmsfw/R600_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/R600_rlc/ head/sys/modules/drm2/radeonkmsfw/R600_rlc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/R700_rlc/ head/sys/modules/drm2/radeonkmsfw/R700_rlc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/REDWOOD_me/ head/sys/modules/drm2/radeonkmsfw/REDWOOD_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/REDWOOD_pfp/ head/sys/modules/drm2/radeonkmsfw/REDWOOD_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/REDWOOD_rlc/ head/sys/modules/drm2/radeonkmsfw/REDWOOD_rlc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RS600_cp/ head/sys/modules/drm2/radeonkmsfw/RS600_cp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RS690_cp/ head/sys/modules/drm2/radeonkmsfw/RS690_cp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RS780_me/ head/sys/modules/drm2/radeonkmsfw/RS780_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RS780_pfp/ head/sys/modules/drm2/radeonkmsfw/RS780_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RV610_me/ head/sys/modules/drm2/radeonkmsfw/RV610_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RV610_pfp/ head/sys/modules/drm2/radeonkmsfw/RV610_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RV620_me/ head/sys/modules/drm2/radeonkmsfw/RV620_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RV620_pfp/ head/sys/modules/drm2/radeonkmsfw/RV620_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RV630_me/ head/sys/modules/drm2/radeonkmsfw/RV630_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RV630_pfp/ head/sys/modules/drm2/radeonkmsfw/RV630_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RV635_me/ head/sys/modules/drm2/radeonkmsfw/RV635_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RV635_pfp/ head/sys/modules/drm2/radeonkmsfw/RV635_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RV670_me/ head/sys/modules/drm2/radeonkmsfw/RV670_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RV670_pfp/ head/sys/modules/drm2/radeonkmsfw/RV670_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RV710_me/ head/sys/modules/drm2/radeonkmsfw/RV710_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RV710_pfp/ head/sys/modules/drm2/radeonkmsfw/RV710_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RV710_uvd/ head/sys/modules/drm2/radeonkmsfw/RV710_uvd/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RV730_me/ head/sys/modules/drm2/radeonkmsfw/RV730_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RV730_pfp/ head/sys/modules/drm2/radeonkmsfw/RV730_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RV770_me/ head/sys/modules/drm2/radeonkmsfw/RV770_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/RV770_pfp/ head/sys/modules/drm2/radeonkmsfw/RV770_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/SUMO2_me/ head/sys/modules/drm2/radeonkmsfw/SUMO2_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/SUMO2_pfp/ head/sys/modules/drm2/radeonkmsfw/SUMO2_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/SUMO_me/ head/sys/modules/drm2/radeonkmsfw/SUMO_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/SUMO_pfp/ head/sys/modules/drm2/radeonkmsfw/SUMO_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/SUMO_rlc/ head/sys/modules/drm2/radeonkmsfw/SUMO_rlc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/SUMO_uvd/ head/sys/modules/drm2/radeonkmsfw/SUMO_uvd/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/TAHITI_ce/ head/sys/modules/drm2/radeonkmsfw/TAHITI_ce/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/TAHITI_mc/ head/sys/modules/drm2/radeonkmsfw/TAHITI_mc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/TAHITI_me/ head/sys/modules/drm2/radeonkmsfw/TAHITI_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/TAHITI_pfp/ head/sys/modules/drm2/radeonkmsfw/TAHITI_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/TAHITI_rlc/ head/sys/modules/drm2/radeonkmsfw/TAHITI_rlc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/TAHITI_uvd/ head/sys/modules/drm2/radeonkmsfw/TAHITI_uvd/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/TURKS_mc/ head/sys/modules/drm2/radeonkmsfw/TURKS_mc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/TURKS_me/ head/sys/modules/drm2/radeonkmsfw/TURKS_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/TURKS_pfp/ head/sys/modules/drm2/radeonkmsfw/TURKS_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/VERDE_ce/ head/sys/modules/drm2/radeonkmsfw/VERDE_ce/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/VERDE_mc/ head/sys/modules/drm2/radeonkmsfw/VERDE_mc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/VERDE_me/ head/sys/modules/drm2/radeonkmsfw/VERDE_me/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/VERDE_pfp/ head/sys/modules/drm2/radeonkmsfw/VERDE_pfp/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/VERDE_rlc/ head/sys/modules/drm2/radeonkmsfw/VERDE_rlc/Makefile (contents, props changed) head/sys/modules/drm2/radeonkmsfw/gen-makefiles (contents, props changed) head/tools/tools/drm/radeon/ head/tools/tools/drm/radeon/README (contents, props changed) head/tools/tools/drm/radeon/firmwares/ head/tools/tools/drm/radeon/firmwares/README (contents, props changed) head/tools/tools/drm/radeon/firmwares/encode-firmwares (contents, props changed) head/tools/tools/drm/radeon/mkregtable/ head/tools/tools/drm/radeon/mkregtable/Makefile (contents, props changed) head/tools/tools/drm/radeon/mkregtable/README (contents, props changed) head/tools/tools/drm/radeon/mkregtable/mkregtable.c (contents, props changed) Modified: head/sys/modules/drm2/Makefile head/sys/modules/drm2/drm2/Makefile head/tools/tools/drm/README Added: head/sys/contrib/dev/drm2/radeonkmsfw/ARUBA_me.bin.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/drm2/radeonkmsfw/ARUBA_me.bin.uu Sun Aug 25 19:37:15 2013 (r254885) @@ -0,0 +1,197 @@ +begin 644 ARUBA_me.bin +MQ`@`,<`.``'`$``'F(``#`04!``$&```V```3=@!H-K8`:#9"1```=@``$W- +ME:'T!50$``68``&9`/_[?$"``8P``/Q!0` +M"95```+90:*DQ!L`*M@``%;-@`!4P#X`!,P!H?3,/2`$Q#T``\P``$?80`!6 +MV$``7H````_$#``*!#P`(Y3```+/P:*DQ!L`*]@``%;-@`!5P#X`!,P!H?/, +M/2`$Q#T``\P``$G80`!6V$``7H````\$/``CS\&BI,P``$O8``!5S$``8X`` +M``_,``!&S```2\Q!(F3,02)ES$$B9LQ!HMU\0(`!S(``38@```#,0`!&S``` +M2XP`!:3,02)DS$$B9S4&@VL0@`#*6 +M```3V$``4\0X``K80`!=Q#P`+"?\``*7P/_^EX```P0\`"//P:*DQ#\`*\_` +M`%7`/@`$S`&A\\P](`3$/0`#S```2=A``%[-0:#:F8```LP``$+-0`!A@``` +M#]@``$A\0,`!Q"0`,234`/^:0``#V```5-@``$?$(``RE@``!-A``%/8``!5 +MV```2=A``&3-0`!A@```#WQ`P`$8T`'H&-0`,!C8`#0%*`%T?$(``7Q"0`&5 +M```'AH```(```8Z```6@@``!LH``!:"```&$$50`$'X6``K,@`!-U&$``)6` +M_I'`.@`$S#DA0,0Y``-\0(`!B````!%4`!!2)``@?B8`&LU``%C48@``E8#^ +MAL0@`!R:`/__?$"``8@```#<.@``F4``&R><``&5P``-"[@``0`0)9`__[, +MP2%US0$A=L0@`!.6`/__%B@``9J```/,``!.@```#\P``$[,P2%U@``!SGQ` +MP`%\00`!S```1``*```'YP"(`!'X6``K,(0``Q!T``WQ"0`%\ +M0H`!F,```\WE``"````/SD$A:` +M`!TF9`#_@``"7W\;@`X4I``(EX``&"9D`/^```)??QN`#!2D``B;@``3)F0` +M_X```E]_&X`-%*0`")N```XF9`#_@``"7W\;@`\4I``(FX``"29D`/^```)? +M?QN`#A2D``B;@``$)F0`_X```E\4I``()F0`_S)H`#P4[``(FH#]O7Q#0`%\ +M0X`!?$/````$5%``2P"(``L`F``250``$P"?_ +M^WTE``G`)@``?=*`"7X2P`E])0`*?$%``7Q!@`',P2%IS0$A:IJ```?-02%K +MS8$A;);`_9C$,``5EP#__X````_(%``455@`(,U!(6O-@2%LEL#]D(```GA\ +M00`!?$%````8S\`#X<^``^(2L``"?S\` +M`<\``^-\@,`!@``$CWQ`P`$8T`'H!2@"GY4```B&@```@``"J(```K:```*\ +M@``"PH```L>```+-S,&BI(````_`$@@`?$%``7Q"``%]#,`*P!(`!!58``,5 +M7``-?='`"1(@`!-^'D`*?DZ`"LZ!HJ3-@:'^@```#P00(1C$%``0E4#__]11 +M``#,P:*D@```#P00(0;$%``1E4#__]11``#,P:*D@```#]A``!;,P:*DQ!`` +M%ID`__^````/!!`A`,04`!*50/__U%$``,S!HJ2````/)-@``7Q!``%\04`! +M?$(``96```81F``0Q!P`"L0\`">7P/__@``"VQ&8`!#$'``)Q#P`*)?`__\5 +M:``=?5E`"A'D``J:@``#?B8`"LW``%S-`2%8S4$A6````/)'0` +M`21X``+$#``?FT```HP``WO$%``A!!``$)N```*,``.5S,&B4,T!H%`$&`0` +MC``#1,P``%G$/``CQ!``'XP``U3$'``E)=P``<@X`":5P``%Q#P`(T>X!5#, +M``!8S_H``,0D`!V:0/__!#```<0H`!D^J``$Q"P`&GZN@`J:@/_\SP``45#8 +M``@4W``8*=R``,V!(8#-P2&!42``"!4D`!@3,``>?G)`"LX!(8+.02&#S4$A +MA'Q`@`',@`!-B````"1T``$D>``"Q`P`()M```*,``-[Q!0`(@00`!";@``" +MC``#EFD#__\0H`!D^J``$Q"P`&WZN +M@`J:@/_\!#```H```Q(%F,``$-P`"!3@`!C-V0``Q!P`&,W9``'$)``8?F)` +M"LY9``+$'``8Q"``&,0D`!C-V0`#SAD`!,Y9``>0````&_@`\,`V"`#`,`"` +MEX```I````#8``!=Q#@`+">X``&7@/_^P"H`!,08`"_/02%\SP$A?\V!(6W-P2%NQ!H``H``!'M\0,`!Q!,#X,07`^/$&P/A +MQ!\#XLV!(6G-P2%JS,$A:\P!(6P$(``$?:&``7V60`S-@`/AED#[="4H``/` +M+?``$1@`"'VM@`E]J8`*S8`#X8````\DC/__U$T``'Q`@`',@`!-B````'Q` +MP`$8U``P&-`!Z!C\`#0DS``/!.@$L7Q!@`%\0<`!E,``,H:```"```2Z@``% +MH(``!,6```31@``$MU'<`"!]G@`:@``$\\V!(6W-P2%N!9@`!,0B``*50``U +MS8$A;6P``#S```08`` +M!.@$+```!#```)K```27```#S```08``!.@$+```!#```)K```.7```"S``` +M08``!.@YK`<&/;`'`,0T`!>:P``#EP```LP``$'`.@`$?;F`"LP9```%F``! +MQ"$``Y5```7,&0``Q"4``U)D`"!^)@`:ST``%\R``$T%*`3X?$&``7Q!P`&5 +M```'AH```(``!2Z```6@@``%.8``!1&```4B.:P'!CVP!P#$-``7FL```Y<` +M``+,``!!SAD``)5```0%F``!5B0`(,Y9``"7P``$P#H`!,PY(4#$.0`#ST`` +M%WQ`@`',@`!-B````#&L"`#$-``7EL```\P``$&```4$!"P```0P``":P``$ +MEP```\P``$&```4$!"P```0P``":P``#EP```LP``$&```4$49P`('V=@!K8 +M``!8SAH``)5```0%F``$5B0`(,Y:``";P`!@?$"``LT!(7[`*@`$)53__SEP``-!7``"FP```@0<`$`)W``! +MF<#__\PI(7_$)0`#%FP`'T%<``+,@`!-FL#_^13\`!_8``!>F\#ZD\00`#', +M$`/W@```#WQ`P`%\00`!%1@`'U$4`"`9'``QF8``",T``%A]34`:U%8``)7` +M^H;$(``@6``'P$C@!]!9D`?@6<``\%H``/!:`` +M#P6@``\%H``/!:``#P6@``\%H``/!:``#P6@``\%H``/!:``#P6@``\%H``/ +M!:``#P6@``\%H``/!:``#P6@``\%H``/!:``#P6@``\%H``/!:``#P6@``\% +MH``/!:``#P6@``\%H``/!:``#P6@``\%H``/!:``#P6@``\%H``/!:``#P6@ +M``\%H``/!:``#P6@``\%H``/!:``#P6@``\%H``/!:``#P6@``\%H``/!:`` +3#P6@``\%H``/!:``#P6@``\%H``` +` +end Added: head/sys/contrib/dev/drm2/radeonkmsfw/ARUBA_pfp.bin.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/drm2/radeonkmsfw/ARUBA_pfp.bin.uu Sun Aug 25 19:37:15 2013 (r254885) @@ -0,0 +1,197 @@ +begin 644 ARUBA_pfp.bin +M?$"``8@```#,@`!`U$``0'Q`@`&(````$$P``220``)\04`!4%@`('V5P!J8 +MP``#T<``&(````"9```#T<``&8````#1P``:@````"2,``+,@`!`S$``0)C` +M``/,``!2@``$(B7@``$V$`# +M]\0X`_>;@/__Q!P`$YG`__\B4P``"!50`!B@0``%]%0`$?9&`"8```,N90/_X +MQ!P`!9 +M`/YBQ!P`!LP``%3-P`!`S```0(````+$%``/Q!P`!)E`_EK,``!2S<``0,P` +M`$#$)``^FD#^57Q`P`%04``@?0U`&M%``!?,``!B@````,`W__\@B`!P@``! +MN'Q#0`'('``7Q!@`%L]#HIY\04`!?5C`!'S?$#``7Q!``%\04`!S,.A^LT#H?G- +M0Z*=S,``0,T``$#-0`!`S$``0'Q`@`&(````?$#``230``',PZ*?V$``%I4` +M``+8@``6S(``0,S``$"`````?$#````2\P``$Z```0AS```39K```+,``!.EX#]5`NX``'$ +M/P`#FX#__8````#,``!.ED```\P``$*```0AV@``0L0+``/$#P`#Q!,``\07 +M``/$&P`#Q!\``\0G``/$*P`#%?P`'Q:P`!]_\\`)%/``'W_SP`D5<``??_/` +M"7V(@`)]S,`"E\``#'Y1``)^E4`"?)"`#'S4P`Q\CT`)FL```BRT``',``!- +MFT`!4F0``!/5@``IF`__[,``!= +M*1R``,S!(87-P2&&%10`'\Q!(8?,02&(S$$AB95`_,_$%``>F4#__X````#, +M@`!`S,``0,T``$#40`!`@````,0H`"S8:`/WS(``0,Q``$#&CP/WF,#__WQ` +M@`&(````Q"@`+,0L`!'$,``O?O+`"IJ```?$,``/FP``!<0T``3,``!2ST`` +M0,P``$":P``%Q#0`!LP``%3/0`!`S```0'Q`P`'8:`/WS(``0,S``$#40`!` +M%-``'YD``,F```,^S(``0,Q``$#,0`!`S$``0'Q`P`',P``5S,``0-1``$#8 +M``/V@````'Q`P`$4W``=&-@`/,R``$"9P``%S,``0)F`_);,``!A@``$(F0``!``!\0@`!?$)``7Q!@`%]Y<`)?>*`#T&L``*:@/PO!NP` +M`PKL``&:P/__)-P`$)G```/%'0``@``#SL4>``"```/.S(``0,S``$#40`!` +M@````,0<``3-P`!`S```0,R``$#40`!`?$"``8@```#$'``%S<``0,P``$#, +M@`!`U$``0'Q`@`&(````?$#``230``8Q$``&Q!0`#YD```C,``!2Q"0`/I9` +M`#&90``$Q!P`!,W``$#,``!`S(``0,S``$#40`!`@````'Q`P`%\00`!%1@` +M'\T``%I1%``@F8```]1-``"`````?4U`&AD<`#'45@``Q"``'Y7`^_?$(``? +MF@#__X````!\0,`!%-``'R34`/^5```#S%0#`(````#,@`!`S,``0,Q``$"` +M````Q"``+'Q`P`'$TP,`S(``0,S``$#,``!:S2$A08````#40`!_@````,0D +M`#Z60``#?$"``8@```"```0E```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````P/?``0#Y@`%`?(`!@$9``68P`/J +M(`@``2J,`>3((`)!?.#`!IC`!!H@"``!S(```X```IH`````B`````````#` +M"```A``"9P````#(#`!Y',S__\`()-6(`````````,@)/3;(#3TWE,`"L@`` +M``#($3TXR!4].<@=/3K((3T[R"4]-02H`##.@3V"S,$]@\T!/83-03V%S<$] +MALX!/8<0B``#!(P`&,B6`#R50`*AR-(`*'TE``$)5``!!,P`*)D`__L````` +MR)(`.`40`$!]"L``R-8`!,`<``3(X@`4R.8`),X*`4S.;@%,",P`!`B(``0* +M[``$"=P``9G`__@`````S0H!8,P*`63-03U'@``"]`````"(`````````(`` +M!*#`,`'!R"@`!9:``2@`````(`@``H0``?(P````"(`````````,^<`!;-@``.R?``&7\X@`R4@/_^`````(@````` +M````R#@"0P>X``'+B```P`PA@(````?4%`"\C4```$S``!!B```1U8`/]]D8`2?9V``WR9@!&5 +M@``U'5C_`!68``A]D8`2?9V``WR9@`^5@``O`````!54`!"60``#`````!54 +M``@=5`#_B`````````#`,/__R(P``'SQ``:5`/\X!(@``$```G<``<)W``$("```#X8`!"5@/_#`````(`` +M`/D@%`!`R"@``9:`_P``````(`@````[8@"``` +MS``"`,P``@'`-`.1(!```"`(``/--0``P#`AC2`,``',\0``P#`ACB#,/__, +M\0``!1```0B(``&8@/_WP#`AML`*%`#,L0``S#4``,@(`$````&% +M1(@`!,P``@.$``!]$;@`'X```:0`````R"@`*I:``RL`````S8``#H0``5X` +M````@``!I"`8``',```.S```#B`H`<,@'```R`@"!7^+@`?("`(!E(`!10`` +M``"```(\`````,@(`B[(B```?`F`!R`<```@+```P"``!I5``!1\KT`$?.Z` +M!!]T``%_:T`&?2Z`!!ZH``$JJ```?VM`!I=```<`````(#```7\O``-]L8`( +M"50``07<``$*(``!!NP``9H`_^X`````R"`"+H@```#-H```P`@#((0``],` +M````R`@"&WU(@!#,@`(DS4`"&X0``IX`````R`@"''U(@!#,@`(EB````,U` +M`AS)(0``'BC__Q8@`!!^HH``B`````````#("`(`E(#_Q`````#(*`!`P"X( +M`'ZN@`:6@/^_(!@``<@H`"R6@/\E`````,@H`'C.@`(L@``!#2`8``&(```` +M`````(@`````````(`P``,`0``8```/`.``0SX``1\@(`@"4@``/ +MR`@"`92```T`````R`@`"I2```H`````S8``#L@X`&G(-`!JSWD``,NU``#` +M.`_LSWD``,P```X@'```R`@"`92``>4`````R"@``):``>(@"``!S8``#L@, +M`"#,@```'!P``"J(`;N4@``R`````(``!$4`````P`PCFLR-``#`#".8B``` +M`,R-``#`,"`#S[$``(@```#+.0``'0P!`)3``-3`,#VORPT``!S,``*4P`#0 +MP#`]-,L-``"8P`)W``````````#("`)$!(@``R`P"'<@0`AY\T4`1F4```P`` +M``!]`,`'A``$8LS``B.(`````````"`X``'/@``#S``"`<@(`!R4@/],```` +M`,V```X`````(`P``X0``'T0^``>A```<"`X``+,,0``R`@"`)B```0````` +MA``$,@````"$``)L(#@```_M;(.`)"FX``!`````"$``3/`````,@X`$X +M``0$B``!RXX``,S(``!'N``$!(@``QW<``&9P``.R"`"),@D`B5^)<`'R"`"&\@D +M`B8>:/__?BJ`$'WIP`?((`(<%F@`$'XJ0!!]Y<`'F<``&"`<`$!]S,`!?-G` +M$A7<``;((`(U?Z(`$)8``!'((`(U?Z(``7WA0!"90``#`````'W"``?`%`(I +MS4`"+L@,`A?($`!Z'1#__R`4``2$``&N`````,`X``+/@`(AB`````````#( +M#`(#E,``"P`````@#``!A```?1#X`!Z$``5-(`P``80``FP@.```FX#^S``` +M``"$``!]$;@`'X0``FP@.``!A``%32`,``#`,`'`RSD``"`X``"5P/UYSX`` +M`WW!P`:$``!](#@``(```:3/@``#(`P``X0``'T0^``>A``";"`X``+()`)` +MFD#_$`````"$``.C(`@"2(```TL`````R"@``I:`_.<@"``!S8``#LR```*` +M``*:`````,P``"G-@`(#A```?2`X``"```&E`````,G,`@.4P`"C(`@``,`, +M(;;(T0``P`H4`'T)``:9``"=(`@``"`,``&$``!]$/@`'H0``FP@.``"EX`` +MEB`(``#()`)`FD#\TP````"$``#[(`@"2(```3,`````*-``0)D`_['(.`(A +M.-P`0)7`_X=_@8`'",P`0'S9P!(5W``&R"`"'WXZ``'(#`(7P!0"*`__T`````B``````` +M``"(`````````,`0(`O`%```P!;``,U1``#)%0``P##__\B.``!\\0`&E0#] +M.T2(``3(E@``S5$``!3,`!!\\0`&E0#]-42(``3(E@``S5$``(``!+%$B``$ +MP`@AH,B-```4S``6',P``9C`__T`````B`````````#(*``KEH#_'0````#- +M@``.A```.`````"```&D(!@``<@X`$B;@/[K4[@`"(@`````````'J@`_\S` +M``O.@``,B`````````#+B@``P`PA@#P3,``',C`('P`I@8""(*!X$S``!S(P" +M!\`*8&`@B#(H!,P```3,``',C`('P`K_ +M_R"(@'T$S``!S(P"!\`*`$`@B``0S(`")LP``BW`"``"S(`"-@``V@I``-H +M+0`#P00``\$5``-IZ``#:>P``^@```/HT``",$\``VCD``/!W@`",$\``VD$ +M``-`+``#_P```K0"``)$!```HA8``TG6``*U$``"1%L``Z1&``"B&``"H$X` +M`_`#``(T:@`#]````<#%``/T```!TW(``T`.``#R0``#Z/```Z"V``-)U0`` +M^A$``K$/``)"%P`"I2```_`!``#Z0``"0QL``J4C``/P`0``\A$``T````-` +M+@`"MA```K0,```J0``"0B0``Z(B``)#-``";",``D9H``/P`P`"H%X``_`! +M``/HP```XA```T`(``*T````>A$``J`D``/P00`"L@@``J#^``/P00`"L@0` +M`K0_``)")```DB@``TJ4``/_```#8&P``T````/_```"M$```D0$``/P`P`# +MZ````((_``(B^@`#0````_\```*T0``"1!0``_`"``#R/P`"(OH``T````/_ +M```"M$```D04``/P`0`"+FX``TJ4``/_```#8'```T````/_```"M`(``D0D +M``/P`P`#Z````((_``(C,0`#0````_\```*T`@`"1#0``_`"``#R/P`"(S$` +M`TJ4``/_```#830``C-L``-````#_P```_\```)$#@`#\`,``^@```""/P`" +M)%H``C-L``-````#_P```_\```)$'@`#\`(``/(_``(D6@`"+JD``TJ4``/_ +M```#8'0``K````""*P`#0````_\```*T`@`"1$```_`#``/H````@C\``B89 +M``-*E``#_P```V!X``-````#_P```K0$``)$0``#\`,``^@```""/P`"*)P` +M`TJ4``/_```#8'P``T````/_```"M!```D1```/P#``#Z````((_``(I;``` +M`@T``_\```/_```"I`X``_`$``#R#@`"*6P``^@```""#@`#2I0``_\```-@ +MK``#0````_\```*T(``"1$```_`#``/H````@C\``BN$``-*E``#_P```V"P +M``/H````@C\``K#_``*Q_P`#P2```VA@``-H:``#0````_\```*T$``"1$`` +M`_!"``/T```"`8\``T`-``-`)@`"L4```K(0``*S"``"010``Z$:``)")``# +MHB0``F(A``)#.``#HS```F(C``"2*P`"I!X``_`)``-)/0`"LH```\`B``)$ +M0@`"*6P``TD]``/_```"LH```F1"```"$``#_P```K0!``)$!``#\`0``^@` +M``""/P`#P?X``BQ&```"$``#_P```K0"``)$!``#\`0``^@```""/P`#Z/`` +M`BQ&``-````#_P```_\```)$+@`#\`,``^@```""/P`"-7<``T````/_```" +MM!```D0D``/P`P`#Z````((_``(VJ0`#^`,``TJ4``/_```#8+0``K````"" +M*P`#0````_\```*T`@`"1$$``_`"``#R/P`")AD``TJ4``/_```#8+@``T`` +M``/_```"M`0``D1!``/P`@``\C\``BB<``-*E``#_P```V"\``-````#_P`` +M`K00``)$00`#\`L``/(_``(I;````@T``_\```/_```"I`X``_`$``#R#@`" +M*6P``^@```""#@`#2I0``_\```-@[``#0````_\```*T(``"1$$``_`"``#R +M/P`"*X0``TJ4``/_```#8/```/(_``*P_P`"L?\``\$@``-H8``#:&@``T`` +M``/_```"M!```D1!``/P0@`#]````@(.``-`#0`#0"8``K%```*R$``"LP@` +M`D$4``.A&@`"0B0``Z(D``)B(0`"0S@``Z,P``)B(P``DBL``J0>``/P"0`# +M23T``K*```/`(@`"1$(``BEL``-)/0`#_P```K*```)D0@```A```_\```*T +M!``"1`0``_`#``#R/P`#P?X``BQ&```"$``#_P```K0(``)$!``#\`,``/(_ +M``/H\``"+$8``T````/_```#_P```D0^``/P`@``\C\``C5W``-````#_P`` +M`K00``)$-``#\`(``/(_``(VJ0`#2I0``_\```-@]``#^`,```(8``/_```# +M_P```J`.``/P0@`#]````@)L``-`+``#_P```K0@``)`0``"H`0``_!(``/H +M````@C\``C((``(R30``\C\``C((``(R30`",N0``T````/_```"M`@``D0$ +M``/P#``#2`@``_\```*T0``"8`0``V@(``-)F``"M/T``D$4``-IF``#Z#`` +M`\$N``-H,``",O@``^@```/H$``#Z#```K(#``-H,``#0````_\```*U"``" +M114``_`!``(TUP`#2I0``_\```-@^````D```_\```/_```"H0X``_`"``/H +M````@A0``BZI``-(```#2`4```HT```".```$C,``"HZ```Z-@`#_P```V@` +M``-H!0`#2!```TG=```*-P``*CD``_\```-H$``#:=T``TEQ``*R`0`#Z#`` +M`\$&``/!%P`#:#```TEL``*U%@`"H%$``<*?``*PSP`"L04``K(!``*S```# +M:#```C+X``*PM``#:#```C+X``*PO``#:#```C+X``*PN``#:#```C+X``*P +MRP`#:#```C+X``*PC``#:#```C+X``*PT0`#:#```C+X``/H```#Z!```K(# +M``*S```#:#````(8``/_```#_P```J`.``/P0@`#]````<`````!]``#0!(` +M`T`5```*&P`"H`X``_`"``/T```!PL\``L$>``"*&P`":[H``F5;``+&;@`# +M\$$``L=^``-@%0`"L@\``D1"``*E%``#\`<``^B@``/HL``#8!(``^@```"! +M]``#]````P`#P?```BY[``/!\``"+GL``T`@``/_```# +M_P```L`.``/P10`"P1X``_!#``+"+@`#\$$``L,^``-@(``",VP``TE(``*T +M/P`"M8```D,T``)C-0`#:4@``D,T``-I2``#]````<````-`!```:C\``^B` +M``/HD``#Z*```^BP``*U$``"1!4``_`&``*@W@`#\`,``V2J``/T```#\$$` +M`V3J``/X`0`"M0@``D0%``(#'```8?@``J#>``/P`P`#Z$```_0```/P00`# +MA.H``]A```/?<``_@#``/4G@`#^P```P_^``(#&``#^`$``X7D``)$ +M%0`"`R\``"'Y``*@W@`#\`,``&'Q``/T```#\$$``&'P``*_"``#W$```]C` +M``/X`P`#U)X``_L```,/_@`"`RL``_@#``/L`````A0```I```!J/P`#_P`` +M`D`!``*@#@`#\`$``^P```-).``"H-X``_!!``-*7``"N/X``D(H``*@W@`# +M\`,``VDX``/T```#\$$``VI<``-)T``"M`0``F$4``*R`0`"LQ(``J#>``/P +M00`"LQ$``V@P``-)<0`"N.\``KD$``/!!@`"87D``D,X``-H,``#2`D``KC] +M``)$2``#:`D``BY_``-)H``"M!$``\$D``*Q#P`#::```TI$``*T_@`"81X` +M`VI$``)!%``#:D0``J#>``/P`P`#0F$``_0```/P00`#0ET``_\```/_```# +MZ&```VFE``-H:P`"N@P``KC```/<@0`#V*$``K#X``*Q!P`#Z"```^@P``/^ +M```#U!\``VAK``/H\``"(_\``B/B``(D'``"H?X``_!!``-B>@`#0G@``_\` +M``/_```"H(```<.3``*@D0`!PY,``J"B``'#DP`"H+,``<.3``+/_@`"O`P` +M`J'\``/P0@`#]````<-]``#Z!``#Z/```B/B``(C_P`")!P``T)X``/_```# +M_P```J"```'#J0`"H)$``<.I``*@H@`!PZD``J"S``'#J0`"S_X``KP,``*A +M_``#\$(``_0```'#E@``8@0``/H#``/_```"I<\``<.Y``*E_``!P[0``^CP +M``/HP``#]````<.\``,,SP`#K,```^CP``/T```!P[P``P_\``.O\``#Z,`` +M`B/_``/!_``"(^(``TDX``*@W@`#\$$``TI<``/_```"8BX``J#>``/P`P`# +M:3@``_0```/P00`#:EP``TG0``*T^P`"010``K(!``*S$@`"H-X``_!!``*S +M$0`#:#```TEQ``*X[P`"N?L``\$&``)!>0`"0S@``V@P``-("0`"N/T``D1( +M``-H"0`"L!@``B1```/L```#1+D``J#>``/P00`#1/D``\$/``/!'P`#P2\` +M`\$_``/!3P`#P5\``J#>``/P!0`#9+```V2T``-DN0`#]````_!#``-D\``# +M9/0``V3Y``-(R``"M/,``K4$``)`!``"8`4``VC(``)`!``#:,@``^P```-$ +MN0`"H-X``_!!``-$^0`#P0\``\$?``/!+P`#P3\``\%O``/!?P`"H-X``_`% +M``-DK``#9+P``V2Y``/T```#\$,``V3L``-D_``#9/D``TC(``*T\P`"M00` +M`D`$``)@!0`#:,@``D`$``-HR``#[````K`0``(D0``",O@``C+X``(R^``" +M,O@``C+X``-*'``")$P``\&,``-*(``")$P``XS&``)HC``#2B0``B1,``/! +MG``#2B@``B1,``.,Q@`":9P``THL``(D3``#P:P``THP``(D3``#C,8``FJL +M``-*-``")$P``\&\``-*.``")$P``XS&``)KO``#[````VAK``*Y"``"N,`` +M`]R```/8D``#Z!```^@@``/H,``#_@```]0>``-H:P`#[````^C```.'/``# +MIW8``X8L``.F:``#A1P``Z5:``.$#``#I$P``FS'``)LQ@`";,4``FS$``/L +M````(@\``T`D``/_```"1$X``Z`&``*A#@`#\`$``(('``-)I``#2:$``&H_ +M``.+Z@`#P*L``D6E``*@W@`#\`,``D.C``/T```#\$$``F.S``-II``#::$` +M`K+_``*Q_P`"L'\``VA@``/H```#Z"```^@P``*@W@`#\`,```H)``/T```# +M\$$```H(``*XP``#:&L``]@```/<@``#U!X``K\"``(N>P`#@.```(($``"" +M`P`#Z````(("``""`0``\@```TA4``*@W@`#\`,``X3H``/T```#\$$``X3J +M``)B)``#:%0``TF8``.(Y0`#P3X``J#>``/P`0`#@S```\$N``)@"``#:#`` +M`TEU``.(Y@`"8&@``\$7``/!+@`#P3X``J#>``/P`0`#@S```V@P``-(5``" +MH-X``_`#``.$Z``#]````_!!``.$Z@`#P$0``D(D``-H5``"OP(``BY[```" +M&``#_P```_\```*@#@`#\`(``_0```($UP`",&$``^AP``.$Y@`"1DL``J!D +M``/P3P`#2=(``^A@``.*L@`#JJH``X2F``)D2@`#P50``J#>``/P`P`#:.4` +M`_0```/P00`#:04``_0```'%@@`"OP@``D_Y``.O]``#B[(``ZN\``(EI@`# +M]````@6"``-`#``#_P```K\(``)/\``#\$(``_0```'$]``"OP```KL!``(E +MI@```A$``_\```/_```"H`X``_!"``/T```!Q8(``K$"``*P$0`"Q$```L50 +M``*@W@`#\`,``VCE``/T```#\$$``VD%``,!'@`"!.D``/("``#R`0`"H-X` +M`_`#``!Z!@`#]````_!!``!Z!0`#C>(``]S0``/8\``#B>8``FF>``#Q\@`` +M0@<``^C0``./X``#P:@``XSM``#A]@``XCX``B_*``*W`0``0@<``^B@``#1 +M\@`"H'X``_`!``.H@``##]\``\'9``/!J``#C.T``.'V``#B/@`"+\H``C`+ +M``/!!``#P28``V)P``*_`0`#0!$``XC@``*@_@`#\`0``D1(``/P`@`#]``` +M`@5H``*W`0``0@<``_\```*@?@`#\`$``ZB```/HT``#C^```\&H``.,[0`` +MX?8``.(^``(OR@`",`L``T)P``.,ZP`#C.H``^CP``+(0``#J(```"H6``+* +M8@`#JJ```J9>``(%10``:C\``/(6``/!6``#P7H``V)Q``/T```"!/\``J%> +M``/P#@``:C\``\&1``/!LP`"H-X``_`#``-A+@`#]````_!!``-A,@`"P($` +M`Z@```+"HP`#JB```X50``"J%@`#@>```P"$``/P)``"H80``_`!``+$00`# +M!$X``\%4``,"I@`#\"0``J&F``/P`0`"QF$``P9N``/!=@`#U%X``F`"``(% +M5P``:C\``K\"``(N>P`#27$``X'D``/!!@`#HFP``J`N``(%@@`"87$``\$N +M``/!/@`"H-X``_`!``.#,``#AF```_!'``-H,``#C^T``BY[``./[0`"+GL` +M`X_M``(N>P`#C^T``BY[``-)=0`#P2X``\$&``/!%P`#P3X``J#>``/P`0`# +M@S```V@P``-)F``#_P```\$^``*@W@`#\`$``X,P``/!+@`#:#````H/```! +M]``#_P```D$>``/P`0`#[````J4.``/P2``#0!$``J#>``/P`P`"9FX``_0` +M``/P00`"9WX``V`1``/H````@?0``^P```(R^``#2D```$(```!*!```4@,` +M`KPS``)$#``"11P``F1%``)&+``"1SP``F9G``)D1@`"H4X``_`!``*T`0`" +MH(X``_`%``*D20`#\$,``J1+``/P00``\@(``*($``*\S``"1`P``D4<``)& +M+``"1SP``F1%``)D1@`"9$<``J%.``/P`0`"M`$``J".``/P!0`"I$H``_!# +M``*D2P`#\$$``/(!``"B`P`#Z$```*(```-#*0`"H-X``_!!``-#:0```@(` +M`!(!``*Q#P`"LP<``J7^``(%_``"H`X``_`&``*\#P`"I$$``_`!``*\"0`# +MP4P``\%<``*@+@`#\`8``KP/``*D80`#\`$``KP)``/!;``#P7P``J#>``/P +M`P`#8RD``_0```/P00`#8VD``DP"``*@S@`#\`8``L_^``*\"0`"I?P``_`" +M``/T```!Q:8``TCE``*@W@`#\$$``TD%``*X$0`"H`X``_`!``+$2``"24$` +M`J23``/P`0``\@(``J`N``/P`0`"Q5@``DE1``*DDP`#\`$``/(!``*@W@`# +M\`,``VCE``/T```#\$$``VD%``)``@`"H`X``@6F``/L````:C\``^@```(P +M.P`#29@``K@/``*U]0`"LP$``J#>``/P`0`#@S```\$N``)@"``"014``V@P +M``*_```"+GL``/'_``/H````@?X``T`,``-`+0`"N!```KD(``)*&``#JJ8` +M`DM)``.KM``"LP0``F^K``/P00`"LP(``D^K``/P`0`"LP8``T`M```*$0`" +ML$```D!```/P00`#Z#```D$>``/P`0`#Z#```)G]``(N?P`"O`$``J#>``/P +M"0`#2"$``XS&``.&9@`#IF8``F9L``-H(0`#:HD``_0```/P1P`#2"4``XS& +M``.&9@`#IF8``F9L``-H)0`#:HT``K`!``/H$``#Z"```^@P``-J8``"OP,` +M`C'5``-("``#A.H``('U``)@!``#:`@``K]D``(N>P``:C\``_\```/_```" +MH-X``_`#``*[```#]````_!!``*[0```V>\``\$.``/!'@`#@18``F$>``." +MY@`#:D0``\$>``.!%@`#Z"```VI$``/H```#P````\$0``*R_0`#:&```TI@ +M``*_]P`"L1,``D`/``)@#@`#:F```#(,```Z"P`"O`@``K_^``.&:@`"8B8` +M`J1^``/P`0`"LP0``D`/``)@#``#:F```X_A``(N>P`#:&L``_\```/^```` +M8CT``%H\``/_```#V,$``]RQ``./XP`"+GL``]`?``.,[P`#C^0``F_^``)` +M`0`"0B,``D`"``),P``#^P$``]`?``,/_@`"!J(``J#>``/P`P`#2"$``_0` +M``/P00`#2"4``\#,``(&S@`#C.8``L9L``/P00`"QWX``J#>``/P!``#:"$` +M`VJ)``/T```#\$(``V@E``-JC0`"I7X``_`"``/T```!QG$``T`1``*P"``` +M\?0``J#>``/P`P`"9F```_0```/P00`"9W```V`1``/T```""(,``X#A``.! +M!@`"81X``X+G``-J1``#@08``^@@``-J1``"L`$``^@0``/H(``#Z#```VI@ +M``-`+```6BL``K0$``/H\``"1$```_`!``*_`0`"I+X``_`!``*_!``",=4` +M`/(G``#R)0`"L/\``K&_``/!(``#:&```K`!``/H$``#Z"```^@P``-J8``` +M"CL``!(,```:"P`"L`(``J#>``/P00`"L`0``X(J``*D/@`#\`$``K,$``.! +M%@`"8`$``K$S``-J8``#0`H``K`!``*Q`@`"L@```K,!``*@*P`#\`(``^@@ +M``/!.P`#:F@``\$.```20@`"0`D``_`!``/H(``"L!,``K$"``.")@`#Z#`` +M`VIP``-`+0``8A$``!(H``*_0``"3T\``_`#``*@S@`#\`$``K((``*P(0`" +ML0(``K,!``-J=```"BL``K`!``/_```"I!X``_`%``*Q!``"L@```K,"``/T +M!``#\`,``K$"``*R#P`"LP$``VIX``-*?``#_P```K`!``*Q`@`"LP0``VI\ +M```!_@`#_P```_\```+`#@``@?X``C'0```")P`#0`H``T`-``*@#@`#\`4` +M`K`!``)`!0`#@`8``_0$``/P`P`"L`0``D`)``.``@`"L0,``F@!```"*P`# +M_P```_\```*D#@`#\`L``!(H``*P(P`"L0,``K,!``-J=``#2GP``_\```*P +M`0`"L00``K,$``-J?``#2F0``K2````1[P`"0`0``F`(``.B(@`"LP$``VID +M``(PE0`",*(```'_``/_```#_P```J`.``/P3@`#0"P``KP$``/``/P`0`#Z/```]CP``*\"0`"OS\``DL?``(O"P`#Z/```/G_```!_@`# +M_P```_\```+`#@``@?X``T`E```:$``"L@0``D(@``*@W@`#\$$``Z,R``*Y +M`@`"29,``F(I``*Y@``"294``F(I``*YA@`#Z(```J`I``/P00`#P8X``,': +M```)_0`#0"X``_\```*@`0`"!Z(``K`!``)!"``#\`4```)```/_```#_P`` +M`J`.``('H@`#2G0``'HH``/_```#_P```\$O``-J=``",=````(G``-`"@`# +M0`T``J`.``/P!0`"L`0``D`%``.``@`#]`0``_`"``*P$``"0`D``'G:``*Q +M0P`#_P```J#^``/P00`"L2,``F@!```"*P`#_P```_\```*@#@`"!]0``!(H +M``*P0P`"L00``K,!``-J=``#2GP``_\```*P`0`"L04``K,$``-J?``#2F0` +M`K2````1[P`"0`0``F`(``*X(``"8`@``KB_``)`"``#HB(``\$^``-J9``# +M]`0``_`(``-*9``"M(```!'O``)`!``"8`@``Z(B``/!/@`#:F0``C"5``(P +MH@``0A```K`"``*@W@`#\$$``X`"``)`"``#\`(``_0```'']0`#0`X``K`0 +M``/_```"00D``J`0``(']0```B<``_\```/_```"P`X``((G``*Q`@`"I`$` +M`@``/P1@`#Z/```K$D``+(@0`#V(```L`!``/8 +M@0`",(P```'^``/_```#_P```L`.``"!_@``>=H``C'0``*@_@`#\$4``K`/ +M``/!$``#P2```\$P``-J@``#0`H``K!```/_```"0`D``Z`"``*Q`P`":`$` +M``(K``/_```#_P```J0.``/P"P``$B@``K!#``*Q!0`"LP$``VIT``-*?``# +M_P```K`!``*Q!@`"LP0``VI\``-*9``"M(```!'O``)`!``"8`@``Z(B``*S +M`0`#:F0``C"5``(PH@`#0"4``$(0``*P(``"0`4``_!(``*P`@`"H-X``_!! +M``.``@`"0`@``_`"``/T```!R&4``!'^``*P@``"LP,``J`C``/P0P`"0`4` +M`_`!``(QE@`#0"X``_\```*P"``"00@``J`0``((90`"L(```D$(``/P!0`` +M`D```_\```/_```"H`X``@AE```")0`#_P```_\```/H$```BB4``J0.``(' +M=P```>\``$'Y``/_```#_P```]@```/<@```>D(``K````/8`0`"L`$``]P! +M``-`#0`"O2```_\```)-U0`"IMX``_`#``(O*P`#]`0``_`*``*P?P`"L?\` +M`K+_``-H8``#:&L``!'E``*SP``#Z-```V!,``(O9@`"L`$``^@0``/H(``# +MZ#```VI@``-*9``"M(```D`$``-J9```(?4``_\```-("``#_P```\$$``-H +M"``#[````^@```/H$``"H-X``_`#``-I'``#]`0``_`!``-I-``#[````&H_ +M``/_```#_P```J#>``/P`P`"NV(``_0```/P00`"NV@``_\```/_````V?P` +M`C*.``/H```",#L``KL"``#:/@`#2`$``K"_``)$0``#:`$``TF8``*T#P`" +MM?T``F`$``)!%0`#P2X``\$^``*@W@`#\`$``X,P``-H,``#2`@``K1```"! +M]0`"8`0``V@(``/H```"L6```^@@``/H,``#::```^@```*Q$``#Z"```^@P +M``-J1``"L`$``^@0``/H(``#Z#```VI@``*_`@`",=4``^@```/````#P1`` +M`K+]``-H8```"CL``!(,```:"P`"L`H``J#>``/P00`"L`P``X$6``)@`0`# +M@BH``K$,``)B(0`"I#X``_`!``*S!``"L18``VI@``./X0`"+GL``VAK``/_ +M```#_@```C'^``-*8```,@P``#H+``*T]@`"M0,``X9J``)B)@`"I'X``_`! +M``*W!``"8S<``P$5``)`!``#:F```T`*``*P`0`"L0(``K(2``/H,``#:F@` +M`K"````20@`"0`@``_`!``/H(``"L!,``K$"``.")@`#Z#```VIP``*P(0`" +ML0(``K(!``*S`0`#:G0``K`!``*Q`@`"L@\``K,!``-J>``#2GP``_\```*P +M`@`"L0(``K,$``-J?``"L/\``K&_``/!(``#:&```^AP``-*9``"M(```D`$ +M``/H(``#Z#```VID``-*9``"M(```!'\``)`!``"M`,``F`$``*S$``#:F0` +M`C"5``-*9``"M`@``D1```)G=``"I7X``@E<``/H```",#L``J#>``/P`P`# +M2"(``_0```/P00`#2"8``_\```.,Y@`"RJP``_!!``++O@`"H-X``_`$``-H +M(@`#:HH``_0```/P0@`#:"8``VJ.``/H<``"IKX``_`"``/T```!R2$``T`2 +M``#Q]``"OP0``J#>``/P`P`":J\``_0```/P00`":[\``V`2``/T```!R5P` +M`K`!``/H$``#Z"```^@P``-J8``#2F0``K2```)`!``#:F0``"'U``/_```# +M2`@``_\```/!!``#:`@``^P```!J/P``\?\``^@```""$P`#0`@``T`M``*X +M0``"N0@``DH(``.JJ@`"2TD``ZNT``*S!``";ZL``_!!``*S`@`"3ZL``_`! +M``*S!@`#0"T```H1``*P0``"0$```_!!``/H,``"01X``_`!``/H,```FA(` +M`"'T``/H4``#_P```*(9``"I]```:C\``_\```/_```"H-X``_`#``!9\0`# +M]````_!#``!9\``#_P```_\```#9[P`#2````X3J``/`1``#_P```D`$``-H +M```#2`0``\!^``/_```#_P```D,W``-H!``#0"P``%HK``*T!``#Z/```D1` +M``/P`0`"OP$``DN^``*@O@`#\`,``C#]``/T```!R;4``K_+``(S00``\B8` +M`/(E``*P_P`"L;\``\$@``-H8``"L`$``^@0``/H(``#Z#```VI@```*.P`` +M$@P``!H+``*P`@`"H-X``_!!``*P!``#@18``F`!``-`%0`#@BH``K&```)B +M(0`"I#X``_`!``*S!``"MO```D1&``*Q"``"810``VI@``-`"@`"L`$``K$" +M``*R```"LP$``J`K``/P`@`#Z"```\$[``-J:``"L`$``!)!``)`"0`#\`$` +M`^@@``*P$P`"L0(``X(F``/H,``#:G```T`M``!B$0``$B@``K]```)/3P`# +M\`,``J#.``/P`0`"L@@``K`A``*Q`@`"LP$``VIT```**P`"L`$``_\```)! +M$``"I!X``_`%``*Q!``"L@```K,"``/T!``#\`,``K$"``*R#P`"LP$``VIX +M``-*?``#_P```K`!``*Q`@`"LP0``VI\```**P`#_P```_\```)!'@`"I!X` +M`@I4```"$P`#_P```_\```+`#@``@A,``C'0```")@`#0`H``T`-``*@#@`# +M\`4``K`"``)`!0`#@`0``_0$``/P`P`"L`@``D`)``.````"L0,``F@!```" +M*P`#_P```_\```)`#@`"I`X``_`+```2*``"L",``K$#``*S`0`#:G0``TI\ +M``/_```"L`$``K$$``*S!``#:GP``TID``*T@```$>\``D`$``)@"``#HB(` +M`K,!``-J9``",)4``C"B```!_P`#_P```_\```*@#@`#\$X``T`L``*\!``# +MW,```K_```*@W@`#\`$``K^```/8\``#C.0``K\_``)+'P`"+PL``^CP``#Y +M_P```A,``_\```/_```"P`X``((3``!:*P``>B4``K@(``)*O@`"H*X``B@``_\```/_```#P2\``VIT +M``(QT````B8``T`*``-`#0`"H`X``_`%``*P"``"0`4``X````/T!``#\`,` +M`K`@``)`"0`#H````K%#``)H`0```BL``_\```/_```"0`X``J`.``(*O``` +M$B@``K!#``*Q!``"LP$``VIT``-*?``#_P```K`!``*Q!0`"LP0``VI\``-* +M9``"M(```!'O``)`!``"8`@``K@@``)@"``"N+\``D`(``.B(@`"L00``\$^ +M``-J9``#]`0``_`(``-*9``"M(```!'O``)`!``"8`@``Z(B``*S`0`#:F0` +M`C"5``(PH@``6BL``KH!``/_```"2[H``J"Z``/P0@`#]``````/P00`#@`(``D`(``/P`@`#]````\``D`$ +M``)@"``#HB(``K,!``*Q```#:F0``C"5``(PH@``6BL``KH#``*Y`0`#_P`` +M`DBZ``*DB0`!RU<``KD$``/_```"2+H``J"*``'+.0```B4``K((``*S```# +M_P```J0"``'+5P`"H`X``_!#``":)0`#]````D$``K````/8`0`"L`$``]P!``-`#0`"O4```_\` +M``)-U0`"IMX``_`#``(O*P`#]`0``_`*``*P?P`"L?\``K+_``-H8``#:&L` +M`!'E``*SP``#Z-```V!,``(O9@`"L`$``^@0``/H(``#Z#```VI@``(QT``# +M[````&H_``/_```#_P```J#>``/P`P`"NU,``_0```/P00`"NUL``_\```/_ +M````V?P``T`0``*[#P`#2"D``J#>``/P00`#2"T``K\$``)`"P`#JP(``P_[ +M``.,]@`";,\``X_V``-)Z``"HTP``_`$``,$3``#!5\``_0```/P10`#A.8` +M`X56``.E5@`"950``F1.``/!!``#P14``J#>``/P!``#:"D``VGH``/T```# +M\$(``V@M``-I[``#Z````C!/``-(`0`"L+\``D1```-H`0`#Z````K%```/H +M(``#Z#```VI$``*P`0`#Z!```^@@``/H,``#:F```K\"``(QU0``"CL``!(, +M```:"P`"L`(``J#>``/P00`"L`0``X$6``)@`0`#@BH``K&$``)B(0`"I#X` +M`_`!``*S!``"L1@``VI@``-`"@`"L`$``K$"``*R$@`#Z#```VIH``*P@``` +M$D$``D`(``/P`0`#Z"```K`3``*Q`@`#@B8``^@P``-J<``"L"$``K$"``*R +M`0`"LP$``VIT``*P`0`"L0(``K(/``*S`0`#:G@``TI\``/_```"L`(``K$" +M``*S!``#:GP``^@```/````"L;\``\$@``-H8``#Z'```TID``*T@``"0`0` +M`VID``-*9``"M(```!'\``)`!``"M`,``F`$``*S$``#:F0``C"5``-*9``" +MM`@``D1```)G=``"I7X``@P\``/H```",$\``J#>``/P!``#2"H``TGH``/T +M```#\$(``T@N``-)[``"O!$``K\0``+)GP`"R(P``\$(``/!&0`"H-X``_`$ +M``-H*@`#:>@``_0```/P0@`#:"X``VGL``*[`0``VCX``^AP``.+Y0`#B[8` +M`J6+``/P`@`#]````\``K#_``*QOP`#P2`` +M`VA@``*P`0`#Z!```^@@``/H,``#:F````H[```2#```&@L``K`"``*@W@`# +M\$$``K`$``.!%@`"8`$``X(J``*Q@``"8B$``J0^``/P`0`"LP0``T`5``*Q +M"``"MO```D1&``)A%``#:F```K`!``*Q`@`"L@```K,"``-J:```$?L``K`3 +M``*Q`@`#@B8``^@P``-J<```$B@``K`A``*Q`@`"LP$``VIT``*P`0`"L0(` +M`K(/``*S`0`#:G@``TI\``/_```"L`$``K$"``*S!``#:GP``KP$``/>\``&'[``*[&``#V/```B\+```!V0`#0"4``K\0``+`#@``@=D``D]?``/P +M`P`"+6@``_0```',J0`"OP@``J`.``/P`0`#P?X``C,+``-*@``"H/X``_!! +M``-JA```8>\``K"```/H\``"H<```_!!``/!_@`"+1L``C'0```1[P`#Z!`` +M`K`C``.B(@`"LP$``VID``(PE0``8=D```'O```)^0`#0"8``K(0``/8```# +MW!```'G[``*P```#V`$``K`!``/<`0`"0BD``_!%``.O\``"H,X``_`"``/[ +M```#^P$``]">``/[```"I2X``_`!``/[```#U)\``_L!``*E+@`#\`$``_L! +M``,/_@`"#,L```'9``/_```#_P```L`.``"!V0``8>\``K"```/!_@`"H<`` +M`_!!``/H\``"+1L``C'0```1[P`"L`,``^@0``.B(@`"LP$``VID``(PE0`" +M,*(``T`E```!V0`"L0,``K((``*S$``"0S4``_`"``)")0`#\`(``J4!``', +ME@``8?D``%GO``/_```#W,```]BP``*P```#V`$``K`!``/<`0``>?L``T`- +M``*]0``#_P```DW5``*FW@`#\`,``B\K``/T!``#\`H``K!_``*Q_P`"LO\` +M`VA@``-H:P``$>4``K/```/HT``#8$P``B]F``*P`0`#Z!```^@@``/H,``# +M:F```C'0``/L```"O!$``J#>``/P!``#2,P``TC1``/T```#\$(``TCL``-( +M\0`"+5,``J#>``/P!``#:,P``VC1``/T```#\$(``VCL``-H\0`"H-X``_`$ +M``-(U``#2-D``_0```/P0@`#2/0``TCY``(M4P`"H-X``_`$``-HU``#:-D` +M`_0```/P0@`#:/0``VCY``*@W@`#\`,``TC<``/T```#\$$``TC\``*@_@`# +M\`0``L`,``+!'``#]````_!"``,`#``#`1P``J#>``/P`P`#:-P``_0```/P +M00`#:/P``^P```*@_@`#\`H``L`,``+!'``"PBP``L,\``+$3``"Q5P``L9L +M``+'?``#]````_!(``,`#``#`1P``P(L``,#/``#!$P``P5<``,&;``#!WP` +M`^P```*P?P`"L?\``K+_``-H8``#:&L```GE``/H```#H`,``]P```/8$``# +M0#$``K\#``*\`@`"IOP``_!!``/!!P`"H/P``_!!``/!!@`"H/X``_!!``/! +M!0`"H?X``_!!``/!!``#P1```\$@``/!,``#_@```]0>``-H:P`#^P```P_^ +M``(-=0`#0#4``K\#``/_```"IOP``_!!``/!!P`"H/P``_!!``/!!@`"H/X` +M`_!!``/!!0`"H?X``_!!``/!!``#P1```\$@``/!,``#_@```]0>``-H:P`# +M^P```P_^``(-C0`#0#@``T`]``/_```#:H0``VJ!``/L```#85```V%5``-A +M6@`#85\``TA4``/_```#Z#```Z,S``-H5``#:&L``TA5``/H```#Z'```K+O +M``*Q_P`"L+\``VA@``-H:P`#27P``K0$``)A%``#:7P``TD\``/_```"81X` +M`VD\``-*E``#03D``_\```/_```"IC<``_`'``*F)@`#\`4``J85``/P`P`" +MI00``_`!``-A.``#8/P``_\```/^```#_P```TAD``*T$``"0B0``J`D``/P +M0P`"+A4``_0```'-T``"L/\``K'_``*R_P`"L_\``VJ0``-)/``#P$X``D$4 +M``-I/``#2%0``K4_``)#4P`#:%0``^@```"!]```@AH``((;``-(9``#C.H` +M`/(5``),#``#\$@``T@T``/_```#@`@``Z`,``*@#@`#^`$``@WQ``""%0`# +M^`,``TA5``/H```#AP<``VA5``-)/0`"OQ```D1/``/P!``"O_\``BY[``*_ +M4``"+GL``Z=P``,'?@`"#@<``\`@``/`$``#P````VA@``-H:P`#H!```VA@ +M``-!4``#054``T%:``-!7P`#[````_@#``-)T``"N`@``DDX``*@F``"#F@` +M`TG4``*T$``"0S0``J`T``(.1``#2`@``K@(``)@"``#:`@``T@H``*X(``" +M8S@``T@M``-H*``#:>@``F=X``-H+0`#:>T``TC(``*X^P`"0B@``VC(``-( +MF``"N"```F`(``-(L0`#:)@``F1(``-HL0`#P0X``\$>``/!+@`#P3X``V,P +M``-C<``#8S0``V-T``-C.``#8W@``_0```'.:``#2`@``KCW``)`"``#:`@` +M`T@H``*XWP`"0S@``T@M``-H*``#:>@``D=X``-H+0`#:>T``TC(``*X!``" +M8B@``VC(``-(F``"N-\``D`(``-(L0`#:)@``D1(``-HL0`"L`,``\$0``/! +M(``#P3```V,P``-C<``#8S0``V-T``/!+@`#P3X``V,X``-C>``#27P``K3[ +M``)!%``#:7P``VAK``/L```#2,H``K`$``*Q0``#P2@``F@@``-HR@`#P8(` +M`VC*``)H(0`#:,H``\&"``-HR@`#[````_@#``,/_@`"#GP``^P```/H```# +MP!```\`@``.@$``#:&```VAK``/!#@`#Z!```^@@``/H,``#I!,``]@0``/< +M0``#_@```]0>``-H:P`#::0``^@```/^```#U!X``VAK``-II``"H-X``_`# +M``-"8``#]````_!!``-"7``#0ED``J#>``-II``#\`,``T)H``/T```#\$$` +M`T)D``-IH0`#_@```]0>``-H:P`#:&L``^P```/H```#P"```\`0``.@$``# +M:&```VAK``-"5@`#P0X``^@0``/H(``#Z#```Z03``/8$``#W$```]0>``*_ +M`@`"+GL``VAK``-II``#::(``^@```/_```#U!X``K\"``(N>P`#:&L``VFD +M``/H```#P"```\`0``/````#:&```VAK``/L```#:&L``K!_``*Q_P`"LO\` +M`VA@``*Q#``#Z````Z`#``/<```#V!```^@```/H$``#Z"```^@P``/^```# +MU!X``VAK``/[```#^P```XCC``/X`P`#_@```]0>``-H:P`#^P```PB.``(. +MX``#[````"'Z``/H4``#Z&```^AP``*Y"``"N,```]R!``/8D0`#0E```_@# +M``/_```#:D0``^@@``,!'@`#:D0``_X```/47P`#:&L``K09``/^```#U%\` +M`VAK``-)I0`#_P```_\```/!!``#P14``X+@``)B)@`#P3<``VFD``*Y"``# +M"9X``@\'``-II0`#[````J&^``/P"@`#T!X``P^^``/X`P`#``X``P$>``," +M+@`#`SX``]0>``,/_@`"#Q```_L```,,S@`"#PL``^P```*AO@`#\`H``]`> +M``,/O@`#^`,``L`.``+!'@`"PBX``L,^``/4'@`##_X``@\@``/[```##,X` +M`@\;``/L```#T)X``]`?``*\/P`"2(P``DF<``)*K``"2[P``D0,``)%'``" +M1BP``D<\``*\(``"P(0``Z````*C2``#\$$``L`,``+!E0`#H1```J-9``/P +M00`"P1P``L*F``.B(``"HVH``_!!``+"+``"P[<``Z,P``*C>P`#\$$``L,\ +M``/HT``#C.D``P2```+HC0`#!9$``NF=``,&H@`"ZJT``P>S``+KO0`#8FX` +M`DB,``))G``"2JP``DN\``/4G@`#0FX``F1%``)D1@`"9$<``@]-``!J/P`# +M^P```_L!``,/_@`"#RL``^P```/0G@`#T!\``KP_``)(C``"29P``DJL``)+ +MO``"1`P``D4<``)&+``"1SP``KP@``+`A``#H````J-(``/P00`"P`P``L&5 +M``.A$``"HUD``_!!``+!'``"PJ8``Z(@``*C:@`#\$$``L(L``+#MP`#HS`` +M`J-[``/P00`"PSP``KP'``*CW``#\$X``W!,``-03@`#_P```_\```/^```# +MU!X``VAK``/[```#<$X``U!,``/_```#_P```_0$``/P"``"O`@``J3<``/P +M`0`#:H0``KP)``*DW``#\`$``VJ```*P_P`"L;\``K+_``-H8``#^P```_L! +M``+-W@`"IM\``@]F``-*9``"M(```D`$``-J9``"L````K$```*R```"LP$` +M`VIT``*P,0`"L08``K($``*S```#:G@``TI\``/_```"L`$``K$!``*S```# +M:GP``TID``*T@``"0`0``K0#``)@!``#:F0``C"5``-*9``"M(```D`$``-J +M9```:C\``C-L``/L````6?8``&(^``/_```"H;X``_!"``#Q]``#[````J'. +M``/P00`#"[X``PS.``#9]@``XCX``TI```!:%@`#_P```_\```*@O@`#\$(` +M`Z````.B(``#T%X``&(*``!9\@`#H@(``D`)``)"*0`"I8X``@_U``,(C@`" +MH`T``_`+``!"!P`"Q$\``\%4``*@O@`#\$8``]1>``+$3P`#P50``]1>``+$ +M3P`#P50``J6N``(0!0`#"JX``J`M``/P"P``4@<``L9O``/!=@`"H+X``_!& +M``/47@`"QF\``\%V``/47@`"QF\``\%V``/47@`##,X``A`&``)KB@`"#\H` +M`^P```-"<```4A8``X_L``.(Z@`#JJ```J2N``/P!@`"H4@``_!!``+$2``" +MH6@``_!!``+&:``#BN```J9/``/P0P`#!$@``P`(``,!&``"IF\``_!#``,& +M:``#`B@``P,X``,*K@`"$!D``\%4``/!=@`#U%X``V)P``/L```#P6(``P9N +M``/<$``#V````]">``/_```#_P```DB%``)H@P`#P9@``\&H``/!N``#U)X` +M`_L```,&;@`"$"X``^P```/!$``#P2```\$P``*@W@`#\`@``VD(``-I#``# +M:1```VD4``-I&``#:1P``_0```/P1@`#:2```VDD``-I*``#:2P``VDP``-I +M-``#[````\$0``/!(``#P3```J#>``/P!P`#:,P``VC0``-HU``#:-@``VC< +M``/T```#\$4``VCL``-H\``#:/0``VCX``-H_``#[````TG4``/_```#@.4` +M`D$#``-)T@`#_P```D`*``-)P@`"I1```_`!``-)Q@`#[````K!_``*Q_P`" +MLO\``VA@``-H:P`#Z````^@0``/!+@`"LS```VFD``/H```"L3```^@@``/H +M,``#Z$```Z5#``/80``#W%```_X```/4'@`#:&L``_L```/[```"L!(``^@0 +M``/^```#U!X``VAK``,(C@`"$(8``^P```/0G@`#^P```_\```/_```#U)\` +M`_L!``,/_@`"$(P``^P```/X`0`"OP0``TID``/_```#_P```D$/``(0EP`# +M^`,``VAK``/_```#_P```_X```/L```#2F0``_\```*_"``"00\``J`?``(0 +MPP`#0!(``K40``*E)0`#\`0``K\"``)JKP`#]````=#```+$50`"I20``_`$ +M``*_`@`":[\``_0```'0P``"Q$4``J4D``/P!``"OQ```FJO``/T```!T,`` +M`K\0``)KOP``\?0``V`2``(PQ``#[````TIP``/_```#P<(``T`N``*P`0`# +M:J@``_\```/_```#_P```TJL``*T`@`#:JD``\````/`$0`#P"(``\`S``-* +MK0`"OY```J#/``/P!0`#P$0``K\/``)/3P`#]````_!!``/`]``"H-X``_`+ +M``-`&0`#_P```_\```)D0``"95$``F9B``)G4``K#```/<```#V!```J#^``/P!``#Z````^@0``/H(``#Z#```J#^ +M``/P1``"L%4``\$0``/!(``#P3```J#^``/P!``"M/\``\%4``/!9``#P70` +M`J#^``/P1``"M*H``\%4``/!9``#P70``KP'``*C_@`"$7D``$(-``/_```# +M_P```J".``(1/P`"H-X``_`#``-`0@`#]`0``_`!``-`1@``ZC\``&H.``*D +MW@`#\`0``\"(``/`F0`#P*H``\"[``)@"``"81D``F(J``)C.P`"9$@``F59 +M``)F:@`"9WL``&H_``/_```#_P```_X```/4'@`#:&L``_L```,,S@`#_@`` +M`]1>``-H:P`#^P```PS.``(1/P``0@T``&(.``/_```"H(X``A%D``-`2@`" +MI,X``_`$``/`B``#P)D``\"J``/`NP`"I-X``_`"``/!B@`#P9L``KH/``)* +MJ``#BZ8``FJK``*[\``"2[@``Z>V``)KMP`#]`0``_`#``/H8``#Z*```^BP +M``*T\``"8$H``\$0``/!(``#P3```VJ$``*@_@`#\`,``K3P``/T!``#\`$` +M`K0/``)@2P`#P1```\$@``/!,``#:H```^P```/^```#U!X``VAK``/[```# +M#,X``KD#``*@^0`#\$0``^A```/H4``#Z&```^AP``/^```#U%X``VAK``/[ +M```##,X``A&%``*P\``"L?\``J#Y``/P0@`#Z````^@0``/!(0`#P3$``VJ$ +M``-J@``#[````K!_``*Q_P`"LO\``VA@``-H:P``">4``K#```/<```#V!`` +M`K3_``/!9``#P70``KP'``/^```"M?\``]1>``-H:P`#^P```PS.``/^```" +MM>\``]1>``-H:P`#^P```PS.``(1HP`"M?\``VJ%``*P\``#P1```\$@``/! +M,``#:H```TIB``(QT``#Z/```C'<``-J8@``">4``K#```/<```#V!```K3_ +M``/!5``#P60``\%T``*\!P`#_@```]1>``-H:P`#^P```PS.``(1Q0`"L/\` +M`K&_``/!(``#:&```^P```-*9``"M(```D`$``-J9``#[````K`$``*@\``# +M\`,``C#]``/T!``#\`$``BUH``/H```#P````\$0``*R_0`#:&````H[```R +M#```&@L``K`*``*@W@`#\$$``K`,``.!%@`"8`$``K$6``*D/@`#\`$``K,$ +M``.&:@`"L@(``K0$``*C_@`#\`,``J#T``/P`0`"L@0``F(F``-J8``#C^$` +M`BY[``-H:P`#_P```_X```/L```#2F```_\```/H,``"8`X``VI@``-*9``" +MM/(``D`$``-J9``#[````&H_``-`!``#_P```K@$``)%X``"H%X``_!$``*@ +MW@`#\$(``T`D``/_````8?@``_\```/_```#W,```X_J``*@W@`#\`$``^CP +M``/8\``#C.0``\&R``-)/0`"H-X``_!!``-)00`#_P```D1N``/P`0`"O`<` +M`D`(``/P0P`"+PL``_0```/P00`"+QL``D1N``/P"0`#Z,```ZMB``.E8``" +M15X``_!#``(O"P`#]````_!!``(O&P`#[````TC```-(Q0`#Z!```^A0``*@ +MW@`#\`@``VC````",0``"C```_\```/_```#:,```_0```/P1@`#:,4``"(O +M```J+@`#_P```_\```-HQ0`#[````&H_``/_```#_P```%'Y``*@W@`#\`,` +M`%GQ``/T```#\$$``%GP``/_```#W*```]BP``-`!@`#_P```_\```)`Z``# +M\`,``J#>``/P00`#0"8``_\```/_```#24$``J`.``/P0P`"H-X``_!!``/! +M10`"14X``_!#``.,Y``#]````_!!``.,XP`#B9@``ZJ<``*@K@`#\`,``B\+ +M``/T```#\$$``B\;``-`!@`#_P```_\```-)00`"0(X``J`.``/P0P`"H-X` +M`_!!``/!10`#Z,```ZM"``)%3@`#\`<``Z5```)%7@`#\$,``B\+``/T```# +M\$$``B\;``/L```"H-X``_`#``-((0`#]````_!!``-()0`#_P```KL!``.B +M9@`#@68``Z$6``.'=@`"8"<``P`+``.G!@`#@@8``F8A``*@W@`#\`0``V@A +M``-JB0`#]````_!"``-H)0`#:HT``^P```./[0`"+GL``^@P``."X``#Z!`` +M`^@```-H,``#C^T``BY[``/H\``#27```^AP``*V`0`#P5$``\%```-H,0`" +MN/P``\%3``/!0@`"15@``TET``(R^``#:#$``\%1``/!0``",O@``V@Q``/! +M4P`#P4(``TF8``(R^``#:#$``\%1``/!0``",O@``V@Q``/!4P`#P4(``TF< +M``(R^``#:#$``\%1``/!0``",O@``V@Q``/!4P`#P4(``TCH``(R^``#:#$` +M`\%1``/!0``"MQ```C+X``-H,0`#P5,``\%"``(R^``#:#$``^P```-)/0`" +ML`@``D`$``/P!0`#2J0``_\```/_```"L@,``VJD``*P!``"000``J`0``/P +M1@`#2,```TC%``*Q`P`"M0,``VC```-HQ0`#[````_\```/_```#_P```^P` +M``-A2``#84$``V%&``-B?P`#P0X``^@0``/H(``#Z#```VCH``/H```#_P`` +M`VCH``-!2``#_P```^P```*P?P`"L?\``K+_``-H8``#:&L```GE``/H```# +MH`,``]P```/8$``"O`,``K#W``*@_@`#\$$``K!_``/!$``#P2```\$P``*T +M_P`#P50``\%D``/!=``#_@```]0>``-H:P`#H`$``Z$1``.B(0`#HS$``_L` +M``/^```#U%X``VAK``/[```##,X``A,A``*P_P`"O`@``\$0``/!(``#P3`` +M`VJ```*D_@`!TSL``J#\``/P`@`#:H0``^P```*P]P`#H0$``Z(1``.C(0`# +M:H0``^P```-)/0`#_P```KB```)D2``#:3T``K`!``*Q`@`"LC\``D(O``*S +M```#:F@``K````*Q```"L@```K,"``-J=``"L0$``K((``*S```#:G@``K`! +M``*R```#:GP``!'O``*PP``"0`\``Z`"``)@#@`"L0```Z(B``*S`0`#:F0` +M`K#_``*QOP`#P2```VA@``/_```#_P```C"5``*X?P`"1$@``VD]``/L```# +MZ````^@0``*R`P`"LP```V@P``/L```#Z````((_``(B^@``\C\``B+Z``(S +MJ``"+FX``TF8``*T]P`"010``VF8``/!+@`#Z#```V@P```"%P`#@>```^A` +M``*@`0`#\`$``\%.``(TL@`#2`@``KC^``)!&``#:`@``^@```""/P`")%H` +M`/(_``(D6@```A<``X'@``/_```"I!```_`"``/!3@`"-+(``C0"``-`+``" +MN$```KF```*[_P`#2J4``D@8``/P`0`"N\\``DD9``/P`@`"NC\``DNZ``)% +M6P`#:J4``_0```'";``#2=$``KA```)$>``#A$```TB<``.%X@`"8`0``F`% +M``-HG``#:*```VBT``-HN``#23@``X7A``/`50`"0B4``VDX``-J7``#H.$` +M`X'A``/H,``#@N@``X7E``(P*@`#0Z8``X#H``/_```"2(4``FB```/!F``# +MP:@``\&X``-CI@`#8^8``^@```/HT``",#L``\'>``(P.P`",&$``X3B``/! +MR0`#Z````X'A``.#Y``"PC$``P(N``+#/@`"1$D``_`!``.#Y0`#Z%```C`J +M``.`Z@`","H``XCE``.$X``"1$P``_`"``.(Y``"R(X``\&8``/!J``#P;@` *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 19:39:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CED6A716; Sun, 25 Aug 2013 19:39:31 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A1FDD2E5D; Sun, 25 Aug 2013 19:39:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PJdVdG000676; Sun, 25 Aug 2013 19:39:31 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PJdVP9000675; Sun, 25 Aug 2013 19:39:31 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308251939.r7PJdVP9000675@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 19:39:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r254886 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 19:39:31 -0000 Author: dumbbell Date: Sun Aug 25 19:39:31 2013 New Revision: 254886 URL: http://svnweb.freebsd.org/changeset/base/254886 Log: Back to normal limit, now that the Radeon driver is committed Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Sun Aug 25 19:37:15 2013 (r254885) +++ svnadmin/conf/sizelimit.conf Sun Aug 25 19:39:31 2013 (r254886) @@ -22,7 +22,6 @@ brooks des dim -dumbbell ed gnn gonzo From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 20:01:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F3263B63; Sun, 25 Aug 2013 20:01:21 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DF3C42F99; Sun, 25 Aug 2013 20:01:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PK1L5J013961; Sun, 25 Aug 2013 20:01:21 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PK1LWb013960; Sun, 25 Aug 2013 20:01:21 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308252001.r7PK1LWb013960@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 25 Aug 2013 20:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254887 - head/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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 20:01:22 -0000 Author: dumbbell Date: Sun Aug 25 20:01:21 2013 New Revision: 254887 URL: http://svnweb.freebsd.org/changeset/base/254887 Log: Bump __FreeBSD_version to 1000051 after Radeon KMS driver import Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Aug 25 19:39:31 2013 (r254886) +++ head/sys/sys/param.h Sun Aug 25 20:01:21 2013 (r254887) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000050 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000051 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 21:52:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 265F98EF; Sun, 25 Aug 2013 21:52:06 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 127A724AE; Sun, 25 Aug 2013 21:52:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PLq5tp071966; Sun, 25 Aug 2013 21:52:05 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PLq5hD071961; Sun, 25 Aug 2013 21:52:05 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308252152.r7PLq5hD071961@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 25 Aug 2013 21:52:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254888 - in head: sys/sys tools/regression/file/fcntlflags X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 21:52:06 -0000 Author: jilles Date: Sun Aug 25 21:52:04 2013 New Revision: 254888 URL: http://svnweb.freebsd.org/changeset/base/254888 Log: Fix fcntl F_GETFL F_SETFL for files opened execute-only (O_EXEC). The FFLAGS and OFLAGS now work correctly also for files opened with O_EXEC. Except possibly fuse, the other users pass values without O_EXEC set. fuse appears to assume O_EXEC is handled correctly. Although F_SETFL may not be commonly used for execute-only file descriptors, F_GETFL may be useful to find the access mode. Added: head/tools/regression/file/fcntlflags/ head/tools/regression/file/fcntlflags/Makefile (contents, props changed) head/tools/regression/file/fcntlflags/fcntlflags.c (contents, props changed) head/tools/regression/file/fcntlflags/fcntlflags.t (contents, props changed) Modified: head/sys/sys/fcntl.h Modified: head/sys/sys/fcntl.h ============================================================================== --- head/sys/sys/fcntl.h Sun Aug 25 20:01:21 2013 (r254887) +++ head/sys/sys/fcntl.h Sun Aug 25 21:52:04 2013 (r254888) @@ -136,8 +136,8 @@ typedef __pid_t pid_t; #ifdef _KERNEL /* convert from open() flags to/from fflags; convert O_RD/WR to FREAD/FWRITE */ -#define FFLAGS(oflags) ((oflags) + 1) -#define OFLAGS(fflags) ((fflags) - 1) +#define FFLAGS(oflags) ((oflags) & O_EXEC ? (oflags) : (oflags) + 1) +#define OFLAGS(fflags) ((fflags) & O_EXEC ? (fflags) : (fflags) - 1) /* bits to save after open */ #define FMASK (FREAD|FWRITE|FAPPEND|FASYNC|FFSYNC|FNONBLOCK|O_DIRECT|FEXEC) Added: head/tools/regression/file/fcntlflags/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/file/fcntlflags/Makefile Sun Aug 25 21:52:04 2013 (r254888) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +PROG= fcntlflags +MAN= +WARNS?= 6 + +.include Added: head/tools/regression/file/fcntlflags/fcntlflags.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/file/fcntlflags/fcntlflags.c Sun Aug 25 21:52:04 2013 (r254888) @@ -0,0 +1,110 @@ +/*- + * Copyright (c) 2013 Jilles Tjoelker + * 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$ + */ + +#include + +#include +#include +#include + +/* + * O_ACCMODE is currently defined incorrectly. This is what it should be. + * Various code depends on the incorrect value. + */ +#define CORRECT_O_ACCMODE (O_ACCMODE | O_EXEC) + +static int testnum; + +static void +subtests(const char *path, int omode, const char *omodetext) +{ + int fd, flags1, flags2, flags3; + + fd = open(path, omode); + if (fd == -1) + printf("not ok %d - open(\"%s\", %s) failed\n", + testnum++, path, omodetext); + else + printf("ok %d - open(\"%s\", %s) succeeded\n", + testnum++, path, omodetext); + flags1 = fcntl(fd, F_GETFL); + if (flags1 == -1) + printf("not ok %d - fcntl(F_GETFL) failed\n", testnum++); + else if ((flags1 & CORRECT_O_ACCMODE) == omode) + printf("ok %d - fcntl(F_GETFL) gave correct result\n", + testnum++); + else + printf("not ok %d - fcntl(F_GETFL) gave incorrect result " + "(%#x & %#x != %#x)\n", + testnum++, flags1, CORRECT_O_ACCMODE, omode); + if (fcntl(fd, F_SETFL, flags1) == -1) + printf("not ok %d - fcntl(F_SETFL) same flags failed\n", + testnum++); + else + printf("ok %d - fcntl(F_SETFL) same flags succeeded\n", + testnum++); + flags2 = fcntl(fd, F_GETFL); + if (flags2 == -1) + printf("not ok %d - fcntl(F_GETFL) failed\n", testnum++); + else if (flags2 == flags1) + printf("ok %d - fcntl(F_GETFL) gave same result\n", + testnum++); + else + printf("not ok %d - fcntl(F_SETFL) caused fcntl(F_GETFL) to " + "change from %#x to %#x\n", + testnum++, flags1, flags2); + if (fcntl(fd, F_SETFL, flags2 | O_NONBLOCK) == -1) + printf("not ok %d - fcntl(F_SETFL) O_NONBLOCK failed\n", + testnum++); + else + printf("ok %d - fcntl(F_SETFL) O_NONBLOCK succeeded\n", + testnum++); + flags3 = fcntl(fd, F_GETFL); + if (flags3 == -1) + printf("not ok %d - fcntl(F_GETFL) failed\n", testnum++); + else if (flags3 == (flags2 | O_NONBLOCK)) + printf("ok %d - fcntl(F_GETFL) gave expected result\n", + testnum++); + else + printf("not ok %d - fcntl(F_SETFL) gave unexpected result " + "(%#x != %#x)\n", + testnum++, flags3, flags2 | O_NONBLOCK); + (void)close(fd); +} + +int +main(int argc __unused, char **argv __unused) +{ + printf("1..24\n"); + testnum = 1; + subtests("/dev/null", O_RDONLY, "O_RDONLY"); + subtests("/dev/null", O_WRONLY, "O_WRONLY"); + subtests("/dev/null", O_RDWR, "O_RDWR"); + subtests("/bin/sh", O_EXEC, "O_EXEC"); + return (0); +} Added: head/tools/regression/file/fcntlflags/fcntlflags.t ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/file/fcntlflags/fcntlflags.t Sun Aug 25 21:52:04 2013 (r254888) @@ -0,0 +1,10 @@ +#!/bin/sh +# $FreeBSD$ + +cd `dirname $0` + +executable=`basename $0 .t` + +make $executable 2>&1 > /dev/null + +exec ./$executable From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 21:54:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BA10CA84; Sun, 25 Aug 2013 21:54:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A530124BF; Sun, 25 Aug 2013 21:54:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7PLshsS072777; Sun, 25 Aug 2013 21:54:43 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7PLsfIf072758; Sun, 25 Aug 2013 21:54:41 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201308252154.r7PLsfIf072758@svn.freebsd.org> From: Mark Johnston Date: Sun, 25 Aug 2013 21:54:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254889 - in head: cddl/lib/libdtrace sys/conf sys/netinet 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 21:54:43 -0000 Author: markj Date: Sun Aug 25 21:54:41 2013 New Revision: 254889 URL: http://svnweb.freebsd.org/changeset/base/254889 Log: Implement the ip, tcp, and udp DTrace providers. The probe definitions use dynamic translation so that their arguments match the definitions for these providers in Solaris and illumos. Thus, existing scripts for these providers should work unmodified on FreeBSD. Tested by: gnn, hiren MFC after: 1 month Added: head/cddl/lib/libdtrace/ip.d (contents, props changed) head/cddl/lib/libdtrace/tcp.d (contents, props changed) head/cddl/lib/libdtrace/udp.d (contents, props changed) head/sys/netinet/in_kdtrace.c (contents, props changed) head/sys/netinet/in_kdtrace.h (contents, props changed) Modified: head/cddl/lib/libdtrace/Makefile head/sys/conf/files head/sys/netinet/ip_fastfwd.c head/sys/netinet/ip_input.c head/sys/netinet/ip_output.c head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h head/sys/netinet/udp_usrreq.c head/sys/netinet/udp_var.h head/sys/netinet6/ip6_input.c head/sys/netinet6/ip6_mroute.c head/sys/netinet6/nd6.c head/sys/netinet6/send.c head/sys/netinet6/udp6_usrreq.c Modified: head/cddl/lib/libdtrace/Makefile ============================================================================== --- head/cddl/lib/libdtrace/Makefile Sun Aug 25 21:52:04 2013 (r254888) +++ head/cddl/lib/libdtrace/Makefile Sun Aug 25 21:54:41 2013 (r254889) @@ -48,8 +48,11 @@ SRCS= dt_aggregate.c \ DSRCS= errno.d \ io.d \ + ip.d \ psinfo.d \ signal.d \ + tcp.d \ + udp.d \ unistd.d WARNS?= 1 Added: head/cddl/lib/libdtrace/ip.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/lib/libdtrace/ip.d Sun Aug 25 21:54:41 2013 (r254889) @@ -0,0 +1,285 @@ +/* + * 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 + * + * $FreeBSD$ + */ +/* + * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013 Mark Johnston + */ + +#pragma D depends_on provider ip + +/* + * pktinfo is where packet ID info can be made available for deeper + * analysis if packet IDs become supported by the kernel in the future. + * The pkt_addr member is currently always NULL. + */ +typedef struct pktinfo { + uintptr_t pkt_addr; +} pktinfo_t; + +/* + * csinfo is where connection state info is made available. + */ +typedef uint32_t zoneid_t; +typedef struct csinfo { + uintptr_t cs_addr; + uint64_t cs_cid; + pid_t cs_pid; + zoneid_t cs_zoneid; +} csinfo_t; + +/* + * ipinfo contains common IP info for both IPv4 and IPv6. + */ +typedef struct ipinfo { + uint8_t ip_ver; /* IP version (4, 6) */ + uint32_t ip_plength; /* payload length */ + string ip_saddr; /* source address */ + string ip_daddr; /* destination address */ +} ipinfo_t; + +/* + * ifinfo contains network interface info. + */ +typedef struct ifinfo { + string if_name; /* interface name */ + int8_t if_local; /* is delivered locally */ + /*netstackid_t if_ipstack;*/ /* ipstack ID */ + uintptr_t if_addr; /* pointer to raw ill_t */ +} ifinfo_t; + +typedef uint32_t ipaddr_t; +typedef struct { + uint8_t ipha_version_and_hdr_length; + uint8_t ipha_type_of_service; + uint16_t ipha_length; + uint16_t ipha_ident; + uint16_t ipha_fragment_offset_and_flags; + uint8_t ipha_ttl; + uint8_t ipha_protocol; + uint16_t ipha_hdr_checksum; + ipaddr_t ipha_src; + ipaddr_t ipha_dst; +} ipha_t; + +/* + * ipv4info is a translated version of the IPv4 header (with raw pointer). + * These values are NULL if the packet is not IPv4. + */ +typedef struct ipv4info { + uint8_t ipv4_ver; /* IP version (4) */ + uint8_t ipv4_ihl; /* header length, bytes */ + uint8_t ipv4_tos; /* type of service field */ + uint16_t ipv4_length; /* length (header + payload) */ + uint16_t ipv4_ident; /* identification */ + uint8_t ipv4_flags; /* IP flags */ + uint16_t ipv4_offset; /* fragment offset */ + uint8_t ipv4_ttl; /* time to live */ + uint8_t ipv4_protocol; /* next level protocol */ + string ipv4_protostr; /* next level protocol, as a string */ + uint16_t ipv4_checksum; /* header checksum */ + ipaddr_t ipv4_src; /* source address */ + ipaddr_t ipv4_dst; /* destination address */ + string ipv4_saddr; /* source address, string */ + string ipv4_daddr; /* destination address, string */ + ipha_t *ipv4_hdr; /* pointer to raw header */ +} ipv4info_t; + +/* + * ipv6info is a translated version of the IPv6 header (with raw pointer). + * These values are NULL if the packet is not IPv6. + */ +typedef struct in6_addr in6_addr_t; +typedef struct ip6_hdr ip6_t; +typedef struct ipv6info { + uint8_t ipv6_ver; /* IP version (6) */ + uint8_t ipv6_tclass; /* traffic class */ + uint32_t ipv6_flow; /* flow label */ + uint16_t ipv6_plen; /* payload length */ + uint8_t ipv6_nexthdr; /* next header protocol */ + string ipv6_nextstr; /* next header protocol, as a string */ + uint8_t ipv6_hlim; /* hop limit */ + in6_addr_t *ipv6_src; /* source address */ + in6_addr_t *ipv6_dst; /* destination address */ + string ipv6_saddr; /* source address, string */ + string ipv6_daddr; /* destination address, string */ + ip6_t *ipv6_hdr; /* pointer to raw header */ +} ipv6info_t; + +#pragma D binding "1.0" IPPROTO_IP +inline short IPPROTO_IP = 0; +#pragma D binding "1.0" IPPROTO_ICMP +inline short IPPROTO_ICMP = 1; +#pragma D binding "1.0" IPPROTO_IGMP +inline short IPPROTO_IGMP = 2; +#pragma D binding "1.0" IPPROTO_IPV4 +inline short IPPROTO_IPV4 = 4; +#pragma D binding "1.0" IPPROTO_TCP +inline short IPPROTO_TCP = 6; +#pragma D binding "1.0" IPPROTO_UDP +inline short IPPROTO_UDP = 17; +#pragma D binding "1.0" IPPROTO_IPV6 +inline short IPPROTO_IPV6 = 41; +#pragma D binding "1.0" IPPROTO_ROUTING +inline short IPPROTO_ROUTING = 43; +#pragma D binding "1.0" IPPROTO_FRAGMENT +inline short IPPROTO_FRAGMENT = 44; +#pragma D binding "1.0" IPPROTO_RSVP +inline short IPPROTO_RSVP = 46; +#pragma D binding "1.0" IPPROTO_GRE +inline short IPPROTO_GRE = 47; +#pragma D binding "1.0" IPPROTO_ESP +inline short IPPROTO_ESP = 50; +#pragma D binding "1.0" IPPROTO_AH +inline short IPPROTO_AH = 51; +#pragma D binding "1.0" IPPROTO_MOBILE +inline short IPPROTO_MOBILE = 55; +#pragma D binding "1.0" IPPROTO_ICMPV6 +inline short IPPROTO_ICMPV6 = 58; +#pragma D binding "1.0" IPPROTO_DSTOPTS +inline short IPPROTO_DSTOPTS = 60; +#pragma D binding "1.0" IPPROTO_ETHERIP +inline short IPPROTO_ETHERIP = 97; +#pragma D binding "1.0" IPPROTO_PIM +inline short IPPROTO_PIM = 103; +#pragma D binding "1.0" IPPROTO_IPCOMP +inline short IPPROTO_IPCOMP = 108; +#pragma D binding "1.0" IPPROTO_SCTP +inline short IPPROTO_SCTP = 132; +#pragma D binding "1.0" IPPROTO_RAW +inline short IPPROTO_RAW = 255; + +inline uint8_t INP_IPV4 = 0x01; +inline uint8_t INP_IPV6 = 0x02; + +#pragma D binding "1.0" protocols +inline string protocols[int proto] = + proto == IPPROTO_IP ? "IP" : + proto == IPPROTO_ICMP ? "ICMP" : + proto == IPPROTO_IGMP ? "IGMP" : + proto == IPPROTO_IPV4 ? "IPV4" : + proto == IPPROTO_TCP ? "TCP" : + proto == IPPROTO_UDP ? "UDP" : + proto == IPPROTO_IPV6 ? "IPV6" : + proto == IPPROTO_ROUTING ? "ROUTING" : + proto == IPPROTO_FRAGMENT ? "FRAGMENT" : + proto == IPPROTO_RSVP ? "RSVP" : + proto == IPPROTO_GRE ? "GRE" : + proto == IPPROTO_ESP ? "ESP" : + proto == IPPROTO_AH ? "AH" : + proto == IPPROTO_MOBILE ? "MOBILE" : + proto == IPPROTO_ICMPV6 ? "ICMPV6" : + proto == IPPROTO_DSTOPTS ? "DSTOPTS" : + proto == IPPROTO_ETHERIP ? "ETHERIP" : + proto == IPPROTO_PIM ? "PIM" : + proto == IPPROTO_IPCOMP ? "IPCOMP" : + proto == IPPROTO_SCTP ? "SCTP" : + proto == IPPROTO_RAW ? "RAW" : + ""; + +/* + * This field is always NULL according to the current definition of the ip + * probes. + */ +#pragma D binding "1.0" translator +translator pktinfo_t < void *p > { + pkt_addr = NULL; +}; + +#pragma D binding "1.0" translator +translator csinfo_t < void *p > { + cs_addr = NULL; + cs_cid = (uint64_t)p; + cs_pid = 0; + cs_zoneid = 0; +}; + +#pragma D binding "1.0" translator +translator csinfo_t < struct inpcb *p > { + cs_addr = NULL; + cs_cid = (uint64_t)p; + cs_pid = 0; /* XXX */ + cs_zoneid = 0; +}; + +#pragma D binding "1.0" translator +translator ipinfo_t < uint8_t *p > { + ip_ver = p == NULL ? 0 : ((struct ip *)p)->ip_v; + ip_plength = p == NULL ? 0 : + ((struct ip *)p)->ip_v == 4 ? + ntohs(((struct ip *)p)->ip_len) - (((struct ip *)p)->ip_hl << 2): + ntohs(((struct ip6_hdr *)p)->ip6_ctlun.ip6_un1.ip6_un1_plen); + ip_saddr = p == NULL ? 0 : + ((struct ip *)p)->ip_v == 4 ? + inet_ntoa(&((struct ip *)p)->ip_src.s_addr) : + inet_ntoa6(&((struct ip6_hdr *)p)->ip6_src); + ip_daddr = p == NULL ? 0 : + ((struct ip *)p)->ip_v == 4 ? + inet_ntoa(&((struct ip *)p)->ip_dst.s_addr) : + inet_ntoa6(&((struct ip6_hdr *)p)->ip6_dst); +}; + +#pragma D binding "1.0" IFF_LOOPBACK +inline int IFF_LOOPBACK = 0x8; + +#pragma D binding "1.0" translator +translator ifinfo_t < struct ifnet *p > { + if_name = p->if_xname; + if_local = (p->if_flags & IFF_LOOPBACK) == 0 ? 0 : 1; + if_addr = (uintptr_t)p; +}; + +#pragma D binding "1.0" translator +translator ipv4info_t < struct ip *p > { + ipv4_ver = p == NULL ? 0 : p->ip_v; + ipv4_ihl = p == NULL ? 0 : p->ip_hl; + ipv4_tos = p == NULL ? 0 : p->ip_tos; + ipv4_length = p == NULL ? 0 : ntohs(p->ip_len); + ipv4_ident = p == NULL ? 0 : ntohs(p->ip_id); + ipv4_flags = p == NULL ? 0 : (p->ip_off & 0xe000); + ipv4_offset = p == NULL ? 0 : p->ip_off; + ipv4_ttl = p == NULL ? 0 : p->ip_ttl; + ipv4_protocol = p == NULL ? 0 : p->ip_p; + ipv4_protostr = p == NULL ? "" : protocols[p->ip_p]; + ipv4_checksum = p == NULL ? 0 : ntohs(p->ip_sum); + ipv4_src = p == NULL ? 0 : (ipaddr_t)ntohl(p->ip_src.s_addr); + ipv4_dst = p == NULL ? 0 : (ipaddr_t)ntohl(p->ip_dst.s_addr); + ipv4_saddr = p == NULL ? 0 : inet_ntoa(&p->ip_src.s_addr); + ipv4_daddr = p == NULL ? 0 : inet_ntoa(&p->ip_dst.s_addr); + ipv4_hdr = (ipha_t *)p; +}; + +#pragma D binding "1.0" translator +translator ipv6info_t < struct ip6_hdr *p > { + ipv6_ver = p == NULL ? 0 : (ntohl(p->ip6_ctlun.ip6_un1.ip6_un1_flow) & 0xf0000000) >> 28; + ipv6_tclass = p == NULL ? 0 : (ntohl(p->ip6_ctlun.ip6_un1.ip6_un1_flow) & 0x0ff00000) >> 20; + ipv6_flow = p == NULL ? 0 : ntohl(p->ip6_ctlun.ip6_un1.ip6_un1_flow) & 0x000fffff; + ipv6_plen = p == NULL ? 0 : ntohs(p->ip6_ctlun.ip6_un1.ip6_un1_plen); + ipv6_nexthdr = p == NULL ? 0 : p->ip6_ctlun.ip6_un1.ip6_un1_nxt; + ipv6_nextstr = p == NULL ? "" : protocols[p->ip6_ctlun.ip6_un1.ip6_un1_nxt]; + ipv6_hlim = p == NULL ? 0 : p->ip6_ctlun.ip6_un1.ip6_un1_hlim; + ipv6_src = p == NULL ? 0 : (in6_addr_t *)&p->ip6_src; + ipv6_dst = p == NULL ? 0 : (in6_addr_t *)&p->ip6_dst; + ipv6_saddr = p == NULL ? 0 : inet_ntoa6(&p->ip6_src); + ipv6_daddr = p == NULL ? 0 : inet_ntoa6(&p->ip6_dst); + ipv6_hdr = (ip6_t *)p; +}; Added: head/cddl/lib/libdtrace/tcp.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/lib/libdtrace/tcp.d Sun Aug 25 21:54:41 2013 (r254889) @@ -0,0 +1,203 @@ +/* + * 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 + * + * $FreeBSD$ + */ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013 Mark Johnston + */ + +#pragma D depends_on library ip.d +#pragma D depends_on provider tcp + +/* + * Convert a TCP state value to a string. + */ +#pragma D binding "1.0" TCPS_CLOSED +inline int TCPS_CLOSED = 0; +#pragma D binding "1.0" TCPS_LISTEN +inline int TCPS_LISTEN = 1; +#pragma D binding "1.0" TCPS_SYN_SENT +inline int TCPS_SYN_SENT = 2; +#pragma D binding "1.0" TCPS_SYN_RECEIVED +inline int TCPS_SYN_RECEIVED = 3; +#pragma D binding "1.0" TCPS_ESTABLISHED +inline int TCPS_ESTABLISHED = 4; +#pragma D binding "1.0" TCPS_CLOSE_WAIT +inline int TCPS_CLOSE_WAIT = 5; +#pragma D binding "1.0" TCPS_FIN_WAIT_1 +inline int TCPS_FIN_WAIT_1 = 6; +#pragma D binding "1.0" TCPS_CLOSING +inline int TCPS_CLOSING = 7; +#pragma D binding "1.0" TCPS_LAST_ACK +inline int TCPS_LAST_ACK = 8; +#pragma D binding "1.0" TCPS_FIN_WAIT_2 +inline int TCPS_FIN_WAIT_2 = 9; +#pragma D binding "1.0" TCPS_TIME_WAIT +inline int TCPS_TIME_WAIT = 10; + +/* TCP segment flags. */ +#pragma D binding "1.0" TH_FIN +inline uint8_t TH_FIN = 0x01; +#pragma D binding "1.0" TH_SYN +inline uint8_t TH_SYN = 0x02; +#pragma D binding "1.0" TH_RST +inline uint8_t TH_RST = 0x04; +#pragma D binding "1.0" TH_PUSH +inline uint8_t TH_PUSH = 0x08; +#pragma D binding "1.0" TH_ACK +inline uint8_t TH_ACK = 0x10; +#pragma D binding "1.0" TH_URG +inline uint8_t TH_URG = 0x20; +#pragma D binding "1.0" TH_ECE +inline uint8_t TH_ECE = 0x40; +#pragma D binding "1.0" TH_CWR +inline uint8_t TH_CWR = 0x80; + +/* TCP connection state strings. */ +#pragma D binding "1.0" tcp_state_string +inline string tcp_state_string[int32_t state] = + state == TCPS_CLOSED ? "state-closed" : + state == TCPS_LISTEN ? "state-listen" : + state == TCPS_SYN_SENT ? "state-syn-sent" : + state == TCPS_SYN_RECEIVED ? "state-syn-received" : + state == TCPS_ESTABLISHED ? "state-established" : + state == TCPS_CLOSE_WAIT ? "state-close-wait" : + state == TCPS_FIN_WAIT_1 ? "state-fin-wait-1" : + state == TCPS_CLOSING ? "state-closing" : + state == TCPS_LAST_ACK ? "state-last-ack" : + state == TCPS_FIN_WAIT_2 ? "state-fin-wait-2" : + state == TCPS_TIME_WAIT ? "state-time-wait" : + ""; + +/* + * tcpsinfo contains stable TCP details from tcp_t. + */ +typedef struct tcpsinfo { + uintptr_t tcps_addr; + int tcps_local; /* is delivered locally, boolean */ + int tcps_active; /* active open (from here), boolean */ + uint16_t tcps_lport; /* local port */ + uint16_t tcps_rport; /* remote port */ + string tcps_laddr; /* local address, as a string */ + string tcps_raddr; /* remote address, as a string */ + int32_t tcps_state; /* TCP state */ + uint32_t tcps_iss; /* Initial sequence # sent */ + uint32_t tcps_suna; /* sequence # sent but unacked */ + uint32_t tcps_snxt; /* next sequence # to send */ + uint32_t tcps_rack; /* sequence # we have acked */ + uint32_t tcps_rnxt; /* next sequence # expected */ + uint32_t tcps_swnd; /* send window size */ + int32_t tcps_snd_ws; /* send window scaling */ + uint32_t tcps_rwnd; /* receive window size */ + int32_t tcps_rcv_ws; /* receive window scaling */ + uint32_t tcps_cwnd; /* congestion window */ + uint32_t tcps_cwnd_ssthresh; /* threshold for congestion avoidance */ + uint32_t tcps_sack_fack; /* SACK sequence # we have acked */ + uint32_t tcps_sack_snxt; /* next SACK seq # for retransmission */ + uint32_t tcps_rto; /* round-trip timeout, msec */ + uint32_t tcps_mss; /* max segment size */ + int tcps_retransmit; /* retransmit send event, boolean */ +} tcpsinfo_t; + +/* + * tcplsinfo provides the old tcp state for state changes. + */ +typedef struct tcplsinfo { + int32_t tcps_state; /* previous TCP state */ +} tcplsinfo_t; + +/* + * tcpinfo is the TCP header fields. + */ +typedef struct tcpinfo { + uint16_t tcp_sport; /* source port */ + uint16_t tcp_dport; /* destination port */ + uint32_t tcp_seq; /* sequence number */ + uint32_t tcp_ack; /* acknowledgment number */ + uint8_t tcp_offset; /* data offset, in bytes */ + uint8_t tcp_flags; /* flags */ + uint16_t tcp_window; /* window size */ + uint16_t tcp_checksum; /* checksum */ + uint16_t tcp_urgent; /* urgent data pointer */ + struct tcphdr *tcp_hdr; /* raw TCP header */ +} tcpinfo_t; + +#pragma D binding "1.0" translator +translator csinfo_t < struct tcpcb *p > { + cs_addr = NULL; + cs_cid = (uint64_t)p; + cs_pid = 0; + cs_zoneid = 0; +}; + +#pragma D binding "1.0" translator +translator tcpsinfo_t < struct tcpcb *p > { + tcps_addr = (uintptr_t)p; + tcps_local = -1; /* XXX */ + tcps_active = -1; /* XXX */ + tcps_lport = p == NULL ? 0 : ntohs(p->t_inpcb->inp_inc.inc_ie.ie_lport); + tcps_rport = p == NULL ? 0 : ntohs(p->t_inpcb->inp_inc.inc_ie.ie_fport); + tcps_laddr = p == NULL ? 0 : + p->t_inpcb->inp_vflag == INP_IPV4 ? + inet_ntoa(&p->t_inpcb->inp_inc.inc_ie.ie_dependladdr.ie46_local.ia46_addr4.s_addr) : + inet_ntoa6(&p->t_inpcb->inp_inc.inc_ie.ie_dependladdr.ie6_local); + tcps_raddr = p == NULL ? 0 : + p->t_inpcb->inp_vflag == INP_IPV4 ? + inet_ntoa(&p->t_inpcb->inp_inc.inc_ie.ie_dependfaddr.ie46_foreign.ia46_addr4.s_addr) : + inet_ntoa6(&p->t_inpcb->inp_inc.inc_ie.ie_dependfaddr.ie6_foreign); + tcps_state = p == NULL ? -1 : p->t_state; + tcps_iss = p == NULL ? 0 : p->iss; + tcps_suna = p == NULL ? 0 : p->snd_una; + tcps_snxt = p == NULL ? 0 : p->snd_nxt; + tcps_rack = p == NULL ? 0 : p->last_ack_sent; + tcps_rnxt = p == NULL ? 0 : p->rcv_nxt; + tcps_swnd = p == NULL ? -1 : p->snd_wnd; + tcps_snd_ws = p == NULL ? -1 : p->snd_scale; + tcps_rwnd = p == NULL ? -1 : p->rcv_wnd; + tcps_rcv_ws = p == NULL ? -1 : p->rcv_scale; + tcps_cwnd = p == NULL ? -1 : p->snd_cwnd; + tcps_cwnd_ssthresh = p == NULL ? -1 : p->snd_ssthresh; + tcps_sack_fack = p == NULL ? 0 : p->snd_fack; + tcps_sack_snxt = p == NULL ? 0 : p->sack_newdata; + tcps_rto = p == NULL ? -1 : p->t_rxtcur / 1000; /* XXX */ + tcps_mss = p == NULL ? -1 : p->t_maxseg; + tcps_retransmit = -1; /* XXX */ +}; + +#pragma D binding "1.0" translator +translator tcpinfo_t < struct tcphdr *p > { + tcp_sport = p == NULL ? 0 : ntohs(p->th_sport); + tcp_dport = p == NULL ? 0 : ntohs(p->th_dport); + tcp_seq = p == NULL ? -1 : ntohl(p->th_seq); + tcp_ack = p == NULL ? -1 : ntohl(p->th_ack); + tcp_offset = p == NULL ? -1 : (p->th_off >> 2); + tcp_flags = p == NULL ? 0 : p->th_flags; + tcp_window = p == NULL ? 0 : ntohs(p->th_win); + tcp_checksum = p == NULL ? 0 : ntohs(p->th_sum); + tcp_urgent = p == NULL ? 0 : ntohs(p->th_urp); + tcp_hdr = (struct tcphdr *)p; +}; + +#pragma D binding "1.0" translator +translator tcplsinfo_t < int s > { + tcps_state = s; +}; Added: head/cddl/lib/libdtrace/udp.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/lib/libdtrace/udp.d Sun Aug 25 21:54:41 2013 (r254889) @@ -0,0 +1,75 @@ +/* + * 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 + * + * $FreeBSD$ + */ +/* + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013 Mark Johnston + */ + +#pragma D depends_on library ip.d +#pragma D depends_on provider udp + +/* + * udpsinfo contains stable UDP details. + */ +typedef struct udpsinfo { + uintptr_t udps_addr; + uint16_t udps_lport; /* local port */ + uint16_t udps_rport; /* remote port */ + string udps_laddr; /* local address, as a string */ + string udps_raddr; /* remote address, as a string */ +} udpsinfo_t; + +/* + * udpinfo is the UDP header fields. + */ +typedef struct udpinfo { + uint16_t udp_sport; /* source port */ + uint16_t udp_dport; /* destination port */ + uint16_t udp_length; /* total length */ + uint16_t udp_checksum; /* headers + data checksum */ + struct udphdr *udp_hdr; /* raw UDP header */ +} udpinfo_t; + +#pragma D binding "1.0" translator +translator udpsinfo_t < struct inpcb *p > { + udps_addr = (uintptr_t)p; + udps_lport = p == NULL ? 0 : ntohs(p->inp_inc.inc_ie.ie_lport); + udps_rport = p == NULL ? 0 : ntohs(p->inp_inc.inc_ie.ie_fport); + udps_laddr = p == NULL ? "" : + p->inp_vflag == INP_IPV4 ? + inet_ntoa(&p->inp_inc.inc_ie.ie_dependladdr.ie46_local.ia46_addr4.s_addr) : + inet_ntoa6(&p->inp_inc.inc_ie.ie_dependladdr.ie6_local); + udps_raddr = p == NULL ? "" : + p->inp_vflag == INP_IPV4 ? + inet_ntoa(&p->inp_inc.inc_ie.ie_dependfaddr.ie46_foreign.ia46_addr4.s_addr) : + inet_ntoa6(&p->inp_inc.inc_ie.ie_dependfaddr.ie6_foreign); +}; + +#pragma D binding "1.0" translator +translator udpinfo_t < struct udphdr *p > { + udp_sport = p == NULL ? 0 : ntohs(p->uh_sport); + udp_dport = p == NULL ? 0 : ntohs(p->uh_dport); + udp_length = p == NULL ? 0 : ntohs(p->uh_ulen); + udp_checksum = p == NULL ? 0 : ntohs(p->uh_sum); + udp_hdr = p; +}; Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Aug 25 21:52:04 2013 (r254888) +++ head/sys/conf/files Sun Aug 25 21:54:41 2013 (r254889) @@ -3228,6 +3228,7 @@ netinet/if_ether.c optional inet ether netinet/igmp.c optional inet netinet/in.c optional inet netinet/in_debug.c optional inet ddb +netinet/in_kdtrace.c optional inet | inet6 netinet/ip_carp.c optional inet carp | inet6 carp netinet/in_gif.c optional gif inet | netgraph_gif inet netinet/ip_gre.c optional gre inet Added: head/sys/netinet/in_kdtrace.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/netinet/in_kdtrace.c Sun Aug 25 21:54:41 2013 (r254889) @@ -0,0 +1,127 @@ +/*- + * Copyright (c) 2013 Mark Johnston + * + * 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$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_kdtrace.h" + +#include +#include +#include + +SDT_PROVIDER_DEFINE(ip); +SDT_PROVIDER_DEFINE(tcp); +SDT_PROVIDER_DEFINE(udp); + +SDT_PROBE_DEFINE6_XLATE(ip, , , receive, receive, + "void *", "pktinfo_t *", + "void *", "csinfo_t *", + "uint8_t *", "ipinfo_t *", + "struct ifnet *", "ifinfo_t *", + "struct ip *", "ipv4info_t *", + "struct ip6_hdr *", "ipv6info_t *"); + +SDT_PROBE_DEFINE6_XLATE(ip, , , send, send, + "void *", "pktinfo_t *", + "void *", "csinfo_t *", + "uint8_t *", "ipinfo_t *", + "struct ifnet *", "ifinfo_t *", + "struct ip *", "ipv4info_t *", + "struct ip6_hdr *", "ipv6info_t *"); + +SDT_PROBE_DEFINE5_XLATE(tcp, , , accept_established, accept-established, + "void *", "pktinfo_t *", + "struct tcpcb *", "csinfo_t *", + "uint8_t *", "ipinfo_t *", + "struct tcpcb *", "tcpsinfo_t *" , + "struct tcphdr *", "tcpinfo_t *"); + +SDT_PROBE_DEFINE5_XLATE(tcp, , , accept_refused, accept-refused, + "void *", "pktinfo_t *", + "struct tcpcb *", "csinfo_t *", + "uint8_t *", "ipinfo_t *", + "struct tcpcb *", "tcpsinfo_t *" , + "struct tcphdr *", "tcpinfo_t *"); + +SDT_PROBE_DEFINE5_XLATE(tcp, , , connect_established, connect-established, + "void *", "pktinfo_t *", + "struct tcpcb *", "csinfo_t *", + "uint8_t *", "ipinfo_t *", + "struct tcpcb *", "tcpsinfo_t *" , + "struct tcphdr *", "tcpinfo_t *"); + +SDT_PROBE_DEFINE5_XLATE(tcp, , , connect_refused, connect-refused, + "void *", "pktinfo_t *", + "struct tcpcb *", "csinfo_t *", + "uint8_t *", "ipinfo_t *", + "struct tcpcb *", "tcpsinfo_t *" , + "struct tcphdr *", "tcpinfo_t *"); + +SDT_PROBE_DEFINE5_XLATE(tcp, , , connect_request, connect-request, + "void *", "pktinfo_t *", + "struct tcpcb *", "csinfo_t *", + "uint8_t *", "ipinfo_t *", + "struct tcpcb *", "tcpsinfo_t *" , + "struct tcphdr *", "tcpinfo_t *"); + +SDT_PROBE_DEFINE5_XLATE(tcp, , , receive, receive, + "void *", "pktinfo_t *", + "struct tcpcb *", "csinfo_t *", + "uint8_t *", "ipinfo_t *", + "struct tcpcb *", "tcpsinfo_t *" , + "struct tcphdr *", "tcpinfo_t *"); + +SDT_PROBE_DEFINE5_XLATE(tcp, , , send, send, + "void *", "pktinfo_t *", + "struct tcpcb *", "csinfo_t *", + "uint8_t *", "ipinfo_t *", + "struct tcpcb *", "tcpsinfo_t *" , + "struct tcphdr *", "tcpinfo_t *"); + +SDT_PROBE_DEFINE6_XLATE(tcp, , , state_change, state-change, + "void *", "void *", + "struct tcpcb *", "csinfo_t *", + "void *", "void *", + "struct tcpcb *", "tcpsinfo_t *", + "void *", "void *", + "int", "tcplsinfo_t *"); + +SDT_PROBE_DEFINE5_XLATE(udp, , , receive, receive, + "void *", "pktinfo_t *", + "struct inpcb *", "csinfo_t *", + "uint8_t *", "ipinfo_t *", + "struct inpcb *", "udpsinfo_t *", + "struct udphdr *", "udpinfo_t *"); + +SDT_PROBE_DEFINE5_XLATE(udp, , , send, send, + "void *", "pktinfo_t *", + "struct inpcb *", "csinfo_t *", + "uint8_t *", "ipinfo_t *", + "struct inpcb *", "udpsinfo_t *", + "struct udphdr *", "udpinfo_t *"); Added: head/sys/netinet/in_kdtrace.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/netinet/in_kdtrace.h Sun Aug 25 21:54:41 2013 (r254889) @@ -0,0 +1,59 @@ +/*- + * Copyright (c) 2013 Mark Johnston + * + * 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_IN_KDTRACE_H_ +#define _SYS_IN_KDTRACE_H_ + +#define IP_PROBE(probe, arg0, arg1, arg2, arg3, arg4, arg5) \ + SDT_PROBE6(ip, , , probe, arg0, arg1, arg2, arg3, arg4, arg5) +#define UDP_PROBE(probe, arg0, arg1, arg2, arg3, arg4) \ + SDT_PROBE5(udp, , , probe, arg0, arg1, arg2, arg3, arg4) +#define TCP_PROBE5(probe, arg0, arg1, arg2, arg3, arg4) \ + SDT_PROBE5(tcp, , , probe, arg0, arg1, arg2, arg3, arg4) +#define TCP_PROBE6(probe, arg0, arg1, arg2, arg3, arg4, arg5) \ + SDT_PROBE6(tcp, , , probe, arg0, arg1, arg2, arg3, arg4, arg5) + +SDT_PROVIDER_DECLARE(ip); +SDT_PROVIDER_DECLARE(tcp); +SDT_PROVIDER_DECLARE(udp); + +SDT_PROBE_DECLARE(ip, , , receive); +SDT_PROBE_DECLARE(ip, , , send); + +SDT_PROBE_DECLARE(tcp, , , accept_established); +SDT_PROBE_DECLARE(tcp, , , accept_refused); +SDT_PROBE_DECLARE(tcp, , , connect_established); +SDT_PROBE_DECLARE(tcp, , , connect_refused); +SDT_PROBE_DECLARE(tcp, , , connect_request); +SDT_PROBE_DECLARE(tcp, , , receive); +SDT_PROBE_DECLARE(tcp, , , send); +SDT_PROBE_DECLARE(tcp, , , state_change); + +SDT_PROBE_DECLARE(udp, , , receive); +SDT_PROBE_DECLARE(udp, , , send); + +#endif Modified: head/sys/netinet/ip_fastfwd.c ============================================================================== --- head/sys/netinet/ip_fastfwd.c Sun Aug 25 21:52:04 2013 (r254888) +++ head/sys/netinet/ip_fastfwd.c Sun Aug 25 21:54:41 2013 (r254889) @@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ipfw.h" #include "opt_ipstealth.h" +#include "opt_kdtrace.h" #include #include @@ -85,6 +86,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -97,6 +99,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -531,6 +534,7 @@ passout: /* * Send off the packet via outgoing interface */ + IP_PROBE(send, NULL, NULL, ip, ifp, ip, NULL); error = (*ifp->if_output)(ifp, m, (struct sockaddr *)dst, &ro); } else { @@ -562,6 +566,7 @@ passout: */ m_clrprotoflags(m); + IP_PROBE(send, NULL, NULL, ip, ifp, ip, NULL); error = (*ifp->if_output)(ifp, m, (struct sockaddr *)dst, &ro); if (error) Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Sun Aug 25 21:52:04 2013 (r254888) +++ head/sys/netinet/ip_input.c Sun Aug 25 21:54:41 2013 (r254889) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ipfw.h" #include "opt_ipstealth.h" #include "opt_ipsec.h" +#include "opt_kdtrace.h" #include "opt_route.h" #include @@ -49,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -63,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -429,6 +432,8 @@ ip_input(struct mbuf *m) ip = mtod(m, struct ip *); } + IP_PROBE(receive, NULL, NULL, ip, m->m_pkthdr.rcvif, ip, NULL); + /* 127/8 must not appear on wire - RFC1122 */ ifp = m->m_pkthdr.rcvif; if ((ntohl(ip->ip_dst.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET || Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Sun Aug 25 21:52:04 2013 (r254888) +++ head/sys/netinet/ip_output.c Sun Aug 25 21:54:41 2013 (r254889) @@ -34,9 +34,10 @@ __FBSDID("$FreeBSD$"); #include "opt_ipfw.h" #include "opt_ipsec.h" -#include "opt_route.h" +#include "opt_kdtrace.h" #include "opt_mbuf_stress_test.h" #include "opt_mpath.h" +#include "opt_route.h" #include "opt_sctp.h" #include @@ -47,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -64,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -622,6 +625,7 @@ passout: * to avoid confusing lower layers. */ m_clrprotoflags(m); + IP_PROBE(send, NULL, NULL, ip, ifp, ip, NULL); error = (*ifp->if_output)(ifp, m, (const struct sockaddr *)gw, ro); goto done; @@ -656,6 +660,7 @@ passout: */ m_clrprotoflags(m); + IP_PROBE(send, NULL, NULL, ip, ifp, ip, NULL); error = (*ifp->if_output)(ifp, m, (const struct sockaddr *)gw, ro); } else Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Sun Aug 25 21:52:04 2013 (r254888) +++ head/sys/netinet/tcp_input.c Sun Aug 25 21:54:41 2013 (r254889) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" +#include "opt_kdtrace.h" #include "opt_tcpdebug.h" #include @@ -63,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include /* for proc0 declaration */ #include +#include #include #include #include @@ -82,6 +84,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -688,7 +691,10 @@ tcp_input(struct mbuf *m, int off0) bzero(ipov->ih_x1, sizeof(ipov->ih_x1)); ipov->ih_len = htons(tlen); th->th_sum = in_cksum(m, len); + /* Reset length for SDT probes. */ + ip->ip_len = htons(tlen + off0); } + if (th->th_sum) { TCPSTAT_INC(tcps_rcvbadsum); goto drop; @@ -1384,6 +1390,8 @@ relocked: } #endif + TCP_PROBE5(receive, NULL, tp, m->m_data, tp, th); + /* * Segment belongs to a connection in SYN_SENT, ESTABLISHED or later * state. tcp_do_segment() always consumes the mbuf chain, unlocks @@ -1394,6 +1402,8 @@ relocked: return; dropwithreset: + TCP_PROBE5(receive, NULL, tp, m->m_data, tp, th); + if (ti_locked == TI_WLOCKED) { INP_INFO_WUNLOCK(&V_tcbinfo); ti_locked = TI_UNLOCKED; @@ -1415,6 +1425,9 @@ dropwithreset: goto drop; dropunlock: + if (m != NULL) + TCP_PROBE5(receive, NULL, tp, m->m_data, tp, th); + if (ti_locked == TI_WLOCKED) { INP_INFO_WUNLOCK(&V_tcbinfo); ti_locked = TI_UNLOCKED; @@ -1910,8 +1923,11 @@ tcp_do_segment(struct mbuf *m, struct tc rstreason = BANDLIM_UNLIMITED; goto dropwithreset; } - if ((thflags & (TH_ACK|TH_RST)) == (TH_ACK|TH_RST)) + if ((thflags & (TH_ACK|TH_RST)) == (TH_ACK|TH_RST)) { + TCP_PROBE5(connect_refused, NULL, tp, m->m_data, tp, + th); tp = tcp_drop(tp, ECONNREFUSED); + } if (thflags & TH_RST) goto drop; if (!(thflags & TH_SYN)) @@ -1956,11 +1972,13 @@ tcp_do_segment(struct mbuf *m, struct tc */ tp->t_starttime = ticks; if (tp->t_flags & TF_NEEDFIN) { - tp->t_state = TCPS_FIN_WAIT_1; + tcp_state_change(tp, TCPS_FIN_WAIT_1); tp->t_flags &= ~TF_NEEDFIN; thflags &= ~TH_SYN; } else { - tp->t_state = TCPS_ESTABLISHED; + tcp_state_change(tp, TCPS_ESTABLISHED); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Aug 25 22:15:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 39672D21; Sun, 25 Aug 2013 22:15:20 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from caravan.chchile.org (caravan.chchile.org [178.32.125.136]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B50E1258A; Sun, 25 Aug 2013 22:15:19 +0000 (UTC) Received: by caravan.chchile.org (Postfix, from userid 1000) id ABAF0C1FC1; Sun, 25 Aug 2013 22:15:17 +0000 (UTC) Date: Mon, 26 Aug 2013 00:15:17 +0200 From: Jeremie Le Hen To: Xin LI Subject: Re: svn commit: r254585 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20130825221517.GM24767@caravan.chchile.org> Mail-Followup-To: Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201308202231.r7KMVERi068300@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201308202231.r7KMVERi068300@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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 22:15:20 -0000 Hi Xin, On Tue, Aug 20, 2013 at 10:31:14PM +0000, Xin LI wrote: > Author: delphij > Date: Tue Aug 20 22:31:13 2013 > New Revision: 254585 > URL: http://svnweb.freebsd.org/changeset/base/254585 > > Log: > MFV r254220: > > Illumos ZFS issues: > 4039 zfs_rename()/zfs_link() needs stronger test for XDEV > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c > Directory Properties: > head/sys/cddl/contrib/opensolaris/ (props changed) > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Aug 20 21:47:07 2013 (r254584) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Aug 20 22:31:13 2013 (r254585) > @@ -21,6 +21,7 @@ > /* > * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. > * Copyright (c) 2013 by Delphix. All rights reserved. > + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. > */ > > /* Portions Copyright 2007 Jeremy Teo */ > @@ -3727,13 +3728,18 @@ zfs_rename(vnode_t *sdvp, char *snm, vno > if (VOP_REALVP(tdvp, &realvp, ct) == 0) > tdvp = realvp; > > - if (tdvp->v_vfsp != sdvp->v_vfsp || zfsctl_is_node(tdvp)) { > + tdzp = VTOZ(tdvp); > + ZFS_VERIFY_ZP(tdzp); > + > + /* > + * We check z_zfsvfs rather than v_vfsp here, because snapshots and the > + * ctldir appear to have the same v_vfsp. > + */ > + if (tdzp->z_zfsvfs != zfsvfs || zfsctl_is_node(tdvp)) { > ZFS_EXIT(zfsvfs); > return (SET_ERROR(EXDEV)); > } > > - tdzp = VTOZ(tdvp); > - ZFS_VERIFY_ZP(tdzp); > if (zfsvfs->z_utf8 && u8_validate(tnm, > strlen(tnm), NULL, U8_VALIDATE_ENTIRE, &error) < 0) { > ZFS_EXIT(zfsvfs); > @@ -4293,14 +4299,18 @@ zfs_link(vnode_t *tdvp, vnode_t *svp, ch > return (SET_ERROR(EPERM)); > } > > - if (svp->v_vfsp != tdvp->v_vfsp || zfsctl_is_node(svp)) { > + szp = VTOZ(svp); > + ZFS_VERIFY_ZP(szp); > + > + /* > + * We check z_zfsvfs rather than v_vfsp here, because snapshots and the > + * ctldir appear to have the same v_vfsp. > + */ > + if (szp->z_zfsvfs != zfsvfs || zfsctl_is_node(svp)) { > ZFS_EXIT(zfsvfs); > return (SET_ERROR(EXDEV)); > } > > - szp = VTOZ(svp); > - ZFS_VERIFY_ZP(szp); > - > /* Prevent links to .zfs/shares files */ > > if ((error = sa_lookup(szp->z_sa_hdl, SA_ZPL_PARENT(zfsvfs), I suspect this leads to a panic on my -CURRENT machine: #1 0xffffffff8033a664 in db_fncall_generic (addr=-2138557936, rv=0xfffffe00e5a30c90, nargs=0, args=0xfffffe00e5a30ca0) at /usr/src/sys/ddb/db_command.c:578 #2 0xffffffff8033a34a in db_fncall (dummy1=-2138210939, dummy2=0, dummy3=-1, dummy4=0xfffffe00e5a30d80 "") at /usr/src/sys/ddb/db_command.c:630 #3 0xffffffff80339fe1 in db_command (last_cmdp=0xffffffff812b7850, cmd_table=0x0, dopager=0) at /usr/src/sys/ddb/db_command.c:449 #4 0xffffffff8033a0c2 in db_command_script ( command=0xffffffff812b8754 "call doadump") at /usr/src/sys/ddb/db_command.c:520 #5 0xffffffff80340b09 in db_script_exec ( scriptname=0xfffffe00e5a30f50 "kdb.enter.panic", warnifnotfound=0) at /usr/src/sys/ddb/db_script.c:302 #6 0xffffffff8034096c in db_script_kdbenter ( eventname=0xffffffff80f7cd55 "panic") at /usr/src/sys/ddb/db_script.c:324 #7 0xffffffff8033dee1 in db_trap (type=3, code=0) at /usr/src/sys/ddb/db_main.c:230 #8 0xffffffff808d84b6 in kdb_trap (type=3, code=0, tf=0xfffffe00e5a31390) at /usr/src/sys/kern/subr_kdb.c:654 #9 0xffffffff80dbc22a in trap (frame=0xfffffe00e5a31390) at /usr/src/sys/amd64/amd64/trap.c:579 #10 0xffffffff80d99282 in calltrap () at /usr/src/sys/amd64/amd64/exception.S:232 #11 0xffffffff808d7d85 in breakpoint () at cpufunc.h:63 #12 0xffffffff808d79eb in kdb_enter (why=0xffffffff80f7cd55 "panic", msg=0xffffffff80f7cd55 "panic") at /usr/src/sys/kern/subr_kdb.c:445 #13 0xffffffff808838b3 in vpanic ( fmt=0xffffffff81b05389 "solaris assert: %s, file: %s, line: %d", ap=0xfffffe00e5a31530) at /usr/src/sys/kern/kern_shutdown.c:747 #14 0xffffffff80883960 in panic ( fmt=0xffffffff81b05389 "solaris assert: %s, file: %s, line: %d") at /usr/src/sys/kern/kern_shutdown.c:683 #15 0xffffffff81b0443c in assfail ( a=0xffffffff819ab3cc "zp == NULL || zp->z_vnode == NULL || zp->z_vnode == vp", f=0xffffffff819ab403 "/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h", l=248) at /usr/src/sys/modules/opensolaris/../../cddl/compat/opensolaris/kern/opensolaris_cmn_err.c:81 #16 0xffffffff8191b111 in VTOZ (vp=0xfffff800967f5b10) at zfs_znode.h:248 #17 0xffffffff8192372c in zfs_rename (sdvp=0xfffff800911bf3b0, snm=0xfffff80004a9d806 "patchoHq2mGI", tdvp=0xfffff800967f5b10, tnm=0xfffff8000451780f "periodic.conf.5", cr=0xfffff80011d4ce00, ct=0x0, flags=0) at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c:3731 #18 0xffffffff8191ec06 in zfs_freebsd_rename (ap=0xfffffe00e5a317a8) at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c:6253 #19 0xffffffff80eb67be in VOP_RENAME_APV (vop=0xffffffff819b5f80, a=0xfffffe00e5a317a8) at vnode_if.c:1546 #20 0xffffffff8099db19 in VOP_RENAME (fdvp=0xfffff800911bf3b0, fvp=0xfffff800910831d8, fcnp=0xfffffe00e5a31990, tdvp=0xfffff800967f5b10, tvp=0x0, tcnp=0xfffffe00e5a318d0) at vnode_if.h:636 #21 0xffffffff8099d99e in kern_renameat (td=0xfffff8001c0db920, oldfd=-100, old=0x800c4a040
, newfd=-100, new=0x800c4a0c0
, pathseg=UIO_USERSPACE) at /usr/src/sys/kern/vfs_syscalls.c:3558 #22 0xffffffff8099d533 in kern_rename (td=0xfffff8001c0db920, from=0x800c4a040
, to=0x800c4a0c0
, pathseg=UIO_USERSPACE) at /usr/src/sys/kern/vfs_syscalls.c:3465 #23 0xffffffff8099d4fa in sys_rename (td=0xfffff8001c0db920, uap=0xfffffe00e5a31b98) at /usr/src/sys/kern/vfs_syscalls.c:3442 #24 0xffffffff80dbddce in syscallenter (td=0xfffff8001c0db920, sa=0xfffffe00e5a31b88) at subr_syscall.c:134 #25 0xffffffff80dbd78f in amd64_syscall (td=0xfffff8001c0db920, traced=0) at /usr/src/sys/amd64/amd64/trap.c:974 #26 0xffffffff80d9956b in Xfast_syscall () at /usr/src/sys/amd64/amd64/exception.S:391 #27 0x00000008008826ac in ?? () -- Jeremie Le Hen Scientists say the world is made up of Protons, Neutrons and Electrons. They forgot to mention Morons. From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 00:28:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AA145FE; Mon, 26 Aug 2013 00:28:57 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 976D92BDC; Mon, 26 Aug 2013 00:28:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7Q0Svug054478; Mon, 26 Aug 2013 00:28:57 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7Q0SvoI054477; Mon, 26 Aug 2013 00:28:57 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201308260028.r7Q0SvoI054477@svn.freebsd.org> From: Mark Johnston Date: Mon, 26 Aug 2013 00:28:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254893 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 00:28:57 -0000 Author: markj Date: Mon Aug 26 00:28:57 2013 New Revision: 254893 URL: http://svnweb.freebsd.org/changeset/base/254893 Log: The second last argument of udp:::receive is supposed to contain the connection state, not the IP header. X-MFC with: r254889 Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Sun Aug 25 23:26:43 2013 (r254892) +++ head/sys/netinet/udp_usrreq.c Mon Aug 26 00:28:57 2013 (r254893) @@ -620,7 +620,7 @@ udp_input(struct mbuf *m, int off) return; } - UDP_PROBE(receive, NULL, inp, ip, ip, uh); + UDP_PROBE(receive, NULL, inp, ip, inp, uh); udp_append(inp, ip, m, iphlen, &udp_in); INP_RUNLOCK(inp); return; From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 06:26:16 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CDD72BB8; Mon, 26 Aug 2013 06:26:16 +0000 (UTC) (envelope-from jmg@h2.funkthat.com) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8F8BF2B4F; Mon, 26 Aug 2013 06:26:16 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id r7Q6QAmT058689 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 25 Aug 2013 23:26:10 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id r7Q6QA6H058688; Sun, 25 Aug 2013 23:26:10 -0700 (PDT) (envelope-from jmg) Date: Sun, 25 Aug 2013 23:26:10 -0700 From: John-Mark Gurney To: Ollivier Robert Subject: Re: svn commit: r254859 - stable/9/sys/geom/eli Message-ID: <20130826062610.GC29777@funkthat.com> References: <201308251429.r7PETlY7035520@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201308251429.r7PETlY7035520@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Sun, 25 Aug 2013 23:26:10 -0700 (PDT) Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-9@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 06:26:16 -0000 Ollivier Robert wrote this message on Sun, Aug 25, 2013 at 14:29 +0000: > Author: roberto > Date: Sun Aug 25 14:29:47 2013 > New Revision: 254859 > URL: http://svnweb.freebsd.org/changeset/base/254859 > > Log: > MFC r226840: AESNI-related commit, from a long time ago: > > Before this change when GELI detected hardware crypto acceleration it will > start only one worker thread. For software crypto it will start by default > N worker threads where N is the number of available CPUs. > > This is not optimal if hardware crypto is AES-NI, which uses CPU for AES > calculations. > > Change that to always start one worker thread for every available CPU. > Number of worker threads per GELI provider can be easly reduced with > kern.geom.eli.threads sysctl/tunable and even for software crypto it > should be reduced when using more providers. > > While here, when number of threads exceeds number of CPUs avilable don't > reduce this number, assume the user knows what he is doing. > > Submitted by: Michael Moll I'll just point out that if you have a large number of geli volumes, that this turns out to hurt performance rather than help it.. At least in my testing on a 6 core machine w/ an 8 disk zfs pool where all 8 disks are encrypted... I think the problem is that we launch threads on a per geli/disk instead of just having a generic set of threads that can work with any geli volume... When you have 17 geli volumes (like I do on my machine) * 6 threads, thats a lot of threads, imagine if the box had 32 or 64 cores? You're looking at 500-1000 threads just for encryption... In case someone asks, 8 zfs disks + 2 spares, swap, l2arc * 2, zil * 2 and zfs mirrored root all encrypted volumes... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 06:31:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A1398D28; Mon, 26 Aug 2013 06:31:57 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8C25C2B97; Mon, 26 Aug 2013 06:31:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7Q6Vvu8049868; Mon, 26 Aug 2013 06:31:57 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7Q6VvaS049867; Mon, 26 Aug 2013 06:31:57 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308260631.r7Q6VvaS049867@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Mon, 26 Aug 2013 06:31:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254894 - head/sys/dev/drm2/radeon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 06:31:57 -0000 Author: dumbbell Date: Mon Aug 26 06:31:57 2013 New Revision: 254894 URL: http://svnweb.freebsd.org/changeset/base/254894 Log: drm/radeon: Rename the (S)DEBUG macros in atom.c to avoid conflicts For instance, DEBUG is already defined in the LINT kernel configuration. This fixes the build of LINT. Modified: head/sys/dev/drm2/radeon/atom.c Modified: head/sys/dev/drm2/radeon/atom.c ============================================================================== --- head/sys/dev/drm2/radeon/atom.c Mon Aug 26 00:28:57 2013 (r254893) +++ head/sys/dev/drm2/radeon/atom.c Mon Aug 26 06:31:57 2013 (r254894) @@ -89,11 +89,11 @@ static void debug_print_spaces(int n) printf(" "); } -#define DEBUG(...) do if (atom_debug) { printf(__FILE__ __VA_ARGS__); } while (0) -#define SDEBUG(...) do if (atom_debug) { printf(__FILE__); debug_print_spaces(debug_depth); printf(__VA_ARGS__); } while (0) +#define ATOM_DEBUG_PRINT(...) do if (atom_debug) { printf(__FILE__ __VA_ARGS__); } while (0) +#define ATOM_SDEBUG_PRINT(...) do if (atom_debug) { printf(__FILE__); debug_print_spaces(debug_depth); printf(__VA_ARGS__); } while (0) #else -#define DEBUG(...) do { } while (0) -#define SDEBUG(...) do { } while (0) +#define ATOM_DEBUG_PRINT(...) do { } while (0) +#define ATOM_SDEBUG_PRINT(...) do { } while (0) #endif static uint32_t atom_iio_execute(struct atom_context *ctx, int base, @@ -183,7 +183,7 @@ static uint32_t atom_get_src_int(atom_ex idx = U16(*ptr); (*ptr) += 2; if (print) - DEBUG("REG[0x%04X]", idx); + ATOM_DEBUG_PRINT("REG[0x%04X]", idx); idx += gctx->reg_block; switch (gctx->io_mode) { case ATOM_IO_MM: @@ -221,13 +221,13 @@ static uint32_t atom_get_src_int(atom_ex * tables, noticed on a DEC Alpha. */ val = get_unaligned_le32((u32 *)&ctx->ps[idx]); if (print) - DEBUG("PS[0x%02X,0x%04X]", idx, val); + ATOM_DEBUG_PRINT("PS[0x%02X,0x%04X]", idx, val); break; case ATOM_ARG_WS: idx = U8(*ptr); (*ptr)++; if (print) - DEBUG("WS[0x%02X]", idx); + ATOM_DEBUG_PRINT("WS[0x%02X]", idx); switch (idx) { case ATOM_WS_QUOTIENT: val = gctx->divmul[0]; @@ -265,9 +265,9 @@ static uint32_t atom_get_src_int(atom_ex (*ptr) += 2; if (print) { if (gctx->data_block) - DEBUG("ID[0x%04X+%04X]", idx, gctx->data_block); + ATOM_DEBUG_PRINT("ID[0x%04X+%04X]", idx, gctx->data_block); else - DEBUG("ID[0x%04X]", idx); + ATOM_DEBUG_PRINT("ID[0x%04X]", idx); } val = U32(idx + gctx->data_block); break; @@ -281,7 +281,7 @@ static uint32_t atom_get_src_int(atom_ex } else val = gctx->scratch[(gctx->fb_base / 4) + idx]; if (print) - DEBUG("FB[0x%02X]", idx); + ATOM_DEBUG_PRINT("FB[0x%02X]", idx); break; case ATOM_ARG_IMM: switch (align) { @@ -289,7 +289,7 @@ static uint32_t atom_get_src_int(atom_ex val = U32(*ptr); (*ptr) += 4; if (print) - DEBUG("IMM 0x%08X\n", val); + ATOM_DEBUG_PRINT("IMM 0x%08X\n", val); return val; case ATOM_SRC_WORD0: case ATOM_SRC_WORD8: @@ -297,7 +297,7 @@ static uint32_t atom_get_src_int(atom_ex val = U16(*ptr); (*ptr) += 2; if (print) - DEBUG("IMM 0x%04X\n", val); + ATOM_DEBUG_PRINT("IMM 0x%04X\n", val); return val; case ATOM_SRC_BYTE0: case ATOM_SRC_BYTE8: @@ -306,7 +306,7 @@ static uint32_t atom_get_src_int(atom_ex val = U8(*ptr); (*ptr)++; if (print) - DEBUG("IMM 0x%02X\n", val); + ATOM_DEBUG_PRINT("IMM 0x%02X\n", val); return val; } return 0; @@ -314,14 +314,14 @@ static uint32_t atom_get_src_int(atom_ex idx = U8(*ptr); (*ptr)++; if (print) - DEBUG("PLL[0x%02X]", idx); + ATOM_DEBUG_PRINT("PLL[0x%02X]", idx); val = gctx->card->pll_read(gctx->card, idx); break; case ATOM_ARG_MC: idx = U8(*ptr); (*ptr)++; if (print) - DEBUG("MC[0x%02X]", idx); + ATOM_DEBUG_PRINT("MC[0x%02X]", idx); val = gctx->card->mc_read(gctx->card, idx); break; } @@ -332,28 +332,28 @@ static uint32_t atom_get_src_int(atom_ex if (print) switch (align) { case ATOM_SRC_DWORD: - DEBUG(".[31:0] -> 0x%08X\n", val); + ATOM_DEBUG_PRINT(".[31:0] -> 0x%08X\n", val); break; case ATOM_SRC_WORD0: - DEBUG(".[15:0] -> 0x%04X\n", val); + ATOM_DEBUG_PRINT(".[15:0] -> 0x%04X\n", val); break; case ATOM_SRC_WORD8: - DEBUG(".[23:8] -> 0x%04X\n", val); + ATOM_DEBUG_PRINT(".[23:8] -> 0x%04X\n", val); break; case ATOM_SRC_WORD16: - DEBUG(".[31:16] -> 0x%04X\n", val); + ATOM_DEBUG_PRINT(".[31:16] -> 0x%04X\n", val); break; case ATOM_SRC_BYTE0: - DEBUG(".[7:0] -> 0x%02X\n", val); + ATOM_DEBUG_PRINT(".[7:0] -> 0x%02X\n", val); break; case ATOM_SRC_BYTE8: - DEBUG(".[15:8] -> 0x%02X\n", val); + ATOM_DEBUG_PRINT(".[15:8] -> 0x%02X\n", val); break; case ATOM_SRC_BYTE16: - DEBUG(".[23:16] -> 0x%02X\n", val); + ATOM_DEBUG_PRINT(".[23:16] -> 0x%02X\n", val); break; case ATOM_SRC_BYTE24: - DEBUG(".[31:24] -> 0x%02X\n", val); + ATOM_DEBUG_PRINT(".[31:24] -> 0x%02X\n", val); break; } return val; @@ -458,7 +458,7 @@ static void atom_put_dst(atom_exec_conte case ATOM_ARG_REG: idx = U16(*ptr); (*ptr) += 2; - DEBUG("REG[0x%04X]", idx); + ATOM_DEBUG_PRINT("REG[0x%04X]", idx); idx += gctx->reg_block; switch (gctx->io_mode) { case ATOM_IO_MM: @@ -494,13 +494,13 @@ static void atom_put_dst(atom_exec_conte case ATOM_ARG_PS: idx = U8(*ptr); (*ptr)++; - DEBUG("PS[0x%02X]", idx); + ATOM_DEBUG_PRINT("PS[0x%02X]", idx); ctx->ps[idx] = cpu_to_le32(val); break; case ATOM_ARG_WS: idx = U8(*ptr); (*ptr)++; - DEBUG("WS[0x%02X]", idx); + ATOM_DEBUG_PRINT("WS[0x%02X]", idx); switch (idx) { case ATOM_WS_QUOTIENT: gctx->divmul[0] = val; @@ -538,45 +538,45 @@ static void atom_put_dst(atom_exec_conte gctx->fb_base + (idx * 4), gctx->scratch_size_bytes); } else gctx->scratch[(gctx->fb_base / 4) + idx] = val; - DEBUG("FB[0x%02X]", idx); + ATOM_DEBUG_PRINT("FB[0x%02X]", idx); break; case ATOM_ARG_PLL: idx = U8(*ptr); (*ptr)++; - DEBUG("PLL[0x%02X]", idx); + ATOM_DEBUG_PRINT("PLL[0x%02X]", idx); gctx->card->pll_write(gctx->card, idx, val); break; case ATOM_ARG_MC: idx = U8(*ptr); (*ptr)++; - DEBUG("MC[0x%02X]", idx); + ATOM_DEBUG_PRINT("MC[0x%02X]", idx); gctx->card->mc_write(gctx->card, idx, val); return; } switch (align) { case ATOM_SRC_DWORD: - DEBUG(".[31:0] <- 0x%08X\n", old_val); + ATOM_DEBUG_PRINT(".[31:0] <- 0x%08X\n", old_val); break; case ATOM_SRC_WORD0: - DEBUG(".[15:0] <- 0x%04X\n", old_val); + ATOM_DEBUG_PRINT(".[15:0] <- 0x%04X\n", old_val); break; case ATOM_SRC_WORD8: - DEBUG(".[23:8] <- 0x%04X\n", old_val); + ATOM_DEBUG_PRINT(".[23:8] <- 0x%04X\n", old_val); break; case ATOM_SRC_WORD16: - DEBUG(".[31:16] <- 0x%04X\n", old_val); + ATOM_DEBUG_PRINT(".[31:16] <- 0x%04X\n", old_val); break; case ATOM_SRC_BYTE0: - DEBUG(".[7:0] <- 0x%02X\n", old_val); + ATOM_DEBUG_PRINT(".[7:0] <- 0x%02X\n", old_val); break; case ATOM_SRC_BYTE8: - DEBUG(".[15:8] <- 0x%02X\n", old_val); + ATOM_DEBUG_PRINT(".[15:8] <- 0x%02X\n", old_val); break; case ATOM_SRC_BYTE16: - DEBUG(".[23:16] <- 0x%02X\n", old_val); + ATOM_DEBUG_PRINT(".[23:16] <- 0x%02X\n", old_val); break; case ATOM_SRC_BYTE24: - DEBUG(".[31:24] <- 0x%02X\n", old_val); + ATOM_DEBUG_PRINT(".[31:24] <- 0x%02X\n", old_val); break; } } @@ -586,12 +586,12 @@ static void atom_op_add(atom_exec_contex uint8_t attr = U8((*ptr)++); uint32_t dst, src, saved; int dptr = *ptr; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1); - SDEBUG(" src: "); + ATOM_SDEBUG_PRINT(" src: "); src = atom_get_src(ctx, attr, ptr); dst += src; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); atom_put_dst(ctx, arg, attr, &dptr, dst, saved); } @@ -600,12 +600,12 @@ static void atom_op_and(atom_exec_contex uint8_t attr = U8((*ptr)++); uint32_t dst, src, saved; int dptr = *ptr; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1); - SDEBUG(" src: "); + ATOM_SDEBUG_PRINT(" src: "); src = atom_get_src(ctx, attr, ptr); dst &= src; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); atom_put_dst(ctx, arg, attr, &dptr, dst, saved); } @@ -620,9 +620,9 @@ static void atom_op_calltable(atom_exec_ int r = 0; if (idx < ATOM_TABLE_NAMES_CNT) - SDEBUG(" table: %d (%s)\n", idx, atom_table_names[idx]); + ATOM_SDEBUG_PRINT(" table: %d (%s)\n", idx, atom_table_names[idx]); else - SDEBUG(" table: %d\n", idx); + ATOM_SDEBUG_PRINT(" table: %d\n", idx); if (U16(ctx->ctx->cmd_table + 4 + 2 * idx)) r = atom_execute_table_locked(ctx->ctx, idx, ctx->ps + ctx->ps_shift); if (r) { @@ -638,7 +638,7 @@ static void atom_op_clear(atom_exec_cont attr &= 0x38; attr |= atom_def_dst[attr >> 3] << 6; atom_get_dst(ctx, arg, attr, ptr, &saved, 0); - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); atom_put_dst(ctx, arg, attr, &dptr, 0, saved); } @@ -646,20 +646,20 @@ static void atom_op_compare(atom_exec_co { uint8_t attr = U8((*ptr)++); uint32_t dst, src; - SDEBUG(" src1: "); + ATOM_SDEBUG_PRINT(" src1: "); dst = atom_get_dst(ctx, arg, attr, ptr, NULL, 1); - SDEBUG(" src2: "); + ATOM_SDEBUG_PRINT(" src2: "); src = atom_get_src(ctx, attr, ptr); ctx->ctx->cs_equal = (dst == src); ctx->ctx->cs_above = (dst > src); - SDEBUG(" result: %s %s\n", ctx->ctx->cs_equal ? "EQ" : "NE", + ATOM_SDEBUG_PRINT(" result: %s %s\n", ctx->ctx->cs_equal ? "EQ" : "NE", ctx->ctx->cs_above ? "GT" : "LE"); } static void atom_op_delay(atom_exec_context *ctx, int *ptr, int arg) { unsigned count = U8((*ptr)++); - SDEBUG(" count: %d\n", count); + ATOM_SDEBUG_PRINT(" count: %d\n", count); if (arg == ATOM_UNIT_MICROSEC) DRM_UDELAY(count); else if (!drm_can_sleep()) @@ -672,9 +672,9 @@ static void atom_op_div(atom_exec_contex { uint8_t attr = U8((*ptr)++); uint32_t dst, src; - SDEBUG(" src1: "); + ATOM_SDEBUG_PRINT(" src1: "); dst = atom_get_dst(ctx, arg, attr, ptr, NULL, 1); - SDEBUG(" src2: "); + ATOM_SDEBUG_PRINT(" src2: "); src = atom_get_src(ctx, attr, ptr); if (src != 0) { ctx->ctx->divmul[0] = dst / src; @@ -720,8 +720,8 @@ static void atom_op_jump(atom_exec_conte break; } if (arg != ATOM_COND_ALWAYS) - SDEBUG(" taken: %s\n", execute ? "yes" : "no"); - SDEBUG(" target: 0x%04X\n", target); + ATOM_SDEBUG_PRINT(" taken: %s\n", execute ? "yes" : "no"); + ATOM_SDEBUG_PRINT(" target: 0x%04X\n", target); if (execute) { if (ctx->last_jump == (ctx->start + target)) { cjiffies = jiffies; @@ -748,15 +748,15 @@ static void atom_op_mask(atom_exec_conte uint8_t attr = U8((*ptr)++); uint32_t dst, mask, src, saved; int dptr = *ptr; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1); mask = atom_get_src_direct(ctx, ((attr >> 3) & 7), ptr); - SDEBUG(" mask: 0x%08x", mask); - SDEBUG(" src: "); + ATOM_SDEBUG_PRINT(" mask: 0x%08x", mask); + ATOM_SDEBUG_PRINT(" src: "); src = atom_get_src(ctx, attr, ptr); dst &= mask; dst |= src; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); atom_put_dst(ctx, arg, attr, &dptr, dst, saved); } @@ -771,9 +771,9 @@ static void atom_op_move(atom_exec_conte atom_skip_dst(ctx, arg, attr, ptr); saved = 0xCDCDCDCD; } - SDEBUG(" src: "); + ATOM_SDEBUG_PRINT(" src: "); src = atom_get_src(ctx, attr, ptr); - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); atom_put_dst(ctx, arg, attr, &dptr, src, saved); } @@ -781,9 +781,9 @@ static void atom_op_mul(atom_exec_contex { uint8_t attr = U8((*ptr)++); uint32_t dst, src; - SDEBUG(" src1: "); + ATOM_SDEBUG_PRINT(" src1: "); dst = atom_get_dst(ctx, arg, attr, ptr, NULL, 1); - SDEBUG(" src2: "); + ATOM_SDEBUG_PRINT(" src2: "); src = atom_get_src(ctx, attr, ptr); ctx->ctx->divmul[0] = dst * src; } @@ -798,19 +798,19 @@ static void atom_op_or(atom_exec_context uint8_t attr = U8((*ptr)++); uint32_t dst, src, saved; int dptr = *ptr; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1); - SDEBUG(" src: "); + ATOM_SDEBUG_PRINT(" src: "); src = atom_get_src(ctx, attr, ptr); dst |= src; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); atom_put_dst(ctx, arg, attr, &dptr, dst, saved); } static void atom_op_postcard(atom_exec_context *ctx, int *ptr, int arg) { uint8_t val = U8((*ptr)++); - SDEBUG("POST card output: 0x%02X\n", val); + ATOM_SDEBUG_PRINT("POST card output: 0x%02X\n", val); } static void atom_op_repeat(atom_exec_context *ctx, int *ptr, int arg) @@ -832,20 +832,20 @@ static void atom_op_setdatablock(atom_ex { int idx = U8(*ptr); (*ptr)++; - SDEBUG(" block: %d\n", idx); + ATOM_SDEBUG_PRINT(" block: %d\n", idx); if (!idx) ctx->ctx->data_block = 0; else if (idx == 255) ctx->ctx->data_block = ctx->start; else ctx->ctx->data_block = U16(ctx->ctx->data_table + 4 + 2 * idx); - SDEBUG(" base: 0x%04X\n", ctx->ctx->data_block); + ATOM_SDEBUG_PRINT(" base: 0x%04X\n", ctx->ctx->data_block); } static void atom_op_setfbbase(atom_exec_context *ctx, int *ptr, int arg) { uint8_t attr = U8((*ptr)++); - SDEBUG(" fb_base: "); + ATOM_SDEBUG_PRINT(" fb_base: "); ctx->ctx->fb_base = atom_get_src(ctx, attr, ptr); } @@ -856,9 +856,9 @@ static void atom_op_setport(atom_exec_co case ATOM_PORT_ATI: port = U16(*ptr); if (port < ATOM_IO_NAMES_CNT) - SDEBUG(" port: %d (%s)\n", port, atom_io_names[port]); + ATOM_SDEBUG_PRINT(" port: %d (%s)\n", port, atom_io_names[port]); else - SDEBUG(" port: %d\n", port); + ATOM_SDEBUG_PRINT(" port: %d\n", port); if (!port) ctx->ctx->io_mode = ATOM_IO_MM; else @@ -880,7 +880,7 @@ static void atom_op_setregblock(atom_exe { ctx->ctx->reg_block = U16(*ptr); (*ptr) += 2; - SDEBUG(" base: 0x%04X\n", ctx->ctx->reg_block); + ATOM_SDEBUG_PRINT(" base: 0x%04X\n", ctx->ctx->reg_block); } static void atom_op_shift_left(atom_exec_context *ctx, int *ptr, int arg) @@ -890,12 +890,12 @@ static void atom_op_shift_left(atom_exec int dptr = *ptr; attr &= 0x38; attr |= atom_def_dst[attr >> 3] << 6; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1); shift = atom_get_src_direct(ctx, ATOM_SRC_BYTE0, ptr); - SDEBUG(" shift: %d\n", shift); + ATOM_SDEBUG_PRINT(" shift: %d\n", shift); dst <<= shift; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); atom_put_dst(ctx, arg, attr, &dptr, dst, saved); } @@ -906,12 +906,12 @@ static void atom_op_shift_right(atom_exe int dptr = *ptr; attr &= 0x38; attr |= atom_def_dst[attr >> 3] << 6; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1); shift = atom_get_src_direct(ctx, ATOM_SRC_BYTE0, ptr); - SDEBUG(" shift: %d\n", shift); + ATOM_SDEBUG_PRINT(" shift: %d\n", shift); dst >>= shift; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); atom_put_dst(ctx, arg, attr, &dptr, dst, saved); } @@ -921,16 +921,16 @@ static void atom_op_shl(atom_exec_contex uint32_t saved, dst; int dptr = *ptr; uint32_t dst_align = atom_dst_to_src[(attr >> 3) & 7][(attr >> 6) & 3]; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1); /* op needs to full dst value */ dst = saved; shift = atom_get_src(ctx, attr, ptr); - SDEBUG(" shift: %d\n", shift); + ATOM_SDEBUG_PRINT(" shift: %d\n", shift); dst <<= shift; dst &= atom_arg_mask[dst_align]; dst >>= atom_arg_shift[dst_align]; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); atom_put_dst(ctx, arg, attr, &dptr, dst, saved); } @@ -940,16 +940,16 @@ static void atom_op_shr(atom_exec_contex uint32_t saved, dst; int dptr = *ptr; uint32_t dst_align = atom_dst_to_src[(attr >> 3) & 7][(attr >> 6) & 3]; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1); /* op needs to full dst value */ dst = saved; shift = atom_get_src(ctx, attr, ptr); - SDEBUG(" shift: %d\n", shift); + ATOM_SDEBUG_PRINT(" shift: %d\n", shift); dst >>= shift; dst &= atom_arg_mask[dst_align]; dst >>= atom_arg_shift[dst_align]; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); atom_put_dst(ctx, arg, attr, &dptr, dst, saved); } @@ -958,12 +958,12 @@ static void atom_op_sub(atom_exec_contex uint8_t attr = U8((*ptr)++); uint32_t dst, src, saved; int dptr = *ptr; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1); - SDEBUG(" src: "); + ATOM_SDEBUG_PRINT(" src: "); src = atom_get_src(ctx, attr, ptr); dst -= src; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); atom_put_dst(ctx, arg, attr, &dptr, dst, saved); } @@ -971,18 +971,18 @@ static void atom_op_switch(atom_exec_con { uint8_t attr = U8((*ptr)++); uint32_t src, val, target; - SDEBUG(" switch: "); + ATOM_SDEBUG_PRINT(" switch: "); src = atom_get_src(ctx, attr, ptr); while (U16(*ptr) != ATOM_CASE_END) if (U8(*ptr) == ATOM_CASE_MAGIC) { (*ptr)++; - SDEBUG(" case: "); + ATOM_SDEBUG_PRINT(" case: "); val = atom_get_src(ctx, (attr & 0x38) | ATOM_ARG_IMM, ptr); target = U16(*ptr); if (val == src) { - SDEBUG(" target: %04X\n", target); + ATOM_SDEBUG_PRINT(" target: %04X\n", target); *ptr = ctx->start + target; return; } @@ -998,12 +998,12 @@ static void atom_op_test(atom_exec_conte { uint8_t attr = U8((*ptr)++); uint32_t dst, src; - SDEBUG(" src1: "); + ATOM_SDEBUG_PRINT(" src1: "); dst = atom_get_dst(ctx, arg, attr, ptr, NULL, 1); - SDEBUG(" src2: "); + ATOM_SDEBUG_PRINT(" src2: "); src = atom_get_src(ctx, attr, ptr); ctx->ctx->cs_equal = ((dst & src) == 0); - SDEBUG(" result: %s\n", ctx->ctx->cs_equal ? "EQ" : "NE"); + ATOM_SDEBUG_PRINT(" result: %s\n", ctx->ctx->cs_equal ? "EQ" : "NE"); } static void atom_op_xor(atom_exec_context *ctx, int *ptr, int arg) @@ -1011,12 +1011,12 @@ static void atom_op_xor(atom_exec_contex uint8_t attr = U8((*ptr)++); uint32_t dst, src, saved; int dptr = *ptr; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1); - SDEBUG(" src: "); + ATOM_SDEBUG_PRINT(" src: "); src = atom_get_src(ctx, attr, ptr); dst ^= src; - SDEBUG(" dst: "); + ATOM_SDEBUG_PRINT(" dst: "); atom_put_dst(ctx, arg, attr, &dptr, dst, saved); } @@ -1169,7 +1169,7 @@ static int atom_execute_table_locked(str ps = CU8(base + ATOM_CT_PS_PTR) & ATOM_CT_PS_MASK; ptr = base + ATOM_CT_CODE_PTR; - SDEBUG(">> execute %04X (len %d, WS %d, PS %d)\n", base, len, ws, ps); + ATOM_SDEBUG_PRINT(">> execute %04X (len %d, WS %d, PS %d)\n", base, len, ws, ps); ectx.ctx = ctx; ectx.ps_shift = ps / 4; @@ -1186,9 +1186,9 @@ static int atom_execute_table_locked(str while (1) { op = CU8(ptr++); if (op < ATOM_OP_NAMES_CNT) - SDEBUG("%s @ 0x%04X\n", atom_op_names[op], ptr - 1); + ATOM_SDEBUG_PRINT("%s @ 0x%04X\n", atom_op_names[op], ptr - 1); else - SDEBUG("[%d] @ 0x%04X\n", op, ptr - 1); + ATOM_SDEBUG_PRINT("[%d] @ 0x%04X\n", op, ptr - 1); if (ectx.abort) { DRM_ERROR("atombios stuck executing %04X (len %d, WS %d, PS %d) @ 0x%04X\n", base, len, ws, ps, ptr - 1); @@ -1206,7 +1206,7 @@ static int atom_execute_table_locked(str break; } debug_depth--; - SDEBUG("<<\n"); + ATOM_SDEBUG_PRINT("<<\n"); free: if (ws) From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 07:17:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 63103BF9; Mon, 26 Aug 2013 07:17:42 +0000 (UTC) (envelope-from erwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4C6BF2D9D; Mon, 26 Aug 2013 07:17:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7Q7Hgep073299; Mon, 26 Aug 2013 07:17:42 GMT (envelope-from erwin@svn.freebsd.org) Received: (from erwin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7Q7HgMF073297; Mon, 26 Aug 2013 07:17:42 GMT (envelope-from erwin@svn.freebsd.org) Message-Id: <201308260717.r7Q7HgMF073297@svn.freebsd.org> From: Erwin Lansing Date: Mon, 26 Aug 2013 07:17:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254897 - in stable/9: contrib/bind9 contrib/bind9/bin contrib/bind9/bin/check contrib/bind9/bin/confgen contrib/bind9/bin/dig contrib/bind9/bin/dig/include/dig contrib/bind9/bin/dnssec... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 07:17:42 -0000 Author: erwin Date: Mon Aug 26 07:17:41 2013 New Revision: 254897 URL: http://svnweb.freebsd.org/changeset/base/254897 Log: MFC r254651: Update Bind to 9.9.3-P2 Notable new features: * Elliptic Curve Digital Signature Algorithm keys and signatures in DNSSEC are now supported per RFC 6605. [RT #21918] * Introduces a new tool "dnssec-verify" that validates a signed zone, checking for the correctness of signatures and NSEC/NSEC3 chains. [RT #23673] * BIND now recognizes the TLSA resource record type, created to support IETF DANE (DNS-based Authentication of Named Entities) [RT #28989] * The new "inline-signing" option, in combination with the "auto-dnssec" option that was introduced in BIND 9.7, allows named to sign zones completely transparently. Approved by: delphij (mentor) Sponsored by: DK Hostmaster A/S Added: stable/9/contrib/bind9/bin/dnssec/dnssec-verify.8 - copied unchanged from r254651, head/contrib/bind9/bin/dnssec/dnssec-verify.8 stable/9/contrib/bind9/bin/dnssec/dnssec-verify.c - copied unchanged from r254651, head/contrib/bind9/bin/dnssec/dnssec-verify.c stable/9/contrib/bind9/bin/dnssec/dnssec-verify.docbook - copied unchanged from r254651, head/contrib/bind9/bin/dnssec/dnssec-verify.docbook stable/9/contrib/bind9/bin/dnssec/dnssec-verify.html - copied unchanged from r254651, head/contrib/bind9/bin/dnssec/dnssec-verify.html stable/9/contrib/bind9/bin/named/bind9.ver3.xsl - copied unchanged from r254651, head/contrib/bind9/bin/named/bind9.ver3.xsl stable/9/contrib/bind9/bin/named/bind9.ver3.xsl.h - copied unchanged from r254651, head/contrib/bind9/bin/named/bind9.ver3.xsl.h stable/9/contrib/bind9/doc/arm/man.dnssec-verify.html - copied unchanged from r254651, head/contrib/bind9/doc/arm/man.dnssec-verify.html stable/9/contrib/bind9/lib/dns/clientinfo.c - copied unchanged from r254651, head/contrib/bind9/lib/dns/clientinfo.c stable/9/contrib/bind9/lib/dns/include/dns/clientinfo.h - copied unchanged from r254651, head/contrib/bind9/lib/dns/include/dns/clientinfo.h stable/9/contrib/bind9/lib/dns/include/dns/update.h - copied unchanged from r254651, head/contrib/bind9/lib/dns/include/dns/update.h stable/9/contrib/bind9/lib/dns/rdata/generic/naptr_35.c - copied unchanged from r254651, head/contrib/bind9/lib/dns/rdata/generic/naptr_35.c stable/9/contrib/bind9/lib/dns/rdata/generic/naptr_35.h - copied unchanged from r254651, head/contrib/bind9/lib/dns/rdata/generic/naptr_35.h stable/9/contrib/bind9/lib/dns/update.c - copied unchanged from r254651, head/contrib/bind9/lib/dns/update.c stable/9/contrib/bind9/lib/isc/include/isc/pool.h - copied unchanged from r254651, head/contrib/bind9/lib/isc/include/isc/pool.h stable/9/contrib/bind9/lib/isc/include/isc/queue.h - copied unchanged from r254651, head/contrib/bind9/lib/isc/include/isc/queue.h stable/9/contrib/bind9/lib/isc/pool.c - copied unchanged from r254651, head/contrib/bind9/lib/isc/pool.c stable/9/usr.sbin/dnssec-verify/ - copied from r254651, head/usr.sbin/dnssec-verify/ Deleted: stable/9/contrib/bind9/lib/dns/rdata/in_1/naptr_35.c stable/9/contrib/bind9/lib/dns/rdata/in_1/naptr_35.h Modified: stable/9/contrib/bind9/CHANGES stable/9/contrib/bind9/COPYRIGHT stable/9/contrib/bind9/HISTORY stable/9/contrib/bind9/Makefile.in stable/9/contrib/bind9/README stable/9/contrib/bind9/bin/Makefile.in stable/9/contrib/bind9/bin/check/check-tool.c stable/9/contrib/bind9/bin/check/check-tool.h stable/9/contrib/bind9/bin/check/named-checkconf.c stable/9/contrib/bind9/bin/check/named-checkzone.8 stable/9/contrib/bind9/bin/check/named-checkzone.c stable/9/contrib/bind9/bin/check/named-checkzone.docbook stable/9/contrib/bind9/bin/check/named-checkzone.html stable/9/contrib/bind9/bin/confgen/ddns-confgen.c stable/9/contrib/bind9/bin/confgen/rndc-confgen.c stable/9/contrib/bind9/bin/dig/Makefile.in stable/9/contrib/bind9/bin/dig/dig.1 stable/9/contrib/bind9/bin/dig/dig.c stable/9/contrib/bind9/bin/dig/dig.docbook stable/9/contrib/bind9/bin/dig/dig.html stable/9/contrib/bind9/bin/dig/dighost.c stable/9/contrib/bind9/bin/dig/host.c stable/9/contrib/bind9/bin/dig/include/dig/dig.h stable/9/contrib/bind9/bin/dig/nslookup.c stable/9/contrib/bind9/bin/dnssec/Makefile.in stable/9/contrib/bind9/bin/dnssec/dnssec-dsfromkey.8 stable/9/contrib/bind9/bin/dnssec/dnssec-dsfromkey.c stable/9/contrib/bind9/bin/dnssec/dnssec-dsfromkey.docbook stable/9/contrib/bind9/bin/dnssec/dnssec-dsfromkey.html stable/9/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.8 stable/9/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c stable/9/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook stable/9/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.html stable/9/contrib/bind9/bin/dnssec/dnssec-keygen.8 stable/9/contrib/bind9/bin/dnssec/dnssec-keygen.c stable/9/contrib/bind9/bin/dnssec/dnssec-keygen.docbook stable/9/contrib/bind9/bin/dnssec/dnssec-keygen.html stable/9/contrib/bind9/bin/dnssec/dnssec-revoke.c stable/9/contrib/bind9/bin/dnssec/dnssec-revoke.docbook stable/9/contrib/bind9/bin/dnssec/dnssec-settime.8 stable/9/contrib/bind9/bin/dnssec/dnssec-settime.c stable/9/contrib/bind9/bin/dnssec/dnssec-settime.docbook stable/9/contrib/bind9/bin/dnssec/dnssec-settime.html stable/9/contrib/bind9/bin/dnssec/dnssec-signzone.8 stable/9/contrib/bind9/bin/dnssec/dnssec-signzone.c stable/9/contrib/bind9/bin/dnssec/dnssec-signzone.docbook stable/9/contrib/bind9/bin/dnssec/dnssec-signzone.html stable/9/contrib/bind9/bin/dnssec/dnssectool.c stable/9/contrib/bind9/bin/dnssec/dnssectool.h stable/9/contrib/bind9/bin/named/Makefile.in stable/9/contrib/bind9/bin/named/builtin.c stable/9/contrib/bind9/bin/named/client.c stable/9/contrib/bind9/bin/named/config.c stable/9/contrib/bind9/bin/named/control.c stable/9/contrib/bind9/bin/named/controlconf.c stable/9/contrib/bind9/bin/named/include/dlz/dlz_dlopen_driver.h stable/9/contrib/bind9/bin/named/include/named/client.h stable/9/contrib/bind9/bin/named/include/named/control.h stable/9/contrib/bind9/bin/named/include/named/globals.h stable/9/contrib/bind9/bin/named/include/named/interfacemgr.h stable/9/contrib/bind9/bin/named/include/named/server.h stable/9/contrib/bind9/bin/named/include/named/zoneconf.h stable/9/contrib/bind9/bin/named/interfacemgr.c stable/9/contrib/bind9/bin/named/logconf.c stable/9/contrib/bind9/bin/named/main.c stable/9/contrib/bind9/bin/named/named.8 stable/9/contrib/bind9/bin/named/named.conf.5 stable/9/contrib/bind9/bin/named/named.conf.docbook stable/9/contrib/bind9/bin/named/named.conf.html stable/9/contrib/bind9/bin/named/named.docbook stable/9/contrib/bind9/bin/named/named.html stable/9/contrib/bind9/bin/named/query.c stable/9/contrib/bind9/bin/named/server.c stable/9/contrib/bind9/bin/named/statschannel.c stable/9/contrib/bind9/bin/named/unix/Makefile.in stable/9/contrib/bind9/bin/named/unix/dlz_dlopen_driver.c stable/9/contrib/bind9/bin/named/unix/os.c stable/9/contrib/bind9/bin/named/update.c stable/9/contrib/bind9/bin/named/xfrout.c stable/9/contrib/bind9/bin/named/zoneconf.c stable/9/contrib/bind9/bin/nsupdate/Makefile.in stable/9/contrib/bind9/bin/nsupdate/nsupdate.1 stable/9/contrib/bind9/bin/nsupdate/nsupdate.c stable/9/contrib/bind9/bin/nsupdate/nsupdate.docbook stable/9/contrib/bind9/bin/nsupdate/nsupdate.html stable/9/contrib/bind9/bin/rndc/rndc.c stable/9/contrib/bind9/bin/tools/genrandom.8 stable/9/contrib/bind9/bin/tools/genrandom.docbook stable/9/contrib/bind9/bin/tools/genrandom.html stable/9/contrib/bind9/bin/tools/nsec3hash.c stable/9/contrib/bind9/config.h.in stable/9/contrib/bind9/config.threads.in stable/9/contrib/bind9/configure.in stable/9/contrib/bind9/doc/arm/Bv9ARM-book.xml stable/9/contrib/bind9/doc/arm/Bv9ARM.ch01.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch03.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch04.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch05.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch06.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch07.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch08.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch09.html stable/9/contrib/bind9/doc/arm/Bv9ARM.ch10.html stable/9/contrib/bind9/doc/arm/Bv9ARM.html stable/9/contrib/bind9/doc/arm/Bv9ARM.pdf stable/9/contrib/bind9/doc/arm/dnssec.xml stable/9/contrib/bind9/doc/arm/man.arpaname.html stable/9/contrib/bind9/doc/arm/man.ddns-confgen.html stable/9/contrib/bind9/doc/arm/man.dig.html stable/9/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html stable/9/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html stable/9/contrib/bind9/doc/arm/man.dnssec-keygen.html stable/9/contrib/bind9/doc/arm/man.dnssec-revoke.html stable/9/contrib/bind9/doc/arm/man.dnssec-settime.html stable/9/contrib/bind9/doc/arm/man.dnssec-signzone.html stable/9/contrib/bind9/doc/arm/man.genrandom.html stable/9/contrib/bind9/doc/arm/man.host.html stable/9/contrib/bind9/doc/arm/man.isc-hmac-fixup.html stable/9/contrib/bind9/doc/arm/man.named-checkconf.html stable/9/contrib/bind9/doc/arm/man.named-checkzone.html stable/9/contrib/bind9/doc/arm/man.named-journalprint.html stable/9/contrib/bind9/doc/arm/man.named.html stable/9/contrib/bind9/doc/arm/man.nsec3hash.html stable/9/contrib/bind9/doc/arm/man.nsupdate.html stable/9/contrib/bind9/doc/arm/man.rndc-confgen.html stable/9/contrib/bind9/doc/arm/man.rndc.conf.html stable/9/contrib/bind9/doc/arm/man.rndc.html stable/9/contrib/bind9/doc/arm/pkcs11.xml stable/9/contrib/bind9/doc/misc/options stable/9/contrib/bind9/lib/bind9/api stable/9/contrib/bind9/lib/bind9/check.c stable/9/contrib/bind9/lib/dns/Makefile.in stable/9/contrib/bind9/lib/dns/acache.c stable/9/contrib/bind9/lib/dns/acl.c stable/9/contrib/bind9/lib/dns/adb.c stable/9/contrib/bind9/lib/dns/api stable/9/contrib/bind9/lib/dns/byaddr.c stable/9/contrib/bind9/lib/dns/cache.c stable/9/contrib/bind9/lib/dns/callbacks.c stable/9/contrib/bind9/lib/dns/client.c stable/9/contrib/bind9/lib/dns/db.c stable/9/contrib/bind9/lib/dns/dbtable.c stable/9/contrib/bind9/lib/dns/diff.c stable/9/contrib/bind9/lib/dns/dispatch.c stable/9/contrib/bind9/lib/dns/dns64.c stable/9/contrib/bind9/lib/dns/dnssec.c stable/9/contrib/bind9/lib/dns/dst_api.c stable/9/contrib/bind9/lib/dns/dst_internal.h stable/9/contrib/bind9/lib/dns/dst_openssl.h stable/9/contrib/bind9/lib/dns/dst_parse.c stable/9/contrib/bind9/lib/dns/ecdb.c stable/9/contrib/bind9/lib/dns/gssapi_link.c stable/9/contrib/bind9/lib/dns/gssapictx.c stable/9/contrib/bind9/lib/dns/hmac_link.c stable/9/contrib/bind9/lib/dns/include/dns/Makefile.in stable/9/contrib/bind9/lib/dns/include/dns/acache.h stable/9/contrib/bind9/lib/dns/include/dns/acl.h stable/9/contrib/bind9/lib/dns/include/dns/adb.h stable/9/contrib/bind9/lib/dns/include/dns/cache.h stable/9/contrib/bind9/lib/dns/include/dns/callbacks.h stable/9/contrib/bind9/lib/dns/include/dns/db.h stable/9/contrib/bind9/lib/dns/include/dns/dispatch.h stable/9/contrib/bind9/lib/dns/include/dns/dlz_dlopen.h stable/9/contrib/bind9/lib/dns/include/dns/dnssec.h stable/9/contrib/bind9/lib/dns/include/dns/events.h stable/9/contrib/bind9/lib/dns/include/dns/journal.h stable/9/contrib/bind9/lib/dns/include/dns/log.h stable/9/contrib/bind9/lib/dns/include/dns/master.h stable/9/contrib/bind9/lib/dns/include/dns/masterdump.h stable/9/contrib/bind9/lib/dns/include/dns/nsec.h stable/9/contrib/bind9/lib/dns/include/dns/nsec3.h stable/9/contrib/bind9/lib/dns/include/dns/private.h stable/9/contrib/bind9/lib/dns/include/dns/rdata.h stable/9/contrib/bind9/lib/dns/include/dns/rdataset.h stable/9/contrib/bind9/lib/dns/include/dns/resolver.h stable/9/contrib/bind9/lib/dns/include/dns/result.h stable/9/contrib/bind9/lib/dns/include/dns/rpz.h stable/9/contrib/bind9/lib/dns/include/dns/rriterator.h stable/9/contrib/bind9/lib/dns/include/dns/sdb.h stable/9/contrib/bind9/lib/dns/include/dns/sdlz.h stable/9/contrib/bind9/lib/dns/include/dns/time.h stable/9/contrib/bind9/lib/dns/include/dns/types.h stable/9/contrib/bind9/lib/dns/include/dns/view.h stable/9/contrib/bind9/lib/dns/include/dns/zone.h stable/9/contrib/bind9/lib/dns/include/dns/zt.h stable/9/contrib/bind9/lib/dns/include/dst/dst.h stable/9/contrib/bind9/lib/dns/iptable.c stable/9/contrib/bind9/lib/dns/journal.c stable/9/contrib/bind9/lib/dns/key.c stable/9/contrib/bind9/lib/dns/keytable.c stable/9/contrib/bind9/lib/dns/log.c stable/9/contrib/bind9/lib/dns/lookup.c stable/9/contrib/bind9/lib/dns/master.c stable/9/contrib/bind9/lib/dns/masterdump.c stable/9/contrib/bind9/lib/dns/message.c stable/9/contrib/bind9/lib/dns/nsec.c stable/9/contrib/bind9/lib/dns/nsec3.c stable/9/contrib/bind9/lib/dns/openssldh_link.c stable/9/contrib/bind9/lib/dns/openssldsa_link.c stable/9/contrib/bind9/lib/dns/opensslecdsa_link.c stable/9/contrib/bind9/lib/dns/opensslgost_link.c stable/9/contrib/bind9/lib/dns/opensslrsa_link.c stable/9/contrib/bind9/lib/dns/private.c stable/9/contrib/bind9/lib/dns/rbt.c stable/9/contrib/bind9/lib/dns/rbtdb.c stable/9/contrib/bind9/lib/dns/rdata.c stable/9/contrib/bind9/lib/dns/rdata/any_255/tsig_250.c stable/9/contrib/bind9/lib/dns/rdata/generic/cert_37.c stable/9/contrib/bind9/lib/dns/rdata/generic/dlv_32769.c stable/9/contrib/bind9/lib/dns/rdata/generic/dnskey_48.c stable/9/contrib/bind9/lib/dns/rdata/generic/ds_43.c stable/9/contrib/bind9/lib/dns/rdata/generic/ipseckey_45.c stable/9/contrib/bind9/lib/dns/rdata/generic/key_25.c stable/9/contrib/bind9/lib/dns/rdata/generic/keydata_65533.c stable/9/contrib/bind9/lib/dns/rdata/generic/nsec3_50.c stable/9/contrib/bind9/lib/dns/rdata/generic/nsec3_50.h stable/9/contrib/bind9/lib/dns/rdata/generic/opt_41.c stable/9/contrib/bind9/lib/dns/rdata/generic/rrsig_46.c stable/9/contrib/bind9/lib/dns/rdata/generic/sig_24.c stable/9/contrib/bind9/lib/dns/rdata/generic/soa_6.c stable/9/contrib/bind9/lib/dns/rdata/generic/sshfp_44.c stable/9/contrib/bind9/lib/dns/rdata/generic/tkey_249.c stable/9/contrib/bind9/lib/dns/rdata/generic/uri_256.c stable/9/contrib/bind9/lib/dns/rdata/generic/uri_256.h stable/9/contrib/bind9/lib/dns/rdata/in_1/dhcid_49.c stable/9/contrib/bind9/lib/dns/resolver.c stable/9/contrib/bind9/lib/dns/sdb.c stable/9/contrib/bind9/lib/dns/sdlz.c stable/9/contrib/bind9/lib/dns/validator.c stable/9/contrib/bind9/lib/dns/view.c stable/9/contrib/bind9/lib/dns/xfrin.c stable/9/contrib/bind9/lib/dns/zone.c stable/9/contrib/bind9/lib/dns/zt.c stable/9/contrib/bind9/lib/irs/api stable/9/contrib/bind9/lib/isc/Makefile.in stable/9/contrib/bind9/lib/isc/api stable/9/contrib/bind9/lib/isc/include/isc/heap.h stable/9/contrib/bind9/lib/isc/include/isc/list.h stable/9/contrib/bind9/lib/isc/include/isc/mem.h stable/9/contrib/bind9/lib/isc/include/isc/namespace.h stable/9/contrib/bind9/lib/isc/include/isc/radix.h stable/9/contrib/bind9/lib/isc/include/isc/socket.h stable/9/contrib/bind9/lib/isc/include/isc/task.h stable/9/contrib/bind9/lib/isc/include/isc/taskpool.h stable/9/contrib/bind9/lib/isc/log.c stable/9/contrib/bind9/lib/isc/radix.c stable/9/contrib/bind9/lib/isc/socket_api.c stable/9/contrib/bind9/lib/isc/task.c stable/9/contrib/bind9/lib/isc/task_api.c stable/9/contrib/bind9/lib/isc/task_p.h stable/9/contrib/bind9/lib/isc/taskpool.c stable/9/contrib/bind9/lib/isc/unix/socket.c stable/9/contrib/bind9/lib/isccc/api stable/9/contrib/bind9/lib/isccfg/api stable/9/contrib/bind9/lib/isccfg/namedconf.c stable/9/contrib/bind9/lib/lwres/api stable/9/contrib/bind9/lib/lwres/man/lwres_config.3 stable/9/contrib/bind9/lib/lwres/man/lwres_config.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_config.html stable/9/contrib/bind9/lib/lwres/man/lwres_context.3 stable/9/contrib/bind9/lib/lwres/man/lwres_context.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_context.html stable/9/contrib/bind9/lib/lwres/man/lwres_gabn.3 stable/9/contrib/bind9/lib/lwres/man/lwres_gabn.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_gabn.html stable/9/contrib/bind9/lib/lwres/man/lwres_gai_strerror.3 stable/9/contrib/bind9/lib/lwres/man/lwres_gai_strerror.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_gai_strerror.html stable/9/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.3 stable/9/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.html stable/9/contrib/bind9/lib/lwres/man/lwres_gethostent.3 stable/9/contrib/bind9/lib/lwres/man/lwres_gethostent.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_gethostent.html stable/9/contrib/bind9/lib/lwres/man/lwres_getipnode.3 stable/9/contrib/bind9/lib/lwres/man/lwres_getipnode.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_getipnode.html stable/9/contrib/bind9/lib/lwres/man/lwres_getnameinfo.3 stable/9/contrib/bind9/lib/lwres/man/lwres_getnameinfo.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_getnameinfo.html stable/9/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.3 stable/9/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.html stable/9/contrib/bind9/lib/lwres/man/lwres_gnba.3 stable/9/contrib/bind9/lib/lwres/man/lwres_gnba.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_gnba.html stable/9/contrib/bind9/lib/lwres/man/lwres_hstrerror.3 stable/9/contrib/bind9/lib/lwres/man/lwres_hstrerror.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_hstrerror.html stable/9/contrib/bind9/lib/lwres/man/lwres_inetntop.3 stable/9/contrib/bind9/lib/lwres/man/lwres_inetntop.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_inetntop.html stable/9/contrib/bind9/lib/lwres/man/lwres_noop.3 stable/9/contrib/bind9/lib/lwres/man/lwres_noop.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_noop.html stable/9/contrib/bind9/lib/lwres/man/lwres_packet.3 stable/9/contrib/bind9/lib/lwres/man/lwres_packet.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_packet.html stable/9/contrib/bind9/lib/lwres/man/lwres_resutil.3 stable/9/contrib/bind9/lib/lwres/man/lwres_resutil.docbook stable/9/contrib/bind9/lib/lwres/man/lwres_resutil.html stable/9/contrib/bind9/lib/lwres/print_p.h stable/9/contrib/bind9/lib/lwres/strtoul.c stable/9/contrib/bind9/lib/lwres/unix/Makefile.in stable/9/contrib/bind9/lib/lwres/unix/include/Makefile.in stable/9/contrib/bind9/lib/lwres/unix/include/lwres/Makefile.in stable/9/contrib/bind9/lib/lwres/unix/include/lwres/net.h stable/9/contrib/bind9/lib/lwres/version.c stable/9/contrib/bind9/make/Makefile.in stable/9/contrib/bind9/make/includes.in stable/9/contrib/bind9/make/rules.in stable/9/contrib/bind9/mkinstalldirs stable/9/contrib/bind9/version stable/9/lib/bind/config.h stable/9/lib/bind/dns/Makefile stable/9/lib/bind/dns/code.h stable/9/lib/bind/dns/dns/rdatastruct.h stable/9/lib/bind/isc/Makefile stable/9/share/doc/bind9/Makefile stable/9/usr.bin/nslookup/Makefile stable/9/usr.bin/nsupdate/Makefile stable/9/usr.sbin/Makefile (contents, props changed) Directory Properties: stable/9/contrib/bind9/ (props changed) stable/9/lib/bind/ (props changed) stable/9/share/doc/bind9/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.sbin/ (props changed) Modified: stable/9/contrib/bind9/CHANGES ============================================================================== --- stable/9/contrib/bind9/CHANGES Mon Aug 26 07:07:41 2013 (r254896) +++ stable/9/contrib/bind9/CHANGES Mon Aug 26 07:17:41 2013 (r254897) @@ -1,15 +1,15 @@ - --- 9.8.5-P2 released --- + --- 9.9.3-P2 released --- 3621. [security] Incorrect bounds checking on private type 'keydata' can lead to a remotely triggerable REQUIRE failure (CVE-2013-4854). [RT #34238] - --- 9.8.5-P1 released --- + --- 9.9.3-P1 released --- 3584. [security] Caching data from an incompletely signed zone could trigger an assertion failure in resolver.c [RT #33690] - --- 9.8.5 released --- + --- 9.9.3 released --- 3568. [cleanup] Add a product description line to the version file, to be reported by named -v/-V. [RT #33366] @@ -21,7 +21,7 @@ 3561. [bug] dig: issue a warning if an EDNS query returns FORMERR or NOTIMP. Adjust usage message. [RT #33363] - --- 9.8.5rc1 released --- + --- 9.9.3rc2 released --- 3560. [bug] isc-config.sh did not honor includedir and libdir when set via configure. [RT #33345] @@ -31,6 +31,8 @@ 3558. [bug] IXFR of a DLZ stored zone was broken. [RT #33331] +3557. [bug] Reloading redirect zones was broken. [RT #33292] + 3556. [maint] Added AAAA for D.ROOT-SERVERS.NET. 3555. [bug] Address theoretical race conditions in acache.c @@ -51,9 +53,7 @@ 3547. [bug] Some malformed unknown rdata records were not properly detected and rejected. [RT #33129] -3056. [func] Added support for URI resource record. [RT #23386] - - --- 9.8.5rc1 released --- + --- 9.9.3rc1 released --- 3546. [func] Add EUI48 and EUI64 types. [RT #33082] @@ -64,8 +64,6 @@ 3543. [bug] Update socket structure before attaching to socket manager after accept. [RT #33084] -3542. [bug] masterformat system test was broken. [RT #33086] - 3541. [bug] Parts of libdns were not properly initialized when built in libexport mode. [RT #33028] @@ -94,6 +92,17 @@ 3530. [contrib] Better RTT tracking in queryperf. [RT #30128] +3528. [func] New "dnssec-coverage" command scans the timing + metadata for a set of DNSSEC keys and reports if a + lapse in signing coverage has been scheduled + inadvertently. (Note: This tool depends on python; + it will not be built or installed on systems that + do not have a python interpreter.) [RT #28098] + +3527. [compat] Add a URI to allow applications to explicitly + request a particular XML schema from the statistics + channel, returning 404 if not supported. [RT #32481] + 3526. [cleanup] Set up dependencies for unit tests correctly during build. [RT #32803] @@ -102,7 +111,7 @@ 3520. [bug] 'mctx' was not being referenced counted in some places where it should have been. [RT #32794] - --- 9.8.5b2 released --- + --- 9.9.3b2 released --- 3517. [bug] Reorder destruction to avoid shutdown race. [RT #32777] @@ -114,6 +123,8 @@ to 1024 bits for hmac-sha384 and hmac-sha512. [RT #32753] +3511. [doc] Improve documentation of redirect zones. [RT #32756] + 3509. [cleanup] Added a product line to version file to allow for easy naming of different products (BIND vs BIND ESV, for example). [RT #32755] @@ -121,8 +132,24 @@ 3508. [contrib] queryperf was incorrectly rejecting the -T option. [RT #32338] +3507. [bug] Statistics channel XSL (when built with + --enable-newstats) had a glitch when attempting + to chart query data before any queries had been + received. [RT #32620] + +3505. [bug] When setting "max-cache-size" and "max-acache-size", + larger values than 4 gigabytes could not be set + explicitly, though larger sizes were available + when setting cache size to 0. This has been + corrected; the full range is now available. + [RT #32358] + 3503. [doc] Clarify size_spec syntax. [RT #32449] +3501. [func] zone-statistics now takes three options: full, + terse, and none. "yes" and "no" are retained as + synonyms for full and terse, respectively. [RT #29165] + 3500. [security] Support NAPTR regular expression validation on all platforms without using libregex, which can be vulnerable to memory exhaustion attack @@ -141,6 +168,15 @@ NSIP and NSDNAME checking. --enable-rpz-nsip and --enable-rpz-nsdname are now the default. [RT #32251] +3493. [contrib] Added BDBHPT dynamically-lodable DLZ module, + contributed by Mark Goldfinch. [RT #32549] + +3492. [bug] Fixed a regression in zone loading performance + due to lock contention. [RT #30399] + +3491. [bug] Slave zones using inline-signing must specify a + file name. [RT #31946] + 3489. [bug] --enable-developer now turns on ISC_LIST_CHECKINIT. When cloning a rdataset do not copy the link contents. [RT #32651] @@ -156,8 +192,14 @@ 3485. [cleanup] Only compile openssl_gostlink.c if we support GOST. +3483. [bug] Corrected XSL code in use with --enable-newstats. + [RT #32587] + 3481. [cleanup] Removed use of const const in atf. +3480. [bug] Silence logging noise when setting up zone + statistics. [RT #32525] + 3479. [bug] Address potential memory leaks in gssapi support code. [RT #32405] @@ -167,10 +209,18 @@ 3474. [bug] nsupdate could assert when the local and remote address families didn't match. [RT #22897] +3473. [bug] dnssec-signzone/verify could incorrectly report + an error condition due to an empty node above an + opt-out delegation lacking an NSEC3. [RT #32072] + +3471. [bug] The number of UDP dispatches now defaults to + the number of CPUs even if -n has been set to + a higher value. [RT #30964] + 3470. [bug] Slave zones could fail to dump when successfully refreshing after an initial failure. [RT #31276] - --- 9.8.5b1 released --- + --- 9.9.3b1 released --- 3468. [security] RPZ rules to generate A records (but not AAAA records) could trigger an assertion failure when used in @@ -179,6 +229,9 @@ 3467. [bug] Added checks in dnssec-keygen and dnssec-settime to check for delete date < inactive date. [RT #31719] +3466. [contrib] Corrected the DNS_CLIENTINFOMETHODS_VERSION check + in DLZ example driver. [RT #32275] + 3465. [bug] Handle isolated reserved ports. [RT #31778] 3464. [maint] Updates to PKCS#11 openssl patches, supporting @@ -192,6 +245,8 @@ 3461. [bug] Negative responses could incorrectly have AD=1 set. [RT #32237] +3460. [bug] Only link against readline where needed. [RT #29810] + 3458. [bug] Return FORMERR when presented with a overly long domain named in a request. [RT #29682] @@ -203,6 +258,9 @@ 3454. [port] sparc64: improve atomic support. [RT #25182] +3453. [bug] 'rndc addzone' of a zone with 'inline-signing yes;' + failed. [RT #31960] + 3452. [bug] Accept duplicate singleton records. [RT #32329] 3451. [port] Increase per thread stack size from 64K to 1M. @@ -266,9 +324,19 @@ 3427. [bug] dig +trace incorrectly displayed name server addresses instead of names. [RT #31641] +3426. [bug] dnssec-checkds: Clearer output when records are not + found. [RT #31968] + 3425. [bug] "acacheentry" reference counting was broken resulting in use after free. [RT #31908] +3424. [func] dnssec-dsfromkey now emits the hash without spaces. + [RT #31951] + +3423. [bug] "rndc signing -nsec3param" didn't accept the full + range of possible values. Address portability issues. + [RT #31938] + 3422. [bug] Added a clear error message for when the SOA does not match the referral. [RT #31281] @@ -279,9 +347,22 @@ 3419. [bug] Memory leak on validation cancel. [RT #31869] +3417. [func] Optional new XML schema (version 3.0) for the + statistics channel adds query type statistics at the + zone level, and flattens the XML tree and uses + compressed format to optimize parsing. Includes new XSL + that permits charting via the Google Charts API on + browsers that support javascript in XSL. To enable, + build with "configure --enable-newstats". [RT #30023] + +3416. [bug] Named could die on shutdown if running with 128 UDP + dispatches per interface. [RT #31743] + 3415. [bug] named could die with a REQUIRE failure if a validation was canceled. [RT #31804] +3414. [bug] Address locking issues found by Coverity. [RT #31626] + 3412. [bug] Copy timeval structure from control message data. [RT #31548] @@ -295,6 +376,11 @@ (DNS-based Authentication of Named Entities). [RT #30513] +3408. [bug] Some DNSSEC-related options (update-check-ksk, + dnssec-loadkeys-interval, dnssec-dnskey-kskonly) + are now legal in slave zones as long as + inline-signing is in use. [RT #31078] + 3406. [bug] mem.c: Fix compilation errors when building with ISC_MEM_TRACKLINES or ISC_MEMPOOL_NAMES disabled. Also, ISC_MEM_DEBUG is no longer optional. [RT #31559] @@ -316,6 +402,13 @@ in the "srcid" file in the build tree and normally set to the most recent git hash. [RT #31494] +3399. [port] netbsd: rename 'bool' parameter to avoid namespace + clash. [RT #31515] + +3398. [bug] SOA parameters were not being updated with inline + signed zones if the zone was modified while the + server was offline. [RT #29272] + 3397. [bug] dig crashed when using +nssearch with +tcp. [RT #25298] 3396. [bug] OPT records were incorrectly removed from signed, @@ -348,11 +441,10 @@ 3386. [bug] Address locking violation when generating new NSEC / NSEC3 chains. [RT #31224] -3384. [bug] Improved logging of crypto errors. [RT #30963] +3385. [bug] named-checkconf didn't detect missing master lists + in also-notify clauses. [RT #30810] -3383. [security] A certain combination of records in the RBT could - cause named to hang while populating the additional - section of a response. [RT #31090] +3384. [bug] Improved logging of crypto errors. [RT #30963] 3382. [bug] SOA query from slave used use-v6-udp-ports range, if set, regardless of the address family in use. @@ -370,6 +462,9 @@ 3378. [bug] Handle missing 'managed-keys-directory' better. [RT #30625] +3377. [bug] Removed spurious newline from NSEC3 multiline + output. [RT #31044] + 3376. [bug] Lack of EDNS support was being recorded without a successful response. [RT #30811] @@ -386,19 +481,34 @@ add NS RRsets to the additional section or not. [RT #30479] - --- 9.8.4 released --- +3316. [tuning] Improved locking performance when recursing. + [RT #28836] + +3315. [tuning] Use multiple dispatch objects for sending upstream + queries; this can improve performance on busy + multiprocessor systems by reducing lock contention. + [RT #28605] + + --- 9.9.2 released --- + +3383. [security] A certain combination of records in the RBT could + cause named to hang while populating the additional + section of a response. [RT #31090] 3373. [bug] win32: open raw files in binary mode. [RT #30944] 3364. [security] Named could die on specially crafted record. [RT #30416] - --- 9.8.4rc1 released --- + --- 9.9.2rc1 released --- + +3370. [bug] Address use after free while shutting down. [RT #30241] 3369. [bug] nsupdate terminated unexpectedly in interactive mode if built with readline support. [RT #29550] -3368. [bug] and were not C++ safe. +3368. [bug] , and + were not C++ safe. 3367. [bug] dns_dnsseckey_create() result was not being checked. [RT #30685] @@ -417,6 +527,9 @@ could trigger an assertion failure on startup. [RT #27730] +3361. [bug] "rndc signing -nsec3param" didn't work correctly + when salt was set to '-' (no salt). [RT #30099] + 3360. [bug] 'host -w' could die. [RT #18723] 3359. [bug] An improperly-formed TSIG secret could cause a @@ -428,10 +541,12 @@ approaching their expiry, so they don't remain in caches after expiry. [RT #26429] - --- 9.8.4b1 released --- +3355. [port] Use more portable awk in verify system test. 3354. [func] Improve OpenSSL error logging. [RT #29932] + --- 9.9.2b1 released --- + 3353. [bug] Use a single task for task exclusive operations. [RT #29872] @@ -446,6 +561,8 @@ ISC_MEM_DEBUGCTX memory debugging flag is set. [RT #30240] +3349. [bug] Change #3345 was incomplete. [RT #30233] + 3348. [bug] Prevent RRSIG data from being cached if a negative record matching the covering type exists at a higher trust level. Such data already can't be retrieved from @@ -459,16 +576,42 @@ 3346. [security] Bad-cache data could be used before it was initialized, causing an assert. [RT #30025] +3345. [bug] Addressed race condition when removing the last item + or inserting the first item in an ISC_QUEUE. + [RT #29539] + +3344. [func] New "dnssec-checkds" command checks a zone to + determine which DS records should be published + in the parent zone, or which DLV records should be + published in a DLV zone, and queries the DNS to + ensure that it exists. (Note: This tool depends + on python; it will not be built or installed on + systems that do not have a python interpreter.) + [RT #28099] + 3342. [bug] Change #3314 broke saving of stub zones to disk resulting in excessive cpu usage in some cases. [RT #29952] +3341. [func] New "dnssec-verify" command checks a signed zone + to ensure correctness of signatures and of NSEC/NSEC3 + chains. [RT #23673] + +3339. [func] Allow the maximum supported rsa exponent size to be + specified: "max-rsa-exponent-size ;" [RT #29228] + +3338. [bug] Address race condition in units tests: asyncload_zone + and asyncload_zt. [RT #26100] + 3337. [bug] Change #3294 broke support for the multiple keys in controls. [RT #29694] 3335. [func] nslookup: return a nonzero exit code when unable to get an answer. [RT #29492] +3334. [bug] Hold a zone table reference while performing a + asynchronous load of a zone. [RT #28326] + 3333. [bug] Setting resolver-query-timeout too low can cause named to not recover if it loses connectivity. [RT #29623] @@ -504,7 +647,7 @@ 3317. [func] Add ECDSA support (RFC 6605). [RT #21918] - --- 9.8.3 released --- + --- 9.9.1 released --- 3318. [tuning] Reduce the amount of work performed while holding a bucket lock when finished with a fetch context. @@ -536,6 +679,8 @@ 3304. [bug] Use hmctx, not mctx when freeing rbtdb->heaps. [RT #28571] +3303. [bug] named could die when reloading. [RT #28606] + 3302. [bug] dns_dnssec_findmatchingkeys could fail to find keys if the zone name contained character that required special mappings. [RT #28600] @@ -549,22 +694,15 @@ 3299. [bug] Make SDB handle errors from database drivers better. [RT #28534] -3232. [bug] Zero zone->curmaster before return in - dns_zone_setmasterswithkeys(). [RT #26732] - -3183. [bug] Added RTLD_GLOBAL flag to dlopen call. [RT #26301] - -3197. [bug] Don't try to log the filename and line number when - the config parser can't open a file. [RT #22263] - - --- 9.8.2 released --- - 3298. [bug] Named could dereference a NULL pointer in zmgr_start_xfrin_ifquota if the zone was being removed. [RT #28419] 3297. [bug] Named could die on a malformed master file. [RT #28467] +3296. [bug] Named could die with a INSIST failure in + client.c:exit_check. [RT #28346] + 3295. [bug] Adjust isc_time_secondsastimet range check to be more portable. [RT # 26542] @@ -576,6 +714,16 @@ 3290. [bug] was not being installed. [RT #28169] +3273. [bug] AAAA responses could be returned in the additional + section even when filter-aaaa-on-v4 was in use. + [RT #27292] + + --- 9.9.0 released --- + + --- 9.9.0rc4 released --- + +3289. [bug] 'rndc retransfer' failed for inline zones. [RT #28036] + 3288. [bug] dlz_destroy() function wasn't correctly registered by the DLZ dlopen driver. [RT #28056] @@ -584,7 +732,7 @@ 3286. [bug] Managed key maintenance timer could fail to start after 'rndc reconfig'. [RT #26786] - --- 9.8.2rc2 released --- + --- 9.9.0rc3 released --- 3285. [bug] val-frdataset was incorrectly disassociated in proveunsecure after calling startfinddlvsep. @@ -607,24 +755,34 @@ 3280. [bug] Potential double free of a rdataset on out of memory with DNS64. [RT #27762] +3279. [bug] Hold a internal reference to the zone while performing + a asynchronous load. Address potential memory leak + if the asynchronous is cancelled. [RT #27750] + 3278. [bug] Make sure automatic key maintenance is started when "auto-dnssec maintain" is turned on during "rndc reconfig". [RT #26805] +3277. [bug] win32: isc_socket_dup is not implemented. [RT #27696] + 3276. [bug] win32: ns_os_openfile failed to return NULL on safe_open failure. [RT #27696] -3274. [bug] Log when a zone is not reusable. Only set loadtime - on successful loads. [RT #27650] - -3273. [bug] AAAA responses could be returned in the additional - section even when filter-aaaa-on-v4 was in use. - [RT #27292] +3275. [bug] Corrected rndc -h output; the 'rndc sync -clean' + option had been misspelled as '-clear'. (To avoid + future confusion, both options now work.) [RT #27173] 3271. [port] darwin: mksymtbl is not always stable, loop several times before giving up. mksymtbl was using non portable perl to covert 64 bit hex strings. [RT #27653] + --- 9.9.0rc2 released --- + +3270. [bug] "rndc reload" didn't reuse existing zones correctly + when inline-signing was in use. [RT #27650] + +3269. [port] darwin 11 and later now built threaded by default. + 3268. [bug] Convert RRSIG expiry times to 64 timestamps to work out the earliest expiry time. [RT #23311] @@ -636,14 +794,26 @@ DNSKEY RRset was not being properly computed. [RT #26543] +3265. [bug] Corrected a problem with lock ordering in the + inline-signing code. [RT #27557] + +3264. [bug] Automatic regeneration of signatures in an + inline-signing zone could stall when the server + was restarted. [RT #27344] + +3263. [bug] "rndc sync" did not affect the unsigned side of an + inline-signing zone. [RT #27337] + 3262. [bug] Signed responses were handled incorrectly by RPZ. [RT #27316] - --- 9.8.2rc1 released --- +3261. [func] RRset ordering now defaults to random. [RT #27174] 3260. [bug] "rrset-order cyclic" could appear not to rotate for some query patterns. [RT #27170/27185] + --- 9.9.0rc1 released --- + 3259. [bug] named-compilezone: Suppress "dump zone to " message when writing to stdout. [RT #27109] @@ -655,12 +825,21 @@ 3256. [bug] Disable empty zones for lwresd -C. [RT #27139] +3255. [func] No longer require that a empty zones be explicitly + enabled or that a empty zone is disabled for + RFC 1918 empty zones to be configured. [RT #27139] + 3254. [bug] Set isc_socket_ipv6only() on the IPv6 control channels. [RT #22249] 3253. [bug] Return DNS_R_SYNTAX when the input to a text field is too long. [RT #26956] +3252. [bug] When master zones using inline-signing were + updated while the server was offline, the source + zone could fall out of sync with the signed + copy. They can now resynchronize. [RT #26676] + 3251. [bug] Enforce a upper bound (65535 bytes) on the amount of memory dns_sdlz_putrr() can allocate per record to prevent run away memory consumption on ISC_R_NOSPACE. @@ -680,8 +859,34 @@ 3247. [bug] 'raw' format zones failed to preserve load order breaking 'fixed' sort order. [RT #27087] -3243. [port] netbsd,bsdi: the thread defaults were not being - properly set. +3246. [bug] Named failed to start with a empty also-notify list. + [RT #27087] + +3245. [bug] Don't report a error unchanged serials unless there + were other changes when thawing a zone with + ixfr-fromdifferences. [RT #26845] + +3244. [func] Added readline support to nslookup and nsupdate. + Also simplified nsupdate syntax to make "update" + and "prereq" optional. [RT #24659] + +3243. [port] freebsd,netbsd,bsdi: the thread defaults were not + being properly set. + +3242. [func] Extended the header of raw-format master files to + include the serial number of the zone from which + they were generated, if different (as in the case + of inline-signing zones). This is to be used in + inline-signing zones, to track changes between the + unsigned and signed versions of the zone, which may + have different serial numbers. + + (Note: raw zonefiles generated by this version of + BIND are no longer compatible with prior versions. + To generate a backward-compatible raw zonefile + using dnssec-signzone or named-compilezone, specify + output format "raw=0" instead of simply "raw".) + [RT #26587] 3241. [bug] Address race conditions in the resolver code. [RT #26889] @@ -696,10 +901,21 @@ 3237. [bug] dig -6 didn't work with +trace. [RT #26906] - --- 9.8.2b1 released --- +3236. [bug] Backed out changes #3182 and #3202, related to + EDNS(0) fallback behavior. [RT #26416] + +3235. [func] dns_db_diffx, a extended dns_db_diff which returns + the generated diff and optionally writes it to a + journal. [RT #26386] 3234. [bug] 'make depend' produced invalid makefiles. [RT #26830] +3233. [bug] 'rndc freeze/thaw' didn't work for inline zones. + [RT #26632] + +3232. [bug] Zero zone->curmaster before return in + dns_zone_setmasterswithkeys(). [RT #26732] + 3231. [bug] named could fail to send a incompressible zone. [RT #26796] @@ -717,14 +933,29 @@ 3226. [bug] Address minor resource leakages. [RT #26624] +3225. [bug] Silence spurious "setsockopt(517, IPV6_V6ONLY) failed" + messages. [RT #26507] + +3224. [bug] 'rndc signing' argument parsing was broken. [RT #26684] + +3223. [bug] 'task_test privilege_drop' generated false positives. + [RT #26766] + +3222. [cleanup] Replace dns_journal_{get,set}_bitws with + dns_journal_{get,set}_sourceserial. [RT #26634] + 3221. [bug] Fixed a potential core dump on shutdown due to referencing fetch context after it's been freed. [RT #26720] + --- 9.9.0b2 released --- + 3220. [bug] Change #3186 was incomplete; dns_db_rpz_findips() could fail to set the database version correctly, causing an assertion failure. [RT #26180] +3219. [bug] Disable NOEDNS caching following a timeout. + 3218. [security] Cache lookup could return RRSIG data associated with nonexistent records, leading to an assertion failure. [RT #26590] @@ -733,12 +964,24 @@ 3216. [bug] resolver.c:validated() was not thread-safe. [RT #26478] +3215. [bug] 'rndc recursing' could cause a core dump. [RT #26495] + +3214. [func] Add 'named -U' option to set the number of UDP + listener threads per interface. [RT #26485] + 3213. [doc] Clarify ixfr-from-differences behavior. [RT #25188] 3212. [bug] rbtdb.c: failed to remove a node from the deadnodes list prior to adding a reference to it leading a possible assertion failure. [RT #23219] +3211. [func] dnssec-signzone: "-f -" prints to stdout; "-O full" + option prints in single-line-per-record format. + [RT #20287] + +3210. [bug] Canceling the oldest query due to recursive-client + overload could trigger an assertion failure. [RT #26463] + 3209. [func] Add "dnssec-lookaside 'no'". [RT #24858] 3208. [bug] 'dig -y' handle unknown tsig algorithm better. @@ -748,6 +991,11 @@ 3206. [cleanup] Add ISC information to log at start time. [RT #25484] +3205. [func] Upgrade dig's defaults to better reflect modern + nameserver behavior. Enable "dig +adflag" and + "dig +edns=0" by default. Enable "+dnssec" when + running "dig +trace". [RT #23497] + 3204. [bug] When a master server that has been marked as unreachable sends a NOTIFY, mark it reachable again. [RT #25960] @@ -755,12 +1003,24 @@ 3203. [bug] Increase log level to 'info' for validation failures from expired or not-yet-valid RRSIGs. [RT #21796] +3202. [bug] NOEDNS caching on timeout was too aggressive. + [RT #26416] + +3201. [func] 'rndc querylog' can now be given an on/off parameter + instead of only being used as a toggle. [RT #18351] + 3200. [doc] Some rndc functions were undocumented or were missing from 'rndc -h' output. [RT #25555] +3199. [func] When logging client information, include the name + being queried. [RT #25944] + 3198. [doc] Clarified that dnssec-settime can alter keyfile permissions. [RT #24866] +3197. [bug] Don't try to log the filename and line number when + the config parser can't open a file. [RT #22263] + 3196. [bug] nsupdate: return nonzero exit code when target zone doesn't exist. [RT #25783] @@ -789,10 +1049,50 @@ 3187. [port] win32: support for Visual Studio 2008. [RT #26356] + --- 9.9.0b1 released --- + 3186. [bug] Version/db mis-match in rpz code. [RT #26180] +3185. [func] New 'rndc signing' option for auto-dnssec zones: + - 'rndc signing -list' displays the current + state of signing operations + - 'rndc signing -clear' clears the signing state + records for keys that have fully signed the zone + - 'rndc signing -nsec3param' sets the NSEC3 + parameters for the zone + The 'rndc keydone' syntax is removed. [RT #23729] + +3184. [bug] named had excessive cpu usage when a redirect zone was + configured. [RT #26013] + +3183. [bug] Added RTLD_GLOBAL flag to dlopen call. [RT #26301] + +3182. [bug] Auth servers behind firewalls which block packets + greater than 512 bytes may cause other servers to + perform poorly. Now, adb retains edns information + and caches noedns servers. [RT #23392/24964] + +3181. [func] Inline-signing is now supported for master zones. + [RT #26224] + +3180. [func] Local copies of slave zones are now saved in raw + format by default, to improve startup performance. + 'masterfile-format text;' can be used to override + the default, if desired. [RT #25867] + 3179. [port] kfreebsd: build issues. [RT #26273] +3178. [bug] A race condition introduced by change #3163 could + cause an assertion failure on shutdown. [RT #26271] + +3177. [func] 'rndc keydone', remove the indicator record that + named has finished signing the zone with the + corresponding key. [RT #26206] + +3176. [doc] Corrected example code and added a README to the + sample external DLZ module in contrib/dlz/example. + [RT #26215] + 3175. [bug] Fix how DNSSEC positive wildcard responses from a NSEC3 signed zone are validated. Stop sending a unnecessary NSEC3 record when generating such @@ -803,9 +1103,14 @@ 3173. [port] Correctly validate root DS responses. [RT #25726] +3172. [port] darwin 10.* and freebsd [89] are now built threaded by + default. + 3171. [bug] Exclusively lock the task when adding a zone using 'rndc addzone'. [RT #25600] + --- 9.9.0a3 released --- + 3170. [func] RPZ update: - fix precedence among competing rules - improve ARM text including documenting rule precedence @@ -820,10 +1125,28 @@ 3169. [func] Catch db/version mis-matches when calling dns_db_*(). [RT #26017] +3168. [bug] Nxdomain redirection could trigger an assert with + a ANY query. [RT #26017] + 3167. [bug] Negative answers from forwarders were not being correctly tagged making them appear to not be cached. [RT #25380] +3166. [bug] Upgrading a zone to support inline-signing failed. + [RT #26014] + +3165. [bug] dnssec-signzone could generate new signatures when + resigning, even when valid signatures were already + present. [RT #26025] + +3164. [func] Enable DLZ modules to retrieve client information, + so that responses can be changed depending on the + source address of the query. [RT #25768] + +3163. [bug] Use finer-grained locking in client.c to address + concurrency problems with large numbers of threads. + [RT #26044] + 3162. [test] start.pl: modified to allow for "named.args" in ns*/ subdirectory to override stock arguments to named. Largely from RT#26044, but no separate ticket. @@ -831,24 +1154,52 @@ 3161. [bug] zone.c:del_sigs failed to always reset rdata leading assertion failures. [RT #25880] +3160. [bug] When printing out a NSEC3 record in multiline form + the newline was not being printed causing type codes + to be run together. [RT #25873] + +3159. [bug] On some platforms, named could assert on startup + when running in a chrooted environment without + /proc. [RT #25863] + +3158. [bug] Recursive servers would prefer a particular UDP + socket instead of using all available sockets. + [RT #26038] + 3157. [tuning] Reduce the time spent in "rndc reconfig" by parsing the config file before pausing the server. [RT #21373] +3156. [placeholder] + + --- 9.9.0a2 released --- + 3155. [bug] Fixed a build failure when using contrib DLZ drivers (e.g., mysql, postgresql, etc). [RT #25710] 3154. [bug] Attempting to print an empty rdataset could trigger an assert. [RT #25452] +3153. [func] Extend request-ixfr to zone level and remove the + side effect of forcing an AXFR. [RT #25156] + 3152. [cleanup] Some versions of gcc and clang failed due to incorrect use of __builtin_expect. [RT #25183] 3151. [bug] Queries for type RRSIG or SIG could be handled incorrectly. [RT #21050] +3150. [func] Improved startup and reconfiguration time by + enabling zones to load in multiple threads. [RT #25333] + +3149. [placeholder] + 3148. [bug] Processing of normal queries could be stalled when forwarding a UPDATE message. [RT #24711] +3147. [func] Initial inline signing support. [RT #23657] + + --- 9.9.0a1 released --- + 3146. [test] Fixed gcc4.6.0 errors in ATF. [RT #25598] 3145. [test] Capture output of ATF unit tests in "./atf.out" if @@ -859,29 +1210,31 @@ 3143. [bug] Silence clang compiler warnings. [RT #25174] -3139. [test] Added tests from RFC 6234, RFC 2202, and RFC 1321 - for the hashing algorithms (md5, sha1 - sha512, and - their hmac counterparts). [RT #25067] - - --- 9.8.1 released --- - - --- 9.8.1rc1 released --- +3142. [bug] NAPTR is class agnostic. [RT #25429] 3141. [bug] Silence spurious "zone serial (0) unchanged" messages associated with empty zones. [RT #25079] +3140. [func] New command "rndc flushtree " clears the + specified name from the server cache along with + all names under it. [RT #19970] + +3139. [test] Added tests from RFC 6234, RFC 2202, and RFC 1321 + for the hashing algorithms (md5, sha1 - sha512, and + their hmac counterparts). [RT #25067] + 3138. [bug] Address memory leaks and out-of-order operations when shutting named down. [RT #25210] +3137. [func] Improve hardware scalability by allowing multiple + worker threads to process incoming UDP packets. + This can significantly increase query throughput + on some systems. [RT #22992] + 3136. [func] Add RFC 1918 reverse zones to the list of built-in empty zones switched on by the 'empty-zones-enable' option. [RT #24990] - Note: empty-zones-enable must be "yes;" or a empty - zone needs to be disabled in named.conf for RFC 1918 - zones to be activated. This requirement may be - removed in future releases. - 3135. [port] FreeBSD: workaround broken IPV6_USE_MIN_MTU processing. See http://www.freebsd.org/cgi/query-pr.cgi?pr=158307 [RT #24950] @@ -889,19 +1242,34 @@ 3134. [bug] Improve the accuracy of dnssec-signzone's signing statistics. [RT #16030] - --- 9.8.1b3 released --- - 3133. [bug] Change #3114 was incomplete. [RT #24577] +3132. [placeholder] + 3131. [tuning] Improve scalability by allocating one zone task per 100 zones at startup time, rather than using a fixed-size task table. [RT #24406] +3130. [func] Support alternate methods for managing a dynamic + zone's serial number. Two methods are currently + defined using serial-update-method, "increment" + (default) and "unixtime". [RT #23849] + 3129. [bug] Named could crash on 'rndc reconfig' when allow-new-zones was set to yes and named ACLs were used. [RT #22739] - --- 9.8.1b2 released --- +3128. [func] Inserting an NSEC3PARAM via dynamic update in an + auto-dnssec zone that has not been signed yet + will cause it to be signed with the specified NSEC3 + parameters when keys are activated. The + NSEC3PARAM record will not appear in the zone until + it is signed, but the parameters will be stored. + [RT #23684] + +3127. [bug] 'rndc thaw' will now remove a zone's journal file + if the zone serial number has been changed and + ixfr-from-differences is not in use. [RT #24687] 3126. [security] Using DNAME record to generate replacements caused RPZ to exit with a assertion failure. [RT #24766] @@ -941,6 +1309,12 @@ never-implemented 'auto-dnssec create' option. [RT #24533] +3116. [func] New 'dnssec-update-mode' option controls updates + of DNSSEC records in signed dynamic zones. Set to + 'no-resign' to disable automatic RRSIG regeneration + while retaining the ability to sign new or changed + data. [RT #24533] + 3115. [bug] Named could fail to return requested data when following a CNAME that points into the same zone. [RT #24455] @@ -951,8 +1325,6 @@ 3113. [doc] Document the relationship between serial-query-rate and NOTIFY messages. - --- 9.8.1b1 released --- - 3112. [doc] Add missing descriptions of the update policy name types "ms-self", "ms-subdomain", "krb5-self" and "krb5-subdomain", which allow machines to update @@ -965,9 +1337,23 @@ 3110. [bug] dnssec-signzone: Wrong error message could appear when attempting to sign with no KSK. [RT #24369] +3109. [func] The also-notify option now uses the same syntax + as a zone's masters clause. This means it is + now possible to specify a TSIG key to use when + sending notifies to a given server, or to include + an explicit named masters list in an also-notfiy + statement. [RT #23508] + +3108. [cleanup] dnssec-signzone: Clarified some error and + warning messages; removed #ifdef ALLOW_KSKLESS_ZONES + code (use -P instead). [RT #20852] + 3107. [bug] dnssec-signzone: Report the correct number of ZSKs when using -x. [RT #20852] +3106. [func] When logging client requests, include the name of + the TSIG key if any. [RT #23619] + 3105. [bug] GOST support can be suppressed by "configure --without-gost" [RT #24367] @@ -977,6 +1363,12 @@ instead of in the options statement could trigger an assertion failure in named-checkconf. [RT #24382] *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 09:17:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6D3ECF61; Mon, 26 Aug 2013 09:17:22 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5AA6029F9; Mon, 26 Aug 2013 09:17:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7Q9HMVw038545; Mon, 26 Aug 2013 09:17:22 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7Q9HMlP038544; Mon, 26 Aug 2013 09:17:22 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308260917.r7Q9HMlP038544@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Mon, 26 Aug 2013 09:17:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254899 - head/sys/modules/drm2 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 09:17:22 -0000 Author: dumbbell Date: Mon Aug 26 09:17:21 2013 New Revision: 254899 URL: http://svnweb.freebsd.org/changeset/base/254899 Log: drm/radeon: Disable build on i386/pc98 Modified: head/sys/modules/drm2/Makefile Modified: head/sys/modules/drm2/Makefile ============================================================================== --- head/sys/modules/drm2/Makefile Mon Aug 26 07:48:50 2013 (r254898) +++ head/sys/modules/drm2/Makefile Mon Aug 26 09:17:21 2013 (r254899) @@ -2,14 +2,26 @@ .include -.if ${MK_SOURCELESS_UCODE} != "no" +.if ${MACHINE_CPUARCH} == "amd64" +_radeonkms= radeonkms +. if ${MK_SOURCELESS_UCODE} != "no" _radeonkmsfw= radeonkmsfw +. endif +.endif + +.if ${MACHINE_CPUARCH} == "i386" +. if ${MACHINE} != "pc98" +_radeonkms= radeonkms +. if ${MK_SOURCELESS_UCODE} != "no" +_radeonkmsfw= radeonkmsfw +. endif +. endif .endif SUBDIR = \ drm2 \ i915kms \ - radeonkms \ + ${_radeonkms} \ ${_radeonkmsfw} .include From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 09:43:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C9ADF88B; Mon, 26 Aug 2013 09:43:38 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5215A2D8B; Mon, 26 Aug 2013 09:43:37 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id r7Q9hTiA059394; Mon, 26 Aug 2013 13:43:29 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id r7Q9hTK1059393; Mon, 26 Aug 2013 13:43:29 +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, 26 Aug 2013 13:43:29 +0400 From: Gleb Smirnoff To: Andre Oppermann Subject: Re: svn commit: r254527 - in head/sys: net80211 netinet sys Message-ID: <20130826094329.GP4574@glebius.int.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 09:43:38 -0000 A> Author: andre A> Date: Mon Aug 19 14:25:11 2013 A> New Revision: 254527 A> URL: http://svnweb.freebsd.org/changeset/base/254527 A> A> Log: A> Reorder the mbuf defines to make more sense and group related flags A> together. A> A> Add M_FLAG_PRINTF for use with printf(9) %b indentifier. A> A> Use the generic mbuf flags print names in the net80211 code and adjust A> the protocol specific bits for their new positions. A> A> Change SCTP M_PROTO mapping from 5 to 1 to fit within the 16bit field A> they use internally to store some additional information. A> A> Discussed with: trociny, glebius The first part: "reorder the mbuf flag defines" wasn't actually discussed. Tossing values of M_BCAST, M_MCAST, M_VLANTAG for no value except code tidyness isn't a safe idea. These are the flags that device drivers use. After this change binary drivers are still loadable but would be buggy. We allow ourselves ABI changes in head, but this doesn't mean that we should do them for no important reason. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 09:52:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B9AA0D42; Mon, 26 Aug 2013 09:52:06 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 986D52E9B; Mon, 26 Aug 2013 09:52:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7Q9q6ti058124; Mon, 26 Aug 2013 09:52:06 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7Q9q68M058120; Mon, 26 Aug 2013 09:52:06 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201308260952.r7Q9q68M058120@svn.freebsd.org> From: Adrian Chadd Date: Mon, 26 Aug 2013 09:52:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254900 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 09:52:06 -0000 Author: adrian Date: Mon Aug 26 09:52:05 2013 New Revision: 254900 URL: http://svnweb.freebsd.org/changeset/base/254900 Log: Migrate the ff_encap1() routine out into the normal output code. This will eventually be used by the A-MSDU encapsulation code that I'm writing - the sub-frame encapsulation requirement is the same. Modified: head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_proto.h head/sys/net80211/ieee80211_superg.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Mon Aug 26 09:17:21 2013 (r254899) +++ head/sys/net80211/ieee80211_output.c Mon Aug 26 09:52:05 2013 (r254900) @@ -3316,3 +3316,40 @@ ieee80211_beacon_update(struct ieee80211 return len_changed; } + +/* + * Do Ethernet-LLC encapsulation for each payload in a fast frame + * tunnel encapsulation. The frame is assumed to have an Ethernet + * header at the front that must be stripped before prepending the + * LLC followed by the Ethernet header passed in (with an Ethernet + * type that specifies the payload size). + */ +struct mbuf * +ieee80211_ff_encap1(struct ieee80211vap *vap, struct mbuf *m, + const struct ether_header *eh) +{ + struct llc *llc; + uint16_t payload; + + /* XXX optimize by combining m_adj+M_PREPEND */ + m_adj(m, sizeof(struct ether_header) - sizeof(struct llc)); + llc = mtod(m, struct llc *); + llc->llc_dsap = llc->llc_ssap = LLC_SNAP_LSAP; + llc->llc_control = LLC_UI; + llc->llc_snap.org_code[0] = 0; + llc->llc_snap.org_code[1] = 0; + llc->llc_snap.org_code[2] = 0; + llc->llc_snap.ether_type = eh->ether_type; + payload = m->m_pkthdr.len; /* NB: w/o Ethernet header */ + + M_PREPEND(m, sizeof(struct ether_header), M_NOWAIT); + if (m == NULL) { /* XXX cannot happen */ + IEEE80211_DPRINTF(vap, IEEE80211_MSG_SUPERG, + "%s: no space for ether_header\n", __func__); + vap->iv_stats.is_tx_nobuf++; + return NULL; + } + ETHER_HEADER_COPY(mtod(m, void *), eh); + mtod(m, struct ether_header *)->ether_type = htons(payload); + return m; +} Modified: head/sys/net80211/ieee80211_proto.h ============================================================================== --- head/sys/net80211/ieee80211_proto.h Mon Aug 26 09:17:21 2013 (r254899) +++ head/sys/net80211/ieee80211_proto.h Mon Aug 26 09:52:05 2013 (r254900) @@ -125,6 +125,9 @@ int ieee80211_send_probereq(struct ieee8 const uint8_t da[IEEE80211_ADDR_LEN], const uint8_t bssid[IEEE80211_ADDR_LEN], const uint8_t *ssid, size_t ssidlen); +struct mbuf * ieee80211_ff_encap1(struct ieee80211vap *, struct mbuf *, + const struct ether_header *); + /* * The formation of ProbeResponse frames requires guidance to * deal with legacy clients. When the client is identified as Modified: head/sys/net80211/ieee80211_superg.c ============================================================================== --- head/sys/net80211/ieee80211_superg.c Mon Aug 26 09:17:21 2013 (r254899) +++ head/sys/net80211/ieee80211_superg.c Mon Aug 26 09:52:05 2013 (r254900) @@ -330,43 +330,6 @@ ieee80211_ff_decap(struct ieee80211_node } /* - * Do Ethernet-LLC encapsulation for each payload in a fast frame - * tunnel encapsulation. The frame is assumed to have an Ethernet - * header at the front that must be stripped before prepending the - * LLC followed by the Ethernet header passed in (with an Ethernet - * type that specifies the payload size). - */ -static struct mbuf * -ff_encap1(struct ieee80211vap *vap, struct mbuf *m, - const struct ether_header *eh) -{ - struct llc *llc; - uint16_t payload; - - /* XXX optimize by combining m_adj+M_PREPEND */ - m_adj(m, sizeof(struct ether_header) - sizeof(struct llc)); - llc = mtod(m, struct llc *); - llc->llc_dsap = llc->llc_ssap = LLC_SNAP_LSAP; - llc->llc_control = LLC_UI; - llc->llc_snap.org_code[0] = 0; - llc->llc_snap.org_code[1] = 0; - llc->llc_snap.org_code[2] = 0; - llc->llc_snap.ether_type = eh->ether_type; - payload = m->m_pkthdr.len; /* NB: w/o Ethernet header */ - - M_PREPEND(m, sizeof(struct ether_header), M_NOWAIT); - if (m == NULL) { /* XXX cannot happen */ - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SUPERG, - "%s: no space for ether_header\n", __func__); - vap->iv_stats.is_tx_nobuf++; - return NULL; - } - ETHER_HEADER_COPY(mtod(m, void *), eh); - mtod(m, struct ether_header *)->ether_type = htons(payload); - return m; -} - -/* * Fast frame encapsulation. There must be two packets * chained with m_nextpkt. We do header adjustment for * each, add the tunnel encapsulation, and then concatenate @@ -424,10 +387,10 @@ ieee80211_ff_encap(struct ieee80211vap * * Now do tunnel encapsulation. First, each * frame gets a standard encapsulation. */ - m1 = ff_encap1(vap, m1, &eh1); + m1 = ieee80211_ff_encap1(vap, m1, &eh1); if (m1 == NULL) goto bad; - m2 = ff_encap1(vap, m2, &eh2); + m2 = ieee80211_ff_encap1(vap, m2, &eh2); if (m2 == NULL) goto bad; From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 10:25:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5E35177B; Mon, 26 Aug 2013 10:25:00 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4BBDE2202; Mon, 26 Aug 2013 10:25:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QAP0xS075781; Mon, 26 Aug 2013 10:25:00 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QAP0xf075779; Mon, 26 Aug 2013 10:25:00 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201308261025.r7QAP0xf075779@svn.freebsd.org> From: Andrew Turner Date: Mon, 26 Aug 2013 10:25:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254901 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 10:25:00 -0000 Author: andrew Date: Mon Aug 26 10:24:59 2013 New Revision: 254901 URL: http://svnweb.freebsd.org/changeset/base/254901 Log: Revert r251370 as it contains a deadlock. Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Mon Aug 26 09:52:05 2013 (r254900) +++ head/sys/arm/arm/pmap-v6.c Mon Aug 26 10:24:59 2013 (r254901) @@ -2944,126 +2944,6 @@ void pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, vm_offset_t src_addr) { - struct l2_bucket *l2b_src, *l2b_dst; - struct pv_entry *pve; - vm_offset_t addr; - vm_offset_t end_addr; - vm_offset_t next_bucket; - u_int flags; - boolean_t l2b_alloc; - - CTR4(KTR_PMAP, "%s: VA = 0x%08x, len = 0x%08x. Will %s\n", __func__, - src_addr, len, (dst_addr != src_addr) ? "exit" : "copy"); - - if (dst_addr != src_addr) - return; - - rw_wlock(&pvh_global_lock); - if (dst_pmap < src_pmap) { - PMAP_LOCK(dst_pmap); - PMAP_LOCK(src_pmap); - } else { - PMAP_LOCK(src_pmap); - PMAP_LOCK(dst_pmap); - } - - end_addr = src_addr + len; - addr = src_addr; - /* - * Iterate through all used l2_buckets in a given range. - */ - while (addr < end_addr) { - pt_entry_t *src_ptep, *dst_ptep; - pt_entry_t src_pte; - - next_bucket = L2_NEXT_BUCKET(addr); - /* - * If the next bucket VA is out of the - * copy range then set it to end_addr in order - * to copy all mappings until the given limit. - */ - if (next_bucket > end_addr) - next_bucket = end_addr; - - l2b_src = pmap_get_l2_bucket(src_pmap, addr); - if (l2b_src == NULL) { - addr = next_bucket; - continue; - } - src_ptep = &l2b_src->l2b_kva[l2pte_index(addr)]; - - while (addr < next_bucket) { - vm_page_t srcmpte; - - src_pte = *src_ptep; - srcmpte = PHYS_TO_VM_PAGE(l2pte_pa(src_pte)); - /* - * We only virtual copy managed pages - */ - if (srcmpte && (srcmpte->oflags & VPO_UNMANAGED) == 0) { - l2b_alloc = FALSE; - l2b_dst = pmap_get_l2_bucket(dst_pmap, addr); - /* - * Check if the allocation of another - * l2_bucket is necessary. - */ - if (l2b_dst == NULL) { - l2b_dst = pmap_alloc_l2_bucket(dst_pmap, - addr); - l2b_alloc = TRUE; - } - if (l2b_dst == NULL) - goto out; - - dst_ptep = &l2b_dst->l2b_kva[l2pte_index(addr)]; - - if (*dst_ptep == 0 && - (pve = pmap_get_pv_entry(dst_pmap, TRUE))) { - /* - * Check whether the source mapping is - * writable and set the proper flag - * for a copied mapping so that right - * permissions could be set on the - * access fault. - */ - flags = 0; - if ((src_pte & L2_APX) == 0) - flags = PVF_WRITE; - pmap_enter_pv(srcmpte, pve, dst_pmap, - addr, flags); - /* - * Clear the modified and - * accessed (referenced) flags - * and don't set the wired flag - * during the copy. - */ - *dst_ptep = src_pte; - *dst_ptep &= ~L2_S_REF; - *dst_ptep |= L2_APX; - /* - * Update stats - */ - l2b_dst->l2b_occupancy++; - dst_pmap->pm_stats.resident_count++; - } else { - /* - * If the l2_bucket was acquired as - * a result of allocation then free it. - */ - if (l2b_alloc) - pmap_free_l2_bucket(dst_pmap, - l2b_dst, 1); - goto out; - } - } - addr += PAGE_SIZE; - src_ptep++; - } - } -out: - rw_wunlock(&pvh_global_lock); - PMAP_UNLOCK(src_pmap); - PMAP_UNLOCK(dst_pmap); } From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 10:27:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8AC3D8E5; Mon, 26 Aug 2013 10:27:16 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 78DAE2222; Mon, 26 Aug 2013 10:27:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QARGJn076596; Mon, 26 Aug 2013 10:27:16 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QARG38076594; Mon, 26 Aug 2013 10:27:16 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201308261027.r7QARG38076594@svn.freebsd.org> From: Andrew Turner Date: Mon, 26 Aug 2013 10:27:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254902 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 10:27:16 -0000 Author: andrew Date: Mon Aug 26 10:27:15 2013 New Revision: 254902 URL: http://svnweb.freebsd.org/changeset/base/254902 Log: Update the root device to be correct for use with crochet. Modified: head/sys/arm/conf/VERSATILEPB Modified: head/sys/arm/conf/VERSATILEPB ============================================================================== --- head/sys/arm/conf/VERSATILEPB Mon Aug 26 10:24:59 2013 (r254901) +++ head/sys/arm/conf/VERSATILEPB Mon Aug 26 10:27:15 2013 (r254902) @@ -53,7 +53,7 @@ options SYSVMSG #SYSV-style message q options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options ROOTDEVNAME=\"ufs:da0s2a\" +options ROOTDEVNAME=\"ufs:da0s1a\" options VFP # vfp/neon options PREEMPTION From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 10:50:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E6E1F236; Mon, 26 Aug 2013 10:50:36 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7185D2415; Mon, 26 Aug 2013 10:50:35 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id r7QAoXwU059707; Mon, 26 Aug 2013 14:50:33 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id r7QAoXiR059706; Mon, 26 Aug 2013 14:50: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: Mon, 26 Aug 2013 14:50:33 +0400 From: Gleb Smirnoff To: Andre Oppermann Subject: Re: svn commit: r254779 - head/sys/kern Message-ID: <20130826105033.GQ4574@FreeBSD.org> References: <201308241224.r7OCOx9l069850@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201308241224.r7OCOx9l069850@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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 10:50:37 -0000 On Sat, Aug 24, 2013 at 12:24:59PM +0000, Andre Oppermann wrote: A> Author: andre A> Date: Sat Aug 24 12:24:58 2013 A> New Revision: 254779 A> URL: http://svnweb.freebsd.org/changeset/base/254779 A> A> Log: A> Avoid code duplication for mbuf initialization and use m_init() instead A> in mb_ctor_mbuf() and mb_ctor_pack(). m_init() is inline, but it calls m_pkthdr_init() which isn't inline. It might be that compiler inline it due to m_pkthdr_init() living in the same file as mb_ctor_mbuf() and mb_ctor_pack(), but not sure. m_pkthdr_init() zeroes much more than deleted code did. Some zeroing operations are definitely superfluous job. The change is definitely not an no-op change. It might have pessimized the mbuf allocation performance. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 11:00:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 52C3253F; Mon, 26 Aug 2013 11:00:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D127A247E; Mon, 26 Aug 2013 11:00:09 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id r7QB07nS059789; Mon, 26 Aug 2013 15:00:07 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id r7QB078C059788; Mon, 26 Aug 2013 15:00:07 +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, 26 Aug 2013 15:00:07 +0400 From: Gleb Smirnoff To: Andre Oppermann Subject: Re: svn commit: r254805 - head/sys/sys Message-ID: <20130826110007.GR4574@FreeBSD.org> References: <201308241958.r7OJwaxV031368@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201308241958.r7OJwaxV031368@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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 11:00:10 -0000 On Sat, Aug 24, 2013 at 07:58:36PM +0000, Andre Oppermann wrote: A> Author: andre A> Date: Sat Aug 24 19:58:36 2013 A> New Revision: 254805 A> URL: http://svnweb.freebsd.org/changeset/base/254805 A> A> Log: A> Add mtodo(m, o) macro taking an additional offset into the mbuf data section. A> A> Sponsored by: The FreeBSD Foundation A> A> Modified: A> head/sys/sys/mbuf.h A> A> Modified: head/sys/sys/mbuf.h A> ============================================================================== A> --- head/sys/sys/mbuf.h Sat Aug 24 19:51:18 2013 (r254804) A> +++ head/sys/sys/mbuf.h Sat Aug 24 19:58:36 2013 (r254805) A> @@ -67,8 +67,10 @@ A> * type: A> * A> * mtod(m, t) -- Convert mbuf pointer to data pointer of correct type. A> + * mtodo(m, o) -- Same as above but with offset 'o' into data. A> */ A> #define mtod(m, t) ((t)((m)->m_data)) A> +#define mtodo(m, o) ((void *)(((m)->m_data) + (o))) IMO, having a typecast would be better. Then mtodo() would be really same as mtod(), as stated in comment. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 11:52:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4E4607DE; Mon, 26 Aug 2013 11:52:53 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2734F2D13; Mon, 26 Aug 2013 11:52:51 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id r7QBqopn060032; Mon, 26 Aug 2013 15:52:50 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id r7QBqoCl060031; Mon, 26 Aug 2013 15:52:50 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 26 Aug 2013 15:52:50 +0400 From: Gleb Smirnoff To: Alfred Perlstein Subject: Re: svn commit: r254823 - head/sys/net Message-ID: <20130826115249.GS4574@FreeBSD.org> References: <201308250155.r7P1tF3w026623@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201308250155.r7P1tF3w026623@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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 11:52:53 -0000 On Sun, Aug 25, 2013 at 01:55:15AM +0000, Alfred Perlstein wrote: A> Author: alfred A> Date: Sun Aug 25 01:55:14 2013 A> New Revision: 254823 A> URL: http://svnweb.freebsd.org/changeset/base/254823 A> A> Log: A> Remove the #ifdef OFED from the 20 byte mac in struct llentry. A> A> With this change it is now possible to build the entire infiniband A> stack as modules and load it dynamically including IP over IB. A> A> Modified: A> head/sys/net/if_llatbl.h A> A> Modified: head/sys/net/if_llatbl.h A> ============================================================================== A> --- head/sys/net/if_llatbl.h Sun Aug 25 00:34:44 2013 (r254822) A> +++ head/sys/net/if_llatbl.h Sun Aug 25 01:55:14 2013 (r254823) A> @@ -75,9 +75,7 @@ struct llentry { A> union { A> uint64_t mac_aligned; A> uint16_t mac16[3]; A> -#ifdef OFED A> uint8_t mac8[20]; /* IB needs 20 bytes. */ A> -#endif A> } ll_addr; A> A> /* XXX af-private? */ #include "opt_ofed.h" should be removed from the file as well. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 12:05:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 045792FB; Mon, 26 Aug 2013 12:05:40 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E561D2E31; Mon, 26 Aug 2013 12:05:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QC5dq8030577; Mon, 26 Aug 2013 12:05:39 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QC5duX030572; Mon, 26 Aug 2013 12:05:39 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201308261205.r7QC5duX030572@svn.freebsd.org> From: Sean Bruno Date: Mon, 26 Aug 2013 12:05:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254906 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 12:05:40 -0000 Author: sbruno Date: Mon Aug 26 12:05:38 2013 New Revision: 254906 URL: http://svnweb.freebsd.org/changeset/base/254906 Log: Add support to reconfigure a drive as SYSPD (real JBOD in LSI terminology). Adds command "mfiutil syspd " to change a drive to SYSPD. Drive will then be scanned/reported immediately as /dev/mfisyspdX by the host. "mfiutil good " clears SYSPD mode, remove /dev/mfisyspdX and sets disk into UNCONFIGURED mode. Tested on Dell H310 SAS/SATA RAID controller. MFC after: 2 weeks Sponsored by: Yahoo! Inc. Modified: head/usr.sbin/mfiutil/mfi_drive.c head/usr.sbin/mfiutil/mfiutil.8 head/usr.sbin/mfiutil/mfiutil.c Modified: head/usr.sbin/mfiutil/mfi_drive.c ============================================================================== --- head/usr.sbin/mfiutil/mfi_drive.c Mon Aug 26 12:04:22 2013 (r254905) +++ head/usr.sbin/mfiutil/mfi_drive.c Mon Aug 26 12:05:38 2013 (r254906) @@ -474,6 +474,20 @@ rebuild_drive(int ac, char **av) MFI_COMMAND(top, rebuild, rebuild_drive); static int +syspd_drive(int ac, char **av) +{ + + if (ac != 2) { + warnx("syspd: %s", ac > 2 ? "extra arguments" : + "drive required"); + return (EINVAL); + } + + return (drive_set_state(av[1], MFI_PD_STATE_SYSTEM)); +} +MFI_COMMAND(top, syspd, syspd_drive); + +static int start_rebuild(int ac, char **av) { struct mfi_pd_info info; Modified: head/usr.sbin/mfiutil/mfiutil.8 ============================================================================== --- head/usr.sbin/mfiutil/mfiutil.8 Mon Aug 26 12:04:22 2013 (r254905) +++ head/usr.sbin/mfiutil/mfiutil.8 Mon Aug 26 12:05:38 2013 (r254906) @@ -91,6 +91,9 @@ .Cm rebuild Ar drive .Nm .Op Fl u Ar unit +.Cm syspd Ar drive +.Nm +.Op Fl u Ar unit .Cm drive progress Ar drive .Nm .Op Fl u Ar unit @@ -372,6 +375,11 @@ Mark a failed that is still part of an array as a good drive suitable for a rebuild. The firmware should kick off an array rebuild on its own if a failed drive is marked as a rebuild drive. +.It Cm syspd Ar drive +Present the drive to the host operating system as a disk SYSPD block device in +the format /dev/mfisyspdX. Clear this flag with +.Cm good +.Ar drive .It Cm drive progress Ar drive Report the current progress and estimated completion time of drive operations such as rebuilds or patrol reads. @@ -679,6 +687,10 @@ Add the drive in slot 2 in the main chas .Pp .Dl Nm Cm add s2 mfid0 .Pp +Reconfigure a disk as a SYSPD block device with no RAID +.Pp +.Dl Nm Cm syspd 0 +.Pp Configure the adapter to run periodic patrol reads once a week with the first patrol read starting in 5 minutes: .Pp Modified: head/usr.sbin/mfiutil/mfiutil.c ============================================================================== --- head/usr.sbin/mfiutil/mfiutil.c Mon Aug 26 12:04:22 2013 (r254905) +++ head/usr.sbin/mfiutil/mfiutil.c Mon Aug 26 12:05:38 2013 (r254906) @@ -66,8 +66,9 @@ usage(void) fprintf(stderr, " show patrol - display patrol read status\n"); fprintf(stderr, " show progress - display status of active operations\n"); fprintf(stderr, " fail - fail a physical drive\n"); - fprintf(stderr, " good - mark a bad physical drive as good\n"); + fprintf(stderr, " good - set a failed/SYSPD drive as UNCONFIGURED\n"); fprintf(stderr, " rebuild - mark failed drive ready for rebuild\n"); + fprintf(stderr, " syspd - set drive into use as SYSPD JBOD\n"); fprintf(stderr, " drive progress - display status of active operations\n"); fprintf(stderr, " drive clear - clear a drive with all 0x00\n"); fprintf(stderr, " start rebuild \n"); @@ -103,7 +104,7 @@ static int version(int ac __unused, char **av __unused) { - printf("mfiutil version 1.0.14"); + printf("mfiutil version 1.0.15"); #ifdef DEBUG printf(" (DEBUG)"); #endif From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 13:17:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8D398DA2; Mon, 26 Aug 2013 13:17:37 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7A5ED2386; Mon, 26 Aug 2013 13:17:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QDHbdN069704; Mon, 26 Aug 2013 13:17:37 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QDHbv7069703; Mon, 26 Aug 2013 13:17:37 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201308261317.r7QDHbv7069703@svn.freebsd.org> From: Andre Oppermann Date: Mon, 26 Aug 2013 13:17:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254910 - head/sys/dev/xen/netback X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 13:17:37 -0000 Author: andre Date: Mon Aug 26 13:17:37 2013 New Revision: 254910 URL: http://svnweb.freebsd.org/changeset/base/254910 Log: Fix mbuf debugging printf()'s after the recent mbuf header changes. Modified: head/sys/dev/xen/netback/netback.c Modified: head/sys/dev/xen/netback/netback.c ============================================================================== --- head/sys/dev/xen/netback/netback.c Mon Aug 26 13:00:25 2013 (r254909) +++ head/sys/dev/xen/netback/netback.c Mon Aug 26 13:17:37 2013 (r254910) @@ -587,14 +587,14 @@ xnb_dump_mbuf(const struct mbuf *m) if (m->m_flags & M_PKTHDR) { printf(" flowid=%10d, csum_flags=%#8x, csum_data=%#8x, " "tso_segsz=%5hd\n", - m->m_pkthdr.flowid, m->m_pkthdr.csum_flags, + m->m_pkthdr.flowid, (int)m->m_pkthdr.csum_flags, m->m_pkthdr.csum_data, m->m_pkthdr.tso_segsz); - printf(" rcvif=%16p, header=%18p, len=%19d\n", - m->m_pkthdr.rcvif, m->m_pkthdr.header, m->m_pkthdr.len); + printf(" rcvif=%16p, len=%19d\n", + m->m_pkthdr.rcvif, m->m_pkthdr.len); } printf(" m_next=%16p, m_nextpk=%16p, m_data=%16p\n", m->m_next, m->m_nextpkt, m->m_data); - printf(" m_len=%17d, m_flags=%#15x, m_type=%18hd\n", + printf(" m_len=%17d, m_flags=%#15x, m_type=%18u\n", m->m_len, m->m_flags, m->m_type); len = m->m_len; From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 14:00:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DC26DCC7 for ; Mon, 26 Aug 2013 14:00:22 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 30BE62638 for ; Mon, 26 Aug 2013 14:00:21 +0000 (UTC) Received: (qmail 6651 invoked from network); 26 Aug 2013 14:42:32 -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 ; 26 Aug 2013 14:42:32 -0000 Message-ID: <521B5F71.4030507@freebsd.org> Date: Mon, 26 Aug 2013 16:00:17 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r254527 - in head/sys: net80211 netinet sys References: <20130826094329.GP4574@glebius.int.ru> In-Reply-To: <20130826094329.GP4574@glebius.int.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 14:00:22 -0000 On 26.08.2013 11:43, Gleb Smirnoff wrote: > A> Author: andre > A> Date: Mon Aug 19 14:25:11 2013 > A> New Revision: 254527 > A> URL: http://svnweb.freebsd.org/changeset/base/254527 > A> > A> Log: > A> Reorder the mbuf defines to make more sense and group related flags > A> together. > A> > A> Add M_FLAG_PRINTF for use with printf(9) %b indentifier. > A> > A> Use the generic mbuf flags print names in the net80211 code and adjust > A> the protocol specific bits for their new positions. > A> > A> Change SCTP M_PROTO mapping from 5 to 1 to fit within the 16bit field > A> they use internally to store some additional information. > A> > A> Discussed with: trociny, glebius > > The first part: "reorder the mbuf flag defines" wasn't actually discussed. It was part of the patch to the email I sent you, and a couple of others, to which you replied with no objection to the M_FLAGS cleanup. It wasn't explicitly spelled out but very visible in the patch. > Tossing values of M_BCAST, M_MCAST, M_VLANTAG for no value except code > tidyness isn't a safe idea. These are the flags that device drivers use. > After this change binary drivers are still loadable but would be buggy. As I already explained elsewhere, on -current only KLD's compiled at the same time/revision as the kernel are supported. It has been this way as long as I can remember. There never was any guarantee, not even implicit, that a KLD from r254000 will continue to work with a kernel from r254527. In fact, if it were, it would be almost impossible to develop anything on -current. On -stable we do have this ABI+API guarantee, so a KLD from 9.0 is supposed to work on 9.2 as well and we generally keep that promise. > We allow ourselves ABI changes in head, but this doesn't mean that we > should do them for no important reason. The "important" reason are the later updates to the mbuf headers and that it simply doesn't make sense to keep the defines spaghetti while the whole thing is being overhauled. It seems from a technical point of view both arguments, maintain bits vs. reordering, are rather weak and prone to bike-shedding. ;) It certainly doesn't make sense to change again and revert it just for the sake of it. -- Andre From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 14:01:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 759F1E09; Mon, 26 Aug 2013 14:01:09 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 60F452642; Mon, 26 Aug 2013 14:01:09 +0000 (UTC) Received: from Alfreds-MacBook-Pro-9.local (unknown [12.19.232.10]) by elvis.mu.org (Postfix) with ESMTPSA id 2BA5A1A3C19; Mon, 26 Aug 2013 07:01:03 -0700 (PDT) Message-ID: <521B5F9E.5020808@freebsd.org> Date: Mon, 26 Aug 2013 07:01:02 -0700 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r254823 - head/sys/net References: <201308250155.r7P1tF3w026623@svn.freebsd.org> <20130826115249.GS4574@FreeBSD.org> In-Reply-To: <20130826115249.GS4574@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 14:01:09 -0000 Thanks Gleb. Will do. -Alfred On 8/26/13 4:52 AM, Gleb Smirnoff wrote: > On Sun, Aug 25, 2013 at 01:55:15AM +0000, Alfred Perlstein wrote: > A> Author: alfred > A> Date: Sun Aug 25 01:55:14 2013 > A> New Revision: 254823 > A> URL: http://svnweb.freebsd.org/changeset/base/254823 > A> > A> Log: > A> Remove the #ifdef OFED from the 20 byte mac in struct llentry. > A> > A> With this change it is now possible to build the entire infiniband > A> stack as modules and load it dynamically including IP over IB. > A> > A> Modified: > A> head/sys/net/if_llatbl.h > A> > A> Modified: head/sys/net/if_llatbl.h > A> ============================================================================== > A> --- head/sys/net/if_llatbl.h Sun Aug 25 00:34:44 2013 (r254822) > A> +++ head/sys/net/if_llatbl.h Sun Aug 25 01:55:14 2013 (r254823) > A> @@ -75,9 +75,7 @@ struct llentry { > A> union { > A> uint64_t mac_aligned; > A> uint16_t mac16[3]; > A> -#ifdef OFED > A> uint8_t mac8[20]; /* IB needs 20 bytes. */ > A> -#endif > A> } ll_addr; > A> > A> /* XXX af-private? */ > > #include "opt_ofed.h" should be removed from the file as well. > From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 14:14:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D850B49F; Mon, 26 Aug 2013 14:14:25 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C5C192719; Mon, 26 Aug 2013 14:14:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QEEP68001430; Mon, 26 Aug 2013 14:14:25 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QEEPbP001429; Mon, 26 Aug 2013 14:14:25 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201308261414.r7QEEPbP001429@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 26 Aug 2013 14:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254911 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 14:14:25 -0000 Author: glebius Date: Mon Aug 26 14:14:25 2013 New Revision: 254911 URL: http://svnweb.freebsd.org/changeset/base/254911 Log: Remove comment that is no longer relevant since r254182. Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Mon Aug 26 13:17:37 2013 (r254910) +++ head/sys/vm/vm_page.c Mon Aug 26 14:14:25 2013 (r254911) @@ -1753,10 +1753,6 @@ retry: if (drop != NULL) { /* * Enqueue the vnode for deferred vdrop(). - * - * Once the pages are removed from the free - * page list, "pageq" can be safely abused to - * construct a short-lived list of vnodes. */ m->plinks.s.pv = drop; SLIST_INSERT_HEAD(&deferred_vdrop_list, m, From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 14:18:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D7F8C683 for ; Mon, 26 Aug 2013 14:18:36 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4B06F274A for ; Mon, 26 Aug 2013 14:18:36 +0000 (UTC) Received: (qmail 6737 invoked from network); 26 Aug 2013 15:00:46 -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 ; 26 Aug 2013 15:00:46 -0000 Message-ID: <521B63B7.70805@freebsd.org> Date: Mon, 26 Aug 2013 16:18:31 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r254779 - head/sys/kern References: <201308241224.r7OCOx9l069850@svn.freebsd.org> <20130826105033.GQ4574@FreeBSD.org> In-Reply-To: <20130826105033.GQ4574@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 14:18:36 -0000 On 26.08.2013 12:50, Gleb Smirnoff wrote: > On Sat, Aug 24, 2013 at 12:24:59PM +0000, Andre Oppermann wrote: > A> Author: andre > A> Date: Sat Aug 24 12:24:58 2013 > A> New Revision: 254779 > A> URL: http://svnweb.freebsd.org/changeset/base/254779 > A> > A> Log: > A> Avoid code duplication for mbuf initialization and use m_init() instead > A> in mb_ctor_mbuf() and mb_ctor_pack(). > > m_init() is inline, but it calls m_pkthdr_init() which isn't inline. It > might be that compiler inline it due to m_pkthdr_init() living in the same > file as mb_ctor_mbuf() and mb_ctor_pack(), but not sure. It depends on the optimization level. > m_pkthdr_init() zeroes much more than deleted code did. Some zeroing > operations are definitely superfluous job. It's exactly the same for mb_ctor_mbuf() and one more for mb_ctor_pack(). Overall it has become more because we've got a couple more (small) fields in the mbuf headers now. Looking at the size of the headers it may be faster to just bzero() it instead of doing it one by one. The overall problem is that replicating the same operations in multiple places is dangerous from a consistency point of view. > The change is definitely not an no-op change. It might have pessimized > the mbuf allocation performance. Heavy inlining is not always an advantage and cause i-cache bloat. But you're right I haven't benchmarked it (yet) and thus we don't know. I've been setting up my 10G benchmark environment but had to re-prioritize due to the impeding freeze on -current. If the benchmarking shows a conclusive pessimization I'm more than happy to compensate for it, either by inlining m_pkthdr_init() as well or some form of macro. Such changes can still be done during API freeze, but before BETA1. -- Andre From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 14:21:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 095F97E1 for ; Mon, 26 Aug 2013 14:21:37 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6E7D02784 for ; Mon, 26 Aug 2013 14:21:36 +0000 (UTC) Received: (qmail 6749 invoked from network); 26 Aug 2013 15:03:46 -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 ; 26 Aug 2013 15:03:46 -0000 Message-ID: <521B646B.7080209@freebsd.org> Date: Mon, 26 Aug 2013 16:21:31 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r254805 - head/sys/sys References: <201308241958.r7OJwaxV031368@svn.freebsd.org> <20130826110007.GR4574@FreeBSD.org> In-Reply-To: <20130826110007.GR4574@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 14:21:37 -0000 On 26.08.2013 13:00, Gleb Smirnoff wrote: > On Sat, Aug 24, 2013 at 07:58:36PM +0000, Andre Oppermann wrote: > A> Author: andre > A> Date: Sat Aug 24 19:58:36 2013 > A> New Revision: 254805 > A> URL: http://svnweb.freebsd.org/changeset/base/254805 > A> > A> Log: > A> Add mtodo(m, o) macro taking an additional offset into the mbuf data section. > A> > A> Sponsored by: The FreeBSD Foundation > A> > A> Modified: > A> head/sys/sys/mbuf.h > A> > A> Modified: head/sys/sys/mbuf.h > A> ============================================================================== > A> --- head/sys/sys/mbuf.h Sat Aug 24 19:51:18 2013 (r254804) > A> +++ head/sys/sys/mbuf.h Sat Aug 24 19:58:36 2013 (r254805) > A> @@ -67,8 +67,10 @@ > A> * type: > A> * > A> * mtod(m, t) -- Convert mbuf pointer to data pointer of correct type. > A> + * mtodo(m, o) -- Same as above but with offset 'o' into data. > A> */ > A> #define mtod(m, t) ((t)((m)->m_data)) > A> +#define mtodo(m, o) ((void *)(((m)->m_data) + (o))) > > IMO, having a typecast would be better. Then mtodo() would be really same as > mtod(), as stated in comment. There was a big discussion about 10 month back when I did this change in my tcp_workqueue branch with the typecast in. The conclusion was that a typecast is really not necessary and only causes one to type a lot more for the compiler to throw away anyway. But yes, the comment isn't perfect in that sense. -- Andre From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 15:36:49 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 382D5A8A; Mon, 26 Aug 2013 15:36:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id DCBA62C01; Mon, 26 Aug 2013 15:36:47 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA05872; Mon, 26 Aug 2013 18:36:39 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VDyqN-000Eyq-Iq; Mon, 26 Aug 2013 18:36:39 +0300 Message-ID: <521B75CE.70103@FreeBSD.org> Date: Mon, 26 Aug 2013 18:35:42 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130810 Thunderbird/17.0.8 MIME-Version: 1.0 To: Xin LI , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r254585 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201308202231.r7KMVERi068300@svn.freebsd.org> <20130825221517.GM24767@caravan.chchile.org> In-Reply-To: <20130825221517.GM24767@caravan.chchile.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 15:36:49 -0000 on 26/08/2013 01:15 Jeremie Le Hen said the following: > Hi Xin, > > On Tue, Aug 20, 2013 at 10:31:14PM +0000, Xin LI wrote: >> Author: delphij >> Date: Tue Aug 20 22:31:13 2013 >> New Revision: 254585 >> URL: http://svnweb.freebsd.org/changeset/base/254585 >> >> Log: >> MFV r254220: >> >> Illumos ZFS issues: >> 4039 zfs_rename()/zfs_link() needs stronger test for XDEV >> >> Modified: >> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c >> Directory Properties: >> head/sys/cddl/contrib/opensolaris/ (props changed) >> >> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c >> ============================================================================== >> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Aug 20 21:47:07 2013 (r254584) >> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Aug 20 22:31:13 2013 (r254585) >> @@ -21,6 +21,7 @@ >> /* >> * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. >> * Copyright (c) 2013 by Delphix. All rights reserved. >> + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. >> */ >> >> /* Portions Copyright 2007 Jeremy Teo */ >> @@ -3727,13 +3728,18 @@ zfs_rename(vnode_t *sdvp, char *snm, vno >> if (VOP_REALVP(tdvp, &realvp, ct) == 0) >> tdvp = realvp; >> >> - if (tdvp->v_vfsp != sdvp->v_vfsp || zfsctl_is_node(tdvp)) { >> + tdzp = VTOZ(tdvp); The problem with this change, at least on FreeBSD, is that tdvp may not belong to ZFS. In that case VTOZ(tdvp) does not make any sense and would produce garbage or trigger an assert. Previously tdvp->v_vfsp != sdvp->v_vfsp check would catch that situations. Two side notes: - v_vfsp is actually v_mount on FreeBSD - VOP_REALVP is a glorified nop on FreeBSD Another unrelated problem that existed before this change and has been noted by Davide Italiano is that sdvp is not locked and so it can potentially be recycled before ZFS_ENTER() enter and for that reason sdzp and zfsvfs could be invalid. Because sdvp is referenced, this problem can currently occur only if a forced unmount runs concurrently to zfs_rename. tdvp should be locked and thus could be used instead of sdvp as a source for zfsvfs. > I suspect this leads to a panic on my -CURRENT machine: > > > #1 0xffffffff8033a664 in db_fncall_generic (addr=-2138557936, > rv=0xfffffe00e5a30c90, nargs=0, args=0xfffffe00e5a30ca0) > at /usr/src/sys/ddb/db_command.c:578 > #2 0xffffffff8033a34a in db_fncall (dummy1=-2138210939, dummy2=0, dummy3=-1, > dummy4=0xfffffe00e5a30d80 "") at /usr/src/sys/ddb/db_command.c:630 > #3 0xffffffff80339fe1 in db_command (last_cmdp=0xffffffff812b7850, > cmd_table=0x0, dopager=0) at /usr/src/sys/ddb/db_command.c:449 > #4 0xffffffff8033a0c2 in db_command_script ( > command=0xffffffff812b8754 "call doadump") > at /usr/src/sys/ddb/db_command.c:520 > #5 0xffffffff80340b09 in db_script_exec ( > scriptname=0xfffffe00e5a30f50 "kdb.enter.panic", warnifnotfound=0) > at /usr/src/sys/ddb/db_script.c:302 > #6 0xffffffff8034096c in db_script_kdbenter ( > eventname=0xffffffff80f7cd55 "panic") at /usr/src/sys/ddb/db_script.c:324 > #7 0xffffffff8033dee1 in db_trap (type=3, code=0) > at /usr/src/sys/ddb/db_main.c:230 > #8 0xffffffff808d84b6 in kdb_trap (type=3, code=0, tf=0xfffffe00e5a31390) > at /usr/src/sys/kern/subr_kdb.c:654 > #9 0xffffffff80dbc22a in trap (frame=0xfffffe00e5a31390) > at /usr/src/sys/amd64/amd64/trap.c:579 > #10 0xffffffff80d99282 in calltrap () > at /usr/src/sys/amd64/amd64/exception.S:232 > #11 0xffffffff808d7d85 in breakpoint () at cpufunc.h:63 > #12 0xffffffff808d79eb in kdb_enter (why=0xffffffff80f7cd55 "panic", > msg=0xffffffff80f7cd55 "panic") at /usr/src/sys/kern/subr_kdb.c:445 > #13 0xffffffff808838b3 in vpanic ( > fmt=0xffffffff81b05389 "solaris assert: %s, file: %s, line: %d", > ap=0xfffffe00e5a31530) at /usr/src/sys/kern/kern_shutdown.c:747 > #14 0xffffffff80883960 in panic ( > fmt=0xffffffff81b05389 "solaris assert: %s, file: %s, line: %d") > at /usr/src/sys/kern/kern_shutdown.c:683 > #15 0xffffffff81b0443c in assfail ( > a=0xffffffff819ab3cc "zp == NULL || zp->z_vnode == NULL || zp->z_vnode == vp", > f=0xffffffff819ab403 "/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h", l=248) > at /usr/src/sys/modules/opensolaris/../../cddl/compat/opensolaris/kern/opensolaris_cmn_err.c:81 > #16 0xffffffff8191b111 in VTOZ (vp=0xfffff800967f5b10) at zfs_znode.h:248 > #17 0xffffffff8192372c in zfs_rename (sdvp=0xfffff800911bf3b0, > snm=0xfffff80004a9d806 "patchoHq2mGI", tdvp=0xfffff800967f5b10, > tnm=0xfffff8000451780f "periodic.conf.5", cr=0xfffff80011d4ce00, ct=0x0, > flags=0) > at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c:3731 > #18 0xffffffff8191ec06 in zfs_freebsd_rename (ap=0xfffffe00e5a317a8) > at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c:6253 > #19 0xffffffff80eb67be in VOP_RENAME_APV (vop=0xffffffff819b5f80, > a=0xfffffe00e5a317a8) at vnode_if.c:1546 > #20 0xffffffff8099db19 in VOP_RENAME (fdvp=0xfffff800911bf3b0, > fvp=0xfffff800910831d8, fcnp=0xfffffe00e5a31990, tdvp=0xfffff800967f5b10, > tvp=0x0, tcnp=0xfffffe00e5a318d0) at vnode_if.h:636 > #21 0xffffffff8099d99e in kern_renameat (td=0xfffff8001c0db920, oldfd=-100, > old=0x800c4a040
, newfd=-100, > new=0x800c4a0c0
, > pathseg=UIO_USERSPACE) at /usr/src/sys/kern/vfs_syscalls.c:3558 > #22 0xffffffff8099d533 in kern_rename (td=0xfffff8001c0db920, > from=0x800c4a040
, > to=0x800c4a0c0
, pathseg=UIO_USERSPACE) > at /usr/src/sys/kern/vfs_syscalls.c:3465 > #23 0xffffffff8099d4fa in sys_rename (td=0xfffff8001c0db920, > uap=0xfffffe00e5a31b98) at /usr/src/sys/kern/vfs_syscalls.c:3442 > #24 0xffffffff80dbddce in syscallenter (td=0xfffff8001c0db920, > sa=0xfffffe00e5a31b88) at subr_syscall.c:134 > #25 0xffffffff80dbd78f in amd64_syscall (td=0xfffff8001c0db920, traced=0) > at /usr/src/sys/amd64/amd64/trap.c:974 > #26 0xffffffff80d9956b in Xfast_syscall () > at /usr/src/sys/amd64/amd64/exception.S:391 > #27 0x00000008008826ac in ?? () > > -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 15:38:28 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 464C8BCD; Mon, 26 Aug 2013 15:38:28 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 342BD2C0E; Mon, 26 Aug 2013 15:38:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QFcSpq046595; Mon, 26 Aug 2013 15:38:28 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QFcSLq046594; Mon, 26 Aug 2013 15:38:28 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201308261538.r7QFcSLq046594@svn.freebsd.org> From: Rafal Jaworowski Date: Mon, 26 Aug 2013 15:38:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254913 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 15:38:28 -0000 Author: raj Date: Mon Aug 26 15:38:27 2013 New Revision: 254913 URL: http://svnweb.freebsd.org/changeset/base/254913 Log: Add missing TAILQ initializer (omitted in r250634). Submitted by: Zbigniew Bodek Reviewed by: alc Sponsored by: The FreeBSD Foundation, Semihalf Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Mon Aug 26 15:34:18 2013 (r254912) +++ head/sys/arm/arm/pmap-v6.c Mon Aug 26 15:38:27 2013 (r254913) @@ -1143,6 +1143,7 @@ pmap_pinit0(struct pmap *pmap) bcopy(kernel_pmap, pmap, sizeof(*pmap)); bzero(&pmap->pm_mtx, sizeof(pmap->pm_mtx)); PMAP_LOCK_INIT(pmap); + TAILQ_INIT(&pmap->pm_pvchunk); } /* From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 16:23:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 24423D69; Mon, 26 Aug 2013 16:23:55 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 11A372EF1; Mon, 26 Aug 2013 16:23:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QGNsYW073041; Mon, 26 Aug 2013 16:23:54 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QGNsiR073040; Mon, 26 Aug 2013 16:23:54 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201308261623.r7QGNsiR073040@svn.freebsd.org> From: Rafal Jaworowski Date: Mon, 26 Aug 2013 16:23:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254915 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 16:23:55 -0000 Author: raj Date: Mon Aug 26 16:23:54 2013 New Revision: 254915 URL: http://svnweb.freebsd.org/changeset/base/254915 Log: Provide settings for superpage reservation system on ARM. This allows for enabling and configuring superpages reservation mechanism in order to allocate and populate 256 4KB base pages (for the purpose of promotion to a 1MB superpage). Submitted by: Zbigniew Bodek Reviewed by: alc Sponsored by: The FreeBSD Foundation, Semihalf Modified: head/sys/arm/include/vmparam.h Modified: head/sys/arm/include/vmparam.h ============================================================================== --- head/sys/arm/include/vmparam.h Mon Aug 26 16:04:52 2013 (r254914) +++ head/sys/arm/include/vmparam.h Mon Aug 26 16:23:54 2013 (r254915) @@ -109,10 +109,17 @@ #define VM_NFREEORDER 9 /* - * Disable superpage reservations. + * Enable superpage reservations: 1 level. */ #ifndef VM_NRESERVLEVEL -#define VM_NRESERVLEVEL 0 +#define VM_NRESERVLEVEL 1 +#endif + +/* + * Level 0 reservations consist of 256 pages. + */ +#ifndef VM_LEVEL_0_ORDER +#define VM_LEVEL_0_ORDER 8 #endif #define UPT_MAX_ADDRESS VADDR(UPTPTDI + 3, 0) From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 16:38:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CD1D22A3; Mon, 26 Aug 2013 16:38:40 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BA3C62FAF; Mon, 26 Aug 2013 16:38:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QGceBI079896; Mon, 26 Aug 2013 16:38:40 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QGce0C079895; Mon, 26 Aug 2013 16:38:40 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201308261638.r7QGce0C079895@svn.freebsd.org> From: Antoine Brodin Date: Mon, 26 Aug 2013 16:38:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254917 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 16:38:40 -0000 Author: antoine Date: Mon Aug 26 16:38:40 2013 New Revision: 254917 URL: http://svnweb.freebsd.org/changeset/base/254917 Log: Hook vm_page_busy.9 to the build Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Mon Aug 26 16:32:56 2013 (r254916) +++ head/share/man/man9/Makefile Mon Aug 26 16:38:40 2013 (r254917) @@ -324,6 +324,7 @@ MAN= accept_filter.9 \ vm_map_wire.9 \ vm_page_alloc.9 \ vm_page_bits.9 \ + vm_page_busy.9 \ vm_page_cache.9 \ vm_page_deactivate.9 \ vm_page_dontneed.9 \ From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 17:12:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D8769A4C; Mon, 26 Aug 2013 17:12:30 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C460D21DE; Mon, 26 Aug 2013 17:12:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QHCUNw099707; Mon, 26 Aug 2013 17:12:30 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QHCUQS099705; Mon, 26 Aug 2013 17:12:30 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201308261712.r7QHCUQS099705@svn.freebsd.org> From: Rafal Jaworowski Date: Mon, 26 Aug 2013 17:12:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254918 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 17:12:30 -0000 Author: raj Date: Mon Aug 26 17:12:30 2013 New Revision: 254918 URL: http://svnweb.freebsd.org/changeset/base/254918 Log: Introduce superpages support for ARMv6/v7. Promoting base pages to superpages can increase TLB coverage and allow for efficient use of page table entries. This development provides FreeBSD/ARM with superpages management mechanism roughly equivalent to what we have for i386 and amd64 architectures. 1. Add mechanism for automatic promotion of 4KB page mappings to 1MB section mappings (and demotion when not needed, respectively). 2. Managed and non-kernel mappings are now superpages-aware. 3. The functionality can be enabled by setting "vm.pmap.sp_enabled" tunable to a non-zero value (either in loader.conf or by modifying "sp_enabled" variable in pmap-v6.c file). By default, automatic promotion is currently disabled. Submitted by: Zbigniew Bodek Reviewed by: alc Sponsored by: The FreeBSD Foundation, Semihalf Modified: head/sys/arm/arm/pmap-v6.c head/sys/arm/include/param.h head/sys/arm/include/pmap.h head/sys/arm/include/pte.h Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Mon Aug 26 16:38:40 2013 (r254917) +++ head/sys/arm/arm/pmap-v6.c Mon Aug 26 17:12:30 2013 (r254918) @@ -171,6 +171,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -201,6 +202,8 @@ int pmap_debug_level = 0; #define PV_STAT(x) do { } while (0) #endif +#define pa_to_pvh(pa) (&pv_table[pa_index(pa)]) + #ifdef ARM_L2_PIPT #define pmap_l2cache_wbinv_range(va, pa, size) cpu_l2cache_wbinv_range((pa), (size)) #define pmap_l2cache_inv_range(va, pa, size) cpu_l2cache_inv_range((pa), (size)) @@ -215,10 +218,16 @@ extern struct pv_addr systempage; * Internal function prototypes */ +static PMAP_INLINE +struct pv_entry *pmap_find_pv(struct md_page *, pmap_t, vm_offset_t); static void pmap_free_pv_chunk(struct pv_chunk *pc); static void pmap_free_pv_entry(pmap_t pmap, pv_entry_t pv); static pv_entry_t pmap_get_pv_entry(pmap_t pmap, boolean_t try); static vm_page_t pmap_pv_reclaim(pmap_t locked_pmap); +static boolean_t pmap_pv_insert_section(pmap_t, vm_offset_t, + vm_paddr_t); +static struct pv_entry *pmap_remove_pv(struct vm_page *, pmap_t, vm_offset_t); +static int pmap_pvh_wired_mappings(struct md_page *, int); static void pmap_enter_locked(pmap_t, vm_offset_t, vm_prot_t, vm_page_t, vm_prot_t, boolean_t, int); @@ -226,6 +235,14 @@ static vm_paddr_t pmap_extract_locked(pm static void pmap_alloc_l1(pmap_t); static void pmap_free_l1(pmap_t); +static void pmap_map_section(pmap_t, vm_offset_t, vm_offset_t, + vm_prot_t, boolean_t); +static void pmap_promote_section(pmap_t, vm_offset_t); +static boolean_t pmap_demote_section(pmap_t, vm_offset_t); +static boolean_t pmap_enter_section(pmap_t, vm_offset_t, vm_page_t, + vm_prot_t); +static void pmap_remove_section(pmap_t, vm_offset_t); + static int pmap_clearbit(struct vm_page *, u_int); static struct l2_bucket *pmap_get_l2_bucket(pmap_t, vm_offset_t); @@ -403,6 +420,7 @@ int pmap_needs_pte_sync; */ static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); static int pv_entry_count, pv_entry_max, pv_entry_high_water; +static struct md_page *pv_table; static int shpgperproc = PMAP_SHPGPERPROC; struct pv_chunk *pv_chunkbase; /* KVA block for pv_chunks */ @@ -433,6 +451,11 @@ static const uint32_t pc_freemask[_NPCM] static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); +/* Superpages utilization enabled = 1 / disabled = 0 */ +static int sp_enabled = 0; +SYSCTL_INT(_vm_pmap, OID_AUTO, sp_enabled, CTLFLAG_RDTUN, &sp_enabled, 0, + "Are large page mappings enabled?"); + SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_count, CTLFLAG_RD, &pv_entry_count, 0, "Current number of pv entries"); @@ -891,7 +914,9 @@ static int pmap_clearbit(struct vm_page *m, u_int maskbits) { struct l2_bucket *l2b; - struct pv_entry *pv; + struct pv_entry *pv, *pve, *next_pv; + struct md_page *pvh; + pd_entry_t *pl1pd; pt_entry_t *ptep, npte, opte; pmap_t pmap; vm_offset_t va; @@ -899,7 +924,79 @@ pmap_clearbit(struct vm_page *m, u_int m int count = 0; rw_wlock(&pvh_global_lock); + if ((m->flags & PG_FICTITIOUS) != 0) + goto small_mappings; + pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_list, next_pv) { + va = pv->pv_va; + pmap = PV_PMAP(pv); + PMAP_LOCK(pmap); + pl1pd = &pmap->pm_l1->l1_kva[L1_IDX(va)]; + KASSERT((*pl1pd & L1_TYPE_MASK) == L1_S_PROTO, + ("pmap_clearbit: valid section mapping expected")); + if ((maskbits & PVF_WRITE) && (pv->pv_flags & PVF_WRITE)) + (void)pmap_demote_section(pmap, va); + else if ((maskbits & PVF_REF) && L1_S_REFERENCED(*pl1pd)) { + if (pmap_demote_section(pmap, va)) { + if ((pv->pv_flags & PVF_WIRED) == 0) { + /* + * Remove the mapping to a single page + * so that a subsequent access may + * repromote. Since the underlying + * l2_bucket is fully populated, this + * removal never frees an entire + * l2_bucket. + */ + va += (VM_PAGE_TO_PHYS(m) & + L1_S_OFFSET); + l2b = pmap_get_l2_bucket(pmap, va); + KASSERT(l2b != NULL, + ("pmap_clearbit: no l2 bucket for " + "va 0x%#x, pmap 0x%p", va, pmap)); + ptep = &l2b->l2b_kva[l2pte_index(va)]; + *ptep = 0; + PTE_SYNC(ptep); + pmap_free_l2_bucket(pmap, l2b, 1); + pve = pmap_remove_pv(m, pmap, va); + KASSERT(pve != NULL, ("pmap_clearbit: " + "no PV entry for managed mapping")); + pmap_free_pv_entry(pmap, pve); + + } + } + } else if ((maskbits & PVF_MOD) && L1_S_WRITABLE(*pl1pd)) { + if (pmap_demote_section(pmap, va)) { + if ((pv->pv_flags & PVF_WIRED) == 0) { + /* + * Write protect the mapping to a + * single page so that a subsequent + * write access may repromote. + */ + va += (VM_PAGE_TO_PHYS(m) & + L1_S_OFFSET); + l2b = pmap_get_l2_bucket(pmap, va); + KASSERT(l2b != NULL, + ("pmap_clearbit: no l2 bucket for " + "va 0x%#x, pmap 0x%p", va, pmap)); + ptep = &l2b->l2b_kva[l2pte_index(va)]; + if ((*ptep & L2_S_PROTO) != 0) { + pve = pmap_find_pv(&m->md, + pmap, va); + KASSERT(pve != NULL, + ("pmap_clearbit: no PV " + "entry for managed mapping")); + pve->pv_flags &= ~PVF_WRITE; + *ptep &= ~L2_APX; + PTE_SYNC(ptep); + } + } + } + } + PMAP_UNLOCK(pmap); + } + +small_mappings: if (TAILQ_EMPTY(&m->md.pv_list)) { rw_wunlock(&pvh_global_lock); return (0); @@ -917,6 +1014,8 @@ pmap_clearbit(struct vm_page *m, u_int m PMAP_LOCK(pmap); l2b = pmap_get_l2_bucket(pmap, va); + KASSERT(l2b != NULL, ("pmap_clearbit: no l2 bucket for " + "va 0x%#x, pmap 0x%p", va, pmap)); ptep = &l2b->l2b_kva[l2pte_index(va)]; npte = opte = *ptep; @@ -999,14 +1098,15 @@ pmap_enter_pv(struct vm_page *m, struct * => caller should hold lock on vm_page */ static PMAP_INLINE struct pv_entry * -pmap_find_pv(struct vm_page *m, pmap_t pmap, vm_offset_t va) +pmap_find_pv(struct md_page *md, pmap_t pmap, vm_offset_t va) { struct pv_entry *pv; rw_assert(&pvh_global_lock, RA_WLOCKED); - TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) - if (pmap == PV_PMAP(pv) && va == pv->pv_va) - break; + TAILQ_FOREACH(pv, &md->pv_list, pv_list) + if (pmap == PV_PMAP(pv) && va == pv->pv_va) + break; + return (pv); } @@ -1075,7 +1175,7 @@ pmap_remove_pv(struct vm_page *m, pmap_t rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_ASSERT_LOCKED(pmap); - pve = pmap_find_pv(m, pmap, va); /* find corresponding pve */ + pve = pmap_find_pv(&m->md, pmap, va); /* find corresponding pve */ if (pve != NULL) { TAILQ_REMOVE(&m->md.pv_list, pve, pv_list); if (pve->pv_flags & PVF_WIRED) @@ -1106,7 +1206,7 @@ pmap_modify_pv(struct vm_page *m, pmap_t PMAP_ASSERT_LOCKED(pmap); rw_assert(&pvh_global_lock, RA_WLOCKED); - if ((npv = pmap_find_pv(m, pmap, va)) == NULL) + if ((npv = pmap_find_pv(&m->md, pmap, va)) == NULL) return (0); /* @@ -1207,6 +1307,8 @@ pmap_ptelist_init(vm_offset_t *head, voi void pmap_init(void) { + vm_size_t s; + int i, pv_npg; PDEBUG(1, printf("pmap_init: phys_start = %08x\n", PHYSADDR)); @@ -1216,6 +1318,32 @@ pmap_init(void) NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); /* + * Are large page mappings supported and enabled? + */ + TUNABLE_INT_FETCH("vm.pmap.sp_enabled", &sp_enabled); + if (sp_enabled) { + KASSERT(MAXPAGESIZES > 1 && pagesizes[1] == 0, + ("pmap_init: can't assign to pagesizes[1]")); + pagesizes[1] = NBPDR; + } + + /* + * Calculate the size of the pv head table for superpages. + */ + for (i = 0; phys_avail[i + 1]; i += 2); + pv_npg = round_1mpage(phys_avail[(i - 2) + 1]) / NBPDR; + + /* + * Allocate memory for the pv head table for superpages. + */ + s = (vm_size_t)(pv_npg * sizeof(struct md_page)); + s = round_page(s); + pv_table = (struct md_page *)kmem_malloc(kernel_arena, s, + M_WAITOK | M_ZERO); + for (i = 0; i < pv_npg; i++) + TAILQ_INIT(&pv_table[i].pv_list); + + /* * Initialize the address space for the pv chunks. */ @@ -1244,6 +1372,25 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_ SYSCTL_INT(_vm_pmap, OID_AUTO, shpgperproc, CTLFLAG_RD, &shpgperproc, 0, "Page share factor per proc"); +static SYSCTL_NODE(_vm_pmap, OID_AUTO, section, CTLFLAG_RD, 0, + "1MB page mapping counters"); + +static u_long pmap_section_demotions; +SYSCTL_ULONG(_vm_pmap_section, OID_AUTO, demotions, CTLFLAG_RD, + &pmap_section_demotions, 0, "1MB page demotions"); + +static u_long pmap_section_mappings; +SYSCTL_ULONG(_vm_pmap_section, OID_AUTO, mappings, CTLFLAG_RD, + &pmap_section_mappings, 0, "1MB page mappings"); + +static u_long pmap_section_p_failures; +SYSCTL_ULONG(_vm_pmap_section, OID_AUTO, p_failures, CTLFLAG_RD, + &pmap_section_p_failures, 0, "1MB page promotion failures"); + +static u_long pmap_section_promotions; +SYSCTL_ULONG(_vm_pmap_section, OID_AUTO, promotions, CTLFLAG_RD, + &pmap_section_promotions, 0, "1MB page promotions"); + int pmap_fault_fixup(pmap_t pmap, vm_offset_t va, vm_prot_t ftype, int user) { @@ -1258,7 +1405,47 @@ pmap_fault_fixup(pmap_t pmap, vm_offset_ l1idx = L1_IDX(va); rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); - + /* + * Check and possibly fix-up L1 section mapping + * only when superpage mappings are enabled to speed up. + */ + if (sp_enabled) { + pl1pd = &pmap->pm_l1->l1_kva[l1idx]; + l1pd = *pl1pd; + if ((l1pd & L1_TYPE_MASK) == L1_S_PROTO) { + /* Catch an access to the vectors section */ + if (l1idx == L1_IDX(vector_page)) + goto out; + /* + * Stay away from the kernel mappings. + * None of them should fault from L1 entry. + */ + if (pmap == pmap_kernel()) + goto out; + /* + * Catch a forbidden userland access + */ + if (user && !(l1pd & L1_S_PROT_U)) + goto out; + /* + * Superpage is always either mapped read only + * or it is modified and permitted to be written + * by default. Therefore, process only reference + * flag fault and demote page in case of write fault. + */ + if ((ftype & VM_PROT_WRITE) && !L1_S_WRITABLE(l1pd) && + L1_S_REFERENCED(l1pd)) { + (void)pmap_demote_section(pmap, va); + goto out; + } else if (!L1_S_REFERENCED(l1pd)) { + /* Mark the page "referenced" */ + *pl1pd = l1pd | L1_S_REF; + PTE_SYNC(pl1pd); + goto l1_section_out; + } else + goto out; + } + } /* * If there is no l2_dtable for this address, then the process * has no business accessing it. @@ -1311,7 +1498,7 @@ pmap_fault_fixup(pmap_t pmap, vm_offset_ } /* Get the current flags for this page. */ - pv = pmap_find_pv(m, pmap, va); + pv = pmap_find_pv(&m->md, pmap, va); if (pv == NULL) { goto out; } @@ -1346,7 +1533,7 @@ pmap_fault_fixup(pmap_t pmap, vm_offset_ if ((m = PHYS_TO_VM_PAGE(pa)) == NULL) goto out; /* Get the current flags for this page. */ - pv = pmap_find_pv(m, pmap, va); + pv = pmap_find_pv(&m->md, pmap, va); if (pv == NULL) goto out; @@ -1411,6 +1598,7 @@ pmap_fault_fixup(pmap_t pmap, vm_offset_ } #endif +l1_section_out: cpu_tlb_flushID_SE(va); cpu_cpwait(); @@ -1977,6 +2165,24 @@ pmap_growkernel(vm_offset_t addr) kernel_vm_end = pmap_curmaxkvaddr; } +/* + * Returns TRUE if the given page is mapped individually or as part of + * a 1MB section. Otherwise, returns FALSE. + */ +boolean_t +pmap_page_is_mapped(vm_page_t m) +{ + boolean_t rv; + + if ((m->oflags & VPO_UNMANAGED) != 0) + return (FALSE); + rw_wlock(&pvh_global_lock); + rv = !TAILQ_EMPTY(&m->md.pv_list) || + ((m->flags & PG_FICTITIOUS) == 0 && + !TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list)); + rw_wunlock(&pvh_global_lock); + return (rv); +} /* * Remove all pages from specified address space @@ -1991,9 +2197,12 @@ pmap_remove_pages(pmap_t pmap) { struct pv_entry *pv; struct l2_bucket *l2b = NULL; - vm_page_t m; - pt_entry_t *ptep; struct pv_chunk *pc, *npc; + struct md_page *pvh; + pd_entry_t *pl1pd, l1pd; + pt_entry_t *ptep; + vm_page_t m, mt; + vm_offset_t va; uint32_t inuse, bitmask; int allfree, bit, field, idx; @@ -2009,33 +2218,63 @@ pmap_remove_pages(pmap_t pmap) bitmask = 1ul << bit; idx = field * sizeof(inuse) * NBBY + bit; pv = &pc->pc_pventry[idx]; + va = pv->pv_va; inuse &= ~bitmask; if (pv->pv_flags & PVF_WIRED) { /* Cannot remove wired pages now. */ allfree = 0; continue; } - l2b = pmap_get_l2_bucket(pmap, pv->pv_va); - KASSERT(l2b != NULL, - ("No L2 bucket in pmap_remove_pages")); - ptep = &l2b->l2b_kva[l2pte_index(pv->pv_va)]; - m = PHYS_TO_VM_PAGE(*ptep & L2_ADDR_MASK); - KASSERT((vm_offset_t)m >= KERNBASE, - ("Trying to access non-existent page " - "va %x pte %x", pv->pv_va, *ptep)); - *ptep = 0; - PTE_SYNC(ptep); + pl1pd = &pmap->pm_l1->l1_kva[L1_IDX(va)]; + l1pd = *pl1pd; + l2b = pmap_get_l2_bucket(pmap, va); + if ((l1pd & L1_TYPE_MASK) == L1_S_PROTO) { + pvh = pa_to_pvh(l1pd & L1_S_FRAME); + TAILQ_REMOVE(&pvh->pv_list, pv, pv_list); + if (TAILQ_EMPTY(&pvh->pv_list)) { + m = PHYS_TO_VM_PAGE(l1pd & L1_S_FRAME); + KASSERT((vm_offset_t)m >= KERNBASE, + ("Trying to access non-existent page " + "va %x l1pd %x", trunc_1mpage(va), l1pd)); + for (mt = m; mt < &m[L2_PTE_NUM_TOTAL]; mt++) { + if (TAILQ_EMPTY(&mt->md.pv_list)) + vm_page_aflag_clear(mt, PGA_WRITEABLE); + } + } + if (l2b != NULL) { + KASSERT(l2b->l2b_occupancy == L2_PTE_NUM_TOTAL, + ("pmap_remove_pages: l2_bucket occupancy error")); + pmap_free_l2_bucket(pmap, l2b, L2_PTE_NUM_TOTAL); + } + pmap->pm_stats.resident_count -= L2_PTE_NUM_TOTAL; + *pl1pd = 0; + PTE_SYNC(pl1pd); + } else { + KASSERT(l2b != NULL, + ("No L2 bucket in pmap_remove_pages")); + ptep = &l2b->l2b_kva[l2pte_index(va)]; + m = PHYS_TO_VM_PAGE(l2pte_pa(*ptep)); + KASSERT((vm_offset_t)m >= KERNBASE, + ("Trying to access non-existent page " + "va %x pte %x", va, *ptep)); + TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); + if (TAILQ_EMPTY(&m->md.pv_list) && + (m->flags & PG_FICTITIOUS) == 0) { + pvh = pa_to_pvh(l2pte_pa(*ptep)); + if (TAILQ_EMPTY(&pvh->pv_list)) + vm_page_aflag_clear(m, PGA_WRITEABLE); + } + *ptep = 0; + PTE_SYNC(ptep); + pmap_free_l2_bucket(pmap, l2b, 1); + pmap->pm_stats.resident_count--; + } /* Mark free */ PV_STAT(pv_entry_frees++); PV_STAT(pv_entry_spare++); pv_entry_count--; - pmap->pm_stats.resident_count--; pc->pc_map[field] |= bitmask; - TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - if (TAILQ_EMPTY(&m->md.pv_list)) - vm_page_aflag_clear(m, PGA_WRITEABLE); - pmap_free_l2_bucket(pmap, l2b, 1); } } if (allfree) { @@ -2064,7 +2303,8 @@ pmap_kenter_supersection(vm_offset_t va, { pd_entry_t pd = L1_S_PROTO | L1_S_SUPERSEC | (pa & L1_SUP_FRAME) | (((pa >> 32) & 0xf) << 20) | L1_S_PROT(PTE_KERNEL, - VM_PROT_READ|VM_PROT_WRITE) | L1_S_DOM(PMAP_DOMAIN_KERNEL); + VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE) | + L1_S_DOM(PMAP_DOMAIN_KERNEL); struct l1_ttable *l1; vm_offset_t va0, va_end; @@ -2093,7 +2333,8 @@ void pmap_kenter_section(vm_offset_t va, vm_offset_t pa, int flags) { pd_entry_t pd = L1_S_PROTO | pa | L1_S_PROT(PTE_KERNEL, - VM_PROT_READ|VM_PROT_WRITE) | L1_S_DOM(PMAP_DOMAIN_KERNEL); + VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE) | L1_S_REF | + L1_S_DOM(PMAP_DOMAIN_KERNEL); struct l1_ttable *l1; KASSERT(((va | pa) & L1_S_OFFSET) == 0, @@ -2328,9 +2569,11 @@ pmap_is_prefaultable(pmap_t pmap, vm_off if (!pmap_get_pde_pte(pmap, addr, &pdep, &ptep)) return (FALSE); - KASSERT(ptep != NULL, ("Valid mapping but no pte ?")); - if (*ptep == 0) - return (TRUE); + KASSERT((pdep != NULL && (l1pte_section_p(*pdep) || ptep != NULL)), + ("Valid mapping but no pte ?")); + if (*pdep != 0 && !l1pte_section_p(*pdep)) + if (*ptep == 0) + return (TRUE); return (FALSE); } @@ -2399,6 +2642,7 @@ pmap_get_pde_pte(pmap_t pmap, vm_offset_ void pmap_remove_all(vm_page_t m) { + struct md_page *pvh; pv_entry_t pv; pmap_t pmap; pt_entry_t *ptep; @@ -2407,12 +2651,23 @@ pmap_remove_all(vm_page_t m) pmap_t curpmap; u_int is_exec = 0; - KASSERT((m->flags & PG_FICTITIOUS) == 0, - ("pmap_remove_all: page %p is fictitious", m)); - - if (TAILQ_EMPTY(&m->md.pv_list)) - return; + KASSERT((m->oflags & VPO_UNMANAGED) == 0, + ("pmap_remove_all: page %p is not managed", m)); rw_wlock(&pvh_global_lock); + if ((m->flags & PG_FICTITIOUS) != 0) + goto small_mappings; + pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + while ((pv = TAILQ_FIRST(&pvh->pv_list)) != NULL) { + pmap = PV_PMAP(pv); + PMAP_LOCK(pmap); + pd_entry_t *pl1pd; + pl1pd = &pmap->pm_l1->l1_kva[L1_IDX(pv->pv_va)]; + KASSERT((*pl1pd & L1_TYPE_MASK) == L1_S_PROTO, + ("pmap_remove_all: valid section mapping expected")); + (void)pmap_demote_section(pmap, pv->pv_va); + PMAP_UNLOCK(pmap); + } +small_mappings: curpmap = vmspace_pmap(curproc->p_vmspace); while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { pmap = PV_PMAP(pv); @@ -2514,6 +2769,9 @@ void pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot) { struct l2_bucket *l2b; + struct md_page *pvh; + struct pv_entry *pve; + pd_entry_t *pl1pd, l1pd; pt_entry_t *ptep, pte; vm_offset_t next_bucket; u_int is_exec, is_refd; @@ -2545,9 +2803,47 @@ pmap_protect(pmap_t pmap, vm_offset_t sv while (sva < eva) { next_bucket = L2_NEXT_BUCKET(sva); + /* + * Check for large page. + */ + pl1pd = &pmap->pm_l1->l1_kva[L1_IDX(sva)]; + l1pd = *pl1pd; + if ((l1pd & L1_TYPE_MASK) == L1_S_PROTO) { + KASSERT(pmap != pmap_kernel(), + ("pmap_protect: trying to modify " + "kernel section protections")); + /* + * Are we protecting the entire large page? If not, + * demote the mapping and fall through. + */ + if (sva + L1_S_SIZE == L2_NEXT_BUCKET(sva) && + eva >= L2_NEXT_BUCKET(sva)) { + l1pd &= ~(L1_S_PROT_MASK | L1_S_XN); + if (!(prot & VM_PROT_EXECUTE)) + *pl1pd |= L1_S_XN; + /* + * At this point we are always setting + * write-protect bit. + */ + l1pd |= L1_S_APX; + /* All managed superpages are user pages. */ + l1pd |= L1_S_PROT_U; + *pl1pd = l1pd; + PTE_SYNC(pl1pd); + pvh = pa_to_pvh(l1pd & L1_S_FRAME); + pve = pmap_find_pv(pvh, pmap, + trunc_1mpage(sva)); + pve->pv_flags &= ~PVF_WRITE; + sva = next_bucket; + continue; + } else if (!pmap_demote_section(pmap, sva)) { + /* The large page mapping was destroyed. */ + sva = next_bucket; + continue; + } + } if (next_bucket > eva) next_bucket = eva; - l2b = pmap_get_l2_bucket(pmap, sva); if (l2b == NULL) { sva = next_bucket; @@ -2633,6 +2929,7 @@ pmap_enter_locked(pmap_t pmap, vm_offset struct l2_bucket *l2b = NULL; struct vm_page *om; struct pv_entry *pve = NULL; + pd_entry_t *pl1pd, l1pd; pt_entry_t *ptep, npte, opte; u_int nflags; u_int is_exec, is_refd; @@ -2651,6 +2948,10 @@ pmap_enter_locked(pmap_t pmap, vm_offset pa = VM_PAGE_TO_PHYS(m); } + pl1pd = &pmap->pm_l1->l1_kva[L1_IDX(va)]; + if ((*pl1pd & L1_TYPE_MASK) == L1_S_PROTO) + panic("pmap_enter_locked: attempt pmap_enter_on 1MB page"); + user = 0; /* * Make sure userland mappings get the right permissions @@ -2825,9 +3126,6 @@ validate: * L1 entry to avoid taking another * page/domain fault. */ - pd_entry_t *pl1pd, l1pd; - - pl1pd = &pmap->pm_l1->l1_kva[L1_IDX(va)]; l1pd = l2b->l2b_phys | L1_C_DOM(pmap->pm_domain) | L1_C_PROTO; if (*pl1pd != l1pd) { @@ -2845,6 +3143,14 @@ validate: if ((pmap != pmap_kernel()) && (pmap == &curproc->p_vmspace->vm_pmap)) cpu_icache_sync_range(va, PAGE_SIZE); + /* + * If both the l2b_occupancy and the reservation are fully + * populated, then attempt promotion. + */ + if ((l2b->l2b_occupancy == L2_PTE_NUM_TOTAL) && + sp_enabled && (m->flags & PG_FICTITIOUS) == 0 && + vm_reserv_level_iffullpop(m) == 0) + pmap_promote_section(pmap, va); } /* @@ -2863,6 +3169,7 @@ void pmap_enter_object(pmap_t pmap, vm_offset_t start, vm_offset_t end, vm_page_t m_start, vm_prot_t prot) { + vm_offset_t va; vm_page_t m; vm_pindex_t diff, psize; vm_prot_t access; @@ -2875,8 +3182,15 @@ pmap_enter_object(pmap_t pmap, vm_offset rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { - pmap_enter_locked(pmap, start + ptoa(diff), access, m, prot, - FALSE, M_NOWAIT); + va = start + ptoa(diff); + if ((va & L1_S_OFFSET) == 0 && L2_NEXT_BUCKET(va) <= end && + (VM_PAGE_TO_PHYS(m) & L1_S_OFFSET) == 0 && + sp_enabled && vm_reserv_level_iffullpop(m) == 0 && + pmap_enter_section(pmap, va, m, prot)) + m = &m[L1_S_SIZE / PAGE_SIZE - 1]; + else + pmap_enter_locked(pmap, va, access, m, prot, + FALSE, M_NOWAIT); m = TAILQ_NEXT(m, listq); } PMAP_UNLOCK(pmap); @@ -2916,11 +3230,32 @@ void pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) { struct l2_bucket *l2b; + struct md_page *pvh; + struct pv_entry *pve; + pd_entry_t *pl1pd, l1pd; pt_entry_t *ptep, pte; vm_page_t m; rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); + pl1pd = &pmap->pm_l1->l1_kva[L1_IDX(va)]; + l1pd = *pl1pd; + if ((l1pd & L1_TYPE_MASK) == L1_S_PROTO) { + m = PHYS_TO_VM_PAGE(l1pd & L1_S_FRAME); + KASSERT((m != NULL) && ((m->oflags & VPO_UNMANAGED) == 0), + ("pmap_change_wiring: unmanaged superpage should not " + "be changed")); + KASSERT(pmap != pmap_kernel(), + ("pmap_change_wiring: managed kernel superpage " + "should not exist")); + pvh = pa_to_pvh(l1pd & L1_S_FRAME); + pve = pmap_find_pv(pvh, pmap, trunc_1mpage(va)); + if (!wired != ((pve->pv_flags & PVF_WIRED) == 0)) { + if (!pmap_demote_section(pmap, va)) + panic("pmap_change_wiring: demotion failed"); + } else + goto out; + } l2b = pmap_get_l2_bucket(pmap, va); KASSERT(l2b, ("No l2b bucket in pmap_change_wiring")); ptep = &l2b->l2b_kva[l2pte_index(va)]; @@ -2929,6 +3264,7 @@ pmap_change_wiring(pmap_t pmap, vm_offse if (m != NULL) pmap_modify_pv(m, pmap, va, PVF_WIRED, wired == TRUE ? PVF_WIRED : 0); +out: rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } @@ -3035,10 +3371,6 @@ pmap_extract_and_hold(pmap_t pmap, vm_of retry: l1pd = pmap->pm_l1->l1_kva[l1idx]; if (l1pte_section_p(l1pd)) { - /* - * These should only happen for pmap_kernel() - */ - KASSERT(pmap == pmap_kernel(), ("huh")); /* XXX: what to do about the bits > 32 ? */ if (l1pd & L1_S_SUPERSEC) pa = (l1pd & L1_SUP_FRAME) | (va & L1_SUP_OFFSET); @@ -3123,6 +3455,520 @@ pmap_pinit(pmap_t pmap) /*************************************************** + * Superpage management routines. + ***************************************************/ + +static PMAP_INLINE struct pv_entry * +pmap_pvh_remove(struct md_page *pvh, pmap_t pmap, vm_offset_t va) +{ + pv_entry_t pv; + + rw_assert(&pvh_global_lock, RA_WLOCKED); + + pv = pmap_find_pv(pvh, pmap, va); + if (pv != NULL) + TAILQ_REMOVE(&pvh->pv_list, pv, pv_list); + + return (pv); +} + +static void +pmap_pvh_free(struct md_page *pvh, pmap_t pmap, vm_offset_t va) +{ + pv_entry_t pv; + + pv = pmap_pvh_remove(pvh, pmap, va); + KASSERT(pv != NULL, ("pmap_pvh_free: pv not found")); + pmap_free_pv_entry(pmap, pv); +} + +static boolean_t +pmap_pv_insert_section(pmap_t pmap, vm_offset_t va, vm_paddr_t pa) +{ + struct md_page *pvh; + pv_entry_t pv; + + rw_assert(&pvh_global_lock, RA_WLOCKED); + if (pv_entry_count < pv_entry_high_water && + (pv = pmap_get_pv_entry(pmap, TRUE)) != NULL) { + pv->pv_va = va; + pvh = pa_to_pvh(pa); + TAILQ_INSERT_TAIL(&pvh->pv_list, pv, pv_list); + return (TRUE); + } else + return (FALSE); +} + +/* + * Create the pv entries for each of the pages within a superpage. + */ +static void +pmap_pv_demote_section(pmap_t pmap, vm_offset_t va, vm_paddr_t pa) +{ + struct md_page *pvh; + pv_entry_t pve, pv; + vm_offset_t va_last; + vm_page_t m; + + rw_assert(&pvh_global_lock, RA_WLOCKED); + KASSERT((pa & L1_S_OFFSET) == 0, + ("pmap_pv_demote_section: pa is not 1mpage aligned")); + + /* + * Transfer the 1mpage's pv entry for this mapping to the first + * page's pv list. + */ + pvh = pa_to_pvh(pa); + va = trunc_1mpage(va); + pv = pmap_pvh_remove(pvh, pmap, va); + KASSERT(pv != NULL, ("pmap_pv_demote_section: pv not found")); + m = PHYS_TO_VM_PAGE(pa); + TAILQ_INSERT_HEAD(&m->md.pv_list, pv, pv_list); + /* Instantiate the remaining pv entries. */ + va_last = L2_NEXT_BUCKET(va) - PAGE_SIZE; + do { + m++; + KASSERT((m->oflags & VPO_UNMANAGED) == 0, + ("pmap_pv_demote_section: page %p is not managed", m)); + va += PAGE_SIZE; + pve = pmap_get_pv_entry(pmap, FALSE); + pmap_enter_pv(m, pve, pmap, va, pv->pv_flags); + } while (va < va_last); +} + +static void +pmap_pv_promote_section(pmap_t pmap, vm_offset_t va, vm_paddr_t pa) +{ + struct md_page *pvh; + pv_entry_t pv; + vm_offset_t va_last; + vm_page_t m; + + rw_assert(&pvh_global_lock, RA_WLOCKED); + KASSERT((pa & L1_S_OFFSET) == 0, + ("pmap_pv_promote_section: pa is not 1mpage aligned")); + + /* + * Transfer the first page's pv entry for this mapping to the + * 1mpage's pv list. Aside from avoiding the cost of a call + * to get_pv_entry(), a transfer avoids the possibility that + * get_pv_entry() calls pmap_pv_reclaim() and that pmap_pv_reclaim() + * removes one of the mappings that is being promoted. + */ + m = PHYS_TO_VM_PAGE(pa); + va = trunc_1mpage(va); + pv = pmap_pvh_remove(&m->md, pmap, va); + KASSERT(pv != NULL, ("pmap_pv_promote_section: pv not found")); + pvh = pa_to_pvh(pa); + TAILQ_INSERT_TAIL(&pvh->pv_list, pv, pv_list); + /* Free the remaining pv entries in the newly mapped section pages */ + va_last = L2_NEXT_BUCKET(va) - PAGE_SIZE; + do { + m++; + va += PAGE_SIZE; + /* + * Don't care the flags, first pv contains sufficient + * information for all of the pages so nothing is really lost. + */ + pmap_pvh_free(&m->md, pmap, va); + } while (va < va_last); +} + +/* + * Tries to create a 1MB page mapping. Returns TRUE if successful and + * FALSE otherwise. Fails if (1) page is unmanageg, kernel pmap or vectors + * page, (2) a mapping already exists at the specified virtual address, or + * (3) a pv entry cannot be allocated without reclaiming another pv entry. + */ +static boolean_t +pmap_enter_section(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) +{ + pd_entry_t *pl1pd; + vm_offset_t pa; + struct l2_bucket *l2b; + + rw_assert(&pvh_global_lock, RA_WLOCKED); + PMAP_ASSERT_LOCKED(pmap); + + /* Skip kernel, vectors page and unmanaged mappings */ + if ((pmap == pmap_kernel()) || (L1_IDX(va) == L1_IDX(vector_page)) || + ((m->oflags & VPO_UNMANAGED) != 0)) { + CTR2(KTR_PMAP, "pmap_enter_section: failure for va %#lx" + " in pmap %p", va, pmap); + return (FALSE); + } + /* + * Check whether this is a valid section superpage entry or + * there is a l2_bucket associated with that L1 page directory. + */ + va = trunc_1mpage(va); + pl1pd = &pmap->pm_l1->l1_kva[L1_IDX(va)]; + l2b = pmap_get_l2_bucket(pmap, va); + if ((*pl1pd & L1_S_PROTO) || (l2b != NULL)) { + CTR2(KTR_PMAP, "pmap_enter_section: failure for va %#lx" + " in pmap %p", va, pmap); + return (FALSE); + } + pa = VM_PAGE_TO_PHYS(m); + /* + * Abort this mapping if its PV entry could not be created. + */ + if (!pmap_pv_insert_section(pmap, va, VM_PAGE_TO_PHYS(m))) { + CTR2(KTR_PMAP, "pmap_enter_section: failure for va %#lx" + " in pmap %p", va, pmap); + return (FALSE); + } + /* + * Increment counters. + */ + pmap->pm_stats.resident_count += L2_PTE_NUM_TOTAL; + /* + * Despite permissions, mark the superpage read-only. + */ + prot &= ~VM_PROT_WRITE; + /* + * Map the superpage. + */ + pmap_map_section(pmap, va, pa, prot, FALSE); + + pmap_section_mappings++; + CTR2(KTR_PMAP, "pmap_enter_section: success for va %#lx" + " in pmap %p", va, pmap); + return (TRUE); +} + +/* + * pmap_remove_section: do the things to unmap a superpage in a process + */ +static void +pmap_remove_section(pmap_t pmap, vm_offset_t sva) +{ + struct md_page *pvh; + struct l2_bucket *l2b; + pd_entry_t *pl1pd, l1pd; + vm_offset_t eva, va; + vm_page_t m; + + PMAP_ASSERT_LOCKED(pmap); + if ((pmap == pmap_kernel()) || (L1_IDX(sva) == L1_IDX(vector_page))) + return; + + KASSERT((sva & L1_S_OFFSET) == 0, + ("pmap_remove_section: sva is not 1mpage aligned")); + + pl1pd = &pmap->pm_l1->l1_kva[L1_IDX(sva)]; + l1pd = *pl1pd; + + m = PHYS_TO_VM_PAGE(l1pd & L1_S_FRAME); + KASSERT((m != NULL && ((m->oflags & VPO_UNMANAGED) == 0)), + ("pmap_remove_section: no corresponding vm_page or " + "page unmanaged")); + + pmap->pm_stats.resident_count -= L2_PTE_NUM_TOTAL; + pvh = pa_to_pvh(l1pd & L1_S_FRAME); + pmap_pvh_free(pvh, pmap, sva); + eva = L2_NEXT_BUCKET(sva); + for (va = sva, m = PHYS_TO_VM_PAGE(l1pd & L1_S_FRAME); + va < eva; va += PAGE_SIZE, m++) { + /* + * Mark base pages referenced but skip marking them dirty. + * If the superpage is writeable, hence all base pages were + * already marked as dirty in pmap_fault_fixup() before + * promotion. Reference bit however, might not have been set + * for each base page when the superpage was created at once, + * not as a result of promotion. + */ + if (L1_S_REFERENCED(l1pd)) + vm_page_aflag_set(m, PGA_REFERENCED); + if (TAILQ_EMPTY(&m->md.pv_list) && + TAILQ_EMPTY(&pvh->pv_list)) + vm_page_aflag_clear(m, PGA_WRITEABLE); + } + + l2b = pmap_get_l2_bucket(pmap, sva); + if (l2b != NULL) { + KASSERT(l2b->l2b_occupancy == L2_PTE_NUM_TOTAL, + ("pmap_remove_section: l2_bucket occupancy error")); + pmap_free_l2_bucket(pmap, l2b, L2_PTE_NUM_TOTAL); + /* + * Now invalidate L1 slot as it was not invalidated in + * pmap_free_l2_bucket() due to L1_TYPE mismatch. + */ + *pl1pd = 0; + PTE_SYNC(pl1pd); + } +} + +/* + * Tries to promote the 256, contiguous 4KB page mappings that are + * within a single l2_bucket to a single 1MB section mapping. + * For promotion to occur, two conditions must be met: (1) the 4KB page + * mappings must map aligned, contiguous physical memory and (2) the 4KB page + * mappings must have identical characteristics. + */ +static void +pmap_promote_section(pmap_t pmap, vm_offset_t va) +{ + pt_entry_t *firstptep, firstpte, oldpte, pa, *pte; + vm_page_t m, oldm; + vm_offset_t first_va, old_va; + struct l2_bucket *l2b = NULL; + vm_prot_t prot; + struct pv_entry *pve, *first_pve; + + PMAP_ASSERT_LOCKED(pmap); + + prot = VM_PROT_ALL; + /* + * Skip promoting kernel pages. This is justified by following: + * 1. Kernel is already mapped using section mappings in each pmap + * 2. Managed mappings within the kernel are not to be promoted anyway + */ + if (pmap == pmap_kernel()) { + pmap_section_p_failures++; + CTR2(KTR_PMAP, "pmap_promote_section: failure for va %#x" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 17:15:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EB20FC94; Mon, 26 Aug 2013 17:15:57 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D86C52202; Mon, 26 Aug 2013 17:15:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QHFvDA001122; Mon, 26 Aug 2013 17:15:57 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QHFvXe001116; Mon, 26 Aug 2013 17:15:57 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201308261715.r7QHFvXe001116@svn.freebsd.org> From: Antoine Brodin Date: Mon, 26 Aug 2013 17:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254919 - head/tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 17:15:58 -0000 Author: antoine Date: Mon Aug 26 17:15:56 2013 New Revision: 254919 URL: http://svnweb.freebsd.org/changeset/base/254919 Log: Document WITHOUT_ICONV, WITH_LIBICONV_COMPAT and WITH_USB_GADGET_EXAMPLES Added: head/tools/build/options/WITHOUT_ICONV - copied, changed from r254918, head/tools/build/options/WITH_ICONV head/tools/build/options/WITH_LIBICONV_COMPAT (contents, props changed) head/tools/build/options/WITH_USB_GADGET_EXAMPLES (contents, props changed) Deleted: head/tools/build/options/WITH_ICONV Copied and modified: head/tools/build/options/WITHOUT_ICONV (from r254918, head/tools/build/options/WITH_ICONV) ============================================================================== --- head/tools/build/options/WITH_ICONV Mon Aug 26 17:12:30 2013 (r254918, copy source) +++ head/tools/build/options/WITHOUT_ICONV Mon Aug 26 17:15:56 2013 (r254919) @@ -1,2 +1,2 @@ .\" $FreeBSD$ -Set to build iconv as part of libc. +Set to not build iconv as part of libc. Added: head/tools/build/options/WITH_LIBICONV_COMPAT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_LIBICONV_COMPAT Mon Aug 26 17:15:56 2013 (r254919) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build libiconv API and link time compatibility. Added: head/tools/build/options/WITH_USB_GADGET_EXAMPLES ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_USB_GADGET_EXAMPLES Mon Aug 26 17:15:56 2013 (r254919) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build USB gadget kernel modules. From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 17:18:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2B86DF37; Mon, 26 Aug 2013 17:18:22 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 18894222B; Mon, 26 Aug 2013 17:18:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QHILG6001861; Mon, 26 Aug 2013 17:18:21 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QHILNX001860; Mon, 26 Aug 2013 17:18:21 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201308261718.r7QHILNX001860@svn.freebsd.org> From: Antoine Brodin Date: Mon, 26 Aug 2013 17:18:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254920 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 17:18:22 -0000 Author: antoine Date: Mon Aug 26 17:18:21 2013 New Revision: 254920 URL: http://svnweb.freebsd.org/changeset/base/254920 Log: Regenerate src.conf.5 Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Mon Aug 26 17:15:56 2013 (r254919) +++ head/share/man/man5/src.conf.5 Mon Aug 26 17:18:21 2013 (r254920) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 253304 2013-07-12 23:08:44Z bapt .\" $FreeBSD$ -.Dd July 16, 2013 +.Dd August 26, 2013 .Dt SRC.CONF 5 .Os .Sh NAME @@ -245,9 +245,6 @@ Set to not build the BSD licensed versio .It Va WITH_BSD_GREP .\" from FreeBSD: head/tools/build/options/WITH_BSD_GREP 222273 2011-05-25 01:04:12Z obrien Install BSD-licensed grep as '[ef]grep' instead of GNU grep. -.It Va WITH_BSD_PATCH -.\" from FreeBSD: head/tools/build/options/WITH_BSD_PATCH 246074 2013-01-29 17:03:18Z gabor -Install BSD-licensed patch as 'patch' instead of GNU patch. .It Va WITHOUT_BSNMP .\" from FreeBSD: head/tools/build/options/WITHOUT_BSNMP 183306 2008-09-23 16:15:42Z sam Set to not build or install @@ -506,6 +503,9 @@ When set, it also enforces the following .It .Va WITHOUT_GNU_SUPPORT .El +.It Va WITH_GNU_PATCH +.\" from FreeBSD: head/tools/build/options/WITH_GNU_PATCH 253689 2013-07-26 21:25:18Z pfg +Install GNU-licensed patch as 'patch' instead of BSD patch. .It Va WITHOUT_GNU_SUPPORT .\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without optional GNU support. @@ -538,9 +538,15 @@ Set to build Hesiod support. .It Va WITHOUT_HTML .\" from FreeBSD: head/tools/build/options/WITHOUT_HTML 156932 2006-03-21 07:50:50Z ru Set to not build HTML docs. -.It Va WITH_ICONV -.\" from FreeBSD: head/tools/build/options/WITH_ICONV 219020 2011-02-25 00:10:26Z gabor -Set to build iconv as part of libc. +.It Va WITHOUT_ICONV +.\" from FreeBSD: head/tools/build/options/WITHOUT_ICONV 254919 2013-08-26 17:15:56Z antoine +Set to not build iconv as part of libc. +When set, it also enforces the following options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_LIBICONV_COMPAT +.El .It Va WITHOUT_INET .\" from FreeBSD: head/tools/build/options/WITHOUT_INET 221266 2011-04-30 17:58:28Z bz Set to not build programs and libraries related to IPv4 networking. @@ -701,6 +707,9 @@ runtime linker. .It Va WITHOUT_LIBCPLUSPLUS .\" from FreeBSD: head/tools/build/options/WITHOUT_LIBCPLUSPLUS 246262 2013-02-02 22:42:46Z dim Set to avoid building libcxxrt and libc++. +.It Va WITH_LIBICONV_COMPAT +.\" from FreeBSD: head/tools/build/options/WITH_LIBICONV_COMPAT 254919 2013-08-26 17:15:56Z antoine +Set to build libiconv API and link time compatibility. .It Va WITHOUT_LIBPTHREAD .\" from FreeBSD: head/tools/build/options/WITHOUT_LIBPTHREAD 188848 2009-02-20 11:09:55Z mtm Set to not build the @@ -1129,6 +1138,9 @@ When set, it also enforces the following .It Va WITHOUT_USB .\" from FreeBSD: head/tools/build/options/WITHOUT_USB 156932 2006-03-21 07:50:50Z ru Set to not build USB-related programs and libraries. +.It Va WITH_USB_GADGET_EXAMPLES +.\" from FreeBSD: head/tools/build/options/WITH_USB_GADGET_EXAMPLES 254919 2013-08-26 17:15:56Z antoine +Set to build USB gadget kernel modules. .It Va WITHOUT_UTMPX .\" from FreeBSD: head/tools/build/options/WITHOUT_UTMPX 231530 2012-02-11 20:28:42Z ed Set to not build user accounting tools such as From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 17:21:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 32AA81CF; Mon, 26 Aug 2013 17:21:41 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1FD07227A; Mon, 26 Aug 2013 17:21:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QHLeC4005013; Mon, 26 Aug 2013 17:21:40 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QHLeKR005011; Mon, 26 Aug 2013 17:21:40 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201308261721.r7QHLeKR005011@svn.freebsd.org> From: Antoine Brodin Date: Mon, 26 Aug 2013 17:21:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254921 - in head: . tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 17:21:41 -0000 Author: antoine Date: Mon Aug 26 17:21:40 2013 New Revision: 254921 URL: http://svnweb.freebsd.org/changeset/base/254921 Log: Add more obsolete files. Modified: head/ObsoleteFiles.inc head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Aug 26 17:18:21 2013 (r254920) +++ head/ObsoleteFiles.inc Mon Aug 26 17:21:40 2013 (r254921) @@ -38,6 +38,14 @@ # xargs -n1 | sort | uniq -d; # done +# 20130822: bind 9.9.3-P2 import +OLD_LIBS+=usr/lib/liblwres.so.80 +# 20130814: vm_page_busy(9) +OLD_FILES+=usr/share/man/man9/vm_page_flash.9.gz +OLD_FILES+=usr/share/man/man9/vm_page_io.9.gz +OLD_FILES+=usr/share/man/man9/vm_page_io_finish.9.gz +OLD_FILES+=usr/share/man/man9/vm_page_io_start.9.gz +OLD_FILES+=usr/share/man/man9/vm_page_wakeup.9.gz # 20130710: libkvm version bump OLD_LIBS+=lib/libkvm.so.5 OLD_LIBS+=usr/lib32/libkvm.so.5 @@ -114,6 +122,7 @@ OLD_FILES+=usr/include/clang/3.2/xmmintr OLD_FILES+=usr/include/clang/3.2/xopintrin.h OLD_DIRS+=usr/include/clang/3.2 # 20130404: legacy ATA stack removed +OLD_FILES+=etc/periodic/daily/405.status-ata-raid OLD_FILES+=rescue/atacontrol OLD_FILES+=sbin/atacontrol OLD_FILES+=usr/share/man/man8/atacontrol.8.gz Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Aug 26 17:18:21 2013 (r254920) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Aug 26 17:21:40 2013 (r254921) @@ -1600,6 +1600,11 @@ OLD_FILES+=usr/share/man/man1/gdbserver. OLD_FILES+=usr/share/man/man1/kgdb.1.gz .endif +.if ${MK_GNU_PATCH} == no +OLD_FILES+=usr/bin/bsdpatch +OLD_FILES+=usr/share/man/man1/bsdpatch.1.gz +.endif + .if ${MK_GPIB} == no OLD_FILES+=usr/include/dev/ieee488/ibfoo_int.h OLD_FILES+=usr/include/dev/ieee488/ugpib.h From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 17:22:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B55B0312; Mon, 26 Aug 2013 17:22:52 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A2A372287; Mon, 26 Aug 2013 17:22:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QHMq4q005472; Mon, 26 Aug 2013 17:22:52 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QHMqKd005470; Mon, 26 Aug 2013 17:22:52 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308261722.r7QHMqKd005470@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 26 Aug 2013 17:22:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254922 - head/usr.bin/kdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 17:22:52 -0000 Author: jilles Date: Mon Aug 26 17:22:51 2013 New Revision: 254922 URL: http://svnweb.freebsd.org/changeset/base/254922 Log: kdump: Decode SOCK_CLOEXEC and SOCK_NONBLOCK in socket() and socketpair(). Modified: head/usr.bin/kdump/kdump.c head/usr.bin/kdump/mksubr Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Mon Aug 26 17:21:40 2013 (r254921) +++ head/usr.bin/kdump/kdump.c Mon Aug 26 17:22:51 2013 (r254922) @@ -830,7 +830,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in ip++; narg--; putchar(','); - socktypename(*ip); + socktypenamewithflags(*ip); ip++; narg--; if (sockdomain == PF_INET || @@ -908,7 +908,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in ip++; narg--; putchar(','); - socktypename(*ip); + socktypenamewithflags(*ip); ip++; narg--; c = ','; Modified: head/usr.bin/kdump/mksubr ============================================================================== --- head/usr.bin/kdump/mksubr Mon Aug 26 17:21:40 2013 (r254921) +++ head/usr.bin/kdump/mksubr Mon Aug 26 17:22:51 2013 (r254922) @@ -368,6 +368,19 @@ vmprotname (int type) if_print_or(type, VM_PROT_EXECUTE, or); if_print_or(type, VM_PROT_COPY, or); } + +/* + * MANUAL + */ +void +socktypenamewithflags(int type) +{ + if (type & SOCK_CLOEXEC) + printf("SOCK_CLOEXEC|"), type &= ~SOCK_CLOEXEC; + if (type & SOCK_NONBLOCK) + printf("SOCK_NONBLOCK|"), type &= ~SOCK_NONBLOCK; + socktypename(type); +} _EOF_ auto_or_type "accessmodename" "[A-Z]_OK[[:space:]]+0?x?[0-9A-Fa-f]+" "sys/unistd.h" From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 17:36:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 72510A7F; Mon, 26 Aug 2013 17:36:56 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5FEC52370; Mon, 26 Aug 2013 17:36:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QHauVO012549; Mon, 26 Aug 2013 17:36:56 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QHauBs012548; Mon, 26 Aug 2013 17:36:56 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201308261736.r7QHauBs012548@svn.freebsd.org> From: John-Mark Gurney Date: Mon, 26 Aug 2013 17:36:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254923 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 17:36:56 -0000 Author: jmg Date: Mon Aug 26 17:36:55 2013 New Revision: 254923 URL: http://svnweb.freebsd.org/changeset/base/254923 Log: Joerg was my mentor way back when... Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Mon Aug 26 17:22:51 2013 (r254922) +++ head/share/misc/committers-src.dot Mon Aug 26 17:36:55 2013 (r254923) @@ -187,6 +187,7 @@ jkim [label="Jung-uk Kim\njkim@FreeBSD.o jkoshy [label="A. Joseph Koshy\njkoshy@FreeBSD.org\n1998/05/13"] jlh [label="Jeremie Le Hen\njlh@FreeBSD.org\n2012/04/22"] jls [label="Jordan Sissel\njls@FreeBSD.org\n2006/12/06"] +jmg [label="John-Mark Gurney\njmg@FreeBSD.org\n1997/02/13"] joerg [label="Joerg Wunsch\njoerg@FreeBSD.org\n1993/11/14"] jon [label="Jonathan Chen\njon@FreeBSD.org\n2000/10/17"] jonathan [label="Jonathan Anderson\njonathan@FreeBSD.org\n2010/10/07"] @@ -495,6 +496,7 @@ jlemon -> brooks joerg -> brian joerg -> eik +joerg -> jmg joerg -> le joerg -> netchild joerg -> schweikh From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 17:38:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0383ABC5; Mon, 26 Aug 2013 17:38:37 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E3D81237C; Mon, 26 Aug 2013 17:38:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QHcaom013171; Mon, 26 Aug 2013 17:38:36 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QHcavp013170; Mon, 26 Aug 2013 17:38:36 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201308261738.r7QHcavp013170@svn.freebsd.org> From: John-Mark Gurney Date: Mon, 26 Aug 2013 17:38:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254924 - head/sys/dev/amdtemp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 17:38:37 -0000 Author: jmg Date: Mon Aug 26 17:38:36 2013 New Revision: 254924 URL: http://svnweb.freebsd.org/changeset/base/254924 Log: Add support for my: CPU: AMD A10-5700 APU with Radeon(tm) HD Graphics (3393.89-MHz K8-class CPU) Modified: head/sys/dev/amdtemp/amdtemp.c Modified: head/sys/dev/amdtemp/amdtemp.c ============================================================================== --- head/sys/dev/amdtemp/amdtemp.c Mon Aug 26 17:36:55 2013 (r254923) +++ head/sys/dev/amdtemp/amdtemp.c Mon Aug 26 17:38:36 2013 (r254924) @@ -76,6 +76,7 @@ struct amdtemp_softc { #define DEVICEID_AMD_MISC0F 0x1103 #define DEVICEID_AMD_MISC10 0x1203 #define DEVICEID_AMD_MISC11 0x1303 +#define DEVICEID_AMD_MISC12 0x1403 #define DEVICEID_AMD_MISC14 0x1703 #define DEVICEID_AMD_MISC15 0x1603 @@ -86,6 +87,7 @@ static struct amdtemp_product { { VENDORID_AMD, DEVICEID_AMD_MISC0F }, { VENDORID_AMD, DEVICEID_AMD_MISC10 }, { VENDORID_AMD, DEVICEID_AMD_MISC11 }, + { VENDORID_AMD, DEVICEID_AMD_MISC12 }, { VENDORID_AMD, DEVICEID_AMD_MISC14 }, { VENDORID_AMD, DEVICEID_AMD_MISC15 }, { 0, 0 } From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 18:16:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9A79665E; Mon, 26 Aug 2013 18:16:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6B95E2582; Mon, 26 Aug 2013 18:16:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QIG8cv035028; Mon, 26 Aug 2013 18:16:08 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QIG5OA035009; Mon, 26 Aug 2013 18:16:05 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201308261816.r7QIG5OA035009@svn.freebsd.org> From: John Baldwin Date: Mon, 26 Aug 2013 18:16:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254925 - in head/sys: fs/nfs net netinet netinet6 netipsec sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 18:16:08 -0000 Author: jhb Date: Mon Aug 26 18:16:05 2013 New Revision: 254925 URL: http://svnweb.freebsd.org/changeset/base/254925 Log: Remove most of the remaining sysctl name list macros. They were only ever intended for use in sysctl(8) and it has not used them for many years. Reviewed by: bde Tested by: exp-run by bdrewery Modified: head/sys/fs/nfs/nfs.h head/sys/net/if_pfsync.h head/sys/netinet/icmp_var.h head/sys/netinet/igmp_var.h head/sys/netinet/in.h head/sys/netinet/pim_var.h head/sys/netinet/tcp_var.h head/sys/netinet/udp_var.h head/sys/netinet6/pim6_var.h head/sys/netipsec/ipsec.h head/sys/netipsec/key_var.h head/sys/sys/socket.h head/sys/sys/sysctl.h Modified: head/sys/fs/nfs/nfs.h ============================================================================== --- head/sys/fs/nfs/nfs.h Mon Aug 26 17:38:36 2013 (r254924) +++ head/sys/fs/nfs/nfs.h Mon Aug 26 18:16:05 2013 (r254925) @@ -335,11 +335,6 @@ struct nfsreferral { */ #define NFS_NFSSTATS 1 /* struct: struct nfsstats */ -#define FS_NFS_NAMES { \ - { 0, 0 }, \ - { "nfsstats", CTLTYPE_STRUCT }, \ -} - /* * Here is the definition of the attribute bits array and macros that * manipulate it. Modified: head/sys/net/if_pfsync.h ============================================================================== --- head/sys/net/if_pfsync.h Mon Aug 26 17:38:36 2013 (r254924) +++ head/sys/net/if_pfsync.h Mon Aug 26 18:16:05 2013 (r254925) @@ -211,11 +211,6 @@ struct pfsync_tdb { #define PFSYNCCTL_STATS 1 /* PFSYNC stats */ #define PFSYNCCTL_MAXID 2 -#define PFSYNCCTL_NAMES { \ - { 0, 0 }, \ - { "stats", CTLTYPE_STRUCT }, \ -} - struct pfsyncstats { u_int64_t pfsyncs_ipackets; /* total input packets, IPv4 */ u_int64_t pfsyncs_ipackets6; /* total input packets, IPv6 */ Modified: head/sys/netinet/icmp_var.h ============================================================================== --- head/sys/netinet/icmp_var.h Mon Aug 26 17:38:36 2013 (r254924) +++ head/sys/netinet/icmp_var.h Mon Aug 26 18:16:05 2013 (r254925) @@ -85,13 +85,6 @@ void kmod_icmpstat_inc(int statnum); #define ICMPCTL_ICMPLIM 3 #define ICMPCTL_MAXID 4 -#define ICMPCTL_NAMES { \ - { 0, 0 }, \ - { "maskrepl", CTLTYPE_INT }, \ - { "stats", CTLTYPE_STRUCT }, \ - { "icmplim", CTLTYPE_INT }, \ -} - #ifdef _KERNEL SYSCTL_DECL(_net_inet_icmp); Modified: head/sys/netinet/igmp_var.h ============================================================================== --- head/sys/netinet/igmp_var.h Mon Aug 26 17:38:36 2013 (r254924) +++ head/sys/netinet/igmp_var.h Mon Aug 26 18:16:05 2013 (r254925) @@ -218,8 +218,4 @@ SYSCTL_DECL(_net_inet_igmp); #define IGMPCTL_STATS 1 /* statistics (read-only) */ #define IGMPCTL_MAXID 2 -#define IGMPCTL_NAMES { \ - { 0, 0 }, \ - { "stats", CTLTYPE_STRUCT } \ -} #endif Modified: head/sys/netinet/in.h ============================================================================== --- head/sys/netinet/in.h Mon Aug 26 17:38:36 2013 (r254924) +++ head/sys/netinet/in.h Mon Aug 26 18:16:05 2013 (r254925) @@ -699,24 +699,6 @@ int getsourcefilter(int, uint32_t, struc #define IPCTL_GIF_TTL 16 /* default TTL for gif encap packet */ #define IPCTL_MAXID 17 -#define IPCTL_NAMES { \ - { 0, 0 }, \ - { "forwarding", CTLTYPE_INT }, \ - { "redirect", CTLTYPE_INT }, \ - { "ttl", CTLTYPE_INT }, \ - { "mtu", CTLTYPE_INT }, \ - { "rtexpire", CTLTYPE_INT }, \ - { "rtminexpire", CTLTYPE_INT }, \ - { "rtmaxcache", CTLTYPE_INT }, \ - { "sourceroute", CTLTYPE_INT }, \ - { "directed-broadcast", CTLTYPE_INT }, \ - { "intr-queue-maxlen", CTLTYPE_INT }, \ - { "intr-queue-drops", CTLTYPE_INT }, \ - { "stats", CTLTYPE_STRUCT }, \ - { "accept_sourceroute", CTLTYPE_INT }, \ - { "fastforwarding", CTLTYPE_INT }, \ -} - #endif /* __BSD_VISIBLE */ #ifdef _KERNEL Modified: head/sys/netinet/pim_var.h ============================================================================== --- head/sys/netinet/pim_var.h Mon Aug 26 17:38:36 2013 (r254924) +++ head/sys/netinet/pim_var.h Mon Aug 26 18:16:05 2013 (r254925) @@ -71,11 +71,6 @@ struct pimstat { #define PIMCTL_STATS 1 /* statistics (read-only) */ #define PIMCTL_MAXID 2 -#define PIMCTL_NAMES { \ - { 0, 0 }, \ - { "stats", CTLTYPE_STRUCT }, \ -} - #ifdef _KERNEL void pim_input(struct mbuf *, int); Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Mon Aug 26 17:38:36 2013 (r254924) +++ head/sys/netinet/tcp_var.h Mon Aug 26 18:16:05 2013 (r254925) @@ -593,24 +593,6 @@ struct xtcpcb { #define TCPCTL_MAXID 16 #define TCPCTL_FINWAIT2_TIMEOUT 17 -#define TCPCTL_NAMES { \ - { 0, 0 }, \ - { "rfc1323", CTLTYPE_INT }, \ - { "mssdflt", CTLTYPE_INT }, \ - { "stats", CTLTYPE_STRUCT }, \ - { "rttdflt", CTLTYPE_INT }, \ - { "keepidle", CTLTYPE_INT }, \ - { "keepintvl", CTLTYPE_INT }, \ - { "sendspace", CTLTYPE_INT }, \ - { "recvspace", CTLTYPE_INT }, \ - { "keepinit", CTLTYPE_INT }, \ - { "pcblist", CTLTYPE_STRUCT }, \ - { "delacktime", CTLTYPE_INT }, \ - { "v6mssdflt", CTLTYPE_INT }, \ - { "maxid", CTLTYPE_INT }, \ -} - - #ifdef _KERNEL #ifdef SYSCTL_DECL SYSCTL_DECL(_net_inet_tcp); Modified: head/sys/netinet/udp_var.h ============================================================================== --- head/sys/netinet/udp_var.h Mon Aug 26 17:38:36 2013 (r254924) +++ head/sys/netinet/udp_var.h Mon Aug 26 18:16:05 2013 (r254925) @@ -124,15 +124,6 @@ void kmod_udpstat_inc(int statnum); #define UDPCTL_PCBLIST 5 /* list of PCBs for UDP sockets */ #define UDPCTL_MAXID 6 -#define UDPCTL_NAMES { \ - { 0, 0 }, \ - { "checksum", CTLTYPE_INT }, \ - { "stats", CTLTYPE_STRUCT }, \ - { "maxdgram", CTLTYPE_INT }, \ - { "recvspace", CTLTYPE_INT }, \ - { "pcblist", CTLTYPE_STRUCT }, \ -} - #ifdef _KERNEL SYSCTL_DECL(_net_inet_udp); Modified: head/sys/netinet6/pim6_var.h ============================================================================== --- head/sys/netinet6/pim6_var.h Mon Aug 26 17:38:36 2013 (r254924) +++ head/sys/netinet6/pim6_var.h Mon Aug 26 18:16:05 2013 (r254925) @@ -61,8 +61,4 @@ int pim6_input(struct mbuf **, int*, int #define PIM6CTL_STATS 1 /* statistics (read-only) */ #define PIM6CTL_MAXID 2 -#define PIM6CTL_NAMES { \ - { 0, 0 }, \ - { 0, 0 }, \ -} #endif /* _NETINET6_PIM6_VAR_H_ */ Modified: head/sys/netipsec/ipsec.h ============================================================================== --- head/sys/netipsec/ipsec.h Mon Aug 26 17:38:36 2013 (r254924) +++ head/sys/netipsec/ipsec.h Mon Aug 26 18:16:05 2013 (r254925) @@ -264,40 +264,6 @@ struct ipsecstat { #define IPSECCTL_ESP_RANDPAD 13 #define IPSECCTL_MAXID 14 -#define IPSECCTL_NAMES { \ - { 0, 0 }, \ - { 0, 0 }, \ - { "def_policy", CTLTYPE_INT }, \ - { "esp_trans_deflev", CTLTYPE_INT }, \ - { "esp_net_deflev", CTLTYPE_INT }, \ - { "ah_trans_deflev", CTLTYPE_INT }, \ - { "ah_net_deflev", CTLTYPE_INT }, \ - { 0, 0 }, \ - { "ah_cleartos", CTLTYPE_INT }, \ - { "ah_offsetmask", CTLTYPE_INT }, \ - { "dfbit", CTLTYPE_INT }, \ - { "ecn", CTLTYPE_INT }, \ - { "debug", CTLTYPE_INT }, \ - { "esp_randpad", CTLTYPE_INT }, \ -} - -#define IPSEC6CTL_NAMES { \ - { 0, 0 }, \ - { 0, 0 }, \ - { "def_policy", CTLTYPE_INT }, \ - { "esp_trans_deflev", CTLTYPE_INT }, \ - { "esp_net_deflev", CTLTYPE_INT }, \ - { "ah_trans_deflev", CTLTYPE_INT }, \ - { "ah_net_deflev", CTLTYPE_INT }, \ - { 0, 0 }, \ - { 0, 0 }, \ - { 0, 0 }, \ - { 0, 0 }, \ - { "ecn", CTLTYPE_INT }, \ - { "debug", CTLTYPE_INT }, \ - { "esp_randpad", CTLTYPE_INT }, \ -} - #ifdef _KERNEL #include Modified: head/sys/netipsec/key_var.h ============================================================================== --- head/sys/netipsec/key_var.h Mon Aug 26 17:38:36 2013 (r254924) +++ head/sys/netipsec/key_var.h Mon Aug 26 18:16:05 2013 (r254925) @@ -48,22 +48,6 @@ #define KEYCTL_PREFERED_OLDSA 12 #define KEYCTL_MAXID 13 -#define KEYCTL_NAMES { \ - { 0, 0 }, \ - { "debug", CTLTYPE_INT }, \ - { "spi_try", CTLTYPE_INT }, \ - { "spi_min_value", CTLTYPE_INT }, \ - { "spi_max_value", CTLTYPE_INT }, \ - { "random_int", CTLTYPE_INT }, \ - { "larval_lifetime", CTLTYPE_INT }, \ - { "blockacq_count", CTLTYPE_INT }, \ - { "blockacq_lifetime", CTLTYPE_INT }, \ - { "esp_keymin", CTLTYPE_INT }, \ - { "esp_auth", CTLTYPE_INT }, \ - { "ah_keymin", CTLTYPE_INT }, \ - { "prefered_oldsa", CTLTYPE_INT }, \ -} - #ifdef _KERNEL #define _ARRAYLEN(p) (sizeof(p)/sizeof(p[0])) #define _KEYLEN(key) ((u_int)((key)->bits >> 3)) Modified: head/sys/sys/socket.h ============================================================================== --- head/sys/sys/socket.h Mon Aug 26 17:38:36 2013 (r254924) +++ head/sys/sys/socket.h Mon Aug 26 18:16:05 2013 (r254925) @@ -370,44 +370,6 @@ struct sockproto { */ #define NET_MAXID AF_MAX -#define CTL_NET_NAMES { \ - { 0, 0 }, \ - { "unix", CTLTYPE_NODE }, \ - { "inet", CTLTYPE_NODE }, \ - { "implink", CTLTYPE_NODE }, \ - { "pup", CTLTYPE_NODE }, \ - { "chaos", CTLTYPE_NODE }, \ - { "xerox_ns", CTLTYPE_NODE }, \ - { "iso", CTLTYPE_NODE }, \ - { "emca", CTLTYPE_NODE }, \ - { "datakit", CTLTYPE_NODE }, \ - { "ccitt", CTLTYPE_NODE }, \ - { "ibm_sna", CTLTYPE_NODE }, \ - { "decnet", CTLTYPE_NODE }, \ - { "dec_dli", CTLTYPE_NODE }, \ - { "lat", CTLTYPE_NODE }, \ - { "hylink", CTLTYPE_NODE }, \ - { "appletalk", CTLTYPE_NODE }, \ - { "route", CTLTYPE_NODE }, \ - { "link_layer", CTLTYPE_NODE }, \ - { "xtp", CTLTYPE_NODE }, \ - { "coip", CTLTYPE_NODE }, \ - { "cnt", CTLTYPE_NODE }, \ - { "rtip", CTLTYPE_NODE }, \ - { "ipx", CTLTYPE_NODE }, \ - { "sip", CTLTYPE_NODE }, \ - { "pip", CTLTYPE_NODE }, \ - { "isdn", CTLTYPE_NODE }, \ - { "key", CTLTYPE_NODE }, \ - { "inet6", CTLTYPE_NODE }, \ - { "natm", CTLTYPE_NODE }, \ - { "atm", CTLTYPE_NODE }, \ - { "hdrcomplete", CTLTYPE_NODE }, \ - { "netgraph", CTLTYPE_NODE }, \ - { "snp", CTLTYPE_NODE }, \ - { "scp", CTLTYPE_NODE }, \ -} - /* * PF_ROUTE - Routing table * @@ -424,14 +386,6 @@ struct sockproto { * versions of msghdr structs. */ #define NET_RT_MAXID 6 -#define CTL_NET_RT_NAMES { \ - { 0, 0 }, \ - { "dump", CTLTYPE_STRUCT }, \ - { "flags", CTLTYPE_STRUCT }, \ - { "iflist", CTLTYPE_STRUCT }, \ - { "ifmalist", CTLTYPE_STRUCT }, \ - { "iflistl", CTLTYPE_STRUCT }, \ -} #endif /* __BSD_VISIBLE */ /* Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Mon Aug 26 17:38:36 2013 (r254924) +++ head/sys/sys/sysctl.h Mon Aug 26 18:16:05 2013 (r254925) @@ -447,19 +447,6 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a #define CTL_P1003_1B 9 /* POSIX 1003.1B */ #define CTL_MAXID 10 /* number of valid top-level ids */ -#define CTL_NAMES { \ - { 0, 0 }, \ - { "kern", CTLTYPE_NODE }, \ - { "vm", CTLTYPE_NODE }, \ - { "vfs", CTLTYPE_NODE }, \ - { "net", CTLTYPE_NODE }, \ - { "debug", CTLTYPE_NODE }, \ - { "hw", CTLTYPE_NODE }, \ - { "machdep", CTLTYPE_NODE }, \ - { "user", CTLTYPE_NODE }, \ - { "p1003_1b", CTLTYPE_NODE }, \ -} - /* * CTL_KERN identifiers */ @@ -502,53 +489,6 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a #define KERN_ARND 37 /* int: from arc4rand() */ #define KERN_MAXID 38 /* number of valid kern ids */ -#define CTL_KERN_NAMES { \ - { 0, 0 }, \ - { "ostype", CTLTYPE_STRING }, \ - { "osrelease", CTLTYPE_STRING }, \ - { "osrevision", CTLTYPE_INT }, \ - { "version", CTLTYPE_STRING }, \ - { "maxvnodes", CTLTYPE_INT }, \ - { "maxproc", CTLTYPE_INT }, \ - { "maxfiles", CTLTYPE_INT }, \ - { "argmax", CTLTYPE_INT }, \ - { "securelevel", CTLTYPE_INT }, \ - { "hostname", CTLTYPE_STRING }, \ - { "hostid", CTLTYPE_UINT }, \ - { "clockrate", CTLTYPE_STRUCT }, \ - { "vnode", CTLTYPE_STRUCT }, \ - { "proc", CTLTYPE_STRUCT }, \ - { "file", CTLTYPE_STRUCT }, \ - { "profiling", CTLTYPE_NODE }, \ - { "posix1version", CTLTYPE_INT }, \ - { "ngroups", CTLTYPE_INT }, \ - { "job_control", CTLTYPE_INT }, \ - { "saved_ids", CTLTYPE_INT }, \ - { "boottime", CTLTYPE_STRUCT }, \ - { "nisdomainname", CTLTYPE_STRING }, \ - { "update", CTLTYPE_INT }, \ - { "osreldate", CTLTYPE_INT }, \ - { "ntp_pll", CTLTYPE_NODE }, \ - { "bootfile", CTLTYPE_STRING }, \ - { "maxfilesperproc", CTLTYPE_INT }, \ - { "maxprocperuid", CTLTYPE_INT }, \ - { "ipc", CTLTYPE_NODE }, \ - { "dummy", CTLTYPE_INT }, \ - { "ps_strings", CTLTYPE_INT }, \ - { "usrstack", CTLTYPE_INT }, \ - { "logsigexit", CTLTYPE_INT }, \ - { "iov_max", CTLTYPE_INT }, \ - { "hostuuid", CTLTYPE_STRING }, \ - { "arc4rand", CTLTYPE_OPAQUE }, \ -} - -/* - * CTL_VFS identifiers - */ -#define CTL_VFS_NAMES { \ - { "vfsconf", CTLTYPE_STRUCT }, \ -} - /* * KERN_PROC subtypes */ @@ -611,22 +551,6 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a #define HW_REALMEM 12 /* int: 'real' memory */ #define HW_MAXID 13 /* number of valid hw ids */ -#define CTL_HW_NAMES { \ - { 0, 0 }, \ - { "machine", CTLTYPE_STRING }, \ - { "model", CTLTYPE_STRING }, \ - { "ncpu", CTLTYPE_INT }, \ - { "byteorder", CTLTYPE_INT }, \ - { "physmem", CTLTYPE_ULONG }, \ - { "usermem", CTLTYPE_ULONG }, \ - { "pagesize", CTLTYPE_INT }, \ - { "disknames", CTLTYPE_STRUCT }, \ - { "diskstats", CTLTYPE_STRUCT }, \ - { "floatingpoint", CTLTYPE_INT }, \ - { "machine_arch", CTLTYPE_STRING }, \ - { "realmem", CTLTYPE_ULONG }, \ -} - /* * CTL_USER definitions */ @@ -652,30 +576,6 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a #define USER_TZNAME_MAX 20 /* int: POSIX2_TZNAME_MAX */ #define USER_MAXID 21 /* number of valid user ids */ -#define CTL_USER_NAMES { \ - { 0, 0 }, \ - { "cs_path", CTLTYPE_STRING }, \ - { "bc_base_max", CTLTYPE_INT }, \ - { "bc_dim_max", CTLTYPE_INT }, \ - { "bc_scale_max", CTLTYPE_INT }, \ - { "bc_string_max", CTLTYPE_INT }, \ - { "coll_weights_max", CTLTYPE_INT }, \ - { "expr_nest_max", CTLTYPE_INT }, \ - { "line_max", CTLTYPE_INT }, \ - { "re_dup_max", CTLTYPE_INT }, \ - { "posix2_version", CTLTYPE_INT }, \ - { "posix2_c_bind", CTLTYPE_INT }, \ - { "posix2_c_dev", CTLTYPE_INT }, \ - { "posix2_char_term", CTLTYPE_INT }, \ - { "posix2_fort_dev", CTLTYPE_INT }, \ - { "posix2_fort_run", CTLTYPE_INT }, \ - { "posix2_localedef", CTLTYPE_INT }, \ - { "posix2_sw_dev", CTLTYPE_INT }, \ - { "posix2_upe", CTLTYPE_INT }, \ - { "stream_max", CTLTYPE_INT }, \ - { "tzname_max", CTLTYPE_INT }, \ -} - #define CTL_P1003_1B_ASYNCHRONOUS_IO 1 /* boolean */ #define CTL_P1003_1B_MAPPED_FILES 2 /* boolean */ #define CTL_P1003_1B_MEMLOCK 3 /* boolean */ @@ -704,35 +604,6 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a #define CTL_P1003_1B_MAXID 26 -#define CTL_P1003_1B_NAMES { \ - { 0, 0 }, \ - { "asynchronous_io", CTLTYPE_INT }, \ - { "mapped_files", CTLTYPE_INT }, \ - { "memlock", CTLTYPE_INT }, \ - { "memlock_range", CTLTYPE_INT }, \ - { "memory_protection", CTLTYPE_INT }, \ - { "message_passing", CTLTYPE_INT }, \ - { "prioritized_io", CTLTYPE_INT }, \ - { "priority_scheduling", CTLTYPE_INT }, \ - { "realtime_signals", CTLTYPE_INT }, \ - { "semaphores", CTLTYPE_INT }, \ - { "fsync", CTLTYPE_INT }, \ - { "shared_memory_objects", CTLTYPE_INT }, \ - { "synchronized_io", CTLTYPE_INT }, \ - { "timers", CTLTYPE_INT }, \ - { "aio_listio_max", CTLTYPE_INT }, \ - { "aio_max", CTLTYPE_INT }, \ - { "aio_prio_delta_max", CTLTYPE_INT }, \ - { "delaytimer_max", CTLTYPE_INT }, \ - { "mq_open_max", CTLTYPE_INT }, \ - { "pagesize", CTLTYPE_INT }, \ - { "rtsig_max", CTLTYPE_INT }, \ - { "nsems_max", CTLTYPE_INT }, \ - { "sem_value_max", CTLTYPE_INT }, \ - { "sigqueue_max", CTLTYPE_INT }, \ - { "timer_max", CTLTYPE_INT }, \ -} - #ifdef _KERNEL /* From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 18:27:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6CFB1CBF; Mon, 26 Aug 2013 18:27:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 06D4F263E; Mon, 26 Aug 2013 18:27:51 +0000 (UTC) Received: from jhbbsd.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id BF0DFB962; Mon, 26 Aug 2013 14:27:49 -0400 (EDT) From: John Baldwin To: "Jean-Sebastien Pedron" Subject: Re: svn commit: r254882 - head/sys/dev/pci Date: Mon, 26 Aug 2013 10:55:17 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <201308251809.r7PI9CsE052978@svn.freebsd.org> In-Reply-To: <201308251809.r7PI9CsE052978@svn.freebsd.org> MIME-Version: 1.0 Message-Id: <201308261055.17964.jhb@freebsd.org> Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 26 Aug 2013 14:27:49 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 18:27:51 -0000 On Sunday, August 25, 2013 2:09:12 pm Jean-Sebastien Pedron wrote: > Author: dumbbell > Date: Sun Aug 25 18:09:11 2013 > New Revision: 254882 > URL: http://svnweb.freebsd.org/changeset/base/254882 > > Log: > vga_pci: Add API to map the Video BIOS > > Here are two new functions to map and unmap the Video BIOS: > void * vga_pci_map_bios(device_t dev, size_t *size); > void vga_pci_unmap_bios(device_t dev, void *bios); > > The BIOS is either taken from the shadow copy made by the System BIOS at > boot time if the given device was used for the default display (i386, > amd64 and ia64 only), or from the PCI expansion ROM. > > Additionally, one can determine if a given device was the default > display at boot time using the following new function: > void vga_pci_unmap_bios(device_t dev, void *bios); > > Modified: > head/sys/dev/pci/pcivar.h > head/sys/dev/pci/vga_pci.c > > Modified: head/sys/dev/pci/pcivar.h > ============================================================================== > --- head/sys/dev/pci/pcivar.h Sun Aug 25 17:26:05 2013 (r254881) > +++ head/sys/dev/pci/pcivar.h Sun Aug 25 18:09:11 2013 (r254882) > @@ -517,4 +517,11 @@ extern uint32_t pci_generation; > struct pci_map *pci_find_bar(device_t dev, int reg); > int pci_bar_enabled(device_t dev, struct pci_map *pm); > > +#define VGA_PCI_BIOS_SHADOW_ADDR 0xC0000 > +#define VGA_PCI_BIOS_SHADOW_SIZE 131072 > + > +int vga_pci_is_boot_display(device_t dev); > +void * vga_pci_map_bios(device_t dev, size_t *size); > +void vga_pci_unmap_bios(device_t dev, void *bios); > + > #endif /* _PCIVAR_H_ */ > > Modified: head/sys/dev/pci/vga_pci.c > ============================================================================== > --- head/sys/dev/pci/vga_pci.c Sun Aug 25 17:26:05 2013 (r254881) > +++ head/sys/dev/pci/vga_pci.c Sun Aug 25 18:09:11 2013 (r254882) > @@ -46,6 +46,11 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#if defined(__amd64__) || defined(__i386__) || defined(__ia64__) > +#include > +#include > +#endif > + > #include > #include > > @@ -67,6 +72,99 @@ TUNABLE_INT("hw.pci.default_vgapci_unit" > SYSCTL_INT(_hw_pci, OID_AUTO, default_vgapci_unit, CTLFLAG_RDTUN, > &vga_pci_default_unit, -1, "Default VGA-compatible display"); > > +int > +vga_pci_is_boot_display(device_t dev) > +{ > + > + /* > + * Return true if the given device is the default display used > + * at boot time. > + */ > + > + return ( > + (pci_get_class(dev) == PCIC_DISPLAY || > + (pci_get_class(dev) == PCIC_OLD && > + pci_get_subclass(dev) == PCIS_OLD_VGA)) && > + device_get_unit(dev) == vga_pci_default_unit); > +} > + > +void * > +vga_pci_map_bios(device_t dev, size_t *size) > +{ > + int rid; > + struct resource *res; > + > +#if defined(__amd64__) || defined(__i386__) || defined(__ia64__) > + if (vga_pci_is_boot_display(dev)) { > + /* > + * On x86, the System BIOS copy the default display > + * device's Video BIOS at a fixed location in system > + * memory (0xC0000, 128 kBytes long) at boot time. > + * > + * We use this copy for the default boot device, because > + * the original ROM may not be valid after boot. > + */ > + > + printf("%s: Mapping BIOS shadow\n", __func__); > + *size = VGA_PCI_BIOS_SHADOW_SIZE; > + return (pmap_mapbios(VGA_PCI_BIOS_SHADOW_ADDR, *size)); > + } > +#endif > + > + printf("%s: Mapping PCI expansion ROM\n", __func__); > + rid = PCIR_BIOS; > + res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); > + if (res == NULL) { > + return (NULL); > + } > + > + *size = rman_get_size(res); > + return (rman_get_virtual(res)); > +} > + > +void > +vga_pci_unmap_bios(device_t dev, void *bios) > +{ > + int rid; > + struct resource *res; > + > + if (bios == NULL) { > + return; > + } > + > +#if defined(__amd64__) || defined(__i386__) || defined(__ia64__) > + if (vga_pci_is_boot_display(dev)) { > + /* We mapped the BIOS shadow copy located at 0xC0000. */ > + printf("%s: Unmapping BIOS shadow\n", __func__); > + pmap_unmapdev((vm_offset_t)bios, VGA_PCI_BIOS_SHADOW_SIZE); > + > + return; > + } > +#endif > + > + /* > + * FIXME: We returned only the virtual address of the resource > + * to the caller. Now, to get the resource struct back, we > + * allocate it again: the struct exists once in memory in > + * device softc. Therefore, we release twice now to release the > + * reference we just obtained to get the structure back and the > + * caller's reference. > + */ This won't actually work (the PCI bus will panic when you do the duplicate alloc). Why not put this in the softc of the vga_pci device? In fact, it is already there. You just need to bump the vr_refs on the vga_bios resource similar to what vga_pci_alloc_resource() does. Also, returning a void * for this API seems rather hacky. Have you considered returning a struct resource * instead (and requiring the caller to use bus_space_* on it)? That would be more consistent with new-bus. I can help with getting the right bus_alloc_resource() incantation to alloc a struct resource * for the shadow copy if so. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 18:27:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 493B5D2C; Mon, 26 Aug 2013 18:27:55 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 16D47263F; Mon, 26 Aug 2013 18:27:55 +0000 (UTC) Received: from jhbbsd.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 42DE3B941; Mon, 26 Aug 2013 14:27:53 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Subject: Re: svn commit: r254925 - in head/sys: fs/nfs net netinet netinet6 netipsec sys Date: Mon, 26 Aug 2013 14:19:37 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <201308261816.r7QIG5OA035009@svn.freebsd.org> In-Reply-To: <201308261816.r7QIG5OA035009@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201308261419.37142.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 26 Aug 2013 14:27:53 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 18:27:55 -0000 On Monday, August 26, 2013 2:16:05 pm John Baldwin wrote: > Author: jhb > Date: Mon Aug 26 18:16:05 2013 > New Revision: 254925 > URL: http://svnweb.freebsd.org/changeset/base/254925 > > Log: > Remove most of the remaining sysctl name list macros. They were only > ever intended for use in sysctl(8) and it has not used them for many > years. > > Reviewed by: bde > Tested by: exp-run by bdrewery There is one remaining macro that is (ab)used by the security/prelude-pflogger port. I have a patch to fix it to use getprotobynumber(3) (ports/181488). If that goes in I will remove the remaining macro. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 18:33:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4889D452; Mon, 26 Aug 2013 18:33:43 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-vc0-x22c.google.com (mail-vc0-x22c.google.com [IPv6:2607:f8b0:400c:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C493F26C8; Mon, 26 Aug 2013 18:33:42 +0000 (UTC) Received: by mail-vc0-f172.google.com with SMTP id m17so2371957vca.3 for ; Mon, 26 Aug 2013 11:33:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=6BXVFn4OGbI8y27zWyMpCrkGHnLFaHpm/0OvOt0QC/I=; b=wRzlJJ/0S5ZOCoxeKr5fkHA5OfhqmxEjvAGa0foz+oxyDb/87tmikU7lDV80z/VCz8 m6piUc85YXcTlU6szR5iZGhZVcn6er0UlgHpm1ohCRu1LsN5MAM+ykC//6uLHrMDV8zs 1juLofHGlBEUvAJVYZ+d5b+06qRzoMDQfJOVP5qSD+QuhdBcoghNa5KtkfvVmH1wXHig ebpfl6BQ1UWoxNOoOUuuutivI5LQdV32x0SGEgFSu9D/hUeU4ANPUemLiO1XlkdCAlpA hE/nAaK3vTln5ascfA7+2BmTyTnSKUsGPOcS6+81x5Et7y2k+0j2CfQ+kyW/+vgye2Pf D85Q== MIME-Version: 1.0 X-Received: by 10.58.100.234 with SMTP id fb10mr16253383veb.5.1377542021845; Mon, 26 Aug 2013 11:33:41 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.220.65.132 with HTTP; Mon, 26 Aug 2013 11:33:41 -0700 (PDT) In-Reply-To: <201308231258.50969.jhb@freebsd.org> References: <201308231412.r7NECdG7081565@svn.freebsd.org> <201308231051.08997.jhb@freebsd.org> <201308231258.50969.jhb@freebsd.org> Date: Mon, 26 Aug 2013 11:33:41 -0700 X-Google-Sender-Auth: fSnKzIN-BnmgEu7VLvSQ2fxf4jM Message-ID: Subject: Re: svn commit: r254703 - in head: share/man/man9 sys/sys From: Davide Italiano To: John Baldwin 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 18:33:43 -0000 On Fri, Aug 23, 2013 at 9:58 AM, John Baldwin wrote: > On Friday, August 23, 2013 11:29:45 am Davide Italiano wrote: >> On Fri, Aug 23, 2013 at 4:51 PM, John Baldwin wrote: >> > On Friday, August 23, 2013 10:12:39 am Davide Italiano wrote: >> >> Author: davide >> >> Date: Fri Aug 23 14:12:39 2013 >> >> New Revision: 254703 >> >> URL: http://svnweb.freebsd.org/changeset/base/254703 >> >> >> >> Log: >> >> Introduce callout_init_rm() so that callouts can be used in conjunction >> >> with rmlocks. This works only with non-sleepable rm because handlers run >> >> in SWI context. While here, document the new KPI in the timeout(9) >> >> manpage. >> > >> > It also only works with exclusive locks. (lc_unlock/lc_lock only handle >> > write locks for rmlocks). >> > >> > -- >> > John Baldwin >> >> Thanks for pointing out this. >> I think it would be nice to have lc_lock/lc_unlock working both for >> shared and exclusive locks but I'm not 100% sure about all the >> implications/complications. From what I see for rwlocks asserting if a >> lock is held in read-mode is really cheap (check against a flag) while >> for rmlocks the assertion relies on traversing the tracker list for >> the rmlock so I'm worried this operation could be expensive. What's >> your opinion about? > > The much bigger problem is you need an rmtracker object to pass to the > lock/unlock routines. > > You could make this work hackishly in the callout case by special casing > rm locks that use read locking and using a tracker on softclock's stack, > but it is much harder to fix this for the rm_sleep() case where the > sequence is lc_unlock/lc_lock. > > -- > John Baldwin I see. I would really like to go for a clean solution if possible, and if the timeframe for 10 doesn't allow this just revert the commit until a better solution would be available. FWIW, I pondered a bit about this and the only way I was able to think is that of augmenting 'struct lock_object' with a 'void *arg' field that in this case could be used to store a pointer to something, which in this case is a pointer to a rmtracker object, and this could allow easily to retrieve the needed information (as far as I see something similar is done to store WITNESS information). This, OTOH, could be overkill just to fix this case though. Thanks, -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 18:47:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 154289D7; Mon, 26 Aug 2013 18:47:11 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 022DD2780; Mon, 26 Aug 2013 18:47:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QIlA54051473; Mon, 26 Aug 2013 18:47:10 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QIlAVd051472; Mon, 26 Aug 2013 18:47:10 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201308261847.r7QIlAVd051472@svn.freebsd.org> From: John-Mark Gurney Date: Mon, 26 Aug 2013 18:47:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254929 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 18:47:11 -0000 Author: jmg Date: Mon Aug 26 18:47:10 2013 New Revision: 254929 URL: http://svnweb.freebsd.org/changeset/base/254929 Log: none of the drivers in the tree support CDIOCCAPABILITY or CDIOCPITCH.. remove the documentation so people won't get confused and think they are supported... Modified: head/share/man/man4/cd.4 Modified: head/share/man/man4/cd.4 ============================================================================== --- head/share/man/man4/cd.4 Mon Aug 26 18:35:21 2013 (r254928) +++ head/share/man/man4/cd.4 Mon Aug 26 18:47:10 2013 (r254929) @@ -113,69 +113,6 @@ read from the scsi inquiry commands, and the information printed at boot. This structure is defined in the header file .In sys/disklabel.h . -.It Dv CDIOCCAPABILITY -.Pq Li "struct ioc_capability" -Retrieve information from the drive on what features it supports. -The information is returned in the following structure: -.Bd -literal -offset indent -struct ioc_capability { - u_long play_function; -#define CDDOPLAYTRK 0x00000001 - /* Can play tracks/index */ -#define CDDOPLAYMSF 0x00000002 - /* Can play msf to msf */ -#define CDDOPLAYBLOCKS 0x00000004 - /* Can play range of blocks */ -#define CDDOPAUSE 0x00000100 - /* Output can be paused */ -#define CDDORESUME 0x00000200 - /* Output can be resumed */ -#define CDDORESET 0x00000400 - /* Drive can be completely reset */ -#define CDDOSTART 0x00000800 - /* Audio can be started */ -#define CDDOSTOP 0x00001000 - /* Audio can be stopped */ -#define CDDOPITCH 0x00002000 - /* Audio pitch can be changed */ - - u_long routing_function; -#define CDREADVOLUME 0x00000001 - /* Volume settings can be read */ -#define CDSETVOLUME 0x00000002 - /* Volume settings can be set */ -#define CDSETMONO 0x00000100 - /* Output can be set to mono */ -#define CDSETSTEREO 0x00000200 - /* Output can be set to stereo (def) */ -#define CDSETLEFT 0x00000400 - /* Output can be set to left only */ -#define CDSETRIGHT 0x00000800 - /* Output can be set to right only */ -#define CDSETMUTE 0x00001000 - /* Output can be muted */ -#define CDSETPATCH 0x00008000 - /* Direct routing control allowed */ - - u_long special_function; -#define CDDOEJECT 0x00000001 - /* The tray can be opened */ -#define CDDOCLOSE 0x00000002 - /* The tray can be closed */ -#define CDDOLOCK 0x00000004 - /* The tray can be locked */ -#define CDREADHEADER 0x00000100 - /* Can read Table of Contents */ -#define CDREADENTRIES 0x00000200 - /* Can read TOC Entries */ -#define CDREADSUBQ 0x00000200 - /* Can read Subchannel info */ -#define CDREADRW 0x00000400 - /* Can read subcodes R-W */ -#define CDHASDEBUG 0x00004000 - /* The tray has dynamic debugging */ -}; -.Ed .It Dv CDIOCPLAYTRACKS .Pq Li "struct ioc_play_track" Start audio playback given a track address and length. @@ -320,24 +257,6 @@ Eject the .It Dv CDIOCCLOSE Tell the drive to close its door and load the media. Not all drives support this feature. -.It Dv CDIOCPITCH -.Pq Li "struct ioc_pitch" -For drives that support it, this command instructs the drive to play -the audio at a faster or slower rate than normal. -Values of -.Li speed -between -32767 and -1 result in slower playback; a zero value -indicates normal speed; and values from 1 to 32767 give faster -playback. -Drives with less than 16 bits of resolution will silently -ignore less-significant bits. -The structure is defined thusly: -.Bd -literal -offset indent -struct ioc_pitch -{ - short speed; -}; -.Ed .El .Sh NOTES When a From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 18:50:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 31DACBE6; Mon, 26 Aug 2013 18:50:41 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1F72027C4; Mon, 26 Aug 2013 18:50:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QIoeFl053138; Mon, 26 Aug 2013 18:50:40 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QIoef2053137; Mon, 26 Aug 2013 18:50:40 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201308261850.r7QIoef2053137@svn.freebsd.org> From: John-Mark Gurney Date: Mon, 26 Aug 2013 18:50:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254930 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 18:50:41 -0000 Author: jmg Date: Mon Aug 26 18:50:40 2013 New Revision: 254930 URL: http://svnweb.freebsd.org/changeset/base/254930 Log: fix up my copyright.. Modified: head/share/man/man4/sysmouse.4 Modified: head/share/man/man4/sysmouse.4 ============================================================================== --- head/share/man/man4/sysmouse.4 Mon Aug 26 18:47:10 2013 (r254929) +++ head/share/man/man4/sysmouse.4 Mon Aug 26 18:50:40 2013 (r254930) @@ -1,5 +1,4 @@ -.\" Copyright (c) 1997 -.\" John-Mark Gurney. All rights reserved. +.\" Copyright 1997 John-Mark Gurney. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 18:51:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5DF98D33; Mon, 26 Aug 2013 18:51:49 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4B68127D4; Mon, 26 Aug 2013 18:51:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QIpna5054946; Mon, 26 Aug 2013 18:51:49 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QIpnwU054945; Mon, 26 Aug 2013 18:51:49 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201308261851.r7QIpnwU054945@svn.freebsd.org> From: John-Mark Gurney Date: Mon, 26 Aug 2013 18:51:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254931 - head/usr.bin/brandelf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 18:51:49 -0000 Author: jmg Date: Mon Aug 26 18:51:48 2013 New Revision: 254931 URL: http://svnweb.freebsd.org/changeset/base/254931 Log: fix up my copyright and remove third clause.. Modified: head/usr.bin/brandelf/brandelf.1 Modified: head/usr.bin/brandelf/brandelf.1 ============================================================================== --- head/usr.bin/brandelf/brandelf.1 Mon Aug 26 18:50:40 2013 (r254930) +++ head/usr.bin/brandelf/brandelf.1 Mon Aug 26 18:51:48 2013 (r254931) @@ -1,5 +1,4 @@ -.\" Copyright (c) 1997 -.\" John-Mark Gurney. All rights reserved. +.\" Copyright 1997 John-Mark Gurney. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -9,9 +8,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. Neither the name of the author nor the names of any co-contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY John-Mark Gurney AND CONTRIBUTORS ``AS IS'' .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 18:53:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6C3FDE84; Mon, 26 Aug 2013 18:53:20 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3FDFA27E8; Mon, 26 Aug 2013 18:53:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QIrKis055453; Mon, 26 Aug 2013 18:53:20 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QIrK7J055452; Mon, 26 Aug 2013 18:53:20 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201308261853.r7QIrK7J055452@svn.freebsd.org> From: John-Mark Gurney Date: Mon, 26 Aug 2013 18:53:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254932 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 18:53:20 -0000 Author: jmg Date: Mon Aug 26 18:53:19 2013 New Revision: 254932 URL: http://svnweb.freebsd.org/changeset/base/254932 Log: fix up some comments and a white space issue... MFC after: 3 days Modified: head/sys/kern/kern_event.c Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Mon Aug 26 18:51:48 2013 (r254931) +++ head/sys/kern/kern_event.c Mon Aug 26 18:53:19 2013 (r254932) @@ -565,7 +565,7 @@ filt_timerattach(struct knote *kn) memory_order_relaxed)); kn->kn_flags |= EV_CLEAR; /* automatically set */ - kn->kn_status &= ~KN_DETACHED; /* knlist_add usually sets it */ + kn->kn_status &= ~KN_DETACHED; /* knlist_add clears it */ calloutp = malloc(sizeof(*calloutp), M_KQUEUE, M_WAITOK); callout_init(calloutp, CALLOUT_MPSAFE); kn->kn_hook = calloutp; @@ -587,7 +587,7 @@ filt_timerdetach(struct knote *kn) free(calloutp, M_KQUEUE); old = atomic_fetch_sub_explicit(&kq_ncallouts, 1, memory_order_relaxed); KASSERT(old > 0, ("Number of callouts cannot become negative")); - kn->kn_status |= KN_DETACHED; /* knlist_remove usually clears it */ + kn->kn_status |= KN_DETACHED; /* knlist_remove sets it */ } static int @@ -1467,7 +1467,7 @@ retry: *kevp = kn->kn_kevent; KQ_LOCK(kq); KQ_GLOBAL_UNLOCK(&kq_global, haskqglobal); - if (kn->kn_flags & (EV_CLEAR | EV_DISPATCH)) { + if (kn->kn_flags & (EV_CLEAR | EV_DISPATCH)) { /* * Manually clear knotes who weren't * 'touch'ed. @@ -1859,7 +1859,7 @@ knlist_remove_kq(struct knlist *knl, str } /* - * remove all knotes from a specified klist + * remove knote from the specified knlist */ void knlist_remove(struct knlist *knl, struct knote *kn, int islocked) @@ -1869,7 +1869,7 @@ knlist_remove(struct knlist *knl, struct } /* - * remove knote from a specified klist while in f_event handler. + * remove knote from the specified knlist while in f_event handler. */ void knlist_remove_inevent(struct knlist *knl, struct knote *kn) @@ -2002,7 +2002,7 @@ knlist_destroy(struct knlist *knl) #ifdef INVARIANTS /* * if we run across this error, we need to find the offending - * driver and have it call knlist_clear. + * driver and have it call knlist_clear or knlist_delete. */ if (!SLIST_EMPTY(&knl->kl_list)) printf("WARNING: destroying knlist w/ knotes on it!\n"); From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 19:02:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AEA8A2EE; Mon, 26 Aug 2013 19:02:52 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9CB702889; Mon, 26 Aug 2013 19:02:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QJ2ql9060933; Mon, 26 Aug 2013 19:02:52 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QJ2q7G060932; Mon, 26 Aug 2013 19:02:52 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201308261902.r7QJ2q7G060932@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 26 Aug 2013 19:02:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254933 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 19:02:52 -0000 Author: np Date: Mon Aug 26 19:02:52 2013 New Revision: 254933 URL: http://svnweb.freebsd.org/changeset/base/254933 Log: Use correct mailbox and PCIe PF number when querying RDMA parameters. Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Mon Aug 26 18:53:19 2013 (r254932) +++ head/sys/dev/cxgbe/t4_main.c Mon Aug 26 19:02:52 2013 (r254933) @@ -2492,7 +2492,7 @@ get_params__post_init(struct adapter *sc param[3] = FW_PARAM_PFVF(CQ_END); param[4] = FW_PARAM_PFVF(OCQ_START); param[5] = FW_PARAM_PFVF(OCQ_END); - rc = -t4_query_params(sc, 0, 0, 0, 6, param, val); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 6, param, val); if (rc != 0) { device_printf(sc->dev, "failed to query RDMA parameters(2): %d.\n", rc); From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 19:08:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 012B0799; Mon, 26 Aug 2013 19:08:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B007F28D2; Mon, 26 Aug 2013 19:08:15 +0000 (UTC) Received: from jhbbsd.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6BEEAB939; Mon, 26 Aug 2013 15:08:14 -0400 (EDT) From: John Baldwin To: Davide Italiano Subject: Re: svn commit: r254703 - in head: share/man/man9 sys/sys Date: Mon, 26 Aug 2013 15:02:13 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <201308231412.r7NECdG7081565@svn.freebsd.org> <201308231258.50969.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201308261502.13277.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 26 Aug 2013 15:08:14 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 19:08:16 -0000 On Monday, August 26, 2013 2:33:41 pm Davide Italiano wrote: > On Fri, Aug 23, 2013 at 9:58 AM, John Baldwin wrote: > > On Friday, August 23, 2013 11:29:45 am Davide Italiano wrote: > >> On Fri, Aug 23, 2013 at 4:51 PM, John Baldwin wrote: > >> > On Friday, August 23, 2013 10:12:39 am Davide Italiano wrote: > >> >> Author: davide > >> >> Date: Fri Aug 23 14:12:39 2013 > >> >> New Revision: 254703 > >> >> URL: http://svnweb.freebsd.org/changeset/base/254703 > >> >> > >> >> Log: > >> >> Introduce callout_init_rm() so that callouts can be used in conjunction > >> >> with rmlocks. This works only with non-sleepable rm because handlers run > >> >> in SWI context. While here, document the new KPI in the timeout(9) > >> >> manpage. > >> > > >> > It also only works with exclusive locks. (lc_unlock/lc_lock only handle > >> > write locks for rmlocks). > >> > > >> > -- > >> > John Baldwin > >> > >> Thanks for pointing out this. > >> I think it would be nice to have lc_lock/lc_unlock working both for > >> shared and exclusive locks but I'm not 100% sure about all the > >> implications/complications. From what I see for rwlocks asserting if a > >> lock is held in read-mode is really cheap (check against a flag) while > >> for rmlocks the assertion relies on traversing the tracker list for > >> the rmlock so I'm worried this operation could be expensive. What's > >> your opinion about? > > > > The much bigger problem is you need an rmtracker object to pass to the > > lock/unlock routines. > > > > You could make this work hackishly in the callout case by special casing > > rm locks that use read locking and using a tracker on softclock's stack, > > but it is much harder to fix this for the rm_sleep() case where the > > sequence is lc_unlock/lc_lock. > > > > -- > > John Baldwin > > I see. I would really like to go for a clean solution if possible, and > if the timeframe for 10 doesn't allow this just revert the commit > until a better solution would be available. FWIW, I pondered a bit > about this and the only way I was able to think is that of augmenting > 'struct lock_object' with a 'void *arg' field that in this case could > be used to store a pointer to something, which in this case is a > pointer to a rmtracker object, and this could allow easily to retrieve > the needed information (as far as I see something similar is done to > store WITNESS information). This, OTOH, could be overkill just to fix > this case though. Well, I've thought about changing lc_lock/unlock to return a uintptr_t or void * instead of an int and then I could make rm_sleep work fine. However, that still doesn't solve the callout case. The callout case can't be fixed easily without explicitly allocating storage in the softclock thread itself. Also, I don't think you want a pointer in a lock_object. Imagine if two threads both locked and then slept on the same rm lock in succession while waiting for a wakeup. You would have two trackers to keep track of, but only one pointer in the lock_object. I'm not sure you need to revert your commit. It should pretty much panic instantly if someone tries to use it with a read lock instead of a write lock, even without INVARIANTS. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 20:39:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0EF70D21; Mon, 26 Aug 2013 20:39:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D7D762E91; Mon, 26 Aug 2013 20:39:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QKd2oB012092; Mon, 26 Aug 2013 20:39:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QKd2Xc012090; Mon, 26 Aug 2013 20:39:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201308262039.r7QKd2Xc012090@svn.freebsd.org> From: Alexander Motin Date: Mon, 26 Aug 2013 20:39:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254936 - head/sys/geom/zero X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 20:39:03 -0000 Author: mav Date: Mon Aug 26 20:39:02 2013 New Revision: 254936 URL: http://svnweb.freebsd.org/changeset/base/254936 Log: MFprojects/camlock r254895: Add unmapped BIO support to GEOM ZERO if kern.geom.zero.clear is cleared. Modified: head/sys/geom/zero/g_zero.c Modified: head/sys/geom/zero/g_zero.c ============================================================================== --- head/sys/geom/zero/g_zero.c Mon Aug 26 20:03:44 2013 (r254935) +++ head/sys/geom/zero/g_zero.c Mon Aug 26 20:39:02 2013 (r254936) @@ -41,16 +41,37 @@ __FBSDID("$FreeBSD$"); #define G_ZERO_CLASS_NAME "ZERO" +static int g_zero_clear_sysctl(SYSCTL_HANDLER_ARGS); + SYSCTL_DECL(_kern_geom); static SYSCTL_NODE(_kern_geom, OID_AUTO, zero, CTLFLAG_RW, 0, "GEOM_ZERO stuff"); static int g_zero_clear = 1; -SYSCTL_INT(_kern_geom_zero, OID_AUTO, clear, CTLFLAG_RW, &g_zero_clear, 0, - "Clear read data buffer"); +SYSCTL_PROC(_kern_geom_zero, OID_AUTO, clear, CTLTYPE_INT|CTLFLAG_RW, + &g_zero_clear, 0, g_zero_clear_sysctl, "I", "Clear read data buffer"); static int g_zero_byte = 0; SYSCTL_INT(_kern_geom_zero, OID_AUTO, byte, CTLFLAG_RW, &g_zero_byte, 0, "Byte (octet) value to clear the buffers with"); +static struct g_provider *gpp; + +static int +g_zero_clear_sysctl(SYSCTL_HANDLER_ARGS) +{ + int error; + + error = sysctl_handle_int(oidp, &g_zero_clear, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (gpp == NULL) + return (ENXIO); + if (g_zero_clear) + gpp->flags &= ~G_PF_ACCEPT_UNMAPPED; + else + gpp->flags |= G_PF_ACCEPT_UNMAPPED; + return (0); +} + static void g_zero_start(struct bio *bp) { @@ -58,7 +79,7 @@ g_zero_start(struct bio *bp) switch (bp->bio_cmd) { case BIO_READ: - if (g_zero_clear) + if (g_zero_clear && (bp->bio_flags & BIO_UNMAPPED) == 0) memset(bp->bio_data, g_zero_byte, bp->bio_length); /* FALLTHROUGH */ case BIO_DELETE: @@ -84,7 +105,9 @@ g_zero_init(struct g_class *mp) gp = g_new_geomf(mp, "gzero"); gp->start = g_zero_start; gp->access = g_std_access; - pp = g_new_providerf(gp, "%s", gp->name); + gpp = pp = g_new_providerf(gp, "%s", gp->name); + if (!g_zero_clear) + pp->flags |= G_PF_ACCEPT_UNMAPPED; pp->mediasize = 1152921504606846976LLU; pp->sectorsize = 512; g_error_provider(pp, 0); @@ -104,6 +127,7 @@ g_zero_destroy_geom(struct gctl_req *req return (0); if (pp->acr > 0 || pp->acw > 0 || pp->ace > 0) return (EBUSY); + gpp = NULL; g_wither_geom(gp, ENXIO); return (0); } From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 21:15:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9EB2EA3E; Mon, 26 Aug 2013 21:15:51 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 72DCF2139; Mon, 26 Aug 2013 21:15:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QLFoJ2033249; Mon, 26 Aug 2013 21:15:50 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QLFoUd033248; Mon, 26 Aug 2013 21:15:50 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <201308262115.r7QLFoUd033248@svn.freebsd.org> From: Joerg Wunsch Date: Mon, 26 Aug 2013 21:15:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254937 - head/sys/dev/fdc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 21:15:51 -0000 Author: joerg Date: Mon Aug 26 21:15:50 2013 New Revision: 254937 URL: http://svnweb.freebsd.org/changeset/base/254937 Log: Reimplement the FDOPT_NOERROR feature that was kicked out in r134081. It is needed for fdread(1) in order to be able to recover from CRC errors in the data field of a floppy sector (by returning the sector data that failed CRC, rather than inventing dummy data). When closing the device, clear all transient device options. MFC after: 1 week Modified: head/sys/dev/fdc/fdc.c Modified: head/sys/dev/fdc/fdc.c ============================================================================== --- head/sys/dev/fdc/fdc.c Mon Aug 26 20:39:02 2013 (r254936) +++ head/sys/dev/fdc/fdc.c Mon Aug 26 21:15:50 2013 (r254937) @@ -761,10 +761,13 @@ fdc_worker(struct fdc_data *fdc) int i, nsect; int st0, st3, cyl, mfm, steptrac, cylinder, descyl, sec; int head; + int override_error; static int need_recal; struct fdc_readid *idp; struct fd_formb *finfo; + override_error = 0; + /* Have we exhausted our retries ? */ bp = fdc->bp; fd = fdc->fd; @@ -1090,7 +1093,10 @@ fdc_worker(struct fdc_data *fdc) fdc->status[3], fdc->status[4], fdc->status[5]); } retry_line = __LINE__; - return (1); + if (fd->options & FDOPT_NOERROR) + override_error = 1; + else + return (1); } /* All OK */ switch(bp->bio_cmd) { @@ -1111,10 +1117,16 @@ fdc_worker(struct fdc_data *fdc) bp->bio_resid -= fd->fd_iosize; bp->bio_completed += fd->fd_iosize; fd->fd_ioptr += fd->fd_iosize; - /* Since we managed to get something done, reset the retry */ - fdc->retry = 0; - if (bp->bio_resid > 0) - return (0); + if (override_error) { + if ((debugflags & 4)) + printf("FDOPT_NOERROR: returning bad data\n"); + } else { + /* Since we managed to get something done, + * reset the retry */ + fdc->retry = 0; + if (bp->bio_resid > 0) + return (0); + } break; case BIO_FMT: break; @@ -1406,6 +1418,7 @@ fd_access(struct g_provider *pp, int r, ae = e + pp->ace; if (ar == 0 && aw == 0 && ae == 0) { + fd->options &= ~(FDOPT_NORETRY | FDOPT_NOERRLOG | FDOPT_NOERROR); device_unbusy(fd->dev); return (0); } From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 21:34:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E5DA21C7; Mon, 26 Aug 2013 21:34:44 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D10A1228D; Mon, 26 Aug 2013 21:34:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QLYil5043491; Mon, 26 Aug 2013 21:34:44 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QLYiot043484; Mon, 26 Aug 2013 21:34:44 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201308262134.r7QLYiot043484@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 26 Aug 2013 21:34:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254938 - in stable/9/sys: cam dev/mps sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 21:34:45 -0000 Author: ken Date: Mon Aug 26 21:34:43 2013 New Revision: 254938 URL: http://svnweb.freebsd.org/changeset/base/254938 Log: MFC mps(4) driver changes 253460, 253549, 253550 and 254615. There are some slight changes here from the version in head. __FreeBSD_version has been bumped to 902502 for the inclusion of the PIM_RESCAN CAM path inquiry flag. The ifdefs in the mps(4) driver have been changed accordingly. In head, the TDP_NOSLEEPING thread flag has been removed but it still exists in stable/9. ------------------------------------------------------------------------ r253460 | scottl | 2013-07-18 18:12:41 -0600 (Thu, 18 Jul 2013) | 5 lines Overhaul error, information, and debug logging. Obtained from: Netflix ------------------------------------------------------------------------ r253549 | ken | 2013-07-22 12:37:07 -0600 (Mon, 22 Jul 2013) | 57 lines CAM and mps(4) driver scanning changes. Add a PIM_NOSCAN flag to the CAM path inquiry CCB. This tells CAM not to perform a rescan on a bus when it is registered. We now use this flag in the mps(4) driver. Since it knows what devices it has attached, it is more efficient for it to just issue a target rescan on the targets that are attached. Also, remove the private rescan thread from the mps(4) driver in favor of the rescan thread already built into CAM. Without this change, but with the change above, the MPS scanner could run before or during CAM's initial setup, which would cause duplicate device reprobes and announcements. sys/param.h: Bump __FreeBSD_version to 1000039 for the inclusion of the PIM_RESCAN CAM path inquiry flag. sys/cam/cam_ccb.h: sys/cam/cam_xpt.c: Added a PIM_NOSCAN flag. If a SIM sets this in the path inquiry ccb, then CAM won't rescan the bus in xpt_bus_regsister. sys/dev/mps/mps_sas.c For versions of FreeBSD that have the PIM_NOSCAN path inquiry flag, don't freeze the sim queue during scanning, because CAM won't be scanning this bus. Instead, hold up the boot. Don't call mpssas_rescan_target in mpssas_startup_decrement; it's redundant and I don't know why it was in there. Set PIM_NOSCAN in path inquiry CCBs. Remove methods related to the internal rescan daemon. Always use async events to trigger a probe for EEDP support. In older versions of FreeBSD where AC_ADVINFO_CHANGED is not available, use AC_FOUND_DEVICE and issue the necessary READ CAPACITY manually. Provide a path to xpt_register_async() so that we only receive events for our own SCSI domain. Improve error reporting in cases where setup for EEDP detection fails. sys/dev/mps/mps_sas.h: Remove softc flags and data related to the scanner thread. sys/dev/mps/mps_sas_lsi.c: Unconditionally rescan the target whenever a device is added. Sponsored by: Spectra Logic ------------------------------------------------------------------------ r253550 | ken | 2013-07-22 12:41:53 -0600 (Mon, 22 Jul 2013) | 93 lines Merge in phase 14+ -> 16 mps driver fixes from LSI: --------------------------------------------------------------- System panics during a Port reset with ouststanding I/O --------------------------------------------------------------- It is possible to call mps_mapping_free_memory after this memory is already freed, causing a panic. Removed this extra call to mps_mappiing_free_memory and call mps_mapping_exit in place of the mps_mapping_free_memory call so that any outstanding mapping items can be flushed before memory is freed. --------------------------------------------------------------- Correct memory leak during a Port reset with ouststanding I/O --------------------------------------------------------------- In mps_reinit function, the mapping memory was not being freed before being re-allocated. Added line to call the memory free function for mapping memory. --------------------------------------------------------------- Use CAM_SIM_QUEUED flag in Driver IO path. --------------------------------------------------------------- This flag informs the XPT that successful abort of a CCB requires an abort ccb to be issued to the SIM. While processing SCSI IO's, set the CAM_SIM_QUEUED flag in the status for the IO. When the command completes, clear this flag. --------------------------------------------------------------- Check for CAM_REQ_INPROG in I/O path. --------------------------------------------------------------- Added a check in mpssas_action_scsiio for the In Progress status for the IO. If this flag is set, the IO has already been aborted by the upper layer (before CAM_SIM_QUEUED was set) and there is no need to send the IO. The request will be completed without error. --------------------------------------------------------------- Improve "doorbell handshake method" for mps_get_iocfacts --------------------------------------------------------------- Removed call to get Port Facts since this information is not used currently. Added mps_iocfacts_allocate function to allocate memory that is based on IOC Facts data. Added mps_iocfacts_free function to free memory that is based on IOC Facts data. Both of the functions are used when a Diag Reset is performed or when the driver is attached/detached. This is needed in case IOC Facts changes after a Diag Reset, which could happen if FW is upgraded. Moved call of mps_bases_static_config_pages from the attach routine to after the IOC is ready to process accesses based on the new memory allocations (instead of polling through the Doorbell). --------------------------------------------------------------- Set TimeStamp in INIT message in millisecond format Set the IOC --------------------------------------------------------------- --------------------------------------------------------------- Prefer mps_wait_command to mps_request_polled --------------------------------------------------------------- Instead of using mps_request_polled, call mps_wait_command whenever possible. Change the mps_wait_command function to check the current context and either use interrupt context or poll if required by using the pause or DELAY function. Added a check after waiting 50mSecs to see if the command has timed out. This is only done if polliing, the msleep command will automatically timeout if the command has taken too long to complete. --------------------------------------------------------------- Integrated RAID: Volume Activation Failed error message is displayed though the volume has been activated. --------------------------------------------------------------- Instead of failing an IOCTL request that does not have a large enough buffer to hold the complete reply, copy as much data from the reply as possible into the user's buffer and log a message saying that the user's buffer was smaller than the returned data. --------------------------------------------------------------- mapping_add_new_device failure due to persistent table FULL --------------------------------------------------------------- When a new device is added, if it is determined that the device persistent table is being used and is full, instead of displaying a message for this condition every time, only log a message if the MPS_INFO bit is set in the debug_flags. Submitted by: LSI ------------------------------------------------------------------------ r254615 | ken | 2013-08-21 15:30:56 -0600 (Wed, 21 Aug 2013) | 32 lines Fix mps(4) driver breakage that came in in change 253550 that manifested itself in out of chain frame conditions. When the driver ran out of chain frames, the request in question would get completed early, and go through mpssas_scsiio_complete(). In mpssas_scsiio_complete(), the negation of the CAM status values (CAM_STATUS_MASK | CAM_SIM_QUEUED) was ORed in instead of being ANDed in. This resulted in a bogus CAM CCB status value. This didn't show up in the non-error case, because the status was reset to something valid (e.g. CAM_REQ_CMP) later on in the function. But in the error case, such as when the driver ran out of chain frames, the CAM_REQUEUE_REQ status was ORed in to the bogus status value. This led to the CAM transport layer repeatedly releasing the SIM queue, because it though that the CAM_RELEASE_SIMQ flag had been set. The symptom was messages like this on the console when INVARIANTS were enabled: xpt_release_simq: requested 1 > present 0 xpt_release_simq: requested 1 > present 0 xpt_release_simq: requested 1 > present 0 mps_sas.c: In mpssas_scsiio_complete(), use &= to take status bits out. |= adds them in. In the error case in mpssas_scsiio_complete(), set the status to CAM_REQUEUE_REQ, don't OR it in. Sponsored by: Spectra Logic ------------------------------------------------------------------------ Modified: stable/9/sys/cam/cam_ccb.h stable/9/sys/cam/cam_xpt.c stable/9/sys/dev/mps/mps.c stable/9/sys/dev/mps/mps_config.c stable/9/sys/dev/mps/mps_mapping.c stable/9/sys/dev/mps/mps_pci.c stable/9/sys/dev/mps/mps_sas.c stable/9/sys/dev/mps/mps_sas.h stable/9/sys/dev/mps/mps_sas_lsi.c stable/9/sys/dev/mps/mps_table.c stable/9/sys/dev/mps/mps_user.c stable/9/sys/dev/mps/mpsvar.h stable/9/sys/sys/param.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/cam/cam_ccb.h ============================================================================== --- stable/9/sys/cam/cam_ccb.h Mon Aug 26 21:15:50 2013 (r254937) +++ stable/9/sys/cam/cam_ccb.h Mon Aug 26 21:34:43 2013 (r254938) @@ -578,6 +578,7 @@ typedef enum { PIM_NO_6_BYTE = 0x08, /* Do not send 6-byte commands */ PIM_SEQSCAN = 0x04, /* Do bus scans sequentially, not in parallel */ PIM_UNMAPPED = 0x02, + PIM_NOSCAN = 0x01 /* SIM does its own scanning */ } pi_miscflag; /* Path Inquiry CCB */ Modified: stable/9/sys/cam/cam_xpt.c ============================================================================== --- stable/9/sys/cam/cam_xpt.c Mon Aug 26 21:15:50 2013 (r254937) +++ stable/9/sys/cam/cam_xpt.c Mon Aug 26 21:34:43 2013 (r254938) @@ -4012,15 +4012,23 @@ xpt_bus_register(struct cam_sim *sim, de /* Notify interested parties */ if (sim->path_id != CAM_XPT_PATH_ID) { - union ccb *scan_ccb; xpt_async(AC_PATH_REGISTERED, path, &cpi); - /* Initiate bus rescan. */ - scan_ccb = xpt_alloc_ccb_nowait(); - scan_ccb->ccb_h.path = path; - scan_ccb->ccb_h.func_code = XPT_SCAN_BUS; - scan_ccb->crcn.flags = 0; - xpt_rescan(scan_ccb); + if ((cpi.hba_misc & PIM_NOSCAN) == 0) { + union ccb *scan_ccb; + + /* Initiate bus rescan. */ + scan_ccb = xpt_alloc_ccb_nowait(); + if (scan_ccb != NULL) { + scan_ccb->ccb_h.path = path; + scan_ccb->ccb_h.func_code = XPT_SCAN_BUS; + scan_ccb->crcn.flags = 0; + xpt_rescan(scan_ccb); + } else + xpt_print(path, + "Can't allocate CCB to scan bus\n"); + } else + xpt_free_path(path); } else xpt_free_path(path); return (CAM_SUCCESS); Modified: stable/9/sys/dev/mps/mps.c ============================================================================== --- stable/9/sys/dev/mps/mps.c Mon Aug 26 21:15:50 2013 (r254937) +++ stable/9/sys/dev/mps/mps.c Mon Aug 26 21:34:43 2013 (r254938) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -61,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include @@ -73,21 +75,29 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include static int mps_diag_reset(struct mps_softc *sc, int sleep_flag); static int mps_init_queues(struct mps_softc *sc); static int mps_message_unit_reset(struct mps_softc *sc, int sleep_flag); static int mps_transition_operational(struct mps_softc *sc); +static int mps_iocfacts_allocate(struct mps_softc *sc, uint8_t attaching); +static void mps_iocfacts_free(struct mps_softc *sc); static void mps_startup(void *arg); static int mps_send_iocinit(struct mps_softc *sc); +static int mps_alloc_queues(struct mps_softc *sc); +static int mps_alloc_replies(struct mps_softc *sc); +static int mps_alloc_requests(struct mps_softc *sc); static int mps_attach_log(struct mps_softc *sc); -static __inline void mps_complete_command(struct mps_command *cm); +static __inline void mps_complete_command(struct mps_softc *sc, + struct mps_command *cm); static void mps_dispatch_event(struct mps_softc *sc, uintptr_t data, MPI2_EVENT_NOTIFICATION_REPLY *reply); static void mps_config_complete(struct mps_softc *sc, struct mps_command *cm); static void mps_periodic(void *); static int mps_reregister_events(struct mps_softc *sc); static void mps_enqueue_request(struct mps_softc *sc, struct mps_command *cm); +static int mps_get_iocfacts(struct mps_softc *sc, MPI2_IOC_FACTS_REPLY *facts); static int mps_wait_db_ack(struct mps_softc *sc, int timeout, int sleep_flag); SYSCTL_NODE(_hw, OID_AUTO, mps, CTLFLAG_RD, 0, "MPS Driver Parameters"); @@ -148,7 +158,8 @@ mps_diag_reset(struct mps_softc *sc,int mpt2_reset_magic[i]); /* wait 100 msec */ if (mtx_owned(&sc->mps_mtx) && sleep_flag == CAN_SLEEP) - msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, "mpsdiag", hz/10); + msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, + "mpsdiag", hz/10); else if (sleep_flag == CAN_SLEEP) pause("mpsdiag", hz/10); else @@ -172,7 +183,8 @@ mps_diag_reset(struct mps_softc *sc,int for (i = 0; i < 60000; i++) { /* wait 50 msec */ if (mtx_owned(&sc->mps_mtx) && sleep_flag == CAN_SLEEP) - msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, "mpsdiag", hz/20); + msleep(&sc->msleep_fake_chan, &sc->mps_mtx, 0, + "mpsdiag", hz/20); else if (sleep_flag == CAN_SLEEP) pause("mpsdiag", hz/20); else @@ -195,7 +207,7 @@ static int mps_message_unit_reset(struct mps_softc *sc, int sleep_flag) { - mps_dprint(sc, MPS_TRACE, "%s\n", __func__); + MPS_FUNCTRACE(sc); mps_regwrite(sc, MPI2_DOORBELL_OFFSET, MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET << @@ -217,14 +229,14 @@ mps_transition_ready(struct mps_softc *s int error, tries = 0; int sleep_flags; - mps_dprint(sc, MPS_TRACE, "%s\n", __func__); + MPS_FUNCTRACE(sc); /* If we are in attach call, do not sleep */ sleep_flags = (sc->mps_flags & MPS_FLAGS_ATTACH_DONE) ? CAN_SLEEP:NO_SLEEP; error = 0; while (tries++ < 5) { reg = mps_regread(sc, MPI2_DOORBELL_OFFSET); - mps_dprint(sc, MPS_INFO, "Doorbell= 0x%x\n", reg); + mps_dprint(sc, MPS_INIT, "Doorbell= 0x%x\n", reg); /* * Ensure the IOC is ready to talk. If it's not, try @@ -250,7 +262,7 @@ mps_transition_ready(struct mps_softc *s error = 0; break; } else if (state == MPI2_IOC_STATE_FAULT) { - mps_dprint(sc, MPS_INFO, "IOC in fault state 0x%x\n", + mps_dprint(sc, MPS_FAULT, "IOC in fault state 0x%x, resetting\n", state & MPI2_DOORBELL_FAULT_CODE_MASK); mps_diag_reset(sc, sleep_flags); } else if (state == MPI2_IOC_STATE_OPERATIONAL) { @@ -283,11 +295,11 @@ mps_transition_operational(struct mps_so uint32_t reg, state; int error; - mps_dprint(sc, MPS_TRACE, "%s\n", __func__); + MPS_FUNCTRACE(sc); error = 0; reg = mps_regread(sc, MPI2_DOORBELL_OFFSET); - mps_dprint(sc, MPS_INFO, "Doorbell= 0x%x\n", reg); + mps_dprint(sc, MPS_INIT, "Doorbell= 0x%x\n", reg); state = reg & MPI2_IOC_STATE_MASK; if (state != MPI2_IOC_STATE_READY) { @@ -302,9 +314,357 @@ mps_transition_operational(struct mps_so return (error); } +/* + * This is called during attach and when re-initializing due to a Diag Reset. + * IOC Facts is used to allocate many of the structures needed by the driver. + * If called from attach, de-allocation is not required because the driver has + * not allocated any structures yet, but if called from a Diag Reset, previously + * allocated structures based on IOC Facts will need to be freed and re- + * allocated bases on the latest IOC Facts. + */ +static int +mps_iocfacts_allocate(struct mps_softc *sc, uint8_t attaching) +{ + int error, i; + Mpi2IOCFactsReply_t saved_facts; + uint8_t saved_mode, reallocating; + struct mpssas_lun *lun, *lun_tmp; + struct mpssas_target *targ; + + mps_dprint(sc, MPS_TRACE, "%s\n", __func__); + + /* Save old IOC Facts and then only reallocate if Facts have changed */ + if (!attaching) { + bcopy(sc->facts, &saved_facts, sizeof(MPI2_IOC_FACTS_REPLY)); + } + + /* + * Get IOC Facts. In all cases throughout this function, panic if doing + * a re-initialization and only return the error if attaching so the OS + * can handle it. + */ + if ((error = mps_get_iocfacts(sc, sc->facts)) != 0) { + if (attaching) { + mps_dprint(sc, MPS_FAULT, "%s failed to get IOC Facts " + "with error %d\n", __func__, error); + return (error); + } else { + panic("%s failed to get IOC Facts with error %d\n", + __func__, error); + } + } + + mps_print_iocfacts(sc, sc->facts); + + snprintf(sc->fw_version, sizeof(sc->fw_version), + "%02d.%02d.%02d.%02d", + sc->facts->FWVersion.Struct.Major, + sc->facts->FWVersion.Struct.Minor, + sc->facts->FWVersion.Struct.Unit, + sc->facts->FWVersion.Struct.Dev); + + mps_printf(sc, "Firmware: %s, Driver: %s\n", sc->fw_version, + MPS_DRIVER_VERSION); + mps_printf(sc, "IOCCapabilities: %b\n", sc->facts->IOCCapabilities, + "\20" "\3ScsiTaskFull" "\4DiagTrace" "\5SnapBuf" "\6ExtBuf" + "\7EEDP" "\10BiDirTarg" "\11Multicast" "\14TransRetry" "\15IR" + "\16EventReplay" "\17RaidAccel" "\20MSIXIndex" "\21HostDisc"); + + /* + * If the chip doesn't support event replay then a hard reset will be + * required to trigger a full discovery. Do the reset here then + * retransition to Ready. A hard reset might have already been done, + * but it doesn't hurt to do it again. Only do this if attaching, not + * for a Diag Reset. + */ + if (attaching) { + if ((sc->facts->IOCCapabilities & + MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY) == 0) { + mps_diag_reset(sc, NO_SLEEP); + if ((error = mps_transition_ready(sc)) != 0) { + mps_dprint(sc, MPS_FAULT, "%s failed to " + "transition to ready with error %d\n", + __func__, error); + return (error); + } + } + } + + /* + * Set flag if IR Firmware is loaded. If the RAID Capability has + * changed from the previous IOC Facts, log a warning, but only if + * checking this after a Diag Reset and not during attach. + */ + saved_mode = sc->ir_firmware; + if (sc->facts->IOCCapabilities & + MPI2_IOCFACTS_CAPABILITY_INTEGRATED_RAID) + sc->ir_firmware = 1; + if (!attaching) { + if (sc->ir_firmware != saved_mode) { + mps_dprint(sc, MPS_FAULT, "%s new IR/IT mode in IOC " + "Facts does not match previous mode\n", __func__); + } + } + + /* Only deallocate and reallocate if relevant IOC Facts have changed */ + reallocating = FALSE; + if ((!attaching) && + ((saved_facts.MsgVersion != sc->facts->MsgVersion) || + (saved_facts.HeaderVersion != sc->facts->HeaderVersion) || + (saved_facts.MaxChainDepth != sc->facts->MaxChainDepth) || + (saved_facts.RequestCredit != sc->facts->RequestCredit) || + (saved_facts.ProductID != sc->facts->ProductID) || + (saved_facts.IOCCapabilities != sc->facts->IOCCapabilities) || + (saved_facts.IOCRequestFrameSize != + sc->facts->IOCRequestFrameSize) || + (saved_facts.MaxTargets != sc->facts->MaxTargets) || + (saved_facts.MaxSasExpanders != sc->facts->MaxSasExpanders) || + (saved_facts.MaxEnclosures != sc->facts->MaxEnclosures) || + (saved_facts.HighPriorityCredit != sc->facts->HighPriorityCredit) || + (saved_facts.MaxReplyDescriptorPostQueueDepth != + sc->facts->MaxReplyDescriptorPostQueueDepth) || + (saved_facts.ReplyFrameSize != sc->facts->ReplyFrameSize) || + (saved_facts.MaxVolumes != sc->facts->MaxVolumes) || + (saved_facts.MaxPersistentEntries != + sc->facts->MaxPersistentEntries))) { + reallocating = TRUE; + } + + /* + * Some things should be done if attaching or re-allocating after a Diag + * Reset, but are not needed after a Diag Reset if the FW has not + * changed. + */ + if (attaching || reallocating) { + /* + * Check if controller supports FW diag buffers and set flag to + * enable each type. + */ + if (sc->facts->IOCCapabilities & + MPI2_IOCFACTS_CAPABILITY_DIAG_TRACE_BUFFER) + sc->fw_diag_buffer_list[MPI2_DIAG_BUF_TYPE_TRACE]. + enabled = TRUE; + if (sc->facts->IOCCapabilities & + MPI2_IOCFACTS_CAPABILITY_SNAPSHOT_BUFFER) + sc->fw_diag_buffer_list[MPI2_DIAG_BUF_TYPE_SNAPSHOT]. + enabled = TRUE; + if (sc->facts->IOCCapabilities & + MPI2_IOCFACTS_CAPABILITY_EXTENDED_BUFFER) + sc->fw_diag_buffer_list[MPI2_DIAG_BUF_TYPE_EXTENDED]. + enabled = TRUE; + + /* + * Set flag if EEDP is supported and if TLR is supported. + */ + if (sc->facts->IOCCapabilities & MPI2_IOCFACTS_CAPABILITY_EEDP) + sc->eedp_enabled = TRUE; + if (sc->facts->IOCCapabilities & MPI2_IOCFACTS_CAPABILITY_TLR) + sc->control_TLR = TRUE; + + /* + * Size the queues. Since the reply queues always need one free + * entry, we'll just deduct one reply message here. + */ + sc->num_reqs = MIN(MPS_REQ_FRAMES, sc->facts->RequestCredit); + sc->num_replies = MIN(MPS_REPLY_FRAMES + MPS_EVT_REPLY_FRAMES, + sc->facts->MaxReplyDescriptorPostQueueDepth) - 1; + + /* + * Initialize all Tail Queues + */ + TAILQ_INIT(&sc->req_list); + TAILQ_INIT(&sc->high_priority_req_list); + TAILQ_INIT(&sc->chain_list); + TAILQ_INIT(&sc->tm_list); + } + + /* + * If doing a Diag Reset and the FW is significantly different + * (reallocating will be set above in IOC Facts comparison), then all + * buffers based on the IOC Facts will need to be freed before they are + * reallocated. + */ + if (reallocating) { + mps_iocfacts_free(sc); + + /* + * The number of targets is based on IOC Facts, so free all of + * the allocated LUNs for each target and then the target buffer + * itself. + */ + for (i=0; i< saved_facts.MaxTargets; i++) { + targ = &sc->sassc->targets[i]; + SLIST_FOREACH_SAFE(lun, &targ->luns, lun_link, + lun_tmp) { + free(lun, M_MPT2); + } + } + free(sc->sassc->targets, M_MPT2); + + sc->sassc->targets = malloc(sizeof(struct mpssas_target) * + sc->facts->MaxTargets, M_MPT2, M_WAITOK|M_ZERO); + if (!sc->sassc->targets) { + panic("%s failed to alloc targets with error %d\n", + __func__, ENOMEM); + } + } + + /* + * Any deallocation has been completed. Now start reallocating + * if needed. Will only need to reallocate if attaching or if the new + * IOC Facts are different from the previous IOC Facts after a Diag + * Reset. Targets have already been allocated above if needed. + */ + if (attaching || reallocating) { + if (((error = mps_alloc_queues(sc)) != 0) || + ((error = mps_alloc_replies(sc)) != 0) || + ((error = mps_alloc_requests(sc)) != 0)) { + if (attaching ) { + mps_dprint(sc, MPS_FAULT, "%s failed to alloc " + "queues with error %d\n", __func__, error); + mps_free(sc); + return (error); + } else { + panic("%s failed to alloc queues with error " + "%d\n", __func__, error); + } + } + } + + /* Always initialize the queues */ + bzero(sc->free_queue, sc->fqdepth * 4); + mps_init_queues(sc); + + /* + * Always get the chip out of the reset state, but only panic if not + * attaching. If attaching and there is an error, that is handled by + * the OS. + */ + error = mps_transition_operational(sc); + if (error != 0) { + if (attaching) { + mps_printf(sc, "%s failed to transition to operational " + "with error %d\n", __func__, error); + mps_free(sc); + return (error); + } else { + panic("%s failed to transition to operational with " + "error %d\n", __func__, error); + } + } + + /* + * Finish the queue initialization. + * These are set here instead of in mps_init_queues() because the + * IOC resets these values during the state transition in + * mps_transition_operational(). The free index is set to 1 + * because the corresponding index in the IOC is set to 0, and the + * IOC treats the queues as full if both are set to the same value. + * Hence the reason that the queue can't hold all of the possible + * replies. + */ + sc->replypostindex = 0; + mps_regwrite(sc, MPI2_REPLY_FREE_HOST_INDEX_OFFSET, sc->replyfreeindex); + mps_regwrite(sc, MPI2_REPLY_POST_HOST_INDEX_OFFSET, 0); + + /* + * Attach the subsystems so they can prepare their event masks. + */ + /* XXX Should be dynamic so that IM/IR and user modules can attach */ + if (attaching) { + if (((error = mps_attach_log(sc)) != 0) || + ((error = mps_attach_sas(sc)) != 0) || + ((error = mps_attach_user(sc)) != 0)) { + mps_printf(sc, "%s failed to attach all subsystems: " + "error %d\n", __func__, error); + mps_free(sc); + return (error); + } + + if ((error = mps_pci_setup_interrupts(sc)) != 0) { + mps_printf(sc, "%s failed to setup interrupts\n", + __func__); + mps_free(sc); + return (error); + } + } + + /* + * Set flag if this is a WD controller. This shouldn't ever change, but + * reset it after a Diag Reset, just in case. + */ + sc->WD_available = FALSE; + if (pci_get_device(sc->mps_dev) == MPI2_MFGPAGE_DEVID_SSS6200) + sc->WD_available = TRUE; + + return (error); +} + +/* + * This is called if memory is being free (during detach for example) and when + * buffers need to be reallocated due to a Diag Reset. + */ +static void +mps_iocfacts_free(struct mps_softc *sc) +{ + struct mps_command *cm; + int i; + + mps_dprint(sc, MPS_TRACE, "%s\n", __func__); + + if (sc->post_busaddr != 0) + bus_dmamap_unload(sc->queues_dmat, sc->queues_map); + if (sc->post_queue != NULL) + bus_dmamem_free(sc->queues_dmat, sc->post_queue, + sc->queues_map); + if (sc->queues_dmat != NULL) + bus_dma_tag_destroy(sc->queues_dmat); + + if (sc->chain_busaddr != 0) + bus_dmamap_unload(sc->chain_dmat, sc->chain_map); + if (sc->chain_frames != NULL) + bus_dmamem_free(sc->chain_dmat, sc->chain_frames, + sc->chain_map); + if (sc->chain_dmat != NULL) + bus_dma_tag_destroy(sc->chain_dmat); + + if (sc->sense_busaddr != 0) + bus_dmamap_unload(sc->sense_dmat, sc->sense_map); + if (sc->sense_frames != NULL) + bus_dmamem_free(sc->sense_dmat, sc->sense_frames, + sc->sense_map); + if (sc->sense_dmat != NULL) + bus_dma_tag_destroy(sc->sense_dmat); + + if (sc->reply_busaddr != 0) + bus_dmamap_unload(sc->reply_dmat, sc->reply_map); + if (sc->reply_frames != NULL) + bus_dmamem_free(sc->reply_dmat, sc->reply_frames, + sc->reply_map); + if (sc->reply_dmat != NULL) + bus_dma_tag_destroy(sc->reply_dmat); + + if (sc->req_busaddr != 0) + bus_dmamap_unload(sc->req_dmat, sc->req_map); + if (sc->req_frames != NULL) + bus_dmamem_free(sc->req_dmat, sc->req_frames, sc->req_map); + if (sc->req_dmat != NULL) + bus_dma_tag_destroy(sc->req_dmat); + + if (sc->chains != NULL) + free(sc->chains, M_MPT2); + if (sc->commands != NULL) { + for (i = 1; i < sc->num_reqs; i++) { + cm = &sc->commands[i]; + bus_dmamap_destroy(sc->buffer_dmat, cm->cm_dmamap); + } + free(sc->commands, M_MPT2); + } + if (sc->buffer_dmat != NULL) + bus_dma_tag_destroy(sc->buffer_dmat); +} + /* - * XXX Some of this should probably move to mps.c - * * The terms diag reset and hard reset are used interchangeably in the MPI * docs to mean resetting the controller chip. In this code diag reset * cleans everything up, and the hard reset function just sends the reset @@ -316,27 +676,32 @@ int mps_reinit(struct mps_softc *sc) { int error; - uint32_t db; - mps_printf(sc, "%s sc %p\n", __func__, sc); + MPS_FUNCTRACE(sc); mtx_assert(&sc->mps_mtx, MA_OWNED); if (sc->mps_flags & MPS_FLAGS_DIAGRESET) { - mps_printf(sc, "%s reset already in progress\n", __func__); + mps_dprint(sc, MPS_INIT, "%s reset already in progress\n", + __func__); return 0; } + mps_dprint(sc, MPS_INFO, "Reinitializing controller,\n"); /* make sure the completion callbacks can recognize they're getting * a NULL cm_reply due to a reset. */ sc->mps_flags |= MPS_FLAGS_DIAGRESET; - mps_printf(sc, "%s mask interrupts\n", __func__); + /* + * Mask interrupts here. + */ + mps_dprint(sc, MPS_INIT, "%s mask interrupts\n", __func__); mps_mask_intr(sc); error = mps_diag_reset(sc, CAN_SLEEP); if (error != 0) { + /* XXXSL No need to panic here */ panic("%s hard reset failed with error %d\n", __func__, error); } @@ -347,48 +712,49 @@ mps_reinit(struct mps_softc *sc) /* Give the I/O subsystem special priority to get itself prepared */ mpssas_handle_reinit(sc); - /* reinitialize queues after the reset */ - bzero(sc->free_queue, sc->fqdepth * 4); - mps_init_queues(sc); - - /* get the chip out of the reset state */ - error = mps_transition_operational(sc); - if (error != 0) - panic("%s transition operational failed with error %d\n", + /* + * Get IOC Facts and allocate all structures based on this information. + * The attach function will also call mps_iocfacts_allocate at startup. + * If relevant values have changed in IOC Facts, this function will free + * all of the memory based on IOC Facts and reallocate that memory. + */ + if ((error = mps_iocfacts_allocate(sc, FALSE)) != 0) { + panic("%s IOC Facts based allocation failed with error %d\n", __func__, error); + } - /* Reinitialize the reply queue. This is delicate because this - * function is typically invoked by task mgmt completion callbacks, - * which are called by the interrupt thread. We need to make sure - * the interrupt handler loop will exit when we return to it, and - * that it will recognize the indexes we've changed. + /* + * Mapping structures will be re-allocated after getting IOC Page8, so + * free these structures here. */ - sc->replypostindex = 0; - mps_regwrite(sc, MPI2_REPLY_FREE_HOST_INDEX_OFFSET, sc->replyfreeindex); - mps_regwrite(sc, MPI2_REPLY_POST_HOST_INDEX_OFFSET, sc->replypostindex); - - db = mps_regread(sc, MPI2_DOORBELL_OFFSET); - mps_printf(sc, "%s doorbell 0x%08x\n", __func__, db); - - mps_printf(sc, "%s unmask interrupts post %u free %u\n", __func__, - sc->replypostindex, sc->replyfreeindex); + mps_mapping_exit(sc); + /* + * The static page function currently read is IOC Page8. Others can be + * added in future. It's possible that the values in IOC Page8 have + * changed after a Diag Reset due to user modification, so always read + * these. Interrupts are masked, so unmask them before getting config + * pages. + */ mps_unmask_intr(sc); + sc->mps_flags &= ~MPS_FLAGS_DIAGRESET; + mps_base_static_config_pages(sc); - mps_printf(sc, "%s restarting post %u free %u\n", __func__, - sc->replypostindex, sc->replyfreeindex); + /* + * Some mapping info is based in IOC Page8 data, so re-initialize the + * mapping tables. + */ + mps_mapping_initialize(sc); - /* restart will reload the event masks clobbered by the reset, and + /* + * Restart will reload the event masks clobbered by the reset, and * then enable the port. */ mps_reregister_events(sc); /* the end of discovery will release the simq, so we're done. */ - mps_printf(sc, "%s finished sc %p post %u free %u\n", - __func__, sc, - sc->replypostindex, sc->replyfreeindex); - - sc->mps_flags &= ~MPS_FLAGS_DIAGRESET; + mps_dprint(sc, MPS_INFO, "%s finished sc %p post %u free %u\n", + __func__, sc, sc->replypostindex, sc->replyfreeindex); return 0; } @@ -411,7 +777,7 @@ mps_wait_db_ack(struct mps_softc *sc, in do { int_status = mps_regread(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET); if (!(int_status & MPI2_HIS_SYS2IOC_DB_STATUS)) { - mps_dprint(sc, MPS_INFO, + mps_dprint(sc, MPS_INIT, "%s: successfull count(%d), timeout(%d)\n", __func__, count, timeout); return 0; @@ -546,7 +912,7 @@ mps_request_sync(struct mps_softc *sc, v count = MIN((reply_sz / 4), ioc_sz) * 2; if (count < ioc_sz * 2) { residual = ioc_sz * 2 - count; - mps_dprint(sc, MPS_FAULT, "Driver error, throwing away %d " + mps_dprint(sc, MPS_ERROR, "Driver error, throwing away %d " "residual message words\n", residual); } @@ -592,7 +958,8 @@ static void mps_enqueue_request(struct mps_softc *sc, struct mps_command *cm) { reply_descriptor rd; - mps_dprint(sc, MPS_TRACE, "%s SMID %u cm %p ccb %p\n", __func__, + MPS_FUNCTRACE(sc); + mps_dprint(sc, MPS_TRACE, "SMID %u cm %p ccb %p\n", cm->cm_desc.Default.SMID, cm, cm->cm_ccb); if (sc->mps_flags & MPS_FLAGS_ATTACH_DONE && !(sc->mps_flags & MPS_FLAGS_SHUTDOWN)) @@ -620,7 +987,7 @@ mps_get_iocfacts(struct mps_softc *sc, M MPI2_IOC_FACTS_REQUEST request; int error, req_sz, reply_sz; - mps_dprint(sc, MPS_TRACE, "%s\n", __func__); + MPS_FUNCTRACE(sc); req_sz = sizeof(MPI2_IOC_FACTS_REQUEST); reply_sz = sizeof(MPI2_IOC_FACTS_REPLY); @@ -634,50 +1001,15 @@ mps_get_iocfacts(struct mps_softc *sc, M } static int -mps_get_portfacts(struct mps_softc *sc, MPI2_PORT_FACTS_REPLY *facts, int port) -{ - MPI2_PORT_FACTS_REQUEST *request; - MPI2_PORT_FACTS_REPLY *reply; - struct mps_command *cm; - int error; - - mps_dprint(sc, MPS_TRACE, "%s\n", __func__); - - if ((cm = mps_alloc_command(sc)) == NULL) - return (EBUSY); - request = (MPI2_PORT_FACTS_REQUEST *)cm->cm_req; - request->Function = MPI2_FUNCTION_PORT_FACTS; - request->PortNumber = port; - cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; - cm->cm_data = NULL; - error = mps_request_polled(sc, cm); - reply = (MPI2_PORT_FACTS_REPLY *)cm->cm_reply; - if (reply == NULL) { - mps_printf(sc, "%s NULL reply\n", __func__); - goto done; - } - if ((reply->IOCStatus & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) { - mps_printf(sc, - "%s error %d iocstatus 0x%x iocloginfo 0x%x type 0x%x\n", - __func__, error, reply->IOCStatus, reply->IOCLogInfo, - reply->PortType); - error = ENXIO; - } - bcopy(reply, facts, sizeof(MPI2_PORT_FACTS_REPLY)); -done: - mps_free_command(sc, cm); - - return (error); -} - -static int mps_send_iocinit(struct mps_softc *sc) { MPI2_IOC_INIT_REQUEST init; MPI2_DEFAULT_REPLY reply; int req_sz, reply_sz, error; + struct timeval now; + uint64_t time_in_msec; - mps_dprint(sc, MPS_TRACE, "%s\n", __func__); + MPS_FUNCTRACE(sc); req_sz = sizeof(MPI2_IOC_INIT_REQUEST); reply_sz = sizeof(MPI2_IOC_INIT_REPLY); @@ -704,14 +1036,16 @@ mps_send_iocinit(struct mps_softc *sc) init.ReplyDescriptorPostQueueAddress.Low = htole32((uint32_t)sc->post_busaddr); init.ReplyFreeQueueAddress.High = 0; init.ReplyFreeQueueAddress.Low = htole32((uint32_t)sc->free_busaddr); - init.TimeStamp.High = 0; - init.TimeStamp.Low = htole32((uint32_t)time_uptime); + getmicrotime(&now); + time_in_msec = (now.tv_sec * 1000 + now.tv_usec/1000); + init.TimeStamp.High = htole32((time_in_msec >> 32) & 0xFFFFFFFF); + init.TimeStamp.Low = htole32(time_in_msec & 0xFFFFFFFF); error = mps_request_sync(sc, &init, &reply, req_sz, reply_sz, 5); if ((reply.IOCStatus & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) error = ENXIO; - mps_dprint(sc, MPS_INFO, "IOCInit status= 0x%x\n", reply.IOCStatus); + mps_dprint(sc, MPS_INIT, "IOCInit status= 0x%x\n", reply.IOCStatus); return (error); } @@ -1008,7 +1342,7 @@ mps_get_tunables(struct mps_softc *sc) char tmpstr[80]; /* XXX default to some debugging for now */ - sc->mps_debug = MPS_FAULT; + sc->mps_debug = MPS_INFO|MPS_FAULT; sc->disable_msix = 0; sc->disable_msi = 0; sc->max_chains = MPS_CHAIN_FRAMES; @@ -1119,11 +1453,11 @@ mps_setup_sysctl(struct mps_softc *sc) int mps_attach(struct mps_softc *sc) { - int i, error; + int error; mps_get_tunables(sc); - mps_dprint(sc, MPS_TRACE, "%s\n", __func__); + MPS_FUNCTRACE(sc); mtx_init(&sc->mps_mtx, "MPT2SAS lock", NULL, MTX_DEF); callout_init_mtx(&sc->periodic, &sc->mps_mtx, 0); @@ -1141,151 +1475,20 @@ mps_attach(struct mps_softc *sc) __func__, __LINE__); return (ENOMEM); } - if ((error = mps_get_iocfacts(sc, sc->facts)) != 0) - return (error); - - mps_print_iocfacts(sc, sc->facts); - - snprintf(sc->fw_version, sizeof(sc->fw_version), - "%02d.%02d.%02d.%02d", - sc->facts->FWVersion.Struct.Major, - sc->facts->FWVersion.Struct.Minor, - sc->facts->FWVersion.Struct.Unit, - sc->facts->FWVersion.Struct.Dev); - - mps_printf(sc, "Firmware: %s, Driver: %s\n", sc->fw_version, - MPS_DRIVER_VERSION); - mps_printf(sc, "IOCCapabilities: %b\n", sc->facts->IOCCapabilities, - "\20" "\3ScsiTaskFull" "\4DiagTrace" "\5SnapBuf" "\6ExtBuf" - "\7EEDP" "\10BiDirTarg" "\11Multicast" "\14TransRetry" "\15IR" - "\16EventReplay" "\17RaidAccel" "\20MSIXIndex" "\21HostDisc"); - - /* - * If the chip doesn't support event replay then a hard reset will be - * required to trigger a full discovery. Do the reset here then - * retransition to Ready. A hard reset might have already been done, - * but it doesn't hurt to do it again. - */ - if ((sc->facts->IOCCapabilities & - MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY) == 0) { - mps_diag_reset(sc, NO_SLEEP); - if ((error = mps_transition_ready(sc)) != 0) - return (error); - } - - /* - * Set flag if IR Firmware is loaded. - */ - if (sc->facts->IOCCapabilities & - MPI2_IOCFACTS_CAPABILITY_INTEGRATED_RAID) - sc->ir_firmware = 1; /* - * Check if controller supports FW diag buffers and set flag to enable - * each type. - */ - if (sc->facts->IOCCapabilities & - MPI2_IOCFACTS_CAPABILITY_DIAG_TRACE_BUFFER) - sc->fw_diag_buffer_list[MPI2_DIAG_BUF_TYPE_TRACE].enabled = - TRUE; - if (sc->facts->IOCCapabilities & - MPI2_IOCFACTS_CAPABILITY_SNAPSHOT_BUFFER) - sc->fw_diag_buffer_list[MPI2_DIAG_BUF_TYPE_SNAPSHOT].enabled = - TRUE; - if (sc->facts->IOCCapabilities & - MPI2_IOCFACTS_CAPABILITY_EXTENDED_BUFFER) - sc->fw_diag_buffer_list[MPI2_DIAG_BUF_TYPE_EXTENDED].enabled = - TRUE; - - /* - * Set flag if EEDP is supported and if TLR is supported. - */ - if (sc->facts->IOCCapabilities & MPI2_IOCFACTS_CAPABILITY_EEDP) - sc->eedp_enabled = TRUE; - if (sc->facts->IOCCapabilities & MPI2_IOCFACTS_CAPABILITY_TLR) - sc->control_TLR = TRUE; - - /* - * Size the queues. Since the reply queues always need one free entry, - * we'll just deduct one reply message here. - */ - sc->num_reqs = MIN(MPS_REQ_FRAMES, sc->facts->RequestCredit); - sc->num_replies = MIN(MPS_REPLY_FRAMES + MPS_EVT_REPLY_FRAMES, - sc->facts->MaxReplyDescriptorPostQueueDepth) - 1; - TAILQ_INIT(&sc->req_list); - TAILQ_INIT(&sc->high_priority_req_list); - TAILQ_INIT(&sc->chain_list); - TAILQ_INIT(&sc->tm_list); - - if (((error = mps_alloc_queues(sc)) != 0) || - ((error = mps_alloc_replies(sc)) != 0) || - ((error = mps_alloc_requests(sc)) != 0)) { - mps_printf(sc, "%s failed to alloc\n", __func__); - mps_free(sc); - return (error); - } - - if (((error = mps_init_queues(sc)) != 0) || - ((error = mps_transition_operational(sc)) != 0)) { - mps_printf(sc, "%s failed to transition operational\n", __func__); - mps_free(sc); + * Get IOC Facts and allocate all structures based on this information. + * A Diag Reset will also call mps_iocfacts_allocate and re-read the IOC + * Facts. If relevant values have changed in IOC Facts, this function + * will free all of the memory based on IOC Facts and reallocate that + * memory. If this fails, any allocated memory should already be freed. + */ + if ((error = mps_iocfacts_allocate(sc, TRUE)) != 0) { + mps_dprint(sc, MPS_FAULT, "%s IOC Facts based allocation " + "failed with error %d\n", __func__, error); return (error); } - /* - * Finish the queue initialization. - * These are set here instead of in mps_init_queues() because the - * IOC resets these values during the state transition in - * mps_transition_operational(). The free index is set to 1 - * because the corresponding index in the IOC is set to 0, and the - * IOC treats the queues as full if both are set to the same value. - * Hence the reason that the queue can't hold all of the possible - * replies. - */ - sc->replypostindex = 0; - mps_regwrite(sc, MPI2_REPLY_FREE_HOST_INDEX_OFFSET, sc->replyfreeindex); - mps_regwrite(sc, MPI2_REPLY_POST_HOST_INDEX_OFFSET, 0); - - sc->pfacts = malloc(sizeof(MPI2_PORT_FACTS_REPLY) * - sc->facts->NumberOfPorts, M_MPT2, M_ZERO|M_WAITOK); - if(!sc->pfacts) { - device_printf(sc->mps_dev, "Cannot allocate memory %s %d\n", - __func__, __LINE__); - return (ENOMEM); - } - for (i = 0; i < sc->facts->NumberOfPorts; i++) { - if ((error = mps_get_portfacts(sc, &sc->pfacts[i], i)) != 0) { - mps_printf(sc, "%s failed to get portfacts for port %d\n", - __func__, i); - mps_free(sc); - return (error); - } - mps_print_portfacts(sc, &sc->pfacts[i]); - } - - /* Attach the subsystems so they can prepare their event masks. */ - /* XXX Should be dynamic so that IM/IR and user modules can attach */ - if (((error = mps_attach_log(sc)) != 0) || - ((error = mps_attach_sas(sc)) != 0) || - ((error = mps_attach_user(sc)) != 0)) { - mps_printf(sc, "%s failed to attach all subsystems: error %d\n", - __func__, error); - mps_free(sc); - return (error); - } - - if ((error = mps_pci_setup_interrupts(sc)) != 0) { - mps_printf(sc, "%s failed to setup interrupts\n", __func__); - mps_free(sc); - return (error); - } - - /* - * The static page function currently read is ioc page8. Others can be - * added in future. - */ - mps_base_static_config_pages(sc); - /* Start the periodic watchdog check on the IOC Doorbell */ mps_periodic(sc); @@ -1297,7 +1500,7 @@ mps_attach(struct mps_softc *sc) sc->mps_ich.ich_func = mps_startup; sc->mps_ich.ich_arg = sc; if (config_intrhook_establish(&sc->mps_ich) != 0) { - mps_dprint(sc, MPS_FAULT, "Cannot establish MPS config hook\n"); + mps_dprint(sc, MPS_ERROR, "Cannot establish MPS config hook\n"); error = EINVAL; } @@ -1308,7 +1511,7 @@ mps_attach(struct mps_softc *sc) mpssas_ir_shutdown, sc, SHUTDOWN_PRI_DEFAULT); if (sc->shutdown_eh == NULL) - mps_dprint(sc, MPS_FAULT, "shutdown event registration " + mps_dprint(sc, MPS_ERROR, "shutdown event registration " "failed\n"); mps_setup_sysctl(sc); @@ -1328,7 +1531,9 @@ mps_startup(void *arg) mps_lock(sc); mps_unmask_intr(sc); + /* initialize device mapping tables */ + mps_base_static_config_pages(sc); mps_mapping_initialize(sc); mpssas_startup(sc); mps_unlock(sc); @@ -1347,8 +1552,7 @@ mps_periodic(void *arg) db = mps_regread(sc, MPI2_DOORBELL_OFFSET); if ((db & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_FAULT) { - device_printf(sc->mps_dev, "IOC Fault 0x%08x, Resetting\n", db); - + mps_dprint(sc, MPS_FAULT, "IOC Fault 0x%08x, Resetting\n", db); mps_reinit(sc); } @@ -1365,12 +1569,13 @@ mps_log_evt_handler(struct mps_softc *sc switch (event->Event) { case MPI2_EVENT_LOG_DATA: - device_printf(sc->mps_dev, "MPI2_EVENT_LOG_DATA:\n"); - hexdump(event->EventData, event->EventDataLength, NULL, 0); + mps_dprint(sc, MPS_EVENT, "MPI2_EVENT_LOG_DATA:\n"); + if (sc->mps_debug & MPS_EVENT) + hexdump(event->EventData, event->EventDataLength, NULL, 0); break; case MPI2_EVENT_LOG_ENTRY_ADDED: entry = (MPI2_EVENT_DATA_LOG_ENTRY_ADDED *)event->EventData; - mps_dprint(sc, MPS_INFO, "MPI2_EVENT_LOG_ENTRY_ADDED event " + mps_dprint(sc, MPS_EVENT, "MPI2_EVENT_LOG_ENTRY_ADDED event " "0x%x Sequence %d:\n", entry->LogEntryQualifier, entry->LogSequence); break; @@ -1411,8 +1616,7 @@ mps_detach_log(struct mps_softc *sc) int mps_free(struct mps_softc *sc) { - struct mps_command *cm; - int i, error; + int error; /* Turn off the watchdog */ mps_lock(sc); @@ -1438,62 +1642,15 @@ mps_free(struct mps_softc *sc) if (sc->facts != NULL) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 21:40:36 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D7947416; Mon, 26 Aug 2013 21:40:36 +0000 (UTC) (envelope-from ken@kdm.org) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9E3B322FD; Mon, 26 Aug 2013 21:40:36 +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 r7QLeS32066771; Mon, 26 Aug 2013 15:40:28 -0600 (MDT) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.14.2/8.14.2/Submit) id r7QLeS4R066770; Mon, 26 Aug 2013 15:40:28 -0600 (MDT) (envelope-from ken) Date: Mon, 26 Aug 2013 15:40:27 -0600 From: "Kenneth D. Merry" To: Slawa Olhovchenkov Subject: Re: svn commit: r253550 - head/sys/dev/mps Message-ID: <20130826214027.GA66112@nargothrond.kdm.org> References: <201307221841.r6MIfsoQ075667@svn.freebsd.org> <20130810181454.GA47115@zxy.spb.ru> <20130812155647.GA11414@nargothrond.kdm.org> <20130812174545.GA3796@zxy.spb.ru> <20130812190229.GA24478@nargothrond.kdm.org> <20130813153029.GD3796@zxy.spb.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130813153029.GD3796@zxy.spb.ru> 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 21:40:36 -0000 On Tue, Aug 13, 2013 at 19:30:29 +0400, Slawa Olhovchenkov wrote: > On Mon, Aug 12, 2013 at 01:02:29PM -0600, Kenneth D. Merry wrote: > > > If you really want one now, I've attached a patch from stable/9 on June > > 27th. It may or may not apply now. > > Its apply witch litle edit. > > > > > Now that it's done, I hope to merge that change to stable/9 this week. > > > > > > Also, I see strange behaviour of LSI 9211-8i -- after some activity > > > got timeout and HBA put in looped reset. > > > > That's not good. Try with the newer driver and see whether if affects the > > behavior. > > Witch this driver I got same behavior: after intesive i/o got timeout, > driver try re-init controller without success. On all HDD activity LED > ON w/o blinking at this moment. Do you have any logs or dmesg output showing the problem? I have merged the latest driver changes to stable/9, including a bug fix for out of chain frame handling. Ken -- Kenneth Merry ken@FreeBSD.ORG From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 22:23:22 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D9AD8E36; Mon, 26 Aug 2013 22:23:22 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id 944E0255E; Mon, 26 Aug 2013 22:23:22 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1VE5Dy-000GEi-Ev; Tue, 27 Aug 2013 02:25:26 +0400 Date: Tue, 27 Aug 2013 02:25:26 +0400 From: Slawa Olhovchenkov To: "Kenneth D. Merry" Subject: Re: svn commit: r253550 - head/sys/dev/mps Message-ID: <20130826222526.GR3796@zxy.spb.ru> References: <201307221841.r6MIfsoQ075667@svn.freebsd.org> <20130810181454.GA47115@zxy.spb.ru> <20130812155647.GA11414@nargothrond.kdm.org> <20130812174545.GA3796@zxy.spb.ru> <20130812190229.GA24478@nargothrond.kdm.org> <20130813153029.GD3796@zxy.spb.ru> <20130826214027.GA66112@nargothrond.kdm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130826214027.GA66112@nargothrond.kdm.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 22:23:22 -0000 On Mon, Aug 26, 2013 at 03:40:27PM -0600, Kenneth D. Merry wrote: > On Tue, Aug 13, 2013 at 19:30:29 +0400, Slawa Olhovchenkov wrote: > > On Mon, Aug 12, 2013 at 01:02:29PM -0600, Kenneth D. Merry wrote: > > > > > If you really want one now, I've attached a patch from stable/9 on June > > > 27th. It may or may not apply now. > > > > Its apply witch litle edit. > > > > > > > Now that it's done, I hope to merge that change to stable/9 this week. > > > > > > > > Also, I see strange behaviour of LSI 9211-8i -- after some activity > > > > got timeout and HBA put in looped reset. > > > > > > That's not good. Try with the newer driver and see whether if affects the > > > behavior. > > > > Witch this driver I got same behavior: after intesive i/o got timeout, > > driver try re-init controller without success. On all HDD activity LED > > ON w/o blinking at this moment. > > Do you have any logs or dmesg output showing the problem? Currenly not awailable, but simmilar as here http://lists.freebsd.org/pipermail/freebsd-current/2013-May/041943.html or here http://forums.freebsd.org/showthread.php?t=28252. At the time of problem -- no any messages in the log or concole, just stopping all operations. After some time (aprox 30-60 seconds) -- circular messages about timeout, reset and massive 'SCSI command timeout'. > I have merged the latest driver changes to stable/9, including a bug fix > for out of chain frame handling. Now I can't test anymore -- controller replaced to asr. From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 22:25:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 91697F94; Mon, 26 Aug 2013 22:25:56 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6FA0F2577; Mon, 26 Aug 2013 22:25:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QMPus6071979; Mon, 26 Aug 2013 22:25:56 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QMPtrX071975; Mon, 26 Aug 2013 22:25:55 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201308262225.r7QMPtrX071975@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Mon, 26 Aug 2013 22:25:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254939 - in vendor/ldns-host: . dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 22:25:56 -0000 Author: des Date: Mon Aug 26 22:25:55 2013 New Revision: 254939 URL: http://svnweb.freebsd.org/changeset/base/254939 Log: Import an LDNS-based implementation of host(1). Added: vendor/ldns-host/ vendor/ldns-host/README (contents, props changed) vendor/ldns-host/dist/ vendor/ldns-host/dist/Makefile (contents, props changed) vendor/ldns-host/dist/ldns-host.1 (contents, props changed) vendor/ldns-host/dist/ldns-host.c (contents, props changed) Added: vendor/ldns-host/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ldns-host/README Mon Aug 26 22:25:55 2013 (r254939) @@ -0,0 +1,13 @@ +This is an LDNS-based implementation of host(1) by Magerya Vitaly: + + http://tx97.net/ldns-host/ + +Use devel/mercurial to pull the latest sources: + +% hg clone http://hg.tx97.net/ldns-host + +Use the following command to generate the tag: + +% hg log --template "hg-{date(date|localdate, '%Y%m%d-%H%M%S')}\n" | head -1 + +$FreeBSD$ Added: vendor/ldns-host/dist/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ldns-host/dist/Makefile Mon Aug 26 22:25:55 2013 (r254939) @@ -0,0 +1,23 @@ +PROG=ldns-host +SRC=ldns-host.c +MAN=ldns-host.1 + +LOCALBASE?=/usr/local +PREFIX?=${LOCALBASE} +MANDIR?=${PREFIX}/man + +XCFLAGS=${CFLAGS} -I${LOCALBASE}/include +XLDFLAGS=${LDFLAGS} -L${LOCALBASE}/lib -lldns + +${PROG}: ${SRC} + ${CC} -o $@ ${XCFLAGS} ${XLDFLAGS} ${SRC} + +clean: + rm -f ${PROG} + +install: ${PROG} + cp ${PROG} ${PREFIX}/bin/ + cp ${MAN} ${MANDIR}/man1/ + +deinstall: + rm -f ${PREFIX}/bin/${PROG} ${MANDIR}/man1/${MAN} Added: vendor/ldns-host/dist/ldns-host.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ldns-host/dist/ldns-host.1 Mon Aug 26 22:25:55 2013 (r254939) @@ -0,0 +1,246 @@ +.\" (c) Magerya Vitaly +.\" +.\" Copying and distribution of this file, with or without modification, +.\" are permitted in any medium without royalty provided the copyright +.\" notice and this notice are preserved. This file is offered as-is, +.\" without any warranty. +.Dd Aug 27, 2012 +.Dt LDNS-HOST 1 +.Os +.Sh NAME +.Nm ldns-host +.Nd DNS lookup utility +.Sh SYNOPSIS +.Nm +.Op Fl aCdilrsTvw46 +.Op Fl c Ar class +.Op Fl N Ar ndots +.Op Fl R Ar number +.Op Fl t Ar type +.Op Fl W Ar wait +.Ar name +.Op Ar server +.Sh DESCRIPTION +.Nm +is a simple utility for performing DNS lookups. It is normally +used to convert names to IP addresses and vice versa. +.Pp +.Ar name +is the domain name that is to be looked up. It can also be a +dotted-decimal IPv4 address or a colon-delimited IPv6 address, +in which case +.Nm +will by default perform a reverse lookup for that address. +.Pp +When +.Ar name +is not provided, +.Nm +prints a short summary of it's usage. +.Pp +.Ar server +is an optional argument which is either a domain name or an IP +address of the name server that +.Nm +should query instead of the server or servers listed in +.Pa /etc/resolv.conf . +When +.Ar server +is a domain name, system resolver is used to obtain it's address. +.Pp +Supported options: +.Bl -tag -width indent +.It Fl a +Make a verbose query of type +.Cm ANY . +Equivalent to +.Fl v Fl t Cm ANY . +.It Fl C +Query for +.Cm SOA +records for zone +.Ar name +from all of it's authoritative name servers. The list of name +servers is obtained via +.Cm NS +query for +.Ar name . +.It Fl c Ar class +Perform DNS query of class +.Ar class . +Recognized classes are +.Cm IN Pq Internet , +.Cm CH Pq Chaosnet , +.Cm HS Pq Hesiod , +.Cm NONE , +.Cm ANY +and +.Cm CLASS Ns Ar N +(where +.Ar N +is a number from 1 to 255). Default is +.Cm IN . +.It Fl d +Produce verbose output. This is a synonym for +.Fl v , +and is provided for backward compatibility. +.It Fl i +Use IP6.INT domain for reverse lookups of IPv6 addresses (as +defined in RFC1886; note that RFC4159 deprecates IP6.INT). +By default IP6.ARPA is used. +.It Fl l +List all +.Cm NS, PTR, A +and +.Cm AAAA +records in zone +.Ar name +by performing a zone transfer +.Pq Cm AXFR . +You can combine this option with +.Fl a +to print all records, or with +.Fl t +to only print specific ones. +.It Fl N Ar ndots +Consider names with at least this many dots as absolute. That +is, try to resolve them directly before consulting +.Ic domain +or +.Ic search +options from +.Pa /etc/resolv.conf . +.It Fl r +Perform non-recursive query to the name server by clearing RD +.Pq Dq recursion desired +bit of the query. +.It Fl R Ar number +Retry this many times when a query does not receive an answer +in time. The default is 1 retry. If +.Ar number +is negative or zero, 1 is used instead. +.It Fl s +Report SERVFAIL responses as they are, do not ignore them. +.It Fl T +Query name server over TCP. By default UDP is used, except for +.Cm AXFR +and +.Cm IXFR +queries, which require TCP. +.Nm +will also retry UDP queries in TCP mode if the UDP response was +truncated (i.e. had TC bit set). +.It Fl t Ar type +Perform DNS query of type +.Ar type , +which can be any standard query type name +.Pq Cm A , CNAME , MX , TXT , No etc , +a wildcard query +.Pq Cm ANY , +or +.Cm TYPE Ns Ar N , +where +.Ar N +is a number from 1 to 65535. For +.Cm IXFR Pq incremental zone transfer +queries the starting serial number can be specified by appending +an equal sign followed by the number +.Pq e.g. Fl t Cm IXFR Ns =12345678 . +.Pp +The default is to query for +.Cm A , AAAA , No and Cm MX +records, unless +.Fl C +or +.Fl l +options are given (in which case +.Cm SOA +or +.Cm AXFR +queries are made) or +.Ar name +is a valid IP address +(in which case reverse lookup using +.Cm PTR +query is performed). +.It Fl v +Produce verbose output. +.It Fl w +Wait forever (or for a very long time) for response from the +name server. +.It Fl W Ar wait +Wait this many seconds for a reply from name server before timing +out. If +.Ar wait +is negative or zero, value of 1 is used. The default is to wait +10 seconds for TCP connections, and 5 seconds for UDP (both are +subject to retries, see option +.Fl R ) . +.It Fl 4 +Only use IPv4 transport. +.It Fl 6 +Only use IPv6 transport. +.El +.Sh FILES +.Pa /etc/resolv.conf +.Sh SEE ALSO +.Xr drill 1 , +.Xr resolv.conf 5 +.Sh COMPATIBILITY +.Nm +aims to be reasonably compatible with +.Sq host +utility from BIND9 distribution, both in supported options and +in produced output. Here is a list of known notable differences: +.Bl -bullet +.It +Debugging options +.Pq Fl D No and Fl m +are not supported. +.It +Query class +.Cm CLASS0 +and type +.Cm TYPE0 +are not supported. +.It +Backslashes in domain names are treated especially. +.It +The maximum of 255 retries (option +.Fl R ) +are supported. +.It +Some resource records are formatted differently. For example, +.Cm RRSIG +and +.Cm DNSKEY +records are displayed without spaces in them. +.It +When parsing +.Pa /etc/resolv.conf +commands +.Ic sortlist +and +.Ic options +are ignored. When multiple +.Ic search +and/or +.Ic domain +commands are present, +.Nm +first uses the last +.Ic domain +command, and then all of +.Ic search +commands, while +.Sq host +from BIND9 uses whatever command was specified last. +.It +Multi-packet zone transfers are not supported; only the first +response packet is printed. +.It +.Sq Pseudosection TSIG +is missing from verbose packet output. +.El +.Sh AUTHORS +.An Vitaly Magerya Aq magv@tx97.net Added: vendor/ldns-host/dist/ldns-host.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ldns-host/dist/ldns-host.c Mon Aug 26 22:25:55 2013 (r254939) @@ -0,0 +1,881 @@ +/*- + * (c) Magerya Vitaly + * + * Copying and distribution of this file, with or without modification, + * are permitted in any medium without royalty provided the copyright + * notice and this notice are preserved. This file is offered as-is, + * without any warranty. + */ + +#include +#include +#include +#include +#include +#include + +/* General utilities. + */ + +static char *progname; + +#define countof(array) (sizeof(array)/sizeof(*(array))) + +static void +die(int code, const char *fmt, ...) { + va_list args; + + va_start(args, fmt); + fprintf(stderr, "%s: ", progname); + vfprintf(stderr, fmt, args); + fprintf(stderr, "\n"); + va_end(args); + exit(code); +} + +static int +ndots(const char *name) { + int n; + + for (n = 0; (name = strchr(name, '.')); n++, name++); + return n; +} + +/* General LDNS-specific utilities. + */ + +static ldns_status +ldns_resolver_new_default(ldns_resolver **res) { + if (ldns_resolver_new_frm_file(res, NULL) == LDNS_STATUS_OK || + (*res = ldns_resolver_new()) != NULL) + return LDNS_STATUS_OK; + return LDNS_STATUS_MEM_ERR; +} + +static ldns_status +ldns_resolver_push_default_servers(ldns_resolver *res) { + ldns_status status; + ldns_rdf *addr; + + if ((status = ldns_str2rdf_a(&addr, "127.0.0.1")) != LDNS_STATUS_OK || + (status = ldns_resolver_push_nameserver(res, addr)) != LDNS_STATUS_OK) + return ldns_rdf_deep_free(addr), status; + ldns_rdf_deep_free(addr); + if ((status = ldns_str2rdf_aaaa(&addr, "::1")) != LDNS_STATUS_OK || + (status = ldns_resolver_push_nameserver(res, addr)) != LDNS_STATUS_OK) + return ldns_rdf_deep_free(addr), status; + ldns_rdf_deep_free(addr); + return LDNS_STATUS_OK; +} + +static ldns_rdf * +ldns_rdf_new_addr_frm_str(const char *str) { + ldns_rdf *addr; + + if ((addr = ldns_rdf_new_frm_str(LDNS_RDF_TYPE_A, str)) == NULL) + addr = ldns_rdf_new_frm_str(LDNS_RDF_TYPE_AAAA, str); + return addr; +} + +static void +ldns_resolver_remove_nameservers(ldns_resolver *res) { + while (ldns_resolver_nameserver_count(res) > 0) + ldns_rdf_deep_free(ldns_resolver_pop_nameserver(res)); +} + +static ldns_rdf * +ldns_rdf_reverse_a(ldns_rdf *addr, const char *base) { + char *buf; + int i, len; + + len = strlen(base); + buf = alloca(LDNS_IP4ADDRLEN*4 + len + 1); + for (len = i = 0; i < LDNS_IP4ADDRLEN; i++) + len += sprintf(&buf[len], "%d.", + (int)ldns_rdf_data(addr)[LDNS_IP4ADDRLEN - i - 1]); + sprintf(&buf[len], "%s", base); + return ldns_dname_new_frm_str(buf); +} + +static ldns_rdf * +ldns_rdf_reverse_aaaa(ldns_rdf *addr, const char *base) { + char *buf; + int i, len; + + len = strlen(base); + buf = alloca(LDNS_IP6ADDRLEN*4 + len + 1); + for (i = 0; i < LDNS_IP6ADDRLEN; i++) { + uint8_t byte = ldns_rdf_data(addr)[LDNS_IP6ADDRLEN - i - 1]; + sprintf(&buf[i*4], "%x.%x.", byte & 0x0F, byte >> 4); + } + sprintf(&buf[LDNS_IP6ADDRLEN*4], "%s", base); + return ldns_dname_new_frm_str(buf); +} + +static ldns_status +ldns_pkt_push_rr_soa(ldns_pkt *pkt, ldns_pkt_section sec, + const ldns_rdf *name, ldns_rr_class c, uint32_t serial) { + ldns_rdf *rdf; + ldns_rr *rr; + uint32_t n; + + if ((rr = ldns_rr_new_frm_type(LDNS_RR_TYPE_SOA)) == NULL) + return LDNS_STATUS_MEM_ERR; + ldns_rr_set_class(rr, c); + ldns_rr_set_owner(rr, ldns_rdf_clone(name)); + ldns_rr_set_ttl(rr, 0); + + n = 0; + if ((rdf = ldns_rdf_new_frm_data(LDNS_RDF_TYPE_DNAME, 1, &n)) == NULL) + goto memerr; + ldns_rr_set_rdf(rr, rdf, 0); + ldns_rr_set_rdf(rr, ldns_rdf_clone(rdf), 1); + + n = htonl(serial); + if ((rdf = ldns_rdf_new_frm_data(LDNS_RDF_TYPE_INT32, 4, &n)) == NULL) + goto memerr; + ldns_rr_set_rdf(rr, rdf, 2); + + n = 0; + if ((rdf = ldns_rdf_new_frm_data(LDNS_RDF_TYPE_PERIOD, 4, &n)) == NULL) + goto memerr; + ldns_rr_set_rdf(rr, rdf, 3); + ldns_rr_set_rdf(rr, ldns_rdf_clone(rdf), 4); + ldns_rr_set_rdf(rr, ldns_rdf_clone(rdf), 5); + ldns_rr_set_rdf(rr, ldns_rdf_clone(rdf), 6); + + if (ldns_rr_rdf(rr, 1) == NULL || ldns_rr_rdf(rr, 4) == NULL || + ldns_rr_rdf(rr, 5) == NULL || ldns_rr_rdf(rr, 6) == NULL || + !ldns_pkt_push_rr(pkt, sec, rr)) + goto memerr; + return LDNS_STATUS_OK; + +memerr: + ldns_rr_free(rr); + return LDNS_STATUS_MEM_ERR; +} + +static ldns_status +ldns_resolver_send_to(ldns_pkt **answer, ldns_resolver *res, + const ldns_rdf *name, ldns_rr_type t, ldns_rr_class c, + uint16_t flags, uint32_t ixfr_serial, int nameserver) { + ldns_status status; + ldns_pkt *qpkt; + + int nscnt = ldns_resolver_nameserver_count(res); + ldns_rdf **ns = ldns_resolver_nameservers(res); + size_t *rtt = ldns_resolver_rtt(res); + + ldns_resolver_set_nameservers(res, &ns[nameserver]); + ldns_resolver_set_rtt(res, &rtt[nameserver]); + ldns_resolver_set_nameserver_count(res, 1); + + status = ldns_resolver_prepare_query_pkt(&qpkt, res, name, t, c, flags); + if (status == LDNS_STATUS_OK && t == LDNS_RR_TYPE_IXFR) + status = ldns_pkt_push_rr_soa(qpkt, + LDNS_SECTION_AUTHORITY, name, c, ixfr_serial); + if (status == LDNS_STATUS_OK) + status = ldns_resolver_send_pkt(answer, res, qpkt); + ldns_pkt_free(qpkt); + + ldns_resolver_set_nameservers(res, ns); + ldns_resolver_set_rtt(res, rtt); + ldns_resolver_set_nameserver_count(res, nscnt); + return status; +} + +static void +ldns_pkt_filter_answer(ldns_pkt *pkt, ldns_rr_type type) { + int i, j, cnt; + ldns_rr_list *rrlist; + ldns_rr *rr; + ldns_rr_type rrtype; + + rrlist = ldns_pkt_answer(pkt); + cnt = ldns_rr_list_rr_count(rrlist); + for (i = j = 0; i < cnt; i++) { + rr = ldns_rr_list_rr(rrlist, i); + rrtype = ldns_rr_get_type(rr); + if (type == LDNS_RR_TYPE_ANY || + type == rrtype || + type == LDNS_RR_TYPE_AXFR && + (rrtype == LDNS_RR_TYPE_A || + rrtype == LDNS_RR_TYPE_AAAA || + rrtype == LDNS_RR_TYPE_NS || + rrtype == LDNS_RR_TYPE_PTR)) + ldns_rr_list_set_rr(rrlist, rr, j++); + } + ldns_rr_list_set_rr_count(rrlist, j); +} + +/* Packet content printing. + */ + +static struct { + ldns_rr_type type; + const char *text; +} rr_types[] = { + {LDNS_RR_TYPE_A, "has address"}, + {LDNS_RR_TYPE_NS, "name server"}, + {LDNS_RR_TYPE_CNAME, "is an alias for"}, + {LDNS_RR_TYPE_WKS, "has well known services"}, + {LDNS_RR_TYPE_PTR, "domain name pointer"}, + {LDNS_RR_TYPE_HINFO, "host information"}, + {LDNS_RR_TYPE_MX, "mail is handled by"}, + {LDNS_RR_TYPE_TXT, "descriptive text"}, + {LDNS_RR_TYPE_X25, "x25 address"}, + {LDNS_RR_TYPE_ISDN, "ISDN address"}, + {LDNS_RR_TYPE_SIG, "has signature"}, + {LDNS_RR_TYPE_KEY, "has key"}, + {LDNS_RR_TYPE_AAAA, "has IPv6 address"}, + {LDNS_RR_TYPE_LOC, "location"}, +}; + +static void +print_opcode(ldns_pkt_opcode opcode) { + ldns_lookup_table *lt = ldns_lookup_by_id(ldns_opcodes, opcode); + + if (lt && lt->name) + printf("%s", lt->name); + else + printf("RESERVED%d", opcode); +} + +static void +print_rcode(uint8_t rcode) { + ldns_lookup_table *lt = ldns_lookup_by_id(ldns_rcodes, rcode); + + if (lt && lt->name) + printf("%s", lt->name); + else + printf("RESERVED%d", rcode); +} + +static int +print_rr_type(ldns_rr_type type) { + char *str; + int n; + + str = ldns_rr_type2str(type); + n = printf("%s", str); + free(str); + return n; +} + +static int +print_rr_class(ldns_rr_class cls) { + char *str; + int n; + + str = ldns_rr_class2str(cls); + n = printf("%s", str); + free(str); + return n; +} + +static int +print_rdf(ldns_rdf *rdf) { + char *str; + int n; + + str = ldns_rdf2str(rdf); + n = printf("%s", str); + free(str); + return n; +} + +static int +print_rdf_nodot(ldns_rdf *rdf) { + char *str; + int len, n; + + str = ldns_rdf2str(rdf); + len = strlen(str); + n = printf("%.*s", str[len-1] == '.' ? len-1 : len, str); + free(str); + return n; +} + +static int +print_padding(int fromcol, int tocol) { + int col = fromcol, nextcol = fromcol + 8 - fromcol%8; + + if (fromcol + 1 > tocol) tocol = fromcol + 1; + for (; nextcol <= tocol; col = nextcol, nextcol += 8) + printf("\t"); + for (; col < tocol; col++) + printf(" "); + return col - fromcol; +} + +static void +print_rr_verbose(ldns_rr *rr) { + bool isq = ldns_rr_is_question(rr); + int rdcnt = ldns_rr_rd_count(rr); + int i, n; + + /* bind9-host does not count the initial ';' here */ + n = isq ? printf(";") : 0; + n = print_rdf(ldns_rr_owner(rr)); + if (!isq) { + n += print_padding(n, 24); + n += printf("%d", ldns_rr_ttl(rr)); + } + n += print_padding(n, 32); + n += print_rr_class(ldns_rr_get_class(rr)); + n += print_padding(n, 40); + n += print_rr_type(ldns_rr_get_type(rr)); + for (i = 0; i < rdcnt; i++) { + if (i == 0) print_padding(n, 48); + else printf(" "); + print_rdf(ldns_rr_rdf(rr, i)); + } + printf("\n"); +} + +static void +print_pkt_section_verbose(const char *name, ldns_rr_list *rrlist) { + int i, cnt = ldns_rr_list_rr_count(rrlist); + + if (cnt == 0) + return; + printf(";; %s SECTION:\n", name); + for (i = 0; i < cnt; i++) + print_rr_verbose(ldns_rr_list_rr(rrlist, i)); + printf("\n"); +} + +static void +print_pkt_verbose(ldns_pkt *pkt) { + int got_flags = 0; + + printf(";; ->>HEADER<<- opcode: "); + print_opcode(ldns_pkt_get_opcode(pkt)); + printf(", status: "); + print_rcode(ldns_pkt_get_rcode(pkt)); + printf(", id: %u\n", ldns_pkt_id(pkt)); + printf(";; flags:"); + if (ldns_pkt_qr(pkt)) printf(" qr"), got_flags = 1; + if (ldns_pkt_aa(pkt)) printf(" aa"), got_flags = 1; + if (ldns_pkt_tc(pkt)) printf(" tc"), got_flags = 1; + if (ldns_pkt_rd(pkt)) printf(" rd"), got_flags = 1; + if (ldns_pkt_ra(pkt)) printf(" ra"), got_flags = 1; + if (ldns_pkt_ad(pkt)) printf(" ad"), got_flags = 1; + if (ldns_pkt_cd(pkt)) printf(" cd"), got_flags = 1; + if (!got_flags) printf(" "); + printf("; QUERY: %u, ANSWER: %u, AUTHORITY: %u, ADDITIONAL: %u\n", + ldns_pkt_qdcount(pkt), ldns_pkt_ancount(pkt), + ldns_pkt_nscount(pkt), ldns_pkt_arcount(pkt)); + if (ldns_pkt_edns(pkt)) + printf(";; EDNS: version: %u, udp=%u\n", + ldns_pkt_edns_version(pkt), ldns_pkt_edns_udp_size(pkt)); + printf("\n"); + print_pkt_section_verbose("QUESTION", ldns_pkt_question(pkt)); + print_pkt_section_verbose("ANSWER", ldns_pkt_answer(pkt)); + print_pkt_section_verbose("AUTHORITY", ldns_pkt_authority(pkt)); + print_pkt_section_verbose("ADDITIONAL", ldns_pkt_additional(pkt)); +} + +static void +print_rr_short(ldns_rr *rr) { + ldns_rr_type type = ldns_rr_get_type(rr); + size_t i, rdcnt = ldns_rr_rd_count(rr); + + print_rdf_nodot(ldns_rr_owner(rr)); + printf(" "); + for (i = 0; i < countof(rr_types); i++) { + if (rr_types[i].type == type) { + printf("%s", rr_types[i].text); + goto found; + } + } + + printf("has "); + print_rr_type(type); + printf(" record"); + +found: + for (i = 0; i < rdcnt; i++) { + printf(" "); + print_rdf(ldns_rr_rdf(rr, i)); + } + printf("\n"); +} + +static void +print_pkt_short(ldns_pkt *pkt, bool print_rr_server) { + ldns_rr_list *rrlist = ldns_pkt_answer(pkt); + size_t i; + + for (i = 0; i < ldns_rr_list_rr_count(rrlist); i++) { + if (print_rr_server) { + printf("Nameserver "); + print_rdf(ldns_pkt_answerfrom(pkt)); + printf(":\n\t"); + } + print_rr_short(ldns_rr_list_rr(rrlist, i)); + } +} + +static void +print_received_line(ldns_resolver *res, ldns_pkt *pkt) { + char *from = ldns_rdf2str(ldns_pkt_answerfrom(pkt)); + + printf("Received %zu bytes from %s#%d in %d ms\n", + ldns_pkt_size(pkt), from, ldns_resolver_port(res), + ldns_pkt_querytime(pkt)); + free(from); +} + +/* Main program. + * + * Note that no memory is freed below this line by intention. + */ + +#define DEFAULT_TCP_TIMEOUT 10 +#define DEFAULT_UDP_TIMEOUT 5 + +enum operation_mode { M_AXFR, M_DEFAULT_Q, M_SINGLE_Q, M_SOA }; + +static enum operation_mode o_mode = M_DEFAULT_Q; +static bool o_ignore_servfail = true; +static bool o_ip6_int = false; +static bool o_print_pkt_server = false; +static bool o_print_rr_server = false; +static bool o_recursive = true; +static bool o_tcp = false; +static bool o_verbose = false; +static char *o_name = NULL; +static char *o_server = NULL; +static int o_ipversion = LDNS_RESOLV_INETANY; +static int o_ndots = 1; +static int o_retries = 1; +static ldns_rr_class o_rrclass = LDNS_RR_CLASS_IN; +static ldns_rr_type o_rrtype = LDNS_RR_TYPE_A; +static time_t o_timeout = 0; +static uint32_t o_ixfr_serial = 0; + +static void +usage(void) { + fputs( + "Usage: ldns-host [-aCdilrsTvw46] [-c class] [-N ndots] [-R number]\n" + " [-t type] [-W wait] name [server]\n" + "\t-a same as -v -t ANY\n" + "\t-C query SOA records from all authoritative name servers\n" + "\t-c use this query class (IN, CH, HS, etc)\n" + "\t-d produce verbose output, same as -v\n" + "\t-i use IP6.INT for IPv6 reverse lookups\n" + "\t-l list records in a zone via AXFR\n" + "\t-N consider names with at least this many dots as absolute\n" + "\t-R retry UDP queries this many times\n" + "\t-r disable recursive query\n" + "\t-s do not ignore SERVFAIL responses\n" + "\t-T send query via TCP\n" + "\t-t use this query type (A, AAAA, MX, etc)\n" + "\t-v produce verbose output\n" + "\t-w wait forever for a server reply\n" + "\t-W wait this many seconds for a reply\n" + "\t-4 use IPv4 only\n" + "\t-6 use IPv6 only\n", + stderr); + exit(1); +} + +static void +parse_args(int argc, char *argv[]) { + int ch; + + progname = argv[0]; + while ((ch = getopt(argc, argv, "aCdilrsTvw46c:N:R:t:W:")) != -1) { + switch (ch) { + case 'a': + if (o_mode != M_AXFR) + o_mode = M_SINGLE_Q; + o_rrtype = LDNS_RR_TYPE_ANY; + o_verbose = true; + break; + case 'C': + o_mode = M_SOA; + o_print_rr_server = true; + o_rrclass = LDNS_RR_CLASS_IN; + o_rrtype = LDNS_RR_TYPE_NS; + break; + case 'c': + /* bind9-host sets o_mode to M_SINGLE_Q here */ + o_rrclass = ldns_get_rr_class_by_name(optarg); + if (o_rrclass <= 0) + die(2, "invalid class: %s\n", optarg); + break; + case 'd': o_verbose = true; break; + case 'i': o_ip6_int = true; break; + case 'l': + o_mode = M_AXFR; + o_rrtype = LDNS_RR_TYPE_AXFR; + o_tcp = true; + break; + case 'N': + o_ndots = atoi(optarg); + if (o_ndots < 0) o_ndots = 0; + break; + case 'n': + /* bind9-host accepts and ignores this option */ + break; + case 'r': o_recursive = 0; break; + case 'R': + o_retries = atoi(optarg); + if (o_retries <= 0) o_retries = 1; + if (o_retries > 255) o_retries = 255; + break; + case 's': o_ignore_servfail = false; break; + case 'T': o_tcp = true; break; + case 't': + if (o_mode != M_AXFR) + o_mode = M_SINGLE_Q; + if (strncasecmp(optarg, "ixfr=", 5) == 0) { + o_rrtype = LDNS_RR_TYPE_IXFR; + o_ixfr_serial = atol(optarg + 5); + } else { + o_rrtype = ldns_get_rr_type_by_name(optarg); + if (o_rrtype <= 0) + die(2, "invalid type: %s\n", optarg); + } + if (o_rrtype == LDNS_RR_TYPE_AXFR || o_rrtype == LDNS_RR_TYPE_IXFR) + o_tcp = true; + if (o_rrtype == LDNS_RR_TYPE_AXFR) { + o_mode = M_AXFR; + o_rrtype = LDNS_RR_TYPE_ANY; + o_verbose = true; + } + break; + case 'v': o_verbose = true; break; + case 'w': + o_timeout = (time_t)INT_MAX; + break; + case 'W': + o_timeout = atol(optarg); + if (o_timeout <= 0) o_timeout = 1; + break; + case '4': o_ipversion = LDNS_RESOLV_INET; break; + case '6': o_ipversion = LDNS_RESOLV_INET6; break; + default: + usage(); + } + } + argc -= optind; + argv += optind; + /* bind9-host ignores arguments after the 2-nd one */ + if (argc < 1) + usage(); + o_name = argv[0]; + if (argc > 1) { + o_server = argv[1]; + o_print_pkt_server = true; + } +} + +static ldns_rdf* +safe_str2rdf_dname(const char *name) { + ldns_rdf *dname; + ldns_status status; + + if ((status = ldns_str2rdf_dname(&dname, name)) != LDNS_STATUS_OK) { + die(1, "'%s' is not a legal name (%s)", + name, ldns_get_errorstr_by_id(status)); + } + return dname; +} + +static ldns_rdf* +safe_dname_cat_clone(const ldns_rdf *rd1, const ldns_rdf *rd2) { + ldns_rdf *result = ldns_dname_cat_clone(rd1, rd2); + + if (!result) + die(1, "not enought memory for a domain name"); + /* Why doesn't ldns_dname_cat_clone check this condition? */ + if (ldns_rdf_size(result) > LDNS_MAX_DOMAINLEN) + die(1, "'%s' is not a legal name (%s)\n", ldns_rdf2str(result), + ldns_get_errorstr_by_id(LDNS_STATUS_DOMAINNAME_OVERFLOW)); + return result; +} + +static bool +query(ldns_resolver *res, ldns_rdf *domain, ldns_pkt **pkt) { + ldns_status status; + ldns_pkt_rcode rcode; + int i, cnt; + + if (o_verbose) { + printf("Trying \""); + print_rdf_nodot(domain); + printf("\"\n"); + } + for (cnt = ldns_resolver_nameserver_count(res), i = 0; i < cnt; i++) { + status = ldns_resolver_send_to(pkt, res, domain, o_rrtype, + o_rrclass, o_recursive ? LDNS_RD : 0, o_ixfr_serial, i); + if (status != LDNS_STATUS_OK) { + *pkt = NULL; + continue; + } + if (ldns_pkt_tc(*pkt) && !ldns_resolver_usevc(res)) { + if (o_verbose) + printf(";; Truncated, retrying in TCP mode.\n"); + ldns_resolver_set_usevc(res, true); + status = ldns_resolver_send_to(pkt, res, domain, o_rrtype, + o_rrclass, o_recursive ? LDNS_RD : 0, o_ixfr_serial, i); + ldns_resolver_set_usevc(res, false); + if (status != LDNS_STATUS_OK) + continue; + } + rcode = ldns_pkt_get_rcode(*pkt); + if (o_ignore_servfail && rcode == LDNS_RCODE_SERVFAIL && cnt > 1) + continue; + return rcode == LDNS_RCODE_NOERROR; + } + if (*pkt == NULL) { + printf(";; connection timed out; no servers could be reached\n"); + exit(1); + } + return false; +} + +static ldns_rdf * +search(ldns_resolver *res, ldns_rdf *domain, ldns_pkt **pkt, bool absolute) { + ldns_rdf *dname, **searchlist; + int i, n; + + if (absolute && query(res, domain, pkt)) + return domain; + + if ((dname = ldns_resolver_domain(res)) != NULL) { + dname = safe_dname_cat_clone(domain, dname); + if (query(res, dname, pkt)) + return dname; + } + + searchlist = ldns_resolver_searchlist(res); + n = ldns_resolver_searchlist_count(res); + for (i = 0; i < n; i++) { + dname = safe_dname_cat_clone(domain, searchlist[i]); + if (query(res, dname, pkt)) + return dname; + } + + if (!absolute && query(res, domain, pkt)) + return domain; + + return NULL; +} + +static void +report(ldns_resolver *res, ldns_rdf *domain, ldns_pkt *pkt) { + ldns_pkt_rcode rcode; + + if (o_print_pkt_server) { + printf("Using domain server:\nName: %s\nAddress: ", o_server); + print_rdf(ldns_pkt_answerfrom(pkt)); + printf("#%d\nAliases: \n\n", ldns_resolver_port(res)); + o_print_pkt_server = false; + } + rcode = ldns_pkt_get_rcode(pkt); + if (rcode != LDNS_RCODE_NOERROR) { + printf("Host "); + print_rdf_nodot(domain); + printf(" not found: %d(", rcode); + print_rcode(rcode); + printf(")\n"); + } else { + if (o_verbose) { + print_pkt_verbose(pkt); + } else { + print_pkt_short(pkt, o_print_rr_server); + if (o_mode != M_DEFAULT_Q && + ldns_rr_list_rr_count(ldns_pkt_answer(pkt)) == 0) { + print_rdf_nodot(domain); + printf(" has no "); + print_rr_type(o_rrtype); + printf(" record\n"); + } + } + } + if (o_verbose) + print_received_line(res, pkt); +} + +static bool +doquery(ldns_resolver *res, ldns_rdf *domain) { + ldns_pkt *pkt; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 22:29:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E9A0731B; Mon, 26 Aug 2013 22:29:22 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BD82025D1; Mon, 26 Aug 2013 22:29:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QMTMXO073218; Mon, 26 Aug 2013 22:29:22 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QMTMwj073217; Mon, 26 Aug 2013 22:29:22 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201308262229.r7QMTMwj073217@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Mon, 26 Aug 2013 22:29:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254940 - vendor/ldns-host/hg-20120826-233833 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 22:29:23 -0000 Author: des Date: Mon Aug 26 22:29:22 2013 New Revision: 254940 URL: http://svnweb.freebsd.org/changeset/base/254940 Log: Tag hg-20120826-233833 Added: vendor/ldns-host/hg-20120826-233833/ - copied from r254939, vendor/ldns-host/dist/ From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 22:29:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A236243F; Mon, 26 Aug 2013 22:29:42 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8F7D125D7; Mon, 26 Aug 2013 22:29:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QMTgfJ073283; Mon, 26 Aug 2013 22:29:42 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QMTgwD073282; Mon, 26 Aug 2013 22:29:42 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201308262229.r7QMTgwD073282@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 26 Aug 2013 22:29:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254941 - head/cddl/contrib/opensolaris/tools/ctf/cvt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 22:29:42 -0000 Author: pfg Date: Mon Aug 26 22:29:42 2013 New Revision: 254941 URL: http://svnweb.freebsd.org/changeset/base/254941 Log: Merge various CTF fixes from illumos 2942 CTF tools need to handle files which legitimately lack data 2978 ctfconvert still needs to ignore legitimately dataless files on SPARC Illumos Revisions: 13745:6b3106b4250f 13754:7231b684c18b Reference: https://www.illumos.org/issues/2942 https://www.illumos.org/issues/2978 MFC after: 3 weeks Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c ============================================================================== --- head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Mon Aug 26 22:29:22 2013 (r254940) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Mon Aug 26 22:29:42 2013 (r254941) @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * DWARF to tdata conversion * @@ -1796,6 +1794,59 @@ die_resolve(dwarf_t *dw) } while (dw->dw_nunres != 0); } +/* + * Any object containing a function or object symbol at any scope should also + * contain DWARF data. + */ +static boolean_t +should_have_dwarf(Elf *elf) +{ + Elf_Scn *scn = NULL; + Elf_Data *data = NULL; + GElf_Shdr shdr; + GElf_Sym sym; + uint32_t symdx = 0; + size_t nsyms = 0; + boolean_t found = B_FALSE; + + while ((scn = elf_nextscn(elf, scn)) != NULL) { + gelf_getshdr(scn, &shdr); + + if (shdr.sh_type == SHT_SYMTAB) { + found = B_TRUE; + break; + } + } + + if (!found) + terminate("cannot convert stripped objects\n"); + + data = elf_getdata(scn, NULL); + nsyms = shdr.sh_size / shdr.sh_entsize; + + for (symdx = 0; symdx < nsyms; symdx++) { + gelf_getsym(data, symdx, &sym); + + if ((GELF_ST_TYPE(sym.st_info) == STT_FUNC) || + (GELF_ST_TYPE(sym.st_info) == STT_TLS) || + (GELF_ST_TYPE(sym.st_info) == STT_OBJECT)) { + char *name; + + name = elf_strptr(elf, shdr.sh_link, sym.st_name); + + /* Studio emits these local symbols regardless */ + if ((strcmp(name, "Bbss.bss") != 0) && + (strcmp(name, "Ttbss.bss") != 0) && + (strcmp(name, "Ddata.data") != 0) && + (strcmp(name, "Ttdata.data") != 0) && + (strcmp(name, "Drodata.rodata") != 0)) + return (B_TRUE); + } + } + + return (B_FALSE); +} + /*ARGSUSED*/ int dw_read(tdata_t *td, Elf *elf, char *filename __unused) @@ -1820,8 +1871,12 @@ dw_read(tdata_t *td, Elf *elf, char *fil if ((rc = dwarf_elf_init(elf, DW_DLC_READ, &dw.dw_dw, &dw.dw_err)) == DW_DLV_NO_ENTRY) { - errno = ENOENT; - return (-1); + if (should_have_dwarf(elf)) { + errno = ENOENT; + return (-1); + } else { + return (0); + } } else if (rc != DW_DLV_OK) { if (dwarf_errno(&dw.dw_err) == DW_DLE_DEBUG_INFO_NULL) { /* @@ -1839,9 +1894,14 @@ dw_read(tdata_t *td, Elf *elf, char *fil &addrsz, &nxthdr, &dw.dw_err)) != DW_DLV_OK) terminate("rc = %d %s\n", rc, dwarf_errmsg(&dw.dw_err)); - if ((cu = die_sibling(&dw, NULL)) == NULL) + if ((cu = die_sibling(&dw, NULL)) == NULL || + (((child = die_child(&dw, cu)) == NULL) && + should_have_dwarf(elf))) { terminate("file does not contain dwarf type data " "(try compiling with -g)\n"); + } else if (child == NULL) { + return (0); + } dw.dw_maxoff = nxthdr - 1; From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 22:43:38 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 488CA76F; Mon, 26 Aug 2013 22:43:38 +0000 (UTC) (envelope-from ken@kdm.org) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E2BCC2683; Mon, 26 Aug 2013 22:43:37 +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 r7QMhaQP070890; Mon, 26 Aug 2013 16:43:36 -0600 (MDT) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.14.2/8.14.2/Submit) id r7QMhZUL070889; Mon, 26 Aug 2013 16:43:35 -0600 (MDT) (envelope-from ken) Date: Mon, 26 Aug 2013 16:43:35 -0600 From: "Kenneth D. Merry" To: Slawa Olhovchenkov Subject: Re: svn commit: r253550 - head/sys/dev/mps Message-ID: <20130826224335.GA68809@nargothrond.kdm.org> References: <201307221841.r6MIfsoQ075667@svn.freebsd.org> <20130810181454.GA47115@zxy.spb.ru> <20130812155647.GA11414@nargothrond.kdm.org> <20130812174545.GA3796@zxy.spb.ru> <20130812190229.GA24478@nargothrond.kdm.org> <20130813153029.GD3796@zxy.spb.ru> <20130826214027.GA66112@nargothrond.kdm.org> <20130826222526.GR3796@zxy.spb.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130826222526.GR3796@zxy.spb.ru> 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 22:43:38 -0000 On Tue, Aug 27, 2013 at 02:25:26 +0400, Slawa Olhovchenkov wrote: > On Mon, Aug 26, 2013 at 03:40:27PM -0600, Kenneth D. Merry wrote: > > > On Tue, Aug 13, 2013 at 19:30:29 +0400, Slawa Olhovchenkov wrote: > > > On Mon, Aug 12, 2013 at 01:02:29PM -0600, Kenneth D. Merry wrote: > > > > > > > If you really want one now, I've attached a patch from stable/9 on June > > > > 27th. It may or may not apply now. > > > > > > Its apply witch litle edit. > > > > > > > > > Now that it's done, I hope to merge that change to stable/9 this week. > > > > > > > > > > Also, I see strange behaviour of LSI 9211-8i -- after some activity > > > > > got timeout and HBA put in looped reset. > > > > > > > > That's not good. Try with the newer driver and see whether if affects the > > > > behavior. > > > > > > Witch this driver I got same behavior: after intesive i/o got timeout, > > > driver try re-init controller without success. On all HDD activity LED > > > ON w/o blinking at this moment. > > > > Do you have any logs or dmesg output showing the problem? > > Currenly not awailable, but simmilar as here > http://lists.freebsd.org/pipermail/freebsd-current/2013-May/041943.html That one is relatively recent, but all it shows is timeouts. There are lots of potential causes. Without dmesg output, we don't know what firmware version he's running, and that could be an issue. As can SATA drives behind an expander. > or here http://forums.freebsd.org/showthread.php?t=28252. This one shows lots of IOC terminated errors, but it looks like his problem was solved by upgrading his SSD firmware. > At the time of problem -- no any messages in the log or concole, just > stopping all operations. After some time (aprox 30-60 seconds) -- > circular messages about timeout, reset and massive 'SCSI command > timeout'. What was your topology? i.e. mps(4) controller connected directly to the drives, or via an expander? SAS or SATA drives? > > I have merged the latest driver changes to stable/9, including a bug fix > > for out of chain frame handling. > > Now I can't test anymore -- controller replaced to asr. An asr(4) controller? Ken -- Kenneth Merry ken@FreeBSD.ORG From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 22:53:36 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 08881964; Mon, 26 Aug 2013 22:53:36 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id B54DC26FC; Mon, 26 Aug 2013 22:53:35 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1VE5hF-000GNe-Ek; Tue, 27 Aug 2013 02:55:41 +0400 Date: Tue, 27 Aug 2013 02:55:41 +0400 From: Slawa Olhovchenkov To: "Kenneth D. Merry" Subject: Re: svn commit: r253550 - head/sys/dev/mps Message-ID: <20130826225541.GT3796@zxy.spb.ru> References: <201307221841.r6MIfsoQ075667@svn.freebsd.org> <20130810181454.GA47115@zxy.spb.ru> <20130812155647.GA11414@nargothrond.kdm.org> <20130812174545.GA3796@zxy.spb.ru> <20130812190229.GA24478@nargothrond.kdm.org> <20130813153029.GD3796@zxy.spb.ru> <20130826214027.GA66112@nargothrond.kdm.org> <20130826222526.GR3796@zxy.spb.ru> <20130826224335.GA68809@nargothrond.kdm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130826224335.GA68809@nargothrond.kdm.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 22:53:36 -0000 On Mon, Aug 26, 2013 at 04:43:35PM -0600, Kenneth D. Merry wrote: > On Tue, Aug 27, 2013 at 02:25:26 +0400, Slawa Olhovchenkov wrote: > > On Mon, Aug 26, 2013 at 03:40:27PM -0600, Kenneth D. Merry wrote: > > > > > On Tue, Aug 13, 2013 at 19:30:29 +0400, Slawa Olhovchenkov wrote: > > > > On Mon, Aug 12, 2013 at 01:02:29PM -0600, Kenneth D. Merry wrote: > > > > > > > > > If you really want one now, I've attached a patch from stable/9 on June > > > > > 27th. It may or may not apply now. > > > > > > > > Its apply witch litle edit. > > > > > > > > > > > Now that it's done, I hope to merge that change to stable/9 this week. > > > > > > > > > > > > Also, I see strange behaviour of LSI 9211-8i -- after some activity > > > > > > got timeout and HBA put in looped reset. > > > > > > > > > > That's not good. Try with the newer driver and see whether if affects the > > > > > behavior. > > > > > > > > Witch this driver I got same behavior: after intesive i/o got timeout, > > > > driver try re-init controller without success. On all HDD activity LED > > > > ON w/o blinking at this moment. > > > > > > Do you have any logs or dmesg output showing the problem? > > > > Currenly not awailable, but simmilar as here > > http://lists.freebsd.org/pipermail/freebsd-current/2013-May/041943.html > > That one is relatively recent, but all it shows is timeouts. There are > lots of potential causes. In my case only timeouts showed. > Without dmesg output, we don't know what firmware version he's running, and > that could be an issue. As can SATA drives behind an expander. firmware try bundled (v14 IR), v16 IR from LSI site, v14 IT from supermicro site. No expander, but SATA drive. > > or here http://forums.freebsd.org/showthread.php?t=28252. > > This one shows lots of IOC terminated errors, but it looks like his problem > was solved by upgrading his SSD firmware. It's only as sample of dmesg output (in my dmesg no other questionably information). Firmware of SATA disk marked as compatible on LSI site (ST91000640NS SN02). > > At the time of problem -- no any messages in the log or concole, just > > stopping all operations. After some time (aprox 30-60 seconds) -- > > circular messages about timeout, reset and massive 'SCSI command > > timeout'. > > What was your topology? i.e. mps(4) controller connected directly to the > drives, or via an expander? SAS or SATA drives? directly to 8 SATA drives. drives ST91000640NS SN02 > > > I have merged the latest driver changes to stable/9, including a bug fix > > > for out of chain frame handling. > > > > Now I can't test anymore -- controller replaced to asr. > > An asr(4) controller? Yes. From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 23:03:09 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 651DFB9A; Mon, 26 Aug 2013 23:03:09 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 327A42766; Mon, 26 Aug 2013 23:03:09 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [69.198.165.132]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 7DF8CD15A; Mon, 26 Aug 2013 16:03:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1377558188; bh=sr4J6UhM+ci3yYnuI+QjqVyN2iAeFS8sNg86qJ4gPjU=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=3h/ERDWty+3akVKKg3DAWb1KCLGWPuD8Uo3BT4DCzec3A6ltYgpwE8BaGbKgOVlDB yrRPIbI7pgBWIEOTojqMH8TaVq0vMCsrdWUS2a94I0oKbiwvhV3d9mjv6ejhGVsbLE Zbe60XVOqUOBegVN9C5ReOm22k9DYMfSvltKQJ/0= Message-ID: <521BDEAC.9080909@delphij.net> Date: Mon, 26 Aug 2013 16:03:08 -0700 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: Andriy Gapon Subject: Re: svn commit: r254585 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201308202231.r7KMVERi068300@svn.freebsd.org> <20130825221517.GM24767@caravan.chchile.org> <521B75CE.70103@FreeBSD.org> In-Reply-To: <521B75CE.70103@FreeBSD.org> X-Enigmail-Version: 1.5.1 Content-Type: multipart/mixed; boundary="------------090108010401010706060506" Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 23:03:09 -0000 This is a multi-part message in MIME format. --------------090108010401010706060506 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 08/26/13 08:35, Andriy Gapon wrote: > on 26/08/2013 01:15 Jeremie Le Hen said the following: >> Hi Xin, >> >> On Tue, Aug 20, 2013 at 10:31:14PM +0000, Xin LI wrote: >>> Author: delphij Date: Tue Aug 20 22:31:13 2013 New Revision: >>> 254585 URL: http://svnweb.freebsd.org/changeset/base/254585 >>> >>> Log: MFV r254220: >>> >>> Illumos ZFS issues: 4039 zfs_rename()/zfs_link() needs stronger >>> test for XDEV >>> >>> Modified: >>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c >>> >>> Directory Properties: >>> head/sys/cddl/contrib/opensolaris/ (props changed) >>> >>> Modified: >>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c >>> >>> ============================================================================== >>> --- >>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c >>> Tue Aug 20 21:47:07 2013 (r254584) +++ >>> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c >>> Tue Aug 20 22:31:13 2013 (r254585) @@ -21,6 +21,7 @@ /* * >>> Copyright (c) 2005, 2010, Oracle and/or its affiliates. All >>> rights reserved. * Copyright (c) 2013 by Delphix. All rights >>> reserved. + * Copyright 2013 Nexenta Systems, Inc. All rights >>> reserved. */ >>> >>> /* Portions Copyright 2007 Jeremy Teo */ @@ -3727,13 +3728,18 >>> @@ zfs_rename(vnode_t *sdvp, char *snm, vno if >>> (VOP_REALVP(tdvp, &realvp, ct) == 0) tdvp = realvp; >>> >>> - if (tdvp->v_vfsp != sdvp->v_vfsp || zfsctl_is_node(tdvp)) { + >>> tdzp = VTOZ(tdvp); > > The problem with this change, at least on FreeBSD, is that tdvp may > not belong to ZFS. In that case VTOZ(tdvp) does not make any sense > and would produce garbage or trigger an assert. Previously > tdvp->v_vfsp != sdvp->v_vfsp check would catch that situations. Two > side notes: - v_vfsp is actually v_mount on FreeBSD Ah that's good point. Any objection in putting a change to their _freebsd_ counterpart (zfs_freebsd_rename and zfs_freebsd_link) as attached? > - VOP_REALVP is a glorified nop on FreeBSD It's not clear to me what was the intention for having a macro instead of just ifdef'ing the code out -- maybe to prevent unwanted conflict with upstream? These two VOP's are the only consumers of VOP_REALVP in tree. > Another unrelated problem that existed before this change and has > been noted by Davide Italiano is that sdvp is not locked and so it > can potentially be recycled before ZFS_ENTER() enter and for that > reason sdzp and zfsvfs could be invalid. Because sdvp is > referenced, this problem can currently occur only if a forced > unmount runs concurrently to zfs_rename. tdvp should be locked and > thus could be used instead of sdvp as a source for zfsvfs. I think this would need more work, I'll take a look after we have this regression fixed. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQEcBAEBCgAGBQJSG96rAAoJEG80Jeu8UPuzQG4IAK/Qw1McLNoy0egEzelYcsar iBRwoGDXfJuufCy04TEXD5rEz78VdqOl+g0tFqhSMbKHzQj+qEa6P6DIKptEnSsW AtQOQABs0gHY4SZ3MUdvdlEmFlWtyYPTqw471k2jIjRMNEM3wyslVn/SHvfymmwT s9VTI40jkoHWCUMW217jvER5co/niQDU4QL9ZNPb8vzRT02obqiq7ugZ7eqgklAI zqzB46Trn6Oplab+vNt/dWgSK/cuPwDaeTNeRBiw2YQ/uQMsOEdNPB2JqLUA5XgF WezHnotyFT/vdiQCe6dHjatOaR5ui7qWTUKTAwcq4gUrLJQx9FYYV3Im9xmesSM= =FjK7 -----END PGP SIGNATURE----- --------------090108010401010706060506 Content-Type: text/plain; charset=UTF-8; name="zfs-vnops-1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="zfs-vnops-1.diff" Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c =================================================================== --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c (revision 254924) +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c (working copy) @@ -6250,6 +6250,9 @@ zfs_freebsd_rename(ap) ASSERT(ap->a_fcnp->cn_flags & (SAVENAME|SAVESTART)); ASSERT(ap->a_tcnp->cn_flags & (SAVENAME|SAVESTART)); + if (fdvp->v_mount != tdvp->v_mount) + return (EXDEV); + error = zfs_rename(fdvp, ap->a_fcnp->cn_nameptr, tdvp, ap->a_tcnp->cn_nameptr, ap->a_fcnp->cn_cred, NULL, 0); @@ -6308,10 +6311,15 @@ zfs_freebsd_link(ap) } */ *ap; { struct componentname *cnp = ap->a_cnp; + vnode_t *vp = ap->a_vp; + vnode_t *tdvp = ap->a_tdvp; + if (tdvp->v_mount != vp->v_mount) + return (EXDEV); + ASSERT(cnp->cn_flags & SAVENAME); - return (zfs_link(ap->a_tdvp, ap->a_vp, cnp->cn_nameptr, cnp->cn_cred, NULL, 0)); + return (zfs_link(tdvp, vp, cnp->cn_nameptr, cnp->cn_cred, NULL, 0)); } static int --------------090108010401010706060506-- From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 23:37:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4474E783; Mon, 26 Aug 2013 23:37:12 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 30B512945; Mon, 26 Aug 2013 23:37:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QNbCgU011785; Mon, 26 Aug 2013 23:37:12 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QNbBvR011782; Mon, 26 Aug 2013 23:37:11 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201308262337.r7QNbBvR011782@svn.freebsd.org> From: Devin Teske Date: Mon, 26 Aug 2013 23:37:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254942 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 23:37:12 -0000 Author: dteske Date: Mon Aug 26 23:37:11 2013 New Revision: 254942 URL: http://svnweb.freebsd.org/changeset/base/254942 Log: Building upon SVN r254237, disable automated activation of alternate layouts and add support for default underride to $loader_version, acting as a way to name a release. Release text is not displayed for the aforementioned feature of alternate display layout (introduced in r254237); however, for all other layouts (incl. default), the release name is displayed at lower-right. See version.4th(8) for additional information and/or historical details. NOTE: Also a minor edit to version.4th(8) while we're here. Modified: head/sys/boot/forth/beastie.4th head/sys/boot/forth/version.4th head/sys/boot/forth/version.4th.8 Modified: head/sys/boot/forth/beastie.4th ============================================================================== --- head/sys/boot/forth/beastie.4th Mon Aug 26 22:29:42 2013 (r254941) +++ head/sys/boot/forth/beastie.4th Mon Aug 26 23:37:11 2013 (r254942) @@ -205,21 +205,9 @@ variable logoY s" loader_logo" getenv dup -1 = if logoX @ logoY @ loader_color? if - s" tribute-logo" - sfind if - execute - else - drop - orb-logo - then + orb-logo else - s" tributebw-logo" - sfind if - execute - else - drop - orbbw-logo - then + orbbw-logo then drop exit then @@ -249,7 +237,7 @@ variable logoY s" tribute-logo" sfind if execute else - orb-logo + drop orb-logo then 2drop exit then @@ -258,7 +246,7 @@ variable logoY s" tributebw-logo" sfind if execute else - orbbw-logo + drop orbbw-logo then 2drop exit then Modified: head/sys/boot/forth/version.4th ============================================================================== --- head/sys/boot/forth/version.4th Mon Aug 26 22:29:42 2013 (r254941) +++ head/sys/boot/forth/version.4th Mon Aug 26 23:37:11 2013 (r254942) @@ -29,6 +29,9 @@ marker task-version.4th variable versionX variable versionY +\ Default $loader_version value if not overridden or using tribute screen +: str_loader_version ( -- C-ADDR/U|-1 ) -1 ; + \ Initialize text placement to defaults 80 versionX ! \ NOTE: this is the ending column (text is right-justified) 24 versionY ! @@ -43,9 +46,33 @@ variable versionY ?number drop versionY ! -1 then drop - \ Exit if a version was not set + \ Default version if none was set s" loader_version" getenv dup -1 = if - drop exit + drop + \ Default version if no logo is requested + s" loader_logo" getenv dup -1 = if + drop str_loader_version + else + 2dup s" tribute" compare-insensitive 0= if + 2drop + s" tribute-logo" sfind if + drop exit \ see beastie tribute-text + else + drop str_loader_version + then + else 2dup s" tributebw" compare-insensitive 0= if + 2drop + s" tributebw-logo" sfind if + drop exit \ see beastie tribute-text + else + drop str_loader_version + then + else + 2drop str_loader_version + then then + then + then dup -1 = if + drop exit \ default version (above) is disabled then \ Right justify the text Modified: head/sys/boot/forth/version.4th.8 ============================================================================== --- head/sys/boot/forth/version.4th.8 Mon Aug 26 22:29:42 2013 (r254941) +++ head/sys/boot/forth/version.4th.8 Mon Aug 26 23:37:11 2013 (r254942) @@ -91,7 +91,7 @@ causes the version to be printed without .Pq default is ANSI Cyan . .El .Sh FILES -.Bl -tag -width /boot/loader.4th -compact +.Bl -tag -width /boot/version.4th -compact .It Pa /boot/loader The .Xr loader 8 . From owner-svn-src-all@FreeBSD.ORG Mon Aug 26 23:48:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 70EDD9E1; Mon, 26 Aug 2013 23:48:23 +0000 (UTC) (envelope-from will@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5D4FF29B8; Mon, 26 Aug 2013 23:48:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7QNmNQU017703; Mon, 26 Aug 2013 23:48:23 GMT (envelope-from will@svn.freebsd.org) Received: (from will@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7QNmM4M017681; Mon, 26 Aug 2013 23:48:22 GMT (envelope-from will@svn.freebsd.org) Message-Id: <201308262348.r7QNmM4M017681@svn.freebsd.org> From: Will Andrews Date: Mon, 26 Aug 2013 23:48:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254943 - in head: bin/ps sys/compat/freebsd32 sys/kern 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 23:48:23 -0000 Author: will Date: Mon Aug 26 23:48:21 2013 New Revision: 254943 URL: http://svnweb.freebsd.org/changeset/base/254943 Log: Add the ability to display the default FIB number for a process to the ps(1) utility, e.g. "ps -O fib". bin/ps/keyword.c: Add the "fib" keyword and default its column name to "FIB". bin/ps/ps.1: Add "fib" as a supported keyword. sys/compat/freebsd32/freebsd32.h: sys/kern/kern_proc.c: sys/sys/user.h: Add the default fib number for a process (p->p_fibnum) to the user land accessible process data of struct kinfo_proc. Submitted by: Oliver Fromme , gibbs Modified: head/bin/ps/keyword.c head/bin/ps/ps.1 head/sys/compat/freebsd32/freebsd32.h head/sys/kern/kern_proc.c head/sys/sys/user.h Modified: head/bin/ps/keyword.c ============================================================================== --- head/bin/ps/keyword.c Mon Aug 26 23:37:11 2013 (r254942) +++ head/bin/ps/keyword.c Mon Aug 26 23:48:21 2013 (r254943) @@ -87,6 +87,7 @@ static VAR var[] = { {"etimes", "ELAPSED", NULL, USER, elapseds, 0, CHAR, NULL, 0}, {"euid", "", "uid", 0, NULL, 0, CHAR, NULL, 0}, {"f", "F", NULL, 0, kvar, KOFF(ki_flag), INT, "x", 0}, + {"fib", "FIB", NULL, 0, kvar, KOFF(ki_fibnum), INT, "d", 0}, {"flags", "", "f", 0, NULL, 0, CHAR, NULL, 0}, {"gid", "GID", NULL, 0, kvar, KOFF(ki_groups), UINT, UIDFMT, 0}, {"group", "GROUP", NULL, LJUST, egroupname, 0, CHAR, NULL, 0}, Modified: head/bin/ps/ps.1 ============================================================================== --- head/bin/ps/ps.1 Mon Aug 26 23:37:11 2013 (r254942) +++ head/bin/ps/ps.1 Mon Aug 26 23:48:21 2013 (r254943) @@ -512,6 +512,9 @@ elapsed running time, format minutes:seconds. .It Cm etimes elapsed running time, in decimal integer seconds +.It Cm fib +default FIB number, see +.Xr setfib 1 .It Cm flags the process flags, in hexadecimal (alias .Cm f ) Modified: head/sys/compat/freebsd32/freebsd32.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32.h Mon Aug 26 23:37:11 2013 (r254942) +++ head/sys/compat/freebsd32/freebsd32.h Mon Aug 26 23:48:21 2013 (r254943) @@ -342,6 +342,7 @@ struct kinfo_proc32 { char ki_loginclass[LOGINCLASSLEN+1]; char ki_sparestrings[50]; int ki_spareints[KI_NSPARE_INT]; + int ki_fibnum; u_int ki_cr_flags; int ki_jid; int ki_numthreads; Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Mon Aug 26 23:37:11 2013 (r254942) +++ head/sys/kern/kern_proc.c Mon Aug 26 23:48:21 2013 (r254943) @@ -862,6 +862,7 @@ fill_kinfo_proc_only(struct proc *p, str kp->ki_swtime = (ticks - p->p_swtick) / hz; kp->ki_pid = p->p_pid; kp->ki_nice = p->p_nice; + kp->ki_fibnum = p->p_fibnum; kp->ki_start = p->p_stats->p_start; timevaladd(&kp->ki_start, &boottime); PROC_SLOCK(p); @@ -1160,6 +1161,7 @@ freebsd32_kinfo_proc_out(const struct ki bcopy(ki->ki_comm, ki32->ki_comm, COMMLEN + 1); bcopy(ki->ki_emul, ki32->ki_emul, KI_EMULNAMELEN + 1); bcopy(ki->ki_loginclass, ki32->ki_loginclass, LOGINCLASSLEN + 1); + CP(*ki, *ki32, ki_fibnum); CP(*ki, *ki32, ki_cr_flags); CP(*ki, *ki32, ki_jid); CP(*ki, *ki32, ki_numthreads); Modified: head/sys/sys/user.h ============================================================================== --- head/sys/sys/user.h Mon Aug 26 23:37:11 2013 (r254942) +++ head/sys/sys/user.h Mon Aug 26 23:48:21 2013 (r254943) @@ -83,7 +83,7 @@ * it in two places: function fill_kinfo_proc in sys/kern/kern_proc.c and * function kvm_proclist in lib/libkvm/kvm_proc.c . */ -#define KI_NSPARE_INT 9 +#define KI_NSPARE_INT 8 #define KI_NSPARE_LONG 12 #define KI_NSPARE_PTR 6 @@ -186,6 +186,7 @@ struct kinfo_proc { */ char ki_sparestrings[50]; /* spare string space */ int ki_spareints[KI_NSPARE_INT]; /* spare room for growth */ + int ki_fibnum; /* Default FIB number */ u_int ki_cr_flags; /* Credential flags */ int ki_jid; /* Process jail ID */ int ki_numthreads; /* XXXKSE number of threads in total */ From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 01:08:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3200652A; Tue, 27 Aug 2013 01:08:56 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1FDE02D88; Tue, 27 Aug 2013 01:08:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7R18thN063547; Tue, 27 Aug 2013 01:08:55 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7R18toH063546; Tue, 27 Aug 2013 01:08:55 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201308270108.r7R18toH063546@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Tue, 27 Aug 2013 01:08:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254944 - head/sys/mips/malta X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 01:08:56 -0000 Author: gonzo Date: Tue Aug 27 01:08:55 2013 New Revision: 254944 URL: http://svnweb.freebsd.org/changeset/base/254944 Log: - Initialize freq variable so we will not end up with random value if there is no YAMON present Modified: head/sys/mips/malta/yamon.c Modified: head/sys/mips/malta/yamon.c ============================================================================== --- head/sys/mips/malta/yamon.c Mon Aug 26 23:48:21 2013 (r254943) +++ head/sys/mips/malta/yamon.c Tue Aug 27 01:08:55 2013 (r254944) @@ -56,6 +56,7 @@ yamon_getcpufreq(void) uint32_t freq; int ret; + freq = 0; ret = YAMON_SYSCON_READ(SYSCON_BOARD_CPU_CLOCK_FREQ_ID, &freq, sizeof(freq)); if (ret != 0) From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 01:31:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EC2B9936; Tue, 27 Aug 2013 01:31:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D9BA52F35; Tue, 27 Aug 2013 01:31:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7R1VCFW077816; Tue, 27 Aug 2013 01:31:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7R1VCFx077815; Tue, 27 Aug 2013 01:31:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201308270131.r7R1VCFx077815@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 27 Aug 2013 01:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254945 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 01:31:13 -0000 Author: kib Date: Tue Aug 27 01:31:12 2013 New Revision: 254945 URL: http://svnweb.freebsd.org/changeset/base/254945 Log: When allocating a pbuf for the cluster write, do not sleep waiting for the available pbuf when passed vnode is backing md(4). Other i/o directed to the same md device might already hold pbufs, and then we could deadlock since only our progress can free a pbuf needed for wakeup. Obtained from: projects/vm6 Reminded and tested by: pho MFC after: 1 week Modified: head/sys/kern/vfs_cluster.c Modified: head/sys/kern/vfs_cluster.c ============================================================================== --- head/sys/kern/vfs_cluster.c Tue Aug 27 01:08:55 2013 (r254944) +++ head/sys/kern/vfs_cluster.c Tue Aug 27 01:31:12 2013 (r254945) @@ -837,7 +837,9 @@ cluster_wbuild(struct vnode *vp, long si (tbp->b_bcount != tbp->b_bufsize) || (tbp->b_bcount != size) || (len == 1) || - ((bp = getpbuf(&cluster_pbuf_freecnt)) == NULL)) { + ((bp = (vp->v_vflag & VV_MD) != 0 ? + trypbuf(&cluster_pbuf_freecnt) : + getpbuf(&cluster_pbuf_freecnt)) == NULL)) { totalwritten += tbp->b_bufsize; bawrite(tbp); ++start_lbn; From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 01:40:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9CE77AF7; Tue, 27 Aug 2013 01:40:13 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A9F02F84; Tue, 27 Aug 2013 01:40:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7R1eDn5081209; Tue, 27 Aug 2013 01:40:13 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7R1eDhJ081208; Tue, 27 Aug 2013 01:40:13 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201308270140.r7R1eDhJ081208@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Tue, 27 Aug 2013 01:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254946 - head/sys/mips/malta X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 01:40:13 -0000 Author: gonzo Date: Tue Aug 27 01:40:13 2013 New Revision: 254946 URL: http://svnweb.freebsd.org/changeset/base/254946 Log: Fixes for compatibility with QEMU: - Route PCI interrupt for NIC - Make "no mapping" warning more user-friendly: add device name and mention that it's IRQ mapping - Do not overlap ICUs' IO window with PCI devices' IO windows by starting IO rman at offset 0x100 Modified: head/sys/mips/malta/gt_pci.c Modified: head/sys/mips/malta/gt_pci.c ============================================================================== --- head/sys/mips/malta/gt_pci.c Tue Aug 27 01:31:12 2013 (r254945) +++ head/sys/mips/malta/gt_pci.c Tue Aug 27 01:40:13 2013 (r254946) @@ -266,8 +266,12 @@ gt_pci_attach(device_t dev) sc->sc_io = MIPS_PHYS_TO_KSEG1(MALTA_PCI0_IO_BASE); sc->sc_io_rman.rm_type = RMAN_ARRAY; sc->sc_io_rman.rm_descr = "GT64120 PCI I/O Ports"; + /* + * First 256 bytes are ISA's registers: e.g. i8259's + * So do not use them for general purpose PCI I/O window + */ if (rman_init(&sc->sc_io_rman) != 0 || - rman_manage_region(&sc->sc_io_rman, 0, 0xffff) != 0) { + rman_manage_region(&sc->sc_io_rman, 0x100, 0xffff) != 0) { panic("gt_pci_attach: failed to set up I/O rman"); } @@ -568,8 +572,10 @@ gt_pci_route_interrupt(device_t pcib, de * PIIX4 IDE adapter. HW IRQ0 */ return 0; + case 11: /* Ethernet */ + return 10; default: - printf("No mapping for %d/%d/%d/%d\n", bus, device, func, pin); + device_printf(pcib, "no IRQ mapping for %d/%d/%d/%d\n", bus, device, func, pin); } return (0); From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 03:11:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 05F7EC42; Tue, 27 Aug 2013 03:11:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E386624E6; Tue, 27 Aug 2013 03:11:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7R3BnKa035342; Tue, 27 Aug 2013 03:11:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7R3Bnr0035339; Tue, 27 Aug 2013 03:11:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201308270311.r7R3Bnr0035339@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 27 Aug 2013 03:11:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254947 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 03:11:50 -0000 Author: kib Date: Tue Aug 27 03:11:49 2013 New Revision: 254947 URL: http://svnweb.freebsd.org/changeset/base/254947 Log: Partial MFC of r253927 (by attilio): Remove unnecessary soft busy of the page before to do vn_rdwr() in kern_sendfile() which is unnecessary. MFC note: NFS implementation of VOP_READ() sometimes upgrades the vnode lock, which causes drop of the shared lock and sleep for exclusive. As result, busying of the page before the call to vn_rdwr() makes NFS code to wait for vnode lock while page is busy, which contradicts the proper order of vnode lock -> busy. The r250027, merged as part of r250907, started calling vm_page_grab() under the vnode lock. The page grab waits for the page busy state to drain, which makes the parallel sendfile(2) invocations on the same vnode vulnerable to the LOR described above. Note that r250027 only exposed the problem, which might be caused by other means as well, e.g. by parallel sendfile(2) and truncate(2). Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/kern/uipc_syscalls.c Modified: stable/9/sys/kern/uipc_syscalls.c ============================================================================== --- stable/9/sys/kern/uipc_syscalls.c Tue Aug 27 01:40:13 2013 (r254946) +++ stable/9/sys/kern/uipc_syscalls.c Tue Aug 27 03:11:49 2013 (r254947) @@ -2124,11 +2124,6 @@ retry_space: else { ssize_t resid; - /* - * Ensure that our page is still around - * when the I/O completes. - */ - vm_page_io_start(pg); VM_OBJECT_UNLOCK(obj); /* @@ -2144,10 +2139,8 @@ retry_space: IO_VMIO | ((MAXBSIZE / bsize) << IO_SEQSHIFT), td->td_ucred, NOCRED, &resid, td); VFS_UNLOCK_GIANT(vfslocked); - VM_OBJECT_LOCK(obj); - vm_page_io_finish(pg); - if (!error) - VM_OBJECT_UNLOCK(obj); + if (error) + VM_OBJECT_LOCK(obj); mbstat.sf_iocnt++; } if (error) { From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 03:41:31 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 66A9419B; Tue, 27 Aug 2013 03:41:31 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from caravan.chchile.org (caravan.chchile.org [178.32.125.136]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ED0D62684; Tue, 27 Aug 2013 03:41:30 +0000 (UTC) Received: by caravan.chchile.org (Postfix, from userid 1000) id EF533C097C; Tue, 27 Aug 2013 03:41:27 +0000 (UTC) Date: Tue, 27 Aug 2013 05:41:27 +0200 From: Jeremie Le Hen To: d@delphij.net Subject: Re: svn commit: r254585 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20130827034127.GP24767@caravan.chchile.org> Mail-Followup-To: d@delphij.net, Andriy Gapon , Xin LI , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201308202231.r7KMVERi068300@svn.freebsd.org> <20130825221517.GM24767@caravan.chchile.org> <521B75CE.70103@FreeBSD.org> <521BDEAC.9080909@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <521BDEAC.9080909@delphij.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI , Andriy Gapon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 03:41:31 -0000 On Mon, Aug 26, 2013 at 04:03:08PM -0700, Xin Li wrote: > Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c > =================================================================== > --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c (revision 254924) > +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c (working copy) > @@ -6250,6 +6250,9 @@ zfs_freebsd_rename(ap) > ASSERT(ap->a_fcnp->cn_flags & (SAVENAME|SAVESTART)); > ASSERT(ap->a_tcnp->cn_flags & (SAVENAME|SAVESTART)); > > + if (fdvp->v_mount != tdvp->v_mount) > + return (EXDEV); > + > error = zfs_rename(fdvp, ap->a_fcnp->cn_nameptr, tdvp, > ap->a_tcnp->cn_nameptr, ap->a_fcnp->cn_cred, NULL, 0); I think this won't work with my setup where the target directory stands on a nullfs-mounted zfs dataset. I don't know anything about the VFS, but here is what I see with kgdb(1): (kgdb) print *tdvp $1 = {v_tag = 0xffffffff80f5eeee "null", v_op = 0xffffffff81235a80, v_data = 0xfffff800adbb5440, v_mount = 0xfffff80015af5990, v_nmntvnodes = { [...] v_holdcnt = 3, v_usecount = 2, v_iflag = 512, v_vflag = 0, v_writecount = 0, v_hash = 4723827, v_type = VDIR} (kgdb) print *fdvp $2 = {v_tag = 0xffffffff819a37a5 "zfs", v_op = 0xffffffff819b5f80, v_data = 0xfffff80023ba3b80, v_mount = 0xfffff80011eae000, v_nmntvnodes = { [...] v_holdcnt = 4, v_usecount = 2, v_iflag = 512, v_vflag = 0, v_writecount = 0, v_hash = 2337681, v_type = VDIR} Also, I got another panic. I don't know if this is the same problem, but the bottom of the stacktrace is pretty similar though: Unread portion of the kernel message buffer: panic: solaris assert: tx->tx_objset == NULL || dn->dn_objset == tx->tx_objset, file: /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c, line: 818 cpuid = 1 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2e/frame 0xfffffe00e5ccbe50 kdb_backtrace() at kdb_backtrace+0x54/frame 0xfffffe00e5ccbf00 vpanic() at vpanic+0x1bf/frame 0xfffffe00e5ccbf70 kproc_shutdown() at kproc_shutdown/frame 0xfffffe00e5ccbfd0 assfail() at assfail+0x2c/frame 0xfffffe00e5ccc000 dmu_tx_dirty_buf() at dmu_tx_dirty_buf+0xcf/frame 0xfffffe00e5ccc0b0 dbuf_dirty() at dbuf_dirty+0xf2/frame 0xfffffe00e5ccc2a0 dbuf_will_dirty() at dbuf_will_dirty+0x11a/frame 0xfffffe00e5ccc2e0 sa_attr_op() at sa_attr_op+0x2be/frame 0xfffffe00e5ccc350 sa_bulk_update_impl() at sa_bulk_update_impl+0x105/frame 0xfffffe00e5ccc3b0 sa_bulk_update() at sa_bulk_update+0x81/frame 0xfffffe00e5ccc3f0 zfs_link_create() at zfs_link_create+0x3f6/frame 0xfffffe00e5ccc5b0 zfs_rename() at zfs_rename+0xc3c/frame 0xfffffe00e5ccc6e0 zfs_freebsd_rename() at zfs_freebsd_rename+0x116/frame 0xfffffe00e5ccc730 VOP_RENAME_APV() at VOP_RENAME_APV+0x22e/frame 0xfffffe00e5ccc790 VOP_RENAME() at VOP_RENAME+0x69/frame 0xfffffe00e5ccc810 kern_renameat() at kern_renameat+0x41e/frame 0xfffffe00e5ccca30 kern_rename() at kern_rename+0x33/frame 0xfffffe00e5ccca60 sys_rename() at sys_rename+0x2a/frame 0xfffffe00e5ccca80 syscallenter() at syscallenter+0x46e/frame 0xfffffe00e5cccaf0 amd64_syscall() at amd64_syscall+0x1f/frame 0xfffffe00e5cccbf0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe00e5cccbf0 --- syscall (128, FreeBSD ELF64, sys_rename), rip = 0x80088a40a, rsp = 0x7fffffffd0a8, rbp = 0x7fffffffd790 --- KDB: enter: panic (kgdb) frame 16 #16 0xffffffff818340ff in dmu_tx_dirty_buf (tx=0xfffff80008610600, db=0xfffff800c1627d20) at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c:818 818 ASSERT(tx->tx_objset == NULL || dn->dn_objset == tx->tx_objset); (kgdb) print tx->tx_objset $3 = (objset_t *) 0xfffff800046e4000 (kgdb) print dn->dn_objset $4 = (struct objset *) 0xfffff800045fcc00 -- Jeremie Le Hen Scientists say the world is made up of Protons, Neutrons and Electrons. They forgot to mention Morons. From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 03:49:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8ACC43EA; Tue, 27 Aug 2013 03:49:48 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 78A5326DA; Tue, 27 Aug 2013 03:49:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7R3nmip054983; Tue, 27 Aug 2013 03:49:48 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7R3nmGf054982; Tue, 27 Aug 2013 03:49:48 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201308270349.r7R3nmGf054982@svn.freebsd.org> From: Peter Grehan Date: Tue, 27 Aug 2013 03:49:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254948 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 03:49:48 -0000 Author: grehan Date: Tue Aug 27 03:49:47 2013 New Revision: 254948 URL: http://svnweb.freebsd.org/changeset/base/254948 Log: Fix off-by-1 error in assert. Submitted by: Tycho Nightingale (tycho.nightingale@pluribusnetworks.com) Modified: head/usr.sbin/bhyve/pci_virtio_block.c Modified: head/usr.sbin/bhyve/pci_virtio_block.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_block.c Tue Aug 27 03:11:49 2013 (r254947) +++ head/usr.sbin/bhyve/pci_virtio_block.c Tue Aug 27 03:49:47 2013 (r254948) @@ -156,7 +156,7 @@ pci_vtblk_proc(struct pci_vtblk_softc *s * XXX - note - this fails on crash dump, which does a * VIRTIO_BLK_T_FLUSH with a zero transfer length */ - assert (n >= 3 && n < VTBLK_MAXSEGS + 2); + assert (n >= 3 && n <= VTBLK_MAXSEGS + 2); assert((flags[0] & VRING_DESC_F_WRITE) == 0); assert(iov[0].iov_len == sizeof(struct virtio_blk_hdr)); From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 04:01:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E0AFB600; Tue, 27 Aug 2013 04:01:32 +0000 (UTC) (envelope-from will@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B60922793; Tue, 27 Aug 2013 04:01:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7R41W5U063274; Tue, 27 Aug 2013 04:01:32 GMT (envelope-from will@svn.freebsd.org) Received: (from will@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7R41WpK063269; Tue, 27 Aug 2013 04:01:32 GMT (envelope-from will@svn.freebsd.org) Message-Id: <201308270401.r7R41WpK063269@svn.freebsd.org> From: Will Andrews Date: Tue, 27 Aug 2013 04:01:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254949 - in head/cddl: lib/libzpool usr.bin/ztest usr.sbin/zdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 04:01:33 -0000 Author: will Date: Tue Aug 27 04:01:31 2013 New Revision: 254949 URL: http://svnweb.freebsd.org/changeset/base/254949 Log: Build all ZFS testing & debugging tools with -g. These programs and everything using libzpool rely on the embedded asserts to verify the correctness of operations. Given that, the core dumps would be useless without debug symbols. Modified: head/cddl/lib/libzpool/Makefile head/cddl/usr.bin/ztest/Makefile head/cddl/usr.sbin/zdb/Makefile Modified: head/cddl/lib/libzpool/Makefile ============================================================================== --- head/cddl/lib/libzpool/Makefile Tue Aug 27 03:49:47 2013 (r254948) +++ head/cddl/lib/libzpool/Makefile Tue Aug 27 04:01:31 2013 (r254949) @@ -64,7 +64,9 @@ NO_PROFILE= CSTD= c99 -CFLAGS+= -DDEBUG=1 -#DEBUG_FLAGS+= -g +# Since there are many asserts in this library, it makes no sense to compile +# it without debugging. + +CFLAGS+= -g -DDEBUG=1 .include Modified: head/cddl/usr.bin/ztest/Makefile ============================================================================== --- head/cddl/usr.bin/ztest/Makefile Tue Aug 27 03:49:47 2013 (r254948) +++ head/cddl/usr.bin/ztest/Makefile Tue Aug 27 04:01:31 2013 (r254949) @@ -25,7 +25,8 @@ LDADD= -lgeom -lm -lnvpair -lumem -lzpoo CSTD= c99 -CFLAGS+= -DDEBUG=1 -#DEBUG_FLAGS+= -g +# Since there are many asserts in this program, it makes no sense to compile +# it without debugging. +CFLAGS+= -g -DDEBUG=1 .include Modified: head/cddl/usr.sbin/zdb/Makefile ============================================================================== --- head/cddl/usr.sbin/zdb/Makefile Tue Aug 27 03:49:47 2013 (r254948) +++ head/cddl/usr.sbin/zdb/Makefile Tue Aug 27 04:01:31 2013 (r254949) @@ -27,7 +27,8 @@ DPADD= ${LIBGEOM} ${LIBM} ${LIBNVPAIR} $ ${LIBUUTIL} ${LIBZFS_CORE} ${LIBZFS} ${LIBZPOOL} LDADD= -lgeom -lm -lnvpair -lpthread -lumem -luutil -lzfs_core -lzfs -lzpool -CFLAGS+= -DDEBUG=1 -#DEBUG_FLAGS+= -g +# Since there are many asserts in this program, it makes no sense to compile +# it without debugging. +CFLAGS+= -g -DDEBUG=1 .include From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 04:05:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 09BAE75A; Tue, 27 Aug 2013 04:05:19 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DC01127AD; Tue, 27 Aug 2013 04:05:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7R45Iq2064818; Tue, 27 Aug 2013 04:05:18 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7R45IJP064812; Tue, 27 Aug 2013 04:05:18 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201308270405.r7R45IJP064812@svn.freebsd.org> From: Bryan Venteicher Date: Tue, 27 Aug 2013 04:05:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254950 - head/sys/dev/vmware/vmxnet3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 04:05:19 -0000 Author: bryanv Date: Tue Aug 27 04:05:18 2013 New Revision: 254950 URL: http://svnweb.freebsd.org/changeset/base/254950 Log: Couple minor if_vmx tweaks - Use queue size fields from the Tx/Rx queues in various places instead of (currently the same values) from the softc. - Fix potential crash in detach if the attached failed to alloc queue memory. - Move the VMXNET3_MAX_RX_SEGS define to a better spot. - Tweak frame size calculation w.r.t. ETHER_ALIGN. This could be tweaked some more, or removed since it probably doesn't matter much for x86 (and the x86 class of machines this driver will be used on). Modified: head/sys/dev/vmware/vmxnet3/if_vmx.c head/sys/dev/vmware/vmxnet3/if_vmxvar.h Modified: head/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- head/sys/dev/vmware/vmxnet3/if_vmx.c Tue Aug 27 04:01:31 2013 (r254949) +++ head/sys/dev/vmware/vmxnet3/if_vmx.c Tue Aug 27 04:05:18 2013 (r254950) @@ -437,15 +437,15 @@ vmxnet3_check_version(struct vmxnet3_sof device_printf(dev, "unsupported hardware version %#x\n", version); return (ENOTSUP); - } else - vmxnet3_write_bar1(sc, VMXNET3_BAR1_VRRS, 1); + } + vmxnet3_write_bar1(sc, VMXNET3_BAR1_VRRS, 1); version = vmxnet3_read_bar1(sc, VMXNET3_BAR1_UVRS); if ((version & 0x01) == 0) { device_printf(dev, "unsupported UPT version %#x\n", version); return (ENOTSUP); - } else - vmxnet3_write_bar1(sc, VMXNET3_BAR1_UVRS, 1); + } + vmxnet3_write_bar1(sc, VMXNET3_BAR1_UVRS, 1); return (0); } @@ -781,10 +781,9 @@ vmxnet3_init_rxq(struct vmxnet3_softc *s sizeof(struct vmxnet3_rxbuf), M_DEVBUF, M_NOWAIT | M_ZERO); if (rxr->vxrxr_rxbuf == NULL) return (ENOMEM); - } - rxq->vxrxq_comp_ring.vxcr_ndesc = - sc->vmx_nrxdescs * VMXNET3_RXRINGS_PERQ; + rxq->vxrxq_comp_ring.vxcr_ndesc += sc->vmx_nrxdescs; + } return (0); } @@ -1240,8 +1239,11 @@ static void vmxnet3_free_queue_data(struct vmxnet3_softc *sc) { - vmxnet3_free_rxq_data(sc); - vmxnet3_free_txq_data(sc); + if (sc->vmx_rxq != NULL) + vmxnet3_free_rxq_data(sc); + + if (sc->vmx_txq != NULL) + vmxnet3_free_txq_data(sc); } static int @@ -1325,9 +1327,9 @@ vmxnet3_init_shared_data(struct vmxnet3_ txs = txq->vxtxq_ts; txs->cmd_ring = txq->vxtxq_cmd_ring.vxtxr_dma.dma_paddr; - txs->cmd_ring_len = sc->vmx_ntxdescs; + txs->cmd_ring_len = txq->vxtxq_cmd_ring.vxtxr_ndesc; txs->comp_ring = txq->vxtxq_comp_ring.vxcr_dma.dma_paddr; - txs->comp_ring_len = sc->vmx_ntxdescs; + txs->comp_ring_len = txq->vxtxq_comp_ring.vxcr_ndesc; txs->driver_data = vtophys(txq); txs->driver_data_len = sizeof(struct vmxnet3_txqueue); } @@ -1342,8 +1344,7 @@ vmxnet3_init_shared_data(struct vmxnet3_ rxs->cmd_ring[1] = rxq->vxrxq_cmd_ring[1].vxrxr_dma.dma_paddr; rxs->cmd_ring_len[1] = rxq->vxrxq_cmd_ring[1].vxrxr_ndesc; rxs->comp_ring = rxq->vxrxq_comp_ring.vxcr_dma.dma_paddr; - rxs->comp_ring_len = rxq->vxrxq_cmd_ring[0].vxrxr_ndesc + - rxq->vxrxq_cmd_ring[1].vxrxr_ndesc; + rxs->comp_ring_len = rxq->vxrxq_comp_ring.vxcr_ndesc; rxs->driver_data = vtophys(rxq); rxs->driver_data_len = sizeof(struct vmxnet3_rxqueue); } @@ -1558,6 +1559,7 @@ vmxnet3_txq_eof(struct vmxnet3_txqueue * txcd = &txc->vxcr_u.txcd[txc->vxcr_next]; if (txcd->gen != txc->vxcr_gen) break; + vmxnet3_barrier(sc, VMXNET3_BARRIER_RD); if (++txc->vxcr_next == txc->vxcr_ndesc) { txc->vxcr_next = 0; @@ -1647,7 +1649,7 @@ vmxnet3_newbuf(struct vmxnet3_softc *sc, BUS_DMA_NOWAIT); if (error) { m_freem(m); - sc->vmx_stats.vmst_mbuf_load_failed++;; + sc->vmx_stats.vmst_mbuf_load_failed++; return (error); } KASSERT(nsegs == 1, @@ -2119,19 +2121,19 @@ vmxnet3_rxinit(struct vmxnet3_softc *sc, int i, populate, idx, frame_size, error; ifp = sc->vmx_ifp; - frame_size = ifp->if_mtu + sizeof(struct ether_vlan_header); + frame_size = ETHER_ALIGN + sizeof(struct ether_vlan_header) + + ifp->if_mtu; /* - * If the MTU causes us to exceed what a regular sized cluster - * can handle, we allocate a second MJUMPAGESIZE cluster after - * it in ring 0. If in use, ring 1 always contains MJUMPAGESIZE - * clusters. + * If the MTU causes us to exceed what a regular sized cluster can + * handle, we allocate a second MJUMPAGESIZE cluster after it in + * ring 0. If in use, ring 1 always contains MJUMPAGESIZE clusters. * - * Keep rx_max_chain a divisor of the maximum Rx ring size to - * to make our life easier. We do not support changing the ring - * size after the attach. + * Keep rx_max_chain a divisor of the maximum Rx ring size to make + * our life easier. We do not support changing the ring size after + * the attach. */ - if (frame_size <= MCLBYTES - ETHER_ALIGN) + if (frame_size <= MCLBYTES) sc->vmx_rx_max_chain = 1; else sc->vmx_rx_max_chain = 2; Modified: head/sys/dev/vmware/vmxnet3/if_vmxvar.h ============================================================================== --- head/sys/dev/vmware/vmxnet3/if_vmxvar.h Tue Aug 27 04:01:31 2013 (r254949) +++ head/sys/dev/vmware/vmxnet3/if_vmxvar.h Tue Aug 27 04:05:18 2013 (r254950) @@ -50,13 +50,6 @@ struct vmxnet3_dma_alloc { #define VMXNET3_MAX_RX_NCOMPDESC \ (VMXNET3_MAX_RX_NDESC * VMXNET3_RXRINGS_PERQ) -/* - * The maximum number of Rx segments we accept. When LRO is enabled, - * this allows us to receive the maximum sized frame with one MCLBYTES - * cluster followed by 16 MJUMPAGESIZE clusters. - */ -#define VMXNET3_MAX_RX_SEGS 17 - struct vmxnet3_txbuf { bus_dmamap_t vtxb_dmamap; struct mbuf *vtxb_m; @@ -272,6 +265,13 @@ struct vmxnet3_softc { #define VMXNET3_TX_MAXSEGSIZE (1 << 14) /* + * The maximum number of Rx segments we accept. When LRO is enabled, + * this allows us to receive the maximum sized frame with one MCLBYTES + * cluster followed by 16 MJUMPAGESIZE clusters. + */ +#define VMXNET3_MAX_RX_SEGS 17 + +/* * Predetermined size of the multicast MACs filter table. If the * number of multicast addresses exceeds this size, then the * ALL_MULTI mode is use instead. From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 04:42:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C0772E74; Tue, 27 Aug 2013 04:42:42 +0000 (UTC) (envelope-from will@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AD6B22990; Tue, 27 Aug 2013 04:42:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7R4ggwb086249; Tue, 27 Aug 2013 04:42:42 GMT (envelope-from will@svn.freebsd.org) Received: (from will@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7R4ggch086248; Tue, 27 Aug 2013 04:42:42 GMT (envelope-from will@svn.freebsd.org) Message-Id: <201308270442.r7R4ggch086248@svn.freebsd.org> From: Will Andrews Date: Tue, 27 Aug 2013 04:42:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254951 - head/release/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 04:42:42 -0000 Author: will Date: Tue Aug 27 04:42:42 2013 New Revision: 254951 URL: http://svnweb.freebsd.org/changeset/base/254951 Log: Fix 'make release' on older hosts: use buildworld legacy utilities. Newer FreeBSD installs require an install(1) that supports the new flags. This adds ${MAKEOBJDIRPREFIX}${.CURDIR}/tmp/legacy/{bin,usr/{bin,sbin}} to the PATH while generating an mtree database for 'make release'. Note that the problem only exists here because mm-mtree.sh generates its own object tree to avoid mucking with the existing one, which results in a PATH containing legacy utility dirs that are empty. Modified: head/release/scripts/mm-mtree.sh Modified: head/release/scripts/mm-mtree.sh ============================================================================== --- head/release/scripts/mm-mtree.sh Tue Aug 27 04:05:18 2013 (r254950) +++ head/release/scripts/mm-mtree.sh Tue Aug 27 04:42:42 2013 (r254951) @@ -81,6 +81,11 @@ if [ ! -f ${SOURCEDIR}/Makefile.inc1 -a fi # Setup make to use system files from SOURCEDIR +objp=${MAKEOBJDIRPREFIX} +[ -z "${objp}" ] && objp=/usr/obj +legacydir=${objp}${SOURCEDIR}/tmp/legacy +legacypath=${legacydir}/usr/sbin:${legacydir}/usr/bin:${legacydir}/bin +MM_MAKE_ARGS="${MM_MAKE_ARGS} PATH=${legacypath}:${PATH}" MM_MAKE="make ${ARCHSTRING} ${MM_MAKE_ARGS} -m ${SOURCEDIR}/share/mk" delete_temproot () { From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 06:09:28 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D601D8E2; Tue, 27 Aug 2013 06:09:28 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C19FE2D7A; Tue, 27 Aug 2013 06:09:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7R69SaM034483; Tue, 27 Aug 2013 06:09:28 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7R69SRI034482; Tue, 27 Aug 2013 06:09:28 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201308270609.r7R69SRI034482@svn.freebsd.org> From: Devin Teske Date: Tue, 27 Aug 2013 06:09:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254952 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 06:09:28 -0000 Author: dteske Date: Tue Aug 27 06:09:28 2013 New Revision: 254952 URL: http://svnweb.freebsd.org/changeset/base/254952 Log: Update copyright. Modified: head/sys/boot/forth/version.4th Modified: head/sys/boot/forth/version.4th ============================================================================== --- head/sys/boot/forth/version.4th Tue Aug 27 04:42:42 2013 (r254951) +++ head/sys/boot/forth/version.4th Tue Aug 27 06:09:28 2013 (r254952) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2011 Devin Teske +\ Copyright (c) 2006-2013 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 06:31:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F0C48CC9; Tue, 27 Aug 2013 06:31:51 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DD7362EA4; Tue, 27 Aug 2013 06:31:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7R6Vp1X048518; Tue, 27 Aug 2013 06:31:51 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7R6VpuR048515; Tue, 27 Aug 2013 06:31:51 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201308270631.r7R6VpuR048515@svn.freebsd.org> From: Devin Teske Date: Tue, 27 Aug 2013 06:31:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254953 - stable/9/sys/boot/forth X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 06:31:52 -0000 Author: dteske Date: Tue Aug 27 06:31:50 2013 New Revision: 254953 URL: http://svnweb.freebsd.org/changeset/base/254953 Log: MFC revisions 254942 and 254952: Make alternate layout ``opt-in'' and add support for named releases. Minor edit to version.4th(8) manual and stack-leak fixes while here. Modified: stable/9/sys/boot/forth/beastie.4th stable/9/sys/boot/forth/version.4th stable/9/sys/boot/forth/version.4th.8 Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/forth/ (props changed) Modified: stable/9/sys/boot/forth/beastie.4th ============================================================================== --- stable/9/sys/boot/forth/beastie.4th Tue Aug 27 06:09:28 2013 (r254952) +++ stable/9/sys/boot/forth/beastie.4th Tue Aug 27 06:31:50 2013 (r254953) @@ -134,7 +134,7 @@ variable logoY \ Move the menu to the center of the screen s" set loader_menu_x=26" evaluate - s" set loader_menu_y=13" evaluate + s" set loader_menu_y=12" evaluate s" set loader_menu_timeout_x=21" evaluate s" set loader_menu_timeout_y=24" evaluate @@ -275,21 +275,9 @@ variable logoY s" loader_logo" getenv dup -1 = if logoX @ logoY @ loader_color? if - s" tribute-logo" - sfind if - execute - else - drop - orb-logo - then + orb-logo else - s" tributebw-logo" - sfind if - execute - else - drop - orbbw-logo - then + orbbw-logo then drop exit then @@ -319,7 +307,7 @@ variable logoY s" tribute-logo" sfind if execute else - orb-logo + drop orb-logo then 2drop exit then @@ -328,7 +316,7 @@ variable logoY s" tributebw-logo" sfind if execute else - orbbw-logo + drop orbbw-logo then 2drop exit then Modified: stable/9/sys/boot/forth/version.4th ============================================================================== --- stable/9/sys/boot/forth/version.4th Tue Aug 27 06:09:28 2013 (r254952) +++ stable/9/sys/boot/forth/version.4th Tue Aug 27 06:31:50 2013 (r254953) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2011 Devin Teske +\ Copyright (c) 2006-2013 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -29,6 +29,9 @@ marker task-version.4th variable versionX variable versionY +\ Default $loader_version value if not overridden or using tribute screen +: str_loader_version ( -- C-ADDR/U|-1 ) s" FreeBSD `Nakatomi Socrates' 9.2" ; + \ Initialize text placement to defaults 80 versionX ! \ NOTE: this is the ending column (text is right-justified) 24 versionY ! @@ -43,9 +46,33 @@ variable versionY ?number drop versionY ! -1 then drop - \ Exit if a version was not set + \ Default version if none was set s" loader_version" getenv dup -1 = if - drop exit + drop + \ Default version if no logo is requested + s" loader_logo" getenv dup -1 = if + drop str_loader_version + else + 2dup s" tribute" compare-insensitive 0= if + 2drop + s" tribute-logo" sfind if + drop exit \ see beastie tribute-text + else + drop str_loader_version + then + else 2dup s" tributebw" compare-insensitive 0= if + 2drop + s" tributebw-logo" sfind if + drop exit \ see beastie tribute-text + else + drop str_loader_version + then + else + 2drop str_loader_version + then then + then + then dup -1 = if + drop exit \ default version (above) is disabled then \ Right justify the text Modified: stable/9/sys/boot/forth/version.4th.8 ============================================================================== --- stable/9/sys/boot/forth/version.4th.8 Tue Aug 27 06:09:28 2013 (r254952) +++ stable/9/sys/boot/forth/version.4th.8 Tue Aug 27 06:31:50 2013 (r254953) @@ -91,7 +91,7 @@ causes the version to be printed without .Pq default is ANSI Cyan . .El .Sh FILES -.Bl -tag -width /boot/loader.4th -compact +.Bl -tag -width /boot/version.4th -compact .It Pa /boot/loader The .Xr loader 8 . From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 06:50:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A0F8AF8F; Tue, 27 Aug 2013 06:50:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8E9882F86; Tue, 27 Aug 2013 06:50:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7R6okKj058280; Tue, 27 Aug 2013 06:50:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7R6ok0j058279; Tue, 27 Aug 2013 06:50:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201308270650.r7R6ok0j058279@svn.freebsd.org> From: Alexander Motin Date: Tue, 27 Aug 2013 06:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254954 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 06:50:46 -0000 Author: mav Date: Tue Aug 27 06:50:46 2013 New Revision: 254954 URL: http://svnweb.freebsd.org/changeset/base/254954 Log: Add missing newlines to Fibre Channel attributes output. Modified: head/sbin/camcontrol/camcontrol.c Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Tue Aug 27 06:31:50 2013 (r254953) +++ head/sbin/camcontrol/camcontrol.c Tue Aug 27 06:50:46 2013 (r254954) @@ -4488,13 +4488,13 @@ cts_print(struct cam_device *device, str &cts->xport_specific.fc; if (fc->valid & CTS_FC_VALID_WWNN) - fprintf(stdout, "%sWWNN: 0x%llx", pathstr, + fprintf(stdout, "%sWWNN: 0x%llx\n", pathstr, (long long) fc->wwnn); if (fc->valid & CTS_FC_VALID_WWPN) - fprintf(stdout, "%sWWPN: 0x%llx", pathstr, + fprintf(stdout, "%sWWPN: 0x%llx\n", pathstr, (long long) fc->wwpn); if (fc->valid & CTS_FC_VALID_PORT) - fprintf(stdout, "%sPortID: 0x%x", pathstr, fc->port); + fprintf(stdout, "%sPortID: 0x%x\n", pathstr, fc->port); if (fc->valid & CTS_FC_VALID_SPEED) fprintf(stdout, "%stransfer speed: %d.%03dMB/s\n", pathstr, fc->bitrate / 1000, fc->bitrate % 1000); From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 08:02:08 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0DAB2FDB; Tue, 27 Aug 2013 08:02:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 99D2A2449; Tue, 27 Aug 2013 08:02:06 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA15922; Tue, 27 Aug 2013 11:02:03 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VEEDz-000JDq-5a; Tue, 27 Aug 2013 11:02:03 +0300 Message-ID: <521C5CDA.1070603@FreeBSD.org> Date: Tue, 27 Aug 2013 11:01:30 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130810 Thunderbird/17.0.8 MIME-Version: 1.0 To: jlh@FreeBSD.org Subject: Re: svn commit: r254585 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201308202231.r7KMVERi068300@svn.freebsd.org> <20130825221517.GM24767@caravan.chchile.org> <521B75CE.70103@FreeBSD.org> <521BDEAC.9080909@delphij.net> <20130827034127.GP24767@caravan.chchile.org> In-Reply-To: <20130827034127.GP24767@caravan.chchile.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, Xin LI , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, d@delphij.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 08:02:08 -0000 on 27/08/2013 06:41 Jeremie Le Hen said the following: > On Mon, Aug 26, 2013 at 04:03:08PM -0700, Xin Li wrote: >> Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c >> =================================================================== >> --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c (revision 254924) >> +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c (working copy) >> @@ -6250,6 +6250,9 @@ zfs_freebsd_rename(ap) >> ASSERT(ap->a_fcnp->cn_flags & (SAVENAME|SAVESTART)); >> ASSERT(ap->a_tcnp->cn_flags & (SAVENAME|SAVESTART)); >> >> + if (fdvp->v_mount != tdvp->v_mount) >> + return (EXDEV); >> + >> error = zfs_rename(fdvp, ap->a_fcnp->cn_nameptr, tdvp, >> ap->a_tcnp->cn_nameptr, ap->a_fcnp->cn_cred, NULL, 0); > > I think this won't work with my setup where the target directory stands on a > nullfs-mounted zfs dataset. I don't know anything about the VFS, but > here is what I see with kgdb(1): > > (kgdb) print *tdvp > $1 = {v_tag = 0xffffffff80f5eeee "null", v_op = 0xffffffff81235a80, > v_data = 0xfffff800adbb5440, v_mount = 0xfffff80015af5990, v_nmntvnodes = { > [...] > v_holdcnt = 3, v_usecount = 2, v_iflag = 512, v_vflag = 0, v_writecount = 0, > v_hash = 4723827, v_type = VDIR} > > (kgdb) print *fdvp > $2 = {v_tag = 0xffffffff819a37a5 "zfs", v_op = 0xffffffff819b5f80, > v_data = 0xfffff80023ba3b80, v_mount = 0xfffff80011eae000, v_nmntvnodes = { > [...] > v_holdcnt = 4, v_usecount = 2, v_iflag = 512, v_vflag = 0, v_writecount = 0, > v_hash = 2337681, v_type = VDIR} So what exactly do you think won't work? And why exactly do you think it won't work? > > Also, I got another panic. I don't know if this is the same problem, > but the bottom of the stacktrace is pretty similar though: > > Unread portion of the kernel message buffer: > panic: solaris assert: tx->tx_objset == NULL || dn->dn_objset == tx->tx_objset, file: /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c, line: 818 > cpuid = 1 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2e/frame 0xfffffe00e5ccbe50 > kdb_backtrace() at kdb_backtrace+0x54/frame 0xfffffe00e5ccbf00 > vpanic() at vpanic+0x1bf/frame 0xfffffe00e5ccbf70 > kproc_shutdown() at kproc_shutdown/frame 0xfffffe00e5ccbfd0 > assfail() at assfail+0x2c/frame 0xfffffe00e5ccc000 > dmu_tx_dirty_buf() at dmu_tx_dirty_buf+0xcf/frame 0xfffffe00e5ccc0b0 > dbuf_dirty() at dbuf_dirty+0xf2/frame 0xfffffe00e5ccc2a0 > dbuf_will_dirty() at dbuf_will_dirty+0x11a/frame 0xfffffe00e5ccc2e0 > sa_attr_op() at sa_attr_op+0x2be/frame 0xfffffe00e5ccc350 > sa_bulk_update_impl() at sa_bulk_update_impl+0x105/frame 0xfffffe00e5ccc3b0 > sa_bulk_update() at sa_bulk_update+0x81/frame 0xfffffe00e5ccc3f0 > zfs_link_create() at zfs_link_create+0x3f6/frame 0xfffffe00e5ccc5b0 > zfs_rename() at zfs_rename+0xc3c/frame 0xfffffe00e5ccc6e0 > zfs_freebsd_rename() at zfs_freebsd_rename+0x116/frame 0xfffffe00e5ccc730 > VOP_RENAME_APV() at VOP_RENAME_APV+0x22e/frame 0xfffffe00e5ccc790 > VOP_RENAME() at VOP_RENAME+0x69/frame 0xfffffe00e5ccc810 > kern_renameat() at kern_renameat+0x41e/frame 0xfffffe00e5ccca30 > kern_rename() at kern_rename+0x33/frame 0xfffffe00e5ccca60 > sys_rename() at sys_rename+0x2a/frame 0xfffffe00e5ccca80 > syscallenter() at syscallenter+0x46e/frame 0xfffffe00e5cccaf0 > amd64_syscall() at amd64_syscall+0x1f/frame 0xfffffe00e5cccbf0 > Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe00e5cccbf0 > --- syscall (128, FreeBSD ELF64, sys_rename), rip = 0x80088a40a, rsp = 0x7fffffffd0a8, rbp = 0x7fffffffd790 --- > KDB: enter: panic > > > (kgdb) frame 16 > #16 0xffffffff818340ff in dmu_tx_dirty_buf (tx=0xfffff80008610600, db=0xfffff800c1627d20) > at /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c:818 > 818 ASSERT(tx->tx_objset == NULL || dn->dn_objset == tx->tx_objset); > (kgdb) print tx->tx_objset > $3 = (objset_t *) 0xfffff800046e4000 > (kgdb) print dn->dn_objset > $4 = (struct objset *) 0xfffff800045fcc00 It may or may not be the same problem. My current guess is that it is not. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 08:02:14 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 57191135; Tue, 27 Aug 2013 08:02:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id B40DF244B; Tue, 27 Aug 2013 08:02:12 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA15918; Tue, 27 Aug 2013 11:02:02 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VEEDy-000JDp-6U; Tue, 27 Aug 2013 11:02:02 +0300 Message-ID: <521C5CAC.2060400@FreeBSD.org> Date: Tue, 27 Aug 2013 11:00:44 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130810 Thunderbird/17.0.8 MIME-Version: 1.0 To: d@delphij.net Subject: Re: svn commit: r254585 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201308202231.r7KMVERi068300@svn.freebsd.org> <20130825221517.GM24767@caravan.chchile.org> <521B75CE.70103@FreeBSD.org> <521BDEAC.9080909@delphij.net> In-Reply-To: <521BDEAC.9080909@delphij.net> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, Xin LI , svn-src-head@FreeBSD.org, Konstantin Belousov , Xin Li X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 08:02:14 -0000 on 27/08/2013 02:03 Xin Li said the following: > On 08/26/13 08:35, Andriy Gapon wrote: >> on 26/08/2013 01:15 Jeremie Le Hen said the following: >>> Hi Xin, >>> >>> On Tue, Aug 20, 2013 at 10:31:14PM +0000, Xin LI wrote: [snip] >>>> @@ zfs_rename(vnode_t *sdvp, char *snm, vno if >>>> (VOP_REALVP(tdvp, &realvp, ct) == 0) tdvp = realvp; >>>> >>>> - if (tdvp->v_vfsp != sdvp->v_vfsp || zfsctl_is_node(tdvp)) { + >>>> tdzp = VTOZ(tdvp); > >> The problem with this change, at least on FreeBSD, is that tdvp may >> not belong to ZFS. In that case VTOZ(tdvp) does not make any sense >> and would produce garbage or trigger an assert. Previously >> tdvp->v_vfsp != sdvp->v_vfsp check would catch that situations. Two >> side notes: - v_vfsp is actually v_mount on FreeBSD > > Ah that's good point. Any objection in putting a change to their > _freebsd_ counterpart (zfs_freebsd_rename and zfs_freebsd_link) as > attached? I think that at least the change to zfs_freebsd_rename as it is now would break locking and reference counting semantics for the vnodes involved -- vreles and vputs have to be done even in the error case. Also, look at the check at the start of ufs_rename, it also considers tvp when it's not NULL. I am not sure if it is possible to have a situation where fvp and tdvp are from the same fs, but tvp is from a different one. I've been also tempted to place the check in the common code in kern_renameat. That should cover the system calls. But could be insufficient for direct calls to VOP_RENAME in other places. diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index a7cb87a..cfa4d93 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -3608,6 +3608,14 @@ kern_renameat(struct thread *td, int oldfd, char *old, int newfd, char *new, error = EINVAL; goto out; } + + /* Check for cross-device rename. */ + if ((fvp->v_mount != tdvp->v_mount) || + (tvp && (fvp->v_mount != tvp->v_mount))) { + error = EXDEV; + goto out; + } + /* * If the source is the same as the destination (that is, if they * are links to the same vnode), then there is nothing to do. >> - VOP_REALVP is a glorified nop on FreeBSD > > It's not clear to me what was the intention for having a macro instead > of just ifdef'ing the code out -- maybe to prevent unwanted conflict > with upstream? These two VOP's are the only consumers of VOP_REALVP > in tree. Yes. Personally I would just ifdef out the calls. >> Another unrelated problem that existed before this change and has >> been noted by Davide Italiano is that sdvp is not locked and so it >> can potentially be recycled before ZFS_ENTER() enter and for that >> reason sdzp and zfsvfs could be invalid. Because sdvp is >> referenced, this problem can currently occur only if a forced >> unmount runs concurrently to zfs_rename. tdvp should be locked and >> thus could be used instead of sdvp as a source for zfsvfs. > > I think this would need more work, I'll take a look after we have this > regression fixed. Thank you. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 08:49:50 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 075B8B2B; Tue, 27 Aug 2013 08:49:50 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from caravan.chchile.org (caravan.chchile.org [178.32.125.136]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BC76B2757; Tue, 27 Aug 2013 08:49:49 +0000 (UTC) Received: by caravan.chchile.org (Postfix, from userid 1000) id F12B9C0B8C; Tue, 27 Aug 2013 08:49:47 +0000 (UTC) Date: Tue, 27 Aug 2013 10:49:47 +0200 From: Jeremie Le Hen To: Andriy Gapon Subject: Re: svn commit: r254585 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20130827084947.GQ24767@caravan.chchile.org> Mail-Followup-To: Andriy Gapon , d@delphij.net, Xin LI , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201308202231.r7KMVERi068300@svn.freebsd.org> <20130825221517.GM24767@caravan.chchile.org> <521B75CE.70103@FreeBSD.org> <521BDEAC.9080909@delphij.net> <20130827034127.GP24767@caravan.chchile.org> <521C5CDA.1070603@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <521C5CDA.1070603@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@FreeBSD.org, d@delphij.net, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org, Xin LI , jlh@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 08:49:50 -0000 On Tue, Aug 27, 2013 at 11:01:30AM +0300, Andriy Gapon wrote: > on 27/08/2013 06:41 Jeremie Le Hen said the following: > > On Mon, Aug 26, 2013 at 04:03:08PM -0700, Xin Li wrote: > >> Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c > >> =================================================================== > >> --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c (revision 254924) > >> +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c (working copy) > >> @@ -6250,6 +6250,9 @@ zfs_freebsd_rename(ap) > >> ASSERT(ap->a_fcnp->cn_flags & (SAVENAME|SAVESTART)); > >> ASSERT(ap->a_tcnp->cn_flags & (SAVENAME|SAVESTART)); > >> > >> + if (fdvp->v_mount != tdvp->v_mount) > >> + return (EXDEV); > >> + > >> error = zfs_rename(fdvp, ap->a_fcnp->cn_nameptr, tdvp, > >> ap->a_tcnp->cn_nameptr, ap->a_fcnp->cn_cred, NULL, 0); > > > > I think this won't work with my setup where the target directory stands on a > > nullfs-mounted zfs dataset. I don't know anything about the VFS, but > > here is what I see with kgdb(1): > > > > (kgdb) print *tdvp > > $1 = {v_tag = 0xffffffff80f5eeee "null", v_op = 0xffffffff81235a80, > > v_data = 0xfffff800adbb5440, v_mount = 0xfffff80015af5990, v_nmntvnodes = { > > [...] > > v_holdcnt = 3, v_usecount = 2, v_iflag = 512, v_vflag = 0, v_writecount = 0, > > v_hash = 4723827, v_type = VDIR} > > > > (kgdb) print *fdvp > > $2 = {v_tag = 0xffffffff819a37a5 "zfs", v_op = 0xffffffff819b5f80, > > v_data = 0xfffff80023ba3b80, v_mount = 0xfffff80011eae000, v_nmntvnodes = { > > [...] > > v_holdcnt = 4, v_usecount = 2, v_iflag = 512, v_vflag = 0, v_writecount = 0, > > v_hash = 2337681, v_type = VDIR} > > > So what exactly do you think won't work? > And why exactly do you think it won't work? My naive reading of this was that fdvp->v_mount != tdvp->v_mount in my case, so rename(2) will return EXDEV and mv(1) will fail. But glancing at mv(1)'s source it seems it will catch it. So that's probably fine. Sorry for the noise. -- Jeremie Le Hen Scientists say the world is made up of Protons, Neutrons and Electrons. They forgot to mention Morons. From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 08:59:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 849C3DFE; Tue, 27 Aug 2013 08:59:29 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-vc0-x22f.google.com (mail-vc0-x22f.google.com [IPv6:2607:f8b0:400c:c03::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DA5B927FD; Tue, 27 Aug 2013 08:59:28 +0000 (UTC) Received: by mail-vc0-f175.google.com with SMTP id ia10so2843348vcb.34 for ; Tue, 27 Aug 2013 01:59:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=UJ5GpDB4TjrL5CRA+/lSU4NOStVfGZpGkd7XPLKH4g0=; b=WK7+riKQeOH2+EuVyGi8U66fsP4fn4TNbKRXpCKDp1gl095xMYUHDRbrF+1O3CoqEn N8FSZpTu9ZvUYyel6Dwk5Zwz+NevJmEpNK5bvKyYDulzW0k8eBSt5OPq1BsV11OkipKZ 66sz4/uEsLwIJd6WDzwNlvdLLgGSN2kYe4NTfiVd2RCI69ZLaKa1H5zP2Mks70k/eVcs 1Nj6Yi18PLYEZ5z/vUjaQv28odtDXf4CrxBEjaSKcZqilnSQhVwEJfdKmm0BC4OtvZWK 5m79dpym1jwxU2fzwSt3/HfDePFAGZQLYv/joKB2za16sTHmpegQOCDzkDJC1VOh1qgh wLYw== MIME-Version: 1.0 X-Received: by 10.58.165.70 with SMTP id yw6mr10193063veb.19.1377593967960; Tue, 27 Aug 2013 01:59:27 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.220.65.132 with HTTP; Tue, 27 Aug 2013 01:59:27 -0700 (PDT) In-Reply-To: <521C5CAC.2060400@FreeBSD.org> References: <201308202231.r7KMVERi068300@svn.freebsd.org> <20130825221517.GM24767@caravan.chchile.org> <521B75CE.70103@FreeBSD.org> <521BDEAC.9080909@delphij.net> <521C5CAC.2060400@FreeBSD.org> Date: Tue, 27 Aug 2013 10:59:27 +0200 X-Google-Sender-Auth: AFj1pSbxIhU9qYStQ51oeNkFwz4 Message-ID: Subject: Re: svn commit: r254585 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs From: Davide Italiano To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Cc: src-committers@freebsd.org, Xin LI , svn-src-all@freebsd.org, Xin LI , svn-src-head@freebsd.org, Konstantin Belousov , Xin Li X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 08:59:29 -0000 On Tue, Aug 27, 2013 at 10:00 AM, Andriy Gapon wrote: > on 27/08/2013 02:03 Xin Li said the following: >> On 08/26/13 08:35, Andriy Gapon wrote: >>> on 26/08/2013 01:15 Jeremie Le Hen said the following: >>>> Hi Xin, >>>> >>>> On Tue, Aug 20, 2013 at 10:31:14PM +0000, Xin LI wrote: > [snip] >>>>> @@ zfs_rename(vnode_t *sdvp, char *snm, vno if >>>>> (VOP_REALVP(tdvp, &realvp, ct) == 0) tdvp = realvp; >>>>> >>>>> - if (tdvp->v_vfsp != sdvp->v_vfsp || zfsctl_is_node(tdvp)) { + >>>>> tdzp = VTOZ(tdvp); >> >>> The problem with this change, at least on FreeBSD, is that tdvp may >>> not belong to ZFS. In that case VTOZ(tdvp) does not make any sense >>> and would produce garbage or trigger an assert. Previously >>> tdvp->v_vfsp != sdvp->v_vfsp check would catch that situations. Two >>> side notes: - v_vfsp is actually v_mount on FreeBSD >> >> Ah that's good point. Any objection in putting a change to their >> _freebsd_ counterpart (zfs_freebsd_rename and zfs_freebsd_link) as >> attached? > > I think that at least the change to zfs_freebsd_rename as it is now would break > locking and reference counting semantics for the vnodes involved -- vreles and > vputs have to be done even in the error case. > > Also, look at the check at the start of ufs_rename, it also considers tvp when > it's not NULL. I am not sure if it is possible to have a situation where fvp > and tdvp are from the same fs, but tvp is from a different one. > > I've been also tempted to place the check in the common code in kern_renameat. > That should cover the system calls. But could be insufficient for direct calls > to VOP_RENAME in other places. > > diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c > index a7cb87a..cfa4d93 100644 > --- a/sys/kern/vfs_syscalls.c > +++ b/sys/kern/vfs_syscalls.c > @@ -3608,6 +3608,14 @@ kern_renameat(struct thread *td, int oldfd, char *old, > int newfd, char *new, > error = EINVAL; > goto out; > } > + > + /* Check for cross-device rename. */ > + if ((fvp->v_mount != tdvp->v_mount) || > + (tvp && (fvp->v_mount != tvp->v_mount))) { > + error = EXDEV; > + goto out; > + } > + > /* > * If the source is the same as the destination (that is, if they > * are links to the same vnode), then there is nothing to do. > >>> - VOP_REALVP is a glorified nop on FreeBSD >> >> It's not clear to me what was the intention for having a macro instead >> of just ifdef'ing the code out -- maybe to prevent unwanted conflict >> with upstream? These two VOP's are the only consumers of VOP_REALVP >> in tree. > > Yes. Personally I would just ifdef out the calls. > >>> Another unrelated problem that existed before this change and has >>> been noted by Davide Italiano is that sdvp is not locked and so it >>> can potentially be recycled before ZFS_ENTER() enter and for that >>> reason sdzp and zfsvfs could be invalid. Because sdvp is >>> referenced, this problem can currently occur only if a forced >>> unmount runs concurrently to zfs_rename. tdvp should be locked and >>> thus could be used instead of sdvp as a source for zfsvfs. >> >> I think this would need more work, I'll take a look after we have this >> regression fixed. > > Thank you. > > -- > Andriy Gapon I've written a patch that attempts to fix the second problem. http://people.freebsd.org/~davide/review/zfsrename_recycle.diff The culprit is that we're dereferencing sdvp without the vnode lock held, so data-stability is not guaranteed. tdvp, instead, is locked at the entry point of VOP_RENAME() (at least according to vop_rename_pre()) so it can be safely used. As pointed out by Andriy ZFS has some different mechanisms wrt other file systems that allow the vnode to not be recycled when it's referenced (ZFS_ENTER), so once we get zfsvfs_t * from tdzp we can call ZFS_ENTER and dereference sdvp in a safe manner. Thanks, -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 11:50:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C5F461AA; Tue, 27 Aug 2013 11:50:33 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B390A2191; Tue, 27 Aug 2013 11:50:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RBoXFM028285; Tue, 27 Aug 2013 11:50:33 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RBoXhl028284; Tue, 27 Aug 2013 11:50:33 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201308271150.r7RBoXhl028284@svn.freebsd.org> From: Hiroki Sato Date: Tue, 27 Aug 2013 11:50:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254955 - head/usr.sbin/rtadvd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 11:50:33 -0000 Author: hrs Date: Tue Aug 27 11:50:33 2013 New Revision: 254955 URL: http://svnweb.freebsd.org/changeset/base/254955 Log: Fix a crash when reloading the configuration file. Spotted by: des Modified: head/usr.sbin/rtadvd/config.c Modified: head/usr.sbin/rtadvd/config.c ============================================================================== --- head/usr.sbin/rtadvd/config.c Tue Aug 27 06:50:46 2013 (r254954) +++ head/usr.sbin/rtadvd/config.c Tue Aug 27 11:50:33 2013 (r254955) @@ -296,10 +296,8 @@ rm_rainfo(struct rainfo *rai) if (rai->rai_ra_data != NULL) free(rai->rai_ra_data); - while ((pfx = TAILQ_FIRST(&rai->rai_prefix)) != NULL) { - TAILQ_REMOVE(&rai->rai_prefix, pfx, pfx_next); - free(pfx); - } + while ((pfx = TAILQ_FIRST(&rai->rai_prefix)) != NULL) + delete_prefix(pfx); while ((sol = TAILQ_FIRST(&rai->rai_soliciter)) != NULL) { TAILQ_REMOVE(&rai->rai_soliciter, sol, sol_next); free(sol); From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 14:37:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0FF5175B; Tue, 27 Aug 2013 14:37:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D7B1C2C06; Tue, 27 Aug 2013 14:37:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7REbDJg023932; Tue, 27 Aug 2013 14:37:13 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7REbDrI023930; Tue, 27 Aug 2013 14:37:13 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201308271437.r7REbDrI023930@svn.freebsd.org> From: Adrian Chadd Date: Tue, 27 Aug 2013 14:37:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254956 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 14:37:14 -0000 Author: adrian Date: Tue Aug 27 14:37:13 2013 New Revision: 254956 URL: http://svnweb.freebsd.org/changeset/base/254956 Log: Create a new function to complete 802.11 mbuf transmission. The aim of this function is to eventually be the completion entry point for all 802.11 encapsulated mbufs. All the wifi drivers end up doing what is in this function so it's an easy win to turn it into a net80211 method and abstract out this code. Ideally the drivers will all eventually be modified to queue up completed mbufs and call this function with all the driver locks not held. This will allow for some much more interesting software queue handling in the future (like net80211 based A-MSDU, fast-frames, A-MPDU aggregation and retransmission.) Tested: * ath(4), iwn(4) Modified: head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_proto.h Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Tue Aug 27 11:50:33 2013 (r254955) +++ head/sys/net80211/ieee80211_output.c Tue Aug 27 14:37:13 2013 (r254956) @@ -3353,3 +3353,34 @@ ieee80211_ff_encap1(struct ieee80211vap mtod(m, struct ether_header *)->ether_type = htons(payload); return m; } + +/* + * Complete an mbuf transmission. + * + * For now, this simply processes a completed frame after the + * driver has completed it's transmission and/or retransmission. + * It assumes the frame is an 802.11 encapsulated frame. + * + * Later on it will grow to become the exit path for a given frame + * from the driver and, depending upon how it's been encapsulated + * and already transmitted, it may end up doing A-MPDU retransmission, + * power save requeuing, etc. + * + * In order for the above to work, the driver entry point to this + * must not hold any driver locks. Thus, the driver needs to delay + * any actual mbuf completion until it can release said locks. + * + * This frees the mbuf and if the mbuf has a node reference, + * the node reference will be freed. + */ +void +ieee80211_tx_complete(struct ieee80211_node *ni, struct mbuf *m, int status) +{ + + if (ni != NULL) { + if (m->m_flags & M_TXCB) + ieee80211_process_callback(ni, m, status); + ieee80211_free_node(ni); + } + m_freem(m); +} Modified: head/sys/net80211/ieee80211_proto.h ============================================================================== --- head/sys/net80211/ieee80211_proto.h Tue Aug 27 11:50:33 2013 (r254955) +++ head/sys/net80211/ieee80211_proto.h Tue Aug 27 14:37:13 2013 (r254956) @@ -127,6 +127,8 @@ int ieee80211_send_probereq(struct ieee8 const uint8_t *ssid, size_t ssidlen); struct mbuf * ieee80211_ff_encap1(struct ieee80211vap *, struct mbuf *, const struct ether_header *); +void ieee80211_tx_complete(struct ieee80211_node *, + struct mbuf *, int); /* * The formation of ProbeResponse frames requires guidance to From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 14:39:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 239968D7; Tue, 27 Aug 2013 14:39:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0FD552C2D; Tue, 27 Aug 2013 14:39:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7REdbxH024876; Tue, 27 Aug 2013 14:39:37 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7REdbmu024875; Tue, 27 Aug 2013 14:39:37 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201308271439.r7REdbmu024875@svn.freebsd.org> From: Adrian Chadd Date: Tue, 27 Aug 2013 14:39:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254957 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 14:39:38 -0000 Author: adrian Date: Tue Aug 27 14:39:37 2013 New Revision: 254957 URL: http://svnweb.freebsd.org/changeset/base/254957 Log: Use the new ieee80211_tx_complete() function. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Tue Aug 27 14:37:13 2013 (r254956) +++ head/sys/dev/ath/if_ath.c Tue Aug 27 14:39:37 2013 (r254957) @@ -4581,17 +4581,8 @@ ath_tx_freebuf(struct ath_softc *sc, str /* Free the buffer, it's not needed any longer */ ath_freebuf(sc, bf); - if (ni != NULL) { - /* - * Do any callback and reclaim the node reference. - */ - if (m0->m_flags & M_TXCB) - ieee80211_process_callback(ni, m0, status); - ieee80211_free_node(ni); - } - - /* Finally, we don't need this mbuf any longer */ - m_freem(m0); + /* Pass the buffer back to net80211 - completing it */ + ieee80211_tx_complete(ni, m0, status); } static struct ath_buf * From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 14:48:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 74C9FC10; Tue, 27 Aug 2013 14:48:02 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 626482CC7; Tue, 27 Aug 2013 14:48:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7REm2xS029772; Tue, 27 Aug 2013 14:48:02 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7REm2bX029771; Tue, 27 Aug 2013 14:48:02 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201308271448.r7REm2bX029771@svn.freebsd.org> From: Devin Teske Date: Tue, 27 Aug 2013 14:48:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254958 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 14:48:02 -0000 Author: dteske Date: Tue Aug 27 14:48:01 2013 New Revision: 254958 URL: http://svnweb.freebsd.org/changeset/base/254958 Log: It was brought to my attention that SVN r252862 was incomplete. It needed to also make this change, to completely deprecate WITH_BSDCONFIG. Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Tue Aug 27 14:39:37 2013 (r254957) +++ head/share/mk/bsd.own.mk Tue Aug 27 14:48:01 2013 (r254958) @@ -369,7 +369,6 @@ __DEFAULT_NO_OPTIONS = \ BIND_LIBS \ BIND_SIGCHASE \ BIND_XML \ - BSDCONFIG \ BSD_GREP \ CLANG_EXTRAS \ CTF \ From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 15:06:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1D544721; Tue, 27 Aug 2013 15:06:40 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 09E0B2E01; Tue, 27 Aug 2013 15:06:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RF6d7a041151; Tue, 27 Aug 2013 15:06:39 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RF6dMb041150; Tue, 27 Aug 2013 15:06:39 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201308271506.r7RF6dMb041150@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 27 Aug 2013 15:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254959 - head/usr.sbin/crashinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 15:06:40 -0000 Author: gavin Date: Tue Aug 27 15:06:39 2013 New Revision: 254959 URL: http://svnweb.freebsd.org/changeset/base/254959 Log: Allow more space for interface names. MFC after: 1 week Modified: head/usr.sbin/crashinfo/crashinfo.sh Modified: head/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- head/usr.sbin/crashinfo/crashinfo.sh Tue Aug 27 14:48:01 2013 (r254958) +++ head/usr.sbin/crashinfo/crashinfo.sh Tue Aug 27 15:06:39 2013 (r254959) @@ -268,9 +268,9 @@ netstat -M $VMCORE -N $KERNEL -m echo echo "------------------------------------------------------------------------" -echo "netstat -id" +echo "netstat -idW" echo -netstat -M $VMCORE -N $KERNEL -id +netstat -M $VMCORE -N $KERNEL -idW echo echo "------------------------------------------------------------------------" From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 15:50:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EC34D8E6; Tue, 27 Aug 2013 15:50:26 +0000 (UTC) (envelope-from will@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CA6A220B7; Tue, 27 Aug 2013 15:50:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RFoQbV067180; Tue, 27 Aug 2013 15:50:26 GMT (envelope-from will@svn.freebsd.org) Received: (from will@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RFoQXe067178; Tue, 27 Aug 2013 15:50:26 GMT (envelope-from will@svn.freebsd.org) Message-Id: <201308271550.r7RFoQXe067178@svn.freebsd.org> From: Will Andrews Date: Tue, 27 Aug 2013 15:50:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254960 - in head: contrib/pam_modules/pam_passwdqc lib/libpam/modules/pam_passwdqc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 15:50:27 -0000 Author: will Date: Tue Aug 27 15:50:26 2013 New Revision: 254960 URL: http://svnweb.freebsd.org/changeset/base/254960 Log: Make the PAM password strength checking module WARNS=2 safe. lib/libpam/modules/pam_passwdqc/Makefile: Bump WARNS to 2. contrib/pam_modules/pam_passwdqc/pam_passwdqc.c: Bump _XOPEN_SOURCE and _XOPEN_VERSION from 500 to 600 so that vsnprint() is declared. Use the two new union types (pam_conv_item_t and pam_text_item_t) to resolve strict aliasing violations caused by casts to comply with the pam_get_item() API taking a "const void **" for all item types. Warnings are generated for casts that create "type puns" (pointers of conflicting sized types that are set to access the same memory location) since these pointers may be used in ways that violate C's strict aliasing rules. Casts to a new type must be performed through a union in order to be compliant, and access must be performed through only one of the union's data types during the lifetime of the union instance. Handle strict-aliasing warnings through pointer assignments, which drastically simplifies this change. Correct a CLANG "printf-like function with more arguments than format" error. Submitted by: gibbs Sponsored by: Spectra Logic Modified: head/contrib/pam_modules/pam_passwdqc/pam_passwdqc.c head/lib/libpam/modules/pam_passwdqc/Makefile Modified: head/contrib/pam_modules/pam_passwdqc/pam_passwdqc.c ============================================================================== --- head/contrib/pam_modules/pam_passwdqc/pam_passwdqc.c Tue Aug 27 15:06:39 2013 (r254959) +++ head/contrib/pam_modules/pam_passwdqc/pam_passwdqc.c Tue Aug 27 15:50:26 2013 (r254960) @@ -2,9 +2,9 @@ * Copyright (c) 2000-2002 by Solar Designer. See LICENSE. */ -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 600 #define _XOPEN_SOURCE_EXTENDED -#define _XOPEN_VERSION 500 +#define _XOPEN_VERSION 600 #include #include #include @@ -132,17 +132,19 @@ static params_t defaults = { static int converse(pam_handle_t *pamh, int style, lo_const char *text, struct pam_response **resp) { - struct pam_conv *conv; + pam_item_t item; + lo_const struct pam_conv *conv; struct pam_message msg, *pmsg; int status; - status = pam_get_item(pamh, PAM_CONV, (pam_item_t *)&conv); + status = pam_get_item(pamh, PAM_CONV, &item); if (status != PAM_SUCCESS) return status; + conv = item; pmsg = &msg; msg.msg_style = style; - msg.msg = text; + msg.msg = (char *)text; *resp = NULL; return conv->conv(1, (lo_const struct pam_message **)&pmsg, resp, @@ -294,8 +296,11 @@ static int parse(params_t *params, pam_h } if (argc) { - say(pamh, PAM_ERROR_MSG, getuid() != 0 ? - MESSAGE_MISCONFIGURED : MESSAGE_INVALID_OPTION, *argv); + if (getuid() != 0) { + say(pamh, PAM_ERROR_MSG, MESSAGE_MISCONFIGURED); + } else { + say(pamh, PAM_ERROR_MSG, MESSAGE_INVALID_OPTION, *argv); + } return PAM_ABORT; } @@ -311,7 +316,9 @@ PAM_EXTERN int pam_sm_chauthtok(pam_hand #ifdef HAVE_SHADOW struct spwd *spw; #endif - char *user, *oldpass, *newpass, *randompass; + pam_item_t item; + lo_const char *user, *oldpass, *curpass; + char *newpass, *randompass; const char *reason; int ask_oldauthtok; int randomonly, enforce, retries_left, retry_wanted; @@ -353,17 +360,19 @@ PAM_EXTERN int pam_sm_chauthtok(pam_hand if (flags & PAM_PRELIM_CHECK) return status; - status = pam_get_item(pamh, PAM_USER, (pam_item_t *)&user); + status = pam_get_item(pamh, PAM_USER, &item); if (status != PAM_SUCCESS) return status; + user = item; - status = pam_get_item(pamh, PAM_OLDAUTHTOK, (pam_item_t *)&oldpass); + status = pam_get_item(pamh, PAM_OLDAUTHTOK, &item); if (status != PAM_SUCCESS) return status; + oldpass = item; if (params.flags & F_NON_UNIX) { pw = &fake_pw; - pw->pw_name = user; + pw->pw_name = (char *)user; pw->pw_gecos = ""; } else { pw = getpwnam(user); @@ -405,13 +414,13 @@ PAM_EXTERN int pam_sm_chauthtok(pam_hand enforce = params.flags & F_ENFORCE_ROOT; if (params.flags & F_USE_AUTHTOK) { - status = pam_get_item(pamh, PAM_AUTHTOK, - (pam_item_t *)&newpass); + status = pam_get_item(pamh, PAM_AUTHTOK, &item); if (status != PAM_SUCCESS) return status; - if (!newpass || (check_max(¶ms, pamh, newpass) && enforce)) + curpass = item; + if (!curpass || (check_max(¶ms, pamh, curpass) && enforce)) return PAM_AUTHTOK_ERR; - reason = _passwdqc_check(¶ms.qc, newpass, oldpass, pw); + reason = _passwdqc_check(¶ms.qc, curpass, oldpass, pw); if (reason) { say(pamh, PAM_ERROR_MSG, MESSAGE_WEAKPASS, reason); if (enforce) @@ -487,7 +496,7 @@ retry: if (!newpass) { if (randompass) _pam_overwrite(randompass); - return PAM_AUTHTOK_ERR; + return status; } if (check_max(¶ms, pamh, newpass) && enforce) { Modified: head/lib/libpam/modules/pam_passwdqc/Makefile ============================================================================== --- head/lib/libpam/modules/pam_passwdqc/Makefile Tue Aug 27 15:06:39 2013 (r254959) +++ head/lib/libpam/modules/pam_passwdqc/Makefile Tue Aug 27 15:50:26 2013 (r254960) @@ -7,7 +7,7 @@ LIB= pam_passwdqc SRCS= pam_passwdqc.c passwdqc_check.c passwdqc_random.c wordset_4k.c MAN= pam_passwdqc.8 -WARNS?= 0 +WARNS?= 2 CFLAGS+= -I${SRCDIR} DPADD= ${LIBCRYPT} From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 16:10:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4B805FAC; Tue, 27 Aug 2013 16:10:45 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 39B8921CA; Tue, 27 Aug 2013 16:10:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RGAj1T079200; Tue, 27 Aug 2013 16:10:45 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RGAj4T079199; Tue, 27 Aug 2013 16:10:45 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201308271610.r7RGAj4T079199@svn.freebsd.org> From: Devin Teske Date: Tue, 27 Aug 2013 16:10:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254961 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 16:10:45 -0000 Author: dteske Date: Tue Aug 27 16:10:44 2013 New Revision: 254961 URL: http://svnweb.freebsd.org/changeset/base/254961 Log: Add note/reminder about dialog(1) regression in HEAD/10.0-C so that we don't forget about it in the multi-month run of things to fix prior to 10.0-R. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Aug 27 15:50:26 2013 (r254960) +++ head/UPDATING Tue Aug 27 16:10:44 2013 (r254961) @@ -31,6 +31,19 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130827: + Thomas Dickey (vendor author thereof) reports that dialog(1) since + 2011/10/18 has a bug in handling --hline. Testers and I noticed the + --hline is not ignored but displayed as a NULL string, regardless of + value. This will cause confusion in some bsdconfig dialogs where the + --hline is used to inform users which keybindings to use. This will + likewise affect any other persons relying on --hline. It also looks + rather strange seeing "[]" at the bottom of dialog(1) widgets when + passing --hline "anything". Thomas said he will have a look in a few + weeks. NOTE: The "[]" brackets appear with the left-edge where it + would normally appear given the width of text to display, but the + displayed text is not there (part of the bug). + 20130821: The PADLOCK_RNG and RDRAND_RNG kernel options are now devices. Thus "device padlock_rng" and "device rdrand_rng" should be From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 16:30:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1A4C1748; Tue, 27 Aug 2013 16:30:51 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 08710233F; Tue, 27 Aug 2013 16:30:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RGUoAZ089070; Tue, 27 Aug 2013 16:30:50 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RGUod4089069; Tue, 27 Aug 2013 16:30:50 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201308271630.r7RGUod4089069@svn.freebsd.org> From: Devin Teske Date: Tue, 27 Aug 2013 16:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254962 - in head: share/man/man5 tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 16:30:51 -0000 Author: dteske Date: Tue Aug 27 16:30:50 2013 New Revision: 254962 URL: http://svnweb.freebsd.org/changeset/base/254962 Log: Formally remove WITH_BSDCONFIG build option and re-generate src.conf.5 NOTE: Should have been inline with revisions 252862 and 254958. Deleted: head/tools/build/options/WITH_BSDCONFIG Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Tue Aug 27 16:10:44 2013 (r254961) +++ head/share/man/man5/src.conf.5 Tue Aug 27 16:30:50 2013 (r254962) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 253304 2013-07-12 23:08:44Z bapt .\" $FreeBSD$ -.Dd August 26, 2013 +.Dd August 27, 2013 .Dt SRC.CONF 5 .Os .Sh NAME @@ -704,9 +704,9 @@ and On amd64, set to not build 32-bit library set and a .Nm ld-elf32.so.1 runtime linker. -.It Va WITHOUT_LIBCPLUSPLUS -.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBCPLUSPLUS 246262 2013-02-02 22:42:46Z dim -Set to avoid building libcxxrt and libc++. +.It Va WITH_LIBCPLUSPLUS +.\" from FreeBSD: head/tools/build/options/WITH_LIBCPLUSPLUS 228082 2011-11-28 17:56:46Z dim +Set to build libcxxrt and libc++. .It Va WITH_LIBICONV_COMPAT .\" from FreeBSD: head/tools/build/options/WITH_LIBICONV_COMPAT 254919 2013-08-26 17:15:56Z antoine Set to build libiconv API and link time compatibility. From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 16:45:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 25B9E998; Tue, 27 Aug 2013 16:45:01 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 14190240E; Tue, 27 Aug 2013 16:45:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RGj0nk097860; Tue, 27 Aug 2013 16:45:00 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RGj02Y097859; Tue, 27 Aug 2013 16:45:00 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201308271645.r7RGj02Y097859@svn.freebsd.org> From: Alfred Perlstein Date: Tue, 27 Aug 2013 16:45:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254963 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 16:45:01 -0000 Author: alfred Date: Tue Aug 27 16:45:00 2013 New Revision: 254963 URL: http://svnweb.freebsd.org/changeset/base/254963 Log: Remove include opt_ofed.h since OFED is unifdef'd. Pointed out by: glebius Modified: head/sys/net/if_llatbl.h Modified: head/sys/net/if_llatbl.h ============================================================================== --- head/sys/net/if_llatbl.h Tue Aug 27 16:30:50 2013 (r254962) +++ head/sys/net/if_llatbl.h Tue Aug 27 16:45:00 2013 (r254963) @@ -30,8 +30,6 @@ __FBSDID("$FreeBSD$"); #ifndef _NET_IF_LLATBL_H_ #define _NET_IF_LLATBL_H_ -#include "opt_ofed.h" - #include #include From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 16:49:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3E65EB10; Tue, 27 Aug 2013 16:49:21 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2CB912433; Tue, 27 Aug 2013 16:49:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RGnLqV099446; Tue, 27 Aug 2013 16:49:21 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RGnLjI099445; Tue, 27 Aug 2013 16:49:21 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201308271649.r7RGnLjI099445@svn.freebsd.org> From: Neel Natu Date: Tue, 27 Aug 2013 16:49:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254964 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 16:49:21 -0000 Author: neel Date: Tue Aug 27 16:49:20 2013 New Revision: 254964 URL: http://svnweb.freebsd.org/changeset/base/254964 Log: Add support for emulating the byte move instruction "mov r/m8, r8". This emulation is required when dumping MMIO space via the ddb "examine" command. Modified: head/sys/amd64/vmm/vmm_instruction_emul.c Modified: head/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- head/sys/amd64/vmm/vmm_instruction_emul.c Tue Aug 27 16:45:00 2013 (r254963) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Tue Aug 27 16:49:20 2013 (r254964) @@ -77,6 +77,10 @@ static const struct vie_op one_byte_opco .op_byte = 0x89, .op_type = VIE_OP_TYPE_MOV, }, + [0x8A] = { + .op_byte = 0x8A, + .op_type = VIE_OP_TYPE_MOV, + }, [0x8B] = { .op_byte = 0x8B, .op_type = VIE_OP_TYPE_MOV, @@ -268,13 +272,18 @@ emulate_mov(void *vm, int vcpuid, uint64 error = memwrite(vm, vcpuid, gpa, val, size, arg); } break; + case 0x8A: case 0x8B: /* * MOV from mem (ModRM:r/m) to reg (ModRM:reg) + * 8A/r: mov r/m8, r8 + * REX + 8A/r: mov r/m8, r8 * 8B/r: mov r32, r/m32 * REX.W 8B/r: mov r64, r/m64 */ - if (vie->rex_w) + if (vie->op.op_byte == 0x8A) + size = 1; + else if (vie->rex_w) size = 8; error = memread(vm, vcpuid, gpa, &val, size, arg); if (error == 0) { @@ -688,7 +697,6 @@ decode_modrm(struct vie *vie) vie->base_register = VM_REG_GUEST_RIP; else vie->base_register = VM_REG_LAST; - } break; } From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 16:50:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2AE11C5E; Tue, 27 Aug 2013 16:50:49 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 18F8F2467; Tue, 27 Aug 2013 16:50:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RGomeI002116; Tue, 27 Aug 2013 16:50:48 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RGomXs002115; Tue, 27 Aug 2013 16:50:48 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201308271650.r7RGomXs002115@svn.freebsd.org> From: Neel Natu Date: Tue, 27 Aug 2013 16:50:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254965 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 16:50:49 -0000 Author: neel Date: Tue Aug 27 16:50:48 2013 New Revision: 254965 URL: http://svnweb.freebsd.org/changeset/base/254965 Log: Allow single byte reads of the emulated MSI-X tables. This is not required by the PCI specification but needed to dump MMIO space from "ddb" in the guest. Modified: head/usr.sbin/bhyve/pci_emul.c Modified: head/usr.sbin/bhyve/pci_emul.c ============================================================================== --- head/usr.sbin/bhyve/pci_emul.c Tue Aug 27 16:49:20 2013 (r254964) +++ head/usr.sbin/bhyve/pci_emul.c Tue Aug 27 16:50:48 2013 (r254965) @@ -245,8 +245,12 @@ pci_emul_msix_tread(struct pci_devinst * int tab_index; uint64_t retval = ~0; - /* support only 4 or 8 byte reads */ - if (size != 4 && size != 8) + /* + * The PCI standard only allows 4 and 8 byte accesses to the MSI-X + * table but we also allow 1 byte access to accomodate reads from + * ddb. + */ + if (size != 1 && size != 4 && size != 8) return (retval); msix_entry_offset = offset % MSIX_TABLE_ENTRY_SIZE; @@ -263,7 +267,9 @@ pci_emul_msix_tread(struct pci_devinst * dest = (char *)(pi->pi_msix.table + tab_index); dest += msix_entry_offset; - if (size == 4) + if (size == 1) + retval = *((uint8_t *)dest); + else if (size == 4) retval = *((uint32_t *)dest); else retval = *((uint64_t *)dest); From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 17:06:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AFFD11F6; Tue, 27 Aug 2013 17:06:59 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-pd0-x230.google.com (mail-pd0-x230.google.com [IPv6:2607:f8b0:400e:c02::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6DD9F2549; Tue, 27 Aug 2013 17:06:59 +0000 (UTC) Received: by mail-pd0-f176.google.com with SMTP id q10so5121575pdj.21 for ; Tue, 27 Aug 2013 10:06:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=a2VUE6DEjR7b3FzchEk7XXsHEzy1APURhDUZG9UTL1s=; b=DKGyl9/srmsizTPTMh2+bdeqEEwSh36Jgqs4hC7G/ATxZC+yn9CFZboF7ArhuCdE8l q9vODbN9xkBypxzAVlui9DLjcYJkWtRzPApNXqZ0j9GTpt1yurMijAMQq1lLtikop2Ai 5pGhkcXezeH6D3Cte8SFNNU4LVrUtrJY0/e8zhrCAAs89CCnZKK0dO1ZlPbk53IucRCq 9MO4v6pPZ1qs3STUQkPsgMCOrCVLIg1wWuEy890dUdKH8R0dq1RpJ+lUsO0+0thu9K84 stO+Qwq9FvnD8jo7blrpltd39jUW5LwMcu6jpmL3hIzJlY2hpTx1gDPkITCMvVpaeu6e 0YBA== X-Received: by 10.68.254.138 with SMTP id ai10mr10366947pbd.151.1377623219063; Tue, 27 Aug 2013 10:06:59 -0700 (PDT) Received: from [10.192.166.0] (stargate.chelsio.com. [67.207.112.58]) by mx.google.com with ESMTPSA id om2sm25747744pbb.34.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 27 Aug 2013 10:06:57 -0700 (PDT) Sender: Navdeep Parhar Message-ID: <521CDCAF.10502@FreeBSD.org> Date: Tue, 27 Aug 2013 10:06:55 -0700 From: Navdeep Parhar User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130819 Thunderbird/17.0.8 MIME-Version: 1.0 To: Alfred Perlstein , Garrett Cooper Subject: Re: svn commit: r254963 - head/sys/net References: <201308271645.r7RGj02Y097859@svn.freebsd.org> In-Reply-To: <201308271645.r7RGj02Y097859@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 17:06:59 -0000 Garrett had posted some patches to get OFED to build as modules. http://lists.freebsd.org/pipermail/freebsd-questions/2013-June/251521.html After these changes (r254823, r254963) and with the patches above, is it possible to build the kernel parts of OFED as modules that would work with GENERIC? Regards, Navdeep On 08/27/13 09:45, Alfred Perlstein wrote: > Author: alfred > Date: Tue Aug 27 16:45:00 2013 > New Revision: 254963 > URL: http://svnweb.freebsd.org/changeset/base/254963 > > Log: > Remove include opt_ofed.h since OFED is unifdef'd. > > Pointed out by: glebius > > Modified: > head/sys/net/if_llatbl.h > > Modified: head/sys/net/if_llatbl.h > ============================================================================== > --- head/sys/net/if_llatbl.h Tue Aug 27 16:30:50 2013 (r254962) > +++ head/sys/net/if_llatbl.h Tue Aug 27 16:45:00 2013 (r254963) > @@ -30,8 +30,6 @@ __FBSDID("$FreeBSD$"); > #ifndef _NET_IF_LLATBL_H_ > #define _NET_IF_LLATBL_H_ > > -#include "opt_ofed.h" > - > #include > #include > > From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 18:16:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B365DE17; Tue, 27 Aug 2013 18:16:50 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 868E12971; Tue, 27 Aug 2013 18:16:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RIGowY060153; Tue, 27 Aug 2013 18:16:50 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RIGooN060152; Tue, 27 Aug 2013 18:16:50 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201308271816.r7RIGooN060152@svn.freebsd.org> From: Devin Teske Date: Tue, 27 Aug 2013 18:16:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254966 - stable/9/usr.sbin X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 18:16:50 -0000 Author: dteske Date: Tue Aug 27 18:16:50 2013 New Revision: 254966 URL: http://svnweb.freebsd.org/changeset/base/254966 Log: Add missing mergeinfo from head for stabe/9 revisions: 252995 253168 253169 Modified: Directory Properties: stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/Makefile (props changed) stable/9/usr.sbin/bsdconfig/ (props changed) From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 18:27:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0CED178; Tue, 27 Aug 2013 18:27:04 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mail0.glenbarber.us (mail0.glenbarber.us [208.86.227.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D1A2A29E6; Tue, 27 Aug 2013 18:27:03 +0000 (UTC) Received: from glenbarber.us (unknown [IPv6:2001:470:8:1205:3119:eb32:14c4:b83a]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id 3170521BE; Tue, 27 Aug 2013 18:27:02 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us 3170521BE Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Tue, 27 Aug 2013 14:27:00 -0400 From: Glen Barber To: Devin Teske Subject: Re: svn commit: r254966 - stable/9/usr.sbin Message-ID: <20130827182700.GY49310@glenbarber.us> References: <201308271816.r7RIGooN060152@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5Y5y2FX8vnqwSxRu" Content-Disposition: inline In-Reply-To: <201308271816.r7RIGooN060152@svn.freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 18:27:04 -0000 --5Y5y2FX8vnqwSxRu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 27, 2013 at 06:16:50PM +0000, Devin Teske wrote: > Author: dteske > Date: Tue Aug 27 18:16:50 2013 > New Revision: 254966 > URL: http://svnweb.freebsd.org/changeset/base/254966 >=20 > Log: > Add missing mergeinfo from head for stabe/9 revisions: 252995 253168 25= 3169 >=20 > Modified: > Directory Properties: > stable/9/usr.sbin/ (props changed) > stable/9/usr.sbin/Makefile (props changed) > stable/9/usr.sbin/bsdconfig/ (props changed) This is wrong. usr.sbin should never be a merge target. The correct merge targets in this case are usr.sbin/bsdconfig/share and usr.sbin/bsdconfig. Glen --5Y5y2FX8vnqwSxRu Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQEcBAEBCAAGBQJSHO90AAoJEFJPDDeguUaje+wIALTQ+JQROx3hzQ1mB51VUft3 Vm6PPWGzDtyBzYibOEjQEr8QerAnVyGrRznnbfz6BK11ppZBrZg3IH9D9S2ns+vh bWHMDBrcPzShqBQWi33jLYCWIsE/1M5v8PWAGHW+z4ZeM5yZjPaIm0oZfeZYPMdc pqWIU43Sr2c6uvJYHbGnquq9DHjewJwZ8Q7y/2MKxjFk5E3Ptx4/mL+iIPrm3u17 aXfBMV76redHbtAMwSNWjfwugcuPx0gzdnEI/E0W/OdtKnZNJr+KB6Bn4nY0DvMS UEn+Yxrt90SJozCe4MD6pPrKCvT5HHklrkVfjWuTI6wD+tOAC0WbZY5Rz7gjOGU= =N3i+ -----END PGP SIGNATURE----- --5Y5y2FX8vnqwSxRu-- From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 18:29:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C81EF1EA; Tue, 27 Aug 2013 18:29:39 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 915D329F9; Tue, 27 Aug 2013 18:29:39 +0000 (UTC) Received: from smtp.fisglobal.com ([10.132.206.17]) by ltcfislmsgpa01.fnfis.com (8.14.5/8.14.5) with ESMTP id r7RITcMT010789 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Tue, 27 Aug 2013 13:29:38 -0500 Received: from [10.0.0.100] (10.242.181.54) by smtp.fisglobal.com (10.132.206.17) with Microsoft SMTP Server (TLS) id 14.2.309.2; Tue, 27 Aug 2013 13:29:36 -0500 Subject: Re: svn commit: r254966 - stable/9/usr.sbin MIME-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset="us-ascii" From: Devin Teske In-Reply-To: <20130827182700.GY49310@glenbarber.us> Date: Tue, 27 Aug 2013 11:29:28 -0700 Content-Transfer-Encoding: quoted-printable Message-ID: References: <201308271816.r7RIGooN060152@svn.freebsd.org> <20130827182700.GY49310@glenbarber.us> To: Glen Barber X-Mailer: Apple Mail (2.1283) X-Originating-IP: [10.242.181.54] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8794, 1.0.431, 0.0.0000 definitions=2013-08-27_08:2013-08-27,2013-08-27,1970-01-01 signatures=0 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Devin Teske , src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Devin Teske List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 18:29:39 -0000 On Aug 27, 2013, at 11:27 AM, Glen Barber wrote: > On Tue, Aug 27, 2013 at 06:16:50PM +0000, Devin Teske wrote: >> Author: dteske >> Date: Tue Aug 27 18:16:50 2013 >> New Revision: 254966 >> URL: https://urldefense.proofpoint.com/v1/url?u=3Dhttp://svnweb.freebsd.= org/changeset/base/254966&k=3D%2FbkpAUdJWZuiTILCq%2FFnQg%3D%3D%0A&r=3DMrjs6= vR4%2Faj2Ns9%2FssHJjg%3D%3D%0A&m=3Dliaz95fhD2jvIKdlVPU7U5L5wSUmvhBIn55r4kCX= nMQ%3D%0A&s=3Dc379f1e4272fc0b90042e434234eaeb4a6ec9a169fefc38babe82b5556cdd= 358 >>=20 >> Log: >> Add missing mergeinfo from head for stabe/9 revisions: 252995 253168 25= 3169 >>=20 >> Modified: >> Directory Properties: >> stable/9/usr.sbin/ (props changed) >> stable/9/usr.sbin/Makefile (props changed) >> stable/9/usr.sbin/bsdconfig/ (props changed) >=20 > This is wrong. usr.sbin should never be a merge target. The correct > merge targets in this case are usr.sbin/bsdconfig/share and > usr.sbin/bsdconfig. >=20 But but... (first... apologies) For clarification... How exactly would someone merge the mergeinfo for the usr.sbin/Makefile? In a separate commit? That seems (not arguing... but...) seems counter-intu= itive to require so much churn for a touch-up. Despite the fact that the commit was done in usr.sbin... The *merges* were actually done at the right level. --=20 Devin _____________ The information contained in this message is proprietary and/or confidentia= l. If you are not the intended recipient, please: (i) delete the message an= d all copies; (ii) do not disclose, distribute or use the message in any ma= nner; and (iii) notify the sender immediately. In addition, please be aware= that any message addressed to our domain is subject to archiving and revie= w by persons other than the intended recipient. Thank you. From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 18:33:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3B4704C6; Tue, 27 Aug 2013 18:33:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mail0.glenbarber.us (mail0.glenbarber.us [IPv6:2607:fc50:1:2300:1001:1001:1001:face]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0DED72A71; Tue, 27 Aug 2013 18:33:23 +0000 (UTC) Received: from glenbarber.us (unknown [IPv6:2001:470:8:1205:3119:eb32:14c4:b83a]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id E06A1223A; Tue, 27 Aug 2013 18:33:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us E06A1223A Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Tue, 27 Aug 2013 14:33:20 -0400 From: Glen Barber To: Devin Teske Subject: Re: svn commit: r254966 - stable/9/usr.sbin Message-ID: <20130827183320.GZ49310@glenbarber.us> References: <201308271816.r7RIGooN060152@svn.freebsd.org> <20130827182700.GY49310@glenbarber.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pqZtgxSH0iQu6R78" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 18:33:23 -0000 --pqZtgxSH0iQu6R78 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 27, 2013 at 11:29:28AM -0700, Devin Teske wrote: >=20 > On Aug 27, 2013, at 11:27 AM, Glen Barber wrote: >=20 > > On Tue, Aug 27, 2013 at 06:16:50PM +0000, Devin Teske wrote: > >> Author: dteske > >> Date: Tue Aug 27 18:16:50 2013 > >> New Revision: 254966 > >> URL: https://urldefense.proofpoint.com/v1/url?u=3Dhttp://svnweb.freebs= d.org/changeset/base/254966&k=3D%2FbkpAUdJWZuiTILCq%2FFnQg%3D%3D%0A&r=3DMrj= s6vR4%2Faj2Ns9%2FssHJjg%3D%3D%0A&m=3Dliaz95fhD2jvIKdlVPU7U5L5wSUmvhBIn55r4k= CXnMQ%3D%0A&s=3Dc379f1e4272fc0b90042e434234eaeb4a6ec9a169fefc38babe82b5556c= dd358 > >>=20 > >> Log: > >> Add missing mergeinfo from head for stabe/9 revisions: 252995 253168 = 253169 > >>=20 > >> Modified: > >> Directory Properties: > >> stable/9/usr.sbin/ (props changed) > >> stable/9/usr.sbin/Makefile (props changed) > >> stable/9/usr.sbin/bsdconfig/ (props changed) > >=20 > > This is wrong. usr.sbin should never be a merge target. The correct > > merge targets in this case are usr.sbin/bsdconfig/share and > > usr.sbin/bsdconfig. > >=20 >=20 > But but... >=20 > (first... apologies) >=20 > For clarification... >=20 > How exactly would someone merge the mergeinfo for the usr.sbin/Makefile? >=20 > In a separate commit? That seems (not arguing... but...) seems counter-in= tuitive > to require so much churn for a touch-up. >=20 > Despite the fact that the commit was done in usr.sbin... >=20 > The *merges* were actually done at the right level. You are right. Sorry for the noise. I misread the commit list referenced in the log. Glen --pqZtgxSH0iQu6R78 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQEcBAEBCAAGBQJSHPDwAAoJEFJPDDeguUaj+n4IAKbk5dnFsfDmt3fvy3pzODRc cmbM8wQ+67V+iajpUoLhI6m+GieY09AclVonGbZOVrTxytaNWeQKe3a5TtEUXEis SAmNlfbmdBYG9gQXYtIpa9/KY7WbErPCa9BL87o/sf2ptj47TP1HUaQ1s/dez7B/ ae4fSdOmBf3xal3SrhSKj24AuySbKMMnEB7iQyC3N2/EMtaXArBxZmIp/oIxp4DL QcyXC/0h6bYRxOrFss34hclaF/ooKtGjnibkuUvYTurBuCSsqmHAuPb0oSsEqtyi 5X6H7ss4QiGsuNFQU5X5C6v3imTLybK8F3AG1IAvmzGCw0NerCgmpY9Jy84QPUg= =Ziwv -----END PGP SIGNATURE----- --pqZtgxSH0iQu6R78-- From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 18:35:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 06C9D616; Tue, 27 Aug 2013 18:35:05 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E826C2A86; Tue, 27 Aug 2013 18:35:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RIZ4Ol071167; Tue, 27 Aug 2013 18:35:04 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RIZ4A0071165; Tue, 27 Aug 2013 18:35:04 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201308271835.r7RIZ4A0071165@svn.freebsd.org> From: Roman Divacky Date: Tue, 27 Aug 2013 18:35:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254967 - in head/sys: conf modules/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 18:35:05 -0000 Author: rdivacky Date: Tue Aug 27 18:35:04 2013 New Revision: 254967 URL: http://svnweb.freebsd.org/changeset/base/254967 Log: Assemble linux32_locore.s and ia32_sigtramp.S with clang integrated assembler. Support for .code32 and .code64 in llvm was implemented more than 2 years ago. Tested by: Dan McGregor Modified: head/sys/conf/Makefile.amd64 head/sys/modules/linux/Makefile Modified: head/sys/conf/Makefile.amd64 ============================================================================== --- head/sys/conf/Makefile.amd64 Tue Aug 27 18:16:50 2013 (r254966) +++ head/sys/conf/Makefile.amd64 Tue Aug 27 18:35:04 2013 (r254967) @@ -41,8 +41,6 @@ MKMODULESENV+= MACHINE=amd64 # XXX: clang integrated-as doesn't grok .codeNN directives yet ASM_CFLAGS.acpi_wakecode.S= ${CLANG_NO_IAS} -ASM_CFLAGS.ia32_sigtramp.S= ${CLANG_NO_IAS} -ASM_CFLAGS.linux32_locore.s= ${CLANG_NO_IAS} ASM_CFLAGS.mpboot.S= ${CLANG_NO_IAS} ASM_CFLAGS+= ${ASM_CFLAGS.${.IMPSRC:T}} Modified: head/sys/modules/linux/Makefile ============================================================================== --- head/sys/modules/linux/Makefile Tue Aug 27 18:16:50 2013 (r254966) +++ head/sys/modules/linux/Makefile Tue Aug 27 18:35:04 2013 (r254967) @@ -64,7 +64,3 @@ CFLAGS+= -DKTR .endif .include - -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS.linux32_locore.s= ${CLANG_NO_IAS} -CFLAGS+= ${CFLAGS.${.IMPSRC:T}} From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 19:10:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1640DF06; Tue, 27 Aug 2013 19:10:37 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0396D2C47; Tue, 27 Aug 2013 19:10:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RJAajT093627; Tue, 27 Aug 2013 19:10:36 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RJAamS093626; Tue, 27 Aug 2013 19:10:36 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201308271910.r7RJAamS093626@svn.freebsd.org> From: Colin Percival Date: Tue, 27 Aug 2013 19:10:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254968 - head/sys/dev/xen/blkfront X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 19:10:37 -0000 Author: cperciva Date: Tue Aug 27 19:10:36 2013 New Revision: 254968 URL: http://svnweb.freebsd.org/changeset/base/254968 Log: Remove duplicate dev.xbd.*.max_requests sysctl added in r252260. Approved by: gibbs Modified: head/sys/dev/xen/blkfront/blkfront.c Modified: head/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- head/sys/dev/xen/blkfront/blkfront.c Tue Aug 27 18:35:04 2013 (r254967) +++ head/sys/dev/xen/blkfront/blkfront.c Tue Aug 27 19:10:36 2013 (r254968) @@ -878,10 +878,6 @@ xbd_setup_sysctl(struct xbd_softc *xbd) "maximum outstanding requests (negotiated)"); SYSCTL_ADD_UINT(sysctl_ctx, children, OID_AUTO, - "max_requests", CTLFLAG_RD, &xbd->xbd_max_requests, -1, - "maximum outstanding requests (negotiated)"); - - SYSCTL_ADD_UINT(sysctl_ctx, children, OID_AUTO, "max_request_segments", CTLFLAG_RD, &xbd->xbd_max_request_segments, 0, "maximum number of pages per requests (negotiated)"); From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 19:46:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 22D6D444; Tue, 27 Aug 2013 19:46:58 +0000 (UTC) (envelope-from kargl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0E7672DF6; Tue, 27 Aug 2013 19:46:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RJkvOq013318; Tue, 27 Aug 2013 19:46:57 GMT (envelope-from kargl@svn.freebsd.org) Received: (from kargl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RJkuON013313; Tue, 27 Aug 2013 19:46:56 GMT (envelope-from kargl@svn.freebsd.org) Message-Id: <201308271946.r7RJkuON013313@svn.freebsd.org> From: Steve Kargl Date: Tue, 27 Aug 2013 19:46:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254969 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 19:46:58 -0000 Author: kargl Date: Tue Aug 27 19:46:56 2013 New Revision: 254969 URL: http://svnweb.freebsd.org/changeset/base/254969 Log: * s_erf.c: . Use integer literal constants instead of double literal constants. * s_erff.c: . Use integer literal constants instead of casting double literal constants to float. . Update the threshold values from those carried over from erf() to values appropriate for float. . New sets of polynomial coefficients for the rational approximations. These coefficients have little, but positive, effect on the maximum error in ULP in the four intervals, but do improve the overall speed of execution. . Remove redundant GET_FLOAT_WORD(ix,x) as hx already contained the contents that is packed into ix. . Update the mask that is used to zero-out lower-order bits in x in the intervals [1.25, 2.857143] and [2.857143, 12]. In tests on amd64, this change improves the maximum error in ULP from 6.27739 and 63.8095 to 3.16774 and 2.92095 on these intervals for erffc(). Reviewed by: bde Modified: head/lib/msun/src/s_erf.c head/lib/msun/src/s_erff.c Modified: head/lib/msun/src/s_erf.c ============================================================================== --- head/lib/msun/src/s_erf.c Tue Aug 27 19:10:36 2013 (r254968) +++ head/lib/msun/src/s_erf.c Tue Aug 27 19:46:56 2013 (r254969) @@ -201,7 +201,7 @@ erf(double x) if(ix < 0x3feb0000) { /* |x|<0.84375 */ if(ix < 0x3e300000) { /* |x|<2**-28 */ if (ix < 0x00800000) - return 0.125*(8.0*x+efx8*x); /*avoid underflow */ + return (8*x+efx8*x)/8; /* avoid spurious underflow */ return x + efx*x; } z = x*x; Modified: head/lib/msun/src/s_erff.c ============================================================================== --- head/lib/msun/src/s_erff.c Tue Aug 27 19:10:36 2013 (r254968) +++ head/lib/msun/src/s_erff.c Tue Aug 27 19:46:56 2013 (r254969) @@ -24,75 +24,59 @@ tiny = 1e-30, half= 5.0000000000e-01, /* 0x3F000000 */ one = 1.0000000000e+00, /* 0x3F800000 */ two = 2.0000000000e+00, /* 0x40000000 */ - /* c = (subfloat)0.84506291151 */ -erx = 8.4506291151e-01, /* 0x3f58560b */ /* - * Coefficients for approximation to erf on [0,0.84375] + * Coefficients for approximation to erf on [0,0.84375] */ efx = 1.2837916613e-01, /* 0x3e0375d4 */ efx8= 1.0270333290e+00, /* 0x3f8375d4 */ -pp0 = 1.2837916613e-01, /* 0x3e0375d4 */ -pp1 = -3.2504209876e-01, /* 0xbea66beb */ -pp2 = -2.8481749818e-02, /* 0xbce9528f */ -pp3 = -5.7702702470e-03, /* 0xbbbd1489 */ -pp4 = -2.3763017452e-05, /* 0xb7c756b1 */ -qq1 = 3.9791721106e-01, /* 0x3ecbbbce */ -qq2 = 6.5022252500e-02, /* 0x3d852a63 */ -qq3 = 5.0813062117e-03, /* 0x3ba68116 */ -qq4 = 1.3249473704e-04, /* 0x390aee49 */ -qq5 = -3.9602282413e-06, /* 0xb684e21a */ /* - * Coefficients for approximation to erf in [0.84375,1.25] + * Domain [0, 0.84375], range ~[-5.4446e-10,5.5197e-10]: + * |(erf(x) - x)/x - p(x)/q(x)| < 2**-31. */ -pa0 = -2.3621185683e-03, /* 0xbb1acdc6 */ -pa1 = 4.1485610604e-01, /* 0x3ed46805 */ -pa2 = -3.7220788002e-01, /* 0xbebe9208 */ -pa3 = 3.1834661961e-01, /* 0x3ea2fe54 */ -pa4 = -1.1089469492e-01, /* 0xbde31cc2 */ -pa5 = 3.5478305072e-02, /* 0x3d1151b3 */ -pa6 = -2.1663755178e-03, /* 0xbb0df9c0 */ -qa1 = 1.0642088205e-01, /* 0x3dd9f331 */ -qa2 = 5.4039794207e-01, /* 0x3f0a5785 */ -qa3 = 7.1828655899e-02, /* 0x3d931ae7 */ -qa4 = 1.2617121637e-01, /* 0x3e013307 */ -qa5 = 1.3637083583e-02, /* 0x3c5f6e13 */ -qa6 = 1.1984500103e-02, /* 0x3c445aa3 */ +pp0 = 1.28379166e-01F, /* 0x1.06eba8p-3 */ +pp1 = -3.36030394e-01F, /* -0x1.58185ap-2 */ +pp2 = -1.86260219e-03F, /* -0x1.e8451ep-10 */ +qq1 = 3.12324286e-01F, /* 0x1.3fd1f0p-2 */ +qq2 = 2.16070302e-02F, /* 0x1.620274p-6 */ +qq3 = -1.98859419e-03F, /* -0x1.04a626p-9 */ /* - * Coefficients for approximation to erfc in [1.25,1/0.35] + * Domain [0.84375, 1.25], range ~[-1.953e-11,1.940e-11]: + * |(erf(x) - erx) - p(x)/q(x)| < 2**-36. */ -ra0 = -9.8649440333e-03, /* 0xbc21a093 */ -ra1 = -6.9385856390e-01, /* 0xbf31a0b7 */ -ra2 = -1.0558626175e+01, /* 0xc128f022 */ -ra3 = -6.2375331879e+01, /* 0xc2798057 */ -ra4 = -1.6239666748e+02, /* 0xc322658c */ -ra5 = -1.8460508728e+02, /* 0xc3389ae7 */ -ra6 = -8.1287437439e+01, /* 0xc2a2932b */ -ra7 = -9.8143291473e+00, /* 0xc11d077e */ -sa1 = 1.9651271820e+01, /* 0x419d35ce */ -sa2 = 1.3765776062e+02, /* 0x4309a863 */ -sa3 = 4.3456588745e+02, /* 0x43d9486f */ -sa4 = 6.4538726807e+02, /* 0x442158c9 */ -sa5 = 4.2900814819e+02, /* 0x43d6810b */ -sa6 = 1.0863500214e+02, /* 0x42d9451f */ -sa7 = 6.5702495575e+00, /* 0x40d23f7c */ -sa8 = -6.0424413532e-02, /* 0xbd777f97 */ +erx = 8.42697144e-01F, /* 0x1.af7600p-1. erf(1) rounded to 16 bits. */ +pa0 = 3.64939137e-06F, /* 0x1.e9d022p-19 */ +pa1 = 4.15109694e-01F, /* 0x1.a91284p-2 */ +pa2 = -1.65179938e-01F, /* -0x1.5249dcp-3 */ +pa3 = 1.10914491e-01F, /* 0x1.c64e46p-4 */ +qa1 = 6.02074385e-01F, /* 0x1.344318p-1 */ +qa2 = 5.35934687e-01F, /* 0x1.126608p-1 */ +qa3 = 1.68576106e-01F, /* 0x1.593e6ep-3 */ +qa4 = 5.62181212e-02F, /* 0x1.cc89f2p-5 */ /* - * Coefficients for approximation to erfc in [1/.35,28] + * Domain [1.25,1/0.35], range ~[-7.043e-10,7.457e-10]: + * |log(x*erfc(x)) + x**2 + 0.5625 - r(x)/s(x)| < 2**-30 */ -rb0 = -9.8649431020e-03, /* 0xbc21a092 */ -rb1 = -7.9928326607e-01, /* 0xbf4c9dd4 */ -rb2 = -1.7757955551e+01, /* 0xc18e104b */ -rb3 = -1.6063638306e+02, /* 0xc320a2ea */ -rb4 = -6.3756646729e+02, /* 0xc41f6441 */ -rb5 = -1.0250950928e+03, /* 0xc480230b */ -rb6 = -4.8351919556e+02, /* 0xc3f1c275 */ -sb1 = 3.0338060379e+01, /* 0x41f2b459 */ -sb2 = 3.2579251099e+02, /* 0x43a2e571 */ -sb3 = 1.5367296143e+03, /* 0x44c01759 */ -sb4 = 3.1998581543e+03, /* 0x4547fdbb */ -sb5 = 2.5530502930e+03, /* 0x451f90ce */ -sb6 = 4.7452853394e+02, /* 0x43ed43a7 */ -sb7 = -2.2440952301e+01; /* 0xc1b38712 */ +ra0 = -9.87132732e-03F, /* -0x1.4376b2p-7 */ +ra1 = -5.53605914e-01F, /* -0x1.1b723cp-1 */ +ra2 = -2.17589188e+00F, /* -0x1.1683a0p+1 */ +ra3 = -1.43268085e+00F, /* -0x1.6ec42cp+0 */ +sa1 = 5.45995426e+00F, /* 0x1.5d6fe4p+2 */ +sa2 = 6.69798088e+00F, /* 0x1.acabb8p+2 */ +sa3 = 1.43113089e+00F, /* 0x1.6e5e98p+0 */ +sa4 = -5.77397496e-02F, /* -0x1.d90108p-5 */ +/* + * Domain [1/0.35, 11], range ~[-2.264e-13,2.336e-13]: + * |log(x*erfc(x)) + x**2 + 0.5625 - r(x)/s(x)| < 2**-42 + */ +rb0 = -9.86494310e-03F, /* -0x1.434124p-7 */ +rb1 = -6.25171244e-01F, /* -0x1.401672p-1 */ +rb2 = -6.16498327e+00F, /* -0x1.8a8f16p+2 */ +rb3 = -1.66696873e+01F, /* -0x1.0ab70ap+4 */ +rb4 = -9.53764343e+00F, /* -0x1.313460p+3 */ +sb1 = 1.26884899e+01F, /* 0x1.96081cp+3 */ +sb2 = 4.51839523e+01F, /* 0x1.6978bcp+5 */ +sb3 = 4.72810211e+01F, /* 0x1.7a3f88p+5 */ +sb4 = 8.93033314e+00F; /* 0x1.1dc54ap+3 */ float erff(float x) @@ -107,43 +91,37 @@ erff(float x) } if(ix < 0x3f580000) { /* |x|<0.84375 */ - if(ix < 0x31800000) { /* |x|<2**-28 */ - if (ix < 0x04000000) - /*avoid underflow */ - return (float)0.125*((float)8.0*x+efx8*x); + if(ix < 0x38800000) { /* |x|<2**-14 */ + if (ix < 0x04000000) /* |x|<0x1p-119 */ + return (8*x+efx8*x)/8; /* avoid spurious underflow */ return x + efx*x; } z = x*x; - r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4))); - s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5)))); + r = pp0+z*(pp1+z*pp2); + s = one+z*(qq1+z*(qq2+z*qq3)); y = r/s; return x + x*y; } if(ix < 0x3fa00000) { /* 0.84375 <= |x| < 1.25 */ s = fabsf(x)-one; - P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6))))); - Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6))))); + P = pa0+s*(pa1+s*(pa2+s*pa3)); + Q = one+s*(qa1+s*(qa2+s*(qa3+s*qa4))); if(hx>=0) return erx + P/Q; else return -erx - P/Q; } - if (ix >= 0x40c00000) { /* inf>|x|>=6 */ + if (ix >= 0x40800000) { /* inf>|x|>=4 */ if(hx>=0) return one-tiny; else return tiny-one; } x = fabsf(x); s = one/(x*x); if(ix< 0x4036DB6E) { /* |x| < 1/0.35 */ - R=ra0+s*(ra1+s*(ra2+s*(ra3+s*(ra4+s*( - ra5+s*(ra6+s*ra7)))))); - S=one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*( - sa5+s*(sa6+s*(sa7+s*sa8))))))); + R=ra0+s*(ra1+s*(ra2+s*ra3)); + S=one+s*(sa1+s*(sa2+s*(sa3+s*sa4))); } else { /* |x| >= 1/0.35 */ - R=rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*( - rb5+s*rb6))))); - S=one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*( - sb5+s*(sb6+s*sb7)))))); - } - GET_FLOAT_WORD(ix,x); - SET_FLOAT_WORD(z,ix&0xfffff000); - r = __ieee754_expf(-z*z-(float)0.5625)*__ieee754_expf((z-x)*(z+x)+R/S); + R=rb0+s*(rb1+s*(rb2+s*(rb3+s*rb4))); + S=one+s*(sb1+s*(sb2+s*(sb3+s*sb4))); + } + SET_FLOAT_WORD(z,hx&0xffffe000); + r = expf(-z*z-0.5625F)*expf((z-x)*(z+x)+R/S); if(hx>=0) return one-r/x; else return r/x-one; } @@ -160,11 +138,11 @@ erfcf(float x) } if(ix < 0x3f580000) { /* |x|<0.84375 */ - if(ix < 0x23800000) /* |x|<2**-56 */ + if(ix < 0x33800000) /* |x|<2**-24 */ return one-x; z = x*x; - r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4))); - s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5)))); + r = pp0+z*(pp1+z*pp2); + s = one+z*(qq1+z*(qq2+z*qq3)); y = r/s; if(hx < 0x3e800000) { /* x<1/4 */ return one-(x+x*y); @@ -176,33 +154,27 @@ erfcf(float x) } if(ix < 0x3fa00000) { /* 0.84375 <= |x| < 1.25 */ s = fabsf(x)-one; - P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6))))); - Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6))))); + P = pa0+s*(pa1+s*(pa2+s*pa3)); + Q = one+s*(qa1+s*(qa2+s*(qa3+s*qa4))); if(hx>=0) { z = one-erx; return z - P/Q; } else { z = erx+P/Q; return one+z; } } - if (ix < 0x41e00000) { /* |x|<28 */ + if (ix < 0x41300000) { /* |x|<11 */ x = fabsf(x); s = one/(x*x); if(ix< 0x4036DB6D) { /* |x| < 1/.35 ~ 2.857143*/ - R=ra0+s*(ra1+s*(ra2+s*(ra3+s*(ra4+s*( - ra5+s*(ra6+s*ra7)))))); - S=one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*( - sa5+s*(sa6+s*(sa7+s*sa8))))))); + R=ra0+s*(ra1+s*(ra2+s*ra3)); + S=one+s*(sa1+s*(sa2+s*(sa3+s*sa4))); } else { /* |x| >= 1/.35 ~ 2.857143 */ - if(hx<0&&ix>=0x40c00000) return two-tiny;/* x < -6 */ - R=rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*( - rb5+s*rb6))))); - S=one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*( - sb5+s*(sb6+s*sb7)))))); + if(hx<0&&ix>=0x40a00000) return two-tiny;/* x < -5 */ + R=rb0+s*(rb1+s*(rb2+s*(rb3+s*rb4))); + S=one+s*(sb1+s*(sb2+s*(sb3+s*sb4))); } - GET_FLOAT_WORD(ix,x); - SET_FLOAT_WORD(z,ix&0xfffff000); - r = __ieee754_expf(-z*z-(float)0.5625)* - __ieee754_expf((z-x)*(z+x)+R/S); + SET_FLOAT_WORD(z,hx&0xffffe000); + r = expf(-z*z-0.5625F)*expf((z-x)*(z+x)+R/S); if(hx>0) return r/x; else return two-r/x; } else { if(hx>0) return tiny*tiny; else return two-tiny; From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 19:47:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CE925445; Tue, 27 Aug 2013 19:47:03 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BABB52DF7; Tue, 27 Aug 2013 19:47:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RJl3ei013415; Tue, 27 Aug 2013 19:47:03 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RJl3CW013414; Tue, 27 Aug 2013 19:47:03 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201308271947.r7RJl3CW013414@svn.freebsd.org> From: "Kenneth D. Merry" Date: Tue, 27 Aug 2013 19:47:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254970 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 19:47:03 -0000 Author: ken Date: Tue Aug 27 19:47:03 2013 New Revision: 254970 URL: http://svnweb.freebsd.org/changeset/base/254970 Log: If a drive returns ASC/ASCQ 0x04,0x11 "Logical unit not ready, notify (enable spinup) required", instead of doing the normal retries, poll for a change in status. We will poll every half second for a minute for the status to change. Hitachi drives (and likely other SAS drives) return that ASC/ASCQ when they are waiting to spin up. What it means is that they are waiting for the SAS expander to send them the SAS NOTIFY (ENABLE SPINUP) primitive. That primitive is the mechanism expanders/enclosures use to sequence drive spinup to avoid overloading power supplies. Sponsored by: Spectra Logic MFC after: 3 days Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Tue Aug 27 19:46:56 2013 (r254969) +++ head/sys/cam/scsi/scsi_all.c Tue Aug 27 19:47:03 2013 (r254970) @@ -1118,7 +1118,7 @@ static struct asc_table_entry asc_table[ { SST(0x04, 0x10, SS_RDEF, /* XXX TBD */ "Logical unit not ready, auxiliary memory not accessible") }, /* DT WRO AEB VF */ - { SST(0x04, 0x11, SS_RDEF, /* XXX TBD */ + { SST(0x04, 0x11, SS_TUR | SSQ_MANY | SSQ_DECREMENT_COUNT | EBUSY, "Logical unit not ready, notify (enable spinup) required") }, /* M V */ { SST(0x04, 0x12, SS_RDEF, /* XXX TBD */ From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 20:34:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EBB146B; Tue, 27 Aug 2013 20:34:11 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D8F4E20A7; Tue, 27 Aug 2013 20:34:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RKYBS5041224; Tue, 27 Aug 2013 20:34:11 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RKYBEI041223; Tue, 27 Aug 2013 20:34:11 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201308272034.r7RKYBEI041223@svn.freebsd.org> From: "Kenneth D. Merry" Date: Tue, 27 Aug 2013 20:34:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254971 - stable/9/sys/dev/isp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 20:34:12 -0000 Author: ken Date: Tue Aug 27 20:34:11 2013 New Revision: 254971 URL: http://svnweb.freebsd.org/changeset/base/254971 Log: MFC 254372: Export the maxio field in the CAM XPT_PATH_INQ CCB in the isp(4) driver. This tells consumers up the stack the maximum I/O size that the controller can handle. The I/O size is bounded by the number of scatter/gather segments the controller can handle and the page size. For an amd64 system, it works out to around 5MB. Reviewed by: mjacob Sponsored by: Spectra Logic Modified: stable/9/sys/dev/isp/isp_freebsd.c Modified: stable/9/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/9/sys/dev/isp/isp_freebsd.c Tue Aug 27 19:47:03 2013 (r254970) +++ stable/9/sys/dev/isp/isp_freebsd.c Tue Aug 27 20:34:11 2013 (r254971) @@ -5447,6 +5447,11 @@ isp_action(struct cam_sim *sim, union cc cpi->max_target = ISP_MAX_TARGETS(isp) - 1; cpi->max_lun = ISP_MAX_LUNS(isp) - 1; cpi->bus_id = cam_sim_bus(sim); + if (isp->isp_osinfo.sixtyfourbit) + cpi->maxio = (ISP_NSEG64_MAX - 1) * PAGE_SIZE; + else + cpi->maxio = (ISP_NSEG_MAX - 1) * PAGE_SIZE; + bus = cam_sim_bus(xpt_path_sim(cpi->ccb_h.path)); if (IS_FC(isp)) { fcparam *fcp = FCPARAM(isp, bus); From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 20:43:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A8FA42A2; Tue, 27 Aug 2013 20:43:27 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7BB97211C; Tue, 27 Aug 2013 20:43:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RKhRjP046524; Tue, 27 Aug 2013 20:43:27 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RKhRC0046523; Tue, 27 Aug 2013 20:43:27 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201308272043.r7RKhRC0046523@svn.freebsd.org> From: "Kenneth D. Merry" Date: Tue, 27 Aug 2013 20:43:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254972 - in stable/9/sys: . dev dev/isp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 20:43:27 -0000 Author: ken Date: Tue Aug 27 20:43:27 2013 New Revision: 254972 URL: http://svnweb.freebsd.org/changeset/base/254972 Log: Properly record mergeinfo for the merge of revision 254372 from head into stable/9. This should have been done in change 254971. Pointy hat to: ken Modified: Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/isp/ (props changed) From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 20:52:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B2F5454B; Tue, 27 Aug 2013 20:52:03 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8CFD821A0; Tue, 27 Aug 2013 20:52:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RKq3mb051702; Tue, 27 Aug 2013 20:52:03 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RKq3Uq051699; Tue, 27 Aug 2013 20:52:03 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201308272052.r7RKq3Uq051699@svn.freebsd.org> From: Andre Oppermann Date: Tue, 27 Aug 2013 20:52:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254973 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 20:52:03 -0000 Author: andre Date: Tue Aug 27 20:52:02 2013 New Revision: 254973 URL: http://svnweb.freebsd.org/changeset/base/254973 Log: Pad m_hdr on 32bit architectures to to prevent alignment and padding problems with the way MLEN, MHLEN, and struct mbuf are set up. CTASSERT's are provided to detect such issues at compile time in the future. The #define MLEN and MHLEN calculation do not take actual compiler- induced alignment and padding inside the complete struct mbuf into account. Accordingly appropriate attention is required when changing members of struct mbuf. Ideally one would calculate MLEN as (MSIZE - sizeof(((struct mbuf *)0)->m_hdr) but that doesn't work as the compiler refuses to operate on an as of yet incomplete structure. In particular ARM 32bit has more strict alignment requirements which caused 4 bytes of padding between m_hdr and pkthdr in struct mbuf because of the 64bit members in pkthdr. This wasn't picked up by MLEN and MHLEN causing an overflow of the mbuf provided data storage by overestimating its size. I386 didn't show this problem because it handles unaligned access just fine, albeit at a small performance penalty. On 64bit architectures the struct mbuf layout is 64bit aligned in all places. Reported by: Thomas Skibo Tested by: tuexen, ian, Thomas Skibo (extended patch) Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/uipc_mbuf.c head/sys/sys/mbuf.h Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Tue Aug 27 20:43:27 2013 (r254972) +++ head/sys/kern/uipc_mbuf.c Tue Aug 27 20:52:02 2013 (r254973) @@ -85,6 +85,14 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, m_defrag #endif /* + * Ensure the correct size of various mbuf parameters. It could be off due + * to compiler-induced padding and alignment artifacts. + */ +CTASSERT(sizeof(struct mbuf) == MSIZE); +CTASSERT(MSIZE - offsetof(struct mbuf, m_dat) == MLEN); +CTASSERT(MSIZE - offsetof(struct mbuf, m_pktdat) == MHLEN); + +/* * m_get2() allocates minimum mbuf that would fit "size" argument. */ struct mbuf * Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Tue Aug 27 20:43:27 2013 (r254972) +++ head/sys/sys/mbuf.h Tue Aug 27 20:52:02 2013 (r254973) @@ -53,6 +53,10 @@ * externally and attach it to the mbuf in a way similar to that of mbuf * clusters. * + * NB: These calculation do not take actual compiler-induced alignment and + * padding inside the complete struct mbuf into account. Appropriate + * attention is required when changing members of struct mbuf. + * * MLEN is data length in a normal mbuf. * MHLEN is data length in an mbuf with pktheader. * MINCLSIZE is a smallest amount of data that should be put into cluster. @@ -84,7 +88,7 @@ struct mb_args { /* * Header present at the beginning of every mbuf. - * Size ILP32: 20 + * Size ILP32: 24 * LP64: 32 */ struct m_hdr { @@ -94,6 +98,9 @@ struct m_hdr { int32_t mh_len; /* amount of data in this mbuf */ uint32_t mh_type:8, /* type of data in this mbuf */ mh_flags:24; /* flags; see below */ +#if !defined(__LP64__) + uint32_t mh_pad; /* pad for 64bit alignment */ +#endif }; /* From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 21:20:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8A380D86; Tue, 27 Aug 2013 21:20:33 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 74F442350; Tue, 27 Aug 2013 21:20:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RLKXR0066926; Tue, 27 Aug 2013 21:20:33 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RLKTvk066897; Tue, 27 Aug 2013 21:20:29 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201308272120.r7RLKTvk066897@svn.freebsd.org> From: Jeremie Le Hen Date: Tue, 27 Aug 2013 21:20:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254974 - in head: etc/defaults etc/periodic/monthly etc/periodic/security etc/periodic/weekly share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 21:20:33 -0000 Author: jlh Date: Tue Aug 27 21:20:28 2013 New Revision: 254974 URL: http://svnweb.freebsd.org/changeset/base/254974 Log: Make the period of each periodic security script configurable. There are now six additional variables weekly_status_security_enable weekly_status_security_inline weekly_status_security_output monthly_status_security_enable monthly_status_security_inline monthly_status_security_output alongside their existing daily counterparts. They all have the same default values. All other "daily_status_security_${scriptname}_${whatever}" variables have been renamed to "security_status_${name}_${whatever}". A compatibility shim has been introduced for the old variable names, which we will be able to remove in 11.0-RELEASE. "security_status_${name}_enable" is still a boolean but a new "security_status_${name}_period" allows to define the period of each script. The value is one of "daily" (the default for backward compatibility), "weekly", "monthly" and "NO". Note that when the security periodic scripts are run directly from crontab(5) (as opposed to being called by daily or weekly periodic scripts), they will run unless the test is explicitely disabled with a "NO", either for in the "_enable" or the "_period" variable. When the security output is not inlined, the mail subject has been changed from "$host $arg run output" to "$host $arg $period run output". For instance: myfbsd security run output -> myfbsd security daily run output I don't think this is considered as a stable API, but feel free to correct me if I'm wrong. Finally, I will rearrange periodic.conf(5) and default/periodic.conf to put the security options in their own section. I left them in place for this commit to make reviewing easier. Reviewed by: hackers@ Added: head/etc/periodic/monthly/450.status-security (contents, props changed) head/etc/periodic/weekly/450.status-security (contents, props changed) Modified: head/etc/defaults/periodic.conf head/etc/periodic/security/100.chksetuid head/etc/periodic/security/110.neggrpperm head/etc/periodic/security/200.chkmounts head/etc/periodic/security/300.chkuid0 head/etc/periodic/security/400.passwdless head/etc/periodic/security/410.logincheck head/etc/periodic/security/460.chkportsum head/etc/periodic/security/500.ipfwdenied head/etc/periodic/security/510.ipfdenied head/etc/periodic/security/520.pfdenied head/etc/periodic/security/550.ipfwlimit head/etc/periodic/security/610.ipf6denied head/etc/periodic/security/700.kernelmsg head/etc/periodic/security/800.loginfail head/etc/periodic/security/900.tcpwrap head/etc/periodic/security/security.functions head/etc/periodic/weekly/Makefile head/share/man/man5/periodic.conf.5 Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Tue Aug 27 20:52:02 2013 (r254973) +++ head/etc/defaults/periodic.conf Tue Aug 27 21:20:28 2013 (r254974) @@ -128,7 +128,9 @@ daily_status_include_submit_mailq="YES" # 450.status-security daily_status_security_enable="YES" # Security check -# See "Security options" below for more options +# See also "Security options" below for more options +daily_status_security_inline="NO" # Run inline ? +daily_status_security_output="root" # user or /file # 460.status-mail-rejects daily_status_mail_rejects_enable="YES" # Check mail rejects @@ -163,59 +165,78 @@ daily_local="/etc/daily.local" # Loca # Security options # These options are used by the security periodic(8) scripts spawned in -# 450.status-security above. -daily_status_security_inline="NO" # Run inline ? -daily_status_security_output="root" # user or /file -daily_status_security_logdir="/var/log" # Directory for logs -daily_status_security_diff_flags="-b -u" # flags for diff output +# daily and weekly 450.status-security. +security_status_logdir="/var/log" # Directory for logs +security_status_diff_flags="-b -u" # flags for diff output + +# Each of the security_status_*_enable options below can have one of the +# following values: +# - NO +# - daily: only run during the daily security status +# - weekly: only run during the weekly security status # 100.chksetuid -daily_status_security_chksetuid_enable="YES" +security_status_chksetuid_enable="YES" +security_status_chksetuid_period="daily" # 110.neggrpperm -daily_status_security_neggrpperm_enable="YES" +security_status_neggrpperm_enable="YES" +security_status_neggrpperm_period="daily" # 200.chkmounts -daily_status_security_chkmounts_enable="YES" -#daily_status_security_chkmounts_ignore="^amd:" # Don't check matching +security_status_chkmounts_enable="YES" +security_status_chkmounts_period="daily" +#security_status_chkmounts_ignore="^amd:" # Don't check matching # FS types -daily_status_security_noamd="NO" # Don't check amd mounts +security_status_noamd="NO" # Don't check amd mounts # 300.chkuid0 -daily_status_security_chkuid0_enable="YES" +security_status_chkuid0_enable="YES" +security_status_chkuid0_period="daily" # 400.passwdless -daily_status_security_passwdless_enable="YES" +security_status_passwdless_enable="YES" +security_status_passwdless_period="daily" # 410.logincheck -daily_status_security_logincheck_enable="YES" +security_status_logincheck_enable="YES" +security_status_logincheck_period="daily" # 460.chkportsum -daily_status_security_chkportsum_enable="NO" # Check ports w/ wrong checksum +security_status_chkportsum_enable="NO" # Check ports w/ wrong checksum +security_status_chkportsum_period="daily" # 500.ipfwdenied -daily_status_security_ipfwdenied_enable="YES" +security_status_ipfwdenied_enable="YES" +security_status_ipfwdenied_period="daily" # 510.ipfdenied -daily_status_security_ipfdenied_enable="YES" +security_status_ipfdenied_enable="YES" +security_status_ipfdenied_period="daily" # 520.pfdenied -daily_status_security_pfdenied_enable="YES" +security_status_pfdenied_enable="YES" +security_status_pfdenied_period="daily" # 550.ipfwlimit -daily_status_security_ipfwlimit_enable="YES" +security_status_ipfwlimit_enable="YES" +security_status_ipfwlimit_period="daily" # 610.ipf6denied -daily_status_security_ipf6denied_enable="YES" +security_status_ipf6denied_enable="YES" +security_status_ipf6denied_period="daily" # 700.kernelmsg -daily_status_security_kernelmsg_enable="YES" +security_status_kernelmsg_enable="YES" +security_status_kernelmsg_period="daily" # 800.loginfail -daily_status_security_loginfail_enable="YES" +security_status_loginfail_enable="YES" +security_status_loginfail_period="daily" # 900.tcpwrap -daily_status_security_tcpwrap_enable="YES" +security_status_tcpwrap_enable="YES" +security_status_tcpwrap_period="daily" # Weekly options @@ -248,6 +269,12 @@ weekly_status_pkg_enable="NO" # Find pkg_version=pkg_version # Use this program pkg_version_index=/usr/ports/INDEX-10 # Use this index file +# 450.status-security +weekly_status_security_enable="YES" # Security check +# See also "Security options" above for more options +weekly_status_security_inline="NO" # Run inline ? +weekly_status_security_output="root" # user or /file + # 999.local weekly_local="/etc/weekly.local" # Local scripts @@ -267,6 +294,12 @@ monthly_show_badconfig="NO" # scripts # 200.accounting monthly_accounting_enable="YES" # Login accounting +# 450.status-security +monthly_status_security_enable="YES" # Security check +# See also "Security options" above for more options +monthly_status_security_inline="NO" # Run inline ? +monthly_status_security_output="root" # user or /file + # 999.local monthly_local="/etc/monthly.local" # Local scripts @@ -276,6 +309,74 @@ monthly_local="/etc/monthly.local" # L if [ -z "${source_periodic_confs_defined}" ]; then source_periodic_confs_defined=yes + + # Compatibility with old daily variable names. + # They can be removed in stable/11. + security_daily_compat_var() { + local var=$1 dailyvar value + + dailyvar=daily_status_security${#status_security} + periodvar=${var%enable}period + eval value=\"\$$dailyvar\" + [ -z "$value" ] && return + echo "Warning: Variable \$$dailyvar is deprecated," \ + "use \$$var instead." >&2 + case "$value" in + [Yy][Ee][Ss]) + $var=YES + $periodvar=daily + ;; + *) + $var="$value" + ;; + esac + } + + check_yesno_period() { + local var="$1" periodvar value period + + eval value=\"\$$var\" + case "$value" in + [Yy][Ee][Ss]) ;; + *) return 1 ;; + esac + + periodvar=${var%enable}period + eval period=\"\$$periodvar\" + case "$PERIODIC" in + "security daily") + case "$period" in + [Dd][Aa][Ii][Ll][Yy]) return 0 ;; + *) return 1 ;; + esac + ;; + "security weekly") + case "$period" in + [Ww][Ee][Ee][Kk][Ll][Yy]) return 0 ;; + *) return 1 ;; + esac + ;; + "security monthly") + case "$period" in + [Mm][Oo][Nn][Tt][Hh][Ll][Yy]) return 0 ;; + *) return 1 ;; + esac + ;; + security) + # Run directly from crontab(5). + case "$period" in + [Nn][Oo]) return 1 ;; + *) return 0 ;; + esac + ;; + *) + echo "ASSERTION FAILED: Unexpected value for " \ + "\$PERIODIC: '$PERIODIC'" >&2 + exit 127 + ;; + esac + } + source_periodic_confs() { local i sourced_files Added: head/etc/periodic/monthly/450.status-security ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/periodic/monthly/450.status-security Tue Aug 27 21:20:28 2013 (r254974) @@ -0,0 +1,41 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$monthly_status_security_enable" in + [Yy][Ee][Ss]) + echo "" + echo "Security check:" + + case "$monthly_status_security_inline" in + [Yy][Ee][Ss]) + monthly_status_security_output="";; + esac + + export security_output="${monthly_status_security_output}" + case "${monthly_status_security_output}" in + "") + rc=3;; + /*) + echo " (output logged separately)" + rc=0;; + *) + echo " (output mailed separately)" + rc=0;; + esac + + periodic security || rc=3;; + + *) rc=0;; +esac + +exit $rc Modified: head/etc/periodic/security/100.chksetuid ============================================================================== --- head/etc/periodic/security/100.chksetuid Tue Aug 27 20:52:02 2013 (r254973) +++ head/etc/periodic/security/100.chksetuid Tue Aug 27 21:20:28 2013 (r254974) @@ -37,10 +37,12 @@ fi . /etc/periodic/security/security.functions +security_daily_compat_var security_status_chksetuid_enable + rc=0 -case "$daily_status_security_chksetuid_enable" in - [Yy][Ee][Ss]) +if check_yesno_period security_status_chksetuid_enable +then echo "" echo 'Checking setuid files and devices:' MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ { print $3 }'` @@ -49,10 +51,6 @@ case "$daily_status_security_chksetuid_e \( -perm -u+s -or -perm -g+s \) -exec ls -liTd \{\} \+ | check_diff setuid - "${host} setuid diffs:" rc=$? - ;; - *) - rc=0 - ;; -esac +fi exit $rc Modified: head/etc/periodic/security/110.neggrpperm ============================================================================== --- head/etc/periodic/security/110.neggrpperm Tue Aug 27 20:52:02 2013 (r254973) +++ head/etc/periodic/security/110.neggrpperm Tue Aug 27 21:20:28 2013 (r254974) @@ -35,10 +35,12 @@ then source_periodic_confs fi +security_daily_compat_var security_status_neggrpperm_enable + rc=0 -case "$daily_status_security_neggrpperm_enable" in - [Yy][Ee][Ss]) +if check_yesno_period security_status_neggrpperm_enable +then echo "" echo 'Checking negative group permissions:' MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ { print $3 }'` @@ -48,7 +50,6 @@ case "$daily_status_security_neggrpperm_ \( ! -perm +040 -and -perm +004 \) \) \ -exec ls -liTd \{\} \+ | tee /dev/stderr | wc -l) [ $n -gt 0 ] && rc=1 || rc=0 - ;; -esac +fi exit $rc Modified: head/etc/periodic/security/200.chkmounts ============================================================================== --- head/etc/periodic/security/200.chkmounts Tue Aug 27 20:52:02 2013 (r254973) +++ head/etc/periodic/security/200.chkmounts Tue Aug 27 21:20:28 2013 (r254974) @@ -40,12 +40,16 @@ fi . /etc/periodic/security/security.functions -ignore="${daily_status_security_chkmounts_ignore}" +security_daily_compat_var security_status_chkmounts_enable +security_daily_compat_var security_status_chkmounts_ignore +security_daily_compat_var security_status_noamd + +ignore="${security_status_chkmounts_ignore}" rc=0 -case "$daily_status_security_chkmounts_enable" in - [Yy][Ee][Ss]) - case "$daily_status_security_noamd" in +if check_yesno_period security_status_chkmounts_enable +then + case "$security_status_noamd" in [Yy][Ee][Ss]) ignore="${ignore}|^amd:" esac @@ -55,8 +59,7 @@ case "$daily_status_security_chkmounts_e fi mount -p | sort | ${cmd} | check_diff mount - "${host} changes in mounted filesystems:" - rc=$?;; - *) rc=0;; -esac + rc=$? +fi exit "$rc" Modified: head/etc/periodic/security/300.chkuid0 ============================================================================== --- head/etc/periodic/security/300.chkuid0 Tue Aug 27 20:52:02 2013 (r254973) +++ head/etc/periodic/security/300.chkuid0 Tue Aug 27 21:20:28 2013 (r254974) @@ -36,16 +36,19 @@ then source_periodic_confs fi -case "$daily_status_security_chkuid0_enable" in - [Yy][Ee][Ss]) +security_daily_compat_var security_status_chkuid0_enable + +rc=0 + +if check_yesno_period security_status_chkuid0_enable +then echo "" echo 'Checking for uids of 0:' n=$(awk -F: '/^#/ {next} $3==0 {print $1,$3}' /etc/master.passwd | tee /dev/stderr | sed -e '/^root 0$/d' -e '/^toor 0$/d' | wc -l) - [ $n -gt 0 ] && rc=1 || rc=0;; - *) rc=0;; -esac + [ $n -gt 0 ] && rc=1 || rc=0 +fi exit "$rc" Modified: head/etc/periodic/security/400.passwdless ============================================================================== --- head/etc/periodic/security/400.passwdless Tue Aug 27 20:52:02 2013 (r254973) +++ head/etc/periodic/security/400.passwdless Tue Aug 27 21:20:28 2013 (r254974) @@ -35,14 +35,17 @@ then source_periodic_confs fi -case "$daily_status_security_passwdless_enable" in - [Yy][Ee][Ss]) +security_daily_compat_var security_status_passwdless_enable + +rc=0 + +if check_yesno_period security_status_passwdless_enable +then echo "" echo 'Checking for passwordless accounts:' n=$(awk -F: 'NF > 1 && $1 !~ /^[#+-]/ && $2=="" {print $0}' /etc/master.passwd | tee /dev/stderr | wc -l) - [ $n -gt 0 ] && rc=1 || rc=0;; - *) rc=0;; -esac + [ $n -gt 0 ] && rc=1 || rc=0 +fi exit "$rc" Modified: head/etc/periodic/security/410.logincheck ============================================================================== --- head/etc/periodic/security/410.logincheck Tue Aug 27 20:52:02 2013 (r254973) +++ head/etc/periodic/security/410.logincheck Tue Aug 27 21:20:28 2013 (r254974) @@ -35,8 +35,12 @@ then source_periodic_confs fi -case "$daily_status_security_logincheck_enable" in - [Yy][Ee][Ss]) +security_daily_compat_var security_status_logincheck_enable + +rc=0 + +if check_yesno_period security_status_logincheck_enable +then echo "" echo 'Checking login.conf permissions:' if [ -G /etc/login.conf -a -O /etc/login.conf ]; then @@ -45,8 +49,7 @@ case "$daily_status_security_logincheck_ echo "Bad ownership of /etc/login.conf" n=1 fi - [ $n -gt 0 ] && rc=1 || rc=0;; - *) rc=0;; -esac + [ $n -gt 0 ] && rc=1 || rc=0 +fi exit "$rc" Modified: head/etc/periodic/security/460.chkportsum ============================================================================== --- head/etc/periodic/security/460.chkportsum Tue Aug 27 20:52:02 2013 (r254973) +++ head/etc/periodic/security/460.chkportsum Tue Aug 27 21:20:28 2013 (r254974) @@ -35,13 +35,15 @@ fi . /etc/periodic/security/security.functions +security_daily_compat_var security_status_chkportsum_enable + rc=0 echo "" echo 'Checking for ports with mismatched checksums:' -case "${daily_status_security_chkportsum_enable}" in - [Yy][Ee][Ss]) +if check_yesno_period security_status_chkportsum_enable +then set -f pkg_info -ga 2>/dev/null | \ while IFS= read -r line; do @@ -59,10 +61,6 @@ case "${daily_status_security_chkportsum ;; esac done - ;; - *) - rc=0 - ;; -esac +fi exit $rc Modified: head/etc/periodic/security/500.ipfwdenied ============================================================================== --- head/etc/periodic/security/500.ipfwdenied Tue Aug 27 20:52:02 2013 (r254973) +++ head/etc/periodic/security/500.ipfwdenied Tue Aug 27 21:20:28 2013 (r254974) @@ -37,17 +37,18 @@ fi . /etc/periodic/security/security.functions +security_daily_compat_var security_status_ipfwdenied_enable + rc=0 -case "$daily_status_security_ipfwdenied_enable" in - [Yy][Ee][Ss]) +if check_yesno_period security_status_ipfwdenied_enable +then TMP=`mktemp -t security` if ipfw -a list 2>/dev/null | egrep "deny|reset|unreach" > ${TMP}; then check_diff new_only ipfw ${TMP} "${host} ipfw denied packets:" fi rc=$? - rm -f ${TMP};; - *) rc=0;; -esac + rm -f ${TMP} +fi exit $rc Modified: head/etc/periodic/security/510.ipfdenied ============================================================================== --- head/etc/periodic/security/510.ipfdenied Tue Aug 27 20:52:02 2013 (r254973) +++ head/etc/periodic/security/510.ipfdenied Tue Aug 27 21:20:28 2013 (r254974) @@ -37,17 +37,18 @@ fi . /etc/periodic/security/security.functions +security_daily_compat_var security_status_ipfdenied_enable + rc=0 -case "$daily_status_security_ipfdenied_enable" in - [Yy][Ee][Ss]) +if check_yesno_period security_status_ipfdenied_enable +then TMP=`mktemp -t security` if ipfstat -nhio 2>/dev/null | grep block > ${TMP}; then check_diff new_only ipf ${TMP} "${host} ipf denied packets:" fi rc=$? - rm -f ${TMP};; - *) rc=0;; -esac + rm -f ${TMP} +fi exit $rc Modified: head/etc/periodic/security/520.pfdenied ============================================================================== --- head/etc/periodic/security/520.pfdenied Tue Aug 27 20:52:02 2013 (r254973) +++ head/etc/periodic/security/520.pfdenied Tue Aug 27 21:20:28 2013 (r254974) @@ -37,17 +37,18 @@ fi . /etc/periodic/security/security.functions +security_daily_compat_var security_status_pfdenied_enable + rc=0 -case "$daily_status_security_pfdenied_enable" in - [Yy][Ee][Ss]) +if check_yesno_period security_status_pfdenied_enable +then TMP=`mktemp -t security` if pfctl -sr -v 2>/dev/null | nawk '{if (/^block/) {buf=$0; getline; gsub(" +"," ",$0); print buf$0;} }' > ${TMP}; then check_diff new_only pf ${TMP} "${host} pf denied packets:" fi rc=$? - rm -f ${TMP};; - *) rc=0;; -esac + rm -f ${TMP} +fi exit $rc Modified: head/etc/periodic/security/550.ipfwlimit ============================================================================== --- head/etc/periodic/security/550.ipfwlimit Tue Aug 27 20:52:02 2013 (r254973) +++ head/etc/periodic/security/550.ipfwlimit Tue Aug 27 21:20:28 2013 (r254974) @@ -38,10 +38,12 @@ then source_periodic_confs fi +security_daily_compat_var security_status_ipfwlimit_enable + rc=0 -case "$daily_status_security_ipfwlimit_enable" in - [Yy][Ee][Ss]) +if check_yesno_period security_status_ipfwlimit_enable +then IPFW_VERBOSE=`sysctl -n net.inet.ip.fw.verbose 2> /dev/null` if [ $? -ne 0 ] || [ "$IPFW_VERBOSE" -eq 0 ]; then exit 0 @@ -61,8 +63,7 @@ case "$daily_status_security_ipfwlimit_e echo 'ipfw log limit reached:' cat ${TMP} fi - rm -f ${TMP};; - *) rc=0;; -esac + rm -f ${TMP} +fi exit $rc Modified: head/etc/periodic/security/610.ipf6denied ============================================================================== --- head/etc/periodic/security/610.ipf6denied Tue Aug 27 20:52:02 2013 (r254973) +++ head/etc/periodic/security/610.ipf6denied Tue Aug 27 21:20:28 2013 (r254974) @@ -37,17 +37,18 @@ fi . /etc/periodic/security/security.functions +security_daily_compat_var security_status_ipf6denied_enable + rc=0 -case "$daily_status_security_ipf6denied_enable" in - [Yy][Ee][Ss]) +if check_yesno_period security_status_ipf6denied_enable +then TMP=`mktemp ${TMPDIR:-/tmp}/security.XXXXXXXXXX` if ipfstat -nhio6 2>/dev/null | grep block > ${TMP}; then check_diff new_only ipf6 ${TMP} "${host} ipf6 denied packets:" fi rc=$? - rm -f ${TMP};; - *) rc=0;; -esac + rm -f ${TMP} +fi exit $rc Modified: head/etc/periodic/security/700.kernelmsg ============================================================================== --- head/etc/periodic/security/700.kernelmsg Tue Aug 27 20:52:02 2013 (r254973) +++ head/etc/periodic/security/700.kernelmsg Tue Aug 27 21:20:28 2013 (r254974) @@ -40,14 +40,15 @@ fi . /etc/periodic/security/security.functions +security_daily_compat_var security_status_kernelmsg_enable + rc=0 -case "$daily_status_security_kernelmsg_enable" in - [Yy][Ee][Ss]) +if check_yesno_period security_status_kernelmsg_enable +then dmesg 2>/dev/null | check_diff new_only dmesg - "${host} kernel log messages:" - rc=$?;; - *) rc=0;; -esac + rc=$? +fi exit $rc Modified: head/etc/periodic/security/800.loginfail ============================================================================== --- head/etc/periodic/security/800.loginfail Tue Aug 27 20:52:02 2013 (r254973) +++ head/etc/periodic/security/800.loginfail Tue Aug 27 21:20:28 2013 (r254974) @@ -38,7 +38,10 @@ then source_periodic_confs fi -LOG="${daily_status_security_logdir}" +security_daily_compat_var security_status_logdir +security_daily_compat_var security_status_loginfail_enable + +LOG="${security_status_logdir}" yesterday=`date -v-1d "+%b %e "` @@ -55,14 +58,15 @@ catmsgs() { [ -f ${LOG}/auth.log ] && cat $LOG/auth.log } -case "$daily_status_security_loginfail_enable" in - [Yy][Ee][Ss]) +rc=0 + +if check_yesno_period security_status_loginfail_enable +then echo "" echo "${host} login failures:" n=$(catmsgs | egrep -ia "^$yesterday.*: .*(fail|invalid|bad|illegal)" | tee /dev/stderr | wc -l) - [ $n -gt 0 ] && rc=1 || rc=0;; - *) rc=0;; -esac + [ $n -gt 0 ] && rc=1 || rc=0 +fi exit $rc Modified: head/etc/periodic/security/900.tcpwrap ============================================================================== --- head/etc/periodic/security/900.tcpwrap Tue Aug 27 20:52:02 2013 (r254973) +++ head/etc/periodic/security/900.tcpwrap Tue Aug 27 21:20:28 2013 (r254974) @@ -38,7 +38,10 @@ then source_periodic_confs fi -LOG="${daily_status_security_logdir}" +security_daily_compat_var security_status_logdir +security_daily_compat_var security_status_tcpwrap_enable + +LOG="${security_status_logdir}" yesterday=`date -v-1d "+%b %e "` @@ -55,14 +58,15 @@ catmsgs() { [ -f ${LOG}/messages ] && cat $LOG/messages } -case "$daily_status_security_tcpwrap_enable" in - [Yy][Ee][Ss]) +rc=0 + +if check_yesno_period security_status_tcpwrap_enable +then echo "" echo "${host} refused connections:" n=$(catmsgs | grep -i "^$yesterday.*refused connect" | tee /dev/stderr | wc -l) - [ $n -gt 0 ] && rc=1 || rc=0;; - *) rc=0;; -esac + [ $n -gt 0 ] && rc=1 || rc=0 +fi exit $rc Modified: head/etc/periodic/security/security.functions ============================================================================== --- head/etc/periodic/security/security.functions Tue Aug 27 20:52:02 2013 (r254973) +++ head/etc/periodic/security/security.functions Tue Aug 27 21:20:28 2013 (r254974) @@ -27,11 +27,19 @@ # $FreeBSD$ # +# This is a library file, so we only try to do something when sourced. +case "$0" in +*/security.functions) exit 0 ;; +esac + +security_daily_compat_var security_status_logdir +security_daily_compat_var security_status_diff_flags + # # Show differences in the output of an audit command # -LOG="${daily_status_security_logdir}" +LOG="${security_status_logdir}" rc=0 # Usage: COMMAND | check_diff [new_only] LABEL - MSG @@ -67,7 +75,7 @@ check_diff() { [ $rc -lt 1 ] && rc=1 echo "" echo "${msg}" - diff ${daily_status_security_diff_flags} ${LOG}/${label}.today \ + diff ${security_status_diff_flags} ${LOG}/${label}.today \ ${tmpf} | eval "${filter}" mv ${LOG}/${label}.today ${LOG}/${label}.yesterday || rc=3 mv ${tmpf} ${LOG}/${label}.today || rc=3 Added: head/etc/periodic/weekly/450.status-security ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/periodic/weekly/450.status-security Tue Aug 27 21:20:28 2013 (r254974) @@ -0,0 +1,41 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$weekly_status_security_enable" in + [Yy][Ee][Ss]) + echo "" + echo "Security check:" + + case "$weekly_status_security_inline" in + [Yy][Ee][Ss]) + weekly_status_security_output="";; + esac + + export security_output="${weekly_status_security_output}" + case "${weekly_status_security_output}" in + "") + rc=3;; + /*) + echo " (output logged separately)" + rc=0;; + *) + echo " (output mailed separately)" + rc=0;; + esac + + periodic security || rc=3;; + + *) rc=0;; +esac + +exit $rc Modified: head/etc/periodic/weekly/Makefile ============================================================================== --- head/etc/periodic/weekly/Makefile Tue Aug 27 20:52:02 2013 (r254973) +++ head/etc/periodic/weekly/Makefile Tue Aug 27 21:20:28 2013 (r254974) @@ -3,6 +3,7 @@ .include FILES= 340.noid \ + 450.status-security \ 999.local # NB: keep these sorted by MK_* knobs Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Tue Aug 27 20:52:02 2013 (r254973) +++ head/share/man/man5/periodic.conf.5 Tue Aug 27 21:20:28 2013 (r254974) @@ -1,4 +1,4 @@ -.\"- +\"- .\" Copyright (c) 2000 Brian Somers .\" All rights reserved. .\" @@ -482,26 +482,42 @@ This variable behaves in the same way as .Va *_output variables above, namely it can be set either to one or more email addresses or to an absolute file name. -.It Va daily_status_security_diff_flags +.It Va security_status_diff_flags .Pq Vt str Set to the arguments to pass to the .Xr diff 1 utility when generating differences. The default is .Fl b u . -.It Va daily_status_security_chksetuid_enable +.It Va security_status_chksetuid_enable .Pq Vt bool Set to .Dq Li YES to compare the modes and modification times of setuid executables with the previous day's values. -.It Va daily_status_security_chkportsum_enable +.It Va security_status_chksetuid_period +.Pq Vt str +Set to either +.Dq Li daily , +.Dq Li weekly , +.Dq Li monthly +or +.Dq Li NO . +.It Va security_status_chkportsum_enable .Pq Vt bool Set to .Dq Li YES to verify checksums of all installed packages against the known checksums in .Pa /var/db/pkg . -.It Va daily_status_security_neggrpperm_enable +.It Va security_status_chkportsum_period +.Pq Vt str +Set to either +.Dq Li daily , +.Dq Li weekly , +.Dq Li monthly +or +.Dq Li NO . +.It Va security_status_neggrpperm_enable .Pq Vt bool Set to .Dq Li YES @@ -509,35 +525,67 @@ to check for files where the group of a the world at large. When users are in more than 14 supplemental groups these negative permissions may not be enforced via NFS shares. -.It Va daily_status_security_chkmounts_enable +.It Va security_status_neggrpperm_period +.Pq Vt str +Set to either +.Dq Li daily , +.Dq Li weekly , +.Dq Li monthly +or +.Dq Li NO . +.It Va security_status_chkmounts_enable .Pq Vt bool Set to .Dq Li YES to check for changes mounted file systems to the previous day's values. -.It Va daily_status_security_noamd +.It Va security_status_chkmounts_period +.Pq Vt str +Set to either +.Dq Li daily , +.Dq Li weekly , +.Dq Li monthly +or +.Dq Li NO . +.It Va security_status_noamd .Pq Vt bool Set to .Dq Li YES if you want to ignore .Xr amd 8 mounts when comparing against yesterday's file system mounts in the -.Va daily_status_security_chkmounts_enable +.Va security_status_chkmounts_enable check. -.It Va daily_status_security_chkuid0_enable +.It Va security_status_chkuid0_enable .Pq Vt bool Set to .Dq Li YES to check .Pa /etc/master.passwd for accounts with UID 0. -.It Va daily_status_security_passwdless_enable +.It Va security_status_chkuid0_period +.Pq Vt str +Set to either +.Dq Li daily , +.Dq Li weekly , +.Dq Li monthly +or +.Dq Li NO . +.It Va security_status_passwdless_enable .Pq Vt bool Set to .Dq Li YES to check .Pa /etc/master.passwd for accounts with empty passwords. -.It Va daily_status_security_logincheck_enable +.It Va security_status_passwdless_period +.Pq Vt str +Set to either +.Dq Li daily , +.Dq Li weekly , +.Dq Li monthly +or +.Dq Li NO . +.It Va security_status_logincheck_enable .Pq Vt bool Set to .Dq Li YES @@ -546,49 +594,105 @@ to check ownership, see .Xr login.conf 5 for more information. -.It Va daily_status_security_ipfwdenied_enable +.It Va security_status_logincheck_period +.Pq Vt str +Set to either +.Dq Li daily , +.Dq Li weekly , +.Dq Li monthly +or +.Dq Li NO . +.It Va security_status_ipfwdenied_enable .Pq Vt bool Set to .Dq Li YES to show log entries for packets denied by .Xr ipfw 8 since yesterday's check. -.It Va daily_status_security_ipfdenied_enable +.It Va security_status_ipfwdenied_period +.Pq Vt str +Set to either +.Dq Li daily , +.Dq Li weekly , +.Dq Li monthly +or +.Dq Li NO . +.It Va security_status_ipfdenied_enable .Pq Vt bool Set to .Dq Li YES to show log entries for packets denied by .Xr ipf 8 since yesterday's check. -.It Va daily_status_security_pfdenied_enable +.It Va security_status_ipfdenied_period +.Pq Vt str +Set to either +.Dq Li daily , +.Dq Li weekly , +.Dq Li monthly +or +.Dq Li NO . +.It Va security_status_pfdenied_enable .Pq Vt bool Set to .Dq Li YES to show log entries for packets denied by .Xr pf 4 since yesterday's check. -.It Va daily_status_security_ipfwlimit_enable +.It Va security_status_pfdenied_period +.Pq Vt str +Set to either +.Dq Li daily , +.Dq Li weekly , +.Dq Li monthly +or +.Dq Li NO . +.It Va security_status_ipfwlimit_enable .Pq Vt bool Set to .Dq Li YES to display .Xr ipfw 8 rules that have reached their verbosity limit. -.It Va daily_status_security_kernelmsg_enable +.It Va security_status_ipfwlimit_period +.Pq Vt str +Set to either +.Dq Li daily , +.Dq Li weekly , +.Dq Li monthly +or +.Dq Li NO . +.It Va security_status_kernelmsg_enable .Pq Vt bool Set to .Dq Li YES to show new .Xr dmesg 8 entries since yesterday's check. -.It Va daily_status_security_loginfail_enable +.It Va security_status_kernelmsg_period +.Pq Vt str +Set to either +.Dq Li daily , +.Dq Li weekly , +.Dq Li monthly +or +.Dq Li NO . +.It Va security_status_loginfail_enable .Pq Vt bool Set to .Dq Li YES to display failed logins from .Pa /var/log/messages in the previous day. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 21:28:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B5D0112F; Tue, 27 Aug 2013 21:28:12 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A197723C0; Tue, 27 Aug 2013 21:28:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RLSCtp071626; Tue, 27 Aug 2013 21:28:12 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RLSCR3071625; Tue, 27 Aug 2013 21:28:12 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201308272128.r7RLSCR3071625@svn.freebsd.org> From: Jeremie Le Hen Date: Tue, 27 Aug 2013 21:28:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254975 - head/etc/periodic/monthly X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 21:28:12 -0000 Author: jlh Date: Tue Aug 27 21:28:12 2013 New Revision: 254975 URL: http://svnweb.freebsd.org/changeset/base/254975 Log: Install 450.status-security. Modified: head/etc/periodic/monthly/Makefile Modified: head/etc/periodic/monthly/Makefile ============================================================================== --- head/etc/periodic/monthly/Makefile Tue Aug 27 21:20:28 2013 (r254974) +++ head/etc/periodic/monthly/Makefile Tue Aug 27 21:28:12 2013 (r254975) @@ -2,7 +2,8 @@ .include -FILES= 999.local +FILES= 450.status-security \ + 999.LOCAL # NB: keep these sorted by MK_* knobs From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 21:29:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9300727D; Tue, 27 Aug 2013 21:29:21 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7E7C123CD; Tue, 27 Aug 2013 21:29:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RLTLKF072184; Tue, 27 Aug 2013 21:29:21 GMT (envelope-from davidcs@svn.freebsd.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RLTL0f072183; Tue, 27 Aug 2013 21:29:21 GMT (envelope-from davidcs@svn.freebsd.org) Message-Id: <201308272129.r7RLTL0f072183@svn.freebsd.org> From: David C Somayajulu Date: Tue, 27 Aug 2013 21:29:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254976 - head/sys/dev/qlxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 21:29:21 -0000 Author: davidcs Date: Tue Aug 27 21:29:21 2013 New Revision: 254976 URL: http://svnweb.freebsd.org/changeset/base/254976 Log: Fix bug in Flash access code Submitted by: David C Somayajulu Modified: head/sys/dev/qlxgbe/ql_misc.c Modified: head/sys/dev/qlxgbe/ql_misc.c ============================================================================== --- head/sys/dev/qlxgbe/ql_misc.c Tue Aug 27 21:28:12 2013 (r254975) +++ head/sys/dev/qlxgbe/ql_misc.c Tue Aug 27 21:29:21 2013 (r254976) @@ -321,7 +321,7 @@ qla_get_fdt(qla_host_t *ha) } while ((count < 10000) && (data32 != 0x6)); - if (count == 0 && data32 != 0x6) { + if (data32 != 0x6) { qla_sem_unlock(ha, Q8_FLASH_UNLOCK); device_printf(ha->pci_dev, "%s: Poll Q8_FLASH_STATUS failed\n", @@ -401,7 +401,7 @@ qla_flash_write_enable(qla_host_t *ha, i } while ((count < 10000) && (data32 != 0x6)); - if (count == 0 && data32 != 0x6) { + if (data32 != 0x6) { device_printf(ha->pci_dev, "%s: Poll Q8_FLASH_STATUS failed\n", __func__); @@ -432,7 +432,7 @@ qla_erase_flash_sector(qla_host_t *ha, u } while (((count++) < 1000) && (data32 != 0x6)); - if (count == 0 && data32 != 0x6) { + if (data32 != 0x6) { device_printf(ha->pci_dev, "%s: Poll Q8_FLASH_STATUS failed\n", __func__); @@ -479,7 +479,7 @@ qla_erase_flash_sector(qla_host_t *ha, u } while (((count++) < 1000) && (data32 != 0x6)); - if (count == 0 && data32 != 0x6) { + if (data32 != 0x6) { device_printf(ha->pci_dev, "%s: Poll Q8_FLASH_STATUS failed\n", __func__); @@ -575,7 +575,7 @@ qla_wr_flash32(qla_host_t *ha, uint32_t } while ((count < 10000) && (data32 != 0x6)); - if (count == 0 && data32 != 0x6) { + if (data32 != 0x6) { device_printf(ha->pci_dev, "%s: Poll Q8_FLASH_STATUS failed\n", __func__); From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 21:31:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 469A93F0; Tue, 27 Aug 2013 21:31:59 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from caravan.chchile.org (caravan.chchile.org [178.32.125.136]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0CD0B2410; Tue, 27 Aug 2013 21:31:58 +0000 (UTC) Received: by caravan.chchile.org (Postfix, from userid 1000) id CA71CC0E3C; Tue, 27 Aug 2013 21:31:48 +0000 (UTC) Date: Tue, 27 Aug 2013 23:31:48 +0200 From: Jeremie Le Hen To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r254974 - in head: etc/defaults etc/periodic/monthly etc/periodic/security etc/periodic/weekly share/man/man5 Message-ID: <20130827213148.GR24767@caravan.chchile.org> Mail-Followup-To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201308272120.r7RLKTvk066897@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201308272120.r7RLKTvk066897@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 21:31:59 -0000 On Tue, Aug 27, 2013 at 09:20:29PM +0000, Jeremie Le Hen wrote: > Author: jlh > Date: Tue Aug 27 21:20:28 2013 > New Revision: 254974 > URL: http://svnweb.freebsd.org/changeset/base/254974 > > Log: > Make the period of each periodic security script configurable. > > There are now six additional variables > weekly_status_security_enable > weekly_status_security_inline > weekly_status_security_output > monthly_status_security_enable > monthly_status_security_inline > monthly_status_security_output > alongside their existing daily counterparts. They all have the same > default values. > > All other "daily_status_security_${scriptname}_${whatever}" > variables have been renamed to "security_status_${name}_${whatever}". > A compatibility shim has been introduced for the old variable names, > which we will be able to remove in 11.0-RELEASE. > > "security_status_${name}_enable" is still a boolean but a new > "security_status_${name}_period" allows to define the period of > each script. The value is one of "daily" (the default for backward > compatibility), "weekly", "monthly" and "NO". > > Note that when the security periodic scripts are run directly from > crontab(5) (as opposed to being called by daily or weekly periodic > scripts), they will run unless the test is explicitely disabled with a > "NO", either for in the "_enable" or the "_period" variable. > > When the security output is not inlined, the mail subject has been > changed from "$host $arg run output" to "$host $arg $period run output". > For instance: > myfbsd security run output -> myfbsd security daily run output > I don't think this is considered as a stable API, but feel free to > correct me if I'm wrong. > > Finally, I will rearrange periodic.conf(5) and default/periodic.conf > to put the security options in their own section. I left them in > place for this commit to make reviewing easier. In summary, just add the following lines to periodic.conf(5) to avoid running those I/O-expensive scripts daily. security_status_chksetuid_period="weekly" security_status_neggrpperm_period="weekly" -- Jeremie Le Hen Scientists say the world is made up of Protons, Neutrons and Electrons. They forgot to mention Morons. From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 21:47:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A96839ED; Tue, 27 Aug 2013 21:47:01 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 96B0A24EB; Tue, 27 Aug 2013 21:47:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RLl1RJ082313; Tue, 27 Aug 2013 21:47:01 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RLl165082311; Tue, 27 Aug 2013 21:47:01 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308272147.r7RLl165082311@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 27 Aug 2013 21:47:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254977 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 21:47:01 -0000 Author: jilles Date: Tue Aug 27 21:47:01 2013 New Revision: 254977 URL: http://svnweb.freebsd.org/changeset/base/254977 Log: wordexp(): Avoid leaking the pipe file descriptors to a parallel fork/exec. This uses the new pipe2() system call added on May 1 (r250159). Modified: head/lib/libc/gen/wordexp.c Modified: head/lib/libc/gen/wordexp.c ============================================================================== --- head/lib/libc/gen/wordexp.c Tue Aug 27 21:29:21 2013 (r254976) +++ head/lib/libc/gen/wordexp.c Tue Aug 27 21:47:01 2013 (r254977) @@ -121,7 +121,7 @@ we_askshell(const char *words, wordexp_t serrno = errno; - if (pipe(pdes) < 0) + if (pipe2(pdes, O_CLOEXEC) < 0) return (WRDE_NOSPACE); /* XXX */ (void)sigemptyset(&newsigblock); (void)sigaddset(&newsigblock, SIGCHLD); @@ -140,10 +140,10 @@ we_askshell(const char *words, wordexp_t * builtin on `words'. */ (void)_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); - _close(pdes[0]); - if (_dup2(pdes[1], STDOUT_FILENO) < 0) + if ((pdes[1] != STDOUT_FILENO ? + _dup2(pdes[1], STDOUT_FILENO) : + _fcntl(pdes[1], F_SETFD, 0)) < 0) _exit(1); - _close(pdes[1]); execl(_PATH_BSHELL, "sh", flags & WRDE_UNDEF ? "-u" : "+u", "-c", "eval \"$1\";eval \"wordexp $2\"", "", flags & WRDE_SHOWERR ? "" : "exec 2>/dev/null", words, From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 22:37:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C7F82743; Tue, 27 Aug 2013 22:37:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B3F812837; Tue, 27 Aug 2013 22:37:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RMbUXp011676; Tue, 27 Aug 2013 22:37:30 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RMbUAD011675; Tue, 27 Aug 2013 22:37:30 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201308272237.r7RMbUAD011675@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 27 Aug 2013 22:37:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254978 - head/etc/periodic/monthly X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 22:37:30 -0000 Author: jkim Date: Tue Aug 27 22:37:29 2013 New Revision: 254978 URL: http://svnweb.freebsd.org/changeset/base/254978 Log: Fix a typo introduced in r254975. Modified: head/etc/periodic/monthly/Makefile Modified: head/etc/periodic/monthly/Makefile ============================================================================== --- head/etc/periodic/monthly/Makefile Tue Aug 27 21:47:01 2013 (r254977) +++ head/etc/periodic/monthly/Makefile Tue Aug 27 22:37:29 2013 (r254978) @@ -3,7 +3,7 @@ .include FILES= 450.status-security \ - 999.LOCAL + 999.local # NB: keep these sorted by MK_* knobs From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 23:02:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C035C19C; Tue, 27 Aug 2013 23:02:21 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AC56129CC; Tue, 27 Aug 2013 23:02:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RN2L1j026519; Tue, 27 Aug 2013 23:02:21 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RN2KbT026513; Tue, 27 Aug 2013 23:02:20 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201308272302.r7RN2KbT026513@svn.freebsd.org> From: "Kenneth D. Merry" Date: Tue, 27 Aug 2013 23:02:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254979 - in stable/9/sys: dev/nvme geom kern sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 23:02:21 -0000 Author: ken Date: Tue Aug 27 23:02:20 2013 New Revision: 254979 URL: http://svnweb.freebsd.org/changeset/base/254979 Log: MFC change 254389: There are some slight differences from the version in FreeBSD/head. __FreeBSD_version has been bumped to 902503 for the availability of the SI_UNMAPPED cdev flag, and the D_UNMAPPED_IO cdevsw flag remains in place. D_UNMAPPED_IO no longer does anything. Drivers that use that flag will just wind up having mapped I/O by default. The impact will only be on performance, not functionality. Change the way that unmapped I/O capability is advertised. The previous method was to set the D_UNMAPPED_IO flag in the cdevsw for the driver. The problem with this is that in many cases (e.g. sa(4)) there may be some instances of the driver that can handle unmapped I/O and some that can't. The isp(4) driver can handle unmapped I/O, but the esp(4) driver currently cannot. The cdevsw is shared among all driver instances. So instead of setting a flag on the cdevsw, set a flag on the cdev. This allows drivers to indicate support for unmapped I/O on a per-instance basis. sys/conf.h: Remove the D_UNMAPPED_IO cdevsw flag and replace it with an SI_UNMAPPED cdev flag. kern_physio.c: Look at the cdev SI_UNMAPPED flag to determine whether or not a particular driver can handle unmapped I/O. geom_dev.c: Set the SI_UNMAPPED flag for all GEOM cdevs. Since GEOM will create a temporary mapping when needed, setting SI_UNMAPPED unconditionally will work. Remove the D_UNMAPPED_IO flag. nvme_ns.c: Set the SI_UNMAPPED flag on cdevs created here if NVME_UNMAPPED_BIO_SUPPORT is enabled. vfs_aio.c: In aio_qphysio(), check the SI_UNMAPPED flag on a cdev instead of the D_UNMAPPED_IO flag on the cdevsw. sys/param.h: Bump __FreeBSD_version to 1000045 for the switch from setting the D_UNMAPPED_IO flag in the cdevsw to setting SI_UNMAPPED in the cdev. Reviewed by: kib, jimharris Sponsored by: Spectra Logic Modified: stable/9/sys/dev/nvme/nvme_ns.c stable/9/sys/geom/geom_dev.c stable/9/sys/kern/kern_physio.c stable/9/sys/kern/vfs_aio.c stable/9/sys/sys/conf.h stable/9/sys/sys/param.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/dev/nvme/nvme_ns.c ============================================================================== --- stable/9/sys/dev/nvme/nvme_ns.c Tue Aug 27 22:37:29 2013 (r254978) +++ stable/9/sys/dev/nvme/nvme_ns.c Tue Aug 27 23:02:20 2013 (r254979) @@ -133,11 +133,7 @@ nvme_ns_strategy(struct bio *bp) static struct cdevsw nvme_ns_cdevsw = { .d_version = D_VERSION, -#ifdef NVME_UNMAPPED_BIO_SUPPORT - .d_flags = D_DISK | D_UNMAPPED_IO, -#else .d_flags = D_DISK, -#endif .d_read = physread, .d_write = physwrite, .d_open = nvme_ns_open, @@ -348,6 +344,9 @@ nvme_ns_construct(struct nvme_namespace NULL, UID_ROOT, GID_WHEEL, 0600, "nvme%dns%d", device_get_unit(ctrlr->dev), ns->id); #endif +#ifdef NVME_UNMAPPED_BIO_SUPPORT + ns->cdev->si_flags |= SI_UNMAPPED; +#endif if (ns->cdev != NULL) ns->cdev->si_drv1 = ns; Modified: stable/9/sys/geom/geom_dev.c ============================================================================== --- stable/9/sys/geom/geom_dev.c Tue Aug 27 22:37:29 2013 (r254978) +++ stable/9/sys/geom/geom_dev.c Tue Aug 27 23:02:20 2013 (r254979) @@ -79,7 +79,7 @@ static struct cdevsw g_dev_cdevsw = { .d_ioctl = g_dev_ioctl, .d_strategy = g_dev_strategy, .d_name = "g_dev", - .d_flags = D_DISK | D_TRACKCLOSE | D_UNMAPPED_IO, + .d_flags = D_DISK | D_TRACKCLOSE, }; static g_taste_t g_dev_taste; @@ -237,6 +237,7 @@ g_dev_taste(struct g_class *mp, struct g g_free(sc); return (NULL); } + dev->si_flags |= SI_UNMAPPED; sc->sc_dev = dev; /* Search for device alias name and create it if found. */ @@ -251,6 +252,7 @@ g_dev_taste(struct g_class *mp, struct g freeenv(val); make_dev_alias_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK, &adev, dev, "%s", buf); + adev->si_flags |= SI_UNMAPPED; break; } } Modified: stable/9/sys/kern/kern_physio.c ============================================================================== --- stable/9/sys/kern/kern_physio.c Tue Aug 27 22:37:29 2013 (r254978) +++ stable/9/sys/kern/kern_physio.c Tue Aug 27 23:02:20 2013 (r254979) @@ -93,8 +93,7 @@ physio(struct cdev *dev, struct uio *uio csw = dev->si_devsw; if (uio->uio_segflg == UIO_USERSPACE) { - if (csw != NULL && - (csw->d_flags & D_UNMAPPED_IO) != 0) + if (dev->si_flags & SI_UNMAPPED) mapped = 0; else mapped = 1; Modified: stable/9/sys/kern/vfs_aio.c ============================================================================== --- stable/9/sys/kern/vfs_aio.c Tue Aug 27 22:37:29 2013 (r254978) +++ stable/9/sys/kern/vfs_aio.c Tue Aug 27 23:02:20 2013 (r254979) @@ -1333,7 +1333,7 @@ aio_qphysio(struct proc *p, struct aiocb /* * Bring buffer into kernel space. */ - if (vmapbuf(bp, 1) < 0) { + if (vmapbuf(bp, (dev->si_flags & SI_UNMAPPED) == 0) < 0) { error = EFAULT; goto doerror; } Modified: stable/9/sys/sys/conf.h ============================================================================== --- stable/9/sys/sys/conf.h Tue Aug 27 22:37:29 2013 (r254978) +++ stable/9/sys/sys/conf.h Tue Aug 27 23:02:20 2013 (r254979) @@ -64,6 +64,7 @@ struct cdev { #define SI_DUMPDEV 0x0080 /* is kernel dumpdev */ #define SI_CANDELETE 0x0100 /* can do BIO_DELETE */ #define SI_CLONELIST 0x0200 /* on a clone list */ +#define SI_UNMAPPED 0x0400 /* can handle unmapped I/O */ struct timespec si_atime; struct timespec si_ctime; struct timespec si_mtime; Modified: stable/9/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Tue Aug 27 22:37:29 2013 (r254978) +++ stable/9/sys/sys/param.h Tue Aug 27 23:02:20 2013 (r254979) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 902502 /* Master, propagated to newvers */ +#define __FreeBSD_version 902503 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 23:09:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 495CC497; Tue, 27 Aug 2013 23:09:35 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 35A102A1D; Tue, 27 Aug 2013 23:09:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RN9ZWL029609; Tue, 27 Aug 2013 23:09:35 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RN9ZJk029606; Tue, 27 Aug 2013 23:09:35 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201308272309.r7RN9ZJk029606@svn.freebsd.org> From: "Simon J. Gerraty" Date: Tue, 27 Aug 2013 23:09:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254980 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 23:09:35 -0000 Author: sjg Date: Tue Aug 27 23:09:34 2013 New Revision: 254980 URL: http://svnweb.freebsd.org/changeset/base/254980 Log: Use .SHELL to tell bmake to use 'set -e' when running scripts since most FreeBSD makefiles it is in effect. Move the other bmake compatability knobs out of the POSIX block. Reviewed by: obrien Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Tue Aug 27 23:02:20 2013 (r254979) +++ head/share/mk/sys.mk Tue Aug 27 23:09:34 2013 (r254980) @@ -332,12 +332,6 @@ SHELL= ${__MAKE_SHELL} .SHELL: path=${__MAKE_SHELL} .endif -# Tell bmake to expand -V VAR by default -.MAKE.EXPAND_VARIABLES= yes - -# Tell bmake the makefile preference -.MAKE.MAKEFILE_PREFERENCE= BSDmakefile makefile Makefile - .if !defined(.PARSEDIR) # We are not bmake, which is more aggressive about searching .PATH # It is sometime necessary to curb its enthusiasm with .NOPATH @@ -351,4 +345,24 @@ SHELL= ${__MAKE_SHELL} .endif +.if defined(.PARSEDIR) +# Tell bmake to expand -V VAR by default +.MAKE.EXPAND_VARIABLES= yes + +# Tell bmake the makefile preference +.MAKE.MAKEFILE_PREFERENCE= BSDmakefile makefile Makefile + +# By default bmake does *not* use set -e +# when running target scripts, this is a problem for many makefiles here. +# So define a shell that will do what FreeBSD expects. +.ifndef WITHOUT_SHELL_ERRCTL +.SHELL: name=sh \ + quiet="set -" echo="set -v" filter="set -" \ + hasErrCtl=yes check="set -e" ignore="set +e" \ + echoFlag=v errFlag=e \ + path=${__MAKE_SHELL:U/bin/sh} +.endif + +.endif + .include From owner-svn-src-all@FreeBSD.ORG Tue Aug 27 23:30:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DF019951; Tue, 27 Aug 2013 23:30:02 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B27112B5A; Tue, 27 Aug 2013 23:30:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7RNU2Qk041193; Tue, 27 Aug 2013 23:30:02 GMT (envelope-from zeising@svn.freebsd.org) Received: (from zeising@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7RNU2qm041191; Tue, 27 Aug 2013 23:30:02 GMT (envelope-from zeising@svn.freebsd.org) Message-Id: <201308272330.r7RNU2qm041191@svn.freebsd.org> From: Niclas Zeising Date: Tue, 27 Aug 2013 23:30:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254981 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 23:30:02 -0000 Author: zeising (doc,ports committer) Date: Tue Aug 27 23:30:02 2013 New Revision: 254981 URL: http://svnweb.freebsd.org/changeset/base/254981 Log: Really regen after r254962. This removes the WITH_BSDCONFIG description alltogether, since this option is removed. At the same time, fix the WITHOUT_LIBCPLUSPLUS option that had gotten inverted. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Tue Aug 27 23:09:34 2013 (r254980) +++ head/share/man/man5/src.conf.5 Tue Aug 27 23:30:02 2013 (r254981) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 253304 2013-07-12 23:08:44Z bapt .\" $FreeBSD$ -.Dd August 27, 2013 +.Dd August 28, 2013 .Dt SRC.CONF 5 .Os .Sh NAME @@ -235,9 +235,6 @@ This option will be removed in due time. .It Va WITHOUT_BOOT .\" from FreeBSD: head/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru Set to not build the boot blocks and loader. -.It Va WITH_BSDCONFIG -.\" from FreeBSD: head/tools/build/options/WITH_BSDCONFIG 238448 2012-07-14 10:17:47Z zeising -Set to install bsdconfig(8), a BSD-licensed configuration/management utility. .It Va WITHOUT_BSD_CPIO .\" from FreeBSD: head/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb Set to not build the BSD licensed version of cpio based on @@ -704,9 +701,9 @@ and On amd64, set to not build 32-bit library set and a .Nm ld-elf32.so.1 runtime linker. -.It Va WITH_LIBCPLUSPLUS -.\" from FreeBSD: head/tools/build/options/WITH_LIBCPLUSPLUS 228082 2011-11-28 17:56:46Z dim -Set to build libcxxrt and libc++. +.It Va WITHOUT_LIBCPLUSPLUS +.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBCPLUSPLUS 246262 2013-02-02 22:42:46Z dim +Set to avoid building libcxxrt and libc++. .It Va WITH_LIBICONV_COMPAT .\" from FreeBSD: head/tools/build/options/WITH_LIBICONV_COMPAT 254919 2013-08-26 17:15:56Z antoine Set to build libiconv API and link time compatibility. From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 00:39:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 63F5D8D9; Wed, 28 Aug 2013 00:39:48 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 372882E83; Wed, 28 Aug 2013 00:39:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7S0dmmK082243; Wed, 28 Aug 2013 00:39:48 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7S0dmRK082241; Wed, 28 Aug 2013 00:39:48 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201308280039.r7S0dmRK082241@svn.freebsd.org> From: Xin LI Date: Wed, 28 Aug 2013 00:39:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254982 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 00:39:48 -0000 Author: delphij Date: Wed Aug 28 00:39:47 2013 New Revision: 254982 URL: http://svnweb.freebsd.org/changeset/base/254982 Log: Previously, both zfs_rename and zfs_link does a check on whether the passed vnode belongs to the same mount point (v_vfsp or also known as v_mount in FreeBSD). This check prevents the code from proceeding further on vnodes that do not belong to ZFS, for instance, on UFS or NULLFS. The recent change (merged as r254585) on upstream changes the check of v_vfsp to instead check the znode's z_zfsvfs. On Illumos this would work because when the vnode comes from lofs, the VOP_REALVP() would give the right vnode, this is not true on FreeBSD where our VOP_REALVP is a no-op, and as such tdvp is not guaranteed to be a ZFS vnode, and will later trigger a failed assertion when verifying the vnode. This changeset modifies our local shims (zfs_freebsd_rename and zfs_freebsd_link) to check if v_mount matches before proceeding further. Reported by: many Diagnostic work by: avg Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Aug 27 23:30:02 2013 (r254981) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Aug 28 00:39:47 2013 (r254982) @@ -6250,8 +6250,11 @@ zfs_freebsd_rename(ap) ASSERT(ap->a_fcnp->cn_flags & (SAVENAME|SAVESTART)); ASSERT(ap->a_tcnp->cn_flags & (SAVENAME|SAVESTART)); - error = zfs_rename(fdvp, ap->a_fcnp->cn_nameptr, tdvp, - ap->a_tcnp->cn_nameptr, ap->a_fcnp->cn_cred, NULL, 0); + if (fdvp->v_mount == tdvp->v_mount) + error = zfs_rename(fdvp, ap->a_fcnp->cn_nameptr, tdvp, + ap->a_tcnp->cn_nameptr, ap->a_fcnp->cn_cred, NULL, 0); + else + error = EXDEV; if (tdvp == tvp) VN_RELE(tdvp); @@ -6308,10 +6311,15 @@ zfs_freebsd_link(ap) } */ *ap; { struct componentname *cnp = ap->a_cnp; + vnode_t *vp = ap->a_vp; + vnode_t *tdvp = ap->a_tdvp; + + if (tdvp->v_mount != vp->v_mount) + return (EXDEV); ASSERT(cnp->cn_flags & SAVENAME); - return (zfs_link(ap->a_tdvp, ap->a_vp, cnp->cn_nameptr, cnp->cn_cred, NULL, 0)); + return (zfs_link(tdvp, vp, cnp->cn_nameptr, cnp->cn_cred, NULL, 0)); } static int From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 01:03:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A2F09B1F; Wed, 28 Aug 2013 01:03:04 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 83C2D2F6F; Wed, 28 Aug 2013 01:03:04 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [69.198.165.132]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id EDCFA5E70; Tue, 27 Aug 2013 18:02:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1377651778; bh=zITuwb5J/96REDbRukR9rw5bEMZUWNa9eLdPtTH3hTo=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=m0ivMNOKaGb1WqoVTdmVwtEsDuCjxRMytszXpguFFQckUApn+3OVy7mm9hq1twA+v wIGtqcb7Zu2Xq6Eh/vs1pY0vOfJ70MKPt42B3GnsXljbDnxLyCcmCRMqfek3uVnWsf bBpYMvuAF8SvHKw+RzQhUMvLm2fUWYCxi0bGDEVY= Message-ID: <521D4C41.3060208@delphij.net> Date: Tue, 27 Aug 2013 18:02:57 -0700 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: Davide Italiano Subject: Re: svn commit: r254585 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201308202231.r7KMVERi068300@svn.freebsd.org> <20130825221517.GM24767@caravan.chchile.org> <521B75CE.70103@FreeBSD.org> <521BDEAC.9080909@delphij.net> <521C5CAC.2060400@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, Xin LI , svn-src-all@freebsd.org, Andriy Gapon , Xin LI , svn-src-head@freebsd.org, Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 01:03:04 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 08/27/13 01:59, Davide Italiano wrote: > On Tue, Aug 27, 2013 at 10:00 AM, Andriy Gapon > wrote: >> on 27/08/2013 02:03 Xin Li said the following: >>> On 08/26/13 08:35, Andriy Gapon wrote: >>>> on 26/08/2013 01:15 Jeremie Le Hen said the following: >>>>> Hi Xin, >>>>> >>>>> On Tue, Aug 20, 2013 at 10:31:14PM +0000, Xin LI wrote: >> [snip] >>>>>> @@ zfs_rename(vnode_t *sdvp, char *snm, vno if >>>>>> (VOP_REALVP(tdvp, &realvp, ct) == 0) tdvp = realvp; >>>>>> >>>>>> - if (tdvp->v_vfsp != sdvp->v_vfsp || >>>>>> zfsctl_is_node(tdvp)) { + tdzp = VTOZ(tdvp); >>> >>>> The problem with this change, at least on FreeBSD, is that >>>> tdvp may not belong to ZFS. In that case VTOZ(tdvp) does not >>>> make any sense and would produce garbage or trigger an >>>> assert. Previously tdvp->v_vfsp != sdvp->v_vfsp check would >>>> catch that situations. Two side notes: - v_vfsp is actually >>>> v_mount on FreeBSD >>> >>> Ah that's good point. Any objection in putting a change to >>> their _freebsd_ counterpart (zfs_freebsd_rename and >>> zfs_freebsd_link) as attached? >> >> I think that at least the change to zfs_freebsd_rename as it is >> now would break locking and reference counting semantics for the >> vnodes involved -- vreles and vputs have to be done even in the >> error case. >> >> Also, look at the check at the start of ufs_rename, it also >> considers tvp when it's not NULL. I am not sure if it is >> possible to have a situation where fvp and tdvp are from the same >> fs, but tvp is from a different one. >> >> I've been also tempted to place the check in the common code in >> kern_renameat. That should cover the system calls. But could be >> insufficient for direct calls to VOP_RENAME in other places. >> >> diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c >> index a7cb87a..cfa4d93 100644 --- a/sys/kern/vfs_syscalls.c +++ >> b/sys/kern/vfs_syscalls.c @@ -3608,6 +3608,14 @@ >> kern_renameat(struct thread *td, int oldfd, char *old, int newfd, >> char *new, error = EINVAL; goto out; } + + /* Check for >> cross-device rename. */ + if ((fvp->v_mount != >> tdvp->v_mount) || + (tvp && (fvp->v_mount != >> tvp->v_mount))) { + error = EXDEV; + >> goto out; + } + /* * If the source is the same as the >> destination (that is, if they * are links to the same vnode), >> then there is nothing to do. >> >>>> - VOP_REALVP is a glorified nop on FreeBSD >>> >>> It's not clear to me what was the intention for having a macro >>> instead of just ifdef'ing the code out -- maybe to prevent >>> unwanted conflict with upstream? These two VOP's are the only >>> consumers of VOP_REALVP in tree. >> >> Yes. Personally I would just ifdef out the calls. >> >>>> Another unrelated problem that existed before this change and >>>> has been noted by Davide Italiano is that sdvp is not locked >>>> and so it can potentially be recycled before ZFS_ENTER() >>>> enter and for that reason sdzp and zfsvfs could be invalid. >>>> Because sdvp is referenced, this problem can currently occur >>>> only if a forced unmount runs concurrently to zfs_rename. >>>> tdvp should be locked and thus could be used instead of sdvp >>>> as a source for zfsvfs. >>> >>> I think this would need more work, I'll take a look after we >>> have this regression fixed. >> >> Thank you. >> >> -- Andriy Gapon > > I've written a patch that attempts to fix the second problem. > http://people.freebsd.org/~davide/review/zfsrename_recycle.diff The > culprit is that we're dereferencing sdvp without the vnode lock > held, so data-stability is not guaranteed. tdvp, instead, is locked > at the entry point of VOP_RENAME() (at least according to > vop_rename_pre()) so it can be safely used. As pointed out by > Andriy ZFS has some different mechanisms wrt other file systems > that allow the vnode to not be recycled when it's referenced > (ZFS_ENTER), so once we get zfsvfs_t * from tdzp we can call > ZFS_ENTER and dereference sdvp in a safe manner. I'm not sure that this is right. Now we have: tdzp = VTOZ(tdvp); ZFS_VERIFY_ZP(tdzp); zfsvfs = tdzp->z_zfsvfs; ZFS_ENTER(zfsvfs); // tdzp's z_zfsvfs entered zilog = zfsvfs->z_log; sdzp = VTOZ(sdvp); ZFS_VERIFY_ZP(sdzp); // (*) Note that in the (*) step, when sdzp is invalid and sdzp have different z_zfsvfs than tdzp (for instance when the node is in the snapshot directory; the code later would test this), we could end up with ZFS_EXIT()'ing the wrong z_zfsvfs. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQEcBAEBCgAGBQJSHUxBAAoJEG80Jeu8UPuzkzEIAKXlfGuTodrPcPkDkxBhhaOj QoxoT06jFwMTplysICuCpslQNyyG2Jxq654u9nMh6q5dww370eTtm2FJ0n2QTxk4 JeWLpZVUu7VHWNXYVJQqrmATaMFHO4wVf5AYpSHn+1iCWo0kQn1MPxPw/oSUt0yw 1628jhWTs8n+rxQaYrYN6ewXYeylMwC50ZB0kE/gQpQZ+cKAGmrM/8tur24SQBEo WwrHakrv1DGJ8rv3Q53FB2iUZ+zEAZs6MJ28w32lV3vOI20jfQbEK+RR7i7HvxdV c/7M96wCd0X4iEqZb87VVfJFSRdQsXy/35scXhhh/BSviT7rervS8XxPGhfpXOs= =MzwT -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 01:10:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 38DE1CD3; Wed, 28 Aug 2013 01:10:52 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 176222FC7; Wed, 28 Aug 2013 01:10:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7S1ApnQ002193; Wed, 28 Aug 2013 01:10:51 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7S1ApeB002191; Wed, 28 Aug 2013 01:10:51 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201308280110.r7S1ApeB002191@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Wed, 28 Aug 2013 01:10:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254983 - head/sys/mips/malta X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 01:10:52 -0000 Author: gonzo Date: Wed Aug 28 01:10:51 2013 New Revision: 254983 URL: http://svnweb.freebsd.org/changeset/base/254983 Log: Fix GT PCI controller driver on big-endian hardware Modified: head/sys/mips/malta/gt_pci.c Modified: head/sys/mips/malta/gt_pci.c ============================================================================== --- head/sys/mips/malta/gt_pci.c Wed Aug 28 00:39:47 2013 (r254982) +++ head/sys/mips/malta/gt_pci.c Wed Aug 28 01:10:51 2013 (r254983) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -91,6 +92,14 @@ __FBSDID("$FreeBSD$"); #define OCW3_POLL_IRQ(x) ((x) & 0x7f) #define OCW3_POLL_PENDING (1U << 7) +/* + * Galileo controller's registers are LE so convert to then + * to/from native byte order. We rely on boot loader or emulator + * to set "swap bytes" configuration correctly for us + */ +#define GT_PCI_DATA(v) htole32((v)) +#define GT_HOST_DATA(v) le32toh((v)) + struct gt_pci_softc; struct gt_pci_intr_cookie { @@ -437,20 +446,20 @@ gt_pci_read_config(device_t dev, u_int b return (uint32_t)(-1); /* Clear cause register bits. */ - GT_REGVAL(GT_INTR_CAUSE) = 0; - - GT_REGVAL(GT_PCI0_CFG_ADDR) = (1 << 31) | addr; - data = GT_REGVAL(GT_PCI0_CFG_DATA); + GT_REGVAL(GT_INTR_CAUSE) = GT_PCI_DATA(0); + GT_REGVAL(GT_PCI0_CFG_ADDR) = GT_PCI_DATA((1 << 31) | addr); + /* + * Galileo system controller is special + */ + if ((bus == 0) && (slot == 0)) + data = GT_PCI_DATA(GT_REGVAL(GT_PCI0_CFG_DATA)); + else + data = GT_REGVAL(GT_PCI0_CFG_DATA); /* Check for master abort. */ - if (GT_REGVAL(GT_INTR_CAUSE) & (GTIC_MASABORT0 | GTIC_TARABORT0)) + if (GT_HOST_DATA(GT_REGVAL(GT_INTR_CAUSE)) & (GTIC_MASABORT0 | GTIC_TARABORT0)) data = (uint32_t) -1; - /* - * XXX: We assume that words readed from GT chip are BE. - * Should we set the mode explicitly during chip - * Initialization? - */ switch(reg % 4) { case 3: @@ -507,11 +516,6 @@ gt_pci_write_config(device_t dev, u_int { reg_data = gt_pci_read_config(dev, bus, slot, func, reg, 4); - /* - * XXX: We assume that words readed from GT chip are BE. - * Should we set the mode explicitly during chip - * Initialization? - */ shift = 8 * (reg & 3); switch(bytes) @@ -548,10 +552,23 @@ gt_pci_write_config(device_t dev, u_int return; /* Clear cause register bits. */ - GT_REGVAL(GT_INTR_CAUSE) = 0; + GT_REGVAL(GT_INTR_CAUSE) = GT_PCI_DATA(0); + + GT_REGVAL(GT_PCI0_CFG_ADDR) = GT_PCI_DATA((1 << 31) | addr); + + /* + * Galileo system controller is special + */ + if ((bus == 0) && (slot == 0)) + GT_REGVAL(GT_PCI0_CFG_DATA) = GT_PCI_DATA(data); + else + GT_REGVAL(GT_PCI0_CFG_DATA) = data; + +#if 0 + printf("PCICONF_WRITE(%02x:%02x.%02x[%04x] -> %02x(%d)\n", + bus, slot, func, reg, data, bytes); +#endif - GT_REGVAL(GT_PCI0_CFG_ADDR) = (1 << 31) | addr; - GT_REGVAL(GT_PCI0_CFG_DATA) = data; } static int From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 05:12:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2B9A6F47; Wed, 28 Aug 2013 05:12:30 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F24F92A65; Wed, 28 Aug 2013 05:12:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7S5CTes042133; Wed, 28 Aug 2013 05:12:29 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7S5CTQ3042132; Wed, 28 Aug 2013 05:12:29 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201308280512.r7S5CTQ3042132@svn.freebsd.org> From: Joel Dahl Date: Wed, 28 Aug 2013 05:12:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254984 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 05:12:30 -0000 Author: joel (doc committer) Date: Wed Aug 28 05:12:29 2013 New Revision: 254984 URL: http://svnweb.freebsd.org/changeset/base/254984 Log: mdoc fix Modified: head/share/man/man5/periodic.conf.5 Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Wed Aug 28 01:10:51 2013 (r254983) +++ head/share/man/man5/periodic.conf.5 Wed Aug 28 05:12:29 2013 (r254984) @@ -1,4 +1,4 @@ -\"- +.\"- .\" Copyright (c) 2000 Brian Somers .\" All rights reserved. .\" From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 07:42:16 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 723E6924; Wed, 28 Aug 2013 07:42:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id DA3C12250; Wed, 28 Aug 2013 07:42:14 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA04308; Wed, 28 Aug 2013 10:41:59 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VEaO6-000O45-Pp; Wed, 28 Aug 2013 10:41:58 +0300 Message-ID: <521DA9A2.4050003@FreeBSD.org> Date: Wed, 28 Aug 2013 10:41:22 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130810 Thunderbird/17.0.8 MIME-Version: 1.0 To: d@delphij.net Subject: Re: svn commit: r254585 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201308202231.r7KMVERi068300@svn.freebsd.org> <20130825221517.GM24767@caravan.chchile.org> <521B75CE.70103@FreeBSD.org> <521BDEAC.9080909@delphij.net> <521C5CAC.2060400@FreeBSD.org> <521D4C41.3060208@delphij.net> In-Reply-To: <521D4C41.3060208@delphij.net> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Davide Italiano , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, Xin LI , svn-src-head@FreeBSD.org, Xin Li X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 07:42:16 -0000 on 28/08/2013 04:02 Xin Li said the following: > I'm not sure that this is right. Now we have: > > tdzp = VTOZ(tdvp); > ZFS_VERIFY_ZP(tdzp); > zfsvfs = tdzp->z_zfsvfs; > ZFS_ENTER(zfsvfs); // tdzp's z_zfsvfs entered > zilog = zfsvfs->z_log; > sdzp = VTOZ(sdvp); > ZFS_VERIFY_ZP(sdzp); // (*) > > Note that in the (*) step, when sdzp is invalid and sdzp have > different z_zfsvfs than tdzp (for instance when the node is in the > snapshot directory; the code later would test this), we could end up > with ZFS_EXIT()'ing the wrong z_zfsvfs. The v_vfsp / v_mount check should be prior to any of this and should ensure that all the vnodes have the same z_zfsvfs. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 07:46:57 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 34409B8D; Wed, 28 Aug 2013 07:46:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id D55FA227C; Wed, 28 Aug 2013 07:46:55 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA04375; Wed, 28 Aug 2013 10:46:54 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VEaSr-000O4c-PX; Wed, 28 Aug 2013 10:46:53 +0300 Message-ID: <521DAAB6.4010008@FreeBSD.org> Date: Wed, 28 Aug 2013 10:45:58 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130810 Thunderbird/17.0.8 MIME-Version: 1.0 To: Xin LI Subject: Re: svn commit: r254982 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201308280039.r7S0dmRK082241@svn.freebsd.org> In-Reply-To: <201308280039.r7S0dmRK082241@svn.freebsd.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 07:46:57 -0000 on 28/08/2013 03:39 Xin LI said the following: > @@ -6250,8 +6250,11 @@ zfs_freebsd_rename(ap) > ASSERT(ap->a_fcnp->cn_flags & (SAVENAME|SAVESTART)); > ASSERT(ap->a_tcnp->cn_flags & (SAVENAME|SAVESTART)); > > - error = zfs_rename(fdvp, ap->a_fcnp->cn_nameptr, tdvp, > - ap->a_tcnp->cn_nameptr, ap->a_fcnp->cn_cred, NULL, 0); > + if (fdvp->v_mount == tdvp->v_mount) > + error = zfs_rename(fdvp, ap->a_fcnp->cn_nameptr, tdvp, > + ap->a_tcnp->cn_nameptr, ap->a_fcnp->cn_cred, NULL, 0); > + else > + error = EXDEV; > > if (tdvp == tvp) > VN_RELE(tdvp); So, I am still not sure if that is important or not, but this change still misses (tvp && (fvp->v_mount != tvp->v_mount)) check as found in ufs_rename. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 07:48:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 591BBCE8; Wed, 28 Aug 2013 07:48:45 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4656B228A; Wed, 28 Aug 2013 07:48:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7S7mjl6031429; Wed, 28 Aug 2013 07:48:45 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7S7mjda031428; Wed, 28 Aug 2013 07:48:45 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201308280748.r7S7mjda031428@svn.freebsd.org> From: Ulrich Spoerlein Date: Wed, 28 Aug 2013 07:48:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254985 - head/sys/modules/ip6_mroute_mod X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 07:48:45 -0000 Author: uqs Date: Wed Aug 28 07:48:44 2013 New Revision: 254985 URL: http://svnweb.freebsd.org/changeset/base/254985 Log: Fix 'make depend' Modified: head/sys/modules/ip6_mroute_mod/Makefile Modified: head/sys/modules/ip6_mroute_mod/Makefile ============================================================================== --- head/sys/modules/ip6_mroute_mod/Makefile Wed Aug 28 05:12:29 2013 (r254984) +++ head/sys/modules/ip6_mroute_mod/Makefile Wed Aug 28 07:48:44 2013 (r254985) @@ -7,7 +7,7 @@ KMOD= ip6_mroute SRCS= ip6_mroute.c -SRCS+= opt_inet6.h opt_mrouting.h +SRCS+= opt_inet6.h opt_kdtrace.h opt_mrouting.h .if !defined(KERNBUILDDIR) opt_inet6.h: From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 10:06:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D50A0C14; Wed, 28 Aug 2013 10:06:20 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C28812A9B; Wed, 28 Aug 2013 10:06:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SA6KX5010738; Wed, 28 Aug 2013 10:06:20 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SA6KSq010737; Wed, 28 Aug 2013 10:06:20 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <201308281006.r7SA6KSq010737@svn.freebsd.org> From: Ivan Voras Date: Wed, 28 Aug 2013 10:06:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254986 - head/sys/ufs/ufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 10:06:20 -0000 Author: ivoras Date: Wed Aug 28 10:06:20 2013 New Revision: 254986 URL: http://svnweb.freebsd.org/changeset/base/254986 Log: Take a very small step toward the Century of the Anchovy by increasing the time dirhash entries stay in memory before being considered for eviction to 1 minute. Modified: head/sys/ufs/ufs/ufs_dirhash.c Modified: head/sys/ufs/ufs/ufs_dirhash.c ============================================================================== --- head/sys/ufs/ufs/ufs_dirhash.c Wed Aug 28 07:48:44 2013 (r254985) +++ head/sys/ufs/ufs/ufs_dirhash.c Wed Aug 28 10:06:20 2013 (r254986) @@ -85,7 +85,7 @@ SYSCTL_INT(_vfs_ufs, OID_AUTO, dirhash_d static int ufs_dirhashlowmemcount = 0; SYSCTL_INT(_vfs_ufs, OID_AUTO, dirhash_lowmemcount, CTLFLAG_RD, &ufs_dirhashlowmemcount, 0, "number of times low memory hook called"); -static int ufs_dirhashreclaimage = 5; +static int ufs_dirhashreclaimage = 60; SYSCTL_INT(_vfs_ufs, OID_AUTO, dirhash_reclaimage, CTLFLAG_RW, &ufs_dirhashreclaimage, 0, "max time in seconds of hash inactivity before deletion in low VM events"); From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 10:19:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D74F1E99; Wed, 28 Aug 2013 10:19:53 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-vb0-x22e.google.com (mail-vb0-x22e.google.com [IPv6:2607:f8b0:400c:c02::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2427D2B1F; Wed, 28 Aug 2013 10:19:53 +0000 (UTC) Received: by mail-vb0-f46.google.com with SMTP id p13so3826305vbe.5 for ; Wed, 28 Aug 2013 03:19:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=EaaZQmuqCUbXO31DMYhiovyEjIUkNwZ7B5p9jdUPgUA=; b=xnZZPOZ1BIq172SZh+5Q5fa4lEJ5DT2T61Vdbj5b2vzJNf8YV+Ut52ehOSTPWlKrq6 qSMi6Txp0ox27jHQp9xl7axgRgQMDNIBFlw0vmeOIf4rkc6LeQONca1ft64AY444LgOY jftNQdOD4x1Gnrt/W+JB9IqjlaWIgfwF55cywLgRGwaPY1TWEhZQ39wsNz8m8h1TRl0D WTQJ/oj1EO6GSquJWOj7V8kwK4wEAbdPX1jcsmdWVZVVutcqDlHS88sbdxNXzo1uYSsu fsBbTgThCGcfOG7kYwPCvzjAUzlQEfYlvD/nuvKCxGSPucC4dEf1yqhQXCJKp7z0p46v IEOQ== MIME-Version: 1.0 X-Received: by 10.52.103.35 with SMTP id ft3mr21340731vdb.5.1377685192111; Wed, 28 Aug 2013 03:19:52 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.220.65.132 with HTTP; Wed, 28 Aug 2013 03:19:52 -0700 (PDT) In-Reply-To: <521D4C41.3060208@delphij.net> References: <201308202231.r7KMVERi068300@svn.freebsd.org> <20130825221517.GM24767@caravan.chchile.org> <521B75CE.70103@FreeBSD.org> <521BDEAC.9080909@delphij.net> <521C5CAC.2060400@FreeBSD.org> <521D4C41.3060208@delphij.net> Date: Wed, 28 Aug 2013 12:19:52 +0200 X-Google-Sender-Auth: 6kOTWUp--gDN3dKr-LAaFHjdFNo Message-ID: Subject: Re: svn commit: r254585 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs From: Davide Italiano To: Xin LI Content-Type: text/plain; charset=ISO-8859-1 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Andriy Gapon , Konstantin Belousov , svn-src-head@freebsd.org, Xin LI X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 10:19:54 -0000 On Wed, Aug 28, 2013 at 3:02 AM, Xin Li wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 [snip] > > On 08/27/13 01:59, Davide Italiano wrote: >> I've written a patch that attempts to fix the second problem. >> http://people.freebsd.org/~davide/review/zfsrename_recycle.diff The >> culprit is that we're dereferencing sdvp without the vnode lock >> held, so data-stability is not guaranteed. tdvp, instead, is locked >> at the entry point of VOP_RENAME() (at least according to >> vop_rename_pre()) so it can be safely used. As pointed out by >> Andriy ZFS has some different mechanisms wrt other file systems >> that allow the vnode to not be recycled when it's referenced >> (ZFS_ENTER), so once we get zfsvfs_t * from tdzp we can call >> ZFS_ENTER and dereference sdvp in a safe manner. > > I'm not sure that this is right. Now we have: > > tdzp = VTOZ(tdvp); > ZFS_VERIFY_ZP(tdzp); > zfsvfs = tdzp->z_zfsvfs; > ZFS_ENTER(zfsvfs); // tdzp's z_zfsvfs entered > zilog = zfsvfs->z_log; > sdzp = VTOZ(sdvp); > ZFS_VERIFY_ZP(sdzp); // (*) Well, if your concern is that the running thread can exit from a different context than the one it entered, maybe partly inlining ZFS_VERIFY_ZP() might workaround the problem. if (sdzp->z_sa_hdl == NULL) { ZFS_EXIT(zfsvfs); /* this is the right context */ return (EIO); } Does this make sense for you? If not, can you propose an alternative? I'll be away for a couple of days but I will be happy to discuss this further when I'll come back. > > Note that in the (*) step, when sdzp is invalid and sdzp have > different z_zfsvfs than tdzp (for instance when the node is in the > snapshot directory; the code later would test this), we could end up > with ZFS_EXIT()'ing the wrong z_zfsvfs. > > Cheers, > - -- > Xin LI https://www.delphij.net/ > FreeBSD - The Power to Serve! Live free or die > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.21 (FreeBSD) > > iQEcBAEBCgAGBQJSHUxBAAoJEG80Jeu8UPuzkzEIAKXlfGuTodrPcPkDkxBhhaOj > QoxoT06jFwMTplysICuCpslQNyyG2Jxq654u9nMh6q5dww370eTtm2FJ0n2QTxk4 > JeWLpZVUu7VHWNXYVJQqrmATaMFHO4wVf5AYpSHn+1iCWo0kQn1MPxPw/oSUt0yw > 1628jhWTs8n+rxQaYrYN6ewXYeylMwC50ZB0kE/gQpQZ+cKAGmrM/8tur24SQBEo > WwrHakrv1DGJ8rv3Q53FB2iUZ+zEAZs6MJ28w32lV3vOI20jfQbEK+RR7i7HvxdV > c/7M96wCd0X4iEqZb87VVfJFSRdQsXy/35scXhhh/BSviT7rervS8XxPGhfpXOs= > =MzwT > -----END PGP SIGNATURE----- Thanks, -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 10:25:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7DB10157; Wed, 28 Aug 2013 10:25:12 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-vc0-x232.google.com (mail-vc0-x232.google.com [IPv6:2607:f8b0:400c:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 079332B7E; Wed, 28 Aug 2013 10:25:11 +0000 (UTC) Received: by mail-vc0-f178.google.com with SMTP id ha12so3847653vcb.37 for ; Wed, 28 Aug 2013 03:25:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=MB3JHRzTy7PpdCFCDsAEw7sGY1LCQzoYlFb00GFwNaY=; b=B0RkphoqOqOQIe2lmxxeVvJnl+nySK7oUKpD6Tz0GuibjWNkK8L7rs3ag0ghT4514W gGwN9tvplcyHcZXF4frMJpDSQTjG3Z7yDTDjwYoDbSRB4b5a5+hc7sDsvBcv7yoJQ4ao wAEoCWiUGwaZ4Zc32oqVD6p908R/lbA/sPhR0xPcLyI3fyaLxvt45DQlLszSpObs2kQ7 ATHl28c2pNrGEPgfZWWn+1hZFbz5fv/nkktIFqVRE47HPetEX7ku/zx7DGB3cFmX2K8V AEOeiw9Ikf+yb2brB2mOBI0lcTYgs99aCp50JewcDNjLDp3f7NnTsz5RBRyWpniXio4l RVTA== MIME-Version: 1.0 X-Received: by 10.221.64.17 with SMTP id xg17mr24872997vcb.5.1377685511109; Wed, 28 Aug 2013 03:25:11 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.220.65.132 with HTTP; Wed, 28 Aug 2013 03:25:11 -0700 (PDT) In-Reply-To: <201308281006.r7SA6KSq010737@svn.freebsd.org> References: <201308281006.r7SA6KSq010737@svn.freebsd.org> Date: Wed, 28 Aug 2013 12:25:11 +0200 X-Google-Sender-Auth: i0WTERanWmAyt2_bu1hZ2UJGSXU Message-ID: Subject: Re: svn commit: r254986 - head/sys/ufs/ufs From: Davide Italiano To: Ivan Voras 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 10:25:12 -0000 On Wed, Aug 28, 2013 at 12:06 PM, Ivan Voras wrote: > Author: ivoras > Date: Wed Aug 28 10:06:20 2013 > New Revision: 254986 > URL: http://svnweb.freebsd.org/changeset/base/254986 > > Log: > Take a very small step toward the Century of the Anchovy by increasing the > time dirhash entries stay in memory before being considered for eviction to > 1 minute. > > Modified: > head/sys/ufs/ufs/ufs_dirhash.c > > Modified: head/sys/ufs/ufs/ufs_dirhash.c > ============================================================================== > --- head/sys/ufs/ufs/ufs_dirhash.c Wed Aug 28 07:48:44 2013 (r254985) > +++ head/sys/ufs/ufs/ufs_dirhash.c Wed Aug 28 10:06:20 2013 (r254986) > @@ -85,7 +85,7 @@ SYSCTL_INT(_vfs_ufs, OID_AUTO, dirhash_d > static int ufs_dirhashlowmemcount = 0; > SYSCTL_INT(_vfs_ufs, OID_AUTO, dirhash_lowmemcount, CTLFLAG_RD, > &ufs_dirhashlowmemcount, 0, "number of times low memory hook called"); > -static int ufs_dirhashreclaimage = 5; > +static int ufs_dirhashreclaimage = 60; > SYSCTL_INT(_vfs_ufs, OID_AUTO, dirhash_reclaimage, CTLFLAG_RW, > &ufs_dirhashreclaimage, 0, > "max time in seconds of hash inactivity before deletion in low VM events"); Hi, do you have any evidence that this change impacts positively (or negatively) performances for some workloads? If yes, can you share? Also, why did you choose the '60' value (rather than something else)? I don't see any 'Reviewed by:' line in your commit message neither I remember a public discussion on -current or -arch or -fs about this. OTOH I think such changes deserve a wider discussion. Thanks, -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 10:32:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7CBB54EA; Wed, 28 Aug 2013 10:32:16 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-vb0-x22d.google.com (mail-vb0-x22d.google.com [IPv6:2607:f8b0:400c:c02::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0545F2C07; Wed, 28 Aug 2013 10:32:15 +0000 (UTC) Received: by mail-vb0-f45.google.com with SMTP id e15so3819640vbg.4 for ; Wed, 28 Aug 2013 03:32:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=a/UMumw1vMRSZvohJJpsZ0/DAzYjp21Ccb3PkX47yP0=; b=MGBDjgjQ5SYp/sh635ErNLgjPwGJn1Lqo8Di/jLlq6oaL8q2XOiZ13CoJxe6YtMiyI YVjq6TtWeyHEojWphxndTYjiDma8KSfZeb5fMpS4ZC3VTIIQMXylvnFjgs7qdhfDsa5W BLjOY1sNPKAywvi0V/kJM/FOvmy3sgocV2gzp3N2QdNgI5S2aQBp7Ohxpysls4KfMMGJ xTdzTwhT+JurBnwBwdphKQKx67XYgptyAH/qacE0RNxA2GJ+QSJVGWIJortb6FZvKMyu Q16JKEu2riOmBTxpCVpWJkqMolzYTGeJF/1F2xTVNfsg2u4DY1pTMaahKQ/TXMuE6jhc PdKQ== X-Received: by 10.58.75.41 with SMTP id z9mr25140526vev.4.1377685935142; Wed, 28 Aug 2013 03:32:15 -0700 (PDT) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.58.229.167 with HTTP; Wed, 28 Aug 2013 03:31:35 -0700 (PDT) In-Reply-To: References: <201308281006.r7SA6KSq010737@svn.freebsd.org> From: Ivan Voras Date: Wed, 28 Aug 2013 12:31:35 +0200 X-Google-Sender-Auth: Td1yEHKcM_KcvNned4a9iac9UKs Message-ID: Subject: Re: svn commit: r254986 - head/sys/ufs/ufs To: Davide Italiano 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 10:32:16 -0000 On 28 August 2013 12:25, Davide Italiano wrote: > do you have any evidence that this change impacts positively (or > negatively) performances for some workloads? If yes, can you share? Yes, observation of my own servers. Without this, dirhash is basically useless since in certain situations everything gets evicted after 5 seconds and it never grows to its full potential. > Also, why did you choose the '60' value (rather than something else)? Personal experience. > I don't see any 'Reviewed by:' line in your commit message neither I > remember a public discussion on -current or -arch or -fs about this. > OTOH I think such changes deserve a wider discussion. See discussion in @stable. From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 10:44:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 289F5B1C; Wed, 28 Aug 2013 10:44:30 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-vb0-x231.google.com (mail-vb0-x231.google.com [IPv6:2607:f8b0:400c:c02::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A4B022CE8; Wed, 28 Aug 2013 10:44:29 +0000 (UTC) Received: by mail-vb0-f49.google.com with SMTP id w16so3866388vbb.36 for ; Wed, 28 Aug 2013 03:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=QHuc1ifI0o6IPBiEAv+rzjJx65W+ej7cUCXO8HIaFRA=; b=i7v0k1AOqhoCsMw27VmfNPTqcYSmPMS5H2x++Vu+FHd3xwkdRIkb4tRrHz9tjnrVYN Re0o9Y+womUQwTEWM9RAeVanU31Ba68yktsSKALipJqmaNJJCHuNklrtMnXLcluI2Mtl dENaU+6yPTO7poIjRCWNH4SHfiKrRJGCdLFmjHvNRgDH6Qw5/Jzh/0uJ8IG8UrdcDzYM uZZgJdH76l3D4K0mlWU8XKQ7yKX3YjGwQuCoTyHx/bUv5d9tUAj4JI0cumPIaqtDfJp9 v3Qb+I28MVIjhmUYaHMz5VX/pCT85hLjIt9WapK+kOzLNV+NNGKss6vEd56CrGpPtco7 UO0g== MIME-Version: 1.0 X-Received: by 10.221.44.136 with SMTP id ug8mr24958313vcb.13.1377686668813; Wed, 28 Aug 2013 03:44:28 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.220.65.132 with HTTP; Wed, 28 Aug 2013 03:44:28 -0700 (PDT) In-Reply-To: References: <201308281006.r7SA6KSq010737@svn.freebsd.org> Date: Wed, 28 Aug 2013 12:44:28 +0200 X-Google-Sender-Auth: JXocqAvDe-csFpL9mlQsDbLlD2g Message-ID: Subject: Re: svn commit: r254986 - head/sys/ufs/ufs From: Davide Italiano To: Ivan Voras 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 10:44:30 -0000 On Wed, Aug 28, 2013 at 12:31 PM, Ivan Voras wrote: > On 28 August 2013 12:25, Davide Italiano wrote: > >> do you have any evidence that this change impacts positively (or >> negatively) performances for some workloads? If yes, can you share? > > Yes, observation of my own servers. Without this, dirhash is basically > useless since in certain situations everything gets evicted after 5 > seconds and it never grows to its full potential. > Oh, well. Your servers doesn't necessary reflect FreeBSD general user so you can just maintain this change local. I've always thought FreeBSD policy was that of leaving reasonable defaults for the general case and giving people possibility to tune them according to their needs. Also 'in certain situations' makes relatively little sense to me unless you provide a testcase that mimics such situations or explain to people how to reproduce it. >> Also, why did you choose the '60' value (rather than something else)? > > Personal experience. > Do you realize that this is a driven by commit change, right? And there's no technical motivatiion about this or experimental data that confirms you've chossen the right value? >> I don't see any 'Reviewed by:' line in your commit message neither I >> remember a public discussion on -current or -arch or -fs about this. >> OTOH I think such changes deserve a wider discussion. > > See discussion in @stable. I see from the archives that you didn't get any feedback by anyone working in the VM layer or by some UFS maintainer. I don't even comment about discussing -CURRENT changes in stable@. Thanks, -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 10:54:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6C5C1F7C; Wed, 28 Aug 2013 10:54:31 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-ve0-x231.google.com (mail-ve0-x231.google.com [IPv6:2607:f8b0:400c:c01::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E83A82D92; Wed, 28 Aug 2013 10:54:30 +0000 (UTC) Received: by mail-ve0-f177.google.com with SMTP id cz11so3992099veb.36 for ; Wed, 28 Aug 2013 03:54:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=6OubNNWPO7IwpmGOJlOuGY46l6Gc/YRGZyZ6rwIWTnQ=; b=FUqKS1NTYRGYDDcevZKUzZ7idmhSAmyYKY42TR9Lee8nCnOU/98ujDsOcIOSfHEaw1 PPflSP7IjPVUn88jNildnlbWsZl8TNn0g2DkMAk3tdCblG1OLzX3Qk9CgrpRQc2uzNkJ vEkvST9t1+QFCONQkkYFoEcT8SHKa9Vz0MRbYLSbkPgSnPpqFHLuyfV91fxnpA5tD2PD ImmHNyHN8MifOVm8NBtP21P/C7z0OguMTp4uC2q1ELcQwE2wxyayT91x8T0pvjAcJtqp 2OIppRCoKTmwU3ksHzqbR45lOp39hGg2os9nZkYtfizq2nctegNNmj6prnpfxIg8+3kc BRjg== X-Received: by 10.52.249.50 with SMTP id yr18mr10792840vdc.25.1377687269780; Wed, 28 Aug 2013 03:54:29 -0700 (PDT) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.58.229.167 with HTTP; Wed, 28 Aug 2013 03:53:49 -0700 (PDT) In-Reply-To: References: <201308281006.r7SA6KSq010737@svn.freebsd.org> From: Ivan Voras Date: Wed, 28 Aug 2013 12:53:49 +0200 X-Google-Sender-Auth: BMcPYijK6CIAdZo8I-s9CXyb9N4 Message-ID: Subject: Re: svn commit: r254986 - head/sys/ufs/ufs To: Davide Italiano 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 10:54:31 -0000 On 28 August 2013 12:44, Davide Italiano wrote: > Do you realize that this is a driven by commit change, right? And > there's no technical motivatiion about this or experimental data that > confirms you've chossen the right value? > I see from the archives that you didn't get any feedback by anyone > working in the VM layer or by some UFS maintainer. > I don't even comment about discussing -CURRENT changes in stable@. You have a point that this was a judgment call, but note that the last change to dirhash tuning (maxmem) was also done by me. Since this is -CURRENT, I will leave this commit in unless it proves detrimental in the usual testing which goes on. If you still feel strongly about this, contact me in private and we'll investigate its effects in more detail. From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 11:14:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9F0245DD; Wed, 28 Aug 2013 11:14:24 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-ve0-x229.google.com (mail-ve0-x229.google.com [IPv6:2607:f8b0:400c:c01::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 257F92EBB; Wed, 28 Aug 2013 11:14:24 +0000 (UTC) Received: by mail-ve0-f169.google.com with SMTP id db10so4239056veb.0 for ; Wed, 28 Aug 2013 04:14:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=l9Jqv8tr4kDuO+JTRwy6LSwpc3o/hX5ZWpkR6guSr2o=; b=kbUzlKd6WDk7qaqO4kJAoqrWhnrwS9TosIceCoY09SJhdNACAG7ondVFejlHS73iaB 98RISIusG9/OZcJaww3599Lx+47jx55iudX9iS8xN0SocwGI6GGEURVRKKZgDdLHCTF1 CyDQ2WxhWIjA8TrWltdIvxlYwzLh3wMLQ2aGJMGGwVE4EqpJvdddpDzhmcQRJKrzj5dl UxgwNfr851wH4sI8h7NwsmKfu7M1F5aJ68q1k/C/hQTuoQKDGPHAkWqK+M+os0KJAgfc yMI1ViKFrVysIOzsCBBoRaARIX8qf0nepd+1KyoJtJLHehWOMEER3L/H0491wHpWpLxr 3bNQ== MIME-Version: 1.0 X-Received: by 10.52.34.40 with SMTP id w8mr21272998vdi.7.1377688463255; Wed, 28 Aug 2013 04:14:23 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.220.65.132 with HTTP; Wed, 28 Aug 2013 04:14:23 -0700 (PDT) In-Reply-To: References: <201308281006.r7SA6KSq010737@svn.freebsd.org> Date: Wed, 28 Aug 2013 13:14:23 +0200 X-Google-Sender-Auth: l9Y4CV4b37i8_I_cBiQkqW1znfQ Message-ID: Subject: Re: svn commit: r254986 - head/sys/ufs/ufs From: Davide Italiano To: Ivan Voras 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 11:14:24 -0000 On Wed, Aug 28, 2013 at 12:53 PM, Ivan Voras wrote: > On 28 August 2013 12:44, Davide Italiano wrote: > >> Do you realize that this is a driven by commit change, right? And >> there's no technical motivatiion about this or experimental data that >> confirms you've chossen the right value? > >> I see from the archives that you didn't get any feedback by anyone >> working in the VM layer or by some UFS maintainer. >> I don't even comment about discussing -CURRENT changes in stable@. > > You have a point that this was a judgment call, but note that the last > change to dirhash tuning (maxmem) was also done by me. Since this is > -CURRENT, I will leave this commit in unless it proves detrimental in > the usual testing which goes on. > If 10.0 would be one or two years away, I would be OK with that. But we're already in code slush and in 10 days -CURRENT will become -STABLE'ish so I'm worried this change won't have the right exposure. I would be more happy to see it postponed, maybe after proper discussion and testing. I'm not against the change as-it-is, my point is that the project reached a point of maturity where 'judgment calls' doesn't work very well. It's more a matter of "how things are done" rather than "what things are done". > If you still feel strongly about this, contact me in private and we'll > investigate its effects in more detail. I prefer to see a public discussion about this. Maybe you should come up with some evidence that your change is helpful, even after this commit. -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 11:35:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D38B6B38; Wed, 28 Aug 2013 11:35:42 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-vc0-x232.google.com (mail-vc0-x232.google.com [IPv6:2607:f8b0:400c:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 57C092FD8; Wed, 28 Aug 2013 11:35:42 +0000 (UTC) Received: by mail-vc0-f178.google.com with SMTP id ha12so3894429vcb.37 for ; Wed, 28 Aug 2013 04:35:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=1uD6kTkKu5Wb15Wi4yqmOUUjRiTmR5gwf4vBjCP0AkE=; b=Sf8nKMovI3Dux/j6hQGXjKJW6Od2jJ4hOIak0VTli5rpaXkJT9Y3S+2puXeMBhMc/i zW+i1///2jNUhbbrqSd87XdC/mW7hc6J55LUqjm34oYQzUzj6SDwLZLA+w5xMTaQtslE 34OBx7yVgJ5zjGZSd1JJMYTZ4CrkdXHd1fzjEynJnQ+I36a7mDH/M9Jg6L8IzCFDC8ZH S7e9GzxvUkovP+MMVq3n5ltEwcbRkUvUXVAj7/le0e5xUEMoP8S33IgiCP6brgo2H/1K /3R92bMuviPx8JAKdOD9L792M8hrNS18JRqMJmDV7jzeyMmo+7/QjsAmhdEJ4IcuKaZq x22A== X-Received: by 10.58.235.69 with SMTP id uk5mr25400732vec.17.1377689741458; Wed, 28 Aug 2013 04:35:41 -0700 (PDT) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.58.229.167 with HTTP; Wed, 28 Aug 2013 04:35:01 -0700 (PDT) In-Reply-To: References: <201308281006.r7SA6KSq010737@svn.freebsd.org> From: Ivan Voras Date: Wed, 28 Aug 2013 13:35:01 +0200 X-Google-Sender-Auth: JdBq3iseKk8XZog1cvjr0Xg3C50 Message-ID: Subject: Re: svn commit: r254986 - head/sys/ufs/ufs To: Davide Italiano 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 11:35:42 -0000 On 28 August 2013 13:14, Davide Italiano wrote: > I prefer to see a public discussion about this. Ok, Ok, I'll go start a retrograde disucussion on @filesystems :) > Maybe you should come > up with some evidence that your change is helpful, even after this > commit. I'll try and dig something up. From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 14:29:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E080976C; Wed, 28 Aug 2013 14:29:33 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CD9C02B02; Wed, 28 Aug 2013 14:29:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SETX7d062639; Wed, 28 Aug 2013 14:29:33 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SETXV7062638; Wed, 28 Aug 2013 14:29:33 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201308281429.r7SETXV7062638@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 28 Aug 2013 14:29:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254987 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 14:29:34 -0000 Author: gavin Date: Wed Aug 28 14:29:33 2013 New Revision: 254987 URL: http://svnweb.freebsd.org/changeset/base/254987 Log: Support the PCI-Express SSD in the new MacBook Air (model A1465) Submitted by: Johannes Lundberg MFC after: 3 days Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Wed Aug 28 10:06:20 2013 (r254986) +++ head/sys/dev/ahci/ahci.c Wed Aug 28 14:29:33 2013 (r254987) @@ -229,6 +229,7 @@ static struct { {0x91301b4b, 0x00, "Marvell 88SE9130", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, {0x91721b4b, 0x00, "Marvell 88SE9172", AHCI_Q_NOBSYRES}, {0x91821b4b, 0x00, "Marvell 88SE9182", AHCI_Q_NOBSYRES}, + {0x91831b4b, 0x00, "Marvell 88SS9183", AHCI_Q_NOBSYRES}, {0x91a01b4b, 0x00, "Marvell 88SE91Ax", AHCI_Q_NOBSYRES}, {0x92151b4b, 0x00, "Marvell 88SE9215", AHCI_Q_NOBSYRES}, {0x92201b4b, 0x00, "Marvell 88SE9220", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 14:39:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 70A5EA29; Wed, 28 Aug 2013 14:39:25 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 442C62BDC; Wed, 28 Aug 2013 14:39:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SEdPts068110; Wed, 28 Aug 2013 14:39:25 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SEdPIN068109; Wed, 28 Aug 2013 14:39:25 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201308281439.r7SEdPIN068109@svn.freebsd.org> From: Luiz Otavio O Souza Date: Wed, 28 Aug 2013 14:39:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254988 - head/sys/dev/gpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 14:39:25 -0000 Author: loos Date: Wed Aug 28 14:39:24 2013 New Revision: 254988 URL: http://svnweb.freebsd.org/changeset/base/254988 Log: Properly free gpiobus ivars when gpiobus_parse_pins() fails and also on gpiobus detachment. Suggested by: imp Approved by: adrian (mentor) Modified: head/sys/dev/gpio/gpiobus.c Modified: head/sys/dev/gpio/gpiobus.c ============================================================================== --- head/sys/dev/gpio/gpiobus.c Wed Aug 28 14:29:33 2013 (r254987) +++ head/sys/dev/gpio/gpiobus.c Wed Aug 28 14:39:24 2013 (r254988) @@ -151,6 +151,7 @@ gpiobus_parse_pins(struct gpiobus_softc if (i >= sc->sc_npins) { device_printf(child, "invalid pin %d, max: %d\n", i, sc->sc_npins - 1); + free(devi->pins, M_DEVBUF); return (EINVAL); } @@ -161,6 +162,7 @@ gpiobus_parse_pins(struct gpiobus_softc if (sc->sc_pins_mapped[i]) { device_printf(child, "warning: pin %d is already mapped\n", i); + free(devi->pins, M_DEVBUF); return (EINVAL); } sc->sc_pins_mapped[i] = 1; @@ -218,9 +220,12 @@ gpiobus_attach(device_t dev) static int gpiobus_detach(device_t dev) { - struct gpiobus_softc *sc = GPIOBUS_SOFTC(dev); - int err; + struct gpiobus_softc *sc; + struct gpiobus_ivar *devi; + device_t *devlist; + int i, err, ndevs; + sc = GPIOBUS_SOFTC(dev); KASSERT(mtx_initialized(&sc->sc_mtx), ("gpiobus mutex not initialized")); GPIOBUS_LOCK_DESTROY(sc); @@ -228,8 +233,17 @@ gpiobus_detach(device_t dev) if ((err = bus_generic_detach(dev)) != 0) return (err); - /* detach and delete all children */ - device_delete_children(dev); + if ((err = device_get_children(dev, &devlist, &ndevs)) != 0) + return (err); + for (i = 0; i < ndevs; i++) { + device_delete_child(dev, devlist[i]); + devi = GPIOBUS_IVAR(devlist[i]); + if (devi->pins) { + free(devi->pins, M_DEVBUF); + devi->pins = NULL; + } + } + free(devlist, M_TEMP); if (sc->sc_pins_mapped) { free(sc->sc_pins_mapped, M_DEVBUF); From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 14:43:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 13D9EC8F; Wed, 28 Aug 2013 14:43:05 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 013F22C58; Wed, 28 Aug 2013 14:43:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SEh4Kp071528; Wed, 28 Aug 2013 14:43:04 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SEh49m071527; Wed, 28 Aug 2013 14:43:04 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201308281443.r7SEh49m071527@svn.freebsd.org> From: Luiz Otavio O Souza Date: Wed, 28 Aug 2013 14:43:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254989 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 14:43:05 -0000 Author: loos Date: Wed Aug 28 14:43:04 2013 New Revision: 254989 URL: http://svnweb.freebsd.org/changeset/base/254989 Log: Add the default hints to make the GPIO pins, rf led and reset switch work out of the box on RouterStation. PR: 177832 Submitted by: Petko Bordjukov (bordjukov@gmail.com) Approved by: adrian (mentor) Modified: head/sys/mips/conf/ROUTERSTATION.hints Modified: head/sys/mips/conf/ROUTERSTATION.hints ============================================================================== --- head/sys/mips/conf/ROUTERSTATION.hints Wed Aug 28 14:39:24 2013 (r254988) +++ head/sys/mips/conf/ROUTERSTATION.hints Wed Aug 28 14:43:04 2013 (r254989) @@ -23,6 +23,24 @@ hint.arge.1.mdio=mdioproxy1 # .. off of hint.ukswitch.0.at="mdio0" hint.ukswitch.0.phymask=0x30000 +# Don't flip on anything that isn't already enabled. +# This includes leaving the SPI CS1/CS2 pins as GPIO pins as they're +# not used here. +hint.gpio.0.function_set=0x00000000 +hint.gpio.0.function_clear=0x00000000 + +# These are the GPIO LEDs and buttons which can be software controlled. +hint.gpio.0.pinmask=0x000000ff + +# GPIO 0: Pin 1 +# GPIO 1: Pin 2 +# GPIO 2: RF LED +# GPIO 3: Pin 3 +# GPIO 4: Pin 4 +# GPIO 5: Pin 5 +# GPIO 6: Pin 6 +# GPIO 7: Pin 7 + # RF led hint.gpioled.0.at="gpiobus0" hint.gpioled.0.name="rf" From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 14:46:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CE7ADF64; Wed, 28 Aug 2013 14:46:15 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BB8A92C8D; Wed, 28 Aug 2013 14:46:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SEkFfn072889; Wed, 28 Aug 2013 14:46:15 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SEkFGT072887; Wed, 28 Aug 2013 14:46:15 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201308281446.r7SEkFGT072887@svn.freebsd.org> From: Luiz Otavio O Souza Date: Wed, 28 Aug 2013 14:46:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254990 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 14:46:15 -0000 Author: loos Date: Wed Aug 28 14:46:15 2013 New Revision: 254990 URL: http://svnweb.freebsd.org/changeset/base/254990 Log: Make ar71xx_spi attach the next free unit of spibus and not only spibus0. Approved by: adrian (mentor) Modified: head/sys/mips/atheros/ar71xx_spi.c Modified: head/sys/mips/atheros/ar71xx_spi.c ============================================================================== --- head/sys/mips/atheros/ar71xx_spi.c Wed Aug 28 14:43:04 2013 (r254989) +++ head/sys/mips/atheros/ar71xx_spi.c Wed Aug 28 14:46:15 2013 (r254990) @@ -108,7 +108,7 @@ ar71xx_spi_attach(device_t dev) SPI_WRITE(sc, AR71XX_SPI_CTRL, 0x43); SPI_WRITE(sc, AR71XX_SPI_IO_CTRL, SPI_IO_CTRL_CSMASK); - device_add_child(dev, "spibus", 0); + device_add_child(dev, "spibus", -1); return (bus_generic_attach(dev)); } From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 14:49:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5723B1E0; Wed, 28 Aug 2013 14:49:37 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 446602CDE; Wed, 28 Aug 2013 14:49:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SEnbGx073786; Wed, 28 Aug 2013 14:49:37 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SEnbRq073785; Wed, 28 Aug 2013 14:49:37 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201308281449.r7SEnbRq073785@svn.freebsd.org> From: Luiz Otavio O Souza Date: Wed, 28 Aug 2013 14:49:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254991 - head/sys/dev/flash X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 14:49:37 -0000 Author: loos Date: Wed Aug 28 14:49:36 2013 New Revision: 254991 URL: http://svnweb.freebsd.org/changeset/base/254991 Log: Fix a few typos for s25fl types. Approved by: adrian (mentor) Modified: head/sys/dev/flash/mx25l.c Modified: head/sys/dev/flash/mx25l.c ============================================================================== --- head/sys/dev/flash/mx25l.c Wed Aug 28 14:46:15 2013 (r254990) +++ head/sys/dev/flash/mx25l.c Wed Aug 28 14:49:36 2013 (r254991) @@ -104,9 +104,9 @@ struct mx25l_flash_ident flash_devices[] { "mx25ll32", 0xc2, 0x2016, 64 * 1024, 64, FL_NONE }, { "mx25ll64", 0xc2, 0x2017, 64 * 1024, 128, FL_NONE }, { "mx25ll128", 0xc2, 0x2018, 64 * 1024, 256, FL_ERASE_4K | FL_ERASE_32K }, + { "s25fl032", 0x01, 0x0215, 64 * 1024, 64, FL_NONE }, + { "s25fl064", 0x01, 0x0216, 64 * 1024, 128, FL_NONE }, { "s25fl128", 0x01, 0x2018, 64 * 1024, 256, FL_NONE }, - { "s25s1032", 0x01, 0x0215, 64 * 1024, 64, FL_NONE }, - { "s25sl064a", 0x01, 0x0216, 64 * 1024, 128, FL_NONE }, { "SST25VF032B", 0xbf, 0x254a, 64 * 1024, 64, FL_ERASE_4K | FL_ERASE_32K }, /* Winbond -- w25x "blocks" are 64K, "sectors" are 4KiB */ From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 15:12:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5F725BDF; Wed, 28 Aug 2013 15:12:16 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4CD622FAE; Wed, 28 Aug 2013 15:12:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SFCGRC088268; Wed, 28 Aug 2013 15:12:16 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SFCGMx088267; Wed, 28 Aug 2013 15:12:16 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201308281512.r7SFCGMx088267@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 28 Aug 2013 15:12:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254992 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 15:12:16 -0000 Author: gavin Date: Wed Aug 28 15:12:15 2013 New Revision: 254992 URL: http://svnweb.freebsd.org/changeset/base/254992 Log: After writing a kernel core dump into /var/crash, call sync(8). If we panic again shortly after boot (say, within 30 seconds), any core dump we wrote out may be lost on reboot. In this situation, we really want to keep that core file, as it may be the only way to have the issue resolved. Call sync(8) after writing out the core file and running crashinfo(8), in the hope that these will not be lost if we panic again. sync(8) is only called in the case where there is a core dump to be written out, so won't be called during normal boots. Discovered by: Trying to debug an IPSEC panic MFC after: 1 week Modified: head/etc/rc.d/savecore Modified: head/etc/rc.d/savecore ============================================================================== --- head/etc/rc.d/savecore Wed Aug 28 14:49:36 2013 (r254991) +++ head/etc/rc.d/savecore Wed Aug 28 15:12:15 2013 (r254992) @@ -70,6 +70,7 @@ savecore_start() if checkyesno crashinfo_enable; then ${crashinfo_program} -d ${dumpdir} fi + sync else check_startmsgs && echo 'No core dumps found.' fi From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 15:12:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CCBFDD44; Wed, 28 Aug 2013 15:12:51 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B91952FCA; Wed, 28 Aug 2013 15:12:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SFCpNg088498; Wed, 28 Aug 2013 15:12:51 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SFCpps088496; Wed, 28 Aug 2013 15:12:51 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201308281512.r7SFCpps088496@svn.freebsd.org> From: "George V. Neville-Neil" Date: Wed, 28 Aug 2013 15:12:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254993 - in head/sys: contrib/dev/iwn modules/iwnfw/iwn2000 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 15:12:51 -0000 Author: gnn Date: Wed Aug 28 15:12:51 2013 New Revision: 254993 URL: http://svnweb.freebsd.org/changeset/base/254993 Log: Add firmware for Centrino 2200-N wireless devices. Driver software for this firmware will be updated in a following commit. Added: head/sys/contrib/dev/iwn/iwlwifi-2000-18.168.6.1.fw.uu head/sys/modules/iwnfw/iwn2000/ head/sys/modules/iwnfw/iwn2000/Makefile (contents, props changed) Added: head/sys/contrib/dev/iwn/iwlwifi-2000-18.168.6.1.fw.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/iwn/iwlwifi-2000-18.168.6.1.fw.uu Wed Aug 28 15:12:51 2013 (r254993) @@ -0,0 +1,12250 @@ +Copyright (c) 2006-2012, Intel Corporation. +All rights reserved. + +Redistribution. Redistribution and use in binary form, without +modification, are permitted provided that the following conditions are +met: + +* Redistributions must reproduce the above copyright notice and the + following disclaimer in the documentation and/or other materials + provided with the distribution. +* Neither the name of Intel Corporation nor the names of its suppliers + may be used to endorse or promote products derived from this software + without specific prior written permission. +* No reverse engineering, decompilation, or disassembly of this software + is permitted. + +Limited patent license. Intel Corporation grants a world-wide, +royalty-free, non-exclusive license under patents it now or hereafter +owns or controls to make, have made, use, import, offer to sell and +sell ("Utilize") this software, but solely to the extent that any +such patent is necessary to Utilize the software alone, or in +combination with an operating system licensed under an approved Open +Source license as listed by the Open Source Initiative at +http://opensource.org/licenses. The patent license shall not apply to +any other combinations which include this software. No hardware per +se is licensed hereunder. + +DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER 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. +begin-base64 644 iwlwifi-2000-18.168.6.1.fw +AAAAAElXTAoyMDAwIGZ3IHYxOC4xNjguNi4xIGJ1aWxkIDAKAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAQaoEgAAAAABAAAAAAAAAAEAAAAIgwIAICCADwAAQABpIAAAaSBAAGkg +AABpIEAAICCADwAA6ABpIAAAaSBAAGkgAABpIEAAICCADwEANAxpIAAAaSBAAGkgAABKIAAASiEA +AEoiAABKIwAASiQAAEolAABKJgAASicAAEogABBKIQAQSiIAEEojABBKJAAQSiUAEEomABBKJwAQ +SiAAIEohACBKIgAgSiMAIEokACBKJQAgSiYAIEonACBKIAAwSiEAMAokgD+BAABAQSycMEAsnDBC +JBw0CiKAP4AAIH8KIwA3sgzAB0omAHBpIEAASiYAcEomAHBKJgBwSiYAcAAWAHCAAMwqQHggIECH +AAAAAAAAAAAAAPwciLb8HEi2/BwItvwcyLX8HIi1/BxItfwcCLX8HMi0/ByItPwcSLT8HAi0/BzI +s/wciLP8HEiz4H7geATcON018OB4BNw03TPw4HgE3DDdMfDgeATcLN0v8OB4BNwo3S3w4HgE3CTd +K/DgeATcIN0p8OB4BNwc3Sfw4HgE3BjdJfDgeATcFN0j8OB4BNwQ3SHw4HgE3AzdH/DgeATcCN0c +8OB4BNwE3RnwNBQaMDAUGTAsFBgwKBQXMCQUFjAgFBUwHBQUMBgUEzAUFBIwEBQRMAwUEDACxwHG +sCRNM7AkHzPgfuB44HjgeOB44HjgeAokgPAFIEQA4CDBB0Qk/oBBKsQAhAACAC8kAvFCIQEBQiAD +AeggogQEEQQCBBEFAgQRBgIEEQcCBBsIAQQbSAEEG4gBBBvIASwAJQBEIj6BPAAiAEQi/IBAIcEA +4CDBB0AjwwCoIIABARGEAgEbCgEgIMAHBBEEAgQRBQIEGwgB1Afh/wQbSAFEIvyABBEEAskH7/8E +GwgBQiFBAEIgQwCoIIABARGEAgEbCgEgIMAHz3GgAKwvGIGauBihTQdgEwXY4HjPcaAArC8YgbO4 +urgYoTkHYBNk2AoiQIAA2e4AAQAvJgDwSiZAAE4ABgBPACAAiiX/D+B4CiJAgADZzgABAGwAJAAv +JgDwXAAFACsINQhKJkAACHEA2AIhvoDgIMUHQnkB4AIhvoDgIMUHQnnrB+//AeAvLQEAQCVFAAIm +fPEAACAAAChAAeggYgMvIACALyFLAAIhvoDAIIYBwiGGAOB+EQAgAEogABBKIEAQDiJCAC8gCxLO +IEWAiiX/DwgABQAvLQEAQCVFAAImfPEAACAAAChAAUomQADoICIDLyAAgC8hSwACIb6AwCCGAcIh +hgBKJgAAQiD+kM4gggFEIH6QziGCAeB+KQAAAOB4/ByIsfwcSLH8HAix4cPhwuHB4cAHwBwcwDHh +wOB/AcAKJgDwiiC/D8ogZADgfy8gAwDgf4og/w/hxQh1EfDgeOB44HjgeOB44HjgeOB44HjgeOB4 +4HjgeOB44HjgeGG9jCX/n+314H/BxeB48cDhxc9wgACgLE2Az3WAALSpIIW3uri6BCGBDwMAAAAH +uUV5LaAKCWATANgAhc9xgADcz1EggIJMic9wgABQ5jJqNnnHcYAAEONggVZ4QYAF8pW7YKGrugTw +tbtgoYu6QaALjaO4FQXv/wutosHxwJIMz/9Fwc91gACgLCeFMHAI9DCVFBQOMTB2BPRZHYIQ0BUB +FjBwDvTPcYAArC88kRQUDTEwdQb0z3GAAAQwWamA4gz0z3WAAOAHwY2A5gDZyiBBACXyIa2O4gT0 +Adgh8EEoDQIHfUEoAQSnec93gADgB6CPUyVFEUwlAITGuY32CiHAD+tyz3AAAM0bn9uVBCABiiSD +D1ElgJEG8gDYDNxbBM//z3aAANDlFiZNEaeNoK/JdRYlTREApRQUADFGrcdxgACQ4gK1AIkHrQAZ +QgEAG0IBxPHgePHAtgvP/wjIz3KgAMgfDhoYgAnIDxoYgArIEBoYgAsSATYCyCR4ERoYgAzIz3GA +ACRHLRoYgACBAeAAocO4jeAp9AvIf9kKuSR4LygBAE4gggcA2A8ggAAEIQGAQiKNAhnyCyNAwBf0 +z3CgAIgg8CBQA892gAA0QwCGEHXPd4AAOEMG9ACHEnAcC0EHoKYAHwAUiQPP/+B48cDhxQHZz3Cg +ALAfOaDPcYAAACsIgQCArMFJwAyBAIDPcYAAiC/PdYAADLVKwAqBobgKoQiF4LgJ8lEgwIEH9LoK +QAaCDKACGNiLcalwUglgECTaz3CAANwHIIACiYDgEvQEiVEgAIAO8gvIBCCAD/7//wMLGhgwC8iG +uIy4j7iQuAvwC8gFIIAPAQAA/AsaGDALyKy4CxoYMNIOz/+LcDDZkNoe27YMYA8Yu89wnwC4/wLZ +NqAowIHgyiHCD8oiwgfKIIIPAADqHMojgg8AAPwAyiQiANwCIgHKJSIAdgxABoDgB/QmDuAAANgm +CqAPBtipAu//rMDPcYAAnH7gfwhh4HjxwNoKQAbPcYAAWCbwIQAAQHjPcKAA0BuA2lCgz3CAAOAq +AIBRIACCANkG8s9wnwC4/z2g0cDgfvHA6gnv/w/Zz3WAAAjsABYAQAAWAEBVJU4UAKXKDqASBG3J +cIYOoBIilR6Vz3GAANwH2mDYYAEQhQBMJQCAQKET9AKF8LjKIcEPyiLBB8oggQ8AAOkcyiOBDwAA +wQAYAiEByiRhAPEBz//geIDhyiRNcOB46CAtAs9xoABQDCWBARhSAOB+4HjxwFoJz//PcIAAoCwD +gBiIpcGE4EogACAM9AohwA/rcoogjA1k2wokAATFASABuHPPd4AAACskhyCBEgqgB4ogBw6KIJkF +BgqgB2fZz3WAADC1iiDZBvYJoAcsjYog2QbqCaAHLY2KINkG4gmgBy+NiiDZBtYJoAcujYog2QbO +CaAHMI2KINkGwgmgBzGNz3aAAERBz3CAAGRn0gpgESQeABTPcIAAgGfCCkARz3CAAChougpAEc9w +gABEaK4KQBEtjYDhBPJsjTBzjPZ+CaAHiiCHDYoghw1yCaAHLI3I8ASHQIDPcIAABKdgoCGgQqDP +cIAAeOsIkBBxlPbPcIAAeOsB2iiwz3eAAFTNz3CAADzNTKdDgFBxARgCBML3I6AQjYDgyiBiAAOm +EY2A4BbygOMU9M9wgACgLAOACYBRIICADPK+CaACB9gB2AGmz3CgACwgEIAApoogyQPuCKAHo9mK +IIkDz3GAAASn3gigByKBAYbPcYAABKcggYDgyiBiABi4BXkDhgoiAICKIIkDyiJiABC6tgigB0V5 +z3CAALw9AICB4A30z3CAAHjrz3EAABAnRgnv/wWAEHgC8ADYz3GAAOTMB7EDhoHgDBkEBDr0AIGC +4Mwg4oAE9AHYAKFMFoAQgeAw9M9woAAsIPCAz3ABANBDQMAB2EHACBwANBHYQ8AA2Iy4RMAA2BDZ +BNoIc5hwuHAAJ4cfAAAAfZoPYAXYcIogygQiCKAHANmKIMoDGgigBwDZSxaAEAHgD3hLHgIQDI2A +4AX0AYaA4GwJwQXPcIAA1GcSCUARAdnPcIAAQCMgoJ4IoAIG2FEHr/+lwOB4osHxwOYOr/+YckXB +QSgBAgd5QSgCBCd6xrrPdYAAkOJJZee5XWUT9BQUDjHPc4AA0OVocjZ64ILxcAX04pLRdwfyJ4rn +uadq9fMA2CjwxoqA5gf0gN/PcIAA4AfhqM93gAD0LAWPEHYE9IDYBa8K8M93gAAEMBmPEHYE9IDY +Ga/GijZ7AByAAweKh7kArc9wgADgB0CIIKgB2EerDNy3Bo//4HihwfHAAxICN9dyAAAAQAHawiKK +ABe6x3IADgAAg7rsc0Cj7HIAomYN4AQocNHA4H+hwOB4peAf8gn2g+AV8oTgF/KF4Bv04H8B2L3g +D/IG9q3gFfTgfwLYzOAP8owgQ4cN9OB/BtjgfwDY4H8D2OB/BNjgfwXY4H8H2AjY4H7gePHA4cWK +IFIOqg5gB7TZz3WAANw7qXBAJYEbKgwgEC7aAdgdBq//YR0CEOB48cCSDY//guAIdY33CiHAD+ty +/diLuHPbSiQAAA0G4AC4c893gADcOzeHACWQH4AAMDwwdQX0DBCAIIDgkvJ+CeAIBdg6cIogEg4+ +DmAHqXFELb4bACdAHkCQIZAA3gi6RXnPcqQAuD2bGlgAIpAMGIIjyhpYACOQt6fLGlgAJJDEGlgA +JZDGGlgAJpDHGlgAJ5DCGlgAKJDDGlgAKZDFGlgACpCjGhgAz3CAAGA4IIBgeclwjOAa8s9wgABg +OCCAYHnJcJDgEvLPcIAAYDgggGB5yXCR4Aryz3CAAGA4IIBgeclwkuAD9ADdz3CAAKAsA4AIgM9x +pAC0RVEgAIAQ8kQtvhsAJ0AebJBLkHt7ZXpTGZiADZBUGRiABvBTGZiDVBmYg0Qtvhsndw6XVhkY +gA+XWBkYgBCXVRkYgBGXVxkYgBKXWhkYgBOXXBkYgBSXWRkYgBWXWxkYgGINoAgqcJEEj//xwFIK +7//hxS4LwATPcIAAoCwDgBiIgeAu9M9xgAAI7M9ygAAcagCCYIFgoACCHNtgqARpAaLPcIAAYAgD +oVUhQAQDohjYAqJVIcAFBaIBgQDdWhlEAwSiAoGtuAoOIAYCoYDgEPS6D6AAqXC6C2APBtgK8P4K +QBOA4Aby1gtAE54IQBMpBI//huDxwADYD/TPcIAATLUqCu//BtnPcYAA7LUAgYK4AKEB2NHA4H7g +eIPg8cAA2An0z3CAAES1Agrv/wPZAdjRwOB+4HjxwIHg4cUA2An0z3CAAEe1Ad3iCe//qXGpcMkD +j//gePHAluDhxQDYjPfPdYAAtKmpcMIJ7/8E2QuNg7gLrQHYoQOP//HAmuDhxQDYjPfPdYAAtKkE +bZ4J7/8E2QuNgrgLrQHYfQOP//HApMGQ4ADZyiBCABP0i3B6Ce//ENkAFAAxhODMIGKBCPTPcIAA +UM8fgPW4AvJMcAHYpMDRwOB+8cDGCo//CHfPcIAAoCwDgBiIhOAacUnyhOcA3YwAJQDKIEUDz3aA +ADC1QCYAEyYJ7/8E2S6OsK5TIQAAEa5BKMAgoLkwcGIAJQACIEIAY7/xclYABgCA4g7yz3GgANAP +EBEAhmG6WGAQGRiAJREAhg94A/APjgDZUyCCIA8hgQAkeC8mB/DPcZ8AuP8QrhiBzyDiB9Ag4QcY +oRiBnrgYoRiBvrgYoQHYgQKP/+HE/BzIvvwcSL7hwOHB4cLhw/wcCLH8HEix/ByIsfwcyLH8HAiy +/BxIsvwciLL8HMiy/BwIv2okgBDhxGokwBDhxPHAz3CgANAbFIDPcYAAhAYEIICPz1EE4QChEfL2 +uC8pAQAF8i8pgQ9AAAAAz3CAAMQ38CBAAEB47g2P/9HAwcRrJMAQwcRrJIAQwcSfdAQUCzQEFAo0 +BBQJNAQUCDQEFAc0BBQGNAQUBTQEFAQ0wcPBwsHBwcDBxEUsfhAKJkB+wcRrJIAUwcQgIECH4HiM +IFyCAdjgf8IgCwDxwEYJr/9KJEAAz3WAAKAsFSUDEACDQCUOFdFwwiQCAfAlDRHIFQUWRCW+gQny +CiHAD+tyjtiNuJkB4AB028gQDQalecgYWACggwbZRnnIFQAWJHjIHRgQAIPIEAAGhiB/jjAIQRNN +AY//4HjxwNYIr/+KIAwJz3WAAOAGJIWyCUAHBIWA4EX0z3aAAES4ExYClgDfhCoICQAhgH+AAEiw +AqUkiAHbgOHrpWylIfIdHtiTDBAFAAQlgQ/A/wAAQSkEBs9xgAB46xQRBgAFLj4BACGEfz8A//8E +JEEBHh5YkCCQjCGChgHZwiFOACql56UkgM92gACAtMC5KrbPdoAAHDMorkCuAohkpQGuH/AEhYHg +HfT2CcAJANgEpQKFJIiA4RP0J4Uc4DZ4JIjPcIAAzC8HiBBxAdnAec9wgAAYMyCgAtgC8AHYA6Vh +AK//AdjxwPIPb/+KIAwKo8HPdYAA4AYkhcoIYAcA3gSFgOAo9OoLQAAB2ASlAoUEiIDgcAIBAM9w +gAAYMwCAgOBgAgIAz3CAAAArEIDPcoAApLQAgCOCGWHPcIAACDMAgDhgBgpgEQKigOA4AgEAfvAE +hYLgQvQKhYDgEPQMFQQQEBUFEAohwA/rcs9wAACKDPUHoACKI44LIoVHhUAhAAdWeEaIYMJGiAEc +gjBGiAIcgjBHiGHCR4gFHIIwB4gGHAIwiiBTAR4IYAeoEQEAAoWLce4IYA+oEAAAz3CAAAArEIAg +gM9wgAAcMyGgkgngAMWlA9gEpdbwBIWD4Dr0QoUnhUAiAAc2eAWIUSBAgRPyz3GAAAArA5Iwgc9z +gAAcMyCBYYMKuGJ5MHAF9wnYC6WO8AWFgOAN9ASKgOCy8s9wgACktCIJYBECgIDgqvIFhYDgBvIF +2AulAdgJ8M9wgAAYMwCAgOCe9ADYKgzAB5rwBIWB4G/0LgiAAyKFR4VAIQAHVnhFiOC6G/KDukWo +z3KAAOBHyYLPc4AARLgVG5iD+YLFgv5mFhuYg/iCxIL+ZhcbmIPDgleCXmYYG5iDBYhRIECAK/IS +DwARgOAQ9AohwA8ChetyHBUFEAQQhADPcAAAiwyhBqAAiiMQAAIPIBEC2JIOIBEI2CKFBImC4Ar0 +AdgApQDYDqV6DiARWtgihQSJgeAD9AHYAaUHhRzhFnkFiYYg/4zKIIIPAAAwQ5ANogTKISIAAoUn +hRzgNngFiIYg/ocE8gLYBKUs8ATYBKUo8CSFhOEB2CT0D6XPd4AAACsQhyCAz3CAABwzIaB2DiAH +iiAMCs9wgAAcMwzZddoe264P4A4YuwSHz3GAABAzAIAGC2ABIIEGpcSlBNgDpQHYvQVv/6PA8cBS +DW//iiCMCc91gADgBiSFKg4ABwSFgOBA9CKFR4VAIQAHVnhEiM9wgADYBgCQEHIB3g70z3CAANoG +QJDPcIAAgLQKkBByBPTEpQDYUfAEiYDgH/LPcIAAGDMAgIDgGfTPcIAApLQjgM9wgAAMMwCAeg+g +BjhggOAN9IogTA26DSAHiiFNB2IK4AcA2AHYL/DEpQHYLfAEhYHgK/QChc9ygACgLCOCZIBooSOC +ZYAc4GmhJ4U2eCSIA4IA3jSwAtgE2UoL7//Jcs9zgACAtEKFB4VAIgEHFnkKkySJRIKiDKANyXPE +pQPYA6UB2NEET/8MFQQQEBUFEAohwA/rcs9wAACJDNkEoACKIw4B4HjxwD4MT//PdoAA4AYEhoDg +ocE79CSGFg0gB4ogjAoB389wgAAYM+CgANgPpgCmAaaKIJMB9gwgB4ohWQUC3alwegzgBOlxz3CA +AKwGAIAmgJ4RAAamuJ4ZGACpcADZogrv/wTaBgjgEqlwz3CAAKAsI4BIgTSRUyIAAPoLoA3pc6Sm +6XCL8ASGguAz9CSGngwgB4ogjArPcYAA2AaKIIwMigwgByCRz3GAANoGiiDMDHoMIAcgkQKGBIiA +4BfyCYaA4BX0z3KAAKS0BoIlgg4ggw8HACChMHNH9wfYC6YB2AymCaYD8DhgBaID2DLwBIaD4BD0 +JIY2DCAHiiCMCgvIBCCAD////wMLGhgwBNgi8ASGhOAg9CSGEgwgB4ogjApTIMBAz3GAAIhqLg8g +AAChz3CAACi0OoDPcIAAZLKEKQgJMCBADlEgQIAF2MogoQEEpiTwBIaF4AHfHfTPdYAAKLQahQTZ +mdoe20DAi3AKDeAOGLsahemmhCgICQAhgH+AADiyK4ChuSugBtgEpgDYBfAEhobgBvIB2A0Db/+h +wAbYA6YA2Nbx8cCWCk//z3WAAOAGBIWA4KXBDfQkhW4LIAeKIIwIAoUEiIDgGPQC2ASlBIWB4FX0 +BYWA4EX0z3CAAAArBIDPcYAAQGwAgIoLIBEggYDgNPQA2Djwz3CAAAArBIAA3sWlz3GAAAwzAIDO +DyABIIHPcYAAQGwB3wTaAKHPcKAALCBAEAcAz3AAAJx+QMAF2EHAQsdDxkTGyXAG2clzmHa4dgAn +hw8AAAB9RgogBdh25KXpcDHwygggBQXYBNgC8AXYgOAB2gP0Adgl8CmFgeEQ8kylC6UM8ASFguAc +9CSFpgogB4ogjAgJhYHgBPQB2A/wgODr9QKFjgngBAOACHHPcIAALGcSDMAQANhaCUAH3fEA2O0B +b/+lwPHAfglv/4ogTAnPdYAA4AYkhVoKIAelwQSFgOCq9AKFR4UkgFZ4z3KAAMwvBCGBDwAGAACA +4QHZZ4ogEI4AwHlwdgn0z3eAAIC06pfBivF2A/IA3gXwxorRcf31Ad6A5s9xgAAYM8ChFfTPcYAA +2AYgkTBzD/TPcYAA2gYgkWGKMHMJ9M9xgADcBiCJRoowcgPyANkC8AHZgOFk8hwQBADPcIAApLQM +GAABz3CAAASnBBAFAM9wgAB46wWABSh+AUApgHKQcMoizgfKII4PAACIDMojjg8AAAEDNAGuAMoh +zg/PcIAADDMAgDILoAaAcIDgBfRKDsAPUPALyAQggA////8DCxoYMM9wgAAobACIAN6A4MWlCvTP +cKAALCAQgMdwAAAAfRKlSBUHEM9wAABgfkDABdhBwAHfQsdDxkTG6XAG2QTaANuYc7hzigggBdhz +z3CAAChswKjkpelwH/AA2M9xgAAobACpAtkjpRfwBIWB4AHeEvQFhYDgHPTPcIAApLQjgM9wgAAM +MwCAjgqgBjhggOAG8gHYTQBv/6XAz3CAAChswKi+DuAEBdgA2ASlovEF2Aulkg8gB8lwANnPcIAA +KGwgqOjx4HjxwLIPD//PdoAA4AYEhoDgePQChgSIgOAU8s9wgAAYMwCAgOAO9M9wgACktPYJIBEC +gIDgBvIaDaAHANhpAwAAz3CAAAArEIBHhiCAz3CAABwzAYACeQKGVngHgBBxhvcB2ASmQQMAAACG +gOAM8lEjQMAK8gLZz3CgANAbM6DCD+AQHtjPdoAAACsEhs91gADgBgCAVgggESaFgOAIAwEABIbP +cYAAEDMAgKoMIAEggQalAoUnhRzgNngFiIYg/4wJ8s9wAAAwQ89xgAA4M64OQAQChSeFHOA2eAWI +USBAgMQCAQAAhYDgCPLPcKAALCAGgIDgsAICAGYOQASpAgAABIaB4Jb0JIaWD+AGiiBMCs9wgAAA +KzCAIIGGD+AGiiBMCgKGJ4Yc4DZ4BRCGAADaUSYAgE+mQfLPc4AAHDPPd4AA4EcYhySHz3WAAES4 +GWEXFQCWWKtcFwQQDBcFEAAlBQEYFQSWAnkCJQUBFRUAliQXBBACJASAFhUNlgWHonjKJYEQA/IB +3birgOEO8kAsjwDxcYT3TyWAEAbwgOAG8k8lQBAPfRirQSnAADhgsHBD94K9uKtRJkCALvIAhoDg +DfLPcaAALCAmgQ6GInjPcYAAHDMFoUCmBfABhoDgA/JBpn4NQASiDsAQguAR8ut1lg7AEAwWBBC4 +cM9wAACMDAohwA+pcj0GYACKIxMLng7gEADYAoYnhhzgNngFiIYg/4wF8gLYBKa+8ATYBKa88ASG +guAL9M9wAAAwQ89xgAA4MzoNQAQE2ASmBIaE4K/0JIZODuAGiiBMCs9wgAAAKxCAIIDPcIAAHDNA +IA0HN6AuDuAGiiCMDSKGHBYEEEAhAAcWIAABBYhRIACAHfIA2kokwHBIc6ggwAHwJcAQAeMaYgPf +SiRAcQDbqCDAAfAlwBMB5xtjUHPH989ygAAcMxiKgrgYqgDdz3eAAKS0pacMkUAkQgAQckemR/eH +EQAGUSBAgAbyAdhmCqAHDKZc8FYMIAcLhgvIBCCAD////wMLGhgwdg5gCaumiiBMDZIN4AaKIZQN +B4YihhZ5iiBMDX4N4AYngQLYA6YChs9ygAAYMySIgOEP9CeGHOA2eM9xgADMLyeJBIgwcAHYwHgA +oinwIIKA4QXyAdgDpiPwJ4Y2eBwQBADPcIAABKcEEAUAz3CAAHjrBYAMHwARBSh+AUApgHKQcMoi +zgfKII4PAACNDMojjg8AAE4FqARuAMohzg+kpnUEL/8B2AwWBBAQFgUQCiHAD+tyz3AAAI4MhQRg +AIoj1QXgePHAz3CAABgzAICA4B3yz3CAAEQ4AICA4Bv0jg7ADoDgCPQLyAUggA8AAAA8CxoYMMIO +wA6A4An0C8gFIIAPAAAA1AsaGDALyJC4CxoYMIoLgAbRwOB+4HjxwJILD/8Idc92oAA4LgeGz3EA +ACQsqLgHpmIMYAcN2IDlAN98DOISyiAiBM91gACAOEUVARYHhiV4B6aKIBUMPgzgBoohzQ2KIBUM +MgzgBkUVARbPcIAA6C8skM9wgACgLB6QEHELyEUd2BMK8gUggA8AAADUCxoYMAvIkLgG8AUggA8B +AAD8CxoYME4PD/8AhbC48gngEgClgOB4CcISWQMP//HAz3CAAFQeD4CA4A/yz3KfALj/HaLPcYAA +4CoEgQHgs7i1uLi4BKEWopoIwACD4BH0z3GAAAy1iiCVB54L4AYogc9wgADsaLIMgBDmCuAABdjP +cIAA4CoAgO+4BvIA2c9wnwC4/z2g0cDgfvHAz3CAAFQeD4CA4A/yz3KfALj/HaLPcYAA4CoEgQHg +s7i1uLi4BKEWoi4IwACH4BH0z3GAAAy1iiCVBzIL4AYogc9wgADsaEYMgBB6CuAABtjPcIAA4CoA +gO+4BvIA2c9wnwC4/z2g0cDgfvHAz3CAAFQeD4CA4A/yz3KfALj/HaLPcYAA4CoEgQHgs7i1uLi4 +BKEWosIPgACE4BH0z3GAAAy1iiDVB8YK4AYogc9wgADsaNoLgBAOCuAAAtjPcIAA4CoAgO+4BvIA +2c9wnwC4/z2g0cDgfvHAz3CAAFQeD4CA4A/yz3KfALj/HaLPcYAA4CoEgQHgs7i1uLi4BKEWolYP +gACI4BH0z3GAAAy1iiDVB1oK4AYogc9wgADsaG4LgBCiCeAAAdjPcIAA4CoAgO+4BvIA2c9wnwC4 +/z2g0cDgfvHAz3CAAFQeD4CA4A/yz3KfALj/HaLPcYAA4CoEgQHgs7i1uLi4BKEWonXY/gngBooh +hQ1eDWAABNgKJQCAyiHCD8oiwgfKIIIPAADfDsojgg8AAHkBeAFiAMokYgDPcIAA4CoAgO+4BvIA +2c9wnwC4/z2g0cDgfuHFAdvPcoAAAAZ+suB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB4 +4HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HgGuEUgzQDPcKAA7CemoAqAANsAsX6y4H/B +xeB48cCKIMoGRgngBgDZqgoAAxoOQBLCC0ASgNnPcKAA0BswoNHA4H7gePHAKggP/xpwAd8AEBIB +FPBadRLwFSDAI6CQAhARAQHn13UAAPv/8H909gwigK8AAP//CfLPcAAA+/9ScOz1SQAP/892gAD4 +KgCGAeCB4ACmCfQB2c9woADIHDGgpgigEihwBr2BvUApACSleM9xoADsJwahAIZCIECAAKbc9c9x +oADIHADYEaHW8eB48cCiD8/+ocEacKCQz3eAAPgqAIcB4IHgAd4Apwz0z3CgAMgc0aBSCKASyXAE +8Ah1AebQfs9wAAD7/xB1G/IVIIEjAJHXcAAA+/8CEREBcfaWDu//i3EAFAQxDCEAoerzCiHAD+ty +O9iL29EHIAAKJUAEAIdCIECAAKcH9ADZz3CgAMgcMaB9B+/+ocDxwM9wgACYOgCAgeDKIcIPyiLC +B8oggg8AAK8TyiOCDwAA8wHKJCIAhAciAMolAgEaCAAA0cDgfvHAqgvAEYoOgA7RwOB+4HjxwLoO +z/7PcIAAoCwDgM9zDwAA/CiAz3CAALi2wLk2eESAIIAKumR6ybkles9xpwAUSE2hRYABgAq6ybhk +ekV4DqHPcYAAKEcOiYYg/wFbaM9wgAD4o0yoT4kwiUAgEwOGIv8BQ7qGIf8BTahDuVoM4AcuqNpw +z3CAAPgqAIAB4IHgz3GAAPgqAKEK9AHZz3CgAMgcMaAOD2ASKHDPcQgAhxDPcKAA7CcmoAPYANky +I1UgOnFMJQCilAAqAFpwSiQAIBrwQCWBATB5BrmBuRC/JX/PcaAA7CfmoUAmgQEweQa5gbkQuCV4 +z3GgAOwnBqFAJFQgz3CAAGg4IIBgeQbYknD2AA4AESUApfTzqnDmD2AFinEacKpwQg5gBYpxmHBA +KEAhEHgQuIG4h7iMuM9xoADsJwahTCQAoCbyTCRAoBT0iiXEBoomhAgi8AohwA/rcs9wAACwE4oj +xQ0KJEAFBQYgAEolAAAKIcAP63LPcAAAriiKI0YGSiQAAOkFIAAKJQAFiiWCDYomQg8A3wTbn3Pp +cKggAAxhu0AugiFALAEBWWF1eQAjTQHHcYAA9LZCkbB9Br2BvVx6ELpFfc9yoADsJ6aiQpHAunh6 +5XpQf0ORACONAbB9Br1ceoG9ELqles92oADsJ0amI5HAuXh5JXgQeGjxQiJAIIDgsgbt/0AhQSDP +cQgAhhDPcKAA7CcmoM9wgAD4KgCAz3GAAPgqQiBAgAChB/TPcaAAyBwA2BGh1QTP/uB48cAA2I24 +/g1gDQYaGDAMzIYg/4oI8s9wgAAsQwCIgOC8DoIE0cDgfs9xAwBADc9woACoIC2gz3GAAFwIQIEB +agChz3CgADguBYAEIIAPwAAAANdwwAAAAArySNjPcZ8AuP8aoVuhadgYuBmhz3KAAKxjBoIDgCCA +x3EAAIgToQZgEEhwCHLPc4AAyGMGgwOAIIDPcIAAACsEgACA1bgZYRDhaHB5BmAQQnngePHACHHP +cIAAfDlIiM9wgAAOOUQqPgsyIEIO57oJ8sa6CrrPcIAA0GhKDmAQWWHRwOB+4HjxwOHFz3WAACRp +BoUDgCCAz3CAAHw5aIhKiEQrPgsAIYB/gAD4OFV4TJCpcAq6Eg5gEFlhiiCVCnIMoAYihfkDz/7g +eM9wgAA0OVyQz3OAAAhpIoNocAq65QVgEFlh4HjxwOHFz3CAAHw5SIgqiM91gAAkaUQqPgsAIYB/ +gAD4ODV4TJAihalwCrq2DWAQWWGKIJUKFgygBiKFnQPP/uB48cASC8/+z3GAAERwIYGjwULBz3GA +AKAsFSEQAAAQACDAEA4GgOYvKIEDTiCNB1jyEm0WeAAgkg+AABDjBhKAIM9xgADQ5RZ5AIEikY7l +CBxEMMogYQAG8oty3gsv/wLBgOA38gDYz3GAAHwHQIEPIEADLyEKIAQhgKAAoQb0gOL0DGIIyiAi +CK94fg2gBBDZAN8EGsQjiiEIAAAaQCCpcOlxrghgBw/aABACIMASAAYEIEAEwBoYAM9wgABQ5rZ4 +4KDhoM9wgABw4rR44LAQJk6TLyiBA04gjQes9ZEC7/6jwOB48cDhxQh1BPA+DEAQogxgEKlwgOD6 +9Z0Cz/7geKPBQMBBwQUUgTAA2IHhQsIN8oLhB/KD4Q30IcEA2A8gQAADFIEwDyBAAAIUgTAPIEAA +BhSBMIHhDvKC4Qfyg+EP9CHBA+EPIEAAAxSBMAPhDyBAAAIUgTAD4Q8gQAAJFIEwgeEO9AIUgTAK +uU8hAgQDFIEwDLkleiHBDrlFeSV4IMGB4Qj0BxSBMCLCBrkIukV5JXjgf6PAo8HhxULBCRSBMEPC +g+FBwADYCvaA4cj2ChSBMIDhxPaD4cP2AdgHFIIwBhSDMFBzBvIiwTBzzCJCgAP0AdghxYHlEPQK +FIEwI8NwcUr2CxSCMFBxzCOqgIT2gOLKIGkAgeAN9IohyQ/PcIAAUAcgoIHl/9nKISIAIaDBxeB/ +o8DxwAYJz/7PdoAAMAgAFgUQTCVAgsohxg/KIsYHyiCGDwAAhifKI4YPAABjAGgBJgDKJKYAz3CA +AFQeCoCA4BDyz3GfALj/HaHPcIAA4CpEgAHis7q1uri6RKBWoc93gACQagCGoYYIuCCHBX0wdQny +ELmKIEsFfgmgBqV5oKcghs9wgACUe/AgQABAeIDg6/PPcIAA4CoAgFEggIIG8gDZz3CfALj/PaDF +AM/+osHhxULBQSgCAgd6QSgBBEd5z3KAAJDixrkqYue6EvQIFAMxz3WAANDlqXFWeUCBUHAF9EKR +cHIG8keJ57r384DYA/AGicHF4H+iwPHAz3KAABrjMmg2eTFiosFAwUHAi3AI2Z7aHtsqCmAOGLui +wNHA4H7gfuB48cAIyJW4CBoYMAnIm7gJGhgwC8iKuI24kLgLGhgwz3CAAKAsA4AYiIHgDPQLyM9x +AABwLqy4CxoYMJIIIAcP2NHA4H7xwOHFCHU+iM9wgAAUIkCAQCUAFAO5NXlZYdYOIA8K2poP7/+p +cPEHj/7gePHApcFBwELBDBwAMRAcQDHPcYAAfKI0GcAPMBkADywZwA4oGYAOJBlADs9wgAB8oiAY +QAvPcIAAfKIcGAALz3CAAHyiGBjACs9wgAB8ohQYgArPcIAAfKIQGMAIz3CAAHyiDBiACM9wgAB8 +oggYQAjPcYAAAKKAGQAIfBnAB3gZgAd0GUAHcBkAB2wZAAdoGYAGZBlABmAZAAZcGcAFWBmABVQZ +QAVQGQAFTBnABEgZgAREGUAEQBkABO+hzqGtoYyhLBnAAigZgAIkGUACIBkAAhwZwAEYGYABFBlA +ARAZAAFjoWogAAPYGQAAaiDAAtQZAABqIIAC0BkAAGogQAHIGQAAaiAAAcQZAABqIMAAwBkAAGog +gAC8GQAAaiBAALgZAABqIAAAtBkAAGoggAHMGQAAQNifuM9xnwC4/x2hz3Cg/gAAFqFTI8AEBSCA +D7D+AAAWoRiBUyfNNVMlxDVTJsU1lLgYoUDDAcACwde6DBQGMKlzjg1gBhAUBzDyDWAOANjPcaAA +yDsugdIOYAZ92IYNwAPPcAAArd7uCAABCNgA2VoI4AaZuTEEQA/gePHAxg2P/s9ygACgM4Dhz3WA +ABxsDvIAogCFgOAT9EoPYAEP2DIIYAgI2AHYAKUL8ADewKL6DWABD9jiDyAICNjApfEFj/7geM9x +gACkNwCBHNrPc4AA4AZAoEKDVSLACQGhoBIAAI24oBoAAM9wgACACKQaAACcEgABZ4MEoVUiQA0D +oUAiAAd2eAWIoOAM9M9wgADYBgCQSHSAJEQTAKwe2wPwGNtioVUiQA14YAWh/QBgDihw4HjxwAoN +j/7PcIAAVB4DgIDgD/LPcp8AuP8dos9xgADgKgSBAeCzuLW4uLgEoRaiz3CAAIQGQIDPdoAAfBmg +hgQigw8PAADgBCOBDwEAAAASaWR4B32gpph1BCKODwAAAEDPdYAAeBnghQO+ZH49ecd/4KUEJA0A +BCKCDwAAAIAGI0ADRXkCueR+BCODDwIAAADGeGR5JngvKAEATiBBBIbhDRpYMAfyz3CAAADODpCA +4Cjyz3CAAEAHAIjPcoAAoCzwIgIAvxICBlMiQoAa9M9ygADcdIbhBLgAYhL0z3KAABDO9CICAIDi +DPLPcoAATEojgg0aGDAB4SOiBfAQcRvyKHDPc6AAFAQKo89ygABcB0CKgeIA2QX0SYO44oL3AdmA +4QHdCfTPcaAAiCAVeaChFPAG2NvxOg0gDQYaWDPCD8AFgOAK9ADZkbnPcKAA0BsxoE4OoBCpcBkE +j/7xwK4Lr/4w2s9xnwC4/1ahDRoYMM9xoADUBxoZGIAfEQCGAd0BGhgwBBKFMEwlAIfKIcIPyiLC +B8oggg8AAOscyiOCDwAAaQH0A+L/yiRCAxkRAoYD2CAZGIAUGViDDxEOhgAWAEAAFgBAABYDQQAW +AEEAFg9ADxmYg/S/ViMAAhB4BPIC4BB4A+AEIIAPAAD8/xByDxEAhkDgHhkYgB0RAoYb9626HhkY +gB0ZmICyCAAGgOAF8moPb/8A2BLwC8gFIIAPAQAA/AsaGDALyKy4CxoYMAbwjboeGRiAHRmYgDIM +IA0GGlgzLQOv/gDY4HjxwOHFz3CAAIQGoIB12AQljR8PAADglgtgBoohhQkvLUET8g7v/04lQBQK +JQCADvIKIcAP63LPcAAA3g6KI8UKDQPv/04lRBR/2Aq4z3GgANAbE6F/2BCh3QKP/vHAWgqP/gh2 +7Igols9wgACkBrJvKHOGI/MPtn1CKxECx3WAABDjYIXtuwhyAvJEaOu5iiDDLwT0HhaQEA2OUSAA +gKTy47k99Ou7FfL/2AetSiQAcQDZqCCAAyhiACGDD4AA+Or2ewSrKGIB4S95AKtd8EwhAKGQ9goh +wA/rcs9wAAAtJYojCwRKJEAAZQLv/wolQATuuQeNMiJCBAAhgS+AAPjq9nkJ8kSpBNkAKUEEJXgH +rT3wQKkPIEAEY/BMIACklvaMIMOvyiHCD8oiwgfKIIIPAAAuJcojgg8AAOQCyiRiAAwC4v/KJQIE +2gnv/8lwCJbuuAXyAo4JrQPwAY4IrQCF67gY8gDaR61KJABxz3GAAPjqqCDAAjhi9ngEGAIEABgC +BAHiT3oBjgitAo4JrSzwTCEAocohyg/KIIoPAAAvJcojig8AAAEDPAfq/8oiygcIlgAhgS+AAPjq +7rgHjfZ5CfIEGQIEBNkAKUEEJngHrd3xABkCBADZDyFBBCZ4B60BjgitMQGP/vHA1giP/s9zgAC0 +B2CDAN7PdZ8AuP/9hXlhz3OAAIgG4KPdpc9zoABQDGCDx3MAAABAInvNu3BwxPdRIwDA9PPPcYAA +iAZggc9xnwC4/32hUSMAwMogIgAe9IHiG/TPcqAA0A8QEgGGgODT9891gAAsI59wY4WoIAADAo0l +Eg+GwbjTaNh/AeACred7Y6UQGliAAdipAI/+8cA+CI/+z3CAAFQeD4CswYDgAN8P8s9ynwC4/x2i +z3GAAOAqBIEB4LO4tbi4uAShFqLPcYAAcDIZgc91gAAMtaG4GaEClSGVELgFeQIcRDAwuQQcRDAo +hQLaz3CgALAfSMFZoM9ygAAAKwmCAIBJwA2CAIBKwLYIYAaKINUDz3CAANwHIICKINUDoghgBiKJ +CIXguBzyUSDAgRr0z3WAAKAsAIXEEAAGz3aAAOBHUSBAgQf0Yg/ABAHY3B4AEAGFGIhBHhgQHglg +ARjYz3CAAHw5KIjPcIAADDlEKT4LNCBADlEgAIHKIAEHyiEhDMoigQ8AAJAAyiOhB3wJIQ7AKyEG +z3CAAOAqAIDvuAXyz3CfALj//aCRB2/+rMDxwPYJIAAB2M9wgACAOCCA67kP8s9wgACgLACAxBAA +BlEgQIEF8lEhgIIE2ALyAtg2DwAA0cDgfvHA6g5P/lEggMGlwcQNIgTKIKIAC8iQuAsaGDAWC6/+ +AN3PcIAA7GgmgCOBIIGMvToJIBC5YQDZz3aAAIA4/B5AEM9woAAsIPCAz3AAAEAeQMAC2EHAAdhC +wEPBRMEF2QTaANuYc7hz2HPaDiAEACdHEwCGi7gAptkGb/6lwOB48cBqDk/+USCAwaXBRA0iBMog +ogALyJC4CxoYMJYKr/4A3c9wgADsaCaAI4EggYy9ugggELlhAdrPdoAAgDj8HoAQANnPcKAALCDw +gM9wAAAYH0DAAthBwELCQ8FEwShwBdkE2ghzmHC4cNhwVg4gBAAnRxMAhqu4AKZZBm/+pcDxwO4N +T/7PdYAAgDgAheu4BfKaC8AFgOAK8gvIBSCADwAAADwLGhgwCgqP/s9zoAA4LgeDw7iP4A/yHBME +AAohwA/rcs9wAADBG4ojBAAtBq//SiUAAM92gADoLwiOieAH8ojgEfQAhVEgAIIN9C4LwAWA4Any +z3CAACRpBoADgACASgrAACYLwAWA4Aryz3CAAOxoYg/AD5YNIAAA2AnwCI6J4An0AIVRIICABfQA +2JIP4AeMuKUFT/7gePHAHg1P/npwgeAB3cIlQROB4AHYz3eAAKAsIIfAeMgRDgYhh0QmvpHIEQMG +BPREI76BEvIKIcAP63JAKw0Ez3AAAMsbiiNHDAokwARxBa//BSWFE89xgADoL16XLJFQcQf0z3KA +AMi/QYJQcRryIgoAAOoJIACpcKoJAADwJ0ATxBABBqlwJbnAuYoI4AAA2gYIgBALyJC4CxoYMNoI +j/4CCuARAdgyD+AKANgqD+AKAtjPdqAAwC+pFgCWqxYBlqoWApYFeawWAJYA3a0WA5YFeq4WAJYF +e89wDwAA+AQhAYAEIhAABCMRAFp1F/IvKkEATiKAB89yoAAMLfAiAgBRIgCCANoPIgIABPRFfQTw +BSKSIAYhgYDr9c9wgADoLyyQHpcQcQ/0z3CAAIA4AIAEIL6PAAA4EAX00g6ABYDgKPRMI0CgC/Sl +FgGWTyIAIYa4BnmlHliQD/DPcIAA6C8skB6XEHEJ8qUWAJZFJUERJnilHhiQTCNAoAnyz3CAAOgv +LJAelxBxBPK2DCASBdhMI0CgC/SlFgCWRSVBEQUhAQQleKUeGJA68E8iACGGuM9xgAB4OUiBBSBA +BAV6ANgIoQGHwBADBoDjLyjBAE4gjQch8o7lyiQidMogIgDoICIF8m0AIIEPgAAQ4/Z/EuHvYYwn +w5/KISIAzyHCA8YiQgAB4BAjQ4MvKMEATiCNB+L1pRYAlgV6pR6YkFkDT/7xwA4LT/7PcaAALCDm +gbCBz3aAAHg5BYYCJQIQBIYQckT3QngGoQbwCtgGoXYNgAbkpkUDb/6lpvHA4cXPdYAAoCwVfQCF +z3GAAOy1gCADAA4K4A4D2gCFz3GAAOhHgCADA/4J4A6D2h0DT/7xwOHFz3WAAKAsFX0ghc9ygADs +tUhwgCEDANoJ4A4D2iCFz3CAAOhHgCEDA8YJ4A6D2ukCT/7gePHAocHPcIAAHHAAgEIM4AZAwItw +BNm92h7bigzgDRi7ocDRwOB+4HjPcIAAeDngfwaA4HjPcIAAZDngfs9wgACcB+B/AIDgePHAIgpv +/gDZSiSAcOB4qCAACs91gAB8OnDcAiUCE0QpPgcncs93gACQaQDewKIF22Siz3MCACQqY6IB22Wi +5qJCJQIeACJADsCgBtpEoM9yAgC4KkOgZaDmoAHhLQJP/vHAwglP/s9wgACcB+CAz3CAAFQeD4CA +4O99EPLPcZ8AuP8doc9wgADgKkSAAeKzurW6uLpEoFahz3aAAI1qAI4QdQjyiiAVA2YKIAapceCu +z3CAAPRz8CBAA0B4z3CAAOAqAIDvuAfyANnPcJ8AuP89oLkBT/7gePHAHgzv/wDYz3CAAIA4AIDg +uAby7rgH9AjYA/AB2HIJAADRwOB+4HjxwCIJT/6lwVEggMEC3fwP4gPKIEIDC8iQuAsaGDBODW/+ +AN/PcIAA7GgmgCOBIIGMv3IL4A/5Yc92gACAOPweQBMA2c9woAAsIEAQBwDPcAAArB5AwEHFQsFD +wUTBAdgF2QTaANuYc7hz2HAOCSAEACfHAwCGgLgAphEBb/6lwPHAoghP/lEggMGlwXwP4gPKIKIA +C8iQuAsaGDDODG/+AN3PcIAA7GgmgCOBIIGMvfIK4A+5YQPYz3aAAIA4/B4AEADZz3CgACwg8IDP +cAAAhB9AwALYQcBCwUPBRMEocAXZBNoIc5hwuHBKJkAAjgggBAAnRxMAhqC4AKaNAG/+pcDgePHA ++gqgBeHFgOAL8gvIBSCADwAAANQLGhgwTgxP/s91gACAOACF57gG8qe4AKX+C6APANjPcIAA6C8I +iIngCPKI4A70AIVRIACCCvTPcIAAJGkGgAOAAICmDIAAOQBP/vHAwg8P/gh2z3WAAJwHiiCVApoI +IAYghYog1QLApY4IIAbJcdoNz/8FAE/+8cAB2c9wgAB4OSCgz3OAAAhpBoMDgCCAz3CAAAArBYBA +gGhw1bruCeAPWWHPcIAA3AcggASJoLgEqdHA4H7geM9zgAAIaQaDA4AggM9wgAAAKwWAQIBocNW6 +uQHgD1lhKHIJACAAANnhxeHGQCkNAiV9QC0DFIjipXsIdZD3UyV+kAbyAR1SEGG6+/FBKo4AwbpC +Jk6QBB3QEP31gOIK8i8kiXDgeKgggAEBHVIQ4HjBxuB/wcXgePHA4cXPdYAAILAgjYwhw48K8oDg +BvLPcIAAwGXKCMAP/9gArc9wgADIrwDZNaDPcIAAKCMgoM9xgABEOACBoriaCeAKAKEA2NIIr/8I +cQUHD/7gePHA4cUA3c9wgAA4CKCgz3CAAEQ4oKDPcIAAwLSpdJ2wMLyesFYIYASpcKlwJgpgCalx +zQYP/uB48cBKDg/+z3CAAFQeAoAHEg82gOANEg42ARIQNg/yz3KfALj/HaLPcYAA4CoEgQHgs7i1 +uLi4BKEWogbYDRoYMM91oAAUBAqlCYWA4CfyA9gQpQSlz3CAAAju+glgEAMaGDCS2QPIkLmgGEAA +MgsgBADYCYWA4A/yKBUEECQVBRAe2AohwA/rcoy4VQZv/4ojBAYHGtgzARoYNM9wgADgKsqlAIBR +IICADRqYMwbyz3GfALj/ANgdofUFD/7xwOHFCHX6DeAAFNjPcIAAoCwAgMQQAAYluC4IIAHAuMoP +oAcE2HIK4A2pcLYOQA3qC0ANiiALAEYO4AWpcc0FD/7gePHAUg0P/qHBCHUodoogRA8qDuAFqXGC +5QP3E92a8KlwyXFaDK//ANrPcqD+FAaA4M9xnwC4/wb0SHAWobah7/FAIgAOFqG2oc9yoABQDAWC +z3aAADC1Eq4FghOuCZaMIIiAKm1G8hP2h+Ai8owgxIFq9ILhWgAFAM9ygAC0qVoLb/5AIgACSHEf +8IwgyIBM8owgEIBY9AWCCWmF4EP3AN1T8KoP4AYA2Qh1T/CB4Ur0z3KAALSpIgtv/kAigAILioG4 +C6rt8QuJgLgLqenxgeE49AYLb/6LcCDAz3GAALSpUyACAIYgfw9IqRx4Cant8Y7hUAAFAM9wgACg +LAOAGIiB4CDyz3KAAOimSHDKCm/+BtlAIgACwgpv/gbZDJKBuAyyv/GE4Y73z3KAAOimQCIABaYK +b/4E2QySgLgMsrHxE90D8BzdiiBED/IM4AUplqlwbQQv/qHA8cDPcIAA6KYMkOC4BPKaDsADBvBR +IECAAAgCBM9wgAC0qQuIgeAI8oLgCfQeDcAE0cDgfjIOwAT88fzx8cC+Cw/+CgqABYDgz3WAAIA4 +D/QEFQQQCiHAD+tyz3AAAL0bw9slBG//SiUAAM92gADoLwiOABUEEIfg0SQhgsohwQ/KIsEHyiCB +DwAAwxvKI4EPAADKAPADYf/KJSEAUSRAgjX0ANnPc4AAfDkoqwHaSatKq4wdRBAK244dwhCH4ALb +jx3CEAbyiOAO9FEkAIIM8uwVABFquBB4kB0EEArYlB0EEAfwZNiQHQQQlB1EEJIdQhCWHYIQVSXA +GFYlwRVKCqAOC9oAhYm4AKUB2AGlz3GAAKAsAIHIEAAGhiB/jgn0AYHIEAAGhiB/jlgMQQMIjofg +CPLPcaAAOC4Hgai4B6ElAw/+8cCyCi/+SiRAcc92gADkzCSGAN2oIEACAN8PJ08TCyHAgwT0AeUN +8IogSg5yC+AFqXEEhuZ4BKZKCaAAqXAEhoDg3ArhAMogYQLRAg/+4HgIczhg1bvVuTBzNrjE9wIj +QgAK8M9ygAB460WCAeDJuCJ6emIWuOB/RXjgePHANgov/phyCHXPdoAAQKr0JkAQz3eAAMCpUSBA +gsogQQDKJCJ0yiAiAOggYgL0JgIQUSJAggPyAeCQ4EYABgAtu8C7z3KAAHDitHpAK4UCYJIEvYYl ++BOJvQ8jQwBgsgDaFn9Ap0Gnw7mleQUhQwEUfmC2z3GAAGCqFXkAGQABAvCA2BkCD/7gfuB48cDh +xc9xgADQrkGJz3WAACgjgOLPc4AARDgggwbyAdgApYK5IKMJ8ADaQKWiuYDgIKN4DIIKANiyC2// +CHHWCuABANjdAQ/+8cBmCS/+mHADEgE2AJEhgUDg9LnAIKIAA+AEIIAPAAD8/89xoADUBw8RDYYA +IAUBkHUA2kf3DcgVIgMwDhMABh1lGREAhgIlQwMQc3wADgAF3Qy9z3CgAMgfvqAQ3a6gAd0VGFiD +z3afALj/vYbPcIAAiAagoF2mGREAhhBzxfdRIwDA+vPPcIAAiAZAgM9wnwC4/12gUSMAwBjyDcgV +IgIwDhICBs9wnwC4/1agdqAZEQCGCiHAD+tyQ9jPcwAARBYxAW//jLgPGViBBQEP/vHAaggP/qvB +z3CAAPjrABATAAfIBCCAD/EAAPBAwA3MAN7PdaAAyB9RIECAz3CAAPjrIYADyA/yoBUCEPgVAxBi +eQIiVwB2EAEBLyfIJVlhBPCEEBcB4nE6GMQFH4UQccX3MHiaCmAGAtkB2c9woADUBzSgM6AD3+2g +ERAAhs9xoADUB0HAQOAPGRiAFBmYgwPIpBABAFEhAIIF8joMQA0D8EcdmJPPcKAA1AcNEACGQC8B +JBB4BSEVAAPIIYAAEBIBQ8G4EJgAchABAboQAAECIRQGEghgB0TAgeAL9M9wgAC0KgCQgeAB2MB4 +DLhCwALwQsYDyM9xoADUB1mAiBmAAKQQAQDZoLgYggO6GIQDt7mkGEAAA8D2uAjyz3KgAEgIQCIB +IwfwQCIBIc9yoABMCATAAsMDcWV4BSUVIAdpz3MAAPz/ZHjPc4AA+OtjgwggxQDPc6AA1Ac1owAa +QAUCIgElL6MCJQEAO6Pwo89ygAA8Qw0SATYAgjBwHfLPcKAAOC4FgAQggA/AAAAA13DAAAAADfL1 +2AW4z3OfALj/GqM7o2nYGLgZowHYAvDJcIHgA/Qgos9wgAD46wQQBAACI1Mhz3KAAKi2iHCAIA8K +HqUQ2A6lAdgVHRiQB8gEIIAPAQAA8Cy4AxIDNgSyD4POqgCiQBMAAQKyEItgEwMBQCgFAcO7BSND +AWayD6ovIwgBz3CAAHzOQCAFCTV4KYDPcoAAAM47Y2mgpBUAEPgVARCAcCJ4RcAB2M9xoADUCxCh +A8A1uMC4F7gAIIEPAA4AAM9wgAD46wKAArgr4AQggA8AAPz/JXjscQChARIBNuxwIKDPcIAA+Osi +gOxwIKgNyBQiAQAwiexwIKjscMCwA8iUEAEA7HAgoA3I8CUBAOxwILDscMCw7HDAoOxwwKAHEgE2 +7HAgoAPIIJBUEAABELkleOxxAKEDEgM2AYNRIACBD/Iyi3CLz3CAAFDldngAiIYgfwwceAS4JXgC +8IDY7HEAqQPIO3YwiDMQgAAEuSV47HEAqQPIGnY8kOxwILADEgM2z3CAAExqnBMBAW+DJrnAucC7 +DLkNu2V5IKANEgE2ACGAD4AAKM7AqM9wgACszTZ4NHrAsgKQwBqEAxUlQQB4GgQAz3CAAKAsBIAa +kNAahANGwM9wgAD46wKAwKGA4MoljhMeAy4AyiGOI8l3yXU6dkwgAKC88hTwz3GgAPxEHYE5gQQh +go8AAAAIEvQEIL6PAAYAAAz0USMAwCf0z3CgAPQHB4D/uADe6PMv8ADe+rjKJoIfAAABAvm4yiaC +HwAAAgL8uMomgh8AAAECgOIK8s9zgADQSVCDiiYIEgHiUKPyDUAREfAB2c9wgAAYaiCg6gzgDyhw +z3GAAExKDYGKJggSAeANoQUljZMR8nECIAAA3oQSAACy4JT3USMAwE70z3AAAJATLg9ABc9yoADU +Bw+CEHgZEgGGWOAwcCv3CvDPc4AAVEkkg4ohECEB4SSjUSGAoEP0HhrYgx0SAIYHGhgwHRIAhkrA +HRIBhgTIIKAdEgGGIaAdEgGGIqAdEgGGI6AdEgGGJKBWJwASHhoYgB0SAoZALwAkUHkFIRUABBIB +NoYi8w8AERIBjCIMgAGBQ8AX8hrYFvDPcIAA+OsIEAQAABAFAAohwA/rclfYz3MAAIwTOQQv/4y4 +AN7R8CDYmnADcBB4chkEAADeTCAAoAP0A8hy8APA9rgI8s9xoABICEAiACMH8EAiACHPcaAATAhH +wQNwSMAEwQLAJXgFJRUgCMAH4M9xgAD46yOBBCCADwAA/P8IIFYADCbApC4BLQBJwJoNAAAFJQ2Q +mPQB2c9woADUBxQYWIBVJ0EUDxhYgFEiAML/9QjAz3GgANQHFaEHwgIiACUAGkAFD6EJwgImgCAb +oQPYEKEqwJzgAN6O9AfIAMEEIIAP8QAA8BBxlPQDyKlxyLkCI5MlCIgMuCV4AxIBNxC5JXjscQCh +CsBAIVkwARoYMATIAxIBNkHHAxoYMAQaWDAhgACQAcc0ucC5NHgD4EDnBCCADwAA/P8fZw0SATYH +8BUiQDAOEAAGAn8VIkAwDhAABhB3dvcDzM9xnwC4/xihz3CgAPxEXYAEIr6PAAYAAGH0TCAAoAzy +BMhQiFMiwQCGIv4DRLrEGIIAMKjPcKAAFATEoAfIz3GgAEgsHaHPcIAA+OsCgEAgUCAScAwFzf8L +8M9ygABUSSOCiiESIAHhI6ID8Dp1AghABlMhfqAF9FYMAAAFfYDlUfLhvUbyA8gpiAHhKajPcYAA +VEkGgQHgBqFE8AohwA/rcigUBTA82Iy4z3MAABsUTQIv/0okQACGDeAFKHAKIcAP63IHEgU2R9iM +uM9zAAAjFC0CL/8AFAQwTCAAoM9xgABUSYolEBAI9AfIz3OgAEgsiiUIEB2j+roH8gWBgL0B4AWh +tPEGgYG9AeAGobDx4L0I8s9xgABUSQWBAeAFoTp1A8ipcci5CIgMuCV4AxIBNxC5JXjscSp0hCQC +kQChQCFPMBvyz3GgANQHgBnABAPMKnLIuhC4RXjscgCizKEB2BQZGIDOCmARAefPcaD+hADPcJ8A +uP82oAMSAjaSEgAB6rgEEgE2BvSSEQMBUSOAgjbyqriSGgQAkhEAAaq4hgngCZIZBAAQ2c9woADQ +DxAYWIAkEAGGz3KAAAjyRZIweQK6RXkMGFiAFNkQGFiAz3GAAAjyZ5FGkRjZELtlegwYmIAQGFiA +z3GAAAjyaZFIkRC7ZXoMGJiABvDPcIAACPLKqM9yoADUC9CiTCEAoGTyz3Gg/rgAz3CfALj/NqAF +8AjZ7HAgoAHnz3CAAPjrAoAQd7f3z3CAAKi2JJCU4cAhhg8AAJMAz3CgAGgs8CBAAM9xgABMaiCB +z3egANQHJXgNogPYEqfeCgANUSVAkgXyng6v/wHABvAD2BMfGJAUH5iTTCAAoBfyz3CgACwgMIAF +wDBwAd3KJYYTBCCPTyAAAADPcAAANRWaCkAFgOXMJyGQ6/PPcAAoCAAGGhgwBsCKCSAGyXFRIUCg +svLPcKAALCDPoK7wz3CAAChHEYhRIACAG/JRIADDGfLPcYAAoCwjgc9wgAAoRxCIELgyIYEPAADY +Ap+4gOEB2cB5D7kleM9xoAD8RA2hTCMAoA3yz3CgAPQHYBjABM9xgABUSQOBAeADoc9wgACotiSQ +lOHAIYYPAACTAM9woABoLPAgQADPcYAATGoggQDaz3agANQHJXjPcaAA1AsNoUymiiAEAuoPYAWp +cS4K4A8GwBkWAJbA4KAADgANzFEgQIBM8gPdIB5YkwHYFB4YkAQSATYAFgRABxoYMQAWBUABGlgx +BMqc4MoiwgfKIIIPAADcDsojgg8AAPQKNAfi/sohwg8ocJ4LoBAO2Q8WAJYEEgE2tBkEABMeWJMQ +iVMgwgCGIP4DRLjEGQIAUKnPcBIgAABSCCAEDRICNgTIz3GgACwgsBAAAS+BZOAwcMoghQ8SKAgA +hffPcAAoCAAGGhgwAN4NzAQggA8AAAIIguAJ9AQSATaKIAQA3gpgCpgRAQANyM9xgAAQzs9ygADk +zBR5wLEmks9wgAD46wKAGWEweSayrdjPcgC7ALtODaAHBbgDyBqQUg3gBw0SATbPdoAAqLYEls91 +gABg4fQlARAGljBwE/KeCeAFB8gKIcAP63IElgwWBBHPcwAAqRX0JQUQMdg9Bu/+jLjBBa/9q8BR +IEDD8cDhxSfyz3CAAPjrAYDPcaAAyB+WIEEPHqEQ2A6hAdgVGRiAEg4gEUHYUSBAwxPyAdnPcIAA +GGogoMINoA8B2M9xgABMSg2BAeANoYolCBIu8M9xoAD8RB2BOYEEIYKPAAAACADdB/QEIL6PAAYA +ABnyAN36uMolgh8AAAEC+bjKJYIfAAACAoDiCvLPc4AA0ElQg4olCBIB4lCjVg4AEQbwA9nPcKAA +FAQloGkFr/2pcOB48cDqDI/9CHXPdoAAQBcAjoDgqMFY9It36XDPcYAAaHCODa/9INoB2ACuANiP +uAsaHDAA2BUaAjDPdoAAAADXdQAA/sqgtgX0B8CAuEfAz3CgAKwvGoBSIAAAUSAAgAjyAZaAuAG2 +B8CBuEfAz3CAANR0oIiWDqAEqq7PcUN1qBJAwYohGgpBwSuOBKZGwOlwY8ENHEIzz3GAAJhLRMHP +cYAABEtFwSDZAdo923YOIA0XuwjYwg6gBQHZAtnPcIAA7DIkoI0Er/2owOB48cAaDI/9KHaA4M9x +gACgLC8gByAD9GGBAvBggcQTAwYlu/AhDQDAu4DmoqGjocwjIYAB3colIRDPc4AA6C/oi4nnF/Th +gcQXDxZRJ0CREfLsk36RcHcN8oHgCvKA4An0AIHEEAAGUSBAgQP0AN2B4solIRAA36YLYA3pcApw +7gugBqlxz3CAAOwyBIBRIICAEfLPcIAAbEUAgIDgC/TPcAAAFgkeCAAFgeAF9BIJwAsM8ADZnrnP +cKAA/EQhoOB44aBaC2ANANiA5ggOYgDKIGIAUg/ABIDgBPQCCIAPBPAyCIAPz3WAABQYAI2A4Ab0 +EgtADgHYAK2FA4/98cAaC4/9z3aAAHw5KY5ojjBzz3WAAIA4GnAF9ACF7Lij8kqOz3CAAAw5QCCR +AUQrPgsncFV4BoiB4Ciuc/QAhc93gAD4OEQpPgtAJwEVNCFBDuy4wLkR8oDhrLgApRTyvg/ABQiO +RCg+CwAnQB4qkKC5KrAI8IDhBvKmD8AFAIWMuAClCI5EKD4LMiFALoHgAdjCIAEAigkgEQquCI4q +jkQoPgsndzV/TJeYcIDiz3eAACRp6XAY8s9xgADoLyiJieEI8ojhK/QghVEhAIIn9EQsPgsyIUEu +geEG9EAqgQICcQPwCnG+DAAPiiCVCiILYAUih4oglQoWC2AFIocIjkQoPgvPcIAADDk0IEAOUSBA +gQCFJ/KFuCbwLWoKuQJx4/FEKT4LMiFALs93gAAkaYDgyiBiAOoIIBEKrgiOSo5EKD4LL3EAIYAP +gAD4OFV4TJCA4ulwyPMyIUEggeHA9cLxpbgApc9xgADoLyiJh+EM8ojhEPTPcYAAoCwhgcQRAQZR +IUCBCPLiuM8g4gDQIOEAAKU+D0AA4QGP/fHAhgmP/c91gADkzMSVgOYf8s9woAAsIDCAAN8GhSel +DiBAAP4Kr/3JcQiliiCKC0IKYAXJcYogygs6CmAFKIXktc9woAAsIBCA5bUGpaEBr/0IhfHAKgmP +/Tpwz3WAAOTMAIXPcYAAbD0CuBV4FSBABDAhEACKIEoN+glgBSpxiiCKDe4JYAUKcUwgAKEP9AAV +BBAKIcAP63KKIMwMiiPFAnUB7/4KJUAETCAAoDfyTCBAoBTyTCCAoB7yTCDAoBHyABUEEAohwA/r +coogDA2KI0ULQQHv/golAATmCgAAHfCKIAoLjglgBYohxQZ+CQAAFfAAhYHgA94J8oogCg1yCWAF +iiEFCcClANgFpQSFoLgEpRYKYAAD2MUAj/3gePHAz3KAAOTMJpIB4QeSMHkQcSay1/YEioHgBvQF +ioHgAdgD8gDYgOAN8ioJYAWKIIoOiiDKAR4JYAWKIYYMqggAANHA4H7gePHA4cXPcIAAUM9AkEQi +AAOI4EP0AN3PcYAA5MyloQSBUSKAgaC4BKEm9ASRz3KAADzNAeBEghB4UHAEsdT3BImB4Ab0BYmB +4AHYA/IA2IDgCvKKIMoBtghgBYohhgFCCAAAG/DPcIAAREEDgIDgEvID2BHwz3EAAP//kghgBYog +Cg7PcYAAREEDgYDgAvKjoQTYogkAAAEAj/3gePHA4cXPc4AA5MwEE4QATCRAgAb0BYuB4AHYA/IA +2IDgC/QFE4UACiHAD+tyiiCNDuEHr/7O2wLYAKMA3QSTqaOlo6azCqMEg6SzoLgEo4ogygEeCGAF +1dkqCeAGqXCdB0/94HjxwOHFiiAKDQIIYAXA2c91gADkzIogygvyDyAFKIUA2QPYAKUlpSSFoLk+ +COANJKVlB0/9ANnPcIAA5MwqoOB/KaDgePHA3g5P/e4Pz//PcIAAEM1ggM9ygADkzKiAYKLPdoAA +vD0EgqiiANnAhqC4geYlogSiGPSC48wj4oAZ9IDlz3CAAERBI6AL8oogCgt6DyAFiiEEC2oPz/8J +8OoKAAAH8AHbYKIooqC4BKLhBk/94HjxwG4Ob/0A2M9xoAAsIFCBz3aAAOTMJI7PdYAAEM2B4Qil +BfQljoHhAvIB2IDgJfQqhoDhHPIGhs4Pb/0OIIAAz3EAABAnMHDQ989xgAB46yWBmSHNCjBwSvcF +8M9wAAAQJwilAtgI8ADYCPAJhoDg9vUB2AClAdhhBk/98cDhxQh1iiAKDtIOIAWpcc9xgADkzASB +DyBAAwShdg8gAAnYQQZP/fHAxg1P/c92oAAsIBCGz3WAAOTMB6XPcIAAnGe2D+AOAN+KIIoLjg4g +BSSVABUFEEwlQIAR8kwlgIDMJeKAUfIKIcAP63KKIEwNiiMIBwkGr/6KJIMPBJWA4J3y5gvP/89w +gAB46wWAKIWZIM0KMHAB2MIgDgCA4I3yz3CAANRA6aDXcQAAECdvIAsAgOAg8gSNgeAF9AWNgeAB +2QLyANmA4YogCgsJ8goOIAWKIccElg3P/2/w/g0gBYohBwbPcAAAiBPmDe//CKVl8IogCgviDSAF +iiEHCNINz/9b8ASVgOAi9CWVCIWB4cAggQ8AAIgTA/IbeAiliiAKC7YNIAWKIUcNz3CAAHjrBYAo +hZkgzQowcAHYwiAOAIDgN/QSCQAAN/CB4Af0iiAKC4ohhw4r8AiFHXjXcAAAECcIpW8gCwCA4B3y +BI2B4Ab0BY2B4AHZA/IA2YDhiiAKCwjyVg0gBYohiAHiDM//E/BGDSAFiiHIAs9wAACIEwilB/CK +IAoLiiHIBC4NAAUiDc//BJUFtYogigseDSAFJJXktRCGjQRv/Qal4HjxwM9xgAAEp0GBz3GAAHjr +JYEFKb4AMHDKIE4ADCEA8M9xAAAQJ5YNb/3KIEUOz3GAADzNBKHRwOB+4HjxwOHFANjPc4AA5MwA +o891oAAsIBCFAdnPcoAAEM0GoxCFIKIGos9wgADUQAOIJKuMIIOGJKoE8iWqJasSDCAAA9gZBE/9 +4HjxwOHFz3WAAOTMiiCKDHoMIAUghQHY/QNv/QClz3CAAKAsA4DPcaQAHEAIgMC4E3jBuBKh4H7g +eOHFANpKJAB0z3WAAMCpz3OAADiqSHCoIAADQCMBAhR5QLEWJQEQQKFBoQHgSiTAcwDZqCBAAs9w +gABw4jR4QLAB4c9wgAB4B0Ggz3CAAOimTLDgf8HF4HgF8EJ5x3BAAAAAz3KAAHjrRYJQcTf3UyBD +BXBxwCCND0AAAADAII0A4H8ieAbwYnkCIIAPQAAAAM9ygAB462WCcHE391MgQgU6YlBzg/c4YAfw +AiCAD0AAAABieDhg4H7xwKoKT/3PcIAA3M8MiOe4CvQCuM9xgAAQ4xZ4BWEtvcC9A/D/3TYIwASA +4Ajyz3CAAOgvCIiH4ALYA/IA2M9xgAAwtXeJz3KAAMi/IYIwcwTyIIKA4QT0Ad8D8ADfz3aAAKAs +IIbEEQEGUSFAgSvygOUp9COGOImE4SXyLg/ADoDnz3GAAFxIGPLPcoAAtAcCggHgAqIA2M9ygADw +aQCiz3KAAExpAKLPcoAAjAYAohGBAeARoQXwEIEB4BChkgiP/ZoPgASA4A7yz3CAAOgvCIiI4Mwl +YZAG9NIO4A4B2NYLwAWMJcOfT/KA5xHyz3GAACgjAIGA4AvyANgAoc9xgABEOACBoriiDOAJAKHq +DQAOz3GAAHjrBoFFIEABBqHPd4AAtKkLj1EgwIB8DEL9C49RIICAXAoCBEoJwAMKCMAEgOAICyIA +yiAiBoDlCPIAhsQQAAZRIECBF/TPcYAAdEUEiYDgEfIDiYDgCvSKINAOJgogBYohRQMGC6AMA9jO +CiAAFdiNAU/94Hjhxc9xgAAsIwCJAduA4GGpJPLPcKAAsB95oM9wgAAAKwiAo4FggAKBEHUA2hj0 +z3CAAEQjAIiA4AP0AdgK8AGBAiMNANd1TABAS3n3QalIcIHgA/RhoUKp4H/BxaKh7/GA4AHYwiAM +AM9ygAAsIwCqAdgBqgDYAqoBogKiA6LgfySi4HjxwJoIT/0IdSh3SHaKIEcNdgkgBYohVgOQ5Yn3 +DtjpcaYPr/4A2oDgA/QT3S3wz3KAADC1SHDuDm/9DNnPcYAALCMAiYDgD/LPcIAAUM8AkIYg/ACM +IAKABfQFkmSSZ3gDoUIlABMyCyAGyXEKJQCQC/TPcIAAUM8AkIYg/ACMIAKA/A7B/30Ab/2pcPHA +BghP/TpwGnHyCCAFZ9ho2OoIIAUqcUwhAKeO9wohwA/rcs9wAADjDoPbCiRABG0Ar/4KJQAETCCA +ocohxg/KIIYPAADkDsojhg8AAIQAyiLGB2z3ANrPcYAAwKOeuhUhAQQAgQEqQgRGeNIM4AcAofUH +D/3geIkH7/8F2eB48cDhxQDdz3CAAMCjUggv/xzZG9imCCAABdlKJAB3z3GAAEwjqCDAAhYhQAME +EAUAsHWYdQX0QCRNAM0HD/0KIcAP63J32AW41Qdv/lPb4HjxwM9wgADAoxgQBQAvLEEBTCQAh8oi +xgfKIIYPAADiDsojhg8AAKsApAdm/sohxg/PcIAATCMWIAABAIBAeNHA4H7gePHA4cXPcAMAQA3P +daAAyB9FHRgQqg/P/4DYFR0YkFUHD/3gePHAzg4P/TpwGnG6D+AEZdhm2LIP4AQqcUwhAKeO9woh +wA/rcs9wAADjDmPbCiRABDUHb/4KJQAETCCAocohxg/KIIYPAADkDsojhg8AAGQAyiLGB2z3ANrP +cIAAwKOeuhUgAAQggAEqQgRFeZoL4AcgoL0GD/3geIkH7/8F2eB48cBSDi/9/9rPcIAARLgTGJiA +HBiYgADez3GAAOAGw6HPcIAAFDNAoAHaz3CAABgzQKDModCh0aHPocChwaEC3cl3z3CAADiyhC8I +GQAgQg5LgidwACGQf4AARLJGIsIAS6ACCOAOQCAAIWG9gOUkGIIjAecn9wLYANmeDK/9BNqiDSAF +AdgxBg/94Hjhxc9ygAAsJCCKAN3guWTYyiBBA+G5z3OgAMAdBqIJ8gzYAKMBggOiAoIEogTwoKOj +oqSiz3CAAKAsA4AJgFEgQIHRIaKABfIAg4C4AKPgf8HF4HjxwOHFAN3PcKAAwB2goKlwigggAKlx +z3CAACwko6CkoM0FL/2moOB48cBODS/9CHFqCAAAgOAw8goOoBAy2AYOoBAe2M93oADIH38XDpaK +IBMGQS4NFMS9Cg7gBPLZiiATBgIO4ATJcYogEwb2DeAEqXHPcYAASCQBiQHaEHXCIooAgOVAqcj2 +ANgNp4HiBPQE2AGpSQUP/fHA2gwP/Rpxz3eAACwkII9RIQCASfLPcYAASCQgiYDhzCAhoEHygeAG +9M9wgADIv6GAA/AA3Y7lA/eA5QL0AN3PcYAAyL8YiYDgBPSA5QT0AN4E8KKBBN6KIBMGbg3gBKlx +iiBTBmYN4ATJcc9wgACgLAOAGIiD4MwgIoHMIOKBzCAigswgYoIH8oogEwY+DeAEsdkJ8AqXEHUJ +9AuXEHbMICGgA/QA2CDwAdjPcaAAyB8Noc9wgABIJAGIy7eqtwS+ELjFfQV9iiATBv4M4ATI2Yog +Ewb2DOAEqXHPcKAAyB9/GFiDAdhVBA/9gODPcYAALCQE9EAhAAME8EAhAAQAgM9xoADAHVEgAIAA +gc8g4gDQIOEAAKHgfuB44H7geOB/ANjgfuB44H7geOB+4HjgfuB44H7geM9xgADYSBKBAeASoQ3I +x3CAABzOLIgB4S95LKjPcIAALCQCiBBxyfaKIAgABhoYMIrYkLgH8IogEAAGGhgwQtiYuOB+4H7g +ePHAXgsv/STaqcGLdc9xgAAgcBIML/2pcM93gAB8OggXgZDPcIAADjlEKT4LMiBADs92gACAOFEg +wIFRFgAWH/KB4C7yYgggAADYoggAAPoPgBAB2EDAgcHa3AInABN+CaANINqpcCTZvNoe2yoNoAwY +uwHYUR4YEBLwgOAQ8q4LoAlUFgAWAN9Ax6lwJNm82h7bBg2gDBi7UR7YEykDL/2pwOB4DNrPcYAA +fDoC4A94JxkCgADYKBkCgAsRgIAmGYKACBGCgCkZAoAB4A94CxkCgM9wgAAOOUQqPgsyIEAO4H8q +GQKA4Hjd2M9xgACYOQSpC4kH4A94BalQ2Aapb9gHqZrYCKkJ2OB/CanxwE4KL/0k2q3Bz3GAAFhx +Bgsv/YTAz3KAAOgvCIqH4HwCAgDPd4AAfDoIF4GQCheDkM91gAAMOUAlkBEDbUQpPgsndXV9Zo3P +doAAgDiB40wCAgBsks9ygACgLF6SUHMI9ECGBCK+jwAAOBAsAgEAAN2pcgvwRCk+CwAhg3+AAPg4 +VXtskwHifWVEKT4LMiBEDpBysfdMJICAyiHCD8oiwgfKIIIPAADaG8ojgg8AAMQAMAJi/solIgDO +DIADkgygA5hwAiAAASCGSrjjudEhIYNR8oDgxAEMABB1ANkDHEIwCfeieBB1AeEvefz3AxxCMIDg +xPYB4QMcQjAIF4CQCr1EKD4LMiBBLi9wx3CAAPg4gOHKIWIANXgMkAq4QcDPcIAAJGkCgELF6XGC +IUMFQ8BAJMAwmg9gDQ3aXg7v/w3Yng7P//YNgBAB2ETAhcHa3AInABN6D2ANINqEwCTZvNoe2yYL +oAwYuwLYUR4YEJbwAtnPcKAAsB85oFEWARaD4QgXgJC4cCf0RCg+Cy9wMiABIMdwgAD4OAoiQIDK +ImIAFSCDAKQWAhdsk1BzFfSB4QHZwiFBADV4pRYBF0yQMHLPcIAAACsH9A2AAIBTFgEWEHFk8v/Y +AxwCMEQtPgsyIEEuL3DHcIAA+DgKvYDhyiFiADV4DJAKuEHAz3CAAAArCYBCxSCAACEAAUPA6XFA +JMAwgiFDBbYOYA0N2n4N7/8N2LoNz/8SDYAQAdhEwIXB2twCJwATlg5gDSDahMAk2bzaHttGCqAM +GLsD2FEeGBAIF4CQRCg+CzIgQi4vcMdwgAD4OAojgIDKI2IAFSDBACyRgeKkHlwQAdnCIUEANXgM +kKUeHBDPcIAAACsNgACAUx4YEATwXgzP/xUAL/2twOB48cCuD8/8mBACAAQigQ8AAAAIO3kEIoMP +AAAAECV7z3GAAKAspIHpulYlThRWJQ8VmBCBAAjyhiH/A0S5L2eJv+lxGfBRIgCCvBUCEQzywrmA +JQIZP2Xojz1lMI1lf/B/RXkJ8MO5PHk/Zj5mMI7oj0V5iBjAA2V5nQfv/IwYQADxwOHFA8ikEAEA +mBACAFEhAIByEAEBSHAG8moNYAIA2gh1B/AB4V4NYAIA2qxo9g3ADs9yoADIH/gSAQADyM9zgAAQ +4xCIArgWeABj7bjPcIAAACsI9AHbc6JIgECCDIBggAjwAttzokmAQIINgGCAAiVAEFhgEHLAI20A +DXEAoQ1wYKAAFgBAABYAQAPIz3KgAPQHcBABAWi5J6JwEAEBaLkweQEH7/xwGEQA8cCCDs/8z3ag +AMgfoBYEEPgWAxCE4ADfIvQDEgE2pBEAAPS4dhECAQbyz3CAAPjroYAE8IIRDQENzFEgAIGEEQAB +CfICJcEQAiRDAAgjAwAE8IYRAwEbY2hxcfCB4Er0DRIBNwPI5Ll4EAIBIfJRIUCAz3GAAKAsJIFU +EQEBCfJ+EA0BIn1ifQIkQwMr8IAQAwHPdYAA8OEAI0QAcIh2fWCVACMNAYQQAwG7YxvwpBABAPS5 +CPJwiM9xgADw4XZ5YJEE8IIQAwHPcYAAoCwkgYAQDQFUEQEBPWW7Y4QQDQG7Y4AQDQG5YX4QDQFC +fSfwguAh9AMSDTYNzHgVAhFRIACBz3CAAKAsBIBUEAEBCfKAFQARInhieAIkAwAH8IIVAxGEFQAR +O2MbY4AVDRFCfQXw6XPpcul16XENzFEgQIAH8gPIdhACAWK6OmIL8IDjYrrJ9s9wgACgLASARhAA +ARpi+BYAEF1lAn0fhhB1i/eg2A+m/6ZfpgLYFR4YkIDYDqZpBe/8cHjxwPoMz/zPcYAAoCzwIQIA +ViJFBAiCViIEBVEgwICKIAgAyiAhALwaBABKJAByANmoIIAPz3WAABh2/IouZeR+LyiBA04ggwfP +cIAAAHhvYAAlQwDgq0QSjwDkfi8ugRNOJo8X7mDIq8iCUSbAkA/yHYqG4dMgpgAvKAEATiCNB89w +gAA8dKhgEPDPdoAAQHYuZs5lvIrEfVgSjgDEfS8tQRNOJY4XyGAQqwHhSiQAcgDbqCCBANyKz3GA +ANx3b2HPdYAAAHjkfi8ogQNOII8H72UAJcAA/KhEEo8A5H4vLoETTiaPF+5lJBiCA8iCUSbAkA/y +PYqA49MhoQAvKUEATiGNB89xgAA8dKlhEfCA4wPyyWsC8Gh2zmE8isR5WBKOAMR5LylBAE4hjgfJ +ZSwYQgAB40okAHEA2KggQAXPcYAAOHR9iglhACQMAAHgZHkvKUEATiGDB89xgAA8dGlhIKwBBM/8 +4HjhxeHGz3OkALRFKRMAhs9xgADgR8gZAAArEwCGzBkAAM9wpQAIDAOA5BkAAA4TAIYQejC41BkA +ANAZgAAPEwCG2BkAAM9wgACMz9SItojoGYADeIjsGUADDZDwGcAALOACIIID9BmAAAIgQgNiePgZ +gAD8GQAAwcbgf8HFz3CAAPRpBoADgCCAz3CAANyj4H8poOB44cXhxphwz3KAAEwkBYIggmaCyrgQ +uMq5BSEBgAGCyrsQu8q4BSMFAGeCAoLKuxC7yrgFIwcAaIIDgsq7yrgQuwUjBgAk8gAUDgAvKEEA +TiCDBwDYDyDAABJ9BCBDAaR+ZX4AHIAD2oKkfsV7eqJ5ggQgjgEEIMABpHvFe3mieIKkewQhQYNl +eBii3/XBxuB/wcXgePHAYgrP/DpwBYGggcq4ELjKvQUlDZABgSaByrjKuRC5BSEQAAHeG/IEJYCT +FPIvKAEATiCCB/AhgSCA4QDfDyePEAnyBCcAFEIgAIBgecogYgDmfYDl237o9WkCz/zgeOB/ANih +wfHA/gnP/KPBCHVIwM92gABMJBqG+4Y8hgR/JH+nf0HH0gqgBIog2ASKINgExgqgBKlxgOcX9IDl +bPQOCyAFCtiA4GbyCiHAD+tyz3AAAI0TiiNHAEokAAA9Ai/+CiUAAQQUATGA4RnyIBQAMQsgQIAN +8s9wgABMOGCAz3EAACRnDNhgewPaCfCA4Af0z3CAAEg4IIBgeQzYBhQBMYDhGfIiFAAxCyBAgA3y +z3CAAEw4YIDPcQAAJGcN2GB7BNoJ8IDgB/TPcIAASDgggGB5DdgEJ1CTC/LSCq//CtiKIBgIEgqg +BApxE/CA5RH0iiDYBAIKoASKIUcLegmv/wrYiiAYBO4JoATpcWIIAAC8pgjcVwHv/KPA8cDuCM/8 +CHYA3Yog2APOCaAEyXHPcIAATCRagDuARHkA2g8iggMEIkMAQiMDgMojYgAvJsfwAd/KIEEDB/Ic +gCR4qg7v/0V46XANAc/84HjxwOHFocEB2EDAz3WAAEwkCoVRIACADPKLcATZZ9o927YKYAwXuwqF +oLgKpekA7/yhwOB48cBmCM/8GnAodUh3aHY4Y2bZPdr6CmAMF7qB4An0CnDSCmAMqXHpcKIKYAzJ +cZ0Az/zgePHAMgjP/KbBKHUacmDAANgBHAIwAdgCHAIwAxwCMItweg/gB4HBgOUF8gTBCnBgfQXC +A8GA4Q70CiHAD+tyz3AAAIwT7tuKJMMPfQAv/rhzYHkA2EEA7/ymwOB48cDSD4/8osEB3s91gABM +JDqFG4UkeDyFBCEQAKoIoASKIJgDTCAAoDLyA/DbfgQggKP+8y8oAQBOIJEHFSVOFB2GXB1AFIDg +yiHBD8oiwQfKIIEPAACPE8ojgQ8AABwCyiQBBAQAIf7KJUEEDgyP/x2GQHi+C4//iiCYA0oIoAQq +cQDYDyBABAYgECBKDe//CnCKIJgDMgigBDyFlQev/KLA4HjgfuB4ANnPcIAAFDvgfzig4H7gePHA +/g4ABM9wAQC4aIDgCvLPcYAATCS4GQAAG4GRuBuhz3ABABxogOAI8s9xgABMJB6hG4GBuBuhz3AA +APhpgOAJ8s9xgABMJJQZAAAbgYi4G6HPcAAA/GmA4Aryz3GAAEwkmBkAABuBibgboc9wAAAIaoDg +CfLPcYAATCScGQAAG4GKuBuhz3ABAJhzgOAK8s9xgABMJNgZAAAbgZm4G6HRwOB+8cDhxaHBz3KA +ALi2z3WAAEwkF4UA2Q8hAQAYhSR4QiAAgMogYgCB4AHbANkP9AjYYMABHEIwAhzCMAMcwjCLcATZ +1g3v/4ojCAAI2ADZ/g3v/yhyANihBq/8ocDxwBoOr/wI2c9yrd7vvjoOIAI6cKoPIAAqcIPgSPLP +cIAA3KMDkE4gzwGH51AABgDPcIAA/BfGDWAA9CDAAwDeAN0E2BpwKnDpcclyCiSAD63e777yDSAC +qXO+DyAAKnCD4CbyQiBAIIDgAeUs9wHmhOao9wHnh+e4B8X/KnDPcq3e777CDSACENk2DyAAKnCD +4A7yz3Gt3u++rg0gAipwBg/v/ypwg+DKICIAzQWP/PHAbg2v/APapsEacLYMIA2DwQPBz3CAAEgZ +FBQHMADe8CBFAM9wgABQGfAgRgDPdYAAPAgO2MSlQMAE2EHAz3Ct3u++QsAEwgpwgNtKDSACmHPS +CSAACnCD4EDyA8PPcIAAaBlChfAgwQDApYDhDBUQEMGlCPLPd4AAcBnwJ8AQgOAG9MClwaUA2Rnw +hCoMA5IIYAAvcA4ggQ8AAAABIKUDwIQoDCPwJwEQeghgAC9wDiCBDwAAAAEhpQSFgeAN9ACFEXiM +IAeNwvfApTF5jCEHjcP3waUA2PkEr/ymwOB48cCSDK/8BNqmwdoLIA2Lcc9wAAAb0gDdqXGGDGAA +qXIAwc9wAAAc0nYMYACpcgDBz3CAAKQXAcIVIEEAAJECwQW6Sg1gAEV5A8CA4NwABQDPdoAAPAjS +2Ai4GdlCDGAAANrPcAAAItJAJgESagpgAATaz3AAACPSQCYBE1oKYAAA2s9wAAAg0oTBTgpgAADa +hcfPcAAAIdLpcT4KYAAA2gKGF9n+D2AMQCYCEgOGF9nyD2AMQCYCEwTAF9nmD2AMhMIFwBfZ3g9g +DOlyAoYA2XIPIACLuQKmA4YA2WYPIACLuQOmBMAA2Qi4Wg8gAIu5CHcFwADZCLhKDyAAi7kihjF5 +GeEFKX4AI4YvclB3MXkZ4QUpfgAvccwgRYCG9wPAAeUQdTIHzv8DwBB1xvcB2c9wgAA8CCSgANjB +A6/8psDxwFYLr/wJ2qnBCHaWCiANi3EaCe/8IcAIcULYLgxgAAW5DBQEMADByXAGwgolgA+t3u++ +QgsgAgLDig4gAMlwg+Aq8gDBBcLPcIAA7BcA3fAgQAAEwQq6BCKCDw8AAPzJuUV5+gpgAKlytgsg +EAXYIBQEMADByXAGwgolgA+t3u++9gogAgfDOg7v/8lwg+DKIEIDLQOv/KnA4HjxwJYKr/wC2qfB +mnD6CSANg8HPcIAAfHEAgADZRcDPcAAAEdKeCmAAKHLPcAAAEtIA2ZIKYAAocs9wAAAT0gDZggpg +AChyz3AAABTSANl2CmAAKHLPcAAAAUQH2WYKYAAA2s9woAC0D3AQFwBGCmAMAdgSCyAQBdi82DYL +YAAA2cPYLgtgAADZiiBECCILYAAA2YogBAoaC2AAANklxbXYDgtgAKlxiiCEBgYLYACpcQPYQMAE +3kHGz3et3u++QseKcATBA8Ie25hzSiUAAEomAAAKCiACSicAAI4O7/+KcIPg2vLPdYAAPAgIFRYQ +DBUSEA7YQMBBxkLHinAEwQPCHtuYc0olAABKJgAAzgkgAkonAABSDu//inCD4LzyCBUVEAwVEBAO +2EDAQcZCx4pwBMEDwuHbmHNKJQAASiYAAJoJIAJKJwAAHg7v/4pwg+Ci8ggVERAMFRMQA9hAwEHG +QseKcATBA8Lh25hzSiUAAEomAABmCSACSicAAOoN7/+KcIPgiPLChaOFKglgDC8gxwUEwc9ygABo +GQIhQKXPc4AAWBk1egCiAiMAJM9ygABwGTV6AKLD2jV7QKPPc4AAYBk1e0CjIvSyCsADCiHAD4Dg +63IP8s9woAD8RHQQBABkEAUAz3AAALETXQHv/YojSQrPcAAArROKI4kKSiQAAEUB7/0KJQABgOAd +9G4KwAMKIcAPgODrcg/yz3CgAPxEdBAEAGQQBQDPcAAAsRMZAe/9iiOJDM9wAACuE4ojyQze8QIl +gCXZYAIhQYQP8gIlQiQMehIMIAAvcATCAiUBIM9wgABIGVV4IKACIIAkuWACIcGED/ICIMIkDHrq +CyAAL3AEwgIgASDPcIAAUBlVeCCgANhJAK/8p8DgePHA/g0gAADYz3AAAA3SANkWCGAAANrPcAAA +DNIA2QoIYAAA2s9wAAAV0s9x8w///PYPIAAA2s9wAAAb0gDZ6g8gAADaz3AAAALSoNmaudoPIAAA +2gnYjLgA2c4PIAAA2hTYjLj/2cIPIAAA2gDYjLj/2bYPIAAA2hHYjLj/2aoPIAAA2gLYjrgA2Z4P +IAAA2gHYjrjPcQAA//+ODyAAANrPcAAAC9IA2X4PIAAA2s9wAAAN0gHZcg8gAADaz3AAABLSANli +DyAAANrPcAAAE9IA2VYPIAAA2s9wAAAU0gDZRg8gAADaANjRwOB+8cAyD0/8o8GLcQHdcg7gDKly +z3CAAFxwAIBBwATYCghgACzZDtgCCGAAANkhxrXY9g8gAMlxiiCEBu4PIADJcYogRgDiDyAAyXEA +wIDgzCCigMwg4oDMIGKBzCCigcwgIoLMIGKCzCDigsohQgMD9APZgeDMIKKAzCDigMwgooHMIOKB +zCAigswgooLMIOKCA/SCuS95hODMIGKBzCCigcwg4oHMICKCzCBigswgooLMIOKCA/SDuS95bg8g +AA/YANjdBm/8o8DxwOHFocGLca4N4AwB2s91gADspQAUBDDPcIAASBdAJQEfEtrqDSAAANsAFAQw +z3CAAEQXqXEB2tYNIAAC289wgABsFyRtHNreDSAAAMMA2I0Gb/yhwOB48cD2DW/8A9qjwbpwUg3g +DItxAcHPcIAA9BcA3/QgTgACwc9wgAAMGIDm9CBUAM9wgAA8COCg4aDMJqKQzCZikcwmopHKJcIT +AvQA3YHmzCbikMwm4pHMJiKSA/QB3YTmzCZikswmopLMJuKSAvQC3YYNz/+qcM9yrd7vvrYN4AHJ +cWIO7/+qcIPgdvIAwIDgzCCigVD0gObMJmKQzCYikUr0AsCA4Ej0z3CAAEgZtXhacOCgz3CAAFAZ +tXh6cOCgz3CAAGgZtXgacOCgz3CAAHAZtXg6cOCgz3CAAFgZtXjgoM9wgABgGbV44KCqcMlxz3Ot +3u++Pg3gAalyXgrv/6pwg+A48gDBABIAIIbhAdnAeQO5tXnHcYAAuLYAoQATACAEoQAQACAbeAih +ABEAIBt4DKGqcKlxyXIKJIAPrd7vvvIM4AGKc1YPr/+qcIPgEvIAwM9xgAA8CECBBL4GuNhgFSAA +BcdwgAD0tiGBQrAjsADY0QRv/KPA4HjxwKTBi3HeC+AMBNoAwAHBBLg1eM9xgACsFxBhbg0gAALB +AMABwQS4NXjPcYAAzBcQYVoNIAADwQDYpMDRwOB+8cChweoPIAKLcgDAocDRwOB+4HihweHF4ca4 +cM9wgADIvxAQBgDPcIAAmDoFgJhxgOChwYYk9w9z8s9wgACcagCA0HAN9M9wgACkagCAsHAH9M9w +gACgagCAkHBh8gAcQDEgwgEUgTDw3lMiwADEelMhxwAkflR6QC6NAbR9umIVes9xgAC4uEhh1H4I +c4Yj/Q97ezpiQYpleEhzhiP9D3t73WUVJc0RvmHCjmV6yXOGI/0Pe3u5YSOJZX4oc4Yj/Q9MJACA +e3tleRPyz3WqAOAHc4VRIwCABvJIpQmlKqXLpRDwCKVJpcqlK6UK8Am6RXjPcqcAFEgDogm5JX7E +os9xgACcagAZgAHPcIAApGoAGEABz3CAAKBqABgAAaHAwcbBxeB/ocDxwCoLT/wCDoADgOAQD8EC +AN4X8HDcAiUAE0QuPhcvdxYN4A0ncEIlAB4ODeAN+GAA2QAmgB+AAOo5IKgB5s91gAB8OmsVgJAQ +dqb3z3CAANBo5gzADc9xgACAOACBobiuuDEDb/wAofHAz3EAggEAz3CgAKwvPKDPcIAAbEUAgIDg +DPTPcIAATCYAgILgBvJ+DIAD0cDgfuoMQAD6COAFb9iA4Af0UgvgDwrY1gxAAPLx8vHPcoAAbEUg +ggZ54H8gouB4z3KAAGxFIIIleOB/AKLgeAQogA8AAC+6QinCdFB6RCr+AgIgQA4QeIDgBPIB4lB6 +g+BAsQP2gOAD9ADYAvCA2OB+4HjxAg/+8cAWCk/8OnDPdYAA+CoAhQHggeAApQr0AdnPcKAAyBwx +oMoK4A8ocBYOYAUH2Bpwz3agAOwn64aKD2AHKnALpgCFQiBAgAClBvTPcaAAyBwA2BGh6gpgBQpw +HQJv/Olw8cCyCU/8OnAodRpy0g1gBQfYUSCAoFpwBvJGC2AIyNhQIJAgTCCAoBzyC/ZMIACgEvJM +IECgI/QV2BO4DvBMIACkE/JMIACoGfQWC2AEKnAApRDwKdgSuPAgQAQApQrwK9gSuPrxz3CgAOwn +GYAApW4KYAVKcJkBT/wKIcAP63LPcAAAihN72wokQATBAa/9CiUABPHAIglP/Ah3OnGA4hpzAN7N +90h19CeAExUhgSNSD+//CnJhvYDlAeY291kBT/zgePHA9ghP/KHBCHeA4hpxAN7P90h19CeAEx4I +IACLcQDAFCCMI2G9gOUAtAHmNPctAW/8ocDxwMIIT/yhwRpwz3aAAPgqAIYB4IHgKHUApgr0AdnP +cKAAyBwxoG4J4A8ocLoMYAUH2Ah3Ng2gA7PYgOAV8otxwg8v/QpwABQAMQClAIZCIECAAKYG9ADZ +z3CgAMgcMaCGCWAF6XDBAG/8ocBRJMCA8cAF8ioPz/8D8OoIAADRwOB+4HhRI8CA8cAF8kIPz/8D +8AIJAADRwOB+4HjxwCoIT/wIdY7gAd7CJo0Tz3CgALQP/IAOCCAMANjJcKlxAdpCDGAFSHP+D+AL +73hhAE/88cDqDw/8OnAodRpyCgxgBQfYTCCAoFpwH/IO9kwgAKAV8kwgQKAo9BXYE7gVIEAEoKAd +8EwgAKQV8kwgAKgc9CpwxglgBKlxEfAp2BK4FSBABKCgC/Ar2BK4FSBABKCgBfDPcKAA7Ce5oK4I +YAVKcNUHD/wKIcAP63LPcAAAiRNK2wokQAQBAK/9CiUABOB48cBeDw/8CHc6cYDiGnMA3s33SHX0 +J4AT8CGBI1YP7/8KcmG9gOUB5jb3lQcP/OB48cAyDw/8CHeA4hpxAN7N90h19CeAExoIIAD0IIEj +Yb2A5QHmN/dxBw/84HjxwAIPD/wacM92gAD4KgCGAeCB4Ch1AKYJ9AHZz3CgAMgcMaCyD6APKHAC +C2AFB9g6cH4LoAOT2IDgGfKwfUAojyGBvxC9pX/PcKAA7CfmoACGQiBAgADZAKYG9M9woADIHDGg +xg8gBSpw+QYP/OB4z3GAAKAsI4HPcoAA8AcyIYMPAAAfAwGiMiGBDwAAGQNhskhwILII2XPaHtul +AOALGLvgePHAz3CAAKAsA4AJgFEgQIHKIGIAdAki/8ohIgDPcYAA2AaKIIwMLg/gAyCRkgwv/gHY +0cDgfuB44H7gePHALg4P/Ah1KHYghUIhAYDKIWIAgOEA2AXyHgjgDalwAdgkhYDm0CFiAM8hIgDQ +ISEAzyFhAIDgJKVUD6INyiBCA1kGD/zgePHA5g0v/IoiBA7PcIAArAYAgM92gADQriaAQCYAFEIM +oAwE4QGGz3WAAKAsIobIHRgQz3KAAMwvyR1YECGWJ6ogjgQggA8ABgAAgOAB2MB4IaoGqgDeEgsg +Cslwz3CAAP0qLg/v/sCoZgqAA4DgCvLqCoADgOAG9MILL/7JcCrwz3CAAAArJIAggUYO4AOKIEwM +iiCTAToO4AOp2QLYwg2gAQHZagmgDwLYI4VIgTSRUyIAAGINYAoB24ogjA4SDuADs9kA2Z65z3CA +AKAzIKCBBQ/88cCw4OHFCHWD9rnlzPYKIcAP63LPcAAAmiEi25h1gQVv/bhzQiUAHF0FL/wPeOB4 +8cDeDC/8mHBBgeS6sIk78nKJz3aAABDj8m32f+ZmNMr2vggRhQBJIMAACPLPdoAAUOW2fsGOA/AA +3sdwgABQ5bZ4BIgIIwMACCODAwAjQAFJIMMDFm11eM9zgADQ5gNjz3CAAFDmtnjPdYAAoCykhbiF +AYCleAQggA8AAAAIBnsC8GOB6LuYGcAAAN0J8qQRAAAA3Ze9kbiUuKQZAABRJACAHPLPcIAAoCzE +gMC6yIYEJo4fAEAAAD6+HubYekV7/ruYGcAADfKkEQAAhSUBFIy4kbikGQAAnBlAAx3w/7sS8qQR +AgCFJQEUlr2YvY26kbqkGYAAnBlAAySAEIGeuBChC/CUvZa9nBlAAySAEIGeuJ+4EKExBA/84Hjx +wL4LL/wD2M92gABgOCCGQHmA4G3yIIZgeQTYgOBp8iCGYHkA2Ge4i+AK9zMmAHCAADBuQCcBchR5 +AHkA2ELwz3CAAGg4IIBgeQHYgOAB2MB4OPDPdYAAaDgghWB5AdiB4BHyIIVgeQHYg+AL8iCFYHkB +2ILgB/IghWB5AdiB4N71Adge8M9wgABoOCCAYHkB2IXgAdjAeBTwz3CAAGg4IIBgeQHYgeAB2MB4 +CvDPcIAAaDgggGB5AdiD4AHYwHiB4BfyIIbrdWB5ANgacM9wgABoOCCAYHkB2LhwN9gKIcAPqXKU +220Db/0KJAAENQMP/OB48cDOCg/8z3WAAAy1IBWAEIHgz3aAAOAGCfQA364K4AvpcALYA6bkpgPw +AdgFpoogzAiKC+ADKIX9Ag/8z3CAAAy1KIDPcoAA4AYveIHgBfQC2ASiA/AB2AWiYQPgA4ogzAjg +ePHAagoP/M91gAA0CACFgeAO8gohwA/rcs9wAACHJ4ojRAZKJAAA1QJv/bhzz3aAADAIQIaC4swi +4oHKIcIPyiCCDwAAiCfKI4IPAAAaAcoiwgfp9YLiOPTPcYAA+gdgic9xgABO0YQrHwAyIUEOUSEA +gAnyz3GAAAy1IBGBAIHhD/QYuhC4BSCBAIUhDADKCuADiiCLAAPYAKYA30PwugrgA4ogywgghgCF +GLkQuAV5hSGIAKIK4AOKIIsAAtgApgClMvDPcYAADLUgEYEAgeEA3yz0z3GAAPoHYInPcYAAXNEY +uoQrHwAwIUEOgOEQuAV6CfLPcIAA/AcAgIYgOY8J8k8iAQJSCuADiiCLAAHYxPFPIsECQgrgA4og +iwAI2ACm4KWtAQ/8iiBLCioK4ANIcc9xgAD8B4ogSwkaCuADIIEAhkCFGLgQugV62/HgeM9wgAAk +sCiAz3KAAOAGL3iB4AX0BNgEogPwAdgFoukB4AOKIMwI4HjxwPIID/zPcIAAVB4KgIDgD/LPcp8A +uP8dos9xgADgKgSBAeCzuLW4uLgEoRaiz3CAADAIABAEAM92gAA0CAAWBRBMJACBzCVhgMoiwgfK +IIIPAACJJ8ojgg8AAFMBJAFi/cohwg/PdYAACAgAhQDZz3eAACjRDyEBAM9wgAAECECAJnogF4EQ +geFAoBH0QCwBBkAtAAQleEAsAQIFeYogiwA+CeADRSFBAQXYI/DC4c9ygADERQmCDPKMIcKBB/KM +IYKCBvKAuAbwRSDAAATwRSBAAQmiQCwABkAtAQQFeUAsAAIFeYogiwD2COADgbkC2ACmiiBLBOYI +4AMghYogSwTeCOADKIfPcIAA4CoAgFEggIIG8gDZz3CfALj/PaA5AA/8gOAA2soggQAR8s9yoACw +HwHbeaLPcoAAACtIgmCCAiNCAHBxwiJtAEJ44H4NyMdwgAAczjSIAeEveYThNKgDEgI2jPbPcAMA +hACgGgAAiiAIAAYaGDAL8IogEAAGGhgwz3ACAYQAoBoAAIogBABNAOADANnPc6AAsB8B2lmjz3OA +AAAraIOA4GCDBfIie3Bwg/cA2ALwSHDgfuB4z3KgACwgcIKA4AryAiNCANdyAIAAAAb3UHCG9wDY +BfBwcH73AdjgfvHACg/v+5hwpcEod7hzAN4EI4AP/wAAABi6BXpveQi5/9gIuGR4KLgFeUV5CN30 +JIADJ3hEwD4PoA0QFAAxEhQCMWG9QCgBBAV5R3lEwRAUAjEUJIAzgOVAsAHmKfdTJcIFQKcAFA0B +B9kH8BB9FCdMEAC0YbkUJEAwu3tPvQCQpXuB4XB7eGAy9wQggA8AAAD/ELgFekCn2Qbv+6XA4Hjx +wDYIAAD2CAAACgkAANHA4H7geM9xgAAcM0AhAANVIcIFUHBG9wDZBBhQAFBwvffgfuB48cB2CCAH +ANgSCy/9ANjPcIAAcGnqCw/9z3CAAFBp4gsP/bYKj/6CDgAJANhSDyADgNlKDkAN5gjAApIIwA2+ +CsABOgwAAwDYEgnv/ghxz3CAACwkAIhRIICACPLPcaAAwB0AgaC4AKFeC8ALjgwAA64MoAH/2DYJ +gAGKIIUPCHEODeAFCHLRwOB+4HjxwK4N7/uKIP8Pz3WgADgux4UHpc9woABULguA07gGJgBwDwD/ +/yIJ4A4W2aYKAALHpekFz/vgePHAsg/gBgHYTgov/QHYog2AD9HA4H7gePHA4cUA3c9wgAB8B6Cg +z3CAAOimrLA6D6ANqXDKCA/9tgngDKlwyg8ABOYOj/2iCIABiiAGCghxegzgBQhyhg8v/KlwUg8P +/IkFz/sA2c9woADsJyug4H7xwAYN7/sD2c92gAAsJPYJ4A7JcKCORCVAEYXgDfQKIcAP63KKIEcN +dNtKJEAAZQUv/UAtBRIBjoPgxPZjuAGuwgsAAS0Fz/vxwOHFpMGLcLIJ4A4E2c91gAD4KgCFAeCB +4AClCfQB2c9woADIHDGgXg1gDyhwAIVCIECAAKUH9ADZz3CgAMgcMaB6CwAB7QTv+6TA8cChwYtw +agngDgHZYgsAAaHA0cDgfuB48cChwYtwFgngDgTZAMBRIECAjAwiB8ogogAAwFEggIAYDIIMAMBR +IMCAfAmCBwDAUSAAgagLQgd6DOANAdjPcYCu4AHscCCgAcjscQChz3KAABSkiiSBfQDZqCAAAvAi +QwDscGCgAeEyCyABANihwNHA4H7xwOHFo8EB2EDAz3WAAEwkqXCWCOAOXNlqCM/+OoUbhSR4PIUE +eYHAvggv/0HBAcA7hQR5QcGaDKADiiBYBFUlQB86CS//qXHPcIAAxCUuCS//QCUBG4twggkgAQTZ +ggkv/wHAAIWA4AX0BYWA4NgKAf/KD4/+5QPv+6PA8cDhxc9wgACkbwCAosFBwIHAAd1SCOAOqXGK +IBcKNgygAwESATYhwoogFwoFFIEwELoiDKADRXlAxYtwIgkgAQTZnQPv+6LA8cChwYtwGgjgDgHZ +AMBRIMCBLyQHAAAcADEM8gcSBTYKIcAP63KKIMUAhQMv/SfbiiAXCtYLoAMBEgE2BgjgAUDY3gkA +AeINwAehwNHA4H7xwNIKz/vPdYAAuCoChSOFAd4QccB+qXC2D6AOA9myCQABgOYD8gKFAvAAhRED +7/sDpeB44H7gePHA4cXPdYAA0CqpcE4PoA4Q2QAVBBBMJECAEfJMJMCAH/JMJACBE/IKIcAP63KP +2I24mNvxAi/9uHMBhQy4BCCADwEAAPABpQvwIYXPcIAAMEUgoCOFz3CAACIjIKgDzNdwAAAAQAHY +wiAKABe4x3AADgAAg7iduJ+47HEAoQESATbscCCgVgkgAQHYgQLP+/HA4cUA2c9ygADgKiCiIaIi +os9w0P4AAASiABYNQKCiABYDQP+9YaIAFgBAABYAQBDy/7tA2M8g4gfKIIEPAADQAM8g4QfPcZ8A +uP8doQbwz3CfALj/PaADzNdwAAAAQAHYwiAKABe4x3AADgAAg7iduJ+47HEAoQESATbscCCgyggg +AQHYVgzAAvUBz/vgePHAABYCQKHBQMIBFIAwUSAAgAbyz3GAAHCmBfDPcYAAOLZAoWCJAdoH8AAW +AEAVIYwAAKQB4n14EHL591EjAIAJ8gAWAEED8ADYFSGMAACkAeKF4rr3A8zXcAAAAEAB2MIgCgAX +uMdwAA4AAIO4nbifuOxyAKIBEgI27HBAoG4IIAECiaHA0cDgfuB48cDhxc91gABQCKlwog2gDgjZ +AIXPcaAAuB4CoQGFA6HKD8AAPQHP+8EHwADxwKTBi3B+DaAOENkDzNdwAAAAQAHYwiAKABe4x3AA +DgAAg7iduJ+47HEAoQESATbscCCgAMBRIACAA8AG9ALB0g4gAQDaBfAaCqACAcG2D8AApMDRwOB+ +CQAAAAUAAADxwF4PwADBBkAM4HjxwOHFtMGLdalwSg2gDhTZAMCG4Mwg4oEG9CoMYAOpcAhxJPCC +4Af0Ag1gA6lwCHEc8IHgBvSGDmADqXAIcRbwg+DMICKCB/QeC2ADqXAIcQzwhOAG9J4MYAOpcAhx +BvCJ4B70iiGEAAPM13AAAABAAdjCIAoAF7jHcAAOAACDuJ24n7jscgCiARICNuxwQKAGD+AAKHA1 +AO/7tMAKIcAP63J82I24d9uLu0okAAA1AC/9CiUAAeB48cDhxaLBi3WpcJIMoA4C2Y4OYAOpcIYO +wAD5B6/7osDxwHYPj/sAFhBAocFMIICgyiHGD8oixgfKIIYPAACPDMojhg8AAIwFyiQGBNwH5vzK +JSYAABwANIt1qXA2DeAABNmKIMwKIgigAwpxhCgIKS93ACeOH4AARLIuCWANBG7PcIAAKLQagBJw +EfIkFoAQgOAk8qlwBNmZ2h7bNglgCxi7ANgkHgIQGPDHd4AAOLILh4G4C6fPcIAA4AYvgIDhAdoF +8kSgBNgG8ADZLKBJoCSgBdh2DoADIQev+6HA4HjxwOHFz3CAAAArJIAggZoPYAOKIMwNz3CAAKAz +AIAEIL6PAMAAAAn0z3CAACCwAIiMIMOPBPKuD2/9AdjPdYAA0K6pcHYLoA5S2doMAAijhYogTA5S +D2ADqXFiDcAAiiCMDkYPYANq2QYOIAGpcAhxz3CAAMBlxghADf7Zz3CAACCwsQav+yCo8cDPcIAA +wLQqC6AODdkmDcAAPgrABtHA4H7gePHAAg6v+4ogzA6iwfYOYAOKIQUGi3ACC6AOAtkDFJEwTCGA +oI/2BBSFMAohwA/rcs9wAACEDIojhQltBu/8CiRABAIUgDDPdoAA4AaEKQgpL3cgHgIQz3CAAFyy ++WAsiUAgEgOA4QAUFDEAINMDHPKKIEwNjg5gA4ohBQyKIEwNgg5gAypxtgqgAUIkgCEB2BG2/9gh +HgIQQCYAGHIL4AAE2WvwANgRtiEeQhTPdYAASLBAJRAS/WWLcKlxqgwgDALaQCUAEhYKoA5CJIEh +ACeAH4AASLAIEAUAz3CAAHjrBYBTJUEFEHHKIcYPyiLGB8oghg8AAIUMyiOGDwAAhAGkBeb8yiRG +BKoMIAgqcEokgHAA2aggQASEKQgJL3AyIgIggOII8ggVBRAwIAQgDCRAgSbyAeFAJgAY1grgAATZ +AdkMG0IghxUAFoC4hx0YEC4LoAMocIogTA2qDWADiiHGCIogTA2eDWADIoWKIEwNkg1gAypx4QSv ++6LACiHAD+tyz3AAAIYMHQXv/IojxgUAFgBAgQPAAPHA4cXPdYAAHNCpcHIJoA4D2QGFz3GgAIAl +DKEChQ2hAI1RIACAANiOuATyD6ED8BChTgvAAMEEj/vgeOB+4HjgfuB44H7geOB+4HjgfuB48cAq +DK/7BNmjwQDfQsfSCaAOi3A+2AYNYAMBEgE2Ptj6DGADBBQBMT7Y8gxgAwYUATEDzNdwAAAAQAHY +wiAKABe4ACCBDwAOAAAGFAAxG3gT4AQggA8AAPz/JXiduJ+47HEAoQESATbscCCgAMHscCCgBBQB +MexwILAGFAEx7HAgsAYUBDFRJACADfIBEgU2CiHAD+tyz3AAAE8mIQTv/GnbAd3PcQAAIiJyDGAD +PtiGCiAEqXACwSV4QsAAwFEgAIDKJaIQyiGCDwAAMzNMDGIDyiCiD89woAAsIEAQEAAC8AHnBhQA +MRB3gAAKAILlBBQAMYLGFvQbeBB4yXFOCyAEqXLscQCpBBQAMclxG3gB4BB4NgsgBKly7HEAqQjw +yXEqCyAEqXLscQCxBBQAMUAgRQDPcKAALCAQgC8lSAECIAAE13ABAKCGmgfl/wQcRDEIFAQwCiHA +D+tyz3AAAFAmXQPv/IzbvgkABM9woAAsIDCAPtimC2ADAiEBBD/YmgtgAwLB7gngAALAAQOv+6PA +4HjxwAAWhUCmwUwlAIYAHEIxRPZMJQCCTfYKIcAP63LPcAAAZhmV2wUD7/xKJEAAABaAQAEcAjAA +FoBAAhwCMAAWgEADHAIwi3C2CeAGgcECwoDiD/QAFIUwCiHAD+tyz3AAAGcZn9vFAu/8iiTDDwTA +YHoFwQPBgOEL9AohwA/rcgAUhTDPcAAAaBmj2+3xAcCA4OMgQgDKICIAAgnAAKbA0cDgfvHAz3CA +ANRA7g5gDgnZSg2ABWoJgAXSCYAF3gjAANHA4H7gePHAz3CAANhCyg5gDgfZxgjAANHA4H7gePHA +pcGLcLYOYA4F2QDAUSAAgBXyz3CAAKAsA4AYiIHgDfQA2Jq4z3GgAMgfD6EBwKQZAADD2Bq4DqGC +CMAApcDRwOB+OQSgBgDY4HjxwM9wgAA4RSoOYA4o2WIIwADRwOB+4HjxwOHFABYAQILgz3WAAEwm +AKUf9ADZz3CfALj/PaAc2RXwz3CgAMg7NoBEIQIHNoCGIf8IJXo2gIYh/whFec9yoACoIE2C5OKR +94Dh6/UKCMAAIIWE4V4ADQAzJkFwgABgbkAngHI0eAB4OBAEAFgQBQAKIcAP63LPcAAAmSFpAe/8 +L9saC6ADVNhRIECAE/LPcYAAbEUAgYG4NgzgDgChCfBaCm/+Adg6DoADA/ACDsAEHQGP++B48cD2 +DUAJmg+AANHA4H7gePHAWgzgCQDYz3CAAKAsyBABBsC5geEB2cB5/g+gDjwQgADRwOB+4HjxwOHF +z3WAAKAsAIXEEAAGUSBAgQ3yCiHAD+tyhdiNuIojnA9KJEAAzQDv/Lhzyg1ACyoKYA0B2M9wgADo +LwiIh+Ae9AGFxBAABlEgQIEY8uIND/3PcYAAeOsEkCWBCrgwcA7yCiHAD+tyhtiNuIojXQJKJAAA +gQDv/LhzdguP/GIMYAwA2EIIgAPeDoAAUQCP++B48cD6DOAJANjqD4/8z3GAAOS/AolGD6AOIInR +wOB+4HjxwKLBi3ByDGAOCNkAwIDgz3GAALhFAKEH8gYUADEDsQQUADECsY4OgACiwNHA4H7xwHoP +b/uB2KHBYMAA2AEcAjADzM92gAAwCAIcBDCKIIsHTghgA2TZiiCLB0IIYAMghoogiwfPdYAANAgy +CGADIIXPcKAALCBAEBEAAIaA4A/yz3GAAPwHAIGBuAChz3GAAMRFA4EB4AOhAdgC8ALYGnAAwMoI +7/sKcc93gADERQMSATdel4HYYIbyDeAOCiQABM9woAAsIBCAQB9AFEwggKARp0gfABRS8gCGiOAZ +9M9wgAB8aNoIAA02Dy/+FNgaCSAFBNgghkCFiiCLABi5ELqeDyADRXkA2ACmAKWF4APyANgF8ACF +hOD99QHYLyYH8A/y0g+gAxTYgOAJ9M9wgABgaCaAI4EggfoIAA0AhoDgBPIA2AbwAIWA4Pz1Adgv +JgfwBfT6CsACgOAQ8oogCwA+DyADn9nPcIAA/AcAgC8oAQCuCG/9TiDAB40Gb/uhwOB48cAmDm/7 +gNihwQMSATdgwM9zgAAwCGCDz3WAAMRFAhxEMC+lKHJKIAAgARwCNPoM4A4KJAAEz3CAAOwyEBAF +AFElgIAM9AAUBDAKIcAP63LPcAAAdidpBq/8Z9vPcIAAMAgAgIDglAICAJYJQAuA4IgCAgDPcIAA +2EIAgFEgAIF4AgIAiiAKD5IOIAMBEgE27g6ACs93gAD6BwCPhCgfAAAhgH+AAEzRSgpgDoohCw9g +jwohgC+AAGjRhCsfAAAhgn+AAEzRBZKGIH8MHHhTIICACPTPcYAA/AcAgYa4AKECilEgQIBo9IQr +HwAAIYB/gABI1P4JYA4Y2QCPhCgfAC9wNCENIEIlBBaMJAeBzfcKIcAP63LPcAAAgSeQ26EFr/yK +JQcBz3aAAITU2GDGCWAOiHEAj89xgAAMCIQoHwAyJkUeACZAHkwlAIAAoQ3yCiHAD+tyz3AAAHcn +ldthBa/8iiSDD6GIz3GAABAIQCWFEEwlgIhAJYIfQKnM9wohwA/rcs9wAAB4J5vbMQWv/Iokgw/P +cYAABNESC+ALqHIAj4QoHwA0IUEuz3CAAPgHILAg8BwSBAGMJAiAzPcKIcAP63LPcAAAiyek2/EE +r/yKJQgAhCsfAAAhgH+AAEjUEglgDohxz3CAACjRIBgABADZM/AAFgJAhCsfAAAhgH+AAJjXMOA1 +eECgABYCQQAhgH+AABjYMOA0eECwABaAQAAhjX+AADjWUmlUerpiEKoRqhKqABaAQBSqFaoWqgAW +AEEAIYJ/gABU2DV6GrIAFgBBAeEbsmCPhCsfAAAhgH+AAEzRQ4hQcYwH5f8vdQAlgR+AAMjXACWC +H4AASNjqC8AHUg0v/hTYOg7gBATYQI8ByM91gAA0CIQqHwAAIYF/gAAI2QChz3CAADAIIIUAgBC5 +GLgFeYi5YgwgA4ogiwAB2c9wgAAwCCCgAB0AFB4Nr/sAwAoJwAKA4HwLAg8DEgE3z3OAADAIYIOA +2ChyOgrgDkokQAAj8ASFAeAEpc9woADUAxyQTghAAQDA3gyv+wLZAxIBN89zgAAwCGCDgNgocgYK +4A5KJIAACgggCwLYiiBKD+YLIAMA2U0Db/uhwPHACiHAD+tyz3AAADAliiOMB4okgw9pA6/8SiUA +AOB48cDhxSDbz3GgAMgcaaEAFgBAz3KgABAUDKIAFgVAAd1MJQCAyiHBD8oiwQfKIIEPAAAsJcoj +gQ8AAAkBIAOh/MokQQMYGkABaBlAAQPYD6K5oWqhegmAAO0CT/vxwOHFrcGLdalwag8gDg3ZAMAd +eFMgAQBEKT4NqXAAIYF/gACI4Z4J4AsN2kYJgAC5Am/7rcDgeI0F4A4A2OB48cAyCm/7iiCSDazB +EgsgA8XZi3AeDyAODNkAFAAxgOAv9M91gABgOCCFz3aAANw7YHkA2IzgQCSPMBHyIIVgeQDYkOAL +8iCFYHkA2JHgB/IghWB5ANiS4AX06XDJcRjaBPDpcMlxLtpGCMALAdhgHgIQF4aA4CQMofvKICEA +ABQAMYHgF/SKININlgogA97ZQCSAMM91gADcO0AlgRsSCOALLtoB2DeFYR0CEIHh7AuB+4IIgADl +AW/7rMDxwGoJb/sX2bfBbg4gDotwI8BKIkAgUyDQAIYg/gNMIACkQigRAQwcAjSP9gohwA/rcnLY +jbiKIw8DCiSABMkBr/wKJQAESBQFMCDAQCiOIM91gAAQ49Z+USAAgMBlQS1PA8C/vmaGIPcPXvSA +4A30CiHAD+tyc9iNuIojzwSJAa/8CiQABIogTwUKcUIIYAWocgHAAsEKckoMb/tmboDgPfLpcAIM +oA4KcQ0UgDCFIMEADRwCMIog/w9TwACGqbgAphLAhiD7Dyi4D65KJAB0ANmoIAAD/9q4YUAogyB2 +exLgeGBAqAHhCnD+CqAOi3HPcIAAoCzwIMEDwBEABg8gAATAGRgAD46B4Af0gOfMIKKjkA7CDgHf +AvAC36YKYAIKcAfwgODKJ4EUyiciEoHnUAICACCGz3CAAKAsA4AYiCh1geCGJfsfEfLeDYACgOAg +hhryz3CAAOgvCIiH4BT0QSlAA1EgAIAO8hPA6LgSwgryhiL7D0EqBAJPjpByBPKouFPAE8ASwgZ5 +RHgleIDlAKaGIPsPC/KA4MogAQTKISEABA6hA8oi4QMOHkIUANjPcYAAUOYWIQEEQIYAofW6AaEF +9ADYi7gBofa6BfIBgUUgAAYBoUINr/yLcA0UgDBRIECBIfJYFAAxBbZaFAAxBrYFloDgGfJqDYAC +gOAQ8gaWUSBAgAnyYg9v/ApwKg7ADgXYEq4A2AW2B/AKcADZhg2gAw/aDRSAMFEgQIB+8lAUBTEC +lh7aLyFKATB5JHgvKQEAAiJAABB4QCgBISV4z3GgAMAvohEBhhB4EPAvLUEQAiJDAwDdDyXNEKZ5 +z3WAAGDh9CXNELFwCPKA4fH1z3AAAP//B/BweM9xgACotmSx13AAAP//MPLPcoAAIOC0aLtiBBME +ACODBSE+gSbyz3Gg/hAHz3afALj/NqbPcaAAwC8VeSoRAIYWEQCGoGIKIcAPFqYBg+tyFqYCgxam +A4MWpgQTBAAMEwUAkdiNuBUHb/yKI5IHTCUAgAQeRBEU8gDdENg6cAKWESBAg8ogAgTKIUIDkAyi +A8oiQgNCIUAggOAB5TH3DRSAMFEgAIEG8gpwKgkgAVUUgTANFIAwUSDAgBvyNcFWFAIxCnD2Cy/9 +EsOMIAKAuHAN9AohwA/rcnTYjbiKI5IPnQZv/EokQABRJcCByiciEc4KoA4KcAPM13AAAABAAdjC +IAoAF7jHcAAOAACDuJ24n7jscQChARIBNuxwIKASDWAA6XAZBi/7t8DxwKoNL/uKIFMJpMEA3alx +Cg0gBalyz3aAANDqAI5KJEAgoa4CHgIVAeAArqOuoaaipqSmpaa4rrmuAcC6rgLBB6YDwCimCaYB +2GYO4AKpcYHAcgogDgHZAcAHplp1uPCCwGIKIA4C2QGOAsEB3+OuAeABrgPAKKYJpulwMg7gAulx +AsCLclYOb/sDwQQgAAUvJAcgAtkCrgDAI64BphIO4ALpcEwkAKCQ8gDBz3KAABDjSiMAIBJpFngA +Yg8jUyAtuFMgEACKIFQFUgwgBQpyz3CAAHwHABARAC8lyiTPcYAAfAf4rgQlQCQAoQPZI64QHsAU +FB4AFAgeQBQDprIN4ALpcM9wgAB8BwCAgOAO9EwhAKAK8gYPoAQg2ATZI675ro4N4ALpcAXZI66C +DeACAdggwHYP4AAQ2QDAArgWeAAggQ+AABDjorGKIAgAAKEG2SOuWg3gAgHYAMAA2ZYKoAMP2gDA +gNkCuBZ4x3CAABDjKKgpqAfZI642DeACAdjPcIAAoCzwIAIEz3OAAFDmwBIBBgQhQAXAGhgAAMIA +2c9wgABw4lZ7IKMho1R4CgvgDqCwgOAK8o4KwA4I2SOu+q7uDOACAdhAIlIgIcBScJAGzf8J2SOu +1gzgAgHYA8zXcAAAAEAB2MIgCgAXuMdwAA4AAIO4nbifuOxxAKEBEgE27HAgoDILYACKcArZI66e +DOACAdjlAy/7pMDxwIogVQsA2fYKIAUocgYPgAuWCkAA0cDgfuB48cDhxQAWDUADzAHa13AAAABA +AcjCIooAF7rHcgAOAAAKCOALUyUBEFElQJDPcYAA4EcB2MogIQDJAy/7AKHgePHAocGLcEYIIA4B +2QAUBTBMJQCAC/QKIcAP63KJ2I24Rdu5A2/8SiRAAM9xgADwzQMZQgFALYADAqFKJMBwANqoIEAC +ANgPIIAACyBAgQT0AeIE8A64AaHyCUAAocDRwOB+4HjxwIoJgAfPcIAAoCwsEIQATCQAgQn0yRAA +BlEgQIEF8gYPwAEQ8EwkQIAM8s9wgADoLwgQhQBMJcCBzCViggb0cg5P+9HA4H4KIcAP63LPcAAA +7BwhA2/8X9vgePHAcgoP+wAWEkEAFgBBz3GAABDjQCqAIBZ4MCEFAKLBTCIApEEtQANTIBMAjvcK +IcAP63J12I24iiMYAkokQADZAm/8SiUAAFElQIIM8gohwA/rcnbYjbiKI1gCvQJv/AokgATPcIAA +UOUWIIAEGnAaD+ANAtnPcIAA8OEWIIAECg/gDQLZQCqVIQAlgC+AANDm+g7gDRDZi3DyDuANAdkA +JYAvgADQ5pIO4AYQ2QEQgCCQ4I72CiHAD+tyd9iNuIojmApKJEAAUQJv/AolgAQA3RDYOnAVJUAj +z3GAANDmMCEUAAQkgq8AAAABBBwANU3yRCQOJiO+AeYEJIAvBgAAADG4IcHfYKDh0SThojrygOIE +8oHmC/cEJIQvAAAAJAwkgI8AAAAkLPKC4FQADQCC4Ab0gOIm8oLmJPSA4gXyzOFAAAkAz3CAAGg4 +IIBgeQbYEHYW989wgACgLPAgwATDEAAGAdkEIL6PAAYAAAQkgC8AAAAIwiFBACu4EHFE9wDYA/AB +2A94A/AB3+lwBCSBLwEAAMAuuc9ygAA0filiMHcB2cIhTQCA4MwhIoAY8kIhQCCA4CAH7f8B5QIQ +gCDPcYAAnHMIYYHgHPIKIcAP63J52I24iiMZADLxCiHAD89wgACgLPAgwATrcoojWA/DEAQGeNiN +uCEBb/wKJQAFAxCAIAhhguAJ8gohwA/rcnrYjbiKI5kCEvFCDWAOSnDPcIAA8OEWIIAEIJDPcgAA +GBUJIYEAVg8gACCwhQAv+6LA4HjxwAAWgUDPcIAAbGogqAAWhEAAFoFAz3CAAHVqIKgAFoBAUCS+ +gcohwg/KIsIHyiCCDwAA2hTKI4IPAACBB5gAYvzKJSIAz3CAANgGAJCA4AXyHg4ADiINAA7uDgAA +0cDgfuB4KQDgDQDY4HjxwN4P7/oA2UokAHLgeKgggAIAFgJAFSJAMA4YmAAB4QAWDUAAFg5Aeg3A +Dc9woAAUBKygz3CgANQL3KCeDgAACQAP+/HAkg/v+gjZosEBEg42z3WgADguHBUQEEIM4A2LcAAU +BDAA3wQkvo/w/wAAyiHCD8oiwgfKIIIPAACmKMojgg8AAOEG4Aci/MolwgBRJECCyiHCD8oiwgfK +IIIPAACnKMojgg8AAOQGvAci/MolwgDnpTYI4A4/2ADABBQBMQelsgrgDYK5HB0AFA4OIAABGpgz +ZQfv+qLA8cAA2GoNIAAEEoEwBBKFMAohwA/rcjjYiiMPAXEHL/xKJAAA8cDhxc91gACAOKlwgCAH +D44L4A0E2XYMQAKA4Afyz3CAAOgvCIiJ4A7yCiHAD+tyz3AAANQbfttKJAAALQcv/AolAAHPcIAA +oCwhgMQRAAZRIECByiHBD8oggQ8AANYbyiOBDwAAfwDKIsEH5vP+FQAXgODD9o7gyfYKIcAP63LP +cAAA1xuA29jxyBEABoYgf44F9FIIQAAP8ACFkrgApQvIrrivuAsaGDALyIe4CxoYMHIKD/smDQAA +mQbP+uB48cAaDs/6z3aAAIA4AIbPdYAAfDlRIECCBfJWDEACgOAj8gDYCK0B2AmtVSbAGO4K4A0L +2VUmwBhWJsEVLg1gCwvaCI3Pd4AADDlEKD4LBm8yIEAOgeAB2MIgAQAKrQCGibgAphTwCI0pjTBw +BfROIEEAL3kprc93gAAMOVUmwBhEKT4LJ3CWCuANC9lpjQNvRCs+CzIgQA6K4MohyQ/KIIkPAADR +G8ojiQ8AAGoBqgApAMoiyQeC4Mohyw/KIIsPAADSG8ojiw8AAGwBigArAMoiyweB4AHZ0/ZCIEQA +CiQAcShwqCBAA0QrPgsAJ0EeFXlGiSKJMHIn8gHgD3jOCkACgOAd8s9wgADoLwiIieAH8ojgFfQA +hlEgAIIR9NIKj/yC4AXyygqP/IHgCfTPcIAAJGkGgAOAAIDCCU/93gsAAEEFz/oKIcAP63LPcAAA +0xuKI0UMSiQAAFEFL/wKJQAB4Hh5B+AFAdjgeHkAYAkB2OB48cD6CmAC4cWA4M91gACAOA70BBUE +EAohwA/rcs9wAAC+G4ojBgQRBS/8uHMAhYi4AKVVJUAecgngDQXZ9xWBEM9woADIHBqACrnKuBV4 +OGCZIAoARB0YEM9wgADoLwiIh+Al9M9wgACgLACAxBAABlEgQIEb8uwVABHPcYAAeOslgQq4MHDK +IcIPyiLCB8oggg8AAMQbyiOCDwAAngHKJCIAlAQi/MolwgCOCcAK7g2gDALYfg/P+2oI4AsA2EoM +wALmCgAAWQTP+uB4AQFgCQHY4HgZBKANAdjgeB0HYA4B2OB48cChwQDZQMEAFgJAABYAQIHiGvID +zNdwAAAAQAHYwiAKABe4x3AADgAARSAAA524n7jscgCiARICNuxwQKDscCCgH/BOC2AGi3ADzAHZ +13AAAABAAdjCIAoAF7jHcAAOAACEuJ24n7jscgCiARICNuxwQKDscCCgAMLscECgigogAChwocDR +wOB+4HjxwDYL7/oC2c93gACEatoI4A3pcECHz3agAOwnz3WAAGg44LpL8iuGRCKAAIYi/w4iuqG5 +FLq0uQUggwBleSumBCCADxAAAgAEIoIPEAACAM9xgAAABkV4C6EghQTeYHnJcIfgC/IghWB5yXCG +4AfyIIVgeQHYgeAR9ACHz3GgAMgcUSBAgAfyAdgeoeoNgAYF8ADYHqG+CUAGIIVgeQHYheA19ACH +USDAgDHyz3CgAEQdxaDDoMSgKfDPcKAAyBwB2T6gC4aBuAumrg2ABiCFYHkB2IXgE/TPcIAAoCwD +gAiAUSAAgAvyANmUuc9wgAAABiugC4aUuAjwz3CAAAAGANkroAuGtLgLpi4JAACRAs/64HjxwM9w +gAAcIsoPoA0C2RYJAADRwOB+4HjxwA4K7/oA2gh1KHbPcKAA1As4gEIhAQiA4cohjABAJgASEHHE +DEUOA8zXcAAAAEAB2MIgCgAXuAAggQ8ADgAAB24EIIAPAAD8/yV4nbifuOxxAKEBEgE27HAgoCK+ +BvDscQChBOVhvoHmAIU69+IIAAAJAs/64HjxwOHFz3KgANQLA92xogDbcKIDEgI313IAAABAAdrC +IooAF7rHcgAOAABFIgIGnbqfuuxzQKMC2hQagjAFEgM27HJgogsSAjcB4gsanDDscgCiARICNuxw +QKDscCCgz3CgALAfAdk5oM9xgAAAKwiBQIDscECgDIEAgF4IAADPcaAAyDsOgYi4DqGBAc/64HgD +zNdwAAAAQAHYwiAKABe4x3AADgAATyCBAJ25n7nscCCgz3CgABQEA9kloAESAjbPcKAA1AtNoM9w +oABEHTWg4H7geAPaz3GgABQERaHPcaAA1AsNoc9woABEHVWg4H4D2s9xoAAUBEWhz3GgANQLDaHg +fgPaz3GgABQERaHPcaAA/AsMqc9woABEHVWg4H7gfuB44H7geOB+4HjgfuB44H7geOB+4HjgfuB4 +z3OgAKggMYPPcoAAHDMDgjhgA6IB2BKj4H7gePHANgjv+rhxz3CAACi0aBAEAEogACBMJICAyiLG +B8oghg8AAJEMyiOGDwAAtwecACb8yiHGD89wgADgBgeAhCwICQAhgX+AAEiwTCUAgBZ5x4E+9M9w +gACkM7IIr/yKIQ8Pz3CAADgzogiv/CDZz3ClAAgMoIBTJU2QE/KB5RPyguUU8gohwA/rcs9wAACS +DIojnweYdTUAL/wKJQAE/9gG8P/YCLgE8P/YELjPcYAAAAYMoa2hzqEA2ZG5z3CgANAbMaAKCuAM +Adgf8M9zgAAABg6DgOAb9M9xgAD4dM9ygACkM891gAAcM4okw38KcKggwAIPYRUlwxPng/AiDgAB +4P5mx6OVB4/6OBMEAAohwA/rcs9wAACTDIojHwytB+/7CiUABOB44cXhxs9woAAUBAPZI6ANyM9y +gAAQz2GSz3GAAADOxIoUIQ0AaLUAIIMPgAAgzjjhwKtighV5BpJgoQMSAzbAHQQQBIKgEwEAhiHD +DyV4oBsAAMHG4H/BxfHAvg6P+gh2YgwgAih1gODRJWKTAdgD9ADYBLjPdYAAmOsUeAllgeEdZQr0 +9g2gDKlwmgqv/QGNANgArQGF7Qav+gCm8cASDwAJ4g3gCwDYz3CAAOgvCBCEAEwkwIET8kwkAIIV +8kwkQIIa8gohwA/rcs9wAADKG7vb0Qbv+0olAACqDk/8ugxADtHA4H7PcIAAgDgAgFEgAIIF9GIK +z/v18foLT/zGDk/8C8iuuK+4CxoYMAvIh7gLGhgwRgrP+uXx4HjxwPoNj/rPcYAA6C8Mkc91gACg +LN6VDiYOkM9wgABgOg6QyiZiEAyxAdhKDiAAANlKC6AIAdiWC0/8geAY9ACFxBAABlEgQIED8oDm +EPIB2Ahxigkv/QhyC8iQuAsaGDALyAUggA8AAADUCfALyK64r7gLGhgwC8iHuAsaGDDCCc/65QWP ++uB48cBaDY/6DRIBNs93oAC8Lc9wgACgLC6nBIAA3UYQEQFWIFIEViCTBA0SEDdWIBQFRiDAIAMS +AjYNGhwwpBIAAIS4pBoAAAGSosGA4IYaRAMI8s9wgAAAz/QgQACA4AnyAYLuuAX0UCAAIC8gCCBT +IH6gSgMBAM92gADgR2kWABYB4AQSAzZpHhgQpBtAAwGSgOBK8s9wgAAAzjR4gBABB4DhQvTQEAEB +UyHBgBT0chIBAeCSIn+4EoEAIn/wf+AYxAOkEgEAhiHzjwbyaL/wf+AYxANwEg8B4BAAASGS4njx +cMInDhDCIc4DdBIAAThguBKBAHQbRAOgszhgEHiQGwQAvhsEABCKEKsBggGjCIoIqxKKANoSq5a6 +MvAmDyACiiAFAQ+H97j680+H9rpTIsACJvKO4En3pxYAFra6AeCnHhgQHPBkuAQSATYQeJAZBAAE +IoAPAAAA8Cy4dBlEA6CxEKmhsQPIvhlEA2GAqKmGI/8NhLthoRKIEqn2uj4CAQAA2Ja49boEEgE2 +pBkAABLyAg9v/gDYBBIBNqQRAAAEIIIPAgAAAC26BSICBC8giCBA8AGBUSAAgVLyNMpQiUkgxADy +as9wgAAQ4/Z/4GD2uHKJB/LPcIAAUOVWeAGIAvAA2AAkjw+AAFDlVn/kjwgjwwMIIwAASSDDAxZq +dXjPc4AA0OYAY89zgABQ5lZ7QYPPc4AAoCxkg3iDZXoEIoIPAAAACEZ4mBkAAADYlrj0uEGBhiL/ +DR/ygOJS8pgRggBAIgApSGDPc4AAULZAwCDCw7pcevQjggBW8AohwA/rcjTYjLhf2wW7iiSDD5ED +7/tKJQAAmBEDAOm7nBlAAyPygOKAuKQZAAAs8pgRgADPcoAAoCxDgoYg/wNEuDIkACCJuEDAIMNU +gmR6hiP/A4Yi/w5Eu3piT3rPc4AAGHT0I4IAIPBRIwCCCvKA4grymBGCAEAiAClIYA3wgOIF9ADa +SHAQ8JgRgADDuBx4MiMAIEDAIMLPc4AA+LXDulx69COCAIgZAACYEQAAhBmEAJARAQGuCCAAANoE +EgE2AxINNoQRAgGCGQQAz3OgAMgfWGAQeLAZBAD4EwIAsBUPEUJ/z3KAAKAsRIIAIdEjVBIEAQAk +TwQfZ6ATAwDwf3B3OAANAFCCmBUDEAsiwIAW9DCJUI0wctEjIoIW8oYj/wkjuwHjgePQ9wK6z3GA +ABDjVnpBYfG5CPK4FgAWAeC4HhgQDfCAcBB4hh0EEGoWABYNGhw0AeBqHhgQ9QGv+qLAocHxwKIJ +j/oIdUbA6L0ocNAAIQBIdgO4QCCQBUQlAhYjugQljx8GAAAAAeJBL0AUBCWBH8AAAABYYDa5z3KA +AAB+qXPGuyliCGI4YEEtgRJSIQEAwLkDuRjhheDKIY0PAQCJDdUhDgAvIUggBCWBHwAAABjPcIAA +qHbXcQAAAAgeACIA8CDAACbBoOESAAEAz3FCe9BeBSh+AAogwA4KcQUpPgAKIMAOgOckuAHgBfJT +IAEAOGDtvQIpgSMP8s9ygADkd0CSBSo+AAAhgH8AAP8/LrhdACAAGWFZACAAFXlRJUCSVAAhACbF +t+UgAAsAM2hTJQIQz3CAAGB08CCAAAUpPgAKIMAOAeAH8IrlwCjhAMAoogDPcYAAoCwjgcDaNIGk +eYYh/w4iuTp62noZYjB4CNzTAI/6M2hTJcAQHHjPcoAAKHjwIgAAFuEFKT4ACiDADgHgFNmDB+// +2nngeM9xgAAAKySBQSiCBdW4IIFBKYMF1bkCec9wgAB462J6BYDJugUovgAncc9wgABwaQOAAIDg +fzhgz3GAAAArJIEggUEogwXVuEEpggXVuRBxW2NK989ygAB460WCWWECeQHjA/ACeUArgAWZB+// +JXjxwHIKj/rWD2/6UNlFwEogACCuDS/+hsVMIAClBBUBFE73BcDXca3e774VIAAEIKBAIFAg8vUk +3AcAj/oKIcAP63LPcAAAixOKIwcLmHMhAO/7CiUABOB48cDhxYLgmHC4ccr3CiHAD+tyfdiNuAEA +7/vw289wgACgLPAgAQGKIwsNTCUAgEAhAgZ4Yib0qIF6YqCiSYFBoFyJSKhdiUmoKhGCAEqoKxGC +AEuoLBGCAEyoTZFHsFeRSLBIgQQigg8ABgAAgOIB2sB6UqhUkVOoKIHAuS2oHPBMJUCAGvRiYkih +QYBJoUiIXKlJiF2pSogqGYIAS4grGYIATIgsGYIAU4hUsUeQTbEIkBexSQdP+gohwA/rcpDYjbhV +B6/7iiOEB+B48cC6Dk/6z3aAAIA4VRYBFlYWAhYwcqTBSPeIFgAQAiGDAHhgiB4AEIDhDvKA4gz0 +VxYAFjhgVx4YEFgWABY4YFgeGBDPd4AAkAYAh4DgAN0D8lgeWBNYFgAWQ8JAwFcWABZCwRDZvtpB +wItwHtuGCCAKGLtWHlgTVR5YE6CnpQZv+qTA8cA2Dk/6z3aAAIimBBYFEEIlQQCF4UwBLQCiwTIm +QXCAABhuQCcAcjR4AHgC2ACmAdnPcIAAtCogsNYPoAkocAKGz3WAAHgqKIVHhQgVBBAPIEAAAqbP +cIAAWCo1eECgGBUFEQwVBhDPcIAAfEEA2TSoz3AAAEi4QMAFhRAVBxBBwBqNO41AhdoN4AphhYog +GQGSDiACOo1h8M9wgAC2KgHZIKjPcIAAeCongM9wgABUzS+gJg8v/QLYUfAE2ACmANjPd4AAtCpG +D6AJALfPdYAAeCoChkiFZ4UPIIEAz3CAAFgqVXhgoCKm7NiiDGAEQJcIFQQQz3AAAEi4GBUFEQwV +BhBAwAWFEBUHEEHAGo07jUCFTg3gCmGFJBWAEEiFANlRIACBBIYPIYEACfIB289ygAB8QXSqBXkk +pgPwJngEpr4JYAQA2KPxog4P/AfwiiAZAc4NIAIihkUFb/qiwAgWBBAKIcAP63LPcAAAQh9VBa/7 +iiNEB/HA4cWKIBkAog0gAq3ZAd3PcIAAiKagoADYz3GAALQqdg6gCQCxtgwgAKlwCQVP+vHA4cUA +2M91gACIploIIAAApeoML/0C2CKFz3KAALQqd9jGC2AEQJLdBE/68cBiDE/6AN7Pd4AAtCrAtyoO +oAnJcM91gACIpsKlw6XEpYogyQDJcZILYARAlwHYmQRv+gCl4HjxwM9xgACIpgARBQBMJUCBjPcK +IcAP63LPcAAAQR+Z25kEr/uKJIMPAaHPcIAAoCrwIEABQHjRwOB+4HjxwO4LT/rPdYAAiKYEFQUQ +TCVAgKLBJfJMJYCAEPJMJUCBbPIIFQQQCiHAD+tyz3AAAEQfSQSv+4ojRwbPcIAAtioB2SCoz3CA +AHgqJ4DPcIAAVM0voD4NL/0C2FDwBNgApQDZz3CAALQqILBaDaAJKHDPdoAAeCoChUiGZ4YPIIEA +z3CAAFgqVXgipWCgugpgBIoghgsIFgQQGBYFEc9wAABIuAwWBhBAwAWGEBYHEEHAGo47jkCGYgvg +CmGGJBaAEAHfSIYA2VEgAIEEhQ8hgQAJ8s9ygAB8QfSqBXkkpQPwJngEpdIPIAQA2IogGQHqCyAC +Oo4E8KoMD/xZA2/6osDgePHA6gpP+s92gACIpgQWBRBCJUEAhOHmAA0AMyZBcIAAIG5AJ4ByNHgA +eAKGz3GAAHgqSIEngQ8ggAACps9wgABYKlV4IKBZ8M9wgAC2KoDZIKjPcIAAeCongM9wgABUzS+g +Lgwv/QLYR/AKlowgAoAR9ADYz3WAALQqSgygCQC1IoaKIAUEvglgBECVAdgApjPwA9gApjHwA4aM +IMOPAd8S9ADYz3WAALQqGgygCQC1IoaKIEUK4KaKCWAEQJXiCw/8G/AA2Q8hAQAChgYgQIAS9ADY +z3WAALQq6gugCQC1IoaKIIUMXglgBECVsgsv/OCmA/ACpl0CT/oIFgQQCiHAD+tyz3AAAEMfcQKv ++4ojRgDgePHA4cXPdYAAiKYEFQUQQiVBAIXhkAANADMmQXCAAChuQCcAcjR4AHjPcIAAtiqA2SCo +z3CAAHgqJ4DPcIAAVM0voDoLL/0C2CzwAoXPcYAAeCpIgSeBDyCAAAKlz3CAAFgqVXggoB7wA4WM +IMOPAdoI8gDZDyEBAAKFBiBAgA70z3CAALQqQLAmC6AJAdgD2PoKL/wApQbwAqUE8AHYAKWtAU/6 +CBUEEAohwA/rcs9wAABFH7EBr/uKI0gL8cAeCU/6CHaKIFkB+gkgAslxz3WAAIimw6XaDO//Bdgj +hc9ygAC0KqDYSghgBECSWQFP+vHA3ghv+oogmQHPdYAAiKbCCSACIoXPcIAADLUIgADfJ7jAuBN4 +xrgB4Aq1CNg6cADeAoUPJs4TCyYAkDfyBIULIICDHvLGeASlz3CAAAy1IBCAAIHgFvLPcYAAfEEQ +iQHgD3gQqYogCgVqCSACyXHPcYAADLUIgYYgww+AuAihiiCZAU4JIALpcc9wgABYKhUg0AMAEAAg +gODiIAIAAoUA2QAYQCDGeAKlQiFAIIDgAed+B+3/738qlYHhz3aAALQqAJYL9IDgEPQA2c9wgAB8 +QTSoiiAKBAXwgOAG9IogSgTyCCACANkBhYXgCPIAloHgA9jKICIBxgvP/0EAT/rPcoAAiKYiggDb +DyMDAGZ5IqLPcYAAWCoA2hV54H9Aoc9zgACIpkKDDyJCAEKjz3KAAFgqNXrgfwCi4HjxwK4PL/oZ +cQh2iHXPcYAAeCoaqRsZAgJAoRAZwAEMGYABoqEDwBgZRAEExQehJsCooSQZAgAHwGGhBaGKIBkC +VgggAqlxU9jJcboOIASpcibAUSAAgAnyV9jJcaYOIASpcgbYBfCB5gLYyiBiABYLz/+pBw/64Hjx +wCoPD/o6cM92gAD4KgCGAeCB4M91oADIHwCmBvQB2FEdGJDaD4ANpBUQEM9wgAAUOyaAz3eAAMi/ +YHkA2AGHgOAq8iTYGNnWD6ANM9qB4A7yBBcFEAohwA/rcs9wAAB0GcDbXQdv+wokQAQk2AHZrg+g +DTPageAO8gQXBRAKIcAP63LPcAAAqyjF2zUHb/sKJEAEpBUBEIogGA+CD+ABAiEBBACGQiBAgACm +BPQA2FEdGJDVBg/68cB+Di/6iiAYDs92gADQRFYP4AEyhs9wgAAUOwSAgOAJ9M9xAACtCz4P4AGK +IBgOPfAyhuTh1/bPdYAAmGoAhdrgUfaKIFgOHg/gAQTZQIUyhoogmA4Qug4P4AFFeQTYGvDa4UYA +CgDPdYAAmGoAheTg3faKIFgO7g7gAYohPw9AhTKGiiCYDhC63g7gAUV5iiA/DyIIgA0ghUgWABEQ +uaoO7/8leBKGAKVBBg/64HjgfuB44H7geM9wgAAsQ0CI4LoI8s9xoACsLxmBirgZoVEiQIAH8s9x +oACsLxmBjrgZoeB+z3GgAMg7HYGA4AjygtgUoc9wAIARFA6h4H7gePHA4cW0wYt1qXDPcYAAxG8u +Di/6UNoeDMABUgngAalw0QUv+rTA4HjPcIAA3M9siM9xgADopowjAoAKkUEoAgMM8uu4CvQCu3Z7 +x3OAABDjApMPIIAAArMA2OB/DLHgePHAGg0v+lRohiL4A08iQwJTIcIABSLEAM9ygABw4hR6j+GK +Iw8MyiApAAn2AJIA3Q8lTRCKI88PpngAsgDZSiQAdM92gADAqc9ygAA4qs91gAA8qqggwAQUIkAA +5JBkf5B3DPQA3+SwFiZAEOCg4aBAJQAZNXjgoAHhCQUP+uB48cAA2p66ANnPcKAA/ERBoOB4IaCC +DOAJKHALyAQggA/+//8DCxoYMAvIh7gLGhgw0cDgfvHAagwP+kh2gOAB3UT2iiX/HxN4gOFE9rN9 +M3kUIQAAAg4v+jt5rHgAHkAeqQQv+gHY4HjxwOHFCHIB3YDhyiHBD8oiwQfKIIEPAACbE8ojgQ8A +AFwAyiQhAJwEYfvKJQEBgOJE9lN6iiX/H4DhRPYzebN9FCGAAKoNL/o7eax4XQQv+i9w4HjxwOHF +z3WAAOimz3CAAKAsI4BAhQCBEHIf9AKRQpUQchv0AoViC2/7I4WMIAKAFfLPcoAAeAchggDbDyMD +AAK4ZnkWeCGiACCBD4AAEOMAgaq4iLgAoQDY/QMv+gy14HjPcJ8AuP/PcaD+SAc2oM9woADIHzyA +QBAABs9wnwC4/1gYAAhKJMBxz3EAAAiBqCAAAinYErjwIEAAAeHgfuB48cDhxc9wAAD//891gAAE +pwOlz3CAAGRnMg2AC89wgACAZyoNgAvPcIAAKGgeDYALz3CAAERoFg2ACwDZIKUF2AGlIqWKIMkD +4gvgAYohzARaC+/8BthWC+/8CdhZAw/6B9nPcqAA1AcaGliAgOAO8hkSAYYJIEMADxIBhgIgwIB5 +YQ8aWID29eB+4HjxwLIKD/oDEgM2CHcNEg42z3GAAADOEIvPcoAAEOPUeQK4FngFYjGJLb2A4Vhg +wL0L8iGD7bkJ8s9xgADYK7R5oJEQ5aCxJZCA4dH2YbklsBCLMmg2eTtiZZOA4zpiB/QmklEhQIBA +CkL7KgrADO4MoAYNyAPIAdmgGEAAz3EPAP//7gggAOlwkQIP+vHAHgov+gPYz3agANQHEx4YkA8W +EZYAFgFAABYNQKLBz3Cw/gAA07kFeUDFz3KfALj/NqJTJcEUJXgWoiDAnOAO8gohwA/rcjXYjLjP +cwAA9AyYc2ECb/tKJQAAABYPQPB/ABYQQEDnUSAApcAnohAD5wQnjx8AAPz/B/DPcAAABQ16DIAB +GRYAlkInARQQcTb3ACHAIw8eGJAD2CAeGJAZFgCWiOCT9x8WAJZBwCHAnODKIcIPyiLCBzbYyiOC +DwAAEQ3PICIDxfXa2EYK4AGpcQQggC8AAABApQEv+qLA8cA+CS/6yNqCJAMyCHUods9xgACIcPYJ +L/qLcM9wgABUHg2AgODPcZ8AuP8M8h2hz3KAAOAqBIIB4LO4tbi4uASiFqHPcKAAFAQB2kSgz3KA +ANhIGILivQHgGKLPcKD+EAEWoUAuABSleBahyiAiALAOwf8acA3Iz3GgAGQuz3KgADgu8CEBANO5 +B4IkeAQgkQOs8I4Oz//PdoAACPIacMlwmg1gBItxqgrgDclwnvAD389woAAUBPCg5KAAFgRABxoY +MQAWBUABGlgxBMqc4B70i3ByDeAMDtkkwOG+UyDBAIYg/gNEuMQcAjBkwUQmjRQZ8o7YUSYAkZC4 +oBwAMGvyhtiQuKAcADBn8Otyz3AAANwOz3MAAPQKvQBv+wohwA9MIACgB/KM2JC4oBwAMFPwArk2 +ecdxgAAQ40CBSHSEJAyQDfJRIkCCCPKL2JC4oBwAMAHdQfCI2JC4+vFOiVBwkdjPICIE9PUBwPq4 +CPIB3ZDYkLigHAAwL/AzFIAwIpERIQCAFfIHyAQggA8AwAAA13AAwAAAC/QiwIDgyiCJDwAAjQCs +B+n/zyApBArBjCH/jxHyz3CgACwgEIAieNdwAIAAAMoghQ8AAIcAhAfl/88gJQRMIACgzCUhkFz1 +z3CgABQE46BMIACgqXZi9VMmfpAH8s9woAAUBAmAgOBY9eG+M/JMIQCgAdoq8ipxLyhBAE4ggweU +48olxRCF92h1gCXCFM9woABoLPAgQAOU4w94yifFEIT3aHeAJ8IRz3WgABgs8CXNE7FwyiIiAIDi +CvIA2A8gwAAGIQGA2vUB2APwANiA4CTzNQfv+YAkAzLgePHAzg7P+RpwEgkgAjDYmHApuFEgAIDK +IcIPyiLCB8oggg8AAOkUyiOCDwAAxwA0ByL7yiUiACzYJgkgAkAogSAB3oolDxrWCCACMNiYcCm4 +USAAgAvyjCYPmifyQg9gDQHYYb2A5QHmL/eyCCACNNhPIAEFlbnqCCACNNieCCACLNgIdZYIIAI0 +2PW4uHAY8gohwA/rcs9wAADrFOPbxQYv+0okAAAKIcAP63LPcAAA6hTU260GL/tKJQAAdQbv+UEt +ABTxwAoOz/kIdwDeyXDOCSAFyXED2Ml1gOcacAryRC0+FwAhgH+AADBm8g9AC4DnCvJELT4XACGA +f4AA2GbeD0ALQiBAIIDgAeUn989wgADAtMl0nbAwvJ6wz3CAADgIsgigBsCgCQbP+fHAVgtAAYDg +EPLPcIAAgDgAgFEggIIK8s9wgAC0aJYPQAsmDiALANjRwOB+8cDqCS/94cXPc4AA4EfPcYAAFGpA +gfQTDQBQdQDYivf4EwEAMHIG9/wTAQAwcsP3AdjBBc/54HjxwM91gACEBnzYJg6gASCFABUEEAoh +wA8BEgU263LPcAAA2w6tBS/7j9vgePHAxgpAAYDgMPLPcIAAgDgAgFEggIIq8s9wgAB8OWiISohE +Kz4LACGAf4AADDlVeAaIgeAA2Rr0z3KAALRoBoIDgGCAAoJieIDgyiBLAAXZCrkwcEr2BoIDgCCA +x3EAAAAUNg9gC0hw0cDgfvHAngzv+QPYrsHPdqAA1AcTHhiQDxYQlhkWAJbA4L73ABYBQAAWD0DT +uc9wsP4AAAV5z3WfALj/NqVTJ8EUJXgWpe94nODKIcIPyiLCB8oggg8AAEAAzyAiA8ojgg8AAJgM +yiTCANQEIvvKJSIAi3A6CeAMDtkGFAExABQAMVEhAIHAIKIAA+AEIJIPAAD8/wvAgOBWIhEiEPIa +pSzAG6UCwB6lz3AAbAQAGaUG8M9wAAC1DMoOQAEZFgCWUnC59wAhACQPHhiQA9ggHhiQ4NjGDKAB +6XEBwAQggA8AAABAGQTv+a7A4HjxwLYLz/kIds9woABkLvAgjQPTvQ0SEDYNGpgz9dgFuC4O4AHJ +cQ3Iz3GgABQEAN8KoZINIAnJcFpwAdjPcQAAECfPcqAAyB8+ohDZLqIVGhiATCIAoEohACAPIZEj +0PcLIEDEBPRRIwDA/PMLIEDEBvKqDu//AedSd7T3CyBAxBf0USMAwCTyE/AvKEEDTiCBBwDYDyBA +AEAuPpUGfQDYBPRAKT6DA/IB2OoOwAGA5e31CiHAD+tyV9iMuIojnwFKJAAAjQMv+wolAAENGhg0 +9dgFuHoN4AEKcQ3Iz3GgABQECqEtA8/58cDOCs/5z3CgAFQuK4AH3dO5LyhBAE4gjwfPcKAAwC+l +EBKGFBARhs92oAAUBKqmZg0gCYDY89gFuIDZKg3gAZ+5DRIQNvXYBbgeDeABqXGqpg0aWDME8APY +BaaphoDlG/KA5frzQS2AkAryLyQJcOB4qCCAAQAWAEDgeFMlTZAJ8i8kSXPgeKggQAEAFoBA4Hip +hufx89iKDOABBbj/uOH19dgFuMIM4AEKcSgeABSU5w0aGDTKIcUDhffpcYAhwgHPcKAAGCzwIEIA +lOfKIcUDhffpcYAhwgTPcKAAaCw1eAS/QKDHd4AAzN8VhzaHBXkXh7iHJXgFJQ2QyiHCD8oiwgfK +IIIPAADCIcojgg8AAI0HyiRCA1ACIvvKJSIAgNnPcKAA0BswoM9woADAL6UYmIQUGFiE8QHP+fHA +ignP+aQRAAAodVEgAIAK2MogIQSYFQEQBCG+jwEAAMB2HQQQMPTouRbyRCEABiO4QWgEIYAPBgAA +ADG4WGAEIYIPBgAAAddyAgAAAcogoQAD8AHYgeAP8oLgCPKD4ADYyiDhAcAooQML8M9wgADwzQKA +BfDPcIAA8M0BgAV5mB1AEJ4VABGUHUAQkh0EEIIVABGQFRERsh0EEADYgB0EEH4dBBADyM92oADU +B0GQgOIQFZIQCvINyM9xgAAAz/QhAACA4BPyGRYAlrjgT/cNzM9xgADYSEYggAINGhwwGoEB4JcC +IAAaoQ8WFJaA4gnyDcjPcYAAAM/0IQAAgOAD8gHYBfAD2BMeGJAA2AcSDzYBEhA2ABYEQHpwBxoY +MQAWBUABGlgxBMqc4MoiwgfKIIIPAADcDsojgg8AAPQK7AAi+8ohwg+pcFYNoAwO2UwjQKAP9ATI +AZCA4CHyz3GAAExKGoEB4BqhHIEB4ByhF/ADyAGQgOAT8g3Iz3GAANDO9CEAAFMgwIAL9M9xgABM +ShqBAeAaoRuBAeAboQMSATYBge64DfJUEQABUyDAgAf0z3GAAExKGYEB4BmhAhUFEUwlAIAU8gGF +7rjKIcIPyiLCB8ogogvPICIDyiOCDwAAtQdIACL7yiRiAACVsHDKIcwPyiLMB8og7AvPICwDyiOM +DwAAuAckACz7yiRsABCNUyDBAIYg/gNEuMQdAhCkFQAQ9rgwrSL0BxICNgIiwQOB4QDYB/ICJ4EQ +jCHDjwL0AdiA4BT0DczPcYAA2EhGIIACDRocMBmBAeAZoQ8eGJUHGtgzARoYNInwBxrYMwEaGDQA +2HQdBBB+CmAAqXDPcYAACH4LYXQVAhHPcYAAEH7wIQAAemJQeqQVARB0HYQQJXikHQAQBMgBkIDg +FPJMI0CgDfQBlbgVjxBYYCCV+GAQeL4dBBBZYT9nDfC+FQARCvAglbgVgBBZYThgEHi+HQQQCHeQ +HQQQDxYAlrQdBBCqCuAFqXAQjTJ3zCCBhBLyCiHAD+tyQCkNJEAoDgQw2Iy4ANuLuwUlxBMRB+/6 +BSaFFKQVABAIdIQkGpAl8lEgQIIe8gPIAZCA4BryDcjPcYAAAM4UeYARAAeA4BL00BEAAWoVjxAB +4MO4+GAPeGodAhASDuAAqXBqHcITBfAGDuAAqXAPHhiVZQaP+eB48cASDo/5GnAA36QZwAPPcIAA +oCwEgNCJ8KAHyAQggA8AwAAA13AAwAAAKHUW9A3Iz3GAAADOFHkRiYDgDvTPcIAA8OHWeCKICI0Q +ccb2CnDyCK/9qXHh8FEgAKCG8gQVBBBRJACBQPINyM9ygAAAzhR6ERKFAA94SSDCAHJuz3CAABDj +dntgYPa4Mo0H8s9wgABQ5dZ4AYgC8ADYx3KAAFDl1npEigghgQAIIQEAACFAAUkgwQMWbjV4z3GA +ANDmAGHPcoAAoCxEgs9xgABQ5tZ5WIIhgUV5BCGBDwAAAAgmeAPwA4XPcYAAoCyYHQAQJIEogQQh +gQ8AQAAAPrlTJAIAHuE4ekV4/riYHQAQC/KkFQAQjLikHQAQUNicHQAQe/D/uBPypBUAEI24pB0A +EM9wQAFQAJwdABDPcIAAoCwkgBCBnrgQoWfwBdgUuJwdABDPcIAAoCykHcATJIAQgZ64n7gQoVnw +USBAp0fyAYVRIACBN/IyjTQSgjBJIsIAcm7PcIAAEON2e2Bg9rgI8s9wgABQ5dZ4AYgD8ADYx3KA +AFDl1npEigghgQAIIQAASSDBAxZuNXjPcoAAoCxEgs9xgADQ5gFhz3CAAFDm1nhYggGARXgEIIAP +AAAACAZ5AvAjhZgdQBANyM9ygAA4zhV6IKKcHcATBfAF2BS4nB0AEFEgAKUH8gDYkbikHQAQA/Ck +HcATA8gBgM9xoADAHey4AIHQIOIAzyDhAAChdB3EE0YPIACpcM9xgAAIfnQVAhEJYVlhMHl0HUQQ +z3GAABB+8CEAAKQVARAleJgVARBRIUCCpB0AEAryCtl2HUQQeB1EEIC4pB0AEBbwENnPcoAAoCx2 +HUQQQ4JIglEiwIAI8grZeB1EEIO4pB0AEATweB1EEM4Lr/ypcKQVABBEIH6CjBWBEBnyz3KAAKAs +Q4JUgiR6hiH/A0S5hiL/Djpiz3GAAEB09CGRAM9xgAAYdPQhkgAN8MO5z3KAACi2PHn0IlEAz3KA +APi19CJSAJgVBRBTIASAyiCCBBb0iBWBEFElAILDuTx50SAihQfyz3CAAFC29CBAAAbwz3CAAPi1 +9CBAACGFUSHAgAXyhB0EEAPwhB3EE1ElAIIN8kQlAQYjuQHhBCWADwYAAAAxuBlhAvAB2QPIAZCA +4CTyDcjPcoAAAM/0IgIAgOID9EGVuBWDEHQVABEEJb6PAQAAwHhgGmJQer4dhBAO9AohwA/rcizY +jLiKIxoJBQPv+ookgw9AlefxgeEd8oLhzCHigMohwg/KIsIHyiBiC88gIgPKI4IPAAC1BsokIgDU +AuL6yiUCAc9wgABQ5dZ4A4gG8M9wgABQ5dZ4AoiMFQEQDrgleIwdABDPcIAArAYggAaBoBAABoDg +B/TPcIAAdGoAiIDgXfINEgM2huNZ8gCVr+DPcoAATEqiAAwAz3CAAADOdHgRiIDgR/RMJACAQ/RR +IACgPfKeFQARz3OAADhKirieHQQQFpMB4BB4FrMByOeiBaKYFQAQrrivuLC4mB0AECaBoBEBBi8p +QQBOIYIHQSrBAA7hDyBAAKQVARCYHQAQtLmkHUAQnhUBEae5nh1EEM9xgABoagChBCCAD///0/aY +HQAQDdiYHQIQCfAQ2AbwCNgE8ALYAvAB2AeimBUAEL4VARGSD+/+ANqkFQIQBCK+jwAAADCCHQQQ +UvKMFQAQnBUBEZQdABCSHUQQ7LqAHYQUAxIDNgryFNmQHUQQKnF+HUQQeBMOAQrwDtmQHUQQfh3E +E3gTDgFKccJ5MHmyHUQQz3GAAKzNIIGGIX+PDfSYFQ4QUSZAkgn0YZOA4wX0kbqSuqQdgBAQuSV6 +pB2AEAQggA8AAAAQz3KAAKAsZIJSIAADMIMleBCjRIIQggQggQ8AAAAQPXkleBCiFPCYFQEQgB3E +E5QdQBCeFQERfh3EE5IdRBC+FQERsh0EEJAdRBCAFQARfhUCEYIVAREaYoQVABFZYThgEHiwHQQQ +pBUAEM9xnwC4/xahnBUAEBahgQCP+eB48cAuCI/5lgyP/M9wgADczwyIz3GAABDjArgWeABhLbhT +IACABfTPdYAA4EcN8M9xgACgLCCBxBEBBs91gADgR1EhQIEE9AHZ3B1AEM9xgACgLPAhAADPcoAA +QGkgghiIg+FGAC0AQR0YEDMmQXCAAFhuQCeAcjR4AHiqCGALA9g2CGALQNgA2OAdABAN8M9zoACo +IDGDAoIA3sKiOGDgHQAQAdgSo/UHT/ngePHAmHC4cRR4OGDPcYAAhHMIYYwgw4/KIsEHyiCBDwAA +rBPKI4EPAACLAeQHofrKIcEP0cDgfuB48cDhxQfYDRoYMM9xoADUBxoZGIAOEQ2Gz3CAAFQeSICA +4gcaWDMQ8s9wnwC4/12gz3OAAOAqRIMB4rO6tbq4ukSjVqDPcKAASCy+oB8RAIYBGhgwBMqc4Mwg +go8AAJEABfIAFgBAABYAQAPMz3GfALj/GKGKIEYEug8gAQESATYBEgE2fdgaDmADBxICNjEHb/kE +yvHAuHECuc9ygAAQ4zZ5MCJEAFEkQILKIsIHyiCCDwAAyyLKI4IPAACTAxgHovrKIcIPQC2BAc9y +gADQ5iFiUSFAgooiCAXKImEDz3GAAFDlFiFBASKJDrlFeSCg0cDgfvHAVg5P+c9ygAAAK0SCz3WA +AASnYoVAgja7NrpQc9YijQ8AAIAAwIU9Yn5msXbO9wohwA/rcoogjQKKIxAEmHahBq/6uHUeZrF2 +//dYYHUGb/kOIIAD4HjPcIAAnAcggM9wgADYfuB/8CBAABR4OGDPcYAAoH7gfwhh4HjgfwHYz3CA +AKhj4H8AgOB4z3GAAAhH4H/wIQAA8cCYcAohwA/rcgolwAfPcAAAnxk1Bq/6O9vgeM9xgADkRuB/ +8CEAAPHAmHAKIcAP63IKJcAHzdgFuBEGr/pE289xgAAcR+B/8CEAAPHAmHAKIcAP63IKJcAHz3AA +AKEZ6QWv+k3b4Hjhxc91gAD4SgKFQp2B4M9zgADQRDSDDvQiek565OIAnQT2M4PG4VL2ANgCpQGd +DvBCeS55jCEDggGdiPYzg9DhxPYB2AKlAJ3gf8HFz3GAAAhpBoEDgM9zgACAOECAAoFCeEggAgD4 +EwEA9hOAACJ47BMBAWG4BSk+AEApgHLgf1hg4HjPcYAAJGkGgQOAQIACgUJ44H9IIAAA4HjPcYAA +NAckgeB/IKARiOB/wrjgeM9xgABQaUaBgOKKIf8PIKAF8iKCIKAB2ALwAtjgfuB4z3GAAHBpRoGA *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 15:52:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AA16AA01; Wed, 28 Aug 2013 15:52:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 30FA222FC; Wed, 28 Aug 2013 15:52:20 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r7SFqG6f028226; Wed, 28 Aug 2013 18:52:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r7SFqG6f028226 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r7SFqGUp028225; Wed, 28 Aug 2013 18:52:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 28 Aug 2013 18:52:16 +0300 From: Konstantin Belousov To: Gavin Atkinson Subject: Re: svn commit: r254992 - head/etc/rc.d Message-ID: <20130828155216.GC4972@kib.kiev.ua> References: <201308281512.r7SFCGMx088267@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/NYYpGNRSM/gwMtc" Content-Disposition: inline In-Reply-To: <201308281512.r7SFCGMx088267@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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 15:52:21 -0000 --/NYYpGNRSM/gwMtc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 28, 2013 at 03:12:16PM +0000, Gavin Atkinson wrote: > Author: gavin > Date: Wed Aug 28 15:12:15 2013 > New Revision: 254992 > URL: http://svnweb.freebsd.org/changeset/base/254992 >=20 > Log: > After writing a kernel core dump into /var/crash, call sync(8). > =20 > If we panic again shortly after boot (say, within 30 seconds), any core > dump we wrote out may be lost on reboot. In this situation, we really > want to keep that core file, as it may be the only way to have the issue > resolved. Call sync(8) after writing out the core file and running > crashinfo(8), in the hope that these will not be lost if we panic > again. sync(8) is only called in the case where there is a core dump > to be written out, so won't be called during normal boots. > =20 > Discovered by: Trying to debug an IPSEC panic > MFC after: 1 week >=20 > Modified: > head/etc/rc.d/savecore >=20 > Modified: head/etc/rc.d/savecore > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/etc/rc.d/savecore Wed Aug 28 14:49:36 2013 (r254991) > +++ head/etc/rc.d/savecore Wed Aug 28 15:12:15 2013 (r254992) > @@ -70,6 +70,7 @@ savecore_start() > if checkyesno crashinfo_enable; then > ${crashinfo_program} -d ${dumpdir} > fi > + sync > else > check_startmsgs && echo 'No core dumps found.' > fi The crashinfo(8) runs are usually quite long, and the program does not add a new information comparing to the data already present in the crash dump itself. For your goal, it is more useful to sync before crashinfo(8) invocation. --/NYYpGNRSM/gwMtc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSHhyvAAoJEJDCuSvBvK1BwFYP/3CYBizsxhWyWmWKg4xIa9zZ CQsB+MTe90ouCfs2B9oAuf7aUo8SwIvEapgCtpSQF2FXf/b3VqZdxZqkppqQAK+7 5PzcyqiaaT/s5oUTaB4Gp6KqaYIo3lzWvr7myFSYHQQjZlfPPH9vFg7VPIjGszr3 mLYEC39D9r5yEicRiQBerKVfmtlmErec4XHhSyEl9wagwD4AfQ/f4vLaxSVnKU/c jV78fhktsxcaPtzATljdeWgMjoEbu9vLJiyZSWyHZBLiYES2iM5ErulQyUi2u98c TWjkb9hRNNSgMZuxVAOb1Z9te8z9dKWoU4QWkdkDiHMzlEGeSys19D/TJNhbeXIH yAUNMS9fzFnRayFkSccJLoHvTi0CG5Dopapcc8tP7O5S00VdANLXf3sUe87PTx5H IRpo8kqp1WgD8LeXVFAvhM5RB6H0V9vJh9Kwo0zpxSFKMgRdmqZRtvx/ddDLHSEe eaG+nxGoL3CJtSJGAIg0fqiLv6dz8rVkhNAbidxb5D3R5p6uUU1Jkqhk3CjKGSf/ 4K+r6dBhorDniKLv6xuw9YAW3dWJWwnNg5dgkZXBYkx+CIkXPjzll3dSSNUU9JcV rviTbDjOnf6buetYOKeEXtn0sjKicXhIfytyhMeswZnqBj5Ky18NAaiZHcTlbFpD J2NjKutFnVZZpdSu6MRE =dRWs -----END PGP SIGNATURE----- --/NYYpGNRSM/gwMtc-- From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 16:36:57 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F31F5832; Wed, 28 Aug 2013 16:36:56 +0000 (UTC) (envelope-from jmg@h2.funkthat.com) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C9E8826CA; Wed, 28 Aug 2013 16:36:56 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id r7SGangX012991 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 28 Aug 2013 09:36:49 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id r7SGanlh012990; Wed, 28 Aug 2013 09:36:49 -0700 (PDT) (envelope-from jmg) Date: Wed, 28 Aug 2013 09:36:49 -0700 From: John-Mark Gurney To: Gavin Atkinson Subject: Re: svn commit: r254992 - head/etc/rc.d Message-ID: <20130828163649.GU29777@funkthat.com> References: <201308281512.r7SFCGMx088267@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201308281512.r7SFCGMx088267@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Wed, 28 Aug 2013 09:36:50 -0700 (PDT) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 16:36:57 -0000 Gavin Atkinson wrote this message on Wed, Aug 28, 2013 at 15:12 +0000: > Author: gavin > Date: Wed Aug 28 15:12:15 2013 > New Revision: 254992 > URL: http://svnweb.freebsd.org/changeset/base/254992 > > Log: > After writing a kernel core dump into /var/crash, call sync(8). > > If we panic again shortly after boot (say, within 30 seconds), any core > dump we wrote out may be lost on reboot. In this situation, we really > want to keep that core file, as it may be the only way to have the issue > resolved. Call sync(8) after writing out the core file and running > crashinfo(8), in the hope that these will not be lost if we panic > again. sync(8) is only called in the case where there is a core dump > to be written out, so won't be called during normal boots. Why don't you call fsync on the relevant file(s) (or all the files in the crash dir)? sync just starts the process while fsync will block till all the blocks are on disk... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 16:59:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 930E4D0C; Wed, 28 Aug 2013 16:59:56 +0000 (UTC) (envelope-from kargl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8063D27E6; Wed, 28 Aug 2013 16:59:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SGxutU048120; Wed, 28 Aug 2013 16:59:56 GMT (envelope-from kargl@svn.freebsd.org) Received: (from kargl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SGxu0E048119; Wed, 28 Aug 2013 16:59:56 GMT (envelope-from kargl@svn.freebsd.org) Message-Id: <201308281659.r7SGxu0E048119@svn.freebsd.org> From: Steve Kargl Date: Wed, 28 Aug 2013 16:59:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254994 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 16:59:56 -0000 Author: kargl Date: Wed Aug 28 16:59:55 2013 New Revision: 254994 URL: http://svnweb.freebsd.org/changeset/base/254994 Log: * Whitespace. Modified: head/lib/msun/src/s_erf.c Modified: head/lib/msun/src/s_erf.c ============================================================================== --- head/lib/msun/src/s_erf.c Wed Aug 28 15:12:51 2013 (r254993) +++ head/lib/msun/src/s_erf.c Wed Aug 28 16:59:55 2013 (r254994) @@ -201,7 +201,7 @@ erf(double x) if(ix < 0x3feb0000) { /* |x|<0.84375 */ if(ix < 0x3e300000) { /* |x|<2**-28 */ if (ix < 0x00800000) - return (8*x+efx8*x)/8; /* avoid spurious underflow */ + return (8*x+efx8*x)/8; /* avoid spurious underflow */ return x + efx*x; } z = x*x; From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 17:38:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A9B3C9B4; Wed, 28 Aug 2013 17:38:05 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 87BA12A75; Wed, 28 Aug 2013 17:38:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SHc5Vh070711; Wed, 28 Aug 2013 17:38:05 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SHc5BE070710; Wed, 28 Aug 2013 17:38:05 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201308281738.r7SHc5BE070710@svn.freebsd.org> From: Kirk McKusick Date: Wed, 28 Aug 2013 17:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254995 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 17:38:05 -0000 Author: mckusick Date: Wed Aug 28 17:38:05 2013 New Revision: 254995 URL: http://svnweb.freebsd.org/changeset/base/254995 Log: A performance problem was reported in PR kern/181226: I have 25TB Dell PERC 6 RAID5 array. When it becomes almost full (10-20GB free), processes which write data to it start eating 100% CPU and write speed drops below 1MB/sec (normally to gives 400MB/sec). The revision at which it first became apparent was http://svnweb.freebsd.org/changeset/base/249782. The offending change reserved an area in each cylinder group to store metadata. The new algorithm attempts to save this area for metadata and allows its use for non-metadata only after all the data areas have been exhausted. The size of the reserved area defaults to half of minfree, so the filesystem reports full before the data area can completely fill. However, in this report, the filesystem has had minfree reduced to 1% thus forcing the metadata area to be used for data. As the filesystem approached full, it had only metadata areas left to allocate. The result was that every block allocation had to scan summary data for 30,000 cylinder groups before falling back to searching up to 30,000 metadata areas. The fix is to give up on saving the metadata areas once the free space reserve drops below 2%. The effect of this change is to use the old algorithm of just accepting the first available block that we find. Since most filesystems use the default 5% minfree, this will have no effect on their operation. For those that want to push to the limit, they will get their crappy block placements quickly. Submitted by: Dmitry Sivachenko Fix Tested by: Dmitry Sivachenko PR: kern/181226 MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_alloc.c Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Wed Aug 28 16:59:55 2013 (r254994) +++ head/sys/ufs/ffs/ffs_alloc.c Wed Aug 28 17:38:05 2013 (r254995) @@ -516,7 +516,13 @@ ffs_reallocblks_ufs1(ap) ip = VTOI(vp); fs = ip->i_fs; ump = ip->i_ump; - if (fs->fs_contigsumsize <= 0) + /* + * If we are not tracking block clusters or if we have less than 2% + * free blocks left, then do not attempt to cluster. Running with + * less than 5% free block reserve is not recommended and those that + * choose to do so do not expect to have good file layout. + */ + if (fs->fs_contigsumsize <= 0 || freespace(fs, 2) < 0) return (ENOSPC); buflist = ap->a_buflist; len = buflist->bs_nchildren; @@ -737,7 +743,13 @@ ffs_reallocblks_ufs2(ap) ip = VTOI(vp); fs = ip->i_fs; ump = ip->i_ump; - if (fs->fs_contigsumsize <= 0) + /* + * If we are not tracking block clusters or if we have less than 2% + * free blocks left, then do not attempt to cluster. Running with + * less than 5% free block reserve is not recommended and those that + * choose to do so do not expect to have good file layout. + */ + if (fs->fs_contigsumsize <= 0 || freespace(fs, 2) < 0) return (ENOSPC); buflist = ap->a_buflist; len = buflist->bs_nchildren; From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 17:46:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B5E7BC00; Wed, 28 Aug 2013 17:46:32 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A31EC2AFA; Wed, 28 Aug 2013 17:46:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SHkW98075618; Wed, 28 Aug 2013 17:46:32 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SHkW0G075617; Wed, 28 Aug 2013 17:46:32 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201308281746.r7SHkW0G075617@svn.freebsd.org> From: Kirk McKusick Date: Wed, 28 Aug 2013 17:46:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254996 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 17:46:32 -0000 Author: mckusick Date: Wed Aug 28 17:46:32 2013 New Revision: 254996 URL: http://svnweb.freebsd.org/changeset/base/254996 Log: In looking at block layouts as part of fixing filesystem block allocations under low free-space conditions (-r254995), determine that old block-preference search order used before -r249782 worked a bit better. This change reverts to that block-preference search order. MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_alloc.c Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Wed Aug 28 17:38:05 2013 (r254995) +++ head/sys/ufs/ffs/ffs_alloc.c Wed Aug 28 17:46:32 2013 (r254996) @@ -1186,7 +1186,7 @@ ffs_dirpref(pip) if (fs->fs_contigdirs[cg] < maxcontigdirs) return ((ino_t)(fs->fs_ipg * cg)); } - for (cg = prefcg - 1; cg >= 0; cg--) + for (cg = 0; cg < prefcg; cg++) if (fs->fs_cs(fs, cg).cs_ndir < maxndir && fs->fs_cs(fs, cg).cs_nifree >= minifree && fs->fs_cs(fs, cg).cs_nbfree >= minbfree) { @@ -1199,7 +1199,7 @@ ffs_dirpref(pip) for (cg = prefcg; cg < fs->fs_ncg; cg++) if (fs->fs_cs(fs, cg).cs_nifree >= avgifree) return ((ino_t)(fs->fs_ipg * cg)); - for (cg = prefcg - 1; cg >= 0; cg--) + for (cg = 0; cg < prefcg; cg++) if (fs->fs_cs(fs, cg).cs_nifree >= avgifree) break; return ((ino_t)(fs->fs_ipg * cg)); From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 17:58:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D1E78FE7; Wed, 28 Aug 2013 17:58:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BE9612BAD; Wed, 28 Aug 2013 17:58:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SHwUcb081646; Wed, 28 Aug 2013 17:58:30 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SHwUkD081645; Wed, 28 Aug 2013 17:58:30 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201308281758.r7SHwUkD081645@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 28 Aug 2013 17:58:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254997 - head/sys/dev/fb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 17:58:30 -0000 Author: jkim Date: Wed Aug 28 17:58:30 2013 New Revision: 254997 URL: http://svnweb.freebsd.org/changeset/base/254997 Log: Avoid unnecessary signedness conversion. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Wed Aug 28 17:46:32 2013 (r254996) +++ head/sys/dev/fb/vesa.c Wed Aug 28 17:58:30 2013 (r254997) @@ -83,7 +83,7 @@ static struct mtx vesa_lock; static int vesa_state; static void *vesa_state_buf; static uint32_t vesa_state_buf_offs; -static ssize_t vesa_state_buf_size; +static size_t vesa_state_buf_size; static u_char *vesa_palette; static uint32_t vesa_palette_offs; @@ -207,7 +207,7 @@ static int vesa_bios_load_palette2(int s #define STATE_SIZE 0 #define STATE_SAVE 1 #define STATE_LOAD 2 -static ssize_t vesa_bios_state_buf_size(int); +static size_t vesa_bios_state_buf_size(int); static int vesa_bios_save_restore(int code, void *p); #ifdef MODE_TABLE_BROKEN static int vesa_bios_get_line_length(void); @@ -505,7 +505,7 @@ vesa_bios_load_palette2(int start, int c return (regs.R_AX != 0x004f); } -static ssize_t +static size_t vesa_bios_state_buf_size(int state) { x86regs_t regs; From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 18:13:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9D85F3CF; Wed, 28 Aug 2013 18:13:38 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8B1572C95; Wed, 28 Aug 2013 18:13:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SIDc4h091636; Wed, 28 Aug 2013 18:13:38 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SIDcpp091635; Wed, 28 Aug 2013 18:13:38 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201308281813.r7SIDcpp091635@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 28 Aug 2013 18:13:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254998 - head/sys/dev/fb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 18:13:38 -0000 Author: jkim Date: Wed Aug 28 18:13:37 2013 New Revision: 254998 URL: http://svnweb.freebsd.org/changeset/base/254998 Log: Make sure to free stale buffer before allocating new one for safety. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Wed Aug 28 17:58:30 2013 (r254997) +++ head/sys/dev/fb/vesa.c Wed Aug 28 18:13:37 2013 (r254998) @@ -1475,6 +1475,10 @@ vesa_save_state(video_adapter_t *adp, vo if (vesa_state_buf_size > 0 && size < bsize) return (EINVAL); + if (vesa_vmem_buf != NULL) { + free(vesa_vmem_buf, M_DEVBUF); + vesa_vmem_buf = NULL; + } if (VESA_MODE(adp->va_mode) && adp->va_buffer != 0) { buf = adp->va_buffer; bsize = adp->va_buffer_size; @@ -1486,8 +1490,7 @@ vesa_save_state(video_adapter_t *adp, vo vesa_vmem_buf = malloc(bsize, M_DEVBUF, M_NOWAIT); if (vesa_vmem_buf != NULL) bcopy((void *)buf, vesa_vmem_buf, bsize); - } else - vesa_vmem_buf = NULL; + } if (vesa_state_buf_size == 0) return ((*prevvidsw->save_state)(adp, p, size)); ((adp_state_t *)p)->sig = V_STATE_SIG; @@ -1524,6 +1527,7 @@ vesa_load_state(video_adapter_t *adp, vo bcopy(vesa_vmem_buf, (void *)buf, bsize); } free(vesa_vmem_buf, M_DEVBUF); + vesa_vmem_buf = NULL; } if (((adp_state_t *)p)->sig != V_STATE_SIG) return ((*prevvidsw->load_state)(adp, p)); From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 19:06:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7C05B80A; Wed, 28 Aug 2013 19:06:23 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4FE2B201B; Wed, 28 Aug 2013 19:06:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SJ6NCQ022318; Wed, 28 Aug 2013 19:06:23 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SJ6N4e022317; Wed, 28 Aug 2013 19:06:23 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201308281906.r7SJ6N4e022317@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 28 Aug 2013 19:06:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254999 - head/sys/dev/fb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 19:06:23 -0000 Author: jkim Date: Wed Aug 28 19:06:22 2013 New Revision: 254999 URL: http://svnweb.freebsd.org/changeset/base/254999 Log: Do not save/restore video memory if we are not using linear frame buffer. Note this partially revert r233896. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Wed Aug 28 18:13:37 2013 (r254998) +++ head/sys/dev/fb/vesa.c Wed Aug 28 19:06:22 2013 (r254999) @@ -1,6 +1,6 @@ /*- * Copyright (c) 1998 Kazutaka YOKOTA and Michael Smith - * Copyright (c) 2009-2012 Jung-uk Kim + * Copyright (c) 2009-2013 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1463,7 +1463,7 @@ vesa_set_border(video_adapter_t *adp, in static int vesa_save_state(video_adapter_t *adp, void *p, size_t size) { - vm_offset_t buf; + void *buf; size_t bsize; if (adp != vesa_adp || (size == 0 && vesa_state_buf_size == 0)) @@ -1479,17 +1479,14 @@ vesa_save_state(video_adapter_t *adp, vo free(vesa_vmem_buf, M_DEVBUF); vesa_vmem_buf = NULL; } - if (VESA_MODE(adp->va_mode) && adp->va_buffer != 0) { - buf = adp->va_buffer; - bsize = adp->va_buffer_size; - } else { - buf = adp->va_window; - bsize = adp->va_window_size; - } - if (buf != 0) { - vesa_vmem_buf = malloc(bsize, M_DEVBUF, M_NOWAIT); - if (vesa_vmem_buf != NULL) - bcopy((void *)buf, vesa_vmem_buf, bsize); + if (VESA_MODE(adp->va_mode)) { + buf = (void *)adp->va_buffer; + if (buf != NULL) { + bsize = adp->va_buffer_size; + vesa_vmem_buf = malloc(bsize, M_DEVBUF, M_NOWAIT); + if (vesa_vmem_buf != NULL) + bcopy(buf, vesa_vmem_buf, bsize); + } } if (vesa_state_buf_size == 0) return ((*prevvidsw->save_state)(adp, p, size)); @@ -1500,7 +1497,7 @@ vesa_save_state(video_adapter_t *adp, vo static int vesa_load_state(video_adapter_t *adp, void *p) { - vm_offset_t buf; + void *buf; size_t bsize; int error, mode; @@ -1515,16 +1512,12 @@ vesa_load_state(video_adapter_t *adp, vo error = vesa_set_mode(adp, mode); if (vesa_vmem_buf != NULL) { - if (error == 0) { - if (VESA_MODE(mode) && adp->va_buffer != 0) { - buf = adp->va_buffer; + if (error == 0 && VESA_MODE(mode)) { + buf = (void *)adp->va_buffer; + if (buf != NULL) { bsize = adp->va_buffer_size; - } else { - buf = adp->va_window; - bsize = adp->va_window_size; + bcopy(vesa_vmem_buf, buf, bsize); } - if (buf != 0) - bcopy(vesa_vmem_buf, (void *)buf, bsize); } free(vesa_vmem_buf, M_DEVBUF); vesa_vmem_buf = NULL; From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 19:22:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9741FC05; Wed, 28 Aug 2013 19:22:09 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 839E72126; Wed, 28 Aug 2013 19:22:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SJM9nY032328; Wed, 28 Aug 2013 19:22:09 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SJM9tq032327; Wed, 28 Aug 2013 19:22:09 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201308281922.r7SJM9tq032327@svn.freebsd.org> From: "Kenneth D. Merry" Date: Wed, 28 Aug 2013 19:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255000 - stable/9/sys/cam/scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 19:22:09 -0000 Author: ken Date: Wed Aug 28 19:22:09 2013 New Revision: 255000 URL: http://svnweb.freebsd.org/changeset/base/255000 Log: MFC 254416: ------------------------------------------------------------------------ r254416 | ken | 2013-08-16 10:14:32 -0600 (Fri, 16 Aug 2013) | 24 lines Add unmapped I/O and larger I/O support to the sa(4) driver. We now pay attention to the maxio field in the XPT_PATH_INQ CCB, and if it is set, propagate it up to physio via the si_iosize_max field in the cdev structure. We also now pay attention to the PIM_UNMAPPED capability bit in the XPT_PATH_INQ CCB, and set the new SI_UNMAPPED cdev flag when the underlying SIM supports unmapped I/O. scsi_sa.c: Add unmapped I/O support and propagate the SIM's maximum I/O size up. Adjust scsi_tape_read_write() in the same way that scsi_read_write() was changed to support unmapped I/O. We overload the readop parameter with bits that tell us whether it's an unmapped I/O, and we need to set the CAM_DATA_BIO CCB flag. This change should be backwards compatible in source and binary forms. Sponsored by: Spectra Logic Modified: stable/9/sys/cam/scsi/scsi_sa.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_sa.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_sa.c Wed Aug 28 19:06:22 2013 (r254999) +++ stable/9/sys/cam/scsi/scsi_sa.c Wed Aug 28 19:22:09 2013 (r255000) @@ -212,6 +212,7 @@ struct sa_softc { sa_state state; sa_flags flags; sa_quirks quirks; + u_int si_flags; struct bio_queue_head bio_queue; int queue_count; struct devstat *device_stats; @@ -221,6 +222,7 @@ struct sa_softc { int blk_shift; u_int32_t max_blk; u_int32_t min_blk; + u_int32_t maxio; u_int32_t comp_algorithm; u_int32_t saved_comp_algorithm; u_int32_t media_blksize; @@ -447,7 +449,7 @@ static struct cdevsw sa_cdevsw = { .d_ioctl = saioctl, .d_strategy = sastrategy, .d_name = "sa", - .d_flags = D_TAPE | D_NEEDGIANT, + .d_flags = D_TAPE, }; static int @@ -1506,10 +1508,29 @@ saregister(struct cam_periph *periph, vo DEVSTAT_BS_UNAVAILABLE, SID_TYPE(&cgd->inq_data) | XPORT_DEVSTAT_TYPE(cpi.transport), DEVSTAT_PRIORITY_TAPE); + /* + * If maxio isn't set, we fall back to DFLTPHYS. If it is set, we + * take it whether or not it's larger than MAXPHYS. physio will + * break it down into pieces small enough to fit in a buffer. + */ + if (cpi.maxio == 0) + softc->maxio = DFLTPHYS; + else + softc->maxio = cpi.maxio; + + /* + * If the SIM supports unmapped I/O, let physio know that we can + * handle unmapped buffers. + */ + if (cpi.hba_misc & PIM_UNMAPPED) + softc->si_flags = SI_UNMAPPED; + softc->devs.ctl_dev = make_dev(&sa_cdevsw, SAMINOR(SA_CTLDEV, 0, SA_ATYPE_R), UID_ROOT, GID_OPERATOR, 0660, "%s%d.ctl", periph->periph_name, periph->unit_number); softc->devs.ctl_dev->si_drv1 = periph; + softc->devs.ctl_dev->si_iosize_max = softc->maxio; + softc->devs.ctl_dev->si_flags |= softc->si_flags; for (i = 0; i < SA_NUM_MODES; i++) { @@ -1518,18 +1539,24 @@ saregister(struct cam_periph *periph, vo UID_ROOT, GID_OPERATOR, 0660, "%s%d.%d", periph->periph_name, periph->unit_number, i); softc->devs.mode_devs[i].r_dev->si_drv1 = periph; + softc->devs.mode_devs[i].r_dev->si_iosize_max = softc->maxio; + softc->devs.mode_devs[i].r_dev->si_flags |= softc->si_flags; softc->devs.mode_devs[i].nr_dev = make_dev(&sa_cdevsw, SAMINOR(SA_NOT_CTLDEV, i, SA_ATYPE_NR), UID_ROOT, GID_OPERATOR, 0660, "n%s%d.%d", periph->periph_name, periph->unit_number, i); softc->devs.mode_devs[i].nr_dev->si_drv1 = periph; + softc->devs.mode_devs[i].nr_dev->si_iosize_max = softc->maxio; + softc->devs.mode_devs[i].nr_dev->si_flags |= softc->si_flags; softc->devs.mode_devs[i].er_dev = make_dev(&sa_cdevsw, SAMINOR(SA_NOT_CTLDEV, i, SA_ATYPE_ER), UID_ROOT, GID_OPERATOR, 0660, "e%s%d.%d", periph->periph_name, periph->unit_number, i); softc->devs.mode_devs[i].er_dev->si_drv1 = periph; + softc->devs.mode_devs[i].er_dev->si_iosize_max = softc->maxio; + softc->devs.mode_devs[i].er_dev->si_flags |= softc->si_flags; /* * Make the (well known) aliases for the first mode. @@ -1540,12 +1567,20 @@ saregister(struct cam_periph *periph, vo alias = make_dev_alias(softc->devs.mode_devs[i].r_dev, "%s%d", periph->periph_name, periph->unit_number); alias->si_drv1 = periph; + alias->si_iosize_max = softc->maxio; + alias->si_flags |= softc->si_flags; + alias = make_dev_alias(softc->devs.mode_devs[i].nr_dev, "n%s%d", periph->periph_name, periph->unit_number); alias->si_drv1 = periph; + alias->si_iosize_max = softc->maxio; + alias->si_flags |= softc->si_flags; + alias = make_dev_alias(softc->devs.mode_devs[i].er_dev, "e%s%d", periph->periph_name, periph->unit_number); alias->si_drv1 = periph; + alias->si_iosize_max = softc->maxio; + alias->si_flags |= softc->si_flags; } } cam_periph_lock(periph); @@ -1694,9 +1729,13 @@ again: softc->dsreg = (bp->bio_cmd == BIO_READ)? MTIO_DSREG_RD : MTIO_DSREG_WR; scsi_sa_read_write(&start_ccb->csio, 0, sadone, - MSG_SIMPLE_Q_TAG, (bp->bio_cmd == BIO_READ), - FALSE, (softc->flags & SA_FLAG_FIXED) != 0, - length, bp->bio_data, bp->bio_bcount, SSD_FULL_SIZE, + MSG_SIMPLE_Q_TAG, (bp->bio_cmd == BIO_READ ? + SCSI_RW_READ : SCSI_RW_WRITE) | + ((bp->bio_flags & BIO_UNMAPPED) != 0 ? + SCSI_RW_BIO : 0), FALSE, + (softc->flags & SA_FLAG_FIXED) != 0, length, + (bp->bio_flags & BIO_UNMAPPED) != 0 ? (void *)bp : + bp->bio_data, bp->bio_bcount, SSD_FULL_SIZE, IO_TIMEOUT); start_ccb->ccb_h.ccb_pflags &= ~SA_POSITION_UPDATED; Set_CCB_Type(start_ccb, SA_CCB_BUFFER_IO); @@ -3431,18 +3470,22 @@ scsi_sa_read_write(struct ccb_scsiio *cs u_int32_t dxfer_len, u_int8_t sense_len, u_int32_t timeout) { struct scsi_sa_rw *scsi_cmd; + int read; + + read = (readop & SCSI_RW_DIRMASK) == SCSI_RW_READ; scsi_cmd = (struct scsi_sa_rw *)&csio->cdb_io.cdb_bytes; - scsi_cmd->opcode = readop ? SA_READ : SA_WRITE; + scsi_cmd->opcode = read ? SA_READ : SA_WRITE; scsi_cmd->sli_fixed = 0; - if (sli && readop) + if (sli && read) scsi_cmd->sli_fixed |= SAR_SLI; if (fixed) scsi_cmd->sli_fixed |= SARW_FIXED; scsi_ulto3b(length, scsi_cmd->length); scsi_cmd->control = 0; - cam_fill_csio(csio, retries, cbfcnp, readop ? CAM_DIR_IN : CAM_DIR_OUT, + cam_fill_csio(csio, retries, cbfcnp, (read ? CAM_DIR_IN : CAM_DIR_OUT) | + ((readop & SCSI_RW_BIO) != 0 ? CAM_DATA_BIO : 0), tag_action, data_ptr, dxfer_len, sense_len, sizeof(*scsi_cmd), timeout); } From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 19:49:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D027F680; Wed, 28 Aug 2013 19:49:33 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AC6D32300; Wed, 28 Aug 2013 19:49:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SJnX8K045448; Wed, 28 Aug 2013 19:49:33 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SJnXuC045445; Wed, 28 Aug 2013 19:49:33 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201308281949.r7SJnXuC045445@svn.freebsd.org> From: Robert Watson Date: Wed, 28 Aug 2013 19:49:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255001 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 19:49:33 -0000 Author: rwatson Date: Wed Aug 28 19:49:32 2013 New Revision: 255001 URL: http://svnweb.freebsd.org/changeset/base/255001 Log: Add a simple procdesc(4) man page describing "options PROCDESC" and the high-level facility, supplementing pdfork(2) and friends. Update capsicum.4 to xref. Suggested by: sbruno MFC after: 3 days Added: head/share/man/man4/procdesc.4 (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/capsicum.4 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Wed Aug 28 19:22:09 2013 (r255000) +++ head/share/man/man4/Makefile Wed Aug 28 19:49:32 2013 (r255001) @@ -367,6 +367,7 @@ MAN= aac.4 \ ppbus.4 \ ppc.4 \ ppi.4 \ + procdesc.4 \ psm.4 \ pst.4 \ pt.4 \ Modified: head/share/man/man4/capsicum.4 ============================================================================== --- head/share/man/man4/capsicum.4 Wed Aug 28 19:22:09 2013 (r255000) +++ head/share/man/man4/capsicum.4 Wed Aug 28 19:49:32 2013 (r255001) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2011 Robert N. M. Watson +.\" Copyright (c) 2011, 2013 Robert N. M. Watson .\" Copyright (c) 2011 Jonathan Anderson .\" All rights reserved. .\" @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 20, 2011 +.Dd August 21, 2013 .Dt CAPSICUM 4 .Os .Sh NAME @@ -78,10 +78,13 @@ objects using capabilities rather than g .Bl -tag -width indent .It process descriptors File descriptors representing processes, allowing parent processes to manage -child processes without requiring access to the PID namespace. +child processes without requiring access to the PID namespace; described in +greater detail in +.Xr procdesc 4 . .It anonymous shared memory An extension to the POSIX shared memory API to support anonymous swap objects -associated with file descriptors. +associated with file descriptors; described in greater detail in +.Xr shm_open 2 . .El .Sh SEE ALSO .Xr cap_enter 2 , @@ -96,7 +99,8 @@ associated with file descriptors. .Xr pdwait4 2 , .Xr read 2 , .Xr shm_open 2 , -.Xr write 2 +.Xr write 2 , +.Xr procdesc 4 , .Sh HISTORY .Nm first appeared in Added: head/share/man/man4/procdesc.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/procdesc.4 Wed Aug 28 19:49:32 2013 (r255001) @@ -0,0 +1,93 @@ +.\" +.\" Copyright (c) 2013 Robert N. M. Watson +.\" All rights reserved. +.\" +.\" This software was developed by SRI International and the University of +.\" Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) +.\" ("CTSRD"), as part of the DARPA CRASH research programme. +.\" +.\" 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 August 21, 2013 +.Dt PROCDESC 4 +.Os +.Sh NAME +.Nm procdesc +.Nd process descriptor facility +.Sh SYNOPSIS +.Cd "options PROCDESC" +.Sh DESCRIPTION +.Nm +is a file-descriptor-oriented interface to process signalling and control, +which supplements historic +.Ux +.Xr fork 2 , +.Xr kill 2 , +and +.Xr wait4 2 +primitives with +new system calls such as +.Xr pdfork 2 , +.Xr pdkill 2 , +and +.Xr pdwait4 2 . +.Nm +is designed for use with +.Xr capsicum 4 , +replacing process identifiers with capability-oriented references. +However, it can also be used independently of +.Xr capsicum 4 , +displacing PIDs, which may otherwise suffer from race conditions. +Given a process descriptor, it is possible to query its conventional PID using +.Xr pdgetpid 2 . +.Sh SEE ALSO +.Xr fork 2 , +.Xr kill 2 , +.Xr wait4 2 , +.Xr pdfork 2 , +.Xr pdgetpid 2 , +.Xr pdkill 2 , +.Xr pdwait4 , +.Xr capsicum 4 +.Sh HISTORY +.Nm +first appeared in +.Fx 9.0 , +and was developed at the University of Cambridge. +.Sh AUTHORS +.Nm +was developed by +.An -nosplit +.An "Robert Watson" Aq rwatson@FreeBSD.org +and +.An "Jonathan Anderson" Aq jonathan@FreeBSD.org +at the University of Cambridge, and +.An "Ben Laurie" Aq benl@FreeBSD.org +and +.An "Kris Kennaway" Aq kris@FreeBSD.org +at Google, Inc. +.Sh BUGS +.Nm +is considered experimental in +.Fx . From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 20:00:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D926698C; Wed, 28 Aug 2013 20:00:25 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ACF6423C4; Wed, 28 Aug 2013 20:00:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SK0PI0051707; Wed, 28 Aug 2013 20:00:25 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SK0PH2051706; Wed, 28 Aug 2013 20:00:25 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201308282000.r7SK0PH2051706@svn.freebsd.org> From: Robert Watson Date: Wed, 28 Aug 2013 20:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255002 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 20:00:25 -0000 Author: rwatson Date: Wed Aug 28 20:00:25 2013 New Revision: 255002 URL: http://svnweb.freebsd.org/changeset/base/255002 Log: Xref capsicum(4) and procdesc(4) from pdfork(2). Suggested by: sbruno MFC after: 3 days Modified: head/lib/libc/sys/pdfork.2 Modified: head/lib/libc/sys/pdfork.2 ============================================================================== --- head/lib/libc/sys/pdfork.2 Wed Aug 28 19:49:32 2013 (r255001) +++ head/lib/libc/sys/pdfork.2 Wed Aug 28 20:00:25 2013 (r255002) @@ -1,10 +1,14 @@ .\" -.\" Copyright (c) 2009-2010, 2012 Robert N. M. Watson +.\" Copyright (c) 2009-2010, 2012-2013 Robert N. M. Watson .\" All rights reserved. .\" .\" This software was developed at the University of Cambridge Computer .\" Laboratory with support from a grant from Google, Inc. .\" +.\" This software was developed by SRI International and the University of +.\" Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) +.\" ("CTSRD"), as part of the DARPA CRASH research programme. +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -28,7 +32,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 25, 2012 +.Dd August 28, 2013 .Dt PDFORK 2 .Os .Sh NAME @@ -71,7 +75,9 @@ Instead of the default terminate-on-clos live until it is explicitly killed with .Xr kill 2 . .Pp -This option is not permitted in Capsicum capability mode (see +This option is not permitted in +.Xr capsicum 4 +capability mode (see .Xr cap_enter 2 ) . .El .Pp @@ -119,6 +125,12 @@ is set; if the process is still alive an the last reference to the process descriptor, the process will be terminated with the signal .Dv SIGKILL . +.Pp +.Nm +and associated functions depend on +.Cd "options PROCDESC" +described in +.Xr procdesc 4 . .Sh RETURN VALUES .Fn pdfork returns a PID, 0 or -1, as @@ -156,7 +168,9 @@ for .Xr fstat 2 , .Xr kill 2 , .Xr poll 2 , -.Xr wait4 2 +.Xr wait4 2 , +.Xr capsicum 4 , +.Xr procdesc 4 .Sh HISTORY The .Fn pdfork , From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 20:07:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 589C9CBB; Wed, 28 Aug 2013 20:07:01 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4688F240E; Wed, 28 Aug 2013 20:07:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SK71tH055996; Wed, 28 Aug 2013 20:07:01 GMT (envelope-from davidcs@svn.freebsd.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SK71FZ055994; Wed, 28 Aug 2013 20:07:01 GMT (envelope-from davidcs@svn.freebsd.org) Message-Id: <201308282007.r7SK71FZ055994@svn.freebsd.org> From: David C Somayajulu Date: Wed, 28 Aug 2013 20:07:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255003 - head/sys/dev/qlxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 20:07:01 -0000 Author: davidcs Date: Wed Aug 28 20:07:00 2013 New Revision: 255003 URL: http://svnweb.freebsd.org/changeset/base/255003 Log: ql_minidump() should be performed only by port 0. Submitted by: David C Somayajulu Modified: head/sys/dev/qlxgbe/ql_os.c Modified: head/sys/dev/qlxgbe/ql_os.c ============================================================================== --- head/sys/dev/qlxgbe/ql_os.c Wed Aug 28 20:00:25 2013 (r255002) +++ head/sys/dev/qlxgbe/ql_os.c Wed Aug 28 20:07:00 2013 (r255003) @@ -1642,8 +1642,6 @@ qla_error_recovery(void *context, int pe QLA_UNLOCK(ha, __func__); - ql_minidump(ha); - if ((ha->pci_func & 0x1) == 0) { if (!ha->msg_from_peer) { @@ -1656,6 +1654,8 @@ qla_error_recovery(void *context, int pe ha->msg_from_peer = 0; + ql_minidump(ha); + (void) ql_init_hw(ha); qla_free_xmt_bufs(ha); qla_free_rcv_bufs(ha); From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 20:10:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E1D23E85; Wed, 28 Aug 2013 20:10:56 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CFAA52464; Wed, 28 Aug 2013 20:10:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SKAuLQ059516; Wed, 28 Aug 2013 20:10:56 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SKAum0059515; Wed, 28 Aug 2013 20:10:56 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201308282010.r7SKAum0059515@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 28 Aug 2013 20:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255004 - head/sys/dev/fb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 20:10:57 -0000 Author: jkim Date: Wed Aug 28 20:10:56 2013 New Revision: 255004 URL: http://svnweb.freebsd.org/changeset/base/255004 Log: Reduce diff against stable/9 slightly. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Wed Aug 28 20:07:00 2013 (r255003) +++ head/sys/dev/fb/vesa.c Wed Aug 28 20:10:56 2013 (r255004) @@ -1506,6 +1506,7 @@ vesa_load_state(video_adapter_t *adp, vo /* Try BIOS POST to restore a sane state. */ (void)vesa_bios_post(); + bsize = adp->va_buffer_size; mode = adp->va_mode; error = vesa_set_mode(adp, adp->va_initial_mode); if (mode != adp->va_initial_mode) @@ -1514,10 +1515,8 @@ vesa_load_state(video_adapter_t *adp, vo if (vesa_vmem_buf != NULL) { if (error == 0 && VESA_MODE(mode)) { buf = (void *)adp->va_buffer; - if (buf != NULL) { - bsize = adp->va_buffer_size; + if (buf != NULL) bcopy(vesa_vmem_buf, buf, bsize); - } } free(vesa_vmem_buf, M_DEVBUF); vesa_vmem_buf = NULL; From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 20:45:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BF50F905; Wed, 28 Aug 2013 20:45:46 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9E9DF2696; Wed, 28 Aug 2013 20:45:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SKjkCG077503; Wed, 28 Aug 2013 20:45:46 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SKjjN4077494; Wed, 28 Aug 2013 20:45:45 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201308282045.r7SKjjN4077494@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 28 Aug 2013 20:45:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255005 - in 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 20:45:46 -0000 Author: np Date: Wed Aug 28 20:45:45 2013 New Revision: 255005 URL: http://svnweb.freebsd.org/changeset/base/255005 Log: Add hooks in base cxgbe(4) for the iWARP upper-layer driver. Update a couple of assertions in the TOE driver as well. Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/offload.h head/sys/dev/cxgbe/osdep.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c head/sys/dev/cxgbe/tom/t4_cpl_io.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Wed Aug 28 20:10:56 2013 (r255004) +++ head/sys/dev/cxgbe/adapter.h Wed Aug 28 20:45:45 2013 (r255005) @@ -567,6 +567,7 @@ struct adapter { #ifdef TCP_OFFLOAD void *tom_softc; /* (struct tom_data *) */ struct tom_tunables tt; + void *iwarp_softc; /* (struct c4iw_dev *) */ #endif struct l2t_data *l2t; /* L2 table */ struct tid_info tids; Modified: head/sys/dev/cxgbe/offload.h ============================================================================== --- head/sys/dev/cxgbe/offload.h Wed Aug 28 20:10:56 2013 (r255004) +++ head/sys/dev/cxgbe/offload.h Wed Aug 28 20:45:45 2013 (r255005) @@ -123,6 +123,7 @@ struct t4_virt_res { #ifdef TCP_OFFLOAD enum { ULD_TOM = 1, + ULD_IWARP = 2, }; struct adapter; Modified: head/sys/dev/cxgbe/osdep.h ============================================================================== --- head/sys/dev/cxgbe/osdep.h Wed Aug 28 20:10:56 2013 (r255004) +++ head/sys/dev/cxgbe/osdep.h Wed Aug 28 20:45:45 2013 (r255005) @@ -45,6 +45,7 @@ #define CH_ALERT(adap, fmt, ...) log(LOG_ALERT, fmt, ##__VA_ARGS__) #define CH_WARN_RATELIMIT(adap, fmt, ...) log(LOG_WARNING, fmt, ##__VA_ARGS__) +#ifndef LINUX_TYPES_DEFINED typedef int8_t s8; typedef int16_t s16; typedef int32_t s32; @@ -156,5 +157,6 @@ strstrip(char *s) return (r); } +#endif /* LINUX_TYPES_DEFINED */ #endif Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Wed Aug 28 20:10:56 2013 (r255004) +++ head/sys/dev/cxgbe/t4_main.c Wed Aug 28 20:45:45 2013 (r255005) @@ -600,7 +600,6 @@ t4_attach(device_t dev) t4_register_cpl_handler(sc, CPL_TRACE_PKT_T5, t5_trace_pkt); t4_init_sge_cpl_handlers(sc); - /* Prepare the adapter for operation */ rc = -t4_prep_adapter(sc); if (rc != 0) { Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Wed Aug 28 20:10:56 2013 (r255004) +++ head/sys/dev/cxgbe/t4_sge.c Wed Aug 28 20:45:45 2013 (r255005) @@ -1069,6 +1069,17 @@ service_iq(struct sge_iq *iq, int budget ("%s: budget %u, rsp_type %u", __func__, budget, rsp_type)); + /* + * There are 1K interrupt-capable queues (qids 0 + * through 1023). A response type indicating a + * forwarded interrupt with a qid >= 1K is an + * iWARP async notification. + */ + if (lq >= 1024) { + sc->an_handler(iq, ctrl); + break; + } + q = sc->sge.iqmap[lq - sc->sge.iq_start]; if (atomic_cmpset_int(&q->state, IQS_IDLE, IQS_BUSY)) { @@ -1083,7 +1094,12 @@ service_iq(struct sge_iq *iq, int budget break; default: - sc->an_handler(iq, ctrl); + KASSERT(0, + ("%s: illegal response type %d on iq %p", + __func__, rsp_type, iq)); + log(LOG_ERR, + "%s: illegal response type %d on iq %p", + device_get_nameunit(sc->dev), rsp_type, iq); break; } Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Aug 28 20:10:56 2013 (r255004) +++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Aug 28 20:45:45 2013 (r255005) @@ -548,9 +548,10 @@ t4_push_frames(struct adapter *sc, struc KASSERT(toep->flags & TPF_FLOWC_WR_SENT, ("%s: flowc_wr not sent for tid %u.", __func__, toep->tid)); - if (__predict_false(toep->ulp_mode != ULP_MODE_NONE && - toep->ulp_mode != ULP_MODE_TCPDDP)) - CXGBE_UNIMPLEMENTED("ulp_mode"); + KASSERT(toep->ulp_mode == ULP_MODE_NONE || + toep->ulp_mode == ULP_MODE_TCPDDP || + toep->ulp_mode == ULP_MODE_RDMA, + ("%s: ulp_mode %u for toep %p", __func__, toep->ulp_mode, toep)); /* * This function doesn't resume by itself. Someone else must clear the @@ -843,9 +844,11 @@ do_peer_close(struct sge_iq *iq, const s } socantrcvmore_locked(so); /* unlocks the sockbuf */ - KASSERT(tp->rcv_nxt == be32toh(cpl->rcv_nxt), - ("%s: rcv_nxt mismatch: %u %u", __func__, tp->rcv_nxt, - be32toh(cpl->rcv_nxt))); + if (toep->ulp_mode != ULP_MODE_RDMA) { + KASSERT(tp->rcv_nxt == be32toh(cpl->rcv_nxt), + ("%s: rcv_nxt mismatch: %u %u", __func__, tp->rcv_nxt, + be32toh(cpl->rcv_nxt))); + } switch (tp->t_state) { case TCPS_SYN_RECEIVED: From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 20:54:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 27466C32 for ; Wed, 28 Aug 2013 20:54:24 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CF519270E for ; Wed, 28 Aug 2013 20:54:23 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=mime-version :content-type:content-transfer-encoding:date:from:to:cc:subject :in-reply-to:references:message-id; q=dns; s=sweb; b=P/bogI637bL 1e0GYFULG8knkI1uHlv/t7bo4lQbMDAcL5M/vYKCOpYKjzavEjfaGvFJqcMWvOL+ msAwFVhHBSwYypYc6hTXi97VaHpsMyNBu8nj/7TpCX9hSXBWSlnRAQtxjqmZbcC2 QhU9BD3p+Jh1UpIlbz858pm8I6ZoWFtk= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h= mime-version:content-type:content-transfer-encoding:date:from:to :cc:subject:in-reply-to:references:message-id; s=sweb; bh=5NdG58 pshKgiuDCCPlJJUY6/ezanikz224N3Vw4JjGc=; b=LjTFsa4O+meS1qQq3wVzQO 8hK7CKi0tCVS6c/438u7SFxWSwaBS7HsAbqjZ6Kuq3wPgmB82Zee5xadaNsXG2g4 WjiAJbA/AXGGDeas8VEuqOpUL2A3wBfdhMYTpCpFUgrzpCnKlsZByFA5LUOQePFq MSZWumcXNZt9XSpn0+0tY= Received: (qmail 968 invoked from network); 28 Aug 2013 15:54:19 -0500 Received: from unknown (HELO roundcube.xk42.net) (10.10.5.5) by sweb.xzibition.com with SMTP; 28 Aug 2013 15:54:19 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 28 Aug 2013 15:54:18 -0500 From: Bryan Drewery To: svn-src-all@freebsd.org, ken@FreeBSD.org Subject: Re: svn commit: r254627 - in head: bin/chflags bin/ls lib/libc/gen lib/libc/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/fs/msdosfs sys/fs/smbfs sys/sys sys/ufs/ufs In-Reply-To: <201308212304.r7LN4mr6058450@svn.freebsd.org> References: <201308212304.r7LN4mr6058450@svn.freebsd.org> Message-ID: <13d31864e269b87bbf573d33b0bb6494@shatow.net> X-Sender: bryan@shatow.net User-Agent: Roundcube Webmail/0.9.2 Cc: swills@FreeBSD.org, antoine@FreeBSD.org, madpilot@FreeBSD.org, kwm@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 20:54:24 -0000 On 2013-08-21 18:04, Kenneth D. Merry wrote: > Author: ken > Date: Wed Aug 21 23:04:48 2013 > New Revision: 254627 > URL: http://svnweb.freebsd.org/changeset/base/254627 > > Log: > Expand the use of stat(2) flags to allow storing some Windows/DOS > and CIFS file attributes as BSD stat(2) flags. > > This work is intended to be compatible with ZFS, the Solaris CIFS > server's interaction with ZFS, somewhat compatible with MacOS X, > and of course compatible with Windows. > > The Windows attributes that are implemented were chosen based on > the attributes that ZFS already supports. > > The summary of the flags is as follows: [...] > > UF_ARCHIVE: Command line name: "uarch", "uarchive" > ZFS_NAME: XAT_ARCHIVE, ZFS_ARCHIVE > Windows name: FILE_ATTRIBUTE_ARCHIVE > > The UF_ARCHIVED flag means that the file has changed and > needs to be archived. The meaning is same as > the Windows FILE_ATTRIBUTE_ARCHIVE attribute, and > the ZFS XAT_ARCHIVE and ZFS_ARCHIVE attribute. > > msdosfs and ZFS have special handling for this flag. > i.e. they will set it when the file changes. Is it intended that this flag is automatically added to all new and existing ZFS files? # touch test # ls -alo test -rw-r--r--- 1 root wheel uarch 0 Aug 28 15:46 test This breaks 'cp -p' to tmpfs as tmpfs does not allow this flag. # mkdir /tmp/tmpfs # mount -t tmpfs tmpfs /tmp/tmpfs # cp -f test /tmp/tmpfs cp: test: Operation not supported [...] > Modified: head/sys/ufs/ufs/ufs_vnops.c > ============================================================================== > --- head/sys/ufs/ufs/ufs_vnops.c Wed Aug 21 22:57:29 2013 (r254626) > +++ head/sys/ufs/ufs/ufs_vnops.c Wed Aug 21 23:04:48 2013 (r254627) > @@ -528,9 +528,11 @@ ufs_setattr(ap) > return (EINVAL); > } > if (vap->va_flags != VNOVAL) { > - if ((vap->va_flags & ~(UF_NODUMP | UF_IMMUTABLE | UF_APPEND | > - UF_OPAQUE | UF_NOUNLINK | SF_ARCHIVED | SF_IMMUTABLE | > - SF_APPEND | SF_NOUNLINK | SF_SNAPSHOT)) != 0) > + if ((vap->va_flags & ~(SF_APPEND | SF_ARCHIVED | SF_IMMUTABLE | > + SF_NOUNLINK | SF_SNAPSHOT | UF_APPEND | UF_ARCHIVE | > + UF_HIDDEN | UF_IMMUTABLE | UF_NODUMP | UF_NOUNLINK | > + UF_OFFLINE | UF_OPAQUE | UF_READONLY | UF_REPARSE | > + UF_SPARSE | UF_SYSTEM)) != 0) > return (EOPNOTSUPP); > if (vp->v_mount->mnt_flag & MNT_RDONLY) > return (EROFS); Seems a similar change is needed in tmpfs_subr.c:tmpfs_chflags() (antoine pointed this out) From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 20:59:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E30AFDB6; Wed, 28 Aug 2013 20:59:23 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CFBBD2735; Wed, 28 Aug 2013 20:59:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SKxNr9084371; Wed, 28 Aug 2013 20:59:23 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SKxNIN084368; Wed, 28 Aug 2013 20:59:23 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201308282059.r7SKxNIN084368@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 28 Aug 2013 20:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255006 - in 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 20:59:24 -0000 Author: np Date: Wed Aug 28 20:59:22 2013 New Revision: 255006 URL: http://svnweb.freebsd.org/changeset/base/255006 Log: Change t4_list_lock and t4_uld_list_lock from mutexes to sx'es. - tom_uninit had to be reworked not to hold the adapter lock (a mutex) around t4_deactivate_uld, which acquires the uld_list_lock. - the ifc_match for the interface cloner that creates the tracer ifnet had to be reworked as the kernel calls ifc_match with the global if_cloners_mtx held. Modified: head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_tracer.c head/sys/dev/cxgbe/tom/t4_tom.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Wed Aug 28 20:45:45 2013 (r255005) +++ head/sys/dev/cxgbe/t4_main.c Wed Aug 28 20:59:22 2013 (r255006) @@ -160,10 +160,10 @@ MALLOC_DEFINE(M_CXGBE, "cxgbe", "Chelsio * Correct lock order when you need to acquire multiple locks is t4_list_lock, * then ADAPTER_LOCK, then t4_uld_list_lock. */ -static struct mtx t4_list_lock; +static struct sx t4_list_lock; static SLIST_HEAD(, adapter) t4_list; #ifdef TCP_OFFLOAD -static struct mtx t4_uld_list_lock; +static struct sx t4_uld_list_lock; static SLIST_HEAD(, uld_info) t4_uld_list; #endif @@ -568,9 +568,9 @@ t4_attach(device_t dev) snprintf(sc->lockname, sizeof(sc->lockname), "%s", device_get_nameunit(dev)); mtx_init(&sc->sc_lock, sc->lockname, 0, MTX_DEF); - mtx_lock(&t4_list_lock); + sx_xlock(&t4_list_lock); SLIST_INSERT_HEAD(&t4_list, sc, link); - mtx_unlock(&t4_list_lock); + sx_xunlock(&t4_list_lock); mtx_init(&sc->sfl_lock, "starving freelists", 0, MTX_DEF); TAILQ_INIT(&sc->sfl); @@ -917,9 +917,9 @@ t4_detach(device_t dev) free(sc->tids.ftid_tab, M_CXGBE); t4_destroy_dma_tag(sc); if (mtx_initialized(&sc->sc_lock)) { - mtx_lock(&t4_list_lock); + sx_xlock(&t4_list_lock); SLIST_REMOVE(&t4_list, sc, adapter, link); - mtx_unlock(&t4_list_lock); + sx_xunlock(&t4_list_lock); mtx_destroy(&sc->sc_lock); } @@ -7341,7 +7341,7 @@ t4_iterate(void (*func)(struct adapter * { struct adapter *sc; - mtx_lock(&t4_list_lock); + sx_slock(&t4_list_lock); SLIST_FOREACH(sc, &t4_list, link) { /* * func should not make any assumptions about what state sc is @@ -7349,7 +7349,7 @@ t4_iterate(void (*func)(struct adapter * */ func(sc, arg); } - mtx_unlock(&t4_list_lock); + sx_sunlock(&t4_list_lock); } static int @@ -7577,7 +7577,7 @@ t4_register_uld(struct uld_info *ui) int rc = 0; struct uld_info *u; - mtx_lock(&t4_uld_list_lock); + sx_xlock(&t4_uld_list_lock); SLIST_FOREACH(u, &t4_uld_list, link) { if (u->uld_id == ui->uld_id) { rc = EEXIST; @@ -7588,7 +7588,7 @@ t4_register_uld(struct uld_info *ui) SLIST_INSERT_HEAD(&t4_uld_list, ui, link); ui->refcount = 0; done: - mtx_unlock(&t4_uld_list_lock); + sx_xunlock(&t4_uld_list_lock); return (rc); } @@ -7598,7 +7598,7 @@ t4_unregister_uld(struct uld_info *ui) int rc = EINVAL; struct uld_info *u; - mtx_lock(&t4_uld_list_lock); + sx_xlock(&t4_uld_list_lock); SLIST_FOREACH(u, &t4_uld_list, link) { if (u == ui) { @@ -7613,7 +7613,7 @@ t4_unregister_uld(struct uld_info *ui) } } done: - mtx_unlock(&t4_uld_list_lock); + sx_xunlock(&t4_uld_list_lock); return (rc); } @@ -7625,7 +7625,7 @@ t4_activate_uld(struct adapter *sc, int ASSERT_SYNCHRONIZED_OP(sc); - mtx_lock(&t4_uld_list_lock); + sx_slock(&t4_uld_list_lock); SLIST_FOREACH(ui, &t4_uld_list, link) { if (ui->uld_id == id) { @@ -7636,7 +7636,7 @@ t4_activate_uld(struct adapter *sc, int } } done: - mtx_unlock(&t4_uld_list_lock); + sx_sunlock(&t4_uld_list_lock); return (rc); } @@ -7649,7 +7649,7 @@ t4_deactivate_uld(struct adapter *sc, in ASSERT_SYNCHRONIZED_OP(sc); - mtx_lock(&t4_uld_list_lock); + sx_slock(&t4_uld_list_lock); SLIST_FOREACH(ui, &t4_uld_list, link) { if (ui->uld_id == id) { @@ -7660,7 +7660,7 @@ t4_deactivate_uld(struct adapter *sc, in } } done: - mtx_unlock(&t4_uld_list_lock); + sx_sunlock(&t4_uld_list_lock); return (rc); } @@ -7741,10 +7741,10 @@ mod_event(module_t mod, int cmd, void *a if (atomic_fetchadd_int(&loaded, 1)) break; t4_sge_modload(); - mtx_init(&t4_list_lock, "T4 adapters", 0, MTX_DEF); + sx_init(&t4_list_lock, "T4/T5 adapters"); SLIST_INIT(&t4_list); #ifdef TCP_OFFLOAD - mtx_init(&t4_uld_list_lock, "T4 ULDs", 0, MTX_DEF); + sx_init(&t4_uld_list_lock, "T4/T5 ULDs"); SLIST_INIT(&t4_uld_list); #endif t4_tracer_modload(); @@ -7756,23 +7756,23 @@ mod_event(module_t mod, int cmd, void *a break; t4_tracer_modunload(); #ifdef TCP_OFFLOAD - mtx_lock(&t4_uld_list_lock); + sx_slock(&t4_uld_list_lock); if (!SLIST_EMPTY(&t4_uld_list)) { rc = EBUSY; - mtx_unlock(&t4_uld_list_lock); + sx_sunlock(&t4_uld_list_lock); break; } - mtx_unlock(&t4_uld_list_lock); - mtx_destroy(&t4_uld_list_lock); + sx_sunlock(&t4_uld_list_lock); + sx_destroy(&t4_uld_list_lock); #endif - mtx_lock(&t4_list_lock); + sx_slock(&t4_list_lock); if (!SLIST_EMPTY(&t4_list)) { rc = EBUSY; - mtx_unlock(&t4_list_lock); + sx_sunlock(&t4_list_lock); break; } - mtx_unlock(&t4_list_lock); - mtx_destroy(&t4_list_lock); + sx_sunlock(&t4_list_lock); + sx_destroy(&t4_list_lock); break; } Modified: head/sys/dev/cxgbe/t4_tracer.c ============================================================================== --- head/sys/dev/cxgbe/t4_tracer.c Wed Aug 28 20:45:45 2013 (r255005) +++ head/sys/dev/cxgbe/t4_tracer.c Wed Aug 28 20:59:22 2013 (r255006) @@ -121,14 +121,13 @@ match_name(struct adapter *sc, void *arg static int t4_cloner_match(struct if_clone *ifc, const char *name) { - struct match_rr mrr; - mrr.name = name; - mrr.lock = 0; - mrr.sc = NULL; - t4_iterate(match_name, &mrr); - - return (mrr.sc != NULL); + if (strncmp(name, "t4nex", 5) != 0 && + strncmp(name, "t5nex", 5) != 0) + return (0); + if (name[5] < '0' || name[5] > '9') + return (0); + return (1); } static int Modified: head/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.c Wed Aug 28 20:45:45 2013 (r255005) +++ head/sys/dev/cxgbe/tom/t4_tom.c Wed Aug 28 20:59:22 2013 (r255006) @@ -1064,14 +1064,14 @@ t4_tom_mod_load(void) static void tom_uninit(struct adapter *sc, void *arg __unused) { - if (begin_synchronized_op(sc, NULL, HOLD_LOCK, "t4tomun")) + if (begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4tomun")) return; /* Try to free resources (works only if no port has IFCAP_TOE) */ if (sc->flags & TOM_INIT_DONE) t4_deactivate_uld(sc, ULD_TOM); - end_synchronized_op(sc, LOCK_HELD); + end_synchronized_op(sc, 0); } static int From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 21:10:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5CE8E17E; Wed, 28 Aug 2013 21:10:39 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4A3FF27ED; Wed, 28 Aug 2013 21:10:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SLAdKg092583; Wed, 28 Aug 2013 21:10:39 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SLAcWP092577; Wed, 28 Aug 2013 21:10:38 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308282110.r7SLAcWP092577@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 28 Aug 2013 21:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255007 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 21:10:39 -0000 Author: jilles Date: Wed Aug 28 21:10:37 2013 New Revision: 255007 URL: http://svnweb.freebsd.org/changeset/base/255007 Log: libutil: Use O_CLOEXEC for internal file descriptors from open(). Modified: head/lib/libutil/login_auth.c head/lib/libutil/login_cap.c head/lib/libutil/pidfile.c head/lib/libutil/quotafile.c head/lib/libutil/uucplock.c Modified: head/lib/libutil/login_auth.c ============================================================================== --- head/lib/libutil/login_auth.c Wed Aug 28 20:59:22 2013 (r255006) +++ head/lib/libutil/login_auth.c Wed Aug 28 21:10:37 2013 (r255007) @@ -98,7 +98,7 @@ auth_cat(const char *file) int fd, count; char buf[BUFSIZ]; - if ((fd = open(file, O_RDONLY)) < 0) + if ((fd = open(file, O_RDONLY | O_CLOEXEC)) < 0) return 0; while ((count = read(fd, buf, sizeof(buf))) > 0) (void)write(fileno(stdout), buf, count); Modified: head/lib/libutil/login_cap.c ============================================================================== --- head/lib/libutil/login_cap.c Wed Aug 28 20:59:22 2013 (r255006) +++ head/lib/libutil/login_cap.c Wed Aug 28 21:10:37 2013 (r255007) @@ -239,7 +239,7 @@ login_getclassbyname(char const *name, c break; /* Don't retry default on 'me' */ if (i == 0) r = -1; - else if ((r = open(login_dbarray[0], O_RDONLY)) >= 0) + else if ((r = open(login_dbarray[0], O_RDONLY | O_CLOEXEC)) >= 0) close(r); /* * If there's at least one login class database, Modified: head/lib/libutil/pidfile.c ============================================================================== --- head/lib/libutil/pidfile.c Wed Aug 28 20:59:22 2013 (r255006) +++ head/lib/libutil/pidfile.c Wed Aug 28 21:10:37 2013 (r255007) @@ -73,7 +73,7 @@ pidfile_read(const char *path, pid_t *pi char buf[16], *endptr; int error, fd, i; - fd = open(path, O_RDONLY); + fd = open(path, O_RDONLY | O_CLOEXEC); if (fd == -1) return (errno); Modified: head/lib/libutil/quotafile.c ============================================================================== --- head/lib/libutil/quotafile.c Wed Aug 28 20:59:22 2013 (r255006) +++ head/lib/libutil/quotafile.c Wed Aug 28 21:10:37 2013 (r255007) @@ -137,7 +137,7 @@ quota_open(struct fstab *fs, int quotaty goto error; } qf->accmode = openflags & O_ACCMODE; - if ((qf->fd = open(qf->qfname, qf->accmode)) < 0 && + if ((qf->fd = open(qf->qfname, qf->accmode|O_CLOEXEC)) < 0 && (openflags & O_CREAT) != O_CREAT) goto error; /* File open worked, so process it */ @@ -168,7 +168,8 @@ quota_open(struct fstab *fs, int quotaty /* not reached */ } /* open failed, but O_CREAT was specified, so create a new file */ - if ((qf->fd = open(qf->qfname, O_RDWR|O_CREAT|O_TRUNC, 0)) < 0) + if ((qf->fd = open(qf->qfname, O_RDWR|O_CREAT|O_TRUNC|O_CLOEXEC, 0)) < + 0) goto error; qf->wordsize = 64; memset(&dqh, 0, sizeof(dqh)); @@ -534,7 +535,8 @@ quota_convert(struct quotafile *qf, int free(newqf); return (-1); } - if ((newqf->fd = open(qf->qfname, O_RDWR|O_CREAT|O_TRUNC, 0)) < 0) { + if ((newqf->fd = open(qf->qfname, O_RDWR|O_CREAT|O_TRUNC|O_CLOEXEC, + 0)) < 0) { serrno = errno; goto error; } Modified: head/lib/libutil/uucplock.c ============================================================================== --- head/lib/libutil/uucplock.c Wed Aug 28 20:59:22 2013 (r255006) +++ head/lib/libutil/uucplock.c Wed Aug 28 21:10:37 2013 (r255007) @@ -76,7 +76,8 @@ uu_lock(const char *tty_name) pid); (void)snprintf(lckname, sizeof(lckname), _PATH_UUCPLOCK LOCKFMT, tty_name); - if ((tmpfd = creat(lcktmpname, 0664)) < 0) + if ((tmpfd = open(lcktmpname, O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC, + 0664)) < 0) GORET(0, UU_LOCK_CREAT_ERR); for (i = 0; i < MAXTRIES; i++) { @@ -88,7 +89,7 @@ uu_lock(const char *tty_name) * check to see if the process holding the lock * still exists */ - if ((fd = open(lckname, O_RDONLY)) < 0) + if ((fd = open(lckname, O_RDONLY | O_CLOEXEC)) < 0) GORET(1, UU_LOCK_OPEN_ERR); if ((pid_old = get_pid (fd, &err)) == -1) @@ -132,7 +133,7 @@ uu_lock_txfr(const char *tty_name, pid_t snprintf(lckname, sizeof(lckname), _PATH_UUCPLOCK LOCKFMT, tty_name); - if ((fd = open(lckname, O_RDWR)) < 0) + if ((fd = open(lckname, O_RDWR | O_CLOEXEC)) < 0) return UU_LOCK_OWNER_ERR; if (get_pid(fd, &err) != getpid()) err = UU_LOCK_OWNER_ERR; From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 21:36:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 276D2A10; Wed, 28 Aug 2013 21:36:55 +0000 (UTC) (envelope-from ken@kdm.org) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E6EF62970; Wed, 28 Aug 2013 21:36:54 +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 r7SLars6062842; Wed, 28 Aug 2013 15:36:53 -0600 (MDT) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.14.2/8.14.2/Submit) id r7SLar0H062841; Wed, 28 Aug 2013 15:36:53 -0600 (MDT) (envelope-from ken) Date: Wed, 28 Aug 2013 15:36:53 -0600 From: "Kenneth D. Merry" To: Bryan Drewery Subject: Re: svn commit: r254627 - in head: bin/chflags bin/ls lib/libc/gen lib/libc/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/fs/msdosfs sys/fs/smbfs sys/sys sys/ufs/ufs Message-ID: <20130828213653.GA62128@nargothrond.kdm.org> References: <201308212304.r7LN4mr6058450@svn.freebsd.org> <13d31864e269b87bbf573d33b0bb6494@shatow.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <13d31864e269b87bbf573d33b0bb6494@shatow.net> User-Agent: Mutt/1.4.2i Cc: swills@freebsd.org, svn-src-all@freebsd.org, kwm@freebsd.org, antoine@freebsd.org, madpilot@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 21:36:55 -0000 On Wed, Aug 28, 2013 at 15:54:18 -0500, Bryan Drewery wrote: > On 2013-08-21 18:04, Kenneth D. Merry wrote: > >Author: ken > >Date: Wed Aug 21 23:04:48 2013 > >New Revision: 254627 > >URL: http://svnweb.freebsd.org/changeset/base/254627 > > > >Log: > > Expand the use of stat(2) flags to allow storing some Windows/DOS > > and CIFS file attributes as BSD stat(2) flags. > > > > This work is intended to be compatible with ZFS, the Solaris CIFS > > server's interaction with ZFS, somewhat compatible with MacOS X, > > and of course compatible with Windows. > > > > The Windows attributes that are implemented were chosen based on > > the attributes that ZFS already supports. > > > > The summary of the flags is as follows: > [...] > > > > UF_ARCHIVE: Command line name: "uarch", "uarchive" > > ZFS_NAME: XAT_ARCHIVE, ZFS_ARCHIVE > > Windows name: FILE_ATTRIBUTE_ARCHIVE > > > > The UF_ARCHIVED flag means that the file has changed and > > needs to be archived. The meaning is same as > > the Windows FILE_ATTRIBUTE_ARCHIVE attribute, and > > the ZFS XAT_ARCHIVE and ZFS_ARCHIVE attribute. > > > > msdosfs and ZFS have special handling for this flag. > > i.e. they will set it when the file changes. > > Is it intended that this flag is automatically added to all new and > existing ZFS files? Yes, that is intentional. ZFS already has the flag internally, this just exposes it to FreeBSD. With ZFS at least, it is set any time a file changes. If an application clears it on files it has archived, it will know when the file has changed and it needs to archive the file again. This is the inverse (more or less) of the SF_ARCHIVED flag. With UFS, the flag is just passed through and stored. One application for this is to support CIFS servers that need to store DOS/CIFS/Windows attributes on a FreeBSD server. > # touch test > # ls -alo test > -rw-r--r--- 1 root wheel uarch 0 Aug 28 15:46 test > > This breaks 'cp -p' to tmpfs as tmpfs does not allow this flag. > > # mkdir /tmp/tmpfs > # mount -t tmpfs tmpfs /tmp/tmpfs > # cp -f test /tmp/tmpfs > cp: test: Operation not supported Right. For some filesystems, like UFS and probably tmpfs, the right answer may be to just pass through most all of the file flags, and reject specific flags that it doesn't support. For some filesystems, like smbfs, the right answer seems to be to just ignore flags that are set that aren't supported. Other filesystems, like msdosfs, support a small number of flags and reject any that aren't supported. In other words, this isn't a new problem, and it would have cropped up if you tried to copy a file with the SF_IMMUTABLE flag set from UFS to msdosfs with cp -p. > [...] > >Modified: head/sys/ufs/ufs/ufs_vnops.c > >============================================================================== > >--- head/sys/ufs/ufs/ufs_vnops.c Wed Aug 21 22:57:29 2013 (r254626) > >+++ head/sys/ufs/ufs/ufs_vnops.c Wed Aug 21 23:04:48 2013 (r254627) > >@@ -528,9 +528,11 @@ ufs_setattr(ap) > > return (EINVAL); > > } > > if (vap->va_flags != VNOVAL) { > >- if ((vap->va_flags & ~(UF_NODUMP | UF_IMMUTABLE | UF_APPEND | > >- UF_OPAQUE | UF_NOUNLINK | SF_ARCHIVED | SF_IMMUTABLE | > >- SF_APPEND | SF_NOUNLINK | SF_SNAPSHOT)) != 0) > >+ if ((vap->va_flags & ~(SF_APPEND | SF_ARCHIVED | > >SF_IMMUTABLE | > >+ SF_NOUNLINK | SF_SNAPSHOT | UF_APPEND | UF_ARCHIVE | > >+ UF_HIDDEN | UF_IMMUTABLE | UF_NODUMP | UF_NOUNLINK | > >+ UF_OFFLINE | UF_OPAQUE | UF_READONLY | UF_REPARSE | > >+ UF_SPARSE | UF_SYSTEM)) != 0) > > return (EOPNOTSUPP); > > if (vp->v_mount->mnt_flag & MNT_RDONLY) > > return (EROFS); > > Seems a similar change is needed in tmpfs_subr.c:tmpfs_chflags() > (antoine pointed this out) Sure, I can fix tmpfs. Ken -- Kenneth Merry ken@FreeBSD.ORG From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 22:12:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9A3CD503; Wed, 28 Aug 2013 22:12:56 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 877FF2BAE; Wed, 28 Aug 2013 22:12:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SMCudv026493; Wed, 28 Aug 2013 22:12:56 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SMCuRV026492; Wed, 28 Aug 2013 22:12:56 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201308282212.r7SMCuRV026492@svn.freebsd.org> From: "Kenneth D. Merry" Date: Wed, 28 Aug 2013 22:12:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255008 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 22:12:56 -0000 Author: ken Date: Wed Aug 28 22:12:56 2013 New Revision: 255008 URL: http://svnweb.freebsd.org/changeset/base/255008 Log: Support storing 7 additional file flags in tmpfs: UF_SYSTEM, UF_SPARSE, UF_OFFLINE, UF_REPARSE, UF_ARCHIVE, UF_READONLY, and UF_HIDDEN. Sort the file flags tmpfs supports alphabetically. tmpfs now supports the same flags as UFS, with the exception of SF_SNAPSHOT. Reported by: bdrewery, antoine Sponsored by: Spectra Logic Modified: head/sys/fs/tmpfs/tmpfs_subr.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Wed Aug 28 21:10:37 2013 (r255007) +++ head/sys/fs/tmpfs/tmpfs_subr.c Wed Aug 28 22:12:56 2013 (r255008) @@ -1433,9 +1433,10 @@ tmpfs_chflags(struct vnode *vp, u_long f node = VP_TO_TMPFS_NODE(vp); - if ((flags & ~(UF_NODUMP | UF_IMMUTABLE | UF_APPEND | UF_OPAQUE | - UF_NOUNLINK | SF_ARCHIVED | SF_IMMUTABLE | SF_APPEND | - SF_NOUNLINK)) != 0) + if ((flags & ~(SF_APPEND | SF_ARCHIVED | SF_IMMUTABLE | SF_NOUNLINK | + UF_APPEND | UF_ARCHIVE | UF_HIDDEN | UF_IMMUTABLE | UF_NODUMP | + UF_NOUNLINK | UF_OFFLINE | UF_OPAQUE | UF_READONLY | UF_REPARSE | + UF_SPARSE | UF_SYSTEM)) != 0) return (EOPNOTSUPP); /* Disallow this operation if the file system is mounted read-only. */ From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 22:23:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2BC44CA5 for ; Wed, 28 Aug 2013 22:23:11 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D940F2CBB for ; Wed, 28 Aug 2013 22:23:10 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=mime-version :content-type:content-transfer-encoding:date:from:to:subject :in-reply-to:references:message-id; q=dns; s=sweb; b=Smwu0HSOGZa XUg9NMGm42365Az/hCM5GF9aE8XNZDx2X7L3ZTEYQ39MIczmbB+NEmMrxDhqg5Cq QcLbfuN6b6KlR/l4Cj07HYpb/XrjAVU9892pFmXhxaVpz1GCFCBRoKlNdlNsRF3r xCZAlsiG0EePrQkPlteQ1Kp7+Q+FKVGM= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h= mime-version:content-type:content-transfer-encoding:date:from:to :subject:in-reply-to:references:message-id; s=sweb; bh=GFGJwLXTr yjM0H1uVqPihPpcDdzaOjtD2f3p/Spkdf0=; b=M1ZG7Q69Y4y+MdOgIeeRtGH+e dXiTfyrPn3N5XwN92yzUpMjj9L8K/SIL7jYjW95Ypa+w3yrpWbh47s7kQQoADiEe G3sBcMd/oRKg88G4cqX7YbynaRIhp9yiDmw241Q3bulilzYFVaQRnp1/e1uLmkS3 S+WiTxrnmxkeP43nwE= Received: (qmail 55400 invoked from network); 28 Aug 2013 17:23:03 -0500 Received: from unknown (HELO roundcube.xk42.net) (10.10.5.5) by sweb.xzibition.com with SMTP; 28 Aug 2013 17:23:03 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 28 Aug 2013 17:23:03 -0500 From: Bryan Drewery To: svn-src-all@freebsd.org Subject: Re: svn commit: r255008 - head/sys/fs/tmpfs In-Reply-To: <201308282212.r7SMCuRV026492@svn.freebsd.org> References: <201308282212.r7SMCuRV026492@svn.freebsd.org> Message-ID: <8a1a211c20ea4b3ddd276c278ffb6a3d@shatow.net> X-Sender: bryan@shatow.net User-Agent: Roundcube Webmail/0.9.2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 22:23:11 -0000 On 2013-08-28 17:12, Kenneth D. Merry wrote: > Author: ken > Date: Wed Aug 28 22:12:56 2013 > New Revision: 255008 > URL: http://svnweb.freebsd.org/changeset/base/255008 > > Log: > Support storing 7 additional file flags in tmpfs: > > UF_SYSTEM, UF_SPARSE, UF_OFFLINE, UF_REPARSE, UF_ARCHIVE, > UF_READONLY, > and UF_HIDDEN. > > Sort the file flags tmpfs supports alphabetically. tmpfs now > supports the same flags as UFS, with the exception of SF_SNAPSHOT. > > Reported by: bdrewery, antoine > Sponsored by: Spectra Logic > > Modified: > head/sys/fs/tmpfs/tmpfs_subr.c > Thanks! From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 22:57:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5515A8E4; Wed, 28 Aug 2013 22:57:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 427F02EB5; Wed, 28 Aug 2013 22:57:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SMvoSE049411; Wed, 28 Aug 2013 22:57:50 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SMvoQ6049410; Wed, 28 Aug 2013 22:57:50 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201308282257.r7SMvoQ6049410@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 28 Aug 2013 22:57:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255009 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 22:57:50 -0000 Author: jkim Date: Wed Aug 28 22:57:49 2013 New Revision: 255009 URL: http://svnweb.freebsd.org/changeset/base/255009 Log: Fix a compiler warning. With this fix, a negative time can be converted to a struct timeval and back to the original nanoseconds correctly. Modified: head/sys/dev/drm2/drm_irq.c Modified: head/sys/dev/drm2/drm_irq.c ============================================================================== --- head/sys/dev/drm2/drm_irq.c Wed Aug 28 22:12:56 2013 (r255008) +++ head/sys/dev/drm2/drm_irq.c Wed Aug 28 22:57:49 2013 (r255009) @@ -210,7 +210,7 @@ struct timeval ns_to_timeval(const int64_t nsec) { struct timeval tv; - uint32_t rem; + long rem; if (nsec == 0) { tv.tv_sec = 0; From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 23:00:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4D88CA8F; Wed, 28 Aug 2013 23:00:35 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3947C2EEC; Wed, 28 Aug 2013 23:00:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SN0ZZR052483; Wed, 28 Aug 2013 23:00:35 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SN0YIt052479; Wed, 28 Aug 2013 23:00:34 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201308282300.r7SN0YIt052479@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 28 Aug 2013 23:00:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255010 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 23:00:35 -0000 Author: np Date: Wed Aug 28 23:00:34 2013 New Revision: 255010 URL: http://svnweb.freebsd.org/changeset/base/255010 Log: Merge r254336 from user/np/cxl_tuning. Add a last-modified timestamp to each LRO entry and provide an interface to flush all inactive entries. Drivers decide when to flush and what the inactivity threshold should be. Network drivers that process an rx queue to completion can enter a livelock type situation when the rate at which packets are received reaches equilibrium with the rate at which the rx thread is processing them. When this happens the final LRO flush (normally when the rx routine is done) does not occur. Pure ACKs and segments with total payload < 64K can get stuck in an LRO entry. Symptoms are that TCP tx-mostly connections' performance falls off a cliff during heavy, unrelated rx on the interface. Flushing only inactive LRO entries works better than any of these alternates that I tried: - don't LRO pure ACKs - flush _all_ LRO entries periodically (every 'x' microseconds or every 'y' descriptors) - stop rx processing in the driver periodically and schedule remaining work for later. Reviewed by: andre Modified: head/sys/netinet/tcp_lro.c head/sys/netinet/tcp_lro.h Directory Properties: head/sys/ (props changed) Modified: head/sys/netinet/tcp_lro.c ============================================================================== --- head/sys/netinet/tcp_lro.c Wed Aug 28 22:57:49 2013 (r255009) +++ head/sys/netinet/tcp_lro.c Wed Aug 28 23:00:34 2013 (r255010) @@ -194,6 +194,25 @@ tcp_lro_rx_csum_fixup(struct lro_entry * #endif void +tcp_lro_flush_inactive(struct lro_ctrl *lc, const struct timeval *timeout) +{ + struct lro_entry *le, *le_tmp; + struct timeval tv; + + if (SLIST_EMPTY(&lc->lro_active)) + return; + + getmicrotime(&tv); + timevalsub(&tv, timeout); + SLIST_FOREACH_SAFE(le, &lc->lro_active, next, le_tmp) { + if (timevalcmp(&tv, &le->mtime, >=)) { + SLIST_REMOVE(&lc->lro_active, le, lro_entry, next); + tcp_lro_flush(lc, le); + } + } +} + +void tcp_lro_flush(struct lro_ctrl *lc, struct lro_entry *le) { @@ -543,7 +562,8 @@ tcp_lro_rx(struct lro_ctrl *lc, struct m if (le->p_len > (65535 - lc->ifp->if_mtu)) { SLIST_REMOVE(&lc->lro_active, le, lro_entry, next); tcp_lro_flush(lc, le); - } + } else + getmicrotime(&le->mtime); return (0); } @@ -556,6 +576,7 @@ tcp_lro_rx(struct lro_ctrl *lc, struct m le = SLIST_FIRST(&lc->lro_free); SLIST_REMOVE_HEAD(&lc->lro_free, next); SLIST_INSERT_HEAD(&lc->lro_active, le, next); + getmicrotime(&le->mtime); /* Start filling in details. */ switch (eh_type) { Modified: head/sys/netinet/tcp_lro.h ============================================================================== --- head/sys/netinet/tcp_lro.h Wed Aug 28 22:57:49 2013 (r255009) +++ head/sys/netinet/tcp_lro.h Wed Aug 28 23:00:34 2013 (r255010) @@ -30,6 +30,8 @@ #ifndef _TCP_LRO_H_ #define _TCP_LRO_H_ +#include + struct lro_entry { SLIST_ENTRY(lro_entry) next; @@ -59,6 +61,7 @@ struct lro_entry uint32_t tsecr; uint16_t window; uint16_t timestamp; /* flag, not a TCP hdr field. */ + struct timeval mtime; }; SLIST_HEAD(lro_head, lro_entry); @@ -83,6 +86,7 @@ struct lro_ctrl { int tcp_lro_init(struct lro_ctrl *); void tcp_lro_free(struct lro_ctrl *); +void tcp_lro_flush_inactive(struct lro_ctrl *, const struct timeval *); void tcp_lro_flush(struct lro_ctrl *, struct lro_entry *); int tcp_lro_rx(struct lro_ctrl *, struct mbuf *, uint32_t); From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 23:15:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1CA77E1D; Wed, 28 Aug 2013 23:15:06 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 09E252F93; Wed, 28 Aug 2013 23:15:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SNF5qI059908; Wed, 28 Aug 2013 23:15:05 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SNF5nT059907; Wed, 28 Aug 2013 23:15:05 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201308282315.r7SNF5nT059907@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 28 Aug 2013 23:15:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255011 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 23:15:06 -0000 Author: np Date: Wed Aug 28 23:15:05 2013 New Revision: 255011 URL: http://svnweb.freebsd.org/changeset/base/255011 Log: Whitespace nit. Modified: head/sys/dev/cxgbe/t4_tracer.c Modified: head/sys/dev/cxgbe/t4_tracer.c ============================================================================== --- head/sys/dev/cxgbe/t4_tracer.c Wed Aug 28 23:00:34 2013 (r255010) +++ head/sys/dev/cxgbe/t4_tracer.c Wed Aug 28 23:15:05 2013 (r255011) @@ -465,7 +465,7 @@ tracer_ioctl(struct ifnet *ifp, unsigned switch (cmd) { case SIOCSIFMTU: case SIOCSIFFLAGS: - case SIOCADDMULTI: + case SIOCADDMULTI: case SIOCDELMULTI: case SIOCSIFCAP: break; From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 23:43:28 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9FC6C703; Wed, 28 Aug 2013 23:43:28 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8CC452130; Wed, 28 Aug 2013 23:43:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SNhSjo075319; Wed, 28 Aug 2013 23:43:28 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SNhSRS075318; Wed, 28 Aug 2013 23:43:28 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201308282343.r7SNhSRS075318@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 28 Aug 2013 23:43:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255012 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 23:43:28 -0000 Author: jkim Date: Wed Aug 28 23:43:28 2013 New Revision: 255012 URL: http://svnweb.freebsd.org/changeset/base/255012 Log: Fix a compiler warning and add couple of VM map types. Modified: head/sys/dev/drm2/drm_sysctl.c Modified: head/sys/dev/drm2/drm_sysctl.c ============================================================================== --- head/sys/dev/drm2/drm_sysctl.c Wed Aug 28 23:15:05 2013 (r255011) +++ head/sys/dev/drm2/drm_sysctl.c Wed Aug 28 23:43:28 2013 (r255012) @@ -177,7 +177,15 @@ static int drm_vm_info DRM_SYSCTL_HANDLE { struct drm_device *dev = arg1; drm_local_map_t *map, *tempmaps; - const char *types[] = { "FB", "REG", "SHM", "AGP", "SG" }; + const char *types[] = { + [_DRM_FRAME_BUFFER] = "FB", + [_DRM_REGISTERS] = "REG", + [_DRM_SHM] = "SHM", + [_DRM_AGP] = "AGP", + [_DRM_SCATTER_GATHER] = "SG", + [_DRM_CONSISTENT] = "CONS", + [_DRM_GEM] = "GEM" + }; const char *type, *yesno; int i, mapcount; char buf[128]; @@ -211,10 +219,20 @@ static int drm_vm_info DRM_SYSCTL_HANDLE for (i = 0; i < mapcount; i++) { map = &tempmaps[i]; - if (map->type < 0 || map->type > 4) + switch(map->type) { + default: type = "??"; - else + break; + case _DRM_FRAME_BUFFER: + case _DRM_REGISTERS: + case _DRM_SHM: + case _DRM_AGP: + case _DRM_SCATTER_GATHER: + case _DRM_CONSISTENT: + case _DRM_GEM: type = types[map->type]; + break; + } if (!map->mtrr) yesno = "no"; From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 23:59:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 93429B86; Wed, 28 Aug 2013 23:59:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7DCCA21EA; Wed, 28 Aug 2013 23:59:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7SNxdUS082753; Wed, 28 Aug 2013 23:59:39 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7SNxcFe082750; Wed, 28 Aug 2013 23:59:38 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201308282359.r7SNxcFe082750@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 28 Aug 2013 23:59:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255013 - head/sys/dev/drm2/i915 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 23:59:39 -0000 Author: jkim Date: Wed Aug 28 23:59:38 2013 New Revision: 255013 URL: http://svnweb.freebsd.org/changeset/base/255013 Log: Correct atomic operations in i915. Modified: head/sys/dev/drm2/i915/i915_gem.c head/sys/dev/drm2/i915/i915_gem_execbuffer.c head/sys/dev/drm2/i915/intel_display.c Modified: head/sys/dev/drm2/i915/i915_gem.c ============================================================================== --- head/sys/dev/drm2/i915/i915_gem.c Wed Aug 28 23:43:28 2013 (r255012) +++ head/sys/dev/drm2/i915/i915_gem.c Wed Aug 28 23:59:38 2013 (r255013) @@ -141,7 +141,7 @@ i915_gem_wait_for_error(struct drm_devic } mtx_unlock(&dev_priv->error_completion_lock); - if (atomic_read(&dev_priv->mm.wedged)) { + if (atomic_load_acq_int(&dev_priv->mm.wedged)) { mtx_lock(&dev_priv->error_completion_lock); dev_priv->error_completion++; mtx_unlock(&dev_priv->error_completion_lock); @@ -743,7 +743,7 @@ i915_gem_ring_throttle(struct drm_device int ret; dev_priv = dev->dev_private; - if (atomic_read(&dev_priv->mm.wedged)) + if (atomic_load_acq_int(&dev_priv->mm.wedged)) return (-EIO); file_priv = file->driver_priv; @@ -768,15 +768,15 @@ i915_gem_ring_throttle(struct drm_device if (ring->irq_get(ring)) { while (ret == 0 && !(i915_seqno_passed(ring->get_seqno(ring), seqno) || - atomic_read(&dev_priv->mm.wedged))) + atomic_load_acq_int(&dev_priv->mm.wedged))) ret = -msleep(ring, &ring->irq_lock, PCATCH, "915thr", 0); ring->irq_put(ring); - if (ret == 0 && atomic_read(&dev_priv->mm.wedged)) + if (ret == 0 && atomic_load_acq_int(&dev_priv->mm.wedged)) ret = -EIO; } else if (_intel_wait_for(dev, i915_seqno_passed(ring->get_seqno(ring), seqno) || - atomic_read(&dev_priv->mm.wedged), 3000, 0, "915rtr")) { + atomic_load_acq_int(&dev_priv->mm.wedged), 3000, 0, "915rtr")) { ret = -EBUSY; } } Modified: head/sys/dev/drm2/i915/i915_gem_execbuffer.c ============================================================================== --- head/sys/dev/drm2/i915/i915_gem_execbuffer.c Wed Aug 28 23:43:28 2013 (r255012) +++ head/sys/dev/drm2/i915/i915_gem_execbuffer.c Wed Aug 28 23:59:38 2013 (r255013) @@ -192,7 +192,7 @@ i915_gem_object_set_to_gpu_domain(struct i915_gem_clflush_object(obj); if (obj->base.pending_write_domain) - cd->flips |= atomic_read(&obj->pending_flip); + cd->flips |= atomic_load_acq_int(&obj->pending_flip); /* The actual obj->write_domain will be updated with * pending_write_domain after we emit the accumulated flush for all Modified: head/sys/dev/drm2/i915/intel_display.c ============================================================================== --- head/sys/dev/drm2/i915/intel_display.c Wed Aug 28 23:43:28 2013 (r255012) +++ head/sys/dev/drm2/i915/intel_display.c Wed Aug 28 23:59:38 2013 (r255013) @@ -2261,8 +2261,8 @@ intel_finish_fb(struct drm_framebuffer * int ret; mtx_lock(&dev->event_lock); - while (!atomic_read(&dev_priv->mm.wedged) && - atomic_read(&obj->pending_flip) != 0) { + while (!atomic_load_acq_int(&dev_priv->mm.wedged) && + atomic_load_acq_int(&obj->pending_flip) != 0) { msleep(&obj->pending_flip, &dev->event_lock, 0, "915flp", 0); } @@ -2948,7 +2948,7 @@ static void intel_crtc_wait_for_pending_ dev = crtc->dev; dev_priv = dev->dev_private; mtx_lock(&dev->event_lock); - while (atomic_read(&obj->pending_flip) != 0) + while (atomic_load_acq_int(&obj->pending_flip) != 0) msleep(&obj->pending_flip, &dev->event_lock, 0, "915wfl", 0); mtx_unlock(&dev->event_lock); } @@ -7333,7 +7333,7 @@ static void do_intel_finish_page_flip(st obj = work->old_fb_obj; atomic_clear_int(&obj->pending_flip, 1 << intel_crtc->plane); - if (atomic_read(&obj->pending_flip) == 0) + if (atomic_load_acq_int(&obj->pending_flip) == 0) wakeup(&obj->pending_flip); mtx_unlock(&dev->event_lock); @@ -7640,7 +7640,7 @@ static int intel_crtc_page_flip(struct d return 0; cleanup_pending: - atomic_sub(1 << intel_crtc->plane, &work->old_fb_obj->pending_flip); + atomic_clear_int(&work->old_fb_obj->pending_flip, 1 << intel_crtc->plane); drm_gem_object_unreference(&work->old_fb_obj->base); drm_gem_object_unreference(&obj->base); DRM_UNLOCK(dev); From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 00:38:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BBD469F7; Thu, 29 Aug 2013 00:38:25 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8E7E62440; Thu, 29 Aug 2013 00:38:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7T0cPUu005148; Thu, 29 Aug 2013 00:38:25 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7T0cPXZ005138; Thu, 29 Aug 2013 00:38:25 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201308290038.r7T0cPXZ005138@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 29 Aug 2013 00:38:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255014 - in head: gnu/usr.bin/patch share/mk tools/build/options usr.bin/patch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 00:38:25 -0000 Author: pfg Date: Thu Aug 29 00:38:24 2013 New Revision: 255014 URL: http://svnweb.freebsd.org/changeset/base/255014 Log: Drop build option switch for the older GNU patch. As promised, drop the option to make the older GNU patch the default. GNU patch is still being built but something drastic may happen to it to it before Release. Deleted: head/tools/build/options/WITH_GNU_PATCH Modified: head/gnu/usr.bin/patch/Makefile head/share/mk/bsd.own.mk head/usr.bin/patch/Makefile Modified: head/gnu/usr.bin/patch/Makefile ============================================================================== --- head/gnu/usr.bin/patch/Makefile Wed Aug 28 23:59:38 2013 (r255013) +++ head/gnu/usr.bin/patch/Makefile Thu Aug 29 00:38:24 2013 (r255014) @@ -1,16 +1,10 @@ # $FreeBSD$ -.include - -.if ${MK_GNU_PATCH} == "yes" -PROG= patch -.else PROG= gnupatch CLEANFILES+= gnupatch.1 gnupatch.1: patch.1 cp ${.ALLSRC} ${.TARGET} -.endif SRCS= backupfile.c inp.c patch.c pch.c util.c version.c CFLAGS+=-DHAVE_CONFIG_H Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Wed Aug 28 23:59:38 2013 (r255013) +++ head/share/mk/bsd.own.mk Thu Aug 29 00:38:24 2013 (r255014) @@ -373,7 +373,6 @@ __DEFAULT_NO_OPTIONS = \ CLANG_EXTRAS \ CTF \ DEBUG_FILES \ - GNU_PATCH \ GPL_DTC \ HESIOD \ LIBICONV_COMPAT \ Modified: head/usr.bin/patch/Makefile ============================================================================== --- head/usr.bin/patch/Makefile Wed Aug 28 23:59:38 2013 (r255013) +++ head/usr.bin/patch/Makefile Thu Aug 29 00:38:24 2013 (r255014) @@ -1,17 +1,7 @@ # $OpenBSD: Makefile,v 1.4 2005/05/16 15:22:46 espie Exp $ # $FreeBSD$ -.include - -.if ${MK_GNU_PATCH} == "yes" -PROG= bsdpatch -CLEANFILES+= bsdpatch.1 - -bsdpatch.1: patch.1 - cp ${.ALLSRC} ${.TARGET} -.else PROG= patch -.endif SRCS= backupfile.c inp.c mkpath.c patch.c pch.c util.c From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 06:26:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 40EFD52F; Thu, 29 Aug 2013 06:26:23 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 151C82545; Thu, 29 Aug 2013 06:26:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7T6QMwH004419; Thu, 29 Aug 2013 06:26:22 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7T6QMfD004393; Thu, 29 Aug 2013 06:26:22 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201308290626.r7T6QMfD004393@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 29 Aug 2013 06:26:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255015 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 06:26:23 -0000 Author: np Date: Thu Aug 29 06:26:22 2013 New Revision: 255015 URL: http://svnweb.freebsd.org/changeset/base/255015 Log: Merge r254386 from user/np/cxl_tuning. Add an INET|INET6 check missing in said revision. r254386: Flush inactive LRO entries periodically. Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c Directory Properties: head/sys/ (props changed) Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Thu Aug 29 00:38:24 2013 (r255014) +++ head/sys/dev/cxgbe/adapter.h Thu Aug 29 06:26:22 2013 (r255015) @@ -559,6 +559,7 @@ struct adapter { bus_dma_tag_t dmat; /* Parent DMA tag */ struct sge sge; + int lro_timeout; struct taskqueue *tq[NCHAN]; /* taskqueues that flush data out */ struct port_info *port[MAX_NPORTS]; Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Aug 29 00:38:24 2013 (r255014) +++ head/sys/dev/cxgbe/t4_main.c Thu Aug 29 06:26:22 2013 (r255015) @@ -4229,6 +4229,10 @@ t4_sysctls(struct adapter *sc) t4_sge_sysctls(sc, ctx, children); + sc->lro_timeout = 100; + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "lro_timeout", CTLFLAG_RW, + &sc->lro_timeout, 0, "lro inactive-flush timeout (in us)"); + #ifdef SBUF_DRAIN /* * dev.t4nex.X.misc. Marked CTLFLAG_SKIP to avoid information overload. Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Thu Aug 29 00:38:24 2013 (r255014) +++ head/sys/dev/cxgbe/t4_sge.c Thu Aug 29 06:26:22 2013 (r255015) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1006,6 +1007,9 @@ service_iq(struct sge_iq *iq, int budget uint32_t lq; struct mbuf *m0; STAILQ_HEAD(, sge_iq) iql = STAILQ_HEAD_INITIALIZER(iql); +#if defined(INET) || defined(INET6) + const struct timeval lro_timeout = {0, sc->lro_timeout}; +#endif limit = budget ? budget : iq->qsize / 8; @@ -1111,6 +1115,14 @@ service_iq(struct sge_iq *iq, int budget V_SEINTARM(V_QINTR_TIMER_IDX(X_TIMERREG_UPDATE_CIDX))); ndescs = 0; +#if defined(INET) || defined(INET6) + if (iq->flags & IQ_LRO_ENABLED && + sc->lro_timeout != 0) { + tcp_lro_flush_inactive(&rxq->lro, + &lro_timeout); + } +#endif + if (fl_bufs_used > 0) { FL_LOCK(fl); fl->needed += fl_bufs_used; From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 08:07:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0383221B; Thu, 29 Aug 2013 08:07:36 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E42C92D98; Thu, 29 Aug 2013 08:07:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7T87ZGM059518; Thu, 29 Aug 2013 08:07:35 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7T87Zs0059517; Thu, 29 Aug 2013 08:07:35 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201308290807.r7T87Zs0059517@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 29 Aug 2013 08:07:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255016 - head/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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 08:07:36 -0000 Author: np Date: Thu Aug 29 08:07:35 2013 New Revision: 255016 URL: http://svnweb.freebsd.org/changeset/base/255016 Log: Merge r254736 from user/np/cxl_tuning. Don't leak tags when M_NOFREE | M_PKTHDR mbufs are freed. Reviewed by: andre Modified: head/sys/sys/mbuf.h Directory Properties: head/sys/ (props changed) Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Thu Aug 29 06:26:22 2013 (r255015) +++ head/sys/sys/mbuf.h Thu Aug 29 08:07:35 2013 (r255016) @@ -646,18 +646,6 @@ m_getcl(int how, short type, int flags) return (uma_zalloc_arg(zone_pack, &args, how)); } -static __inline struct mbuf * -m_free(struct mbuf *m) -{ - struct mbuf *n = m->m_next; - - if (m->m_flags & M_EXT) - mb_free_ext(m); - else if ((m->m_flags & M_NOFREE) == 0) - uma_zfree(zone_mbuf, m); - return (n); -} - static __inline void m_clget(struct mbuf *m, int how) { @@ -1124,6 +1112,20 @@ m_tag_find(struct mbuf *m, int type, str m_tag_locate(m, MTAG_ABI_COMPAT, type, start)); } +static __inline struct mbuf * +m_free(struct mbuf *m) +{ + struct mbuf *n = m->m_next; + + if ((m->m_flags & (M_PKTHDR|M_NOFREE)) == (M_PKTHDR|M_NOFREE)) + m_tag_delete_chain(m, NULL); + if (m->m_flags & M_EXT) + mb_free_ext(m); + else if ((m->m_flags & M_NOFREE) == 0) + uma_zfree(zone_mbuf, m); + return (n); +} + static int inline rt_m_getfib(struct mbuf *m) { From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 08:14:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 510634D9; Thu, 29 Aug 2013 08:14:54 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B4CC22E00; Thu, 29 Aug 2013 08:14:53 +0000 (UTC) Received: from mail3.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.13.6/8.13.6) with ESMTP id r7T7uWj2008923; Thu, 29 Aug 2013 09:56:32 +0200 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail3.siemens.de (8.13.6/8.13.6) with ESMTP id r7T7uVXD031666; Thu, 29 Aug 2013 09:56:31 +0200 Received: (from localhost) by curry.mchp.siemens.de (8.14.7/8.14.7) id r7T7uVus053470; Date: Thu, 29 Aug 2013 09:56:31 +0200 From: Andre Albsmeier To: Erwin Lansing Subject: Re: svn commit: r254897 - in stable/9: contrib/bind9 contrib/bind9/bin contrib/bind9/bin/check contrib/bind9/bin/confgen contrib/bind9/bin/dig contrib/bind9/bin/dig/include/dig contrib/bind9/bin/dnssec... Message-ID: <20130829075631.GA96113@bali> References: <201308260717.r7Q7HgMF073297@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <201308260717.r7Q7HgMF073297@svn.freebsd.org> X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org, Andre.Albsmeier@siemens.com X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 08:14:54 -0000 On Mon, 26-Aug-2013 at 07:17:42 +0000, Erwin Lansing wrote: > Author: erwin > Date: Mon Aug 26 07:17:41 2013 > New Revision: 254897 > URL: http://svnweb.freebsd.org/changeset/base/254897 >=20 > Log: > MFC r254651: > =20 > Update Bind to 9.9.3-P2 Thanks! However, when enabling WITH_BIND_SIGCHASE in make.conf I get: cc -O2 -pipe -DVERSION=3D'"9.9.3-P2"' -DHAVE_CONFIG_H -D_REENTRANT -D_THREA= D_SAFE -DOPENSSL -DUSE_MD5 -DNS_LOCALSTATEDIR=3D'"/var"' -DNS_SYSCONFDIR=3D= '"/etc/namedb"' -DNAMED_CONFFILE=3D'"/etc/namedb/named.conf"' -DRNDC_CONFFI= LE=3D'"/etc/namedb/rndc.conf"' -DRNDC_KEYFILE=3D'"/etc/namedb/rndc.key"' -I= /src/src-9/usr.bin/dig/../../lib/bind -DDIG_SIGCHASE -I/src/src-9/usr.bin/d= ig/../../contrib/bind9/lib/bind9/include -I/src/src-9/usr.bin/dig/../../con= trib/bind9/lib/dns/include/dst -I/src/src-9/usr.bin/dig/../../contrib/bind= 9/lib/dns/include -I/src/src-9/usr.bin/dig/../../lib/bind/dns -I/src/src-9= /usr.bin/dig/../../contrib/bind9/lib/isccc/include -I/src/src-9/usr.bin/dig= /../../contrib/bind9/lib/isccfg/include -I/src/src-9/usr.bin/dig/../../cont= rib/bind9/lib/isc/unix/include -I/src/src-9/usr.bin/dig/../../contrib/bind= 9/lib/isc/pthreads/include -I/src/src-9/usr.bin/dig/../../contrib/bind9/li= b/isc/include -I/src/src-9/usr.bin/dig/../../lib/bind/isc -I/src/src-9/usr= =2Ebin/dig/../../contrib/bind9/lib/lwres/unix/include -I/src/src-9/usr.bin= /dig/../../contrib/bind9/lib/lwres/include -I/src/src-9/usr.bin/dig/../../= lib/bind/lwres -I/src/src-9/usr.bin/dig/../../contrib/bind9/bin/dig/include= -I/src/src-9/usr.bin/dig/../../contrib/bind9/lib/isc/x86_32/include -UENAB= LE_ALTQ -std=3Dgnu99 -fstack-protector -Wsystem-headers -Werror -Wno-pointe= r-sign -c /src/src-9/usr.bin/dig/../../contrib/bind9/bin/dig/dighost.c cc1: warnings being treated as errors /src/src-9/usr.bin/dig/../../contrib/bind9/bin/dig/dighost.c: In function '= nameFromString': /src/src-9/usr.bin/dig/../../contrib/bind9/bin/dig/dighost.c:4336: warning:= passing argument 2 of 'isc__buffer_init' discards qualifiers from pointer = target type *** [dighost.o] Error code 1 How should we deal with this? Changing the Makefiles of dig, host and nslookup to WARNS?=3D0 or patching dighost.c in contrib/bind9 directly? --- dighost.c.ORI 2013-08-27 08:31:49.000000000 +0200 +++ dighost.c 2013-08-29 09:54:43.000000000 +0200 @@ -4333,7 +4333,7 @@ REQUIRE(p_ret !=3D NULL); REQUIRE(str !=3D NULL); =20 - isc_buffer_init(&buffer, str, len); + isc_buffer_init(&buffer, (char*)str, len); isc_buffer_add(&buffer, len); =20 dns_fixedname_init(&fixedname); Thanks, -Andre From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 09:33:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2E3C3DEF; Thu, 29 Aug 2013 09:33:12 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1ABE52339; Thu, 29 Aug 2013 09:33:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7T9XBWL007573; Thu, 29 Aug 2013 09:33:11 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7T9XAc9007563; Thu, 29 Aug 2013 09:33:10 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201308290933.r7T9XAc9007563@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 29 Aug 2013 09:33:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255017 - in stable/9: sbin/geom/class/part sys/geom/part X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 09:33:12 -0000 Author: ae Date: Thu Aug 29 09:33:10 2013 New Revision: 255017 URL: http://svnweb.freebsd.org/changeset/base/255017 Log: MFC r251587 (by marcel): Remove stub implementation. MFC r251588 (by marcel): Change the set and unset ctlreqs by making the index argument optional. This allows setting attributes on tables. One simply does not provide an index in that case. Otherwise the entry corresponding the index has the attribute set or unset. Use this change to fix a relatively longstanding bug in our GPT scheme that's the result of rev 198097 (relatively harmless) followed by rev 237057 (damaging). The damaging part being that our GPT scheme always has the active flag set on the PMBR slice. This is in violation with EFI. Existing EFI implementions for both x86 and ia64 reject the GPT. As such, GPT disks created by us aren't usable under EFI because of that. After this change, GPT disks never have the active flag set on the PMBR slice. In order to make the GPT disk bootable under some x86 BIOSes, the reason of rev 198097, one must now set the active attribute on the gpt table. The kernel will apply this to the PMBR slice For (S)ATA: gpart set -a active ada0 To fix an existing GPT disk that has the active flag set in the PMBR, and that does not need the flag, use (again for (S)ATA): gpart unset -a active ada0 The EBR, MBR & PC98 schemes, which also impement at least 1 attribute, now check to make sure the entry passed is valid. They do not have attributes that apply to the table. Modified: stable/9/sbin/geom/class/part/geom_part.c stable/9/sys/geom/part/g_part.c stable/9/sys/geom/part/g_part_ebr.c stable/9/sys/geom/part/g_part_gpt.c stable/9/sys/geom/part/g_part_ldm.c stable/9/sys/geom/part/g_part_mbr.c stable/9/sys/geom/part/g_part_pc98.c Directory Properties: stable/9/sbin/geom/class/part/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sbin/geom/class/part/geom_part.c ============================================================================== --- stable/9/sbin/geom/class/part/geom_part.c Thu Aug 29 08:07:35 2013 (r255016) +++ stable/9/sbin/geom/class/part/geom_part.c Thu Aug 29 09:33:10 2013 (r255017) @@ -147,10 +147,10 @@ struct g_command PUBSYM(class_commands)[ }, { "set", 0, gpart_issue, { { 'a', "attrib", NULL, G_TYPE_STRING }, - { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_NUMBER }, + { 'i', GPART_PARAM_INDEX, G_VAL_OPTIONAL, G_TYPE_NUMBER }, { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, - "-a attrib -i index [-f flags] geom" + "-a attrib [-i index] [-f flags] geom" }, { "show", 0, gpart_show, { { 'l', "show_label", NULL, G_TYPE_BOOL }, @@ -164,10 +164,10 @@ struct g_command PUBSYM(class_commands)[ }, { "unset", 0, gpart_issue, { { 'a', "attrib", NULL, G_TYPE_STRING }, - { 'i', GPART_PARAM_INDEX, NULL, G_TYPE_NUMBER }, + { 'i', GPART_PARAM_INDEX, G_VAL_OPTIONAL, G_TYPE_NUMBER }, { 'f', "flags", GPART_FLAGS, G_TYPE_STRING }, G_OPT_SENTINEL }, - "-a attrib -i index [-f flags] geom" + "-a attrib [-i index] [-f flags] geom" }, { "resize", 0, gpart_issue, { { 'a', "alignment", GPART_AUTOFILL, G_TYPE_STRING }, Modified: stable/9/sys/geom/part/g_part.c ============================================================================== --- stable/9/sys/geom/part/g_part.c Thu Aug 29 08:07:35 2013 (r255016) +++ stable/9/sys/geom/part/g_part.c Thu Aug 29 09:33:10 2013 (r255017) @@ -1348,16 +1348,20 @@ g_part_ctl_setunset(struct gctl_req *req table = gp->softc; - LIST_FOREACH(entry, &table->gpt_entry, gpe_entry) { - if (entry->gpe_deleted || entry->gpe_internal) - continue; - if (entry->gpe_index == gpp->gpp_index) - break; - } - if (entry == NULL) { - gctl_error(req, "%d index '%d'", ENOENT, gpp->gpp_index); - return (ENOENT); - } + if (gpp->gpp_parms & G_PART_PARM_INDEX) { + LIST_FOREACH(entry, &table->gpt_entry, gpe_entry) { + if (entry->gpe_deleted || entry->gpe_internal) + continue; + if (entry->gpe_index == gpp->gpp_index) + break; + } + if (entry == NULL) { + gctl_error(req, "%d index '%d'", ENOENT, + gpp->gpp_index); + return (ENOENT); + } + } else + entry = NULL; error = G_PART_SETUNSET(table, entry, gpp->gpp_attrib, set); if (error) { @@ -1370,8 +1374,11 @@ g_part_ctl_setunset(struct gctl_req *req sb = sbuf_new_auto(); sbuf_printf(sb, "%s %sset on ", gpp->gpp_attrib, (set) ? "" : "un"); - G_PART_FULLNAME(table, entry, sb, gp->name); - sbuf_printf(sb, "\n"); + if (entry) + G_PART_FULLNAME(table, entry, sb, gp->name); + else + sbuf_cat(sb, gp->name); + sbuf_cat(sb, "\n"); sbuf_finish(sb); gctl_set_param(req, "output", sbuf_data(sb), sbuf_len(sb) + 1); sbuf_delete(sb); @@ -1577,8 +1584,8 @@ g_part_ctlreq(struct gctl_req *req, stru case 's': if (!strcmp(verb, "set")) { ctlreq = G_PART_CTL_SET; - mparms |= G_PART_PARM_ATTRIB | G_PART_PARM_GEOM | - G_PART_PARM_INDEX; + mparms |= G_PART_PARM_ATTRIB | G_PART_PARM_GEOM; + oparms |= G_PART_PARM_INDEX; } break; case 'u': @@ -1588,8 +1595,8 @@ g_part_ctlreq(struct gctl_req *req, stru modifies = 0; } else if (!strcmp(verb, "unset")) { ctlreq = G_PART_CTL_UNSET; - mparms |= G_PART_PARM_ATTRIB | G_PART_PARM_GEOM | - G_PART_PARM_INDEX; + mparms |= G_PART_PARM_ATTRIB | G_PART_PARM_GEOM; + oparms |= G_PART_PARM_INDEX; } break; } Modified: stable/9/sys/geom/part/g_part_ebr.c ============================================================================== --- stable/9/sys/geom/part/g_part_ebr.c Thu Aug 29 08:07:35 2013 (r255016) +++ stable/9/sys/geom/part/g_part_ebr.c Thu Aug 29 09:33:10 2013 (r255017) @@ -540,6 +540,8 @@ g_part_ebr_setunset(struct g_part_table struct g_part_ebr_entry *entry; int changed; + if (baseentry == NULL) + return (ENODEV); if (strcasecmp(attrib, "active") != 0) return (EINVAL); Modified: stable/9/sys/geom/part/g_part_gpt.c ============================================================================== --- stable/9/sys/geom/part/g_part_gpt.c Thu Aug 29 08:07:35 2013 (r255016) +++ stable/9/sys/geom/part/g_part_gpt.c Thu Aug 29 09:33:10 2013 (r255017) @@ -260,6 +260,16 @@ gpt_map_type(struct uuid *t) return (0); } +static void +gpt_create_pmbr(struct g_part_gpt_table *table, struct g_provider *pp) +{ + + bzero(table->mbr + DOSPARTOFF, DOSPARTSIZE * NDOSPART); + gpt_write_mbr_entry(table->mbr, 0, 0xee, 1, + MIN(pp->mediasize / pp->sectorsize - 1, UINT32_MAX)); + le16enc(table->mbr + DOSMAGICOFFSET, DOSMAGIC); +} + /* * Under Boot Camp the PMBR partition (type 0xEE) doesn't cover the * whole disk anymore. Rather, it covers the GPT table and the EFI @@ -284,7 +294,7 @@ gpt_is_bootcamp(struct g_part_gpt_table } static void -gpt_update_bootcamp(struct g_part_table *basetable) +gpt_update_bootcamp(struct g_part_table *basetable, struct g_provider *pp) { struct g_part_entry *baseentry; struct g_part_gpt_entry *entry; @@ -341,6 +351,7 @@ gpt_update_bootcamp(struct g_part_table disable: table->bootcamp = 0; + gpt_create_pmbr(table, pp); } static struct gpt_hdr * @@ -609,6 +620,8 @@ g_part_gpt_create(struct g_part_table *b pp->sectorsize) return (ENOSPC); + gpt_create_pmbr(table, pp); + /* Allocate space for the header */ table->hdr = g_malloc(sizeof(struct gpt_hdr), M_WAITOK | M_ZERO); @@ -937,9 +950,13 @@ g_part_gpt_read(struct g_part_table *bas static int g_part_gpt_recover(struct g_part_table *basetable) { + struct g_part_gpt_table *table; + struct g_provider *pp; - g_gpt_set_defaults(basetable, - LIST_FIRST(&basetable->gpt_gp->consumer)->provider); + table = (struct g_part_gpt_table *)basetable; + pp = LIST_FIRST(&basetable->gpt_gp->consumer)->provider; + gpt_create_pmbr(table, pp); + g_gpt_set_defaults(basetable, pp); basetable->gpt_corrupt = 0; return (0); } @@ -950,6 +967,7 @@ g_part_gpt_setunset(struct g_part_table { struct g_part_gpt_entry *entry; struct g_part_gpt_table *table; + uint8_t *p; uint64_t attr; int i; @@ -957,15 +975,32 @@ g_part_gpt_setunset(struct g_part_table entry = (struct g_part_gpt_entry *)baseentry; if (strcasecmp(attrib, "active") == 0) { - if (!table->bootcamp || baseentry->gpe_index > NDOSPART) - return (EINVAL); - for (i = 0; i < NDOSPART; i++) { - table->mbr[DOSPARTOFF + i * DOSPARTSIZE] = - (i == baseentry->gpe_index - 1) ? 0x80 : 0; + if (table->bootcamp) { + /* The active flag must be set on a valid entry. */ + if (entry == NULL) + return (ENXIO); + if (baseentry->gpe_index > NDOSPART) + return (EINVAL); + for (i = 0; i < NDOSPART; i++) { + p = &table->mbr[DOSPARTOFF + i * DOSPARTSIZE]; + p[0] = (i == baseentry->gpe_index - 1) + ? ((set) ? 0x80 : 0) : 0; + } + } else { + /* The PMBR is marked as active without an entry. */ + if (entry != NULL) + return (ENXIO); + for (i = 0; i < NDOSPART; i++) { + p = &table->mbr[DOSPARTOFF + i * DOSPARTSIZE]; + p[0] = (p[4] == 0xee) ? ((set) ? 0x80 : 0) : 0; + } } return (0); } + if (entry == NULL) + return (ENODEV); + attr = 0; if (strcasecmp(attrib, "bootme") == 0) { attr |= GPT_ENT_ATTR_BOOTME; @@ -1033,17 +1068,7 @@ g_part_gpt_write(struct g_part_table *ba /* Reconstruct the MBR from the GPT if under Boot Camp. */ if (table->bootcamp) - gpt_update_bootcamp(basetable); - - /* Update partition entries in the PMBR if Boot Camp disabled. */ - if (!table->bootcamp) { - bzero(table->mbr + DOSPARTOFF, DOSPARTSIZE * NDOSPART); - gpt_write_mbr_entry(table->mbr, 0, 0xee, 1, - MIN(pp->mediasize / pp->sectorsize - 1, UINT32_MAX)); - /* Mark the PMBR active since some BIOS require it. */ - table->mbr[DOSPARTOFF] = 0x80; - } - le16enc(table->mbr + DOSMAGICOFFSET, DOSMAGIC); + gpt_update_bootcamp(basetable, pp); /* Write the PMBR */ buf = g_malloc(pp->sectorsize, M_WAITOK | M_ZERO); Modified: stable/9/sys/geom/part/g_part_ldm.c ============================================================================== --- stable/9/sys/geom/part/g_part_ldm.c Thu Aug 29 08:07:35 2013 (r255016) +++ stable/9/sys/geom/part/g_part_ldm.c Thu Aug 29 09:33:10 2013 (r255017) @@ -336,8 +336,6 @@ static const char *g_part_ldm_name(struc char *, size_t); static int g_part_ldm_probe(struct g_part_table *, struct g_consumer *); static int g_part_ldm_read(struct g_part_table *, struct g_consumer *); -static int g_part_ldm_setunset(struct g_part_table *, struct g_part_entry *, - const char *, unsigned int); static const char *g_part_ldm_type(struct g_part_table *, struct g_part_entry *, char *, size_t); static int g_part_ldm_write(struct g_part_table *, struct g_consumer *); @@ -356,7 +354,6 @@ static kobj_method_t g_part_ldm_methods[ KOBJMETHOD(g_part_name, g_part_ldm_name), KOBJMETHOD(g_part_probe, g_part_ldm_probe), KOBJMETHOD(g_part_read, g_part_ldm_read), - KOBJMETHOD(g_part_setunset, g_part_ldm_setunset), KOBJMETHOD(g_part_type, g_part_ldm_type), KOBJMETHOD(g_part_write, g_part_ldm_write), { 0, 0 } @@ -1476,14 +1473,6 @@ gpt_cleanup: return (error); } -static int -g_part_ldm_setunset(struct g_part_table *table, struct g_part_entry *baseentry, - const char *attrib, unsigned int set) -{ - - return (ENOSYS); -} - static const char * g_part_ldm_type(struct g_part_table *basetable, struct g_part_entry *baseentry, char *buf, size_t bufsz) Modified: stable/9/sys/geom/part/g_part_mbr.c ============================================================================== --- stable/9/sys/geom/part/g_part_mbr.c Thu Aug 29 08:07:35 2013 (r255016) +++ stable/9/sys/geom/part/g_part_mbr.c Thu Aug 29 09:33:10 2013 (r255017) @@ -496,6 +496,8 @@ g_part_mbr_setunset(struct g_part_table struct g_part_mbr_entry *entry; int changed; + if (baseentry == NULL) + return (ENODEV); if (strcasecmp(attrib, "active") != 0) return (EINVAL); Modified: stable/9/sys/geom/part/g_part_pc98.c ============================================================================== --- stable/9/sys/geom/part/g_part_pc98.c Thu Aug 29 08:07:35 2013 (r255016) +++ stable/9/sys/geom/part/g_part_pc98.c Thu Aug 29 09:33:10 2013 (r255017) @@ -498,6 +498,9 @@ g_part_pc98_setunset(struct g_part_table struct g_part_pc98_entry *entry; int changed, mid, sid; + if (baseentry == NULL) + return (ENODEV); + mid = sid = 0; if (strcasecmp(attrib, "active") == 0) sid = 1; From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 10:10:28 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 25FEDA02; Thu, 29 Aug 2013 10:10:28 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (unknown [IPv6:2001:41d0:1:7018::1:3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DD75A264E; Thu, 29 Aug 2013 10:10:27 +0000 (UTC) Received: from [2001:1b48:10b:cafe:225:64ff:febe:589f] (helo=viking.yzserv.com) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VEzBJ-000Bkw-Rt; Thu, 29 Aug 2013 12:10:26 +0200 Message-ID: <521F1E0C.5000404@FreeBSD.org> Date: Thu, 29 Aug 2013 12:10:20 +0200 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130813 Thunderbird/17.0.8 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r254882 - head/sys/dev/pci References: <201308251809.r7PI9CsE052978@svn.freebsd.org> <201308261055.17964.jhb@freebsd.org> In-Reply-To: <201308261055.17964.jhb@freebsd.org> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2UNULDEOFGVDEHMHDJKKV" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 10:10:28 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2UNULDEOFGVDEHMHDJKKV Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 26.08.2013 16:55, John Baldwin wrote: > On Sunday, August 25, 2013 2:09:12 pm Jean-Sebastien Pedron wrote: >> Author: dumbbell >> Date: Sun Aug 25 18:09:11 2013 >> New Revision: 254882 >> URL: http://svnweb.freebsd.org/changeset/base/254882 >> >> Log: >> vga_pci: Add API to map the Video BIOS >=20 > This won't actually work (the PCI bus will panic when you do the duplic= ate=20 > alloc). Why not put this in the softc of the vga_pci device? In fact,= it is=20 > already there. You just need to bump the vr_refs on the vga_bios resou= rce=20 > similar to what vga_pci_alloc_resource() does. Ok, so just calling vga_pci_alloc_resource() instead of bus_alloc_resource_any() in vga_pci_map_bios() would be enough to fix this first problem. > Also, returning a void * for this API seems rather hacky. Have you con= sidered > returning a struct resource * instead (and requiring the caller to use = > bus_space_* on it)? That would be more consistent with new-bus. You're right. > I can help with getting the right bus_alloc_resource() incantation to > alloc a struct resource * for the shadow copy if so. Yes please, I'd appreciate it :) I see that the function allocates resources from the parent device, but I'm not sure what to do with this, because the shadow copy is at a fixed physical address. --=20 Jean-S=C3=A9bastien P=C3=A9dron ------enig2UNULDEOFGVDEHMHDJKKV 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.21 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIfHhEACgkQa+xGJsFYOlPxSgCfVCBdHWVFo72vEV8abGRS4SYt vSYAnR9Z389sX+pdK1N/Qf/G71msblrs =P0L/ -----END PGP SIGNATURE----- ------enig2UNULDEOFGVDEHMHDJKKV-- From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 11:14:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 924A435E; Thu, 29 Aug 2013 11:14:59 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-we0-x22a.google.com (mail-we0-x22a.google.com [IPv6:2a00:1450:400c:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 937492CEB; Thu, 29 Aug 2013 11:14:58 +0000 (UTC) Received: by mail-we0-f170.google.com with SMTP id w62so279336wes.1 for ; Thu, 29 Aug 2013 04:14:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=COwH5GpqpZ/cimN4GLvEWpIXdVHh9yujlVV3ZvvEeEA=; b=p7Zfs3R5Tem6K6kNQ2XreEc+hI03IMthPWd2qqhdlibx0433yehww1f19y82cjek1S /f5I55tZ7i3TtIzcKdhCdgb+cu7Zut7QyybDpARujTTnCLHOfSbh1zR7ihjeXeWqeEJN 7GxP1x4IBGkgy5uvpgsetNfrVDmUlqMwf8WupVOgrfLSc8eaCIwTDubHI2Unh9x6+uG5 BosYkBCviAgt+7IOImW4a0YavNwEFHHpg0Sm2C9SDrGefZTSF1gr5Mswm2L5gnQLlnlG i8UYFwQm3lsoUoOkM52r+OMmfDcIC9SvS8qwyrhpcMuDtO+t0Abm21G9CtPP4qZxHtfH 0sDw== MIME-Version: 1.0 X-Received: by 10.194.222.2 with SMTP id qi2mr5361924wjc.14.1377774896827; Thu, 29 Aug 2013 04:14:56 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.216.62.5 with HTTP; Thu, 29 Aug 2013 04:14:56 -0700 (PDT) In-Reply-To: <20130822185756.Y1297@besplex.bde.org> References: <201308211646.r7LGk6eV051215@svn.freebsd.org> <5214F72B.7070006@freebsd.org> <20130821190309.GB52908@omg> <20130821202725.GA4991@stack.nl> <20130821212413.GC52908@omg> <20130821213755.GA8052@stack.nl> <20130822185756.Y1297@besplex.bde.org> Date: Thu, 29 Aug 2013 15:14:56 +0400 X-Google-Sender-Auth: VtJL-ijyxSNeQ5VAgaOnB38CIyk Message-ID: Subject: Re: svn commit: r254600 - head/lib/libutil From: Sergey Kandaurov To: Bruce Evans Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andrey Chernov , Jilles Tjoelker X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 11:14:59 -0000 On 22 August 2013 14:51, Bruce Evans wrote: > On Wed, 21 Aug 2013, Jilles Tjoelker wrote: > >> On Thu, Aug 22, 2013 at 01:24:13AM +0400, Sergey Kandaurov wrote: >>> >>> On Wed, Aug 21, 2013 at 10:27:25PM +0200, Jilles Tjoelker wrote: >>>> >>>> On Wed, Aug 21, 2013 at 11:03:10PM +0400, Sergey Kandaurov wrote: >>>>> >>>>> On Wed, Aug 21, 2013 at 09:21:47PM +0400, Andrey Chernov wrote: >>>>>> >>>>>> On 21.08.2013 20:46, Sergey Kandaurov wrote: >>>>>>> >>>>>>> number = strtoumax(buf, &endptr, 0); >>>>>>> >>>>>>> + if (number == UINTMAX_MAX && errno == ERANGE) { >>>>>>> + return (-1); >>>>>>> + } >> >> >>>>>> You need to reset errno before strtoumax() call (errno = 0), because >>>>>> any >>>>>> of previous functions may left it as ERANGE. > > > This also has a bogus test for UINTMAX_MAX wheich prevents input of > the number UINTMAX_MAX on systems where the limit for the function > (UINT64_T_MAX) is the same as the limit for strtoumax(). This test is > a wrong way of doing the errno thing. > > This also has a high density of style bugs: > - excessive braces > - extra blank line > > expand_number() remains a very badly designed and implemented function. > Its design errors start with its name. It doesn't expand numbers. It > converts strings to numbers. The strtoumax() family is missing this > bug and others. Its design errors continue with it taking a uint64_t > arg and not a uint64_t arg. > > Its implementation errors begin with broken range checking. The above > is an incomplete fix for this. Unless uintmax_t is the same as uint64_t, > there are still the following bugs: > - the return value of strotumax() is assigned to a uint64_t. This may > overflow. After overflow, the bogus (number == UINTMAX_MAX) check > has no effect, since when overflow is possible 'number' cannot equal > UINTMAX_MAX. > - values that exceed the maximum supported (UINT64_MAX) are not detected. > They are silently truncated to uint64_t. Ack. [...] > > Some of the other bugs in the old version: > > % /* > % * Convert an expression of the following forms to a uint64_t. > % * 1) A positive decimal number. > % * 2) A positive decimal number followed by a 'b' or 'B' (mult by 1). > % * 3) A positive decimal number followed by a 'k' or 'K' (mult by 1 << > 10). > % * 4) A positive decimal number followed by a 'm' or 'M' (mult by 1 << > 20). > % * 5) A positive decimal number followed by a 'g' or 'G' (mult by 1 << > 30). > % * 6) A positive decimal number followed by a 't' or 'T' (mult by 1 << > 40). > % * 7) A positive decimal number followed by a 'p' or 'P' (mult by 1 << > 50). > % * 8) A positive decimal number followed by a 'e' or 'E' (mult by 1 << > 60). > > This garbage was copied from a similar comment in dd/args.c. The number is > actually neither positive nor decimal, especially in dd where there is a > variant of this function that returns negative numbers. Another design > error > in this function is that it can't return negative numbers. Well, I see no useful contents in this comment. It is obvious and verbose. Probably it should be trimmed. > > % */ > % > > This bogus blank line detaches the comment from the code that it describes, > resulting in the comment describing null code. Sorry, I didn't see such blank line in head. > > % int > % expand_number(const char *buf, uint64_t *num) > % { > % uint64_t number; > % unsigned shift; > % char *endptr; > % % number = strtoumax(buf, &endptr, 0); > > This supports non-positive non-decimal numbers. The support for non-decimal > numbers is more intentional (it is given by the base 0 in the call). > Negative > numbers are only supported by strtoumax() allowing a minus sign and > returning a nonnegative number equal to 1 larger than UINTMAX_MAX less the > number without the minus sign. > Fixing the verbose comment above would result in adding more verboseness citing from man strtoumax(3) wrt. signedness and base details. Yet another point to trim it. [ dd dd details here ] > > To start fixing expand_number(): > > /* Fix comment here. */ > int > > expand_number(const char *buf, uint64_t *num) > { > char *endptr; > uintmax_t num; > uint64_t number; > unsigned shift; > int serrno; > > serrno = errno; > errno = 0; > num = strtoumax(buf, &endptr, 0); > if (num > UINT64_MAX) > errno = ERANGE; > if (errno != 0) > return (-1); > errno = serrno; > number = num; > ... > } > > This depends on the POSIX bug for detecting the no-digits case. > Fortunately, the early error handling of this function is simple and > compatible with that of strtoumax(), so we don't need to translate > strtoumax()'s errors except for adjusting its range error. > Thanks for your valuable input. What about this change (on top of head)? Index: expand_number.c =================================================================== --- expand_number.c (revision 255017) +++ expand_number.c (working copy) @@ -35,42 +35,29 @@ #include #include -/* - * Convert an expression of the following forms to a uint64_t. - * 1) A positive decimal number. - * 2) A positive decimal number followed by a 'b' or 'B' (mult by 1). - * 3) A positive decimal number followed by a 'k' or 'K' (mult by 1 << 10). - * 4) A positive decimal number followed by a 'm' or 'M' (mult by 1 << 20). - * 5) A positive decimal number followed by a 'g' or 'G' (mult by 1 << 30). - * 6) A positive decimal number followed by a 't' or 'T' (mult by 1 << 40). - * 7) A positive decimal number followed by a 'p' or 'P' (mult by 1 << 50). - * 8) A positive decimal number followed by a 'e' or 'E' (mult by 1 << 60). - */ int expand_number(const char *buf, uint64_t *num) { + char *endptr; + uintmax_t umaxval; uint64_t number; - int saved_errno; unsigned shift; - char *endptr; + int serrno; - saved_errno = errno; + serrno = errno; errno = 0; - - number = strtoumax(buf, &endptr, 0); - - if (number == UINTMAX_MAX && errno == ERANGE) { - return (-1); - } - - if (errno == 0) - errno = saved_errno; - + umaxval = strtoumax(buf, &endptr, 0); if (endptr == buf) { /* No valid digits. */ errno = EINVAL; return (-1); } + if (umaxval > UINT64_MAX) + errno = ERANGE; + if (errno != 0) + return (-1); + errno = serrno; + number = umaxval; switch (tolower((unsigned char)*endptr)) { case 'e': -- wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 11:40:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2310CB4F; Thu, 29 Aug 2013 11:40:46 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 10A482E69; Thu, 29 Aug 2013 11:40:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TBejsm076615; Thu, 29 Aug 2013 11:40:45 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TBejRO076614; Thu, 29 Aug 2013 11:40:45 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201308291140.r7TBejRO076614@svn.freebsd.org> From: Andreas Tobler Date: Thu, 29 Aug 2013 11:40:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255018 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 11:40:46 -0000 Author: andreast Date: Thu Aug 29 11:40:45 2013 New Revision: 255018 URL: http://svnweb.freebsd.org/changeset/base/255018 Log: Remove GNU_PATCH leftover. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu Aug 29 09:33:10 2013 (r255017) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu Aug 29 11:40:45 2013 (r255018) @@ -1600,11 +1600,6 @@ OLD_FILES+=usr/share/man/man1/gdbserver. OLD_FILES+=usr/share/man/man1/kgdb.1.gz .endif -.if ${MK_GNU_PATCH} == no -OLD_FILES+=usr/bin/bsdpatch -OLD_FILES+=usr/share/man/man1/bsdpatch.1.gz -.endif - .if ${MK_GPIB} == no OLD_FILES+=usr/include/dev/ieee488/ibfoo_int.h OLD_FILES+=usr/include/dev/ieee488/ugpib.h From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 11:50:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 93668543; Thu, 29 Aug 2013 11:50:40 +0000 (UTC) (envelope-from zeising@daemonic.se) Received: from mail.lysator.liu.se (mail.lysator.liu.se [IPv6:2001:6b0:17:f0a0::3]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4484A2FFE; Thu, 29 Aug 2013 11:50:40 +0000 (UTC) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 468AE4000C; Thu, 29 Aug 2013 13:50:38 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 3C5214000E; Thu, 29 Aug 2013 13:50:38 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.3.1 X-Spam-Score: 0.0 Received: from mx.daemonic.se (unknown [94.254.45.105]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 106584000C; Thu, 29 Aug 2013 13:50:38 +0200 (CEST) Received: from mailscanner.daemonic.se (mailscanner.daemonic.se [IPv6:2001:470:dca9:0:1::6]) by mx.daemonic.se (Postfix) with ESMTPS id 3cQhwF6JXvz8hVm; Thu, 29 Aug 2013 13:50:37 +0200 (CEST) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mx.daemonic.se ([10.1.0.3]) (using TLS with cipher CAMELLIA256-SHA) by mailscanner.daemonic.se (mailscanner.daemonic.se [10.1.0.6]) (amavisd-new, port 10025) with ESMTPS id 30Q_naycSp-k; Thu, 29 Aug 2013 13:50:35 +0200 (CEST) Received: from mail.daemonic.se (mail.daemonic.se [IPv6:2001:470:dca9:0:1::4]) by mx.daemonic.se (Postfix) with ESMTPS id 3cQhwC4Pxyz8hVn; Thu, 29 Aug 2013 13:50:35 +0200 (CEST) Received: from [IPv6:::1] (celes.daemonic.se [IPv6:2001:470:dca9:1::3]) by mail.daemonic.se (Postfix) with ESMTPSA id 3cQhwC2N8qz9Ctj; Thu, 29 Aug 2013 13:50:35 +0200 (CEST) Message-ID: <521F3589.9080201@daemonic.se> Date: Thu, 29 Aug 2013 13:50:33 +0200 From: Niclas Zeising User-Agent: Mutt/1.5.21 MIME-Version: 1.0 To: Andreas Tobler Subject: Re: svn commit: r255018 - head/tools/build/mk References: <201308291140.r7TBejRO076614@svn.freebsd.org> In-Reply-To: <201308291140.r7TBejRO076614@svn.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 130829-0, 2013-08-29), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: ClamAV using ClamSMTP Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 11:50:40 -0000 On 2013-08-29 13:40, Andreas Tobler wrote: > Author: andreast > Date: Thu Aug 29 11:40:45 2013 > New Revision: 255018 > URL: http://svnweb.freebsd.org/changeset/base/255018 > > Log: > Remove GNU_PATCH leftover. > > Modified: > head/tools/build/mk/OptionalObsoleteFiles.inc They should probably be moved to ObsoleteFiles.inc instead. Regards! -- Niclas From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 12:25:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B558595; Thu, 29 Aug 2013 12:25:12 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A2667228B; Thu, 29 Aug 2013 12:25:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TCPCQw002311; Thu, 29 Aug 2013 12:25:12 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TCPCET002310; Thu, 29 Aug 2013 12:25:12 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201308291225.r7TCPCET002310@svn.freebsd.org> From: Andriy Gapon Date: Thu, 29 Aug 2013 12:25:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r255020 - stable/8/sys/fs/devfs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 12:25:12 -0000 Author: avg Date: Thu Aug 29 12:25:12 2013 New Revision: 255020 URL: http://svnweb.freebsd.org/changeset/base/255020 Log: MFC r211847: Set de_dir for user created symbolic links. This MFC should fix a panic introduced in r254708. Reported by: Toomas Aas , jase Tested by: jase MFC slacker: jh Modified: stable/8/sys/fs/devfs/devfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/fs/ (props changed) Modified: stable/8/sys/fs/devfs/devfs_vnops.c ============================================================================== --- stable/8/sys/fs/devfs/devfs_vnops.c Thu Aug 29 11:49:53 2013 (r255019) +++ stable/8/sys/fs/devfs/devfs_vnops.c Thu Aug 29 12:25:12 2013 (r255020) @@ -1513,6 +1513,7 @@ devfs_symlink(struct vop_symlink_args *a de->de_gid = 0; de->de_mode = 0755; de->de_inode = alloc_unr(devfs_inos); + de->de_dir = dd; de->de_dirent->d_type = DT_LNK; i = strlen(ap->a_target) + 1; de->de_symlink = malloc(i, M_DEVFS, M_WAITOK); From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 12:48:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2D31F963; Thu, 29 Aug 2013 12:48:13 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1A481243D; Thu, 29 Aug 2013 12:48:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TCmCH8014085; Thu, 29 Aug 2013 12:48:12 GMT (envelope-from loos@svn.freebsd.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TCmC8E014084; Thu, 29 Aug 2013 12:48:12 GMT (envelope-from loos@svn.freebsd.org) Message-Id: <201308291248.r7TCmC8E014084@svn.freebsd.org> From: Luiz Otavio O Souza Date: Thu, 29 Aug 2013 12:48:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255021 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 12:48:13 -0000 Author: loos Date: Thu Aug 29 12:48:12 2013 New Revision: 255021 URL: http://svnweb.freebsd.org/changeset/base/255021 Log: Prevent the full restart cycle every time arge_start() is called. Only (re)start the interface when it is down. This change fix a race with BOOTP where the response packet is lost because the interface is being reset by a netmask change right after send the packet. PR: 178318 Approved by: adrian (mentor) Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Thu Aug 29 12:25:12 2013 (r255020) +++ head/sys/mips/atheros/if_arge.c Thu Aug 29 12:48:12 2013 (r255021) @@ -1019,7 +1019,8 @@ arge_init_locked(struct arge_softc *sc) ARGE_LOCK_ASSERT(sc); - arge_stop(sc); + if ((ifp->if_flags & IFF_UP) && (ifp->if_drv_flags & IFF_DRV_RUNNING)) + return; /* Init circular RX list. */ if (arge_rx_ring_init(sc) != 0) { From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 13:52:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BFBFA4A1; Thu, 29 Aug 2013 13:52:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ACDFA28FE; Thu, 29 Aug 2013 13:52:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TDqpXZ050878; Thu, 29 Aug 2013 13:52:51 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TDqpxe050877; Thu, 29 Aug 2013 13:52:51 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201308291352.r7TDqpxe050877@svn.freebsd.org> From: Adrian Chadd Date: Thu, 29 Aug 2013 13:52:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255022 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 13:52:51 -0000 Author: adrian Date: Thu Aug 29 13:52:51 2013 New Revision: 255022 URL: http://svnweb.freebsd.org/changeset/base/255022 Log: Remove the duplicate LLC_MISS event and put it in the right order. Modified: head/sys/dev/hwpmc/pmc_events.h Modified: head/sys/dev/hwpmc/pmc_events.h ============================================================================== --- head/sys/dev/hwpmc/pmc_events.h Thu Aug 29 12:48:12 2013 (r255021) +++ head/sys/dev/hwpmc/pmc_events.h Thu Aug 29 13:52:51 2013 (r255022) @@ -3547,13 +3547,12 @@ __PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_HIT_RE IAP_EVENT_D2H_08H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_HIT_RETIRED.ALL", \ IAP_EVENT_D2H_0FH) \ -__PMC_EV_ALIAS("MEM_LOAD_UOPS_MISC_RETIRED.LLC_MISS", \ - IAP_EVENT_D4H_02H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM", \ IAP_EVENT_D3H_01H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM", \ IAP_EVENT_D3H_04H) \ -__PMC_EV_ALIAS("MEM_LOAD_UOPS_MISC_RETIRED.LLC_MISS", IAP_EVENT_D4H_02H)\ +__PMC_EV_ALIAS("MEM_LOAD_UOPS_MISC_RETIRED.LLC_MISS", \ + IAP_EVENT_D4H_02H) \ __PMC_EV_ALIAS("BACLEARS.ANY", IAP_EVENT_E6H_01H) \ __PMC_EV_ALIAS("L2_TRANS.DEMAND_DATA_RD", IAP_EVENT_F0H_01H) \ __PMC_EV_ALIAS("L2_TRANS.RFO", IAP_EVENT_F0H_02H) \ From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 13:53:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E7ED55F5; Thu, 29 Aug 2013 13:53:40 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 91737290E; Thu, 29 Aug 2013 13:53:40 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 90A991045118; Thu, 29 Aug 2013 23:26:06 +1000 (EST) Date: Thu, 29 Aug 2013 23:26:05 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Sergey Kandaurov Subject: Re: svn commit: r254600 - head/lib/libutil In-Reply-To: Message-ID: <20130829220230.W1258@besplex.bde.org> References: <201308211646.r7LGk6eV051215@svn.freebsd.org> <5214F72B.7070006@freebsd.org> <20130821190309.GB52908@omg> <20130821202725.GA4991@stack.nl> <20130821212413.GC52908@omg> <20130821213755.GA8052@stack.nl> <20130822185756.Y1297@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=YYGEuWhf c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=aw4-S10CjX0A:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=H7VN2zDOXXgA:10 a=6eX2XVolbth28Z6AywQA:9 a=Qu08HLGT9pfdkBNc:21 a=XgiEenO_gzH1qr_s:21 a=CjuIK1q_8ugA:10 Cc: src-committers@freebsd.org, Andrey Chernov , Jilles Tjoelker , svn-src-all@freebsd.org, Bruce Evans , svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 13:53:41 -0000 On Thu, 29 Aug 2013, Sergey Kandaurov wrote: > On 22 August 2013 14:51, Bruce Evans wrote: >> expand_number() remains a very badly designed and implemented function. >> Its design errors start with its name. It doesn't expand numbers. It >> ... > [...] >> >> Some of the other bugs in the old version: >> >> % /* >> % * Convert an expression of the following forms to a uint64_t. >> % * 1) A positive decimal number. >> % * 2) A positive decimal number followed by a 'b' or 'B' (mult by 1). >> % ... >> This garbage was copied from a similar comment in dd/args.c. The number is >> actually neither positive nor decimal, especially in dd where there is a >> variant of this function that returns negative numbers. Another design >> error >> in this function is that it can't return negative numbers. > > Well, I see no useful contents in this comment. It is obvious and verbose. > Probably it should be trimmed. Stating the format in the man page is enough. I don't like the man page much either, and have complained about it and dehumanize_number(3) at length elsewhere. But expand_number() is much simpler, so most of the bugs mostly affect the other man page. (It is too simple to be able to translate numbers printed by dehumanize_number(), since it doesn't support power of 10 "prefixes".) Looking at expand_number(3) now, I see only the following bugs: - the format of the string isn't really documented - poor grammar: - "the buf string" - "the address pointed out" - confusing terminology "prefix". This means an "SI power of 2" prefix, e.g., "kilo" or "k". (I think SI only really has power if 10 prefixes. Anyway, "k" should always mean 1000 and "K" always 1024. This is backwards in the man page.) "kilo" really is a prefix when it modifies a unit, "e.g.", kilobytes. But this function deals with pure numbers, so there are no units, and the "prefixes" are always uses as suffixes, e.g., "10K" (sic). - the code supports both cases for all "prefixes", with literal lower case, but the man page only documents one case (always upper case, except for "k" where this is backwards). Comments in the code describes the "prefixes" as "units". That is better, but is too confusing since there may also be units like bytes added later. - the man page describes the multipliers in non-dehumanized form, i.e., as decimal numbers. Even I prefer a dehumanized form here, since I can only recognize small decimal numbers as powers of 2. The man page should give the numbers in hex or powers of 2 first and then in decimal if there is space. - in the ERRORS section: - the description of EINVAL is incomplete. See strtoumax() for more. - the description of ERANGE has poor grammar. It should start with "The", as os normal and as is done for EINVAL, and perhaps give more details, as in strto*(). I think most utilities and all library functions that parse numbers should say when they use strto*() to do this. Utilities should mostly be covered by intro(1). The default should be to accept numbers in any base. POSIX unfortunately doesn't require very much, so bases other than 10 are unportable at best. Grepping in utitilies man pages shows the following: - I patched mknod(8) with the following when I fixed its strto*() parsing: % Index: mknod.8 % =================================================================== % RCS file: /home/ncvs/src/sbin/mknod/mknod.8,v % retrieving revision 1.3 % retrieving revision 1.4 % diff -r1.3 -r1.4 % 94,95c94,96 % < Major and minor device numbers can be given using the normal C % < notation, so that a leading % --- % > Major and minor device numbers can be given in any format acceptable to % > .Xr strtoul 3 , % > so that a leading This is still fuzzy since it doesn't say that any base is allowed. - sleep(1) refers to strtod(3). sleep(1) actually uses sscanf() instead of strtod(3), but I think the reference is correct. - ctladm(8) refers to strtoull(3) for lba's, with details about the base (but expressed too verbosely, and duplicated for read and write). dd needs a similar amount of detail and more, but has less. ctladm(3) does actually use strtoull(), but that is another bug since on 32-bit machines strtoull() only gives 32-bit numbers but lba's need more. - etherswitchcfg(8) refers to strtol(4) for phy's and gives details about accepting any base. strtol(4) of course doesn't exist. It is a typo for strtol(3). > >> >> % */ >> % >> >> This bogus blank line detaches the comment from the code that it describes, >> resulting in the comment describing null code. > > Sorry, I didn't see such blank line in head. Oops, false alarm. > ... > Fixing the verbose comment above would result in adding more verboseness > citing from man strtoumax(3) wrt. signedness and base details. > Yet another point to trim it. Yes. We add the detail that the number is restricted to 64 bits (else ERANGE), but already document that well enough (in the man page), and after these fixes the man page should match the code. > Thanks for your valuable input. What about this change (on top of head)? > > Index: expand_number.c > =================================================================== > --- expand_number.c (revision 255017) > +++ expand_number.c (working copy) > @@ -35,42 +35,29 @@ > #include > #include > > -/* > - * Convert an expression of the following forms to a uint64_t. > - * 1) A positive decimal number. > - * 2) A positive decimal number followed by a 'b' or 'B' (mult by 1). > - * 3) A positive decimal number followed by a 'k' or 'K' (mult by 1 << 10). > - * 4) A positive decimal number followed by a 'm' or 'M' (mult by 1 << 20). > - * 5) A positive decimal number followed by a 'g' or 'G' (mult by 1 << 30). > - * 6) A positive decimal number followed by a 't' or 'T' (mult by 1 << 40). > - * 7) A positive decimal number followed by a 'p' or 'P' (mult by 1 << 50). > - * 8) A positive decimal number followed by a 'e' or 'E' (mult by 1 << 60). > - */ > int > expand_number(const char *buf, uint64_t *num) > { > + char *endptr; > + uintmax_t umaxval; > uint64_t number; > - int saved_errno; > unsigned shift; > - char *endptr; > + int serrno; > > - saved_errno = errno; > + serrno = errno; > errno = 0; > - > - number = strtoumax(buf, &endptr, 0); > - > - if (number == UINTMAX_MAX && errno == ERANGE) { > - return (-1); > - } > - > - if (errno == 0) > - errno = saved_errno; > - > + umaxval = strtoumax(buf, &endptr, 0); > if (endptr == buf) { > /* No valid digits. */ > errno = EINVAL; > return (-1); > } I want to remove this if clause (depend on the POSIX extension). > + if (umaxval > UINT64_MAX) > + errno = ERANGE; > + if (errno != 0) > + return (-1); > + errno = serrno; > + number = umaxval; > > switch (tolower((unsigned char)*endptr)) { > case 'e': Seems OK. Tabs got corrupted in the mail. I complained about missing overflow checking for the shift, but there is some. It seems to be correct except for a style bug (a blank line that separates the check from the final evaluation. We avoid changing *num when failing, and don't use a temporary variable for holding the result of the shift, so the shift expression is written twice, but that is a negative reason to separate its evaluations). Bruce From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 13:56:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C8911794; Thu, 29 Aug 2013 13:56:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B42FF292A; Thu, 29 Aug 2013 13:56:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TDuifD052217; Thu, 29 Aug 2013 13:56:44 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TDuiDP052216; Thu, 29 Aug 2013 13:56:44 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201308291356.r7TDuiDP052216@svn.freebsd.org> From: Adrian Chadd Date: Thu, 29 Aug 2013 13:56:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255023 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 13:56:45 -0000 Author: adrian Date: Thu Aug 29 13:56:44 2013 New Revision: 255023 URL: http://svnweb.freebsd.org/changeset/base/255023 Log: Migrate iwn(4) to use the new ieee80211_tx_complete() API. Tested: * Intel 5100, STA mode Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Thu Aug 29 13:52:51 2013 (r255022) +++ head/sys/dev/iwn/if_iwn.c Thu Aug 29 13:56:44 2013 (r255023) @@ -2668,11 +2668,7 @@ iwn_rx_compressed_ba(struct iwn_softc *s KASSERT(ni != NULL, ("no node")); KASSERT(m != NULL, ("no mbuf")); - if (m->m_flags & M_TXCB) - ieee80211_process_callback(ni, m, 1); - - m_freem(m); - ieee80211_free_node(ni); + ieee80211_tx_complete(ni, m, 1); txq->queued--; txq->read = (txq->read + 1) % IWN_TX_RING_COUNT; @@ -2934,29 +2930,6 @@ iwn_tx_done(struct iwn_softc *sc, struct ni = data->ni, data->ni = NULL; vap = ni->ni_vap; - if (m->m_flags & M_TXCB) { - /* - * Channels marked for "radar" require traffic to be received - * to unlock before we can transmit. Until traffic is seen - * any attempt to transmit is returned immediately with status - * set to IWN_TX_FAIL_TX_LOCKED. Unfortunately this can easily - * happen on first authenticate after scanning. To workaround - * this we ignore a failure of this sort in AUTH state so the - * 802.11 layer will fall back to using a timeout to wait for - * the AUTH reply. This allows the firmware time to see - * traffic so a subsequent retry of AUTH succeeds. It's - * unclear why the firmware does not maintain state for - * channels recently visited as this would allow immediate - * use of the channel after a scan (where we see traffic). - */ - if (status == IWN_TX_FAIL_TX_LOCKED && - ni->ni_vap->iv_state == IEEE80211_S_AUTH) - ieee80211_process_callback(ni, m, 0); - else - ieee80211_process_callback(ni, m, - (status & IWN_TX_FAIL) != 0); - } - /* * Update rate control statistics for the node. */ @@ -2969,8 +2942,27 @@ iwn_tx_done(struct iwn_softc *sc, struct ieee80211_ratectl_tx_complete(vap, ni, IEEE80211_RATECTL_TX_SUCCESS, &ackfailcnt, NULL); } - m_freem(m); - ieee80211_free_node(ni); + + /* + * Channels marked for "radar" require traffic to be received + * to unlock before we can transmit. Until traffic is seen + * any attempt to transmit is returned immediately with status + * set to IWN_TX_FAIL_TX_LOCKED. Unfortunately this can easily + * happen on first authenticate after scanning. To workaround + * this we ignore a failure of this sort in AUTH state so the + * 802.11 layer will fall back to using a timeout to wait for + * the AUTH reply. This allows the firmware time to see + * traffic so a subsequent retry of AUTH succeeds. It's + * unclear why the firmware does not maintain state for + * channels recently visited as this would allow immediate + * use of the channel after a scan (where we see traffic). + */ + if (status == IWN_TX_FAIL_TX_LOCKED && + ni->ni_vap->iv_state == IEEE80211_S_AUTH) + ieee80211_tx_complete(ni, m, 0); + else + ieee80211_tx_complete(ni, m, + (status & IWN_TX_FAIL) != 0); sc->sc_tx_timer = 0; if (--ring->queued < IWN_TX_RING_LOMARK) { @@ -3091,11 +3083,7 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, KASSERT(ni != NULL, ("no node")); KASSERT(m != NULL, ("no mbuf")); - if (m->m_flags & M_TXCB) - ieee80211_process_callback(ni, m, 1); - - m_freem(m); - ieee80211_free_node(ni); + ieee80211_tx_complete(ni, m, 1); ring->queued--; ring->read = (ring->read + 1) % IWN_TX_RING_COUNT; From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 14:27:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8287C856; Thu, 29 Aug 2013 14:27:50 +0000 (UTC) (envelope-from jase@FreeBSD.org) Received: from svr06-mx.btshosting.co.uk (mx-2.btshosting.co.uk [IPv6:2a01:4f8:121:2403:2::]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 35B472BC0; Thu, 29 Aug 2013 14:27:47 +0000 (UTC) Received: from [192.168.1.242] (unknown [90.202.210.251]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by svr06-mx.btshosting.co.uk (Postfix) with ESMTPSA id 604E588BDE; Thu, 29 Aug 2013 14:27:45 +0000 (UTC) Message-ID: <521F5A60.1090401@FreeBSD.org> Date: Thu, 29 Aug 2013 15:27:44 +0100 From: Jase Thew Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Andriy Gapon Subject: Re: svn commit: r255020 - stable/8/sys/fs/devfs References: <201308291225.r7TCPCET002310@svn.freebsd.org> In-Reply-To: <201308291225.r7TCPCET002310@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 14:27:50 -0000 On 29/08/2013 13:25, Andriy Gapon wrote: > Author: avg > Date: Thu Aug 29 12:25:12 2013 > New Revision: 255020 > URL: http://svnweb.freebsd.org/changeset/base/255020 > > Log: > MFC r211847: Set de_dir for user created symbolic links. > > This MFC should fix a panic introduced in r254708. > > Reported by: Toomas Aas , jase > Tested by: jase > MFC slacker: jh Thanks! -- Jase Thew jase@FreeBSD.org FreeBSD Ports Committer From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 14:58:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 63526598; Thu, 29 Aug 2013 14:58:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2F1FB2DBA; Thu, 29 Aug 2013 14:58:09 +0000 (UTC) Received: from jhbbsd.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6F073B924; Thu, 29 Aug 2013 10:58:05 -0400 (EDT) From: John Baldwin To: "=?iso-8859-15?q?Jean-S=E9bastien?= =?iso-8859-15?q?_P=E9dron?=" Subject: Re: svn commit: r254882 - head/sys/dev/pci Date: Thu, 29 Aug 2013 10:07:26 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <201308251809.r7PI9CsE052978@svn.freebsd.org> <201308261055.17964.jhb@freebsd.org> <521F1E0C.5000404@FreeBSD.org> In-Reply-To: <521F1E0C.5000404@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Message-Id: <201308291007.26828.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 29 Aug 2013 10:58:05 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 14:58:09 -0000 On Thursday, August 29, 2013 6:10:20 am Jean-S=E9bastien P=E9dron wrote: > On 26.08.2013 16:55, John Baldwin wrote: > > On Sunday, August 25, 2013 2:09:12 pm Jean-Sebastien Pedron wrote: > >> Author: dumbbell > >> Date: Sun Aug 25 18:09:11 2013 > >> New Revision: 254882 > >> URL: http://svnweb.freebsd.org/changeset/base/254882 > >> > >> Log: > >> vga_pci: Add API to map the Video BIOS > >=20 > > This won't actually work (the PCI bus will panic when you do the duplic= ate=20 > > alloc). Why not put this in the softc of the vga_pci device? In fact,= it is=20 > > already there. You just need to bump the vr_refs on the vga_bios resou= rce=20 > > similar to what vga_pci_alloc_resource() does. >=20 > Ok, so just calling vga_pci_alloc_resource() instead of > bus_alloc_resource_any() in vga_pci_map_bios() would be enough to fix > this first problem. Yes. > > Also, returning a void * for this API seems rather hacky. Have you con= sidered > > returning a struct resource * instead (and requiring the caller to use= =20 > > bus_space_* on it)? That would be more consistent with new-bus. >=20 > You're right. >=20 > > I can help with getting the right bus_alloc_resource() incantation to > > alloc a struct resource * for the shadow copy if so. >=20 > Yes please, I'd appreciate it :) I see that the function allocates > resources from the parent device, but I'm not sure what to do with this, > because the shadow copy is at a fixed physical address. You can use bus_alloc_resource() to allocate a fixed range, but the trick in this case is that we need to bypass the PCI bus as this isn't a BAR. Here is an untested cut at this, it only changes these functions and doesn't fix the callers to work with the returned struct resource, etc.: Index: vga_pci.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- vga_pci.c (revision 255020) +++ vga_pci.c (working copy) @@ -46,11 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include =20 =2D#if defined(__amd64__) || defined(__i386__) || defined(__ia64__) =2D#include =2D#include =2D#endif =2D #include #include =20 @@ -88,11 +83,10 @@ vga_pci_is_boot_display(device_t dev) device_get_unit(dev) =3D=3D vga_pci_default_unit); } =20 =2Dvoid * =2Dvga_pci_map_bios(device_t dev, size_t *size) +struct resource * +vga_pci_map_bios(device_t dev) { int rid; =2D struct resource *res; =20 #if defined(__amd64__) || defined(__i386__) || defined(__ia64__) if (vga_pci_is_boot_display(dev)) { @@ -103,30 +97,30 @@ vga_pci_is_boot_display(device_t dev) * * We use this copy for the default boot device, because * the original ROM may not be valid after boot. + * + * Allocate this from our grandparent to by-pass the + * checks for a valid rid in the PCI bus driver as this + * is not a BAR. */ =2D =2D *size =3D VGA_PCI_BIOS_SHADOW_SIZE; =2D return (pmap_mapbios(VGA_PCI_BIOS_SHADOW_ADDR, *size)); + rid =3D 1; + return (BUS_ALLOC_RESOURCE(device_get_parent( + device_get_parent(dev)), dev, SYS_RES_MEMORY, &rid, + VGA_PCI_BIOS_SHADOW_ADDR, + VGA_PCI_BIOS_SHADOW_ADDR + VGA_PCI_BIOS_SHADOW_SIZE - 1, + VGA_PCI_BIOS_SHADOW_SIZE, RF_ACTIVE)); } #endif =20 rid =3D PCIR_BIOS; =2D res =3D bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); =2D if (res =3D=3D NULL) { =2D return (NULL); =2D } =2D =2D *size =3D rman_get_size(res); =2D return (rman_get_virtual(res)); + return (vga_pci_alloc_resource(dev, NULL, SYS_RES_MEMORY, &rid, 0ul, + ~0ul, 1, RF_ACTIVE)); } =20 void =2Dvga_pci_unmap_bios(device_t dev, void *bios) +vga_pci_unmap_bios(device_t dev, struct resource *res) { =2D int rid; =2D struct resource *res; =20 =2D if (bios =3D=3D NULL) { + if (res =3D=3D NULL) { return; } =20 @@ -133,32 +127,13 @@ void #if defined(__amd64__) || defined(__i386__) || defined(__ia64__) if (vga_pci_is_boot_display(dev)) { /* We mapped the BIOS shadow copy located at 0xC0000. */ =2D pmap_unmapdev((vm_offset_t)bios, VGA_PCI_BIOS_SHADOW_SIZE); + BUS_RELEASE_RESOURCE(device_get_parent( + device_get_parent(dev)), dev, SYS_RES_MEMORY, 1, res); =20 return; } #endif =2D =2D /* =2D * FIXME: We returned only the virtual address of the resource =2D * to the caller. Now, to get the resource struct back, we =2D * allocate it again: the struct exists once in memory in =2D * device softc. Therefore, we release twice now to release the =2D * reference we just obtained to get the structure back and the =2D * caller's reference. =2D */ =2D =2D rid =3D PCIR_BIOS; =2D res =3D bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); =2D =2D KASSERT(res !=3D NULL, =2D ("%s: Can't get BIOS resource back", __func__)); =2D KASSERT(bios =3D=3D rman_get_virtual(res), =2D ("%s: Given BIOS address doesn't match " =2D "resource virtual address", __func__)); =2D =2D bus_release_resource(dev, SYS_RES_MEMORY, rid, bios); =2D bus_release_resource(dev, SYS_RES_MEMORY, rid, bios); + vga_pci_release_resource(dev, NULL, SYS_RES_MEMORY, PCIR_BIOS, res); } =20 static int =2D-=20 John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 15:12:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AFD1531D; Thu, 29 Aug 2013 15:12:59 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 823EE2F38; Thu, 29 Aug 2013 15:12:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TFCx5b095987; Thu, 29 Aug 2013 15:12:59 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TFCxG2095986; Thu, 29 Aug 2013 15:12:59 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201308291512.r7TFCxG2095986@svn.freebsd.org> From: Devin Teske Date: Thu, 29 Aug 2013 15:12:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r255024 - releng/9.2/usr.sbin X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 15:12:59 -0000 Author: dteske Date: Thu Aug 29 15:12:58 2013 New Revision: 255024 URL: http://svnweb.freebsd.org/changeset/base/255024 Log: MFS9 r254966: Add missing mergeinfo from head for stabe/9 revisions: 252995 253168 253169 Reviewed by: gjb Approved by: re (gjb) Modified: Directory Properties: releng/9.2/usr.sbin/ (props changed) releng/9.2/usr.sbin/Makefile (props changed) releng/9.2/usr.sbin/bsdconfig/ (props changed) From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 15:20:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C4968652; Thu, 29 Aug 2013 15:20:13 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B24452FAD; Thu, 29 Aug 2013 15:20:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TFKDcT000128; Thu, 29 Aug 2013 15:20:13 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TFKD5f099893; Thu, 29 Aug 2013 15:20:13 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201308291520.r7TFKD5f099893@svn.freebsd.org> From: Ed Maste Date: Thu, 29 Aug 2013 15:20:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r255025 - vendor/NetBSD/libexecinfo/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 15:20:13 -0000 Author: emaste Date: Thu Aug 29 15:20:12 2013 New Revision: 255025 URL: http://svnweb.freebsd.org/changeset/base/255025 Log: Vendor import of NetBSD's libexecinfo at 2013-08-29 Modified: vendor/NetBSD/libexecinfo/dist/backtrace.3 vendor/NetBSD/libexecinfo/dist/backtrace.c vendor/NetBSD/libexecinfo/dist/symtab.c Modified: vendor/NetBSD/libexecinfo/dist/backtrace.3 ============================================================================== --- vendor/NetBSD/libexecinfo/dist/backtrace.3 Thu Aug 29 15:12:58 2013 (r255024) +++ vendor/NetBSD/libexecinfo/dist/backtrace.3 Thu Aug 29 15:20:12 2013 (r255025) @@ -1,4 +1,4 @@ -.\" $NetBSD: backtrace.3,v 1.4 2012/06/10 00:24:36 christos Exp $ +.\" $NetBSD: backtrace.3,v 1.5 2013/08/22 17:08:43 christos Exp $ .\" .\" Copyright (c) 2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -116,7 +116,7 @@ on failure. .Sh RETURN VALUES The .Fn backtrace -function returns the number of elements tht were filled in the backtrace. +function returns the number of elements that were filled in the backtrace. The .Fn backtrace_symbols and Modified: vendor/NetBSD/libexecinfo/dist/backtrace.c ============================================================================== --- vendor/NetBSD/libexecinfo/dist/backtrace.c Thu Aug 29 15:12:58 2013 (r255024) +++ vendor/NetBSD/libexecinfo/dist/backtrace.c Thu Aug 29 15:20:12 2013 (r255025) @@ -1,4 +1,4 @@ -/* $NetBSD: backtrace.c,v 1.2 2012/07/09 03:11:59 christos Exp $ */ +/* $NetBSD: backtrace.c,v 1.3 2013/08/29 14:58:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: backtrace.c,v 1.2 2012/07/09 03:11:59 christos Exp $"); +__RCSID("$NetBSD: backtrace.c,v 1.3 2013/08/29 14:58:56 christos Exp $"); #include #include @@ -50,9 +50,29 @@ __RCSID("$NetBSD: backtrace.c,v 1.2 2012 #ifdef __linux__ #define SELF "/proc/self/exe" #else +#include #define SELF "/proc/curproc/file" #endif +static int +open_self(int flags) +{ + const char *pathname = SELF; +#ifdef KERN_PROC_PATHNAME + static const int name[] = { + CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1, + }; + char path[MAXPATHLEN]; + size_t len; + + len = sizeof(path); + if (sysctl(name, __arraycount(name), path, &len, NULL, 0) != -1) + pathname = path; +#endif + return open(pathname, flags); +} + + static int __printflike(4, 5) rasprintf(char **buf, size_t *bufsiz, size_t offs, const char *fmt, ...) { @@ -162,7 +182,7 @@ backtrace_symbols_fmt(void *const *trace symtab_t *st; int fd; - if ((fd = open(SELF, O_RDONLY)) != -1) + if ((fd = open_self(O_RDONLY)) != -1) st = symtab_create(fd, -1, STT_FUNC); else st = NULL; Modified: vendor/NetBSD/libexecinfo/dist/symtab.c ============================================================================== --- vendor/NetBSD/libexecinfo/dist/symtab.c Thu Aug 29 15:12:58 2013 (r255024) +++ vendor/NetBSD/libexecinfo/dist/symtab.c Thu Aug 29 15:20:12 2013 (r255025) @@ -1,4 +1,4 @@ -/* $NetBSD: symtab.c,v 1.1 2012/05/26 22:02:29 christos Exp $ */ +/* $NetBSD: symtab.c,v 1.2 2013/08/29 15:01:57 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,11 +29,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: symtab.c,v 1.1 2012/05/26 22:02:29 christos Exp $"); +__RCSID("$NetBSD: symtab.c,v 1.2 2013/08/29 15:01:57 christos Exp $"); #include #include #include +#include #include #include From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 15:24:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 180D8848; Thu, 29 Aug 2013 15:24:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E030A2004; Thu, 29 Aug 2013 15:24:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TFO4JO001883; Thu, 29 Aug 2013 15:24:04 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TFO4Wu001882; Thu, 29 Aug 2013 15:24:04 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201308291524.r7TFO4Wu001882@svn.freebsd.org> From: Ed Maste Date: Thu, 29 Aug 2013 15:24:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r255026 - vendor/NetBSD/libexecinfo/20130829 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 15:24:05 -0000 Author: emaste Date: Thu Aug 29 15:24:04 2013 New Revision: 255026 URL: http://svnweb.freebsd.org/changeset/base/255026 Log: Tag 2013-08-29 import of NetBSD's libexecinfo Added: vendor/NetBSD/libexecinfo/20130829/ - copied from r255025, vendor/NetBSD/libexecinfo/dist/ From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 15:29:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0AEABCC3; Thu, 29 Aug 2013 15:29:49 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EC4B620BB; Thu, 29 Aug 2013 15:29:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TFTmed003747; Thu, 29 Aug 2013 15:29:48 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TFTmSk003744; Thu, 29 Aug 2013 15:29:48 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201308291529.r7TFTmSk003744@svn.freebsd.org> From: Devin Teske Date: Thu, 29 Aug 2013 15:29:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r255027 - releng/9.2/sys/boot/forth X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 15:29:49 -0000 Author: dteske Date: Thu Aug 29 15:29:48 2013 New Revision: 255027 URL: http://svnweb.freebsd.org/changeset/base/255027 Log: MFS9 r254953, itself an MFC of r254942 and r254952: Make alternate layout ``opt-in'' and add support for named releases. Minor edit to version.4th(8) manual and stack-leak fixes while here. Approved by: re (gjb) Modified: releng/9.2/sys/boot/forth/beastie.4th releng/9.2/sys/boot/forth/version.4th releng/9.2/sys/boot/forth/version.4th.8 Directory Properties: releng/9.2/sys/ (props changed) releng/9.2/sys/boot/ (props changed) releng/9.2/sys/boot/forth/ (props changed) Modified: releng/9.2/sys/boot/forth/beastie.4th ============================================================================== --- releng/9.2/sys/boot/forth/beastie.4th Thu Aug 29 15:24:04 2013 (r255026) +++ releng/9.2/sys/boot/forth/beastie.4th Thu Aug 29 15:29:48 2013 (r255027) @@ -134,7 +134,7 @@ variable logoY \ Move the menu to the center of the screen s" set loader_menu_x=26" evaluate - s" set loader_menu_y=13" evaluate + s" set loader_menu_y=12" evaluate s" set loader_menu_timeout_x=21" evaluate s" set loader_menu_timeout_y=24" evaluate @@ -275,21 +275,9 @@ variable logoY s" loader_logo" getenv dup -1 = if logoX @ logoY @ loader_color? if - s" tribute-logo" - sfind if - execute - else - drop - orb-logo - then + orb-logo else - s" tributebw-logo" - sfind if - execute - else - drop - orbbw-logo - then + orbbw-logo then drop exit then @@ -319,7 +307,7 @@ variable logoY s" tribute-logo" sfind if execute else - orb-logo + drop orb-logo then 2drop exit then @@ -328,7 +316,7 @@ variable logoY s" tributebw-logo" sfind if execute else - orbbw-logo + drop orbbw-logo then 2drop exit then Modified: releng/9.2/sys/boot/forth/version.4th ============================================================================== --- releng/9.2/sys/boot/forth/version.4th Thu Aug 29 15:24:04 2013 (r255026) +++ releng/9.2/sys/boot/forth/version.4th Thu Aug 29 15:29:48 2013 (r255027) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2011 Devin Teske +\ Copyright (c) 2006-2013 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -29,6 +29,9 @@ marker task-version.4th variable versionX variable versionY +\ Default $loader_version value if not overridden or using tribute screen +: str_loader_version ( -- C-ADDR/U|-1 ) s" FreeBSD `Nakatomi Socrates' 9.2" ; + \ Initialize text placement to defaults 80 versionX ! \ NOTE: this is the ending column (text is right-justified) 24 versionY ! @@ -43,9 +46,33 @@ variable versionY ?number drop versionY ! -1 then drop - \ Exit if a version was not set + \ Default version if none was set s" loader_version" getenv dup -1 = if - drop exit + drop + \ Default version if no logo is requested + s" loader_logo" getenv dup -1 = if + drop str_loader_version + else + 2dup s" tribute" compare-insensitive 0= if + 2drop + s" tribute-logo" sfind if + drop exit \ see beastie tribute-text + else + drop str_loader_version + then + else 2dup s" tributebw" compare-insensitive 0= if + 2drop + s" tributebw-logo" sfind if + drop exit \ see beastie tribute-text + else + drop str_loader_version + then + else + 2drop str_loader_version + then then + then + then dup -1 = if + drop exit \ default version (above) is disabled then \ Right justify the text Modified: releng/9.2/sys/boot/forth/version.4th.8 ============================================================================== --- releng/9.2/sys/boot/forth/version.4th.8 Thu Aug 29 15:24:04 2013 (r255026) +++ releng/9.2/sys/boot/forth/version.4th.8 Thu Aug 29 15:29:48 2013 (r255027) @@ -91,7 +91,7 @@ causes the version to be printed without .Pq default is ANSI Cyan . .El .Sh FILES -.Bl -tag -width /boot/loader.4th -compact +.Bl -tag -width /boot/version.4th -compact .It Pa /boot/loader The .Xr loader 8 . From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 15:49:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9A821C66; Thu, 29 Aug 2013 15:49:08 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8711B2250; Thu, 29 Aug 2013 15:49:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TFn880014971; Thu, 29 Aug 2013 15:49:08 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TFn5jP014952; Thu, 29 Aug 2013 15:49:05 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201308291549.r7TFn5jP014952@svn.freebsd.org> From: Alan Cox Date: Thu, 29 Aug 2013 15:49:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255028 - in head/sys: amd64/amd64 arm/arm i386/i386 i386/xen ia64/ia64 mips/mips powerpc/powerpc sparc64/sparc64 vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 15:49:08 -0000 Author: alc Date: Thu Aug 29 15:49:05 2013 New Revision: 255028 URL: http://svnweb.freebsd.org/changeset/base/255028 Log: Significantly reduce the cost, i.e., run time, of calls to madvise(..., MADV_DONTNEED) and madvise(..., MADV_FREE). Specifically, introduce a new pmap function, pmap_advise(), that operates on a range of virtual addresses within the specified pmap, allowing for a more efficient implementation of MADV_DONTNEED and MADV_FREE. Previously, the implementation of MADV_DONTNEED and MADV_FREE relied on per-page pmap operations, such as pmap_clear_reference(). Intuitively, the problem with this implementation is that the pmap-level locks are acquired and released and the page table traversed repeatedly, once for each resident page in the range that was specified to madvise(2). A more subtle flaw with the previous implementation is that pmap_clear_reference() would clear the reference bit on all mappings to the specified page, not just the mapping in the range specified to madvise(2). Since our malloc(3) makes heavy use of madvise(2), this change can have a measureable impact. For example, the system time for completing a parallel "buildworld" on a 6-core amd64 machine was reduced by about 1.5% to 2.0%. Note: This change only contains pmap_advise() implementations for a subset of our supported architectures. I will commit implementations for the remaining architectures after further testing. For now, a stub function is sufficient because of the advisory nature of pmap_advise(). Discussed with: jeff, jhb, kib Tested by: pho (i386), marcel (ia64) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/amd64/amd64/pmap.c head/sys/arm/arm/pmap-v6.c head/sys/arm/arm/pmap.c head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c head/sys/ia64/ia64/pmap.c head/sys/mips/mips/pmap.c head/sys/powerpc/powerpc/mmu_if.m head/sys/powerpc/powerpc/pmap_dispatch.c head/sys/sparc64/sparc64/pmap.c head/sys/vm/pmap.h head/sys/vm/vm_map.c head/sys/vm/vm_page.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Thu Aug 29 15:29:48 2013 (r255027) +++ head/sys/amd64/amd64/pmap.c Thu Aug 29 15:49:05 2013 (r255028) @@ -4967,6 +4967,128 @@ out: } /* + * Apply the given advice to the specified range of addresses within the + * given pmap. Depending on the advice, clear the referenced and/or + * modified flags in each mapping and set the mapped page's dirty field. + */ +void +pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, int advice) +{ + struct rwlock *lock; + pml4_entry_t *pml4e; + pdp_entry_t *pdpe; + pd_entry_t oldpde, *pde; + pt_entry_t *pte; + vm_offset_t va_next; + vm_page_t m; + boolean_t anychanged, pv_lists_locked; + + if (advice != MADV_DONTNEED && advice != MADV_FREE) + return; + pv_lists_locked = FALSE; +resume: + anychanged = FALSE; + PMAP_LOCK(pmap); + for (; sva < eva; sva = va_next) { + pml4e = pmap_pml4e(pmap, sva); + if ((*pml4e & PG_V) == 0) { + va_next = (sva + NBPML4) & ~PML4MASK; + if (va_next < sva) + va_next = eva; + continue; + } + pdpe = pmap_pml4e_to_pdpe(pml4e, sva); + if ((*pdpe & PG_V) == 0) { + va_next = (sva + NBPDP) & ~PDPMASK; + if (va_next < sva) + va_next = eva; + continue; + } + va_next = (sva + NBPDR) & ~PDRMASK; + if (va_next < sva) + va_next = eva; + pde = pmap_pdpe_to_pde(pdpe, sva); + oldpde = *pde; + if ((oldpde & PG_V) == 0) + continue; + else if ((oldpde & PG_PS) != 0) { + if ((oldpde & PG_MANAGED) == 0) + continue; + if (!pv_lists_locked) { + pv_lists_locked = TRUE; + if (!rw_try_rlock(&pvh_global_lock)) { + if (anychanged) + pmap_invalidate_all(pmap); + PMAP_UNLOCK(pmap); + rw_rlock(&pvh_global_lock); + goto resume; + } + } + lock = NULL; + if (!pmap_demote_pde_locked(pmap, pde, sva, &lock)) { + if (lock != NULL) + rw_wunlock(lock); + + /* + * The large page mapping was destroyed. + */ + continue; + } + + /* + * Unless the page mappings are wired, remove the + * mapping to a single page so that a subsequent + * access may repromote. Since the underlying page + * table page is fully populated, this removal never + * frees a page table page. + */ + if ((oldpde & PG_W) == 0) { + pte = pmap_pde_to_pte(pde, sva); + KASSERT((*pte & PG_V) != 0, + ("pmap_advise: invalid PTE")); + pmap_remove_pte(pmap, pte, sva, *pde, NULL, + &lock); + anychanged = TRUE; + } + if (lock != NULL) + rw_wunlock(lock); + } + if (va_next > eva) + va_next = eva; + for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++, + sva += PAGE_SIZE) { + if ((*pte & (PG_MANAGED | PG_V)) != (PG_MANAGED | + PG_V)) + continue; + else if ((*pte & (PG_M | PG_RW)) == (PG_M | PG_RW)) { + if (advice == MADV_DONTNEED) { + /* + * Future calls to pmap_is_modified() + * can be avoided by making the page + * dirty now. + */ + m = PHYS_TO_VM_PAGE(*pte & PG_FRAME); + vm_page_dirty(m); + } + atomic_clear_long(pte, PG_M | PG_A); + } else if ((*pte & PG_A) != 0) + atomic_clear_long(pte, PG_A); + else + continue; + if ((*pte & PG_G) != 0) + pmap_invalidate_page(pmap, sva); + else + anychanged = TRUE; + } + } + if (anychanged) + pmap_invalidate_all(pmap); + if (pv_lists_locked) + rw_runlock(&pvh_global_lock); + PMAP_UNLOCK(pmap); +} + +/* * Clear the modify bits on the specified physical page. */ void Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Thu Aug 29 15:29:48 2013 (r255027) +++ head/sys/arm/arm/pmap-v6.c Thu Aug 29 15:49:05 2013 (r255028) @@ -4767,6 +4767,14 @@ pmap_is_modified(vm_page_t m) } /* + * This function is advisory. + */ +void +pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, int advice) +{ +} + +/* * Clear the modify bits on the specified physical page. */ void Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Thu Aug 29 15:29:48 2013 (r255027) +++ head/sys/arm/arm/pmap.c Thu Aug 29 15:49:05 2013 (r255028) @@ -4516,6 +4516,14 @@ pmap_page_wired_mappings(vm_page_t m) } /* + * This function is advisory. + */ +void +pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, int advice) +{ +} + +/* * pmap_ts_referenced: * * Return the count of reference bits for a page, clearing all of them. Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Thu Aug 29 15:29:48 2013 (r255027) +++ head/sys/i386/i386/pmap.c Thu Aug 29 15:49:05 2013 (r255028) @@ -4834,6 +4834,112 @@ out: } /* + * Apply the given advice to the specified range of addresses within the + * given pmap. Depending on the advice, clear the referenced and/or + * modified flags in each mapping and set the mapped page's dirty field. + */ +void +pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, int advice) +{ + pd_entry_t oldpde, *pde; + pt_entry_t *pte; + vm_offset_t pdnxt; + vm_page_t m; + boolean_t anychanged, pv_lists_locked; + + if (advice != MADV_DONTNEED && advice != MADV_FREE) + return; + if (pmap_is_current(pmap)) + pv_lists_locked = FALSE; + else { + pv_lists_locked = TRUE; +resume: + rw_wlock(&pvh_global_lock); + sched_pin(); + } + anychanged = FALSE; + PMAP_LOCK(pmap); + for (; sva < eva; sva = pdnxt) { + pdnxt = (sva + NBPDR) & ~PDRMASK; + if (pdnxt < sva) + pdnxt = eva; + pde = pmap_pde(pmap, sva); + oldpde = *pde; + if ((oldpde & PG_V) == 0) + continue; + else if ((oldpde & PG_PS) != 0) { + if ((oldpde & PG_MANAGED) == 0) + continue; + if (!pv_lists_locked) { + pv_lists_locked = TRUE; + if (!rw_try_wlock(&pvh_global_lock)) { + if (anychanged) + pmap_invalidate_all(pmap); + PMAP_UNLOCK(pmap); + goto resume; + } + sched_pin(); + } + if (!pmap_demote_pde(pmap, pde, sva)) { + /* + * The large page mapping was destroyed. + */ + continue; + } + + /* + * Unless the page mappings are wired, remove the + * mapping to a single page so that a subsequent + * access may repromote. Since the underlying page + * table page is fully populated, this removal never + * frees a page table page. + */ + if ((oldpde & PG_W) == 0) { + pte = pmap_pte_quick(pmap, sva); + KASSERT((*pte & PG_V) != 0, + ("pmap_advise: invalid PTE")); + pmap_remove_pte(pmap, pte, sva, NULL); + anychanged = TRUE; + } + } + if (pdnxt > eva) + pdnxt = eva; + for (pte = pmap_pte_quick(pmap, sva); sva != pdnxt; pte++, + sva += PAGE_SIZE) { + if ((*pte & (PG_MANAGED | PG_V)) != (PG_MANAGED | + PG_V)) + continue; + else if ((*pte & (PG_M | PG_RW)) == (PG_M | PG_RW)) { + if (advice == MADV_DONTNEED) { + /* + * Future calls to pmap_is_modified() + * can be avoided by making the page + * dirty now. + */ + m = PHYS_TO_VM_PAGE(*pte & PG_FRAME); + vm_page_dirty(m); + } + atomic_clear_int((u_int *)pte, PG_M | PG_A); + } else if ((*pte & PG_A) != 0) + atomic_clear_int((u_int *)pte, PG_A); + else + continue; + if ((*pte & PG_G) != 0) + pmap_invalidate_page(pmap, sva); + else + anychanged = TRUE; + } + } + if (anychanged) + pmap_invalidate_all(pmap); + if (pv_lists_locked) { + sched_unpin(); + rw_wunlock(&pvh_global_lock); + } + PMAP_UNLOCK(pmap); +} + +/* * Clear the modify bits on the specified physical page. */ void Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Thu Aug 29 15:29:48 2013 (r255027) +++ head/sys/i386/xen/pmap.c Thu Aug 29 15:49:05 2013 (r255028) @@ -3914,6 +3914,72 @@ pmap_ts_referenced(vm_page_t m) } /* + * Apply the given advice to the specified range of addresses within the + * given pmap. Depending on the advice, clear the referenced and/or + * modified flags in each mapping and set the mapped page's dirty field. + */ +void +pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, int advice) +{ + pd_entry_t oldpde; + pt_entry_t *pte; + vm_offset_t pdnxt; + vm_page_t m; + boolean_t anychanged; + + if (advice != MADV_DONTNEED && advice != MADV_FREE) + return; + anychanged = FALSE; + rw_wlock(&pvh_global_lock); + sched_pin(); + PMAP_LOCK(pmap); + for (; sva < eva; sva = pdnxt) { + pdnxt = (sva + NBPDR) & ~PDRMASK; + if (pdnxt < sva) + pdnxt = eva; + oldpde = pmap->pm_pdir[sva >> PDRSHIFT]; + if ((oldpde & (PG_PS | PG_V)) != PG_V) + continue; + if (pdnxt > eva) + pdnxt = eva; + for (pte = pmap_pte_quick(pmap, sva); sva != pdnxt; pte++, + sva += PAGE_SIZE) { + if ((*pte & (PG_MANAGED | PG_V)) != (PG_MANAGED | + PG_V)) + continue; + else if ((*pte & (PG_M | PG_RW)) == (PG_M | PG_RW)) { + if (advice == MADV_DONTNEED) { + /* + * Future calls to pmap_is_modified() + * can be avoided by making the page + * dirty now. + */ + m = PHYS_TO_VM_PAGE(xpmap_mtop(*pte) & + PG_FRAME); + vm_page_dirty(m); + } + PT_SET_VA_MA(pte, *pte & ~(PG_M | PG_A), TRUE); + } else if ((*pte & PG_A) != 0) + PT_SET_VA_MA(pte, *pte & ~PG_A, TRUE); + else + continue; + if ((*pte & PG_G) != 0) + pmap_invalidate_page(pmap, sva); + else + anychanged = TRUE; + } + } + PT_UPDATES_FLUSH(); + if (*PMAP1) + PT_SET_VA_MA(PMAP1, 0, TRUE); + if (anychanged) + pmap_invalidate_all(pmap); + sched_unpin(); + rw_wunlock(&pvh_global_lock); + PMAP_UNLOCK(pmap); +} + +/* * Clear the modify bits on the specified physical page. */ void Modified: head/sys/ia64/ia64/pmap.c ============================================================================== --- head/sys/ia64/ia64/pmap.c Thu Aug 29 15:29:48 2013 (r255027) +++ head/sys/ia64/ia64/pmap.c Thu Aug 29 15:49:05 2013 (r255028) @@ -2310,6 +2310,50 @@ pmap_is_referenced(vm_page_t m) } /* + * Apply the given advice to the specified range of addresses within the + * given pmap. Depending on the advice, clear the referenced and/or + * modified flags in each mapping and set the mapped page's dirty field. + */ +void +pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, int advice) +{ + struct ia64_lpte *pte; + pmap_t oldpmap; + vm_page_t m; + + PMAP_LOCK(pmap); + oldpmap = pmap_switch(pmap); + for (; sva < eva; sva += PAGE_SIZE) { + /* If page is invalid, skip this page. */ + pte = pmap_find_vhpt(sva); + if (pte == NULL) + continue; + + /* If it isn't managed, skip it too. */ + if (!pmap_managed(pte)) + continue; + + /* Clear its modified and referenced bits. */ + if (pmap_dirty(pte)) { + if (advice == MADV_DONTNEED) { + /* + * Future calls to pmap_is_modified() can be + * avoided by making the page dirty now. + */ + m = PHYS_TO_VM_PAGE(pmap_ppn(pte)); + vm_page_dirty(m); + } + pmap_clear_dirty(pte); + } else if (!pmap_accessed(pte)) + continue; + pmap_clear_accessed(pte); + pmap_invalidate_page(sva); + } + pmap_switch(oldpmap); + PMAP_UNLOCK(pmap); +} + +/* * Clear the modify bits on the specified physical page. */ void Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Thu Aug 29 15:29:48 2013 (r255027) +++ head/sys/mips/mips/pmap.c Thu Aug 29 15:49:05 2013 (r255028) @@ -2914,6 +2914,14 @@ pmap_is_prefaultable(pmap_t pmap, vm_off } /* + * This function is advisory. + */ +void +pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, int advice) +{ +} + +/* * Clear the modify bits on the specified physical page. */ void Modified: head/sys/powerpc/powerpc/mmu_if.m ============================================================================== --- head/sys/powerpc/powerpc/mmu_if.m Thu Aug 29 15:29:48 2013 (r255027) +++ head/sys/powerpc/powerpc/mmu_if.m Thu Aug 29 15:49:05 2013 (r255028) @@ -133,6 +133,25 @@ CODE { /** + * @brief Apply the given advice to the specified range of addresses within + * the given pmap. Depending on the advice, clear the referenced and/or + * modified flags in each mapping and set the mapped page's dirty field. + * + * @param _pmap physical map + * @param _start virtual range start + * @param _end virtual range end + * @param _advice advice to apply + */ +METHOD void advise { + mmu_t _mmu; + pmap_t _pmap; + vm_offset_t _start; + vm_offset_t _end; + int _advice; +}; + + +/** * @brief Change the wiring attribute for the page in the given physical * map and virtual address. * Modified: head/sys/powerpc/powerpc/pmap_dispatch.c ============================================================================== --- head/sys/powerpc/powerpc/pmap_dispatch.c Thu Aug 29 15:29:48 2013 (r255027) +++ head/sys/powerpc/powerpc/pmap_dispatch.c Thu Aug 29 15:49:05 2013 (r255028) @@ -91,6 +91,15 @@ RB_GENERATE(pvo_tree, pvo_entry, pvo_pli void +pmap_advise(pmap_t pmap, vm_offset_t start, vm_offset_t end, int advice) +{ + + CTR5(KTR_PMAP, "%s(%p, %#x, %#x, %d)", __func__, pmap, start, end, + advice); + MMU_ADVISE(mmu_obj, pmap, start, end, advice); +} + +void pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) { Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Thu Aug 29 15:29:48 2013 (r255027) +++ head/sys/sparc64/sparc64/pmap.c Thu Aug 29 15:49:05 2013 (r255028) @@ -2126,6 +2126,14 @@ pmap_is_referenced(vm_page_t m) return (rv); } +/* + * This function is advisory. + */ +void +pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, int advice) +{ +} + void pmap_clear_modify(vm_page_t m) { Modified: head/sys/vm/pmap.h ============================================================================== --- head/sys/vm/pmap.h Thu Aug 29 15:29:48 2013 (r255027) +++ head/sys/vm/pmap.h Thu Aug 29 15:49:05 2013 (r255028) @@ -98,6 +98,8 @@ struct thread; extern vm_offset_t kernel_vm_end; void pmap_activate(struct thread *td); +void pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, + int advice); void pmap_align_superpage(vm_object_t, vm_ooffset_t, vm_offset_t *, vm_size_t); void pmap_change_wiring(pmap_t, vm_offset_t, boolean_t); Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Thu Aug 29 15:29:48 2013 (r255027) +++ head/sys/vm/vm_map.c Thu Aug 29 15:49:05 2013 (r255028) @@ -2125,7 +2125,7 @@ vm_map_madvise( (current != &map->header) && (current->start < end); current = current->next ) { - vm_offset_t useStart; + vm_offset_t useEnd, useStart; if (current->eflags & MAP_ENTRY_IS_SUB_MAP) continue; @@ -2133,17 +2133,34 @@ vm_map_madvise( pstart = OFF_TO_IDX(current->offset); pend = pstart + atop(current->end - current->start); useStart = current->start; + useEnd = current->end; if (current->start < start) { pstart += atop(start - current->start); useStart = start; } - if (current->end > end) + if (current->end > end) { pend -= atop(current->end - end); + useEnd = end; + } if (pstart >= pend) continue; + /* + * Perform the pmap_advise() before clearing + * PGA_REFERENCED in vm_page_advise(). Otherwise, a + * concurrent pmap operation, such as pmap_remove(), + * could clear a reference in the pmap and set + * PGA_REFERENCED on the page before the pmap_advise() + * had completed. Consequently, the page would appear + * referenced based upon an old reference that + * occurred before this pmap_advise() ran. + */ + if (behav == MADV_DONTNEED || behav == MADV_FREE) + pmap_advise(map->pmap, useStart, useEnd, + behav); + vm_object_madvise(current->object.vm_object, pstart, pend, behav); if (behav == MADV_WILLNEED) { Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Thu Aug 29 15:29:48 2013 (r255027) +++ head/sys/vm/vm_page.c Thu Aug 29 15:49:05 2013 (r255028) @@ -2634,7 +2634,6 @@ vm_page_advise(vm_page_t m, int advice) * But we do make the page is freeable as we can without * actually taking the step of unmapping it. */ - pmap_clear_modify(m); m->dirty = 0; m->act_count = 0; } else if (advice != MADV_DONTNEED) @@ -2654,15 +2653,7 @@ vm_page_advise(vm_page_t m, int advice) /* * Clear any references to the page. Otherwise, the page daemon will * immediately reactivate the page. - * - * Perform the pmap_clear_reference() first. Otherwise, a concurrent - * pmap operation, such as pmap_remove(), could clear a reference in - * the pmap and set PGA_REFERENCED on the page before the - * pmap_clear_reference() had completed. Consequently, the page would - * appear referenced based upon an old reference that occurred before - * this function ran. */ - pmap_clear_reference(m); vm_page_aflag_clear(m, PGA_REFERENCED); if (advice != MADV_FREE && m->dirty == 0 && pmap_is_modified(m)) From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 15:58:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A84D052C; Thu, 29 Aug 2013 15:58:21 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 969382352; Thu, 29 Aug 2013 15:58:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TFwLWg019986; Thu, 29 Aug 2013 15:58:21 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TFwLHN019984; Thu, 29 Aug 2013 15:58:21 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201308291558.r7TFwLHN019984@svn.freebsd.org> From: Antoine Brodin Date: Thu, 29 Aug 2013 15:58:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255029 - in head: . share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 15:58:21 -0000 Author: antoine Date: Thu Aug 29 15:58:20 2013 New Revision: 255029 URL: http://svnweb.freebsd.org/changeset/base/255029 Log: Fix after r255014 Modified: head/ObsoleteFiles.inc head/share/man/man5/src.conf.5 Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Aug 29 15:49:05 2013 (r255028) +++ head/ObsoleteFiles.inc Thu Aug 29 15:58:20 2013 (r255029) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20130829: bsdpatch is patch unconditionally +OLD_FILES+=usr/bin/bsdpatch +OLD_FILES+=usr/share/man/man1/bsdpatch.1.gz # 20130822: bind 9.9.3-P2 import OLD_LIBS+=usr/lib/liblwres.so.80 # 20130814: vm_page_busy(9) Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Thu Aug 29 15:49:05 2013 (r255028) +++ head/share/man/man5/src.conf.5 Thu Aug 29 15:58:20 2013 (r255029) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 253304 2013-07-12 23:08:44Z bapt .\" $FreeBSD$ -.Dd August 28, 2013 +.Dd August 29, 2013 .Dt SRC.CONF 5 .Os .Sh NAME @@ -500,9 +500,6 @@ When set, it also enforces the following .It .Va WITHOUT_GNU_SUPPORT .El -.It Va WITH_GNU_PATCH -.\" from FreeBSD: head/tools/build/options/WITH_GNU_PATCH 253689 2013-07-26 21:25:18Z pfg -Install GNU-licensed patch as 'patch' instead of BSD patch. .It Va WITHOUT_GNU_SUPPORT .\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without optional GNU support. From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 15:59:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2FDBF750; Thu, 29 Aug 2013 15:59:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1DF00235D; Thu, 29 Aug 2013 15:59:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TFx5LX020198; Thu, 29 Aug 2013 15:59:05 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TFx5r5020197; Thu, 29 Aug 2013 15:59:05 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201308291559.r7TFx5r5020197@svn.freebsd.org> From: John Baldwin Date: Thu, 29 Aug 2013 15:59:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255030 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 15:59:06 -0000 Author: jhb Date: Thu Aug 29 15:59:05 2013 New Revision: 255030 URL: http://svnweb.freebsd.org/changeset/base/255030 Log: Don't return an error for socket timeouts that are too large. Just cap them to INT_MAX ticks instead. PR: kern/181416 (r254699 really) Requested by: bde MFC after: 2 weeks Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Thu Aug 29 15:58:20 2013 (r255029) +++ head/sys/kern/uipc_socket.c Thu Aug 29 15:59:05 2013 (r255030) @@ -2698,17 +2698,12 @@ sosetopt(struct socket *so, struct socko sizeof tv); if (error) goto bad; - - if (tv.tv_sec < 0 || tv.tv_sec > INT_MAX / hz || - tv.tv_usec < 0 || tv.tv_usec >= 1000000) { + if (tv.tv_sec < 0 || tv.tv_usec < 0 || + tv.tv_usec >= 1000000) { error = EDOM; goto bad; } val = tvtohz(&tv); - if (val == INT_MAX) { - error = EDOM; - goto bad; - } switch (sopt->sopt_name) { case SO_SNDTIMEO: From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 16:26:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EF09FA94; Thu, 29 Aug 2013 16:26:04 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DC73425CE; Thu, 29 Aug 2013 16:26:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TGQ4d3036067; Thu, 29 Aug 2013 16:26:04 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TGQ4RY036066; Thu, 29 Aug 2013 16:26:04 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201308291626.r7TGQ4RY036066@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 29 Aug 2013 16:26:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255031 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 16:26:05 -0000 Author: marcel Date: Thu Aug 29 16:26:04 2013 New Revision: 255031 URL: http://svnweb.freebsd.org/changeset/base/255031 Log: Work-around a timing problem with the ITE IT8513E now that the core calls ns8250_bus_ipend() almost immediately after ns8250_bus_attach(). As it appears, a line break condition is being signalled for almost all received characters due to this. A delay of 150ms seems enough to allow the H/W to settle and to avoid the problem. More analysis is needed, but for now a regression has been addressed. Reported by: kevlo@ Tested by: kevlo@ Modified: head/sys/dev/uart/uart_dev_ns8250.c Modified: head/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- head/sys/dev/uart/uart_dev_ns8250.c Thu Aug 29 15:59:05 2013 (r255030) +++ head/sys/dev/uart/uart_dev_ns8250.c Thu Aug 29 16:26:04 2013 (r255031) @@ -453,7 +453,19 @@ ns8250_bus_attach(struct uart_softc *sc) ns8250->ier |= ns8250->ier_rxbits; uart_setreg(bas, REG_IER, ns8250->ier); uart_barrier(bas); - + + /* + * Timing of the H/W access was changed with r253161 of uart_core.c + * It has been observed that an ITE IT8513E would signal a break + * condition with pretty much every character it received, unless + * it had enough time to settle between ns8250_bus_attach() and + * ns8250_bus_ipend() -- which it accidentally had before r253161. + * It's not understood why the UART chip behaves this way and it + * could very well be that the DELAY make the H/W work in the same + * accidental manner as before. More analysis is warranted, but + * at least now we fixed a known regression. + */ + DELAY(150); return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 16:41:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CB2382F1; Thu, 29 Aug 2013 16:41:40 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9E2F32704; Thu, 29 Aug 2013 16:41:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TGfeno045205; Thu, 29 Aug 2013 16:41:40 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TGfemd045204; Thu, 29 Aug 2013 16:41:40 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201308291641.r7TGfemd045204@svn.freebsd.org> From: "Kenneth D. Merry" Date: Thu, 29 Aug 2013 16:41:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255032 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 16:41:40 -0000 Author: ken Date: Thu Aug 29 16:41:40 2013 New Revision: 255032 URL: http://svnweb.freebsd.org/changeset/base/255032 Log: Fix some issues in change 254760 pointed out by Bruce Evans: - Remove excessive parenthesis - Use KNF continuation indentation - Cut down on excessive continuation lines - More consistent style in messages - Use uprintf() instead of printf() Submitted by: bde Modified: head/sys/kern/kern_physio.c Modified: head/sys/kern/kern_physio.c ============================================================================== --- head/sys/kern/kern_physio.c Thu Aug 29 16:26:04 2013 (r255031) +++ head/sys/kern/kern_physio.c Thu Aug 29 16:41:40 2013 (r255032) @@ -58,25 +58,22 @@ physio(struct cdev *dev, struct uio *uio * If the driver does not want I/O to be split, that means that we * need to reject any requests that will not fit into one buffer. */ - if ((dev->si_flags & SI_NOSPLIT) && - ((uio->uio_resid > dev->si_iosize_max) || - (uio->uio_resid > MAXPHYS) || - (uio->uio_iovcnt > 1))) { + if (dev->si_flags & SI_NOSPLIT && + (uio->uio_resid > dev->si_iosize_max || uio->uio_resid > MAXPHYS || + uio->uio_iovcnt > 1)) { /* * Tell the user why his I/O was rejected. */ if (uio->uio_resid > dev->si_iosize_max) - printf("%s: request size %zd > si_iosize_max=%d, " + uprintf("%s: request size=%zd > si_iosize_max=%d; " "cannot split request\n", devtoname(dev), uio->uio_resid, dev->si_iosize_max); - if (uio->uio_resid > MAXPHYS) - printf("%s: request size %zd > MAXPHYS=%d, " + uprintf("%s: request size=%zd > MAXPHYS=%d; " "cannot split request\n", devtoname(dev), uio->uio_resid, MAXPHYS); - if (uio->uio_iovcnt > 1) - printf("%s: request vectors=%d > 1, " + uprintf("%s: request vectors=%d > 1; " "cannot split request\n", devtoname(dev), uio->uio_iovcnt); @@ -117,8 +114,8 @@ physio(struct cdev *dev, struct uio *uio * This device does not want I/O to be split. */ if (dev->si_flags & SI_NOSPLIT) { - printf("%s: request ptr %p is not " - "on a page boundary, cannot split " + uprintf("%s: request ptr %p is not " + "on a page boundary; cannot split " "request\n", devtoname(dev), bp->b_data); error = EFBIG; From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 16:57:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A5CB6B1D; Thu, 29 Aug 2013 16:57:56 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 91974280E; Thu, 29 Aug 2013 16:57:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TGvu8O052701; Thu, 29 Aug 2013 16:57:56 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TGvu5c052696; Thu, 29 Aug 2013 16:57:56 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201308291657.r7TGvu5c052696@svn.freebsd.org> From: Ed Maste Date: Thu, 29 Aug 2013 16:57:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255033 - head/contrib/libexecinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 16:57:56 -0000 Author: emaste Date: Thu Aug 29 16:57:55 2013 New Revision: 255033 URL: http://svnweb.freebsd.org/changeset/base/255033 Log: Update to 2013-08-29 NetBSD libexecinfo snapshot This adds my patch to use the kern.proc.pathname sysctl instead of relying on procfs(5). Modified: head/contrib/libexecinfo/backtrace.3 head/contrib/libexecinfo/backtrace.c head/contrib/libexecinfo/symtab.c Directory Properties: head/contrib/libexecinfo/ (props changed) Modified: head/contrib/libexecinfo/backtrace.3 ============================================================================== --- head/contrib/libexecinfo/backtrace.3 Thu Aug 29 16:41:40 2013 (r255032) +++ head/contrib/libexecinfo/backtrace.3 Thu Aug 29 16:57:55 2013 (r255033) @@ -1,4 +1,4 @@ -.\" $NetBSD: backtrace.3,v 1.4 2012/06/10 00:24:36 christos Exp $ +.\" $NetBSD: backtrace.3,v 1.5 2013/08/22 17:08:43 christos Exp $ .\" $FreeBSD$ .\" .\" Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -152,10 +152,4 @@ The Linux versions of the functions (the instead of .Ft size_t arguments. -.It -The -.Fn backtrace_symbols -functions currently rely on -.Xr procfs 5 -to locate the executable. .El Modified: head/contrib/libexecinfo/backtrace.c ============================================================================== --- head/contrib/libexecinfo/backtrace.c Thu Aug 29 16:41:40 2013 (r255032) +++ head/contrib/libexecinfo/backtrace.c Thu Aug 29 16:57:55 2013 (r255033) @@ -1,4 +1,4 @@ -/* $NetBSD: backtrace.c,v 1.2 2012/07/09 03:11:59 christos Exp $ */ +/* $NetBSD: backtrace.c,v 1.3 2013/08/29 14:58:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: backtrace.c,v 1.2 2012/07/09 03:11:59 christos Exp $"); +__RCSID("$NetBSD: backtrace.c,v 1.3 2013/08/29 14:58:56 christos Exp $"); #include #include @@ -51,9 +51,29 @@ __RCSID("$NetBSD: backtrace.c,v 1.2 2012 #ifdef __linux__ #define SELF "/proc/self/exe" #else +#include #define SELF "/proc/curproc/file" #endif +static int +open_self(int flags) +{ + const char *pathname = SELF; +#ifdef KERN_PROC_PATHNAME + static const int name[] = { + CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1, + }; + char path[MAXPATHLEN]; + size_t len; + + len = sizeof(path); + if (sysctl(name, 4, path, &len, NULL, 0) != -1) + pathname = path; +#endif + return open(pathname, flags); +} + + static int __printflike(4, 5) rasprintf(char **buf, size_t *bufsiz, size_t offs, const char *fmt, ...) { @@ -163,7 +183,7 @@ backtrace_symbols_fmt(void *const *trace symtab_t *st; int fd; - if ((fd = open(SELF, O_RDONLY)) != -1) + if ((fd = open_self(O_RDONLY)) != -1) st = symtab_create(fd, -1, STT_FUNC); else st = NULL; Modified: head/contrib/libexecinfo/symtab.c ============================================================================== --- head/contrib/libexecinfo/symtab.c Thu Aug 29 16:41:40 2013 (r255032) +++ head/contrib/libexecinfo/symtab.c Thu Aug 29 16:57:55 2013 (r255033) @@ -1,4 +1,4 @@ -/* $NetBSD: symtab.c,v 1.1 2012/05/26 22:02:29 christos Exp $ */ +/* $NetBSD: symtab.c,v 1.2 2013/08/29 15:01:57 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,12 +29,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: symtab.c,v 1.1 2012/05/26 22:02:29 christos Exp $"); +__RCSID("$NetBSD: symtab.c,v 1.2 2013/08/29 15:01:57 christos Exp $"); #include #include -#include #include +#include #include #include From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 17:13:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 155805DD; Thu, 29 Aug 2013 17:13:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 02A682937; Thu, 29 Aug 2013 17:13:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7THDIEY062623; Thu, 29 Aug 2013 17:13:18 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7THDI91062622; Thu, 29 Aug 2013 17:13:18 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201308291713.r7THDI91062622@svn.freebsd.org> From: Ed Maste Date: Thu, 29 Aug 2013 17:13:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r255034 - vendor/NetBSD/libexecinfo X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 17:13:19 -0000 Author: emaste Date: Thu Aug 29 17:13:18 2013 New Revision: 255034 URL: http://svnweb.freebsd.org/changeset/base/255034 Log: Add instructions for updating libexecinfo Added: vendor/NetBSD/libexecinfo/FreeBSD-Upgrade Added: vendor/NetBSD/libexecinfo/FreeBSD-Upgrade ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/libexecinfo/FreeBSD-Upgrade Thu Aug 29 17:13:18 2013 (r255034) @@ -0,0 +1,39 @@ +NetBSD cvsweb for reviewing changes: + http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libexecinfo/ + +Update steps: + +1) Checkout the head of the vendor branch: + + REPO=svn+ssh://svn.freebsd.org/ + svn co $REPO/base/vendor/NetBSD/libexecinfo/dist + +2) Update files: + + rm dist/* + export CVSROOT=anoncvs@anoncvs.NetBSD.org:/cvsroot + cvs export -r HEAD -d dist src/lib/libexecinfo/backtrace.3 + cvs export -r HEAD -d dist src/lib/libexecinfo/backtrace.c + cvs export -r HEAD -d dist src/lib/libexecinfo/builtin.c + cvs export -r HEAD -d dist src/lib/libexecinfo/execinfo.h + cvs export -r HEAD -d dist src/lib/libexecinfo/symtab.c + cvs export -r HEAD -d dist src/lib/libexecinfo/symtab.h + cvs export -r HEAD -d dist src/lib/libexecinfo/unwind.c + cvs export -r HEAD -d dist src/lib/libexecinfo/unwind.h + cvs export -r HEAD -d dist src/lib/libexecinfo/unwind_arm_ehabi_stub.c + +3) Commit the new versions: + + svn commit -m "Vendor import of NetBSD's libexecinfo at `date +%F`" dist + svn cp -m "Tag `date +%F` import of NetBSD's libexecinfo" \ + $REPO/base/vendor/NetBSD/libexecinfo/dist \ + $REPO/base/vendor/NetBSD/libexecinfo/`date +%Y%m%d` + +4) Merge to head: + + cd /path/to/head/checkout + cd contrib/libexecinfo + svn merge --accept=postpone $REPO/base/vendor/NetBSD/libexecinfo/dist . + svn diff --no-diff-deleted \ + --old=$REPO/base/vendor/NetBSD/libexecinfo/dist --new=. + From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 17:40:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 776EE72C; Thu, 29 Aug 2013 17:40:04 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 655032B21; Thu, 29 Aug 2013 17:40:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7THe436078107; Thu, 29 Aug 2013 17:40:04 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7THe4s1078106; Thu, 29 Aug 2013 17:40:04 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201308291740.r7THe4s1078106@svn.freebsd.org> From: Xin LI Date: Thu, 29 Aug 2013 17:40:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255035 - head/etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 17:40:04 -0000 Author: delphij Date: Thu Aug 29 17:40:03 2013 New Revision: 255035 URL: http://svnweb.freebsd.org/changeset/base/255035 Log: Add a few missing language directories for /usr. Modified: head/etc/mtree/BSD.usr.dist Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Thu Aug 29 17:13:18 2013 (r255034) +++ head/etc/mtree/BSD.usr.dist Thu Aug 29 17:40:03 2013 (r255035) @@ -63,6 +63,8 @@ atf .. calendar + de_AT.ISO_8859-15 + .. de_DE.ISO8859-1 .. fr_FR.ISO8859-1 @@ -71,8 +73,14 @@ .. hu_HU.ISO8859-2 .. + pt_BR.ISO8859-1 + .. + pt_BR.UTF-8 + .. ru_RU.KOI8-R .. + ru_RU.UTF-8 + .. uk_UA.KOI8-U .. .. From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 17:45:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 85378E9D; Thu, 29 Aug 2013 17:45:14 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 58C7A2BC4; Thu, 29 Aug 2013 17:45:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7THjEKx082153; Thu, 29 Aug 2013 17:45:14 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7THjEKJ082152; Thu, 29 Aug 2013 17:45:14 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201308291745.r7THjEKJ082152@svn.freebsd.org> From: Xin LI Date: Thu, 29 Aug 2013 17:45:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255036 - head/etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 17:45:14 -0000 Author: delphij Date: Thu Aug 29 17:45:13 2013 New Revision: 255036 URL: http://svnweb.freebsd.org/changeset/base/255036 Log: Add directories that is installed as part of bsdconfig. These are included unconditionally for now because bsdconfig is currently installed unconditionally. This fixes 'make -j 17 installworld' caused by a race condition. MFC candidate. Modified: head/etc/mtree/BSD.usr.dist Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Thu Aug 29 17:40:03 2013 (r255035) +++ head/etc/mtree/BSD.usr.dist Thu Aug 29 17:45:13 2013 (r255036) @@ -42,6 +42,62 @@ .. .. libexec + bsdconfig + 020.docsinstall + include + .. + .. + 030.packages + include + .. + .. + 040.password + include + .. + .. + 050.diskmgmt + include + .. + .. + 070.usermgmt + include + .. + .. + 080.console + include + .. + .. + 090.timezone + include + .. + .. + 110.mouse + include + .. + .. + 120.networking + include + .. + .. + 130.security + include + .. + .. + 140.startup + include + .. + .. + 150.ttys + include + .. + .. + dot + include + .. + .. + include + .. + .. bsdinstall .. lpr @@ -62,6 +118,22 @@ share atf .. + bsdconfig + media + .. + networking + .. + packages + .. + password + .. + startup + .. + timezone + .. + usermgmt + .. + .. calendar de_AT.ISO_8859-15 .. @@ -229,6 +301,8 @@ .. bootforth .. + bsdconfig + .. csh .. cvsup From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 18:36:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E8CA8E56; Thu, 29 Aug 2013 18:36:47 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D59E12F73; Thu, 29 Aug 2013 18:36:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TIalqW012585; Thu, 29 Aug 2013 18:36:47 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TIalTv012584; Thu, 29 Aug 2013 18:36:47 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201308291836.r7TIalTv012584@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 29 Aug 2013 18:36:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255037 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 18:36:48 -0000 Author: jkim Date: Thu Aug 29 18:36:47 2013 New Revision: 255037 URL: http://svnweb.freebsd.org/changeset/base/255037 Log: Fix atomic operations on context_flag without altering semantics. Modified: head/sys/dev/drm2/drm_context.c Modified: head/sys/dev/drm2/drm_context.c ============================================================================== --- head/sys/dev/drm2/drm_context.c Thu Aug 29 17:45:13 2013 (r255036) +++ head/sys/dev/drm2/drm_context.c Thu Aug 29 18:36:47 2013 (r255037) @@ -182,7 +182,7 @@ bad: int drm_context_switch(struct drm_device *dev, int old, int new) { - if (test_and_set_bit(0, &dev->context_flag)) { + if (atomic_xchg(&dev->context_flag, 1) != 0) { DRM_ERROR("Reentering -- FIXME\n"); return EBUSY; } @@ -190,7 +190,7 @@ int drm_context_switch(struct drm_device DRM_DEBUG("Context switch from %d to %d\n", old, new); if (new == dev->last_context) { - clear_bit(0, &dev->context_flag); + atomic_xchg(&dev->context_flag, 0); return 0; } @@ -208,7 +208,7 @@ int drm_context_switch_complete(struct d /* If a context switch is ever initiated when the kernel holds the lock, release that lock here. */ - clear_bit(0, &dev->context_flag); + atomic_xchg(&dev->context_flag, 0); return 0; } From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 19:35:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8F6FD5CA; Thu, 29 Aug 2013 19:35:15 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7C224237D; Thu, 29 Aug 2013 19:35:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TJZFdZ045078; Thu, 29 Aug 2013 19:35:15 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TJZFm1045076; Thu, 29 Aug 2013 19:35:15 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201308291935.r7TJZFm1045076@svn.freebsd.org> From: Adrian Chadd Date: Thu, 29 Aug 2013 19:35:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255038 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 19:35:15 -0000 Author: adrian Date: Thu Aug 29 19:35:14 2013 New Revision: 255038 URL: http://svnweb.freebsd.org/changeset/base/255038 Log: Convert the if_lagg rwlock to an rmlock. We've been seeing lots of cache line contention (but not lock contention!) in our workloads between the various TX and RX threads going on. The write lock is only grabbed when configuration changes are made - which are infrequent. With this patch, the contention and cycles spent waiting for updates disappear. Sponsored by: Netflix, Inc. Modified: head/sys/net/if_lagg.c head/sys/net/if_lagg.h Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Thu Aug 29 18:36:47 2013 (r255037) +++ head/sys/net/if_lagg.c Thu Aug 29 19:35:14 2013 (r255038) @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include @@ -233,16 +233,17 @@ lagg_register_vlan(void *arg, struct ifn { struct lagg_softc *sc = ifp->if_softc; struct lagg_port *lp; + struct rm_priotracker tracker; if (ifp->if_softc != arg) /* Not our event */ return; - LAGG_RLOCK(sc); + LAGG_RLOCK(sc, &tracker); if (!SLIST_EMPTY(&sc->sc_ports)) { SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) EVENTHANDLER_INVOKE(vlan_config, lp->lp_ifp, vtag); } - LAGG_RUNLOCK(sc); + LAGG_RUNLOCK(sc, &tracker); } /* @@ -254,16 +255,17 @@ lagg_unregister_vlan(void *arg, struct i { struct lagg_softc *sc = ifp->if_softc; struct lagg_port *lp; + struct rm_priotracker tracker; if (ifp->if_softc != arg) /* Not our event */ return; - LAGG_RLOCK(sc); + LAGG_RLOCK(sc, &tracker); if (!SLIST_EMPTY(&sc->sc_ports)) { SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) EVENTHANDLER_INVOKE(vlan_unconfig, lp->lp_ifp, vtag); } - LAGG_RUNLOCK(sc); + LAGG_RUNLOCK(sc, &tracker); } static int @@ -322,9 +324,15 @@ lagg_clone_create(struct if_clone *ifc, } } LAGG_LOCK_INIT(sc); + LAGG_CALLOUT_LOCK_INIT(sc); SLIST_INIT(&sc->sc_ports); TASK_INIT(&sc->sc_lladdr_task, 0, lagg_port_setlladdr, sc); - callout_init_rw(&sc->sc_callout, &sc->sc_mtx, CALLOUT_SHAREDLOCK); + + /* + * This uses the callout lock rather than the rmlock; one can't + * hold said rmlock during SWI. + */ + callout_init_mtx(&sc->sc_callout, &sc->sc_call_mtx, 0); /* Initialise pseudo media types */ ifmedia_init(&sc->sc_media, 0, lagg_media_change, @@ -389,7 +397,10 @@ lagg_clone_destroy(struct ifnet *ifp) ether_ifdetach(ifp); if_free(ifp); + /* This grabs sc_callout_mtx, serialising it correctly */ callout_drain(&sc->sc_callout); + + /* At this point it's drained; we can free this */ counter_u64_free(sc->sc_ipackets); counter_u64_free(sc->sc_opackets); counter_u64_free(sc->sc_ibytes); @@ -401,6 +412,7 @@ lagg_clone_destroy(struct ifnet *ifp) taskqueue_drain(taskqueue_swi, &sc->sc_lladdr_task); LAGG_LOCK_DESTROY(sc); + LAGG_CALLOUT_LOCK_DESTROY(sc); free(sc, M_DEVBUF); } @@ -764,6 +776,7 @@ lagg_port_ioctl(struct ifnet *ifp, u_lon struct lagg_softc *sc; struct lagg_port *lp = NULL; int error = 0; + struct rm_priotracker tracker; /* Should be checked by the caller */ if (ifp->if_type != IFT_IEEE8023ADLAG || @@ -778,15 +791,15 @@ lagg_port_ioctl(struct ifnet *ifp, u_lon break; } - LAGG_RLOCK(sc); + LAGG_RLOCK(sc, &tracker); if ((lp = ifp->if_lagg) == NULL || lp->lp_softc != sc) { error = ENOENT; - LAGG_RUNLOCK(sc); + LAGG_RUNLOCK(sc, &tracker); break; } lagg_port2req(lp, rp); - LAGG_RUNLOCK(sc); + LAGG_RUNLOCK(sc, &tracker); break; case SIOCSIFCAP: @@ -955,21 +968,22 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd struct thread *td = curthread; char *buf, *outbuf; int count, buflen, len, error = 0; + struct rm_priotracker tracker; bzero(&rpbuf, sizeof(rpbuf)); switch (cmd) { case SIOCGLAGG: - LAGG_RLOCK(sc); + LAGG_RLOCK(sc, &tracker); count = 0; SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) count++; buflen = count * sizeof(struct lagg_reqport); - LAGG_RUNLOCK(sc); + LAGG_RUNLOCK(sc, &tracker); outbuf = malloc(buflen, M_TEMP, M_WAITOK | M_ZERO); - LAGG_RLOCK(sc); + LAGG_RLOCK(sc, &tracker); ra->ra_proto = sc->sc_proto; if (sc->sc_req != NULL) (*sc->sc_req)(sc, (caddr_t)&ra->ra_psc); @@ -987,7 +1001,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd buf += sizeof(rpbuf); len -= sizeof(rpbuf); } - LAGG_RUNLOCK(sc); + LAGG_RUNLOCK(sc, &tracker); ra->ra_ports = count; ra->ra_size = count * sizeof(rpbuf); error = copyout(outbuf, ra->ra_port, ra->ra_size); @@ -1065,16 +1079,16 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd break; } - LAGG_RLOCK(sc); + LAGG_RLOCK(sc, &tracker); if ((lp = (struct lagg_port *)tpif->if_lagg) == NULL || lp->lp_softc != sc) { error = ENOENT; - LAGG_RUNLOCK(sc); + LAGG_RUNLOCK(sc, &tracker); break; } lagg_port2req(lp, rp); - LAGG_RUNLOCK(sc); + LAGG_RUNLOCK(sc, &tracker); break; case SIOCSLAGGPORT: error = priv_check(td, PRIV_NET_LAGG); @@ -1280,14 +1294,15 @@ lagg_transmit(struct ifnet *ifp, struct { struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc; int error, len, mcast; + struct rm_priotracker tracker; len = m->m_pkthdr.len; mcast = (m->m_flags & (M_MCAST | M_BCAST)) ? 1 : 0; - LAGG_RLOCK(sc); + LAGG_RLOCK(sc, &tracker); /* We need a Tx algorithm and at least one port */ if (sc->sc_proto == LAGG_PROTO_NONE || sc->sc_count == 0) { - LAGG_RUNLOCK(sc); + LAGG_RUNLOCK(sc, &tracker); m_freem(m); ifp->if_oerrors++; return (ENXIO); @@ -1296,7 +1311,7 @@ lagg_transmit(struct ifnet *ifp, struct ETHER_BPF_MTAP(ifp, m); error = (*sc->sc_start)(sc, m); - LAGG_RUNLOCK(sc); + LAGG_RUNLOCK(sc, &tracker); if (error == 0) { counter_u64_add(sc->sc_opackets, 1); @@ -1322,12 +1337,13 @@ lagg_input(struct ifnet *ifp, struct mbu struct lagg_port *lp = ifp->if_lagg; struct lagg_softc *sc = lp->lp_softc; struct ifnet *scifp = sc->sc_ifp; + struct rm_priotracker tracker; - LAGG_RLOCK(sc); + LAGG_RLOCK(sc, &tracker); if ((scifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || (lp->lp_flags & LAGG_PORT_DISABLED) || sc->sc_proto == LAGG_PROTO_NONE) { - LAGG_RUNLOCK(sc); + LAGG_RUNLOCK(sc, &tracker); m_freem(m); return (NULL); } @@ -1346,7 +1362,7 @@ lagg_input(struct ifnet *ifp, struct mbu } } - LAGG_RUNLOCK(sc); + LAGG_RUNLOCK(sc, &tracker); return (m); } @@ -1367,16 +1383,17 @@ lagg_media_status(struct ifnet *ifp, str { struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc; struct lagg_port *lp; + struct rm_priotracker tracker; imr->ifm_status = IFM_AVALID; imr->ifm_active = IFM_ETHER | IFM_AUTO; - LAGG_RLOCK(sc); + LAGG_RLOCK(sc, &tracker); SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { if (LAGG_PORTACTIVE(lp)) imr->ifm_status |= IFM_ACTIVE; } - LAGG_RUNLOCK(sc); + LAGG_RUNLOCK(sc, &tracker); } static void Modified: head/sys/net/if_lagg.h ============================================================================== --- head/sys/net/if_lagg.h Thu Aug 29 18:36:47 2013 (r255037) +++ head/sys/net/if_lagg.h Thu Aug 29 19:35:14 2013 (r255038) @@ -187,7 +187,8 @@ struct lagg_llq { struct lagg_softc { struct ifnet *sc_ifp; /* virtual interface */ - struct rwlock sc_mtx; + struct rmlock sc_mtx; + struct mtx sc_call_mtx; int sc_proto; /* lagg protocol */ u_int sc_count; /* number of ports */ u_int sc_active; /* active port count */ @@ -255,14 +256,19 @@ struct lagg_port { SLIST_ENTRY(lagg_port) lp_entries; }; -#define LAGG_LOCK_INIT(_sc) rw_init(&(_sc)->sc_mtx, "if_lagg rwlock") -#define LAGG_LOCK_DESTROY(_sc) rw_destroy(&(_sc)->sc_mtx) -#define LAGG_RLOCK(_sc) rw_rlock(&(_sc)->sc_mtx) -#define LAGG_WLOCK(_sc) rw_wlock(&(_sc)->sc_mtx) -#define LAGG_RUNLOCK(_sc) rw_runlock(&(_sc)->sc_mtx) -#define LAGG_WUNLOCK(_sc) rw_wunlock(&(_sc)->sc_mtx) -#define LAGG_RLOCK_ASSERT(_sc) rw_assert(&(_sc)->sc_mtx, RA_RLOCKED) -#define LAGG_WLOCK_ASSERT(_sc) rw_assert(&(_sc)->sc_mtx, RA_WLOCKED) +#define LAGG_LOCK_INIT(_sc) rm_init(&(_sc)->sc_mtx, "if_lagg rmlock") +#define LAGG_LOCK_DESTROY(_sc) rm_destroy(&(_sc)->sc_mtx) +#define LAGG_RLOCK(_sc, _p) rm_rlock(&(_sc)->sc_mtx, (_p)) +#define LAGG_WLOCK(_sc) rm_wlock(&(_sc)->sc_mtx) +#define LAGG_RUNLOCK(_sc, _p) rm_runlock(&(_sc)->sc_mtx, (_p)) +#define LAGG_WUNLOCK(_sc) rm_wunlock(&(_sc)->sc_mtx) +#define LAGG_RLOCK_ASSERT(_sc) rm_assert(&(_sc)->sc_mtx, RA_RLOCKED) +#define LAGG_WLOCK_ASSERT(_sc) rm_assert(&(_sc)->sc_mtx, RA_WLOCKED) + +#define LAGG_CALLOUT_LOCK_INIT(_sc) \ + mtx_init(&(_sc)->sc_call_mtx, "if_lagg callout mutex", NULL,\ + MTX_DEF) +#define LAGG_CALLOUT_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_call_mtx) extern struct mbuf *(*lagg_input_p)(struct ifnet *, struct mbuf *); extern void (*lagg_linkstate_p)(struct ifnet *, int ); From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 19:47:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3D824A44; Thu, 29 Aug 2013 19:47:53 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2AAAB244C; Thu, 29 Aug 2013 19:47:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TJlr85051304; Thu, 29 Aug 2013 19:47:53 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TJlrqI051303; Thu, 29 Aug 2013 19:47:53 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201308291947.r7TJlrqI051303@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 29 Aug 2013 19:47:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255039 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 19:47:53 -0000 Author: jkim Date: Thu Aug 29 19:47:52 2013 New Revision: 255039 URL: http://svnweb.freebsd.org/changeset/base/255039 Log: - Remove test_and_set_bit() macro. It is unused since r255037. - Relax atomic_read() and atomic_set() macros. Linux does not require any memory barrier. Also, these macros may be even reordered or optimized away according to the API documentation: https://www.kernel.org/doc/Documentation/atomic_ops.txt Modified: head/sys/dev/drm2/drm_atomic.h Modified: head/sys/dev/drm2/drm_atomic.h ============================================================================== --- head/sys/dev/drm2/drm_atomic.h Thu Aug 29 19:35:14 2013 (r255038) +++ head/sys/dev/drm2/drm_atomic.h Thu Aug 29 19:47:52 2013 (r255039) @@ -37,8 +37,8 @@ typedef uint64_t atomic64_t; #define BITS_TO_LONGS(x) howmany(x, sizeof(long) * NBBY) -#define atomic_set(p, v) atomic_store_rel_int(p, v) -#define atomic_read(p) atomic_load_acq_int(p) +#define atomic_read(p) (*(volatile u_int *)(p)) +#define atomic_set(p, v) do { *(u_int *)(p) = (v); } while (0) #define atomic_add(v, p) atomic_add_int(p, v) #define atomic_sub(v, p) atomic_subtract_int(p, v) @@ -63,9 +63,7 @@ typedef uint64_t atomic64_t; #define set_bit(b, p) \ atomic_set_int((volatile u_int *)(p) + (b) / 32, 1 << (b) % 32) #define test_bit(b, p) \ - (atomic_load_acq_int((volatile u_int *)(p) + (b) / 32) & (1 << (b) % 32)) -#define test_and_set_bit(b, p) \ - atomic_testandset_int((volatile u_int *)(p) + (b) / 32, b) + ((atomic_read((volatile u_int *)(p) + (b) / 32) & (1 << (b) % 32)) != 0) static __inline int find_first_zero_bit(volatile void *p, int max) From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 19:52:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8A5B7BF2; Thu, 29 Aug 2013 19:52:22 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7235824A6; Thu, 29 Aug 2013 19:52:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TJqMPS054852; Thu, 29 Aug 2013 19:52:22 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TJqIbv054800; Thu, 29 Aug 2013 19:52:18 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201308291952.r7TJqIbv054800@svn.freebsd.org> From: "Justin T. Gibbs" Date: Thu, 29 Aug 2013 19:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255040 - in head/sys: amd64/amd64 amd64/include amd64/include/xen conf dev/xen/balloon dev/xen/blkback dev/xen/blkfront dev/xen/console dev/xen/control dev/xen/netback dev/xen/netfront... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 19:52:22 -0000 Author: gibbs Date: Thu Aug 29 19:52:18 2013 New Revision: 255040 URL: http://svnweb.freebsd.org/changeset/base/255040 Log: Implement vector callback for PVHVM and unify event channel implementations Re-structure Xen HVM support so that: - Xen is detected and hypercalls can be performed very early in system startup. - Xen interrupt services are implemented using FreeBSD's native interrupt delivery infrastructure. - the Xen interrupt service implementation is shared between PV and HVM guests. - Xen interrupt handlers can optionally use a filter handler in order to avoid the overhead of dispatch to an interrupt thread. - interrupt load can be distributed among all available CPUs. - the overhead of accessing the emulated local and I/O apics on HVM is removed for event channel port events. - a similar optimization can eventually, and fairly easily, be used to optimize MSI. Early Xen detection, HVM refactoring, PVHVM interrupt infrastructure, and misc Xen cleanups: Sponsored by: Spectra Logic Corporation Unification of PV & HVM interrupt infrastructure, bug fixes, and misc Xen cleanups: Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D sys/x86/x86/local_apic.c: sys/amd64/include/apicvar.h: sys/i386/include/apicvar.h: sys/amd64/amd64/apic_vector.S: sys/i386/i386/apic_vector.s: sys/amd64/amd64/machdep.c: sys/i386/i386/machdep.c: sys/i386/xen/exception.s: sys/x86/include/segments.h: Reserve IDT vector 0x93 for the Xen event channel upcall interrupt handler. On Hypervisors that support the direct vector callback feature, we can request that this vector be called directly by an injected HVM interrupt event, instead of a simulated PCI interrupt on the Xen platform PCI device. This avoids all of the overhead of dealing with the emulated I/O APIC and local APIC. It also means that the Hypervisor can inject these events on any CPU, allowing upcalls for different ports to be handled in parallel. sys/amd64/amd64/mp_machdep.c: sys/i386/i386/mp_machdep.c: Map Xen per-vcpu area during AP startup. sys/amd64/include/intr_machdep.h: sys/i386/include/intr_machdep.h: Increase the FreeBSD IRQ vector table to include space for event channel interrupt sources. sys/amd64/include/pcpu.h: sys/i386/include/pcpu.h: Remove Xen HVM per-cpu variable data. These fields are now allocated via the dynamic per-cpu scheme. See xen_intr.c for details. sys/amd64/include/xen/hypercall.h: sys/dev/xen/blkback/blkback.c: sys/i386/include/xen/xenvar.h: sys/i386/xen/clock.c: sys/i386/xen/xen_machdep.c: sys/xen/gnttab.c: Prefer FreeBSD primatives to Linux ones in Xen support code. sys/amd64/include/xen/xen-os.h: sys/i386/include/xen/xen-os.h: sys/xen/xen-os.h: sys/dev/xen/balloon/balloon.c: sys/dev/xen/blkback/blkback.c: sys/dev/xen/blkfront/blkfront.c: sys/dev/xen/console/xencons_ring.c: sys/dev/xen/control/control.c: sys/dev/xen/netback/netback.c: sys/dev/xen/netfront/netfront.c: sys/dev/xen/xenpci/xenpci.c: sys/i386/i386/machdep.c: sys/i386/include/pmap.h: sys/i386/include/xen/xenfunc.h: sys/i386/isa/npx.c: sys/i386/xen/clock.c: sys/i386/xen/mp_machdep.c: sys/i386/xen/mptable.c: sys/i386/xen/xen_clock_util.c: sys/i386/xen/xen_machdep.c: sys/i386/xen/xen_rtc.c: sys/xen/evtchn/evtchn_dev.c: sys/xen/features.c: sys/xen/gnttab.c: sys/xen/gnttab.h: sys/xen/hvm.h: sys/xen/xenbus/xenbus.c: sys/xen/xenbus/xenbus_if.m: sys/xen/xenbus/xenbusb_front.c: sys/xen/xenbus/xenbusvar.h: sys/xen/xenstore/xenstore.c: sys/xen/xenstore/xenstore_dev.c: sys/xen/xenstore/xenstorevar.h: Pull common Xen OS support functions/settings into xen/xen-os.h. sys/amd64/include/xen/xen-os.h: sys/i386/include/xen/xen-os.h: sys/xen/xen-os.h: Remove constants, macros, and functions unused in FreeBSD's Xen support. sys/xen/xen-os.h: sys/i386/xen/xen_machdep.c: sys/x86/xen/hvm.c: Introduce new functions xen_domain(), xen_pv_domain(), and xen_hvm_domain(). These are used in favor of #ifdefs so that FreeBSD can dynamically detect and adapt to the presence of a hypervisor. The goal is to have an HVM optimized GENERIC, but more is necessary before this is possible. sys/amd64/amd64/machdep.c: sys/dev/xen/xenpci/xenpcivar.h: sys/dev/xen/xenpci/xenpci.c: sys/x86/xen/hvm.c: sys/sys/kernel.h: Refactor magic ioport, Hypercall table and Hypervisor shared information page setup, and move it to a dedicated HVM support module. HVM mode initialization is now triggered during the SI_SUB_HYPERVISOR phase of system startup. This currently occurs just after the kernel VM is fully setup which is just enough infrastructure to allow the hypercall table and shared info page to be properly mapped. sys/xen/hvm.h: sys/x86/xen/hvm.c: Add definitions and a method for configuring Hypervisor event delievery via a direct vector callback. sys/amd64/include/xen/xen-os.h: sys/x86/xen/hvm.c: sys/conf/files: sys/conf/files.amd64: sys/conf/files.i386: Adjust kernel build to reflect the refactoring of early Xen startup code and Xen interrupt services. sys/dev/xen/blkback/blkback.c: sys/dev/xen/blkfront/blkfront.c: sys/dev/xen/blkfront/block.h: sys/dev/xen/control/control.c: sys/dev/xen/evtchn/evtchn_dev.c: sys/dev/xen/netback/netback.c: sys/dev/xen/netfront/netfront.c: sys/xen/xenstore/xenstore.c: sys/xen/evtchn/evtchn_dev.c: sys/dev/xen/console/console.c: sys/dev/xen/console/xencons_ring.c Adjust drivers to use new xen_intr_*() API. sys/dev/xen/blkback/blkback.c: Since blkback defers all event handling to a taskqueue, convert this task queue to a "fast" taskqueue, and schedule it via an interrupt filter. This avoids an unnecessary ithread context switch. sys/xen/xenstore/xenstore.c: The xenstore driver is MPSAFE. Indicate as much when registering its interrupt handler. sys/xen/xenbus/xenbus.c: sys/xen/xenbus/xenbusvar.h: Remove unused event channel APIs. sys/xen/evtchn.h: Remove all kernel Xen interrupt service API definitions from this file. It is now only used for structure and ioctl definitions related to the event channel userland device driver. Update the definitions in this file to match those from NetBSD. Implementing this interface will be necessary for Dom0 support. sys/xen/evtchn/evtchnvar.h: Add a header file for implemenation internal APIs related to managing event channels event delivery. This is used to allow, for example, the event channel userland device driver to access low-level routines that typical kernel consumers of event channel services should never access. sys/xen/interface/event_channel.h: sys/xen/xen_intr.h: Standardize on the evtchn_port_t type for referring to an event channel port id. In order to prevent low-level event channel APIs from leaking to kernel consumers who should not have access to this data, the type is defined twice: Once in the Xen provided event_channel.h, and again in xen/xen_intr.h. The double declaration is protected by __XEN_EVTCHN_PORT_DEFINED__ to ensure it is never declared twice within a given compilation unit. sys/xen/xen_intr.h: sys/xen/evtchn/evtchn.c: sys/x86/xen/xen_intr.c: sys/dev/xen/xenpci/evtchn.c: sys/dev/xen/xenpci/xenpcivar.h: New implementation of Xen interrupt services. This is similar in many respects to the i386 PV implementation with the exception that events for bound to event channel ports (i.e. not IPI, virtual IRQ, or physical IRQ) are further optimized to avoid mask/unmask operations that aren't necessary for these edge triggered events. Stubs exist for supporting physical IRQ binding, but will need additional work before this implementation can be fully shared between PV and HVM. sys/amd64/amd64/mp_machdep.c: sys/i386/i386/mp_machdep.c: sys/i386/xen/mp_machdep.c sys/x86/xen/hvm.c: Add support for placing vcpu_info into an arbritary memory page instead of using HYPERVISOR_shared_info->vcpu_info. This allows the creation of domains with more than 32 vcpus. sys/i386/i386/machdep.c: sys/i386/xen/clock.c: sys/i386/xen/xen_machdep.c: sys/i386/xen/exception.s: Add support for new event channle implementation. Added: head/sys/x86/xen/ head/sys/x86/xen/hvm.c (contents, props changed) head/sys/x86/xen/xen_intr.c (contents, props changed) head/sys/xen/evtchn/evtchnvar.h (contents, props changed) head/sys/xen/xen-os.h (contents, props changed) Deleted: head/sys/dev/xen/xenpci/evtchn.c head/sys/xen/evtchn/evtchn.c Modified: head/sys/amd64/amd64/apic_vector.S head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/include/apicvar.h head/sys/amd64/include/intr_machdep.h head/sys/amd64/include/pcpu.h head/sys/amd64/include/xen/hypercall.h head/sys/amd64/include/xen/xen-os.h head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/dev/xen/balloon/balloon.c head/sys/dev/xen/blkback/blkback.c head/sys/dev/xen/blkfront/blkfront.c head/sys/dev/xen/blkfront/block.h head/sys/dev/xen/console/console.c head/sys/dev/xen/console/xencons_ring.c head/sys/dev/xen/control/control.c head/sys/dev/xen/netback/netback.c head/sys/dev/xen/netfront/netfront.c head/sys/dev/xen/xenpci/xenpci.c head/sys/dev/xen/xenpci/xenpcivar.h head/sys/i386/i386/apic_vector.s head/sys/i386/i386/machdep.c head/sys/i386/i386/mp_machdep.c head/sys/i386/include/apicvar.h head/sys/i386/include/intr_machdep.h head/sys/i386/include/pcpu.h head/sys/i386/include/pmap.h head/sys/i386/include/xen/xen-os.h head/sys/i386/include/xen/xenfunc.h head/sys/i386/include/xen/xenvar.h head/sys/i386/isa/npx.c head/sys/i386/xen/clock.c head/sys/i386/xen/exception.s head/sys/i386/xen/mp_machdep.c head/sys/i386/xen/mptable.c head/sys/i386/xen/xen_clock_util.c head/sys/i386/xen/xen_machdep.c head/sys/i386/xen/xen_rtc.c head/sys/sys/kernel.h head/sys/x86/include/segments.h head/sys/x86/x86/local_apic.c head/sys/xen/evtchn.h head/sys/xen/evtchn/evtchn_dev.c head/sys/xen/features.c head/sys/xen/gnttab.c head/sys/xen/gnttab.h head/sys/xen/hvm.h head/sys/xen/interface/event_channel.h head/sys/xen/xen_intr.h head/sys/xen/xenbus/xenbus.c head/sys/xen/xenbus/xenbus_if.m head/sys/xen/xenbus/xenbusb_front.c head/sys/xen/xenbus/xenbusvar.h head/sys/xen/xenstore/xenstore.c head/sys/xen/xenstore/xenstore_dev.c head/sys/xen/xenstore/xenstorevar.h Modified: head/sys/amd64/amd64/apic_vector.S ============================================================================== --- head/sys/amd64/amd64/apic_vector.S Thu Aug 29 19:47:52 2013 (r255039) +++ head/sys/amd64/amd64/apic_vector.S Thu Aug 29 19:52:18 2013 (r255040) @@ -128,6 +128,22 @@ IDTVEC(errorint) MEXITCOUNT jmp doreti +#ifdef XENHVM +/* + * Xen event channel upcall interrupt handler. + * Only used when the hypervisor supports direct vector callbacks. + */ + .text + SUPERALIGN_TEXT +IDTVEC(xen_intr_upcall) + PUSH_FRAME + FAKE_MCOUNT(TF_RIP(%rsp)) + movq %rsp, %rdi + call xen_intr_handle_upcall + MEXITCOUNT + jmp doreti +#endif + #ifdef SMP /* * Global address space TLB shootdown. Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Thu Aug 29 19:47:52 2013 (r255039) +++ head/sys/amd64/amd64/machdep.c Thu Aug 29 19:52:18 2013 (r255040) @@ -1204,6 +1204,9 @@ extern inthand_t #ifdef KDTRACE_HOOKS IDTVEC(dtrace_ret), #endif +#ifdef XENHVM + IDTVEC(xen_intr_upcall), +#endif IDTVEC(fast_syscall), IDTVEC(fast_syscall32); #ifdef DDB @@ -1787,6 +1790,9 @@ hammer_time(u_int64_t modulep, u_int64_t #ifdef KDTRACE_HOOKS setidt(IDT_DTRACE_RET, &IDTVEC(dtrace_ret), SDT_SYSIGT, SEL_UPL, 0); #endif +#ifdef XENHVM + setidt(IDT_EVTCHN, &IDTVEC(xen_intr_upcall), SDT_SYSIGT, SEL_UPL, 0); +#endif r_idt.rd_limit = sizeof(idt0) - 1; r_idt.rd_base = (long) idt; @@ -1910,14 +1916,6 @@ hammer_time(u_int64_t modulep, u_int64_t if (env != NULL) strlcpy(kernelname, env, sizeof(kernelname)); -#ifdef XENHVM - if (inw(0x10) == 0x49d2) { - if (bootverbose) - printf("Xen detected: disabling emulated block and network devices\n"); - outw(0x10, 3); - } -#endif - cpu_probe_amdc1e(); #ifdef FDT Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Thu Aug 29 19:47:52 2013 (r255039) +++ head/sys/amd64/amd64/mp_machdep.c Thu Aug 29 19:52:18 2013 (r255040) @@ -70,6 +70,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef XENHVM +#include +#endif + #define WARMBOOT_TARGET 0 #define WARMBOOT_OFF (KERNBASE + 0x0467) #define WARMBOOT_SEG (KERNBASE + 0x0469) @@ -711,6 +715,11 @@ init_secondary(void) /* set up FPU state on the AP */ fpuinit(); +#ifdef XENHVM + /* register vcpu_info area */ + xen_hvm_init_cpu(); +#endif + /* A quick check from sanity claus */ cpuid = PCPU_GET(cpuid); if (PCPU_GET(apic_id) != lapic_id()) { Modified: head/sys/amd64/include/apicvar.h ============================================================================== --- head/sys/amd64/include/apicvar.h Thu Aug 29 19:47:52 2013 (r255039) +++ head/sys/amd64/include/apicvar.h Thu Aug 29 19:52:18 2013 (r255040) @@ -227,6 +227,7 @@ int lapic_set_lvt_triggermode(u_int apic enum intr_trigger trigger); void lapic_set_tpr(u_int vector); void lapic_setup(int boot); +void xen_intr_handle_upcall(struct trapframe *frame); #endif /* !LOCORE */ #endif /* _MACHINE_APICVAR_H_ */ Modified: head/sys/amd64/include/intr_machdep.h ============================================================================== --- head/sys/amd64/include/intr_machdep.h Thu Aug 29 19:47:52 2013 (r255039) +++ head/sys/amd64/include/intr_machdep.h Thu Aug 29 19:52:18 2013 (r255040) @@ -44,12 +44,24 @@ * allocate IDT vectors. * * The first 255 IRQs (0 - 254) are reserved for ISA IRQs and PCI intline IRQs. - * IRQ values beyond 256 are used by MSI. We leave 255 unused to avoid - * confusion since 255 is used in PCI to indicate an invalid IRQ. + * IRQ values from 256 to 767 are used by MSI. When running under the Xen + * Hypervisor, IRQ values from 768 to 4863 are available for binding to + * event channel events. We leave 255 unused to avoid confusion since 255 is + * used in PCI to indicate an invalid IRQ. */ #define NUM_MSI_INTS 512 #define FIRST_MSI_INT 256 -#define NUM_IO_INTS (FIRST_MSI_INT + NUM_MSI_INTS) +#ifdef XENHVM +#include +#define NUM_EVTCHN_INTS NR_EVENT_CHANNELS +#define FIRST_EVTCHN_INT \ + (FIRST_MSI_INT + NUM_MSI_INTS) +#define LAST_EVTCHN_INT \ + (FIRST_EVTCHN_INT + NUM_EVTCHN_INTS - 1) +#else +#define NUM_EVTCHN_INTS 0 +#endif +#define NUM_IO_INTS (FIRST_MSI_INT + NUM_MSI_INTS + NUM_EVTCHN_INTS) /* * Default base address for MSI messages on x86 platforms. Modified: head/sys/amd64/include/pcpu.h ============================================================================== --- head/sys/amd64/include/pcpu.h Thu Aug 29 19:47:52 2013 (r255039) +++ head/sys/amd64/include/pcpu.h Thu Aug 29 19:52:18 2013 (r255040) @@ -42,15 +42,6 @@ #endif #endif -#ifdef XENHVM -#define PCPU_XEN_FIELDS \ - ; \ - unsigned int pc_last_processed_l1i; \ - unsigned int pc_last_processed_l2i -#else -#define PCPU_XEN_FIELDS -#endif - /* * The SMP parts are setup in pmap.c and locore.s for the BSP, and * mp_machdep.c sets up the data for the AP's to "see" when they awake. @@ -76,8 +67,7 @@ struct system_segment_descriptor *pc_ldt; \ /* Pointer to the CPU TSS descriptor */ \ struct system_segment_descriptor *pc_tss; \ - u_int pc_cmci_mask /* MCx banks for CMCI */ \ - PCPU_XEN_FIELDS; \ + u_int pc_cmci_mask; /* MCx banks for CMCI */ \ uint64_t pc_dbreg[16]; /* ddb debugging regs */ \ int pc_dbreg_cmd; /* ddb debugging reg cmd */ \ char __pad[161] /* be divisor of PAGE_SIZE \ Modified: head/sys/amd64/include/xen/hypercall.h ============================================================================== --- head/sys/amd64/include/xen/hypercall.h Thu Aug 29 19:47:52 2013 (r255039) +++ head/sys/amd64/include/xen/hypercall.h Thu Aug 29 19:52:18 2013 (r255040) @@ -1,7 +1,7 @@ /****************************************************************************** * hypercall.h * - * Linux-specific hypervisor handling. + * FreeBSD-specific hypervisor handling. * * Copyright (c) 2002-2004, K A Fraser * @@ -32,6 +32,8 @@ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. + * + * $FreeBSD$ */ #ifndef __MACHINE_XEN_HYPERCALL_H__ @@ -270,7 +272,7 @@ HYPERVISOR_event_channel_op( int rc = _hypercall2(int, event_channel_op, cmd, arg); #if CONFIG_XEN_COMPAT <= 0x030002 - if (unlikely(rc == -ENOXENSYS)) { + if (__predict_false(rc == -ENOXENSYS)) { struct evtchn_op op; op.cmd = cmd; memcpy(&op.u, arg, sizeof(op.u)); @@ -303,7 +305,7 @@ HYPERVISOR_physdev_op( int rc = _hypercall2(int, physdev_op, cmd, arg); #if CONFIG_XEN_COMPAT <= 0x030002 - if (unlikely(rc == -ENOXENSYS)) { + if (__predict_false(rc == -ENOXENSYS)) { struct physdev_op op; op.cmd = cmd; memcpy(&op.u, arg, sizeof(op.u)); Modified: head/sys/amd64/include/xen/xen-os.h ============================================================================== --- head/sys/amd64/include/xen/xen-os.h Thu Aug 29 19:47:52 2013 (r255039) +++ head/sys/amd64/include/xen/xen-os.h Thu Aug 29 19:52:18 2013 (r255040) @@ -1,40 +1,42 @@ /****************************************************************************** - * os.h + * amd64/xen/xen-os.h * - * random collection of macros and definition + * Random collection of macros and definition + * + * Copyright (c) 2003, 2004 Keir Fraser (on behalf of the Xen team) + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. * * $FreeBSD$ */ -#ifndef _XEN_OS_H_ -#define _XEN_OS_H_ +#ifndef _MACHINE_XEN_XEN_OS_H_ +#define _MACHINE_XEN_XEN_OS_H_ #ifdef PAE #define CONFIG_X86_PAE #endif -#ifdef LOCORE -#define __ASSEMBLY__ -#endif - -#if !defined(__XEN_INTERFACE_VERSION__) -#define __XEN_INTERFACE_VERSION__ 0x00030208 -#endif - -#define GRANT_REF_INVALID 0xffffffff - -#include - /* Everything below this point is not included by assembler (.S) files. */ #ifndef __ASSEMBLY__ -/* Force a proper event-channel callback from Xen. */ -void force_evtchn_callback(void); - -extern int gdtset; - -extern shared_info_t *HYPERVISOR_shared_info; - /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ static inline void rep_nop(void) { @@ -42,161 +44,12 @@ static inline void rep_nop(void) } #define cpu_relax() rep_nop() -/* crude memory allocator for memory allocation early in - * boot - */ -void *bootmem_alloc(unsigned int size); -void bootmem_free(void *ptr, unsigned int size); - -void printk(const char *fmt, ...); - -/* some function prototypes */ -void trap_init(void); - -#define likely(x) __builtin_expect((x),1) -#define unlikely(x) __builtin_expect((x),0) - -#ifndef XENHVM - -/* - * STI/CLI equivalents. These basically set and clear the virtual - * event_enable flag in the shared_info structure. Note that when - * the enable bit is set, there may be pending events to be handled. - * We may therefore call into do_hypervisor_callback() directly. - */ - -#define __cli() \ -do { \ - vcpu_info_t *_vcpu; \ - _vcpu = &HYPERVISOR_shared_info->vcpu_info[PCPU_GET(cpuid)]; \ - _vcpu->evtchn_upcall_mask = 1; \ - barrier(); \ -} while (0) - -#define __sti() \ -do { \ - vcpu_info_t *_vcpu; \ - barrier(); \ - _vcpu = &HYPERVISOR_shared_info->vcpu_info[PCPU_GET(cpuid)]; \ - _vcpu->evtchn_upcall_mask = 0; \ - barrier(); /* unmask then check (avoid races) */ \ - if ( unlikely(_vcpu->evtchn_upcall_pending) ) \ - force_evtchn_callback(); \ -} while (0) - -#define __restore_flags(x) \ -do { \ - vcpu_info_t *_vcpu; \ - barrier(); \ - _vcpu = &HYPERVISOR_shared_info->vcpu_info[PCPU_GET(cpuid)]; \ - if ((_vcpu->evtchn_upcall_mask = (x)) == 0) { \ - barrier(); /* unmask then check (avoid races) */ \ - if ( unlikely(_vcpu->evtchn_upcall_pending) ) \ - force_evtchn_callback(); \ - } \ -} while (0) - -/* - * Add critical_{enter, exit}? - * - */ -#define __save_and_cli(x) \ -do { \ - vcpu_info_t *_vcpu; \ - _vcpu = &HYPERVISOR_shared_info->vcpu_info[PCPU_GET(cpuid)]; \ - (x) = _vcpu->evtchn_upcall_mask; \ - _vcpu->evtchn_upcall_mask = 1; \ - barrier(); \ -} while (0) - - -#define cli() __cli() -#define sti() __sti() -#define save_flags(x) __save_flags(x) -#define restore_flags(x) __restore_flags(x) -#define save_and_cli(x) __save_and_cli(x) - -#define local_irq_save(x) __save_and_cli(x) -#define local_irq_restore(x) __restore_flags(x) -#define local_irq_disable() __cli() -#define local_irq_enable() __sti() - -#define mtx_lock_irqsave(lock, x) {local_irq_save((x)); mtx_lock_spin((lock));} -#define mtx_unlock_irqrestore(lock, x) {mtx_unlock_spin((lock)); local_irq_restore((x)); } -#define spin_lock_irqsave mtx_lock_irqsave -#define spin_unlock_irqrestore mtx_unlock_irqrestore - -#else -#endif - -#ifndef xen_mb -#define xen_mb() mb() -#endif -#ifndef xen_rmb -#define xen_rmb() rmb() -#endif -#ifndef xen_wmb -#define xen_wmb() wmb() -#endif -#ifdef SMP -#define smp_mb() mb() -#define smp_rmb() rmb() -#define smp_wmb() wmb() -#define smp_read_barrier_depends() read_barrier_depends() -#define set_mb(var, value) do { xchg(&var, value); } while (0) -#else -#define smp_mb() barrier() -#define smp_rmb() barrier() -#define smp_wmb() barrier() -#define smp_read_barrier_depends() do { } while(0) -#define set_mb(var, value) do { var = value; barrier(); } while (0) -#endif - - /* This is a barrier for the compiler only, NOT the processor! */ #define barrier() __asm__ __volatile__("": : :"memory") #define LOCK_PREFIX "" #define LOCK "" #define ADDR (*(volatile long *) addr) -/* - * Make sure gcc doesn't try to be clever and move things around - * on us. We need to use _exactly_ the address the user gave us, - * not some alias that contains the same information. - */ -typedef struct { volatile int counter; } atomic_t; - - - -#define xen_xchg(ptr,v) \ - ((__typeof__(*(ptr)))__xchg((unsigned long)(v),(ptr),sizeof(*(ptr)))) -struct __xchg_dummy { unsigned long a[100]; }; -#define __xg(x) ((volatile struct __xchg_dummy *)(x)) -static __inline unsigned long __xchg(unsigned long x, volatile void * ptr, - int size) -{ - switch (size) { - case 1: - __asm__ __volatile__("xchgb %b0,%1" - :"=q" (x) - :"m" (*__xg(ptr)), "0" (x) - :"memory"); - break; - case 2: - __asm__ __volatile__("xchgw %w0,%1" - :"=r" (x) - :"m" (*__xg(ptr)), "0" (x) - :"memory"); - break; - case 4: - __asm__ __volatile__("xchgl %0,%1" - :"=r" (x) - :"m" (*__xg(ptr)), "0" (x) - :"memory"); - break; - } - return x; -} /** * test_and_clear_bit - Clear a bit and return its old value @@ -238,7 +91,6 @@ static __inline int variable_test_bit(in constant_test_bit((nr),(addr)) : \ variable_test_bit((nr),(addr))) - /** * set_bit - Atomically set a bit in memory * @nr: the bit to set @@ -275,25 +127,6 @@ static __inline__ void clear_bit(int nr, :"Ir" (nr)); } -/** - * atomic_inc - increment atomic variable - * @v: pointer of type atomic_t - * - * Atomically increments @v by 1. Note that the guaranteed - * useful range of an atomic_t is only 24 bits. - */ -static __inline__ void atomic_inc(atomic_t *v) -{ - __asm__ __volatile__( - LOCK "incl %0" - :"=m" (v->counter) - :"m" (v->counter)); -} - - -#define rdtscll(val) \ - __asm__ __volatile__("rdtsc" : "=A" (val)) - #endif /* !__ASSEMBLY__ */ -#endif /* _OS_H_ */ +#endif /* _MACHINE_XEN_XEN_OS_H_ */ Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Aug 29 19:47:52 2013 (r255039) +++ head/sys/conf/files Thu Aug 29 19:52:18 2013 (r255040) @@ -2499,7 +2499,6 @@ dev/xen/control/control.c optional xen | dev/xen/netback/netback.c optional xen | xenhvm dev/xen/netfront/netfront.c optional xen | xenhvm dev/xen/xenpci/xenpci.c optional xenpci -dev/xen/xenpci/evtchn.c optional xenpci dev/xl/if_xl.c optional xl pci dev/xl/xlphy.c optional xl pci fs/deadfs/dead_vnops.c standard @@ -3815,7 +3814,6 @@ vm/vm_zeroidle.c standard vm/vnode_pager.c standard xen/gnttab.c optional xen | xenhvm xen/features.c optional xen | xenhvm -xen/evtchn/evtchn.c optional xen xen/evtchn/evtchn_dev.c optional xen | xenhvm xen/xenbus/xenbus_if.m optional xen | xenhvm xen/xenbus/xenbus.c optional xen | xenhvm Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Thu Aug 29 19:47:52 2013 (r255039) +++ head/sys/conf/files.amd64 Thu Aug 29 19:52:18 2013 (r255040) @@ -531,3 +531,5 @@ x86/x86/mptable_pci.c optional mptable x86/x86/msi.c optional pci x86/x86/nexus.c standard x86/x86/tsc.c standard +x86/xen/hvm.c optional xenhvm +x86/xen/xen_intr.c optional xen | xenhvm Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Thu Aug 29 19:47:52 2013 (r255039) +++ head/sys/conf/files.i386 Thu Aug 29 19:52:18 2013 (r255040) @@ -568,3 +568,5 @@ x86/x86/mptable_pci.c optional apic nat x86/x86/msi.c optional apic pci x86/x86/nexus.c standard x86/x86/tsc.c standard +x86/xen/hvm.c optional xenhvm +x86/xen/xen_intr.c optional xen | xenhvm Modified: head/sys/dev/xen/balloon/balloon.c ============================================================================== --- head/sys/dev/xen/balloon/balloon.c Thu Aug 29 19:47:52 2013 (r255039) +++ head/sys/dev/xen/balloon/balloon.c Thu Aug 29 19:52:18 2013 (r255040) @@ -40,14 +40,15 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include +#include +#include + +#include #include +#include #include -#include -#include +#include static MALLOC_DEFINE(M_BALLOON, "Balloon", "Xen Balloon Driver"); Modified: head/sys/dev/xen/blkback/blkback.c ============================================================================== --- head/sys/dev/xen/blkback/blkback.c Thu Aug 29 19:47:52 2013 (r255039) +++ head/sys/dev/xen/blkback/blkback.c Thu Aug 29 19:52:18 2013 (r255040) @@ -70,14 +70,13 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include +#include #include -#include #include #include @@ -682,7 +681,7 @@ struct xbb_softc { blkif_back_rings_t rings; /** IRQ mapping for the communication ring event channel. */ - int irq; + xen_intr_handle_t xen_intr_handle; /** * \brief Backend access mode flags (e.g. write, or read-only). @@ -1347,7 +1346,7 @@ xbb_send_response(struct xbb_softc *xbb, taskqueue_enqueue(xbb->io_taskqueue, &xbb->io_task); if (notify) - notify_remote_via_irq(xbb->irq); + xen_intr_signal(xbb->xen_intr_handle); } /** @@ -1616,8 +1615,8 @@ xbb_dispatch_io(struct xbb_softc *xbb, s sg = NULL; /* Check that number of segments is sane. */ - if (unlikely(nseg == 0) - || unlikely(nseg > xbb->max_request_segments)) { + if (__predict_false(nseg == 0) + || __predict_false(nseg > xbb->max_request_segments)) { DPRINTF("Bad number of segments in request (%d)\n", nseg); reqlist->status = BLKIF_RSP_ERROR; @@ -1734,7 +1733,7 @@ xbb_dispatch_io(struct xbb_softc *xbb, s for (seg_idx = 0, map = xbb->maps; seg_idx < reqlist->nr_segments; seg_idx++, map++){ - if (unlikely(map->status != 0)) { + if (__predict_false(map->status != 0)) { DPRINTF("invalid buffer -- could not remap " "it (%d)\n", map->status); DPRINTF("Mapping(%d): Host Addr 0x%lx, flags " @@ -2026,14 +2025,16 @@ xbb_run_queue(void *context, int pending * \param arg Callback argument registerd during event channel * binding - the xbb_softc for this instance. */ -static void -xbb_intr(void *arg) +static int +xbb_filter(void *arg) { struct xbb_softc *xbb; - /* Defer to kernel thread. */ + /* Defer to taskqueue thread. */ xbb = (struct xbb_softc *)arg; taskqueue_enqueue(xbb->io_taskqueue, &xbb->io_task); + + return (FILTER_HANDLED); } SDT_PROVIDER_DEFINE(xbb); @@ -2081,7 +2082,7 @@ xbb_dispatch_dev(struct xbb_softc *xbb, if (operation == BIO_FLUSH) { nreq = STAILQ_FIRST(&reqlist->contig_req_list); bio = g_new_bio(); - if (unlikely(bio == NULL)) { + if (__predict_false(bio == NULL)) { DPRINTF("Unable to allocate bio for BIO_FLUSH\n"); error = ENOMEM; return (error); @@ -2143,7 +2144,7 @@ xbb_dispatch_dev(struct xbb_softc *xbb, } bio = bios[nbio++] = g_new_bio(); - if (unlikely(bio == NULL)) { + if (__predict_false(bio == NULL)) { error = ENOMEM; goto fail_free_bios; } @@ -2811,10 +2812,7 @@ xbb_disconnect(struct xbb_softc *xbb) if ((xbb->flags & XBBF_RING_CONNECTED) == 0) return (0); - if (xbb->irq != 0) { - unbind_from_irqhandler(xbb->irq); - xbb->irq = 0; - } + xen_intr_unbind(&xbb->xen_intr_handle); mtx_unlock(&xbb->lock); taskqueue_drain(xbb->io_taskqueue, &xbb->io_task); @@ -2966,13 +2964,14 @@ xbb_connect_ring(struct xbb_softc *xbb) xbb->flags |= XBBF_RING_CONNECTED; - error = - bind_interdomain_evtchn_to_irqhandler(xbb->otherend_id, - xbb->ring_config.evtchn, - device_get_nameunit(xbb->dev), - xbb_intr, /*arg*/xbb, - INTR_TYPE_BIO | INTR_MPSAFE, - &xbb->irq); + error = xen_intr_bind_remote_port(xbb->dev, + xbb->otherend_id, + xbb->ring_config.evtchn, + xbb_filter, + /*ithread_handler*/NULL, + /*arg*/xbb, + INTR_TYPE_BIO | INTR_MPSAFE, + &xbb->xen_intr_handle); if (error) { (void)xbb_disconnect(xbb); xenbus_dev_fatal(xbb->dev, error, "binding event channel"); @@ -3791,9 +3790,10 @@ xbb_attach(device_t dev) * Create a taskqueue for doing work that must occur from a * thread context. */ - xbb->io_taskqueue = taskqueue_create(device_get_nameunit(dev), M_NOWAIT, - taskqueue_thread_enqueue, - /*context*/&xbb->io_taskqueue); + xbb->io_taskqueue = taskqueue_create_fast(device_get_nameunit(dev), + M_NOWAIT, + taskqueue_thread_enqueue, + /*contxt*/&xbb->io_taskqueue); if (xbb->io_taskqueue == NULL) { xbb_attach_failed(xbb, error, "Unable to create taskqueue"); return (ENOMEM); Modified: head/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- head/sys/dev/xen/blkfront/blkfront.c Thu Aug 29 19:47:52 2013 (r255039) +++ head/sys/dev/xen/blkfront/blkfront.c Thu Aug 29 19:52:18 2013 (r255040) @@ -51,19 +51,17 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include -#include - +#include #include #include -#include #include #include #include #include +#include +#include + #include #include @@ -139,7 +137,7 @@ xbd_flush_requests(struct xbd_softc *sc) RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(&sc->xbd_ring, notify); if (notify) - notify_remote_via_irq(sc->xbd_irq); + xen_intr_signal(sc->xen_intr_handle); } static void @@ -310,7 +308,7 @@ xbd_bio_command(struct xbd_softc *sc) struct xbd_command *cm; struct bio *bp; - if (unlikely(sc->xbd_state != XBD_STATE_CONNECTED)) + if (__predict_false(sc->xbd_state != XBD_STATE_CONNECTED)) return (NULL); bp = xbd_dequeue_bio(sc); @@ -437,7 +435,7 @@ xbd_bio_complete(struct xbd_softc *sc, s bp = cm->cm_bp; - if (unlikely(cm->cm_status != BLKIF_RSP_OKAY)) { + if (__predict_false(cm->cm_status != BLKIF_RSP_OKAY)) { disk_err(bp, "disk error" , -1, 0); printf(" status: %x\n", cm->cm_status); bp->bio_flags |= BIO_ERROR; @@ -470,7 +468,7 @@ xbd_int(void *xsc) mtx_lock(&sc->xbd_io_lock); - if (unlikely(sc->xbd_state == XBD_STATE_DISCONNECTED)) { + if (__predict_false(sc->xbd_state == XBD_STATE_DISCONNECTED)) { mtx_unlock(&sc->xbd_io_lock); return; } @@ -531,7 +529,7 @@ xbd_int(void *xsc) xbd_startio(sc); - if (unlikely(sc->xbd_state == XBD_STATE_SUSPENDED)) + if (__predict_false(sc->xbd_state == XBD_STATE_SUSPENDED)) wakeup(&sc->xbd_cm_q[XBD_Q_BUSY]); mtx_unlock(&sc->xbd_io_lock); @@ -782,13 +780,12 @@ xbd_alloc_ring(struct xbd_softc *sc) } } - error = bind_listening_port_to_irqhandler( - xenbus_get_otherend_id(sc->xbd_dev), - "xbd", (driver_intr_t *)xbd_int, sc, - INTR_TYPE_BIO | INTR_MPSAFE, &sc->xbd_irq); + error = xen_intr_alloc_and_bind_local_port(sc->xbd_dev, + xenbus_get_otherend_id(sc->xbd_dev), NULL, xbd_int, sc, + INTR_TYPE_BIO | INTR_MPSAFE, &sc->xen_intr_handle); if (error) { xenbus_dev_fatal(sc->xbd_dev, error, - "bind_evtchn_to_irqhandler failed"); + "xen_intr_alloc_and_bind_local_port failed"); return (error); } @@ -1042,10 +1039,8 @@ xbd_free(struct xbd_softc *sc) xbd_initq_cm(sc, XBD_Q_COMPLETE); } - if (sc->xbd_irq) { - unbind_from_irqhandler(sc->xbd_irq); - sc->xbd_irq = 0; - } + xen_intr_unbind(&sc->xen_intr_handle); + } /*--------------------------- State Change Handlers --------------------------*/ @@ -1277,7 +1272,7 @@ xbd_initialize(struct xbd_softc *sc) } error = xs_printf(XST_NIL, node_path, "event-channel", - "%u", irq_to_evtchn_port(sc->xbd_irq)); + "%u", xen_intr_port(sc->xen_intr_handle)); if (error) { xenbus_dev_fatal(sc->xbd_dev, error, "writing %s/event-channel", Modified: head/sys/dev/xen/blkfront/block.h ============================================================================== --- head/sys/dev/xen/blkfront/block.h Thu Aug 29 19:47:52 2013 (r255039) +++ head/sys/dev/xen/blkfront/block.h Thu Aug 29 19:52:18 2013 (r255040) @@ -179,7 +179,7 @@ struct xbd_softc { uint32_t xbd_max_request_size; grant_ref_t xbd_ring_ref[XBD_MAX_RING_PAGES]; blkif_front_ring_t xbd_ring; - unsigned int xbd_irq; + xen_intr_handle_t xen_intr_handle; struct gnttab_free_callback xbd_callback; xbd_cm_q_t xbd_cm_q[XBD_Q_COUNT]; bus_dma_tag_t xbd_io_dmat; Modified: head/sys/dev/xen/console/console.c ============================================================================== --- head/sys/dev/xen/console/console.c Thu Aug 29 19:47:52 2013 (r255039) +++ head/sys/dev/xen/console/console.c Thu Aug 29 19:52:18 2013 (r255040) @@ -15,7 +15,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include @@ -71,6 +71,8 @@ static char rbuf[RBUF_SIZE]; static int rc, rp; static unsigned int cnsl_evt_reg; static unsigned int wc, wp; /* write_cons, write_prod */ +xen_intr_handle_t xen_intr_handle; +device_t xencons_dev; #ifdef KDB static int xc_altbrk; @@ -232,6 +234,7 @@ xc_attach(device_t dev) { int error; + xencons_dev = dev; xccons = tty_alloc(&xc_ttydevsw, NULL); tty_makedev(xccons, NULL, "xc%r", 0); @@ -243,15 +246,10 @@ xc_attach(device_t dev) callout_reset(&xc_callout, XC_POLLTIME, xc_timeout, xccons); if (xen_start_info->flags & SIF_INITDOMAIN) { - error = bind_virq_to_irqhandler( - VIRQ_CONSOLE, - 0, - "console", - NULL, - xencons_priv_interrupt, NULL, - INTR_TYPE_TTY, NULL); - - KASSERT(error >= 0, ("can't register console interrupt")); + error = xen_intr_bind_virq(dev, VIRQ_CONSOLE, 0, NULL, + xencons_priv_interrupt, NULL, + INTR_TYPE_TTY, &xen_intr_handle); + KASSERT(error >= 0, ("can't register console interrupt")); } /* register handler to flush console on shutdown */ Modified: head/sys/dev/xen/console/xencons_ring.c ============================================================================== --- head/sys/dev/xen/console/xencons_ring.c Thu Aug 29 19:47:52 2013 (r255039) +++ head/sys/dev/xen/console/xencons_ring.c Thu Aug 29 19:52:18 2013 (r255040) @@ -16,7 +16,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include + +#include #include #include #include @@ -30,9 +31,10 @@ __FBSDID("$FreeBSD$"); #include #define console_evtchn console.domU.evtchn -static unsigned int console_irq; +xen_intr_handle_t console_handle; extern char *console_page; extern struct mtx cn_mtx; +extern device_t xencons_dev; static inline struct xencons_interface * xencons_interface(void) @@ -74,7 +76,7 @@ xencons_ring_send(const char *data, unsi wmb(); intf->out_prod = prod; - notify_remote_via_evtchn(xen_start_info->console_evtchn); + xen_intr_signal(console_handle); return sent; @@ -106,7 +108,7 @@ xencons_handle_input(void *unused) intf->in_cons = cons; CN_LOCK(cn_mtx); - notify_remote_via_evtchn(xen_start_info->console_evtchn); + xen_intr_signal(console_handle); xencons_tx(); CN_UNLOCK(cn_mtx); @@ -126,9 +128,9 @@ xencons_ring_init(void) if (!xen_start_info->console_evtchn) return 0; - err = bind_caller_port_to_irqhandler(xen_start_info->console_evtchn, - "xencons", xencons_handle_input, NULL, - INTR_TYPE_MISC | INTR_MPSAFE, &console_irq); + err = xen_intr_bind_local_port(xencons_dev, + xen_start_info->console_evtchn, NULL, xencons_handle_input, NULL, + INTR_TYPE_MISC | INTR_MPSAFE, &console_handle); if (err) { return err; } @@ -146,7 +148,7 @@ xencons_suspend(void) if (!xen_start_info->console_evtchn) return; - unbind_from_irqhandler(console_irq); + xen_intr_unbind(&console_handle); } void Modified: head/sys/dev/xen/control/control.c ============================================================================== --- head/sys/dev/xen/control/control.c Thu Aug 29 19:47:52 2013 (r255039) +++ head/sys/dev/xen/control/control.c Thu Aug 29 19:52:18 2013 (r255040) @@ -128,12 +128,13 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include #include +#include #include #include #include @@ -144,6 +145,9 @@ __FBSDID("$FreeBSD$"); #include +#include +#include + /*--------------------------- Forward Declarations --------------------------*/ /** Function signature for shutdown event handlers. */ typedef void (xctrl_shutdown_handler_t)(void); @@ -242,6 +246,7 @@ xctrl_suspend() xencons_suspend(); gnttab_suspend(); + intr_suspend(); max_pfn = HYPERVISOR_shared_info->arch.max_pfn; @@ -282,7 +287,7 @@ xctrl_suspend() HYPERVISOR_shared_info->arch.max_pfn = max_pfn; gnttab_resume(); - irq_resume(); + intr_resume(); local_irq_enable(); xencons_resume(); @@ -352,13 +357,11 @@ xctrl_suspend() * Prevent any races with evtchn_interrupt() handler. */ disable_intr(); - irq_suspend(); + intr_suspend(); suspend_cancelled = HYPERVISOR_suspend(0); - if (suspend_cancelled) - irq_resume(); - else - xenpci_resume(); + + intr_resume(); /* * Re-enable interrupts and put the scheduler back to normal. Modified: head/sys/dev/xen/netback/netback.c ============================================================================== --- head/sys/dev/xen/netback/netback.c Thu Aug 29 19:47:52 2013 (r255039) +++ head/sys/dev/xen/netback/netback.c Thu Aug 29 19:52:18 2013 (r255040) @@ -79,14 +79,15 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include +#include +#include #include #include #include +#include + /*--------------------------- Compile-time Tunables --------------------------*/ /*---------------------------------- Macros ----------------------------------*/ @@ -433,8 +434,8 @@ struct xnb_softc { /** Xen device handle.*/ long handle; - /** IRQ mapping for the communication ring event channel. */ - int irq; + /** Handle to the communication ring event channel. */ + xen_intr_handle_t xen_intr_handle; /** * \brief Cached value of the front-end's domain id. @@ -647,10 +648,7 @@ xnb_disconnect(struct xnb_softc *xnb) int error; int i; - if (xnb->irq != 0) { - unbind_from_irqhandler(xnb->irq); - xnb->irq = 0; - } + xen_intr_unbind(xnb->xen_intr_handle); /* * We may still have another thread currently processing requests. We @@ -773,13 +771,13 @@ xnb_connect_comms(struct xnb_softc *xnb) xnb->flags |= XNBF_RING_CONNECTED; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 20:40:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 933D8816; Thu, 29 Aug 2013 20:40:46 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 711C527B9; Thu, 29 Aug 2013 20:40:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TKektL083327; Thu, 29 Aug 2013 20:40:46 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TKekBO083325; Thu, 29 Aug 2013 20:40:46 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201308292040.r7TKekBO083325@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 29 Aug 2013 20:40:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255041 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 20:40:46 -0000 Author: jkim Date: Thu Aug 29 20:40:45 2013 New Revision: 255041 URL: http://svnweb.freebsd.org/changeset/base/255041 Log: Clarify confusions between atomic_t and bitmap. Fix bitmap operations accordingly. Modified: head/sys/dev/drm2/drmP.h head/sys/dev/drm2/drm_atomic.h Modified: head/sys/dev/drm2/drmP.h ============================================================================== --- head/sys/dev/drm2/drmP.h Thu Aug 29 19:52:18 2013 (r255040) +++ head/sys/dev/drm2/drmP.h Thu Aug 29 20:40:45 2013 (r255041) @@ -961,7 +961,7 @@ struct drm_device { drm_agp_head_t *agp; drm_sg_mem_t *sg; /* Scatter gather memory */ - atomic_t *ctx_bitmap; + u_long *ctx_bitmap; void *dev_private; unsigned int agp_buffer_token; drm_local_map_t *agp_buffer_map; Modified: head/sys/dev/drm2/drm_atomic.h ============================================================================== --- head/sys/dev/drm2/drm_atomic.h Thu Aug 29 19:52:18 2013 (r255040) +++ head/sys/dev/drm2/drm_atomic.h Thu Aug 29 20:40:45 2013 (r255041) @@ -7,6 +7,7 @@ /*- * Copyright 2004 Eric Anholt + * Copyright 2013 Jung-uk Kim * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a @@ -32,10 +33,11 @@ #include __FBSDID("$FreeBSD$"); -typedef uint32_t atomic_t; +typedef u_int atomic_t; typedef uint64_t atomic64_t; -#define BITS_TO_LONGS(x) howmany(x, sizeof(long) * NBBY) +#define BITS_PER_LONG (sizeof(long) * NBBY) +#define BITS_TO_LONGS(x) howmany(x, BITS_PER_LONG) #define atomic_read(p) (*(volatile u_int *)(p)) #define atomic_set(p, v) do { *(u_int *)(p) = (v); } while (0) @@ -58,23 +60,27 @@ typedef uint64_t atomic64_t; #define atomic_xchg(p, v) atomic_swap_int(p, v) #define atomic64_xchg(p, v) atomic_swap_64(p, v) +#define __bit_word(b) ((b) / BITS_PER_LONG) +#define __bit_mask(b) (1UL << (b) % BITS_PER_LONG) +#define __bit_addr(p, b) ((volatile u_long *)(p) + __bit_word(b)) + #define clear_bit(b, p) \ - atomic_clear_int((volatile u_int *)(p) + (b) / 32, 1 << (b) % 32) + atomic_clear_long(__bit_addr(p, b), __bit_mask(b)) #define set_bit(b, p) \ - atomic_set_int((volatile u_int *)(p) + (b) / 32, 1 << (b) % 32) + atomic_set_long(__bit_addr(p, b), __bit_mask(b)) #define test_bit(b, p) \ - ((atomic_read((volatile u_int *)(p) + (b) / 32) & (1 << (b) % 32)) != 0) + ((atomic_read(__bit_addr(p, b)) & __bit_mask(b)) != 0) -static __inline int -find_first_zero_bit(volatile void *p, int max) +static __inline u_long +find_first_zero_bit(const u_long *p, u_long max) { - volatile int *np = p; - int i, n; + u_long i, n; - for (i = 0; i < max / (NBBY * sizeof(int)); i++) { - n = ~np[i]; + KASSERT(max % BITS_PER_LONG == 0, ("invalid bitmap size %lu", max)); + for (i = 0; i < max / BITS_PER_LONG; i++) { + n = ~p[i]; if (n != 0) - return (i * NBBY * sizeof(int) + ffs(n) - 1); + return (i * BITS_PER_LONG + ffsl(n) - 1); } return (max); } From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 20:51:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 06413B95; Thu, 29 Aug 2013 20:51:13 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E77BB2845; Thu, 29 Aug 2013 20:51:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TKpC3M089022; Thu, 29 Aug 2013 20:51:12 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TKpCC6089021; Thu, 29 Aug 2013 20:51:12 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201308292051.r7TKpCC6089021@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 29 Aug 2013 20:51:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255042 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 20:51:13 -0000 Author: jkim Date: Thu Aug 29 20:51:12 2013 New Revision: 255042 URL: http://svnweb.freebsd.org/changeset/base/255042 Log: Fix the incomplete conversion from atomic_t to long for test_bit(). Modified: head/sys/dev/drm2/drm_atomic.h Modified: head/sys/dev/drm2/drm_atomic.h ============================================================================== --- head/sys/dev/drm2/drm_atomic.h Thu Aug 29 20:40:45 2013 (r255041) +++ head/sys/dev/drm2/drm_atomic.h Thu Aug 29 20:51:12 2013 (r255042) @@ -69,7 +69,7 @@ typedef uint64_t atomic64_t; #define set_bit(b, p) \ atomic_set_long(__bit_addr(p, b), __bit_mask(b)) #define test_bit(b, p) \ - ((atomic_read(__bit_addr(p, b)) & __bit_mask(b)) != 0) + ((*__bit_addr(p, b) & __bit_mask(b)) != 0) static __inline u_long find_first_zero_bit(const u_long *p, u_long max) From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 21:25:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A6244629; Thu, 29 Aug 2013 21:25:27 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 92B552A74; Thu, 29 Aug 2013 21:25:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TLPRqL007829; Thu, 29 Aug 2013 21:25:27 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TLPR5A007828; Thu, 29 Aug 2013 21:25:27 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201308292125.r7TLPR5A007828@svn.freebsd.org> From: "Kenneth D. Merry" Date: Thu, 29 Aug 2013 21:25:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255043 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 21:25:27 -0000 Author: ken Date: Thu Aug 29 21:25:27 2013 New Revision: 255043 URL: http://svnweb.freebsd.org/changeset/base/255043 Log: Bump up the default timeouts for move commands in the ch(4) driver to 15 minutes, and 5 minutes for things like READ ELEMENT STATUS. This is needed to account for the worst case scenarios on at least some Spectra Logic tape libraries. Sponsored by: Spectra Logic MFC after: 3 days Modified: head/sys/cam/scsi/scsi_ch.c Modified: head/sys/cam/scsi/scsi_ch.c ============================================================================== --- head/sys/cam/scsi/scsi_ch.c Thu Aug 29 20:51:12 2013 (r255042) +++ head/sys/cam/scsi/scsi_ch.c Thu Aug 29 21:25:27 2013 (r255043) @@ -99,10 +99,10 @@ __FBSDID("$FreeBSD$"); */ static const u_int32_t CH_TIMEOUT_MODE_SENSE = 6000; -static const u_int32_t CH_TIMEOUT_MOVE_MEDIUM = 100000; -static const u_int32_t CH_TIMEOUT_EXCHANGE_MEDIUM = 100000; -static const u_int32_t CH_TIMEOUT_POSITION_TO_ELEMENT = 100000; -static const u_int32_t CH_TIMEOUT_READ_ELEMENT_STATUS = 60000; +static const u_int32_t CH_TIMEOUT_MOVE_MEDIUM = 15 * 60 * 1000; +static const u_int32_t CH_TIMEOUT_EXCHANGE_MEDIUM = 15 * 60 * 1000; +static const u_int32_t CH_TIMEOUT_POSITION_TO_ELEMENT = 15 * 60 * 1000; +static const u_int32_t CH_TIMEOUT_READ_ELEMENT_STATUS = 5 * 60 * 1000; static const u_int32_t CH_TIMEOUT_SEND_VOLTAG = 10000; static const u_int32_t CH_TIMEOUT_INITIALIZE_ELEMENT_STATUS = 500000; From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 22:46:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EB396F57; Thu, 29 Aug 2013 22:46:22 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BFB1E201E; Thu, 29 Aug 2013 22:46:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TMkMD7051861; Thu, 29 Aug 2013 22:46:22 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TMkMR6051858; Thu, 29 Aug 2013 22:46:22 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201308292246.r7TMkMR6051858@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 29 Aug 2013 22:46:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255044 - head/sys/dev/drm2/ttm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 22:46:23 -0000 Author: jkim Date: Thu Aug 29 22:46:21 2013 New Revision: 255044 URL: http://svnweb.freebsd.org/changeset/base/255044 Log: Partially revert r254880. The bitmap operations actually use long type now. Modified: head/sys/dev/drm2/ttm/ttm_bo.c head/sys/dev/drm2/ttm/ttm_bo_util.c head/sys/dev/drm2/ttm/ttm_bo_vm.c Modified: head/sys/dev/drm2/ttm/ttm_bo.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo.c Thu Aug 29 21:25:27 2013 (r255043) +++ head/sys/dev/drm2/ttm/ttm_bo.c Thu Aug 29 22:46:21 2013 (r255044) @@ -1723,8 +1723,7 @@ int ttm_bo_wait(struct ttm_buffer_object if (driver->sync_obj_signaled(bo->sync_obj)) { void *tmp_obj = bo->sync_obj; bo->sync_obj = NULL; - atomic_clear_long(&bo->priv_flags, - 1UL << TTM_BO_PRIV_FLAG_MOVING); + clear_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags); mtx_unlock(&bdev->fence_lock); driver->sync_obj_unref(&tmp_obj); mtx_lock(&bdev->fence_lock); @@ -1747,8 +1746,8 @@ int ttm_bo_wait(struct ttm_buffer_object if (likely(bo->sync_obj == sync_obj)) { void *tmp_obj = bo->sync_obj; bo->sync_obj = NULL; - atomic_clear_long(&bo->priv_flags, - 1UL << TTM_BO_PRIV_FLAG_MOVING); + clear_bit(TTM_BO_PRIV_FLAG_MOVING, + &bo->priv_flags); mtx_unlock(&bdev->fence_lock); driver->sync_obj_unref(&sync_obj); driver->sync_obj_unref(&tmp_obj); Modified: head/sys/dev/drm2/ttm/ttm_bo_util.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo_util.c Thu Aug 29 21:25:27 2013 (r255043) +++ head/sys/dev/drm2/ttm/ttm_bo_util.c Thu Aug 29 22:46:21 2013 (r255044) @@ -637,8 +637,7 @@ int ttm_bo_move_accel_cleanup(struct ttm * operation has completed. */ - atomic_set_long(&bo->priv_flags, - 1UL << TTM_BO_PRIV_FLAG_MOVING); + set_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags); mtx_unlock(&bdev->fence_lock); if (tmp_obj) driver->sync_obj_unref(&tmp_obj); Modified: head/sys/dev/drm2/ttm/ttm_bo_vm.c ============================================================================== --- head/sys/dev/drm2/ttm/ttm_bo_vm.c Thu Aug 29 21:25:27 2013 (r255043) +++ head/sys/dev/drm2/ttm/ttm_bo_vm.c Thu Aug 29 22:46:21 2013 (r255044) @@ -153,8 +153,7 @@ reserve: */ mtx_lock(&bdev->fence_lock); - if ((atomic_load_acq_long(&bo->priv_flags) & - (1UL << TTM_BO_PRIV_FLAG_MOVING)) != 0) { + if (test_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags)) { /* * Here, the behavior differs between Linux and FreeBSD. * From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 23:09:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C83A7805; Thu, 29 Aug 2013 23:09:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B59A8217A; Thu, 29 Aug 2013 23:09:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TN9YKr064740; Thu, 29 Aug 2013 23:09:34 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TN9YbN064739; Thu, 29 Aug 2013 23:09:34 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201308292309.r7TN9YbN064739@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 29 Aug 2013 23:09:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255045 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 23:09:34 -0000 Author: jkim Date: Thu Aug 29 23:09:34 2013 New Revision: 255045 URL: http://svnweb.freebsd.org/changeset/base/255045 Log: 'u_long' is consistently spelled 'unsigned long' in this file. Fix it. Modified: head/sys/dev/drm2/drmP.h Modified: head/sys/dev/drm2/drmP.h ============================================================================== --- head/sys/dev/drm2/drmP.h Thu Aug 29 22:46:21 2013 (r255044) +++ head/sys/dev/drm2/drmP.h Thu Aug 29 23:09:34 2013 (r255045) @@ -961,7 +961,7 @@ struct drm_device { drm_agp_head_t *agp; drm_sg_mem_t *sg; /* Scatter gather memory */ - u_long *ctx_bitmap; + unsigned long *ctx_bitmap; void *dev_private; unsigned int agp_buffer_token; drm_local_map_t *agp_buffer_map; From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 23:11:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 69CEBA89; Thu, 29 Aug 2013 23:11:59 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 55BEE21CB; Thu, 29 Aug 2013 23:11:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TNBxuv067874; Thu, 29 Aug 2013 23:11:59 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TNBwlC067869; Thu, 29 Aug 2013 23:11:58 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201308292311.r7TNBwlC067869@svn.freebsd.org> From: "Justin T. Gibbs" Date: Thu, 29 Aug 2013 23:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255046 - in head/sys: conf dev/xen/timer i386/include/xen i386/xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 23:11:59 -0000 Author: gibbs Date: Thu Aug 29 23:11:58 2013 New Revision: 255046 URL: http://svnweb.freebsd.org/changeset/base/255046 Log: Introduce a new, HVM compatible, paravirtualized timer driver for Xen. Use this new driver for both PV and HVM instances. This driver requires a Xen hypervisor that supports vector callbacks, VCPUOP hypercalls, and reports that it has a "safe PV clock". New timer driver: Submitted by: will Sponsored by: Spectra Logic Corporation PV port to new driver, and bug fixes: Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D sys/dev/xen/timer/timer.c: - Register a PV timer device driver which (currently) implements device_{identify,probe,attach} and stubs device_detach. The detach routine requires functionality not provided by timecounters(4). The suspend and resume routines need additional work (due to Xen requiring that the hypercalls be executed on the target VCPU), and aren't needed for our purposes. - Make sure there can only be one device instance of this driver, and that it only registers one eventtimers(4) and one timecounters(4) device interface. Make both interfaces use PCPU data as needed. - Match, with a few style cleanups & API differences, the Xen versions of the "fetch time" functions. - Document the magic scale_delta() better for the i386 version. - When registering the event timer, bind a separate event channel for the timer VIRQ to the device's event timer interrupt handler for each active VCPU. Describe each interrupt as "xen_et:c%d", so they can be identified per CPU in "vmstat -i" or "show intrcnt" in KDB. - When scheduling a timer into the hypervisor, try up to 60 times if the hypervisor rejects the time as being in the past. In the common case, this retry shouldn't happen, and if it does, it should only happen once. This is because the event timer advertises a minimum period of 100usec, which is only less than the usual hypercall round trip time about 1 out of every 100 tries. (Unlike other similar drivers, this one actually checks whether the hypervisor accepted the singleshot timer set hypercall.) - Implement a RTC PV clock based on the hypervisor wallclock. sys/conf/files: - Add dev/xen/timer/timer.c if the kernel configuration includes either the XEN or XENHVM options. sys/conf/files.i386: sys/i386/include/xen/xen_clock_util.h: sys/i386/xen/clock.c: sys/i386/xen/xen_clock_util.c: sys/i386/xen/mp_machdep.c: sys/i386/xen/xen_rtc.c: - Remove previous PV timer used in i386 XEN PV kernels, the new timer introduced in this change is used instead (so we share the same code between PVHVM and PV). MFC after: 2 weeks Added: head/sys/dev/xen/timer/ head/sys/dev/xen/timer/timer.c (contents, props changed) Deleted: head/sys/i386/include/xen/xen_clock_util.h head/sys/i386/xen/xen_clock_util.c head/sys/i386/xen/xen_rtc.c Modified: head/sys/conf/files head/sys/conf/files.i386 head/sys/i386/xen/clock.c head/sys/i386/xen/mp_machdep.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Aug 29 23:09:34 2013 (r255045) +++ head/sys/conf/files Thu Aug 29 23:11:58 2013 (r255046) @@ -2499,6 +2499,7 @@ dev/xen/control/control.c optional xen | dev/xen/netback/netback.c optional xen | xenhvm dev/xen/netfront/netfront.c optional xen | xenhvm dev/xen/xenpci/xenpci.c optional xenpci +dev/xen/timer/timer.c optional xen | xenhvm dev/xl/if_xl.c optional xl pci dev/xl/xlphy.c optional xl pci fs/deadfs/dead_vnops.c standard Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Thu Aug 29 23:09:34 2013 (r255045) +++ head/sys/conf/files.i386 Thu Aug 29 23:11:58 2013 (r255046) @@ -483,8 +483,6 @@ i386/ibcs2/ibcs2_xenix.c optional ibcs2 i386/ibcs2/ibcs2_xenix_sysent.c optional ibcs2 i386/ibcs2/imgact_coff.c optional ibcs2 i386/xen/clock.c optional xen -i386/xen/xen_clock_util.c optional xen -i386/xen/xen_rtc.c optional xen i386/isa/elink.c optional ep | ie i386/isa/npx.c optional npx i386/isa/pmtimer.c optional pmtimer Added: head/sys/dev/xen/timer/timer.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/xen/timer/timer.c Thu Aug 29 23:11:58 2013 (r255046) @@ -0,0 +1,608 @@ +/** + * Copyright (c) 2009 Adrian Chadd + * Copyright (c) 2012 Spectra Logic Corporation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 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. + * + */ + +/** + * \file dev/xen/timer/timer.c + * \brief A timer driver for the Xen hypervisor's PV clock. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "clock_if.h" + +static devclass_t xentimer_devclass; + +#define NSEC_IN_SEC 1000000000ULL +#define NSEC_IN_USEC 1000ULL +/* 18446744073 = int(2^64 / NSEC_IN_SC) = 1 ns in 64-bit fractions */ +#define FRAC_IN_NSEC 18446744073LL + +/* Xen timers may fire up to 100us off */ +#define XENTIMER_MIN_PERIOD_IN_NSEC 100*NSEC_IN_USEC +#define XENCLOCK_RESOLUTION 10000000 + +#define ETIME 62 /* Xen "bad time" error */ + +#define XENTIMER_QUALITY 950 + +struct xentimer_pcpu_data { + uint64_t timer; + uint64_t last_processed; + void *irq_handle; +}; + +DPCPU_DEFINE(struct xentimer_pcpu_data, xentimer_pcpu); + +DPCPU_DECLARE(struct vcpu_info *, vcpu_info); + +struct xentimer_softc { + device_t dev; + struct timecounter tc; + struct eventtimer et; +}; + +/* Last time; this guarantees a monotonically increasing clock. */ +volatile uint64_t xen_timer_last_time = 0; + +static void +xentimer_identify(driver_t *driver, device_t parent) +{ + if (!xen_domain()) + return; + + /* Handle all Xen PV timers in one device instance. */ + if (devclass_get_device(xentimer_devclass, 0)) + return; + + BUS_ADD_CHILD(parent, 0, "xen_et", 0); +} + +static int +xentimer_probe(device_t dev) +{ + KASSERT((xen_domain()), ("Trying to use Xen timer on bare metal")); + /* + * In order to attach, this driver requires the following: + * - Vector callback support by the hypervisor, in order to deliver + * timer interrupts to the correct CPU for CPUs other than 0. + * - Access to the hypervisor shared info page, in order to look up + * each VCPU's timer information and the Xen wallclock time. + * - The hypervisor must say its PV clock is "safe" to use. + * - The hypervisor must support VCPUOP hypercalls. + * - The maximum number of CPUs supported by FreeBSD must not exceed + * the number of VCPUs supported by the hypervisor. + */ +#define XTREQUIRES(condition, reason...) \ + if (!(condition)) { \ + device_printf(dev, ## reason); \ + device_detach(dev); \ + return (ENXIO); \ + } + + if (xen_hvm_domain()) { + XTREQUIRES(xen_vector_callback_enabled, + "vector callbacks unavailable\n"); + XTREQUIRES(xen_feature(XENFEAT_hvm_safe_pvclock), + "HVM safe pvclock unavailable\n"); + } + XTREQUIRES(HYPERVISOR_shared_info != NULL, + "shared info page unavailable\n"); + XTREQUIRES(HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, 0, NULL) == 0, + "VCPUOPs interface unavailable\n"); +#undef XTREQUIRES + device_set_desc(dev, "Xen PV Clock"); + return (0); +} + +/* + * Scale a 64-bit delta by scaling and multiplying by a 32-bit fraction, + * yielding a 64-bit result. + */ +static inline uint64_t +scale_delta(uint64_t delta, uint32_t mul_frac, int shift) +{ + uint64_t product; + + if (shift < 0) + delta >>= -shift; + else + delta <<= shift; + +#if defined(__i386__) + { + uint32_t tmp1, tmp2; + + /** + * For i386, the formula looks like: + * + * lower = (mul_frac * (delta & UINT_MAX)) >> 32 + * upper = mul_frac * (delta >> 32) + * product = lower + upper + */ + __asm__ ( + "mul %5 ; " + "mov %4,%%eax ; " + "mov %%edx,%4 ; " + "mul %5 ; " + "xor %5,%5 ; " + "add %4,%%eax ; " + "adc %5,%%edx ; " + : "=A" (product), "=r" (tmp1), "=r" (tmp2) + : "a" ((uint32_t)delta), "1" ((uint32_t)(delta >> 32)), + "2" (mul_frac) ); + } +#elif defined(__amd64__) + { + unsigned long tmp; + + __asm__ ( + "mulq %[mul_frac] ; shrd $32, %[hi], %[lo]" + : [lo]"=a" (product), [hi]"=d" (tmp) + : "0" (delta), [mul_frac]"rm"((uint64_t)mul_frac)); + } +#else +#error "xentimer: unsupported architecture" +#endif + + return (product); +} + +static uint64_t +get_nsec_offset(struct vcpu_time_info *tinfo) +{ + + return (scale_delta(rdtsc() - tinfo->tsc_timestamp, + tinfo->tsc_to_system_mul, tinfo->tsc_shift)); +} + +/* + * Read the current hypervisor system uptime value from Xen. + * See for a description of how this works. + */ +static uint32_t +xen_fetch_vcpu_tinfo(struct vcpu_time_info *dst, struct vcpu_time_info *src) +{ + + do { + dst->version = src->version; + rmb(); + dst->tsc_timestamp = src->tsc_timestamp; + dst->system_time = src->system_time; + dst->tsc_to_system_mul = src->tsc_to_system_mul; + dst->tsc_shift = src->tsc_shift; + rmb(); + } while ((src->version & 1) | (dst->version ^ src->version)); + + return (dst->version); +} + +/** + * \brief Get the current time, in nanoseconds, since the hypervisor booted. + * + * \note This function returns the current CPU's idea of this value, unless + * it happens to be less than another CPU's previously determined value. + */ +static uint64_t +xen_fetch_vcpu_time(void) +{ + struct vcpu_time_info dst; + struct vcpu_time_info *src; + uint32_t pre_version; + uint64_t now; + volatile uint64_t last; + struct vcpu_info *vcpu = DPCPU_GET(vcpu_info); + + src = &vcpu->time; + + critical_enter(); + do { + pre_version = xen_fetch_vcpu_tinfo(&dst, src); + barrier(); + now = dst.system_time + get_nsec_offset(&dst); + barrier(); + } while (pre_version != src->version); + + /* + * Enforce a monotonically increasing clock time across all + * VCPUs. If our time is too old, use the last time and return. + * Otherwise, try to update the last time. + */ + do { + last = xen_timer_last_time; + if (last > now) { + now = last; + break; + } + } while (!atomic_cmpset_64(&xen_timer_last_time, last, now)); + + critical_exit(); + + return (now); +} + +static uint32_t +xentimer_get_timecount(struct timecounter *tc) +{ + + return ((uint32_t)xen_fetch_vcpu_time() & UINT_MAX); +} + +/** + * \brief Fetch the hypervisor boot time, known as the "Xen wallclock". + * + * \param ts Timespec to store the current stable value. + * \param version Pointer to store the corresponding wallclock version. + * + * \note This value is updated when Domain-0 shifts its clock to follow + * clock drift, e.g. as detected by NTP. + */ +static void +xen_fetch_wallclock(struct timespec *ts) +{ + shared_info_t *src = HYPERVISOR_shared_info; + uint32_t version = 0; + + do { + version = src->wc_version; + rmb(); + ts->tv_sec = src->wc_sec; + ts->tv_nsec = src->wc_nsec; + rmb(); + } while ((src->wc_version & 1) | (version ^ src->wc_version)); +} + +static void +xen_fetch_uptime(struct timespec *ts) +{ + uint64_t uptime = xen_fetch_vcpu_time(); + ts->tv_sec = uptime / NSEC_IN_SEC; + ts->tv_nsec = uptime % NSEC_IN_SEC; +} + +static int +xentimer_settime(device_t dev __unused, struct timespec *ts) +{ + /* + * Don't return EINVAL here; just silently fail if the domain isn't + * privileged enough to set the TOD. + */ + return(0); +} + +/** + * \brief Return current time according to the Xen Hypervisor wallclock. + * + * \param dev Xentimer device. + * \param ts Pointer to store the wallclock time. + * + * \note The Xen time structures document the hypervisor start time and the + * uptime-since-hypervisor-start (in nsec.) They need to be combined + * in order to calculate a TOD clock. + */ +static int +xentimer_gettime(device_t dev, struct timespec *ts) +{ + struct timespec u_ts; + + timespecclear(ts); + xen_fetch_wallclock(ts); + xen_fetch_uptime(&u_ts); + timespecadd(ts, &u_ts); + + return(0); +} + +/** + * \brief Handle a timer interrupt for the Xen PV timer driver. + * + * \param arg Xen timer driver softc that is expecting the interrupt. + */ +static int +xentimer_intr(void *arg) +{ + struct xentimer_softc *sc = (struct xentimer_softc *)arg; + struct xentimer_pcpu_data *pcpu = DPCPU_PTR(xentimer_pcpu); + + pcpu->last_processed = xen_fetch_vcpu_time(); + if (pcpu->timer != 0 && sc->et.et_active) + sc->et.et_event_cb(&sc->et, sc->et.et_arg); + + return (FILTER_HANDLED); +} + +static int +xentimer_vcpu_start_timer(int vcpu, uint64_t next_time) +{ + struct vcpu_set_singleshot_timer single; + + single.timeout_abs_ns = next_time; + single.flags = VCPU_SSHOTTMR_future; + return (HYPERVISOR_vcpu_op(VCPUOP_set_singleshot_timer, vcpu, &single)); +} + +static int +xentimer_vcpu_stop_timer(int vcpu) +{ + + return (HYPERVISOR_vcpu_op(VCPUOP_stop_singleshot_timer, vcpu, NULL)); +} + +/** + * \brief Set the next oneshot time for the current CPU. + * + * \param et Xen timer driver event timer to schedule on. + * \param first Delta to the next time to schedule the interrupt for. + * \param period Not used. + * + * \note See eventtimers(9) for more information. + * \note + * + * \returns 0 + */ +static int +xentimer_et_start(struct eventtimer *et, + sbintime_t first, sbintime_t period) +{ + int error = 0, i = 0; + struct xentimer_softc *sc = et->et_priv; + int cpu = PCPU_GET(acpi_id); + struct xentimer_pcpu_data *pcpu = DPCPU_PTR(xentimer_pcpu); + uint64_t first_in_ns, next_time; + + /* See sbttots() for this formula. */ + first_in_ns = (((first >> 32) * NSEC_IN_SEC) + + (((uint64_t)NSEC_IN_SEC * (uint32_t)first) >> 32)); + + /* + * Retry any timer scheduling failures, where the hypervisor + * returns -ETIME. Sometimes even a 100us timer period isn't large + * enough, but larger period instances are relatively uncommon. + * + * XXX Remove the panics once et_start() and its consumers are + * equipped to deal with start failures. + */ + do { + if (++i == 60) + panic("can't schedule timer"); + next_time = xen_fetch_vcpu_time() + first_in_ns; + error = xentimer_vcpu_start_timer(cpu, next_time); + } while (error == -ETIME); + + if (error) + panic("%s: Error %d setting singleshot timer to %"PRIu64"\n", + device_get_nameunit(sc->dev), error, next_time); + + pcpu->timer = next_time; + return (error); +} + +/** + * \brief Cancel the event timer's currently running timer, if any. + */ +static int +xentimer_et_stop(struct eventtimer *et) +{ + int cpu = PCPU_GET(acpi_id); + struct xentimer_pcpu_data *pcpu = DPCPU_PTR(xentimer_pcpu); + + pcpu->timer = 0; + return (xentimer_vcpu_stop_timer(cpu)); +} + +/** + * \brief Attach a Xen PV timer driver instance. + * + * \param dev Bus device object to attach. + * + * \note + * \returns EINVAL + */ +static int +xentimer_attach(device_t dev) +{ + struct xentimer_softc *sc = device_get_softc(dev); + int error, i; + + sc->dev = dev; + + /* Bind an event channel to a VIRQ on each VCPU. */ + CPU_FOREACH(i) { + struct xentimer_pcpu_data *pcpu = DPCPU_ID_PTR(i, xentimer_pcpu); + + error = HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, i, NULL); + if (error) { + device_printf(dev, "Error disabling Xen periodic timer " + "on CPU %d\n", i); + return (error); + } + + error = xen_intr_bind_virq(dev, VIRQ_TIMER, i, xentimer_intr, + NULL, sc, INTR_TYPE_CLK, &pcpu->irq_handle); + if (error) { + device_printf(dev, "Error %d binding VIRQ_TIMER " + "to VCPU %d\n", error, i); + return (error); + } + xen_intr_describe(pcpu->irq_handle, "c%d", i); + } + + /* Register the event timer. */ + sc->et.et_name = "XENTIMER"; + sc->et.et_quality = XENTIMER_QUALITY; + sc->et.et_flags = ET_FLAGS_ONESHOT | ET_FLAGS_PERCPU; + sc->et.et_frequency = NSEC_IN_SEC; + /* See tstosbt() for this formula */ + sc->et.et_min_period = (XENTIMER_MIN_PERIOD_IN_NSEC * + (((uint64_t)1 << 63) / 500000000) >> 32); + sc->et.et_max_period = ((sbintime_t)4 << 32); + sc->et.et_start = xentimer_et_start; + sc->et.et_stop = xentimer_et_stop; + sc->et.et_priv = sc; + et_register(&sc->et); + + /* Register the timecounter. */ + sc->tc.tc_name = "XENTIMER"; + sc->tc.tc_quality = XENTIMER_QUALITY; + /* + * The underlying resolution is in nanoseconds, since the timer info + * scales TSC frequencies using a fraction that represents time in + * terms of nanoseconds. + */ + sc->tc.tc_frequency = NSEC_IN_SEC; + sc->tc.tc_counter_mask = ~0u; + sc->tc.tc_get_timecount = xentimer_get_timecount; + sc->tc.tc_priv = sc; + tc_init(&sc->tc); + + /* Register the Hypervisor wall clock */ + clock_register(dev, XENCLOCK_RESOLUTION); + + return (0); +} + +static int +xentimer_detach(device_t dev) +{ + + /* Implement Xen PV clock teardown - XXX see hpet_detach ? */ + /* If possible: + * 1. need to deregister timecounter + * 2. need to deregister event timer + * 3. need to deregister virtual IRQ event channels + */ + return (EBUSY); +} + +/** + * The following device methods are disabled because they wouldn't work + * properly. + */ +#ifdef NOTYET +static int +xentimer_resume(device_t dev) +{ + struct xentimer_softc *sc = device_get_softc(dev); + int error = 0; + int i; + + device_printf(sc->dev, "%s", __func__); + CPU_FOREACH(i) { + struct xentimer_pcpu_data *pcpu = DPCPU_ID_PTR(i, xentimer_pcpu); + + /* Skip inactive timers. */ + if (pcpu->timer == 0) + continue; + + /* + * XXX This won't actually work, because Xen requires that + * singleshot timers be set while running on the given CPU. + */ + error = xentimer_vcpu_start_timer(i, pcpu->timer); + if (error == -ETIME) { + /* Event time has already passed; process. */ + xentimer_intr(sc); + } else if (error != 0) { + panic("%s: error %d restarting vcpu %d\n", + __func__, error, i); + } + } + + return (error); +} + +static int +xentimer_suspend(device_t dev) +{ + struct xentimer_softc *sc = device_get_softc(dev); + int error = 0; + int i; + + device_printf(sc->dev, "%s", __func__); + CPU_FOREACH(i) { + struct xentimer_pcpu_data *pcpu = DPCPU_ID_PTR(i, xentimer_pcpu); + + /* Skip inactive timers. */ + if (pcpu->timer == 0) + continue; + error = xentimer_vcpu_stop_timer(i); + if (error) + panic("Error %d stopping VCPU %d timer\n", error, i); + } + + return (error); +} +#endif + +static device_method_t xentimer_methods[] = { + DEVMETHOD(device_identify, xentimer_identify), + DEVMETHOD(device_probe, xentimer_probe), + DEVMETHOD(device_attach, xentimer_attach), + DEVMETHOD(device_detach, xentimer_detach), +#ifdef NOTYET + DEVMETHOD(device_suspend, xentimer_suspend), + DEVMETHOD(device_resume, xentimer_resume), +#endif + /* clock interface */ + DEVMETHOD(clock_gettime, xentimer_gettime), + DEVMETHOD(clock_settime, xentimer_settime), + DEVMETHOD_END +}; + +static driver_t xentimer_driver = { + "xen_et", + xentimer_methods, + sizeof(struct xentimer_softc), +}; + +DRIVER_MODULE(xentimer, nexus, xentimer_driver, xentimer_devclass, 0, 0); +MODULE_DEPEND(xentimer, nexus, 1, 1, 1); Modified: head/sys/i386/xen/clock.c ============================================================================== --- head/sys/i386/xen/clock.c Thu Aug 29 23:09:34 2013 (r255045) +++ head/sys/i386/xen/clock.c Thu Aug 29 23:11:58 2013 (r255046) @@ -79,7 +79,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -88,7 +87,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include /* * 32-bit time_t's can't reach leap years before 1904 or after 2036, so we @@ -117,6 +116,7 @@ struct mtx clock_lock; mtx_init(&clock_lock, "clk", NULL, MTX_SPIN | MTX_NOPROFILE) #define RTC_LOCK mtx_lock_spin(&clock_lock) #define RTC_UNLOCK mtx_unlock_spin(&clock_lock) +#define NS_PER_TICK (1000000000ULL/hz) int adjkerntz; /* local offset from GMT in seconds */ int clkintr_pending; @@ -124,22 +124,10 @@ int pscnt = 1; int psdiv = 1; int wall_cmos_clock; u_int timer_freq = TIMER_FREQ; -static int independent_wallclock; -static int xen_disable_rtc_set; static u_long cyc2ns_scale; -static struct timespec shadow_tv; -static uint32_t shadow_tv_version; /* XXX: lazy locking */ static uint64_t processed_system_time; /* stime (ns) at last processing. */ -static const u_char daysinmonth[] = {31,28,31,30,31,30,31,31,30,31,30,31}; - -int ap_cpu_initclocks(int cpu); - -SYSCTL_INT(_machdep, OID_AUTO, independent_wallclock, - CTLFLAG_RW, &independent_wallclock, 0, ""); -SYSCTL_INT(_machdep, OID_AUTO, xen_disable_rtc_set, - CTLFLAG_RW, &xen_disable_rtc_set, 1, ""); - +extern volatile uint64_t xen_timer_last_time; #define do_div(n,base) ({ \ unsigned long __upper, __low, __high, __mod, __base; \ @@ -156,12 +144,6 @@ SYSCTL_INT(_machdep, OID_AUTO, xen_disab }) -#define NS_PER_TICK (1000000000ULL/hz) - -#define rdtscll(val) \ - __asm__ __volatile__("rdtsc" : "=A" (val)) - - /* convert from cycles(64bits) => nanoseconds (64bits) * basic equation: * ns = cycles / (freq / ns_per_sec) @@ -184,208 +166,13 @@ static inline void set_cyc2ns_scale(unsi static inline unsigned long long cycles_2_ns(unsigned long long cyc) { - return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR; -} - -/* - * Scale a 64-bit delta by scaling and multiplying by a 32-bit fraction, - * yielding a 64-bit result. - */ -static inline uint64_t -scale_delta(uint64_t delta, uint32_t mul_frac, int shift) -{ - uint64_t product; - uint32_t tmp1, tmp2; - - if ( shift < 0 ) - delta >>= -shift; - else - delta <<= shift; - - __asm__ ( - "mul %5 ; " - "mov %4,%%eax ; " - "mov %%edx,%4 ; " - "mul %5 ; " - "xor %5,%5 ; " - "add %4,%%eax ; " - "adc %5,%%edx ; " - : "=A" (product), "=r" (tmp1), "=r" (tmp2) - : "a" ((uint32_t)delta), "1" ((uint32_t)(delta >> 32)), "2" (mul_frac) ); - - return product; -} - -static uint64_t -get_nsec_offset(struct shadow_time_info *shadow) -{ - uint64_t now, delta; - rdtscll(now); - delta = now - shadow->tsc_timestamp; - return scale_delta(delta, shadow->tsc_to_nsec_mul, shadow->tsc_shift); -} - -static void update_wallclock(void) -{ - shared_info_t *s = HYPERVISOR_shared_info; - - do { - shadow_tv_version = s->wc_version; - rmb(); - shadow_tv.tv_sec = s->wc_sec; - shadow_tv.tv_nsec = s->wc_nsec; - rmb(); - } - while ((s->wc_version & 1) | (shadow_tv_version ^ s->wc_version)); - -} - -static void -add_uptime_to_wallclock(void) -{ - struct timespec ut; - - xen_fetch_uptime(&ut); - timespecadd(&shadow_tv, &ut); + return ((cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR); } -/* - * Reads a consistent set of time-base values from Xen, into a shadow data - * area. Must be called with the xtime_lock held for writing. - */ -static void __get_time_values_from_xen(void) -{ - shared_info_t *s = HYPERVISOR_shared_info; - struct vcpu_time_info *src; - struct shadow_time_info *dst; - uint32_t pre_version, post_version; - struct pcpu *pc; - - pc = pcpu_find(smp_processor_id()); - src = &s->vcpu_info[smp_processor_id()].time; - dst = &pc->pc_shadow_time; - - spinlock_enter(); - do { - pre_version = dst->version = src->version; - rmb(); - dst->tsc_timestamp = src->tsc_timestamp; - dst->system_timestamp = src->system_time; - dst->tsc_to_nsec_mul = src->tsc_to_system_mul; - dst->tsc_shift = src->tsc_shift; - rmb(); - post_version = src->version; - } - while ((pre_version & 1) | (pre_version ^ post_version)); - - dst->tsc_to_usec_mul = dst->tsc_to_nsec_mul / 1000; - spinlock_exit(); -} - - -static inline int time_values_up_to_date(int cpu) -{ - struct vcpu_time_info *src; - struct shadow_time_info *dst; - struct pcpu *pc; - - src = &HYPERVISOR_shared_info->vcpu_info[cpu].time; - pc = pcpu_find(cpu); - dst = &pc->pc_shadow_time; - - rmb(); - return (dst->version == src->version); -} - -static unsigned xen_get_timecount(struct timecounter *tc); - -static struct timecounter xen_timecounter = { - xen_get_timecount, /* get_timecount */ - 0, /* no poll_pps */ - ~0u, /* counter_mask */ - 0, /* frequency */ - "ixen", /* name */ - 0 /* quality */ -}; - -static struct eventtimer xen_et; - -struct xen_et_state { - int mode; -#define MODE_STOP 0 -#define MODE_PERIODIC 1 -#define MODE_ONESHOT 2 - int64_t period; - int64_t next; -}; - -static DPCPU_DEFINE(struct xen_et_state, et_state); - -static int -clkintr(void *arg) -{ - int64_t now; - int cpu = smp_processor_id(); - struct pcpu *pc = pcpu_find(cpu); - struct shadow_time_info *shadow = &pc->pc_shadow_time; - struct xen_et_state *state = DPCPU_PTR(et_state); - - do { - __get_time_values_from_xen(); - now = shadow->system_timestamp + get_nsec_offset(shadow); - } while (!time_values_up_to_date(cpu)); - - /* Process elapsed ticks since last call. */ - processed_system_time = now; - if (state->mode == MODE_PERIODIC) { - while (now >= state->next) { - state->next += state->period; - if (xen_et.et_active) - xen_et.et_event_cb(&xen_et, xen_et.et_arg); - } - HYPERVISOR_set_timer_op(state->next + 50000); - } else if (state->mode == MODE_ONESHOT) { - if (xen_et.et_active) - xen_et.et_event_cb(&xen_et, xen_et.et_arg); - } - /* - * Take synchronised time from Xen once a minute if we're not - * synchronised ourselves, and we haven't chosen to keep an independent - * time base. - */ - - if (shadow_tv_version != HYPERVISOR_shared_info->wc_version && - !independent_wallclock) { - printf("[XEN] hypervisor wallclock nudged; nudging TOD.\n"); - update_wallclock(); - add_uptime_to_wallclock(); - tc_setclock(&shadow_tv); - } - - /* XXX TODO */ - return (FILTER_HANDLED); -} static uint32_t getit(void) { - struct shadow_time_info *shadow; - uint64_t time; - uint32_t local_time_version; - struct pcpu *pc; - - pc = pcpu_find(smp_processor_id()); - shadow = &pc->pc_shadow_time; - - do { - local_time_version = shadow->version; - barrier(); - time = shadow->system_timestamp + get_nsec_offset(shadow); - if (!time_values_up_to_date(smp_processor_id())) - __get_time_values_from_xen(/*cpu */); - barrier(); - } while (local_time_version != shadow->version); - - return (time); + return (xen_timer_last_time); } @@ -489,43 +276,12 @@ DELAY(int n) #endif } - -/* - * Restore all the timers non-atomically (XXX: should be atomically). - * - * This function is called from pmtimer_resume() to restore all the timers. - * This should not be necessary, but there are broken laptops that do not - * restore all the timers on resume. - */ -void -timer_restore(void) -{ - struct xen_et_state *state = DPCPU_PTR(et_state); - struct pcpu *pc; - - /* Get timebases for new environment. */ - __get_time_values_from_xen(); - - /* Reset our own concept of passage of system time. */ - pc = pcpu_find(0); - processed_system_time = pc->pc_shadow_time.system_timestamp; - state->next = processed_system_time; -} - void startrtclock() { - unsigned long long alarm; uint64_t __cpu_khz; uint32_t cpu_khz; struct vcpu_time_info *info; - struct pcpu *pc; - - pc = pcpu_find(0); - - /* initialize xen values */ - __get_time_values_from_xen(); - processed_system_time = pc->pc_shadow_time.system_timestamp; __cpu_khz = 1000000ULL << 32; info = &HYPERVISOR_shared_info->vcpu_info[0].time; @@ -544,12 +300,6 @@ startrtclock() set_cyc2ns_scale(cpu_khz/1000); tsc_freq = cpu_khz * 1000; - - timer_freq = 1000000000LL; - xen_timecounter.tc_frequency = timer_freq >> 9; - tc_init(&xen_timecounter); - - rdtscll(alarm); } /* @@ -783,116 +533,20 @@ resettodr() } #endif -static int -xen_et_start(struct eventtimer *et, sbintime_t first, sbintime_t period) -{ - struct xen_et_state *state = DPCPU_PTR(et_state); - struct shadow_time_info *shadow; - int64_t fperiod; - struct pcpu *pc; - - __get_time_values_from_xen(); - - if (period != 0) { - state->mode = MODE_PERIODIC; - state->period = (1000000000LLU * period) >> 32; - } else { - state->mode = MODE_ONESHOT; - state->period = 0; - } - if (first != 0) - fperiod = (1000000000LLU * first) >> 32; - else - fperiod = state->period; - - pc = pcpu_find(smp_processor_id()); - shadow = &pc->pc_shadow_time; - state->next = shadow->system_timestamp + get_nsec_offset(shadow); - state->next += fperiod; - HYPERVISOR_set_timer_op(state->next + 50000); - return (0); -} - -static int -xen_et_stop(struct eventtimer *et) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Aug 29 23:46:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C9BE6E9A; Thu, 29 Aug 2013 23:46:39 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B6664235C; Thu, 29 Aug 2013 23:46:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7TNkd0b085559; Thu, 29 Aug 2013 23:46:39 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7TNkde1085558; Thu, 29 Aug 2013 23:46:39 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201308292346.r7TNkde1085558@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 29 Aug 2013 23:46:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255047 - head/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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Aug 2013 23:46:39 -0000 Author: np Date: Thu Aug 29 23:46:38 2013 New Revision: 255047 URL: http://svnweb.freebsd.org/changeset/base/255047 Log: Add a routine for attaching an mbuf to a buffer with an external refcount. This one is willing to work with buffers that may already be referenced. MEXTADD/m_extadd are suitable only for the first attachment to a cluster -- they initialize the refcount to 1. Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Thu Aug 29 23:11:58 2013 (r255046) +++ head/sys/sys/mbuf.h Thu Aug 29 23:46:38 2013 (r255047) @@ -545,6 +545,28 @@ m_gettype(int size) return (type); } +/* + * Associated an external reference counted buffer with an mbuf. + */ +static __inline void +m_extaddref(struct mbuf *m, caddr_t buf, u_int size, u_int *ref_cnt, + int (*freef)(struct mbuf *, void *, void *), void *arg1, void *arg2) +{ + + KASSERT(ref_cnt != NULL, ("%s: ref_cnt not provided", __func__)); + + atomic_add_int(ref_cnt, 1); + m->m_flags |= M_EXT; + m->m_ext.ext_buf = buf; + m->m_ext.ref_cnt = ref_cnt; + m->m_data = m->m_ext.ext_buf; + m->m_ext.ext_size = size; + m->m_ext.ext_free = freef; + m->m_ext.ext_arg1 = arg1; + m->m_ext.ext_arg2 = arg2; + m->m_ext.ext_type = EXT_EXTREF; +} + static __inline uma_zone_t m_getzone(int size) { From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 01:32:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 559D53F8; Fri, 30 Aug 2013 01:32:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4351428DC; Fri, 30 Aug 2013 01:32:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7U1WmII046896; Fri, 30 Aug 2013 01:32:48 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7U1WmlW046894; Fri, 30 Aug 2013 01:32:48 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201308300132.r7U1WmlW046894@svn.freebsd.org> From: Bryan Drewery Date: Fri, 30 Aug 2013 01:32:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255048 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 01:32:48 -0000 Author: bdrewery (ports committer) Date: Fri Aug 30 01:32:47 2013 New Revision: 255048 URL: http://svnweb.freebsd.org/changeset/base/255048 Log: - Fix LOCAL_MTREE so it properly handles multiple files and quotes its value into submakes PR: conf/179466 Submitted by: Garrett Cooper Approved by: bapt MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Aug 29 23:46:38 2013 (r255047) +++ head/Makefile.inc1 Fri Aug 30 01:32:47 2013 (r255048) @@ -265,7 +265,7 @@ WMAKEENV= ${CROSSENV} \ PATH=${TMPPATH} # make hierarchy -HMAKE= PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} +HMAKE= PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE:Q} .if defined(NO_ROOT) HMAKE+= PATH=${TMPPATH} METALOG=${METALOG} -DNO_ROOT .endif @@ -814,7 +814,7 @@ distributeworld installworld: installche cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ METALOG=${METALOG} ${IMAKE_INSTALL} ${IMAKE_MTREE} \ DISTBASE=/base DESTDIR=${DESTDIR}/${DISTDIR}/base \ - LOCAL_MTREE=${LOCAL_MTREE} distrib-dirs + LOCAL_MTREE=${LOCAL_MTREE:Q} distrib-dirs .endif ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \ ${IMAKEENV} rm -rf ${INSTALLTMP} @@ -888,7 +888,7 @@ reinstall: @echo ">>> Making hierarchy" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 \ - LOCAL_MTREE=${LOCAL_MTREE} hierarchy + LOCAL_MTREE=${LOCAL_MTREE:Q} hierarchy @echo @echo "--------------------------------------------------------------" @echo ">>> Installing everything" From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 01:45:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E9CE5877; Fri, 30 Aug 2013 01:45:36 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D600D2976; Fri, 30 Aug 2013 01:45:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7U1javr053366; Fri, 30 Aug 2013 01:45:36 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7U1jasj053364; Fri, 30 Aug 2013 01:45:36 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201308300145.r7U1jasj053364@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 30 Aug 2013 01:45:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255050 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 01:45:37 -0000 Author: np Date: Fri Aug 30 01:45:36 2013 New Revision: 255050 URL: http://svnweb.freebsd.org/changeset/base/255050 Log: Implement support for rx buffer packing. Enable it by default for T5 cards. This is a T4 and T5 chip feature which lets the chip deliver multiple Ethernet frames in a single buffer. This is more efficient within the chip, in the driver, and reduces wastage of space in rx buffers. - Always allocate rx buffers from the jumbop zone, no matter what the MTU is. Do not use the normal cluster refcounting mechanism. - Reserve space for an mbuf and a refcount in the cluster itself and let the chip DMA multiple frames in the rest. - Use the embedded mbuf for the first frame and allocate mbufs on the fly for any additional frames delivered in the cluster. Each of these mbufs has a reference on the underlying cluster. Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Fri Aug 30 01:33:26 2013 (r255049) +++ head/sys/dev/cxgbe/adapter.h Fri Aug 30 01:45:36 2013 (r255050) @@ -128,9 +128,9 @@ enum { RX_FL_ESIZE = EQ_ESIZE, /* 8 64bit addresses */ #if MJUMPAGESIZE != MCLBYTES - FL_BUF_SIZES = 4, /* cluster, jumbop, jumbo9k, jumbo16k */ + FL_BUF_SIZES_MAX = 5, /* cluster, jumbop, jumbo9k, jumbo16k, extra */ #else - FL_BUF_SIZES = 3, /* cluster, jumbo9k, jumbo16k */ + FL_BUF_SIZES_MAX = 4, /* cluster, jumbo9k, jumbo16k, extra */ #endif CTRL_EQ_QSIZE = 128, @@ -165,6 +165,7 @@ enum { MASTER_PF = (1 << 3), ADAP_SYSCTL_CTX = (1 << 4), TOM_INIT_DONE = (1 << 5), + BUF_PACKING_OK = (1 << 6), CXGBE_BUSY = (1 << 9), @@ -232,12 +233,11 @@ struct port_info { }; struct fl_sdesc { - struct mbuf *m; bus_dmamap_t map; caddr_t cl; - uint8_t tag_idx; /* the sc->fl_tag this map comes from */ + uint8_t tag_idx; /* the fl->tag entry this map comes from */ #ifdef INVARIANTS - __be64 ba_tag; + __be64 ba_hwtag; #endif }; @@ -359,9 +359,22 @@ struct sge_eq { uint32_t unstalled; /* recovered from stall */ }; +struct fl_buf_info { + u_int size; + int type; + int hwtag:4; /* tag in low 4 bits of the pa. */ + uma_zone_t zone; +}; +#define FL_BUF_SIZES(sc) (sc->sge.fl_buf_sizes) +#define FL_BUF_SIZE(sc, x) (sc->sge.fl_buf_info[x].size) +#define FL_BUF_TYPE(sc, x) (sc->sge.fl_buf_info[x].type) +#define FL_BUF_HWTAG(sc, x) (sc->sge.fl_buf_info[x].hwtag) +#define FL_BUF_ZONE(sc, x) (sc->sge.fl_buf_info[x].zone) + enum { FL_STARVING = (1 << 0), /* on the adapter's list of starving fl's */ FL_DOOMED = (1 << 1), /* about to be destroyed */ + FL_BUF_PACKING = (1 << 2), /* buffer packing enabled */ }; #define FL_RUNNING_LOW(fl) (fl->cap - fl->needed <= fl->lowat) @@ -370,7 +383,8 @@ enum { struct sge_fl { bus_dma_tag_t desc_tag; bus_dmamap_t desc_map; - bus_dma_tag_t tag[FL_BUF_SIZES]; + bus_dma_tag_t tag[FL_BUF_SIZES_MAX]; /* only first FL_BUF_SIZES(sc) are + valid */ uint8_t tag_idx; struct mtx fl_lock; char lockname[16]; @@ -383,11 +397,13 @@ struct sge_fl { uint16_t qsize; /* size (# of entries) of the queue */ uint16_t cntxt_id; /* SGE context id for the freelist */ uint32_t cidx; /* consumer idx (buffer idx, NOT hw desc idx) */ + uint32_t rx_offset; /* offset in fl buf (when buffer packing) */ uint32_t pidx; /* producer idx (buffer idx, NOT hw desc idx) */ uint32_t needed; /* # of buffers needed to fill up fl. */ uint32_t lowat; /* # of buffers <= this means fl needs help */ uint32_t pending; /* # of bufs allocated since last doorbell */ - unsigned int dmamap_failed; + u_int dmamap_failed; + struct mbuf *mstash[8]; TAILQ_ENTRY(sge_fl) link; /* All starving freelists */ }; @@ -519,6 +535,9 @@ struct sge { int eq_start; struct sge_iq **iqmap; /* iq->cntxt_id to iq mapping */ struct sge_eq **eqmap; /* eq->cntxt_id to eq mapping */ + + u_int fl_buf_sizes __aligned(CACHE_LINE_SIZE); + struct fl_buf_info fl_buf_info[FL_BUF_SIZES_MAX]; }; struct rss_header; Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Fri Aug 30 01:33:26 2013 (r255049) +++ head/sys/dev/cxgbe/t4_sge.c Fri Aug 30 01:45:36 2013 (r255050) @@ -56,19 +56,6 @@ __FBSDID("$FreeBSD$"); #include "common/t4_regs_values.h" #include "common/t4_msg.h" -struct fl_buf_info { - int size; - int type; - uma_zone_t zone; -}; - -/* Filled up by t4_sge_modload */ -static struct fl_buf_info fl_buf_info[FL_BUF_SIZES]; - -#define FL_BUF_SIZE(x) (fl_buf_info[x].size) -#define FL_BUF_TYPE(x) (fl_buf_info[x].type) -#define FL_BUF_ZONE(x) (fl_buf_info[x].zone) - #ifdef T4_PKT_TIMESTAMP #define RX_COPY_THRESHOLD (MINCLSIZE - 8) #else @@ -85,7 +72,8 @@ TUNABLE_INT("hw.cxgbe.fl_pktshift", &fl_ /* * Pad ethernet payload up to this boundary. * -1: driver should figure out a good value. - * Any power of 2, from 32 to 4096 (both inclusive) is a valid value. + * 0: disable padding. + * Any power of 2 from 32 to 4096 (both inclusive) is also a valid value. */ static int fl_pad = -1; TUNABLE_INT("hw.cxgbe.fl_pad", &fl_pad); @@ -107,6 +95,33 @@ TUNABLE_INT("hw.cxgbe.spg_len", &spg_len static int cong_drop = 0; TUNABLE_INT("hw.cxgbe.cong_drop", &cong_drop); +/* + * Deliver multiple frames in the same free list buffer if they fit. + * -1: let the driver decide whether to enable buffer packing or not. + * 0: disable buffer packing. + * 1: enable buffer packing. + */ +static int buffer_packing = -1; +TUNABLE_INT("hw.cxgbe.buffer_packing", &buffer_packing); + +/* + * Start next frame in a packed buffer at this boundary. + * -1: driver should figure out a good value. + * T4: + * --- + * if fl_pad != 0 + * value specified here will be overridden by fl_pad. + * else + * power of 2 from 32 to 4096 (both inclusive) is a valid value here. + * T5: + * --- + * 16, or a power of 2 from 64 to 4096 (both inclusive) is a valid value. + */ +static int fl_pack = -1; +static int t4_fl_pack; +static int t5_fl_pack; +TUNABLE_INT("hw.cxgbe.fl_pack", &fl_pack); + /* Used to track coalesced tx work request */ struct txpkts { uint64_t *flitp; /* ptr to flit where next pkt should start */ @@ -123,12 +138,15 @@ struct sgl { }; static int service_iq(struct sge_iq *, int); -static struct mbuf *get_fl_payload(struct adapter *, struct sge_fl *, uint32_t, +static struct mbuf *get_fl_payload1(struct adapter *, struct sge_fl *, uint32_t, + int *); +static struct mbuf *get_fl_payload2(struct adapter *, struct sge_fl *, uint32_t, int *); static int t4_eth_rx(struct sge_iq *, const struct rss_header *, struct mbuf *); static inline void init_iq(struct sge_iq *, struct adapter *, int, int, int, int); -static inline void init_fl(struct sge_fl *, int, int, char *); +static inline void init_fl(struct adapter *, struct sge_fl *, int, int, int, + char *); static inline void init_eq(struct sge_eq *, int, int, uint8_t, uint16_t, char *); static int alloc_ring(struct adapter *, size_t, bus_dma_tag_t *, bus_dmamap_t *, @@ -170,8 +188,8 @@ static inline void ring_fl_db(struct ada static int refill_fl(struct adapter *, struct sge_fl *, int); static void refill_sfl(void *); static int alloc_fl_sdesc(struct sge_fl *); -static void free_fl_sdesc(struct sge_fl *); -static void set_fl_tag_idx(struct sge_fl *, int); +static void free_fl_sdesc(struct adapter *, struct sge_fl *); +static void set_fl_tag_idx(struct adapter *, struct sge_fl *, int); static void add_fl_to_sfl(struct adapter *, struct sge_fl *); static int get_pkt_sgl(struct sge_txq *, struct mbuf **, struct sgl *, int); @@ -202,27 +220,20 @@ extern u_int cpu_clflush_line_size; #endif /* - * Called on MOD_LOAD. Fills up fl_buf_info[] and validates/calculates the SGE - * tunables. + * Called on MOD_LOAD. Validates and calculates the SGE tunables. */ void t4_sge_modload(void) { - int i; - int bufsize[FL_BUF_SIZES] = { - MCLBYTES, -#if MJUMPAGESIZE != MCLBYTES - MJUMPAGESIZE, -#endif - MJUM9BYTES, - MJUM16BYTES - }; + int pad; - for (i = 0; i < FL_BUF_SIZES; i++) { - FL_BUF_SIZE(i) = bufsize[i]; - FL_BUF_TYPE(i) = m_gettype(bufsize[i]); - FL_BUF_ZONE(i) = m_getzone(bufsize[i]); - } + /* set pad to a reasonable powerof2 between 16 and 4096 (inclusive) */ +#if defined(__i386__) || defined(__amd64__) + pad = max(cpu_clflush_line_size, 16); +#else + pad = max(CACHE_LINE_SIZE, 16); +#endif + pad = min(pad, 4096); if (fl_pktshift < 0 || fl_pktshift > 7) { printf("Invalid hw.cxgbe.fl_pktshift value (%d)," @@ -230,23 +241,35 @@ t4_sge_modload(void) fl_pktshift = 2; } - if (fl_pad < 32 || fl_pad > 4096 || !powerof2(fl_pad)) { - int pad; - -#if defined(__i386__) || defined(__amd64__) - pad = max(cpu_clflush_line_size, 32); -#else - pad = max(CACHE_LINE_SIZE, 32); -#endif - pad = min(pad, 4096); + if (fl_pad != 0 && + (fl_pad < 32 || fl_pad > 4096 || !powerof2(fl_pad))) { if (fl_pad != -1) { printf("Invalid hw.cxgbe.fl_pad value (%d)," - " using %d instead.\n", fl_pad, pad); + " using %d instead.\n", fl_pad, max(pad, 32)); } - fl_pad = pad; + fl_pad = max(pad, 32); } + /* + * T4 has the same pad and pack boundary. If a pad boundary is set, + * pack boundary must be set to the same value. Otherwise take the + * specified value or auto-calculate something reasonable. + */ + if (fl_pad) + t4_fl_pack = fl_pad; + else if (fl_pack < 32 || fl_pack > 4096 || !powerof2(fl_pack)) + t4_fl_pack = max(pad, 32); + else + t4_fl_pack = fl_pack; + + /* T5's pack boundary is independent of the pad boundary. */ + if (fl_pack < 16 || fl_pack == 32 || fl_pack > 4096 || + !powerof2(fl_pack)) + t5_fl_pack = max(pad, 64); + else + t5_fl_pack = fl_pack; + if (spg_len != 64 && spg_len != 128) { int len; @@ -292,17 +315,41 @@ t4_tweak_chip_settings(struct adapter *s 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); + int sw_flbuf_sizes[] = { + MCLBYTES, +#if MJUMPAGESIZE != MCLBYTES + MJUMPAGESIZE, +#endif + MJUM9BYTES, + MJUM16BYTES, + MJUMPAGESIZE - MSIZE + }; KASSERT(sc->flags & MASTER_PF, ("%s: trying to change chip settings when not master.", __func__)); - m = V_PKTSHIFT(M_PKTSHIFT) | F_RXPKTCPLMODE | - V_INGPADBOUNDARY(M_INGPADBOUNDARY) | F_EGRSTATUSPAGESIZE; + m = V_PKTSHIFT(M_PKTSHIFT) | F_RXPKTCPLMODE | F_EGRSTATUSPAGESIZE; v = V_PKTSHIFT(fl_pktshift) | F_RXPKTCPLMODE | - V_INGPADBOUNDARY(ilog2(fl_pad) - 5) | V_EGRSTATUSPAGESIZE(spg_len == 128); + if (is_t4(sc) && (fl_pad || buffer_packing)) { + /* t4_fl_pack has the correct value even when fl_pad = 0 */ + m |= V_INGPADBOUNDARY(M_INGPADBOUNDARY); + v |= V_INGPADBOUNDARY(ilog2(t4_fl_pack) - 5); + } else if (is_t5(sc) && fl_pad) { + m |= V_INGPADBOUNDARY(M_INGPADBOUNDARY); + v |= V_INGPADBOUNDARY(ilog2(fl_pad) - 5); + } t4_set_reg_field(sc, A_SGE_CONTROL, m, v); + if (is_t5(sc) && buffer_packing) { + m = V_INGPACKBOUNDARY(M_INGPACKBOUNDARY); + if (t5_fl_pack == 16) + v = V_INGPACKBOUNDARY(0); + else + v = V_INGPACKBOUNDARY(ilog2(t5_fl_pack) - 5); + t4_set_reg_field(sc, A_SGE_CONTROL2, m, v); + } + v = V_HOSTPAGESIZEPF0(PAGE_SHIFT - 10) | V_HOSTPAGESIZEPF1(PAGE_SHIFT - 10) | V_HOSTPAGESIZEPF2(PAGE_SHIFT - 10) | @@ -313,9 +360,9 @@ t4_tweak_chip_settings(struct adapter *s V_HOSTPAGESIZEPF7(PAGE_SHIFT - 10); t4_write_reg(sc, A_SGE_HOST_PAGE_SIZE, v); - for (i = 0; i < FL_BUF_SIZES; i++) { + for (i = 0; i < min(nitems(sw_flbuf_sizes), 16); i++) { t4_write_reg(sc, A_SGE_FL_BUFFER_SIZE0 + (4 * i), - FL_BUF_SIZE(i)); + sw_flbuf_sizes[i]); } v = V_THRESHOLD_0(intr_pktcount[0]) | V_THRESHOLD_1(intr_pktcount[1]) | @@ -376,21 +423,48 @@ int t4_read_chip_settings(struct adapter *sc) { struct sge *s = &sc->sge; - int i, rc = 0; + int i, j, n, rc = 0; uint32_t m, v, r; uint16_t indsz = min(RX_COPY_THRESHOLD - 1, M_INDICATESIZE); + uint32_t sge_flbuf_sizes[16], sw_flbuf_sizes[] = { + MCLBYTES, +#if MJUMPAGESIZE != MCLBYTES + MJUMPAGESIZE, +#endif + MJUM9BYTES, + MJUM16BYTES + }; - m = V_PKTSHIFT(M_PKTSHIFT) | F_RXPKTCPLMODE | - V_INGPADBOUNDARY(M_INGPADBOUNDARY) | F_EGRSTATUSPAGESIZE; + m = V_PKTSHIFT(M_PKTSHIFT) | F_RXPKTCPLMODE | F_EGRSTATUSPAGESIZE; v = V_PKTSHIFT(fl_pktshift) | F_RXPKTCPLMODE | - V_INGPADBOUNDARY(ilog2(fl_pad) - 5) | V_EGRSTATUSPAGESIZE(spg_len == 128); + if (is_t4(sc) && (fl_pad || buffer_packing)) { + m |= V_INGPADBOUNDARY(M_INGPADBOUNDARY); + v |= V_INGPADBOUNDARY(ilog2(t4_fl_pack) - 5); + } else if (is_t5(sc) && fl_pad) { + m |= V_INGPADBOUNDARY(M_INGPADBOUNDARY); + v |= V_INGPADBOUNDARY(ilog2(fl_pad) - 5); + } r = t4_read_reg(sc, A_SGE_CONTROL); if ((r & m) != v) { device_printf(sc->dev, "invalid SGE_CONTROL(0x%x)\n", r); rc = EINVAL; } + if (is_t5(sc) && buffer_packing) { + m = V_INGPACKBOUNDARY(M_INGPACKBOUNDARY); + if (t5_fl_pack == 16) + v = V_INGPACKBOUNDARY(0); + else + v = V_INGPACKBOUNDARY(ilog2(t5_fl_pack) - 5); + r = t4_read_reg(sc, A_SGE_CONTROL2); + if ((r & m) != v) { + device_printf(sc->dev, + "invalid SGE_CONTROL2(0x%x)\n", r); + rc = EINVAL; + } + } + v = V_HOSTPAGESIZEPF0(PAGE_SHIFT - 10) | V_HOSTPAGESIZEPF1(PAGE_SHIFT - 10) | V_HOSTPAGESIZEPF2(PAGE_SHIFT - 10) | @@ -405,14 +479,45 @@ t4_read_chip_settings(struct adapter *sc rc = EINVAL; } - for (i = 0; i < FL_BUF_SIZES; i++) { - v = t4_read_reg(sc, A_SGE_FL_BUFFER_SIZE0 + (4 * i)); - if (v != FL_BUF_SIZE(i)) { - device_printf(sc->dev, - "invalid SGE_FL_BUFFER_SIZE[%d](0x%x)\n", i, v); - rc = EINVAL; + /* + * Make a list of SGE FL buffer sizes programmed in the chip and tally + * it with the FL buffer sizes that we'd like to use. + */ + n = 0; + for (i = 0; i < nitems(sge_flbuf_sizes); i++) { + r = t4_read_reg(sc, A_SGE_FL_BUFFER_SIZE0 + (4 * i)); + sge_flbuf_sizes[i] = r; + if (r == MJUMPAGESIZE - MSIZE && + (sc->flags & BUF_PACKING_OK) == 0) { + sc->flags |= BUF_PACKING_OK; + FL_BUF_HWTAG(sc, n) = i; + FL_BUF_SIZE(sc, n) = MJUMPAGESIZE - MSIZE; + FL_BUF_TYPE(sc, n) = m_gettype(MJUMPAGESIZE); + FL_BUF_ZONE(sc, n) = m_getzone(MJUMPAGESIZE); + n++; + } + } + for (i = 0; i < nitems(sw_flbuf_sizes); i++) { + for (j = 0; j < nitems(sge_flbuf_sizes); j++) { + if (sw_flbuf_sizes[i] != sge_flbuf_sizes[j]) + continue; + FL_BUF_HWTAG(sc, n) = j; + FL_BUF_SIZE(sc, n) = sw_flbuf_sizes[i]; + FL_BUF_TYPE(sc, n) = m_gettype(sw_flbuf_sizes[i]); + FL_BUF_ZONE(sc, n) = m_getzone(sw_flbuf_sizes[i]); + n++; + break; } } + if (n == 0) { + device_printf(sc->dev, "no usable SGE FL buffer size.\n"); + rc = EINVAL; + } else if (n == 1 && (sc->flags & BUF_PACKING_OK)) { + device_printf(sc->dev, + "no usable SGE FL buffer size when not packing buffers.\n"); + rc = EINVAL; + } + FL_BUF_SIZES(sc) = n; r = t4_read_reg(sc, A_SGE_INGRESS_RX_THRESHOLD); s->counter_val[0] = G_THRESHOLD_0(r); @@ -515,6 +620,14 @@ t4_sge_sysctls(struct adapter *sc, struc SYSCTL_ADD_INT(ctx, children, OID_AUTO, "cong_drop", CTLFLAG_RD, NULL, cong_drop, "congestion drop setting"); + + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "buffer_packing", CTLFLAG_RD, + NULL, sc->flags & BUF_PACKING_OK ? 1 : 0, + "pack multiple frames in one fl buffer"); + + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "fl_pack", CTLFLAG_RD, + NULL, is_t5(sc) ? t5_fl_pack : t4_fl_pack, + "payload pack boundary (bytes)"); } int @@ -706,7 +819,7 @@ t4_setup_port_queues(struct port_info *p struct ifnet *ifp = pi->ifp; struct sysctl_oid *oid = device_get_sysctl_tree(pi->dev); struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid); - int bufsize; + int bufsize, pack; oid = SYSCTL_ADD_NODE(&pi->ctx, children, OID_AUTO, "rxq", CTLFLAG_RD, NULL, "rx queues"); @@ -728,6 +841,12 @@ t4_setup_port_queues(struct port_info *p * b) allocate queue iff it will take direct interrupts. */ bufsize = mtu_to_bufsize(ifp->if_mtu); + if (sc->flags & BUF_PACKING_OK && + ((is_t5(sc) && buffer_packing) || /* 1 or -1 both ok for T5 */ + (is_t4(sc) && buffer_packing == 1))) + pack = 1; + else + pack = 0; for_each_rxq(pi, i, rxq) { init_iq(&rxq->iq, sc, pi->tmr_idx, pi->pktc_idx, pi->qsize_rxq, @@ -735,7 +854,7 @@ t4_setup_port_queues(struct port_info *p snprintf(name, sizeof(name), "%s rxq%d-fl", device_get_nameunit(pi->dev), i); - init_fl(&rxq->fl, pi->qsize_rxq / 8, bufsize, name); + init_fl(sc, &rxq->fl, pi->qsize_rxq / 8, bufsize, pack, name); if (sc->flags & INTR_DIRECT #ifdef TCP_OFFLOAD @@ -752,6 +871,7 @@ t4_setup_port_queues(struct port_info *p #ifdef TCP_OFFLOAD bufsize = mtu_to_bufsize_toe(sc, ifp->if_mtu); + pack = 0; /* XXX: think about this some more */ for_each_ofld_rxq(pi, i, ofld_rxq) { init_iq(&ofld_rxq->iq, sc, pi->tmr_idx, pi->pktc_idx, @@ -759,7 +879,8 @@ t4_setup_port_queues(struct port_info *p snprintf(name, sizeof(name), "%s ofld_rxq%d-fl", device_get_nameunit(pi->dev), i); - init_fl(&ofld_rxq->fl, pi->qsize_rxq / 8, bufsize, name); + init_fl(sc, &ofld_rxq->fl, pi->qsize_rxq / 8, bufsize, pack, + name); if (sc->flags & INTR_DIRECT || (sc->intr_count > 1 && pi->nofldrxq > pi->nrxq)) { @@ -1036,7 +1157,12 @@ service_iq(struct sge_iq *iq, int budget ("%s: data for an iq (%p) with no freelist", __func__, iq)); - m0 = get_fl_payload(sc, fl, lq, &fl_bufs_used); + m0 = fl->flags & FL_BUF_PACKING ? + get_fl_payload1(sc, fl, lq, &fl_bufs_used) : + get_fl_payload2(sc, fl, lq, &fl_bufs_used); + + if (__predict_false(m0 == NULL)) + goto process_iql; #ifdef T4_PKT_TIMESTAMP /* * 60 bit timestamp for the payload is @@ -1136,6 +1262,7 @@ service_iq(struct sge_iq *iq, int budget } } +process_iql: if (STAILQ_EMPTY(&iql)) break; @@ -1181,13 +1308,102 @@ service_iq(struct sge_iq *iq, int budget return (0); } +static int +fill_mbuf_stash(struct sge_fl *fl) +{ + int i; + + for (i = 0; i < nitems(fl->mstash); i++) { + if (fl->mstash[i] == NULL) { + struct mbuf *m; + if ((m = m_get(M_NOWAIT, MT_NOINIT)) == NULL) + return (ENOBUFS); + fl->mstash[i] = m; + } + } + return (0); +} + +static struct mbuf * +get_mbuf_from_stash(struct sge_fl *fl) +{ + int i; + + for (i = 0; i < nitems(fl->mstash); i++) { + if (fl->mstash[i] != NULL) { + struct mbuf *m; + + m = fl->mstash[i]; + fl->mstash[i] = NULL; + return (m); + } else + fl->mstash[i] = m_get(M_NOWAIT, MT_NOINIT); + } + + return (m_get(M_NOWAIT, MT_NOINIT)); +} + +static void +return_mbuf_to_stash(struct sge_fl *fl, struct mbuf *m) +{ + int i; + + if (m == NULL) + return; + + for (i = 0; i < nitems(fl->mstash); i++) { + if (fl->mstash[i] == NULL) { + fl->mstash[i] = m; + return; + } + } + m_init(m, NULL, 0, M_NOWAIT, MT_DATA, 0); + m_free(m); +} + +/* buf can be any address within the buffer */ +static inline u_int * +find_buf_refcnt(caddr_t buf) +{ + uintptr_t ptr = (uintptr_t)buf; + + return ((u_int *)((ptr & ~(MJUMPAGESIZE - 1)) + MSIZE - sizeof(u_int))); +} + +static inline struct mbuf * +find_buf_mbuf(caddr_t buf) +{ + uintptr_t ptr = (uintptr_t)buf; + + return ((struct mbuf *)(ptr & ~(MJUMPAGESIZE - 1))); +} + +static int +rxb_free(struct mbuf *m, void *arg1, void *arg2) +{ + uma_zone_t zone = arg1; + caddr_t cl = arg2; +#ifdef INVARIANTS + u_int refcount; + + refcount = *find_buf_refcnt(cl); + KASSERT(refcount == 0, ("%s: cl %p refcount is %u", __func__, + cl - MSIZE, refcount)); +#endif + cl -= MSIZE; + uma_zfree(zone, cl); + + return (EXT_FREE_OK); +} + static struct mbuf * -get_fl_payload(struct adapter *sc, struct sge_fl *fl, uint32_t len_newbuf, +get_fl_payload1(struct adapter *sc, struct sge_fl *fl, uint32_t len_newbuf, int *fl_bufs_used) { struct mbuf *m0, *m; struct fl_sdesc *sd = &fl->sdesc[fl->cidx]; unsigned int nbuf, len; + int pack_boundary = is_t4(sc) ? t4_fl_pack : t5_fl_pack; /* * No assertion for the fl lock because we don't need it. This routine @@ -1198,29 +1414,194 @@ get_fl_payload(struct adapter *sc, struc * lock but this routine does not). */ + KASSERT(fl->flags & FL_BUF_PACKING, + ("%s: buffer packing disabled for fl %p", __func__, fl)); + + len = G_RSPD_LEN(len_newbuf); + + if ((len_newbuf & F_RSPD_NEWBUF) == 0) { + KASSERT(fl->rx_offset > 0, + ("%s: packed frame but driver at offset=0", __func__)); + + /* A packed frame is guaranteed to fit entirely in this buf. */ + KASSERT(FL_BUF_SIZE(sc, sd->tag_idx) - fl->rx_offset >= len, + ("%s: packing error. bufsz=%u, offset=%u, len=%u", + __func__, FL_BUF_SIZE(sc, sd->tag_idx), fl->rx_offset, + len)); + + m0 = get_mbuf_from_stash(fl); + if (m0 == NULL || + m_init(m0, NULL, 0, M_NOWAIT, MT_DATA, M_PKTHDR) != 0) { + return_mbuf_to_stash(fl, m0); + return (NULL); + } + + bus_dmamap_sync(fl->tag[sd->tag_idx], sd->map, + BUS_DMASYNC_POSTREAD); + if (len < RX_COPY_THRESHOLD) { +#ifdef T4_PKT_TIMESTAMP + /* Leave room for a timestamp */ + m0->m_data += 8; +#endif + bcopy(sd->cl + fl->rx_offset, mtod(m0, caddr_t), len); + m0->m_pkthdr.len = len; + m0->m_len = len; + } else { + m0->m_pkthdr.len = len; + m0->m_len = len; + m_extaddref(m0, sd->cl + fl->rx_offset, + roundup2(m0->m_len, fl_pad), + find_buf_refcnt(sd->cl), rxb_free, + FL_BUF_ZONE(sc, sd->tag_idx), sd->cl); + } + fl->rx_offset += len; + fl->rx_offset = roundup2(fl->rx_offset, fl_pad); + fl->rx_offset = roundup2(fl->rx_offset, pack_boundary); + if (fl->rx_offset >= FL_BUF_SIZE(sc, sd->tag_idx)) { + fl->rx_offset = 0; + (*fl_bufs_used) += 1; + if (__predict_false(++fl->cidx == fl->cap)) + fl->cidx = 0; + } + + return (m0); + } + + KASSERT(len_newbuf & F_RSPD_NEWBUF, + ("%s: only new buffer handled here", __func__)); + + nbuf = 0; + + /* + * Move to the start of the next buffer if we are still in the middle of + * some buffer. This is the case where there was some room left in the + * previous buffer but not enough to fit this frame in its entirety. + */ + if (fl->rx_offset > 0) { + KASSERT(roundup2(len, fl_pad) > FL_BUF_SIZE(sc, sd->tag_idx) - + fl->rx_offset, ("%s: frame (%u bytes) should have fit at " + "cidx %u offset %u bufsize %u", __func__, len, fl->cidx, + fl->rx_offset, FL_BUF_SIZE(sc, sd->tag_idx))); + nbuf++; + fl->rx_offset = 0; + sd++; + if (__predict_false(++fl->cidx == fl->cap)) { + sd = fl->sdesc; + fl->cidx = 0; + } + } + + m0 = find_buf_mbuf(sd->cl); + if (m_init(m0, NULL, 0, M_NOWAIT, MT_DATA, M_PKTHDR | M_NOFREE)) + goto done; + bus_dmamap_sync(fl->tag[sd->tag_idx], sd->map, BUS_DMASYNC_POSTREAD); + m0->m_len = min(len, FL_BUF_SIZE(sc, sd->tag_idx)); + m_extaddref(m0, sd->cl, roundup2(m0->m_len, fl_pad), + find_buf_refcnt(sd->cl), rxb_free, FL_BUF_ZONE(sc, sd->tag_idx), + sd->cl); + m0->m_pkthdr.len = len; + + fl->rx_offset = roundup2(m0->m_len, fl_pad); + fl->rx_offset = roundup2(fl->rx_offset, pack_boundary); + if (fl->rx_offset >= FL_BUF_SIZE(sc, sd->tag_idx)) { + fl->rx_offset = 0; + nbuf++; + sd++; + if (__predict_false(++fl->cidx == fl->cap)) { + sd = fl->sdesc; + fl->cidx = 0; + } + } + + m = m0; + len -= m->m_len; + + while (len > 0) { + m->m_next = find_buf_mbuf(sd->cl); + m = m->m_next; + + bus_dmamap_sync(fl->tag[sd->tag_idx], sd->map, + BUS_DMASYNC_POSTREAD); + + /* m_init for !M_PKTHDR can't fail so don't bother */ + m_init(m, NULL, 0, M_NOWAIT, MT_DATA, M_NOFREE); + m->m_len = min(len, FL_BUF_SIZE(sc, sd->tag_idx)); + m_extaddref(m, sd->cl, roundup2(m->m_len, fl_pad), + find_buf_refcnt(sd->cl), rxb_free, + FL_BUF_ZONE(sc, sd->tag_idx), sd->cl); + + fl->rx_offset = roundup2(m->m_len, fl_pad); + fl->rx_offset = roundup2(fl->rx_offset, pack_boundary); + if (fl->rx_offset >= FL_BUF_SIZE(sc, sd->tag_idx)) { + fl->rx_offset = 0; + nbuf++; + sd++; + if (__predict_false(++fl->cidx == fl->cap)) { + sd = fl->sdesc; + fl->cidx = 0; + } + } + + len -= m->m_len; + } +done: + (*fl_bufs_used) += nbuf; + return (m0); +} + +static struct mbuf * +get_fl_payload2(struct adapter *sc, struct sge_fl *fl, uint32_t len_newbuf, + int *fl_bufs_used) +{ + struct mbuf *m0, *m; + struct fl_sdesc *sd = &fl->sdesc[fl->cidx]; + unsigned int nbuf, len; + + /* + * No assertion for the fl lock because we don't need it. This routine + * is called only from the rx interrupt handler and it only updates + * fl->cidx. (Contrast that with fl->pidx/fl->needed which could be + * updated in the rx interrupt handler or the starvation helper routine. + * That's why code that manipulates fl->pidx/fl->needed needs the fl + * lock but this routine does not). + */ + + KASSERT((fl->flags & FL_BUF_PACKING) == 0, + ("%s: buffer packing enabled for fl %p", __func__, fl)); if (__predict_false((len_newbuf & F_RSPD_NEWBUF) == 0)) panic("%s: cannot handle packed frames", __func__); len = G_RSPD_LEN(len_newbuf); - m0 = sd->m; - sd->m = NULL; /* consumed */ + /* + * We never want to run out of mbufs in between a frame when a frame + * spans multiple fl buffers. If the fl's mbuf stash isn't full and + * can't be filled up to the brim then fail early. + */ + if (len > FL_BUF_SIZE(sc, sd->tag_idx) && fill_mbuf_stash(fl) != 0) + return (NULL); + + m0 = get_mbuf_from_stash(fl); + if (m0 == NULL || + m_init(m0, NULL, 0, M_NOWAIT, MT_DATA, M_PKTHDR) != 0) { + return_mbuf_to_stash(fl, m0); + return (NULL); + } bus_dmamap_sync(fl->tag[sd->tag_idx], sd->map, BUS_DMASYNC_POSTREAD); - m_init(m0, NULL, 0, M_NOWAIT, MT_DATA, M_PKTHDR); -#ifdef T4_PKT_TIMESTAMP - /* Leave room for a timestamp */ - m0->m_data += 8; -#endif if (len < RX_COPY_THRESHOLD) { +#ifdef T4_PKT_TIMESTAMP + /* Leave room for a timestamp */ + m0->m_data += 8; +#endif /* copy data to mbuf, buffer will be recycled */ bcopy(sd->cl, mtod(m0, caddr_t), len); m0->m_len = len; } else { bus_dmamap_unload(fl->tag[sd->tag_idx], sd->map); - m_cljset(m0, sd->cl, FL_BUF_TYPE(sd->tag_idx)); + m_cljset(m0, sd->cl, FL_BUF_TYPE(sc, sd->tag_idx)); sd->cl = NULL; /* consumed */ - m0->m_len = min(len, FL_BUF_SIZE(sd->tag_idx)); + m0->m_len = min(len, FL_BUF_SIZE(sc, sd->tag_idx)); } m0->m_pkthdr.len = len; @@ -1235,23 +1616,23 @@ get_fl_payload(struct adapter *sc, struc nbuf = 1; /* # of fl buffers used */ while (len > 0) { - m->m_next = sd->m; - sd->m = NULL; /* consumed */ + /* Can't fail, we checked earlier that the stash was full. */ + m->m_next = get_mbuf_from_stash(fl); m = m->m_next; bus_dmamap_sync(fl->tag[sd->tag_idx], sd->map, BUS_DMASYNC_POSTREAD); + /* m_init for !M_PKTHDR can't fail so don't bother */ m_init(m, NULL, 0, M_NOWAIT, MT_DATA, 0); if (len <= MLEN) { bcopy(sd->cl, mtod(m, caddr_t), len); m->m_len = len; } else { - bus_dmamap_unload(fl->tag[sd->tag_idx], - sd->map); - m_cljset(m, sd->cl, FL_BUF_TYPE(sd->tag_idx)); + bus_dmamap_unload(fl->tag[sd->tag_idx], sd->map); + m_cljset(m, sd->cl, FL_BUF_TYPE(sc, sd->tag_idx)); sd->cl = NULL; /* consumed */ - m->m_len = min(len, FL_BUF_SIZE(sd->tag_idx)); + m->m_len = min(len, FL_BUF_SIZE(sc, sd->tag_idx)); } sd++; @@ -1616,6 +1997,7 @@ void t4_update_fl_bufsize(struct ifnet *ifp) { struct port_info *pi = ifp->if_softc; + struct adapter *sc = pi->adapter; struct sge_rxq *rxq; #ifdef TCP_OFFLOAD struct sge_ofld_rxq *ofld_rxq; @@ -1628,7 +2010,7 @@ t4_update_fl_bufsize(struct ifnet *ifp) fl = &rxq->fl; FL_LOCK(fl); - set_fl_tag_idx(fl, bufsize); + set_fl_tag_idx(sc, fl, bufsize); FL_UNLOCK(fl); } #ifdef TCP_OFFLOAD @@ -1637,7 +2019,7 @@ t4_update_fl_bufsize(struct ifnet *ifp) fl = &ofld_rxq->fl; FL_LOCK(fl); - set_fl_tag_idx(fl, bufsize); + set_fl_tag_idx(sc, fl, bufsize); FL_UNLOCK(fl); } #endif @@ -1671,11 +2053,15 @@ init_iq(struct sge_iq *iq, struct adapte } static inline void -init_fl(struct sge_fl *fl, int qsize, int bufsize, char *name) +init_fl(struct adapter *sc, struct sge_fl *fl, int qsize, int bufsize, int pack, + char *name) { + fl->qsize = qsize; strlcpy(fl->lockname, name, sizeof(fl->lockname)); - set_fl_tag_idx(fl, bufsize); + if (pack) + fl->flags |= FL_BUF_PACKING; + set_fl_tag_idx(sc, fl, bufsize); } static inline void @@ -1804,7 +2190,7 @@ alloc_iq_fl(struct port_info *pi, struct if (fl) { mtx_init(&fl->fl_lock, fl->lockname, NULL, MTX_DEF); - for (i = 0; i < FL_BUF_SIZES; i++) { + for (i = 0; i < FL_BUF_SIZES(sc); i++) { /* * A freelist buffer must be 16 byte aligned as the SGE @@ -1813,8 +2199,8 @@ alloc_iq_fl(struct port_info *pi, struct */ rc = bus_dma_tag_create(sc->dmat, 16, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, - FL_BUF_SIZE(i), 1, FL_BUF_SIZE(i), BUS_DMA_ALLOCNOW, - NULL, NULL, &fl->tag[i]); + FL_BUF_SIZE(sc, i), 1, FL_BUF_SIZE(sc, i), + BUS_DMA_ALLOCNOW, NULL, NULL, &fl->tag[i]); if (rc != 0) { device_printf(sc->dev, "failed to create fl DMA tag[%d]: %d\n", @@ -1843,7 +2229,9 @@ alloc_iq_fl(struct port_info *pi, struct c.iqns_to_fl0congen |= htobe32(V_FW_IQ_CMD_FL0HOSTFCMODE(X_HOSTFCMODE_NONE) | F_FW_IQ_CMD_FL0FETCHRO | F_FW_IQ_CMD_FL0DATARO | - F_FW_IQ_CMD_FL0PADEN); + (fl_pad ? F_FW_IQ_CMD_FL0PADEN : 0) | + (fl->flags & FL_BUF_PACKING ? F_FW_IQ_CMD_FL0PACKEN : + 0)); if (cong >= 0) { c.iqns_to_fl0congen |= htobe32(V_FW_IQ_CMD_FL0CNGCHMAP(cong) | @@ -1964,12 +2352,21 @@ free_iq_fl(struct port_info *pi, struct fl->desc); if (fl->sdesc) - free_fl_sdesc(fl); + free_fl_sdesc(sc, fl); + + for (i = 0; i < nitems(fl->mstash); i++) { + struct mbuf *m = fl->mstash[i]; + + if (m != NULL) { + m_init(m, NULL, 0, M_NOWAIT, MT_DATA, 0); + m_free(m); + } + } if (mtx_initialized(&fl->fl_lock)) mtx_destroy(&fl->fl_lock); - for (i = 0; i < FL_BUF_SIZES; i++) { + for (i = 0; i < FL_BUF_SIZES(sc); i++) { if (fl->tag[i]) bus_dma_tag_destroy(fl->tag[i]); } @@ -2130,6 +2527,10 @@ alloc_rxq(struct port_info *pi, struct s "SGE context id of the queue"); SYSCTL_ADD_UINT(&pi->ctx, children, OID_AUTO, "cidx", CTLFLAG_RD, &rxq->fl.cidx, 0, "consumer index"); + if (rxq->fl.flags & FL_BUF_PACKING) { + SYSCTL_ADD_UINT(&pi->ctx, children, OID_AUTO, "rx_offset", + CTLFLAG_RD, &rxq->fl.rx_offset, 0, "packing rx offset"); + } SYSCTL_ADD_UINT(&pi->ctx, children, OID_AUTO, "pidx", CTLFLAG_RD, &rxq->fl.pidx, 0, "producer index"); @@ -2691,6 +3092,12 @@ refill_fl(struct adapter *sc, struct sge int rc; FL_LOCK_ASSERT_OWNED(fl); +#ifdef INVARIANTS + if (fl->flags & FL_BUF_PACKING) + KASSERT(sd->tag_idx == 0, + ("%s: expected tag 0 but found tag %d at pidx %u instead", + __func__, sd->tag_idx, fl->pidx)); +#endif if (nbufs > fl->needed) nbufs = fl->needed; @@ -2699,24 +3106,34 @@ refill_fl(struct adapter *sc, struct sge if (sd->cl != NULL) { - /* - * This happens when a frame small enough to fit - * entirely in an mbuf was received in cl last time. - * We'd held on to cl and can reuse it now. Note that - * we reuse a cluster of the old size if fl->tag_idx is - * no longer the same as sd->tag_idx. - */ - - KASSERT(*d == sd->ba_tag, + KASSERT(*d == sd->ba_hwtag, ("%s: recyling problem at pidx %d", __func__, fl->pidx)); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 01:46:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D9EE4ADE; Fri, 30 Aug 2013 01:46:56 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C71742992; Fri, 30 Aug 2013 01:46:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7U1kufV053856; Fri, 30 Aug 2013 01:46:56 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7U1kun3053855; Fri, 30 Aug 2013 01:46:56 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201308300146.r7U1kun3053855@svn.freebsd.org> From: Colin Percival Date: Fri, 30 Aug 2013 01:46:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255051 - head/sys/dev/xen/blkfront X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 01:46:56 -0000 Author: cperciva Date: Fri Aug 30 01:46:56 2013 New Revision: 255051 URL: http://svnweb.freebsd.org/changeset/base/255051 Log: If reading a virtual-device value fails, attempt to read a virtual-device-ext value. Some hosts do not publish "extended" disk IDs via virtual-device in an attempt to avoid confusing old blkfront drivers, and without this change we failed to attach such disks. In particular, this commit allows all 24 ephemeral disks on EC2 hs1.8xlarge instances to be used, instead of only the first 15. MFC after: 3 days Modified: head/sys/dev/xen/blkfront/blkfront.c Modified: head/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- head/sys/dev/xen/blkfront/blkfront.c Fri Aug 30 01:45:36 2013 (r255050) +++ head/sys/dev/xen/blkfront/blkfront.c Fri Aug 30 01:46:56 2013 (r255051) @@ -1409,6 +1409,9 @@ xbd_attach(device_t dev) /* FIXME: Use dynamic device id if this is not set. */ error = xs_scanf(XST_NIL, xenbus_get_node(dev), "virtual-device", NULL, "%" PRIu32, &vdevice); + if (error) + error = xs_scanf(XST_NIL, xenbus_get_node(dev), + "virtual-device-ext", NULL, "%" PRIu32, &vdevice); if (error) { xenbus_dev_fatal(dev, error, "reading virtual-device"); device_printf(dev, "Couldn't determine virtual device.\n"); From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 02:13:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2DF976D7; Fri, 30 Aug 2013 02:13:37 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 19EA42AFF; Fri, 30 Aug 2013 02:13:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7U2DaWQ070192; Fri, 30 Aug 2013 02:13:36 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7U2Dai8070191; Fri, 30 Aug 2013 02:13:36 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201308300213.r7U2Dai8070191@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 30 Aug 2013 02:13:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255052 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 02:13:37 -0000 Author: np Date: Fri Aug 30 02:13:36 2013 New Revision: 255052 URL: http://svnweb.freebsd.org/changeset/base/255052 Log: Fix the sysctl that displays whether buffer packing is enabled or not. Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Fri Aug 30 01:46:56 2013 (r255051) +++ head/sys/dev/cxgbe/t4_sge.c Fri Aug 30 02:13:36 2013 (r255052) @@ -604,6 +604,17 @@ t4_create_dma_tag(struct adapter *sc) return (rc); } +static inline int +enable_buffer_packing(struct adapter *sc) +{ + + if (sc->flags & BUF_PACKING_OK && + ((is_t5(sc) && buffer_packing) || /* 1 or -1 both ok for T5 */ + (is_t4(sc) && buffer_packing == 1))) + return (1); + return (0); +} + void t4_sge_sysctls(struct adapter *sc, struct sysctl_ctx_list *ctx, struct sysctl_oid_list *children) @@ -622,7 +633,7 @@ t4_sge_sysctls(struct adapter *sc, struc NULL, cong_drop, "congestion drop setting"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "buffer_packing", CTLFLAG_RD, - NULL, sc->flags & BUF_PACKING_OK ? 1 : 0, + NULL, enable_buffer_packing(sc), "pack multiple frames in one fl buffer"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "fl_pack", CTLFLAG_RD, @@ -841,12 +852,7 @@ t4_setup_port_queues(struct port_info *p * b) allocate queue iff it will take direct interrupts. */ bufsize = mtu_to_bufsize(ifp->if_mtu); - if (sc->flags & BUF_PACKING_OK && - ((is_t5(sc) && buffer_packing) || /* 1 or -1 both ok for T5 */ - (is_t4(sc) && buffer_packing == 1))) - pack = 1; - else - pack = 0; + pack = enable_buffer_packing(sc); for_each_rxq(pi, i, rxq) { init_iq(&rxq->iq, sc, pi->tmr_idx, pi->pktc_idx, pi->qsize_rxq, From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 05:36:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 906FA932; Fri, 30 Aug 2013 05:36:30 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7DE4A25AC; Fri, 30 Aug 2013 05:36:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7U5aULt081572; Fri, 30 Aug 2013 05:36:30 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7U5aUJ0081571; Fri, 30 Aug 2013 05:36:30 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201308300536.r7U5aUJ0081571@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 30 Aug 2013 05:36:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255054 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 05:36:30 -0000 Author: marcel Date: Fri Aug 30 05:36:29 2013 New Revision: 255054 URL: http://svnweb.freebsd.org/changeset/base/255054 Log: MFC r253910: Add a tunable for the default timeout. Requested by: rodrigc@, delphij@ Modified: stable/9/sys/kern/vfs_mountroot.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_mountroot.c ============================================================================== --- stable/9/sys/kern/vfs_mountroot.c Fri Aug 30 03:48:16 2013 (r255053) +++ stable/9/sys/kern/vfs_mountroot.c Fri Aug 30 05:36:29 2013 (r255054) @@ -119,6 +119,7 @@ static int root_mount_complete; /* By default wait up to 3 seconds for devices to appear. */ static int root_mount_timeout = 3; +TUNABLE_INT("vfs.mountroot.timeout", &root_mount_timeout); struct root_hold_token * root_mount_hold(const char *identifier) From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 05:53:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 98B23BBC; Fri, 30 Aug 2013 05:53:01 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 781A026A1; Fri, 30 Aug 2013 05:53:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7U5r1Kg091063; Fri, 30 Aug 2013 05:53:01 GMT (envelope-from bryanv@svn.freebsd.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7U5r0U2091054; Fri, 30 Aug 2013 05:53:00 GMT (envelope-from bryanv@svn.freebsd.org) Message-Id: <201308300553.r7U5r0U2091054@svn.freebsd.org> From: Bryan Venteicher Date: Fri, 30 Aug 2013 05:53:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255055 - in head: share/man/man4 sys/dev/vmware/vmxnet3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 05:53:01 -0000 Author: bryanv Date: Fri Aug 30 05:53:00 2013 New Revision: 255055 URL: http://svnweb.freebsd.org/changeset/base/255055 Log: Few more minor if_vmx tweaks - Allow the Rx/Tx queue sizes to be configured by tunables - Bail out earlier if the Tx queue unlikely has enough free descriptors to hold the frame - Cleanup some of the offloading capabilities handling Modified: head/share/man/man4/vmx.4 head/sys/dev/vmware/vmxnet3/if_vmx.c head/sys/dev/vmware/vmxnet3/if_vmxvar.h Modified: head/share/man/man4/vmx.4 ============================================================================== --- head/share/man/man4/vmx.4 Fri Aug 30 05:36:29 2013 (r255054) +++ head/share/man/man4/vmx.4 Fri Aug 30 05:53:00 2013 (r255055) @@ -81,6 +81,25 @@ VMware Fusion 2.0 and newer .Pp For more information on configuring this device, see .Xr ifconfig 8 . +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va hw.vmx.txndesc +.It Va hw.vmx. Ns Ar X Ns Va .txndesc +.Pp +Number of transmit descriptors allocated by the driver. +The default value is 512. +The value must be a multiple of 32, and the maximum is 4096. +.It Va hw.vmx.rxndesc +.It Va hw.vmx. Ns Ar X Ns Va .rxndesc +.Pp +Number of receive descriptors per ring allocated by the driver. +The default value is 256. +The value must be a multiple of 32, and the maximum is 2048. +There are two rings so the actual usage is doubled. .Sh EXAMPLES The following entry must be added to the VMware configuration file to provide the @@ -104,7 +123,7 @@ The .Nm driver was ported from .Ox -by +and significantly rewritten by .An Bryan Venteicher Aq bryanv@freebsd.org . The .Ox Modified: head/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- head/sys/dev/vmware/vmxnet3/if_vmx.c Fri Aug 30 05:36:29 2013 (r255054) +++ head/sys/dev/vmware/vmxnet3/if_vmx.c Fri Aug 30 05:53:00 2013 (r255055) @@ -199,6 +199,8 @@ static int vmxnet3_dma_malloc(struct vmx bus_size_t, struct vmxnet3_dma_alloc *); static void vmxnet3_dma_free(struct vmxnet3_softc *, struct vmxnet3_dma_alloc *); +static int vmxnet3_tunable_int(struct vmxnet3_softc *, + const char *, int); typedef enum { VMXNET3_BARRIER_RD, @@ -208,6 +210,12 @@ typedef enum { static void vmxnet3_barrier(struct vmxnet3_softc *, vmxnet3_barrier_t); +/* Tunables. */ +static int vmxnet3_default_txndesc = VMXNET3_DEF_TX_NDESC; +TUNABLE_INT("hw.vmx.txndesc", &vmxnet3_default_txndesc); +static int vmxnet3_default_rxndesc = VMXNET3_DEF_RX_NDESC; +TUNABLE_INT("hw.vmx.rxndesc", &vmxnet3_default_rxndesc); + static device_method_t vmxnet3_methods[] = { /* Device interface. */ DEVMETHOD(device_probe, vmxnet3_probe), @@ -453,11 +461,28 @@ vmxnet3_check_version(struct vmxnet3_sof static void vmxnet3_initial_config(struct vmxnet3_softc *sc) { + int ndesc; + + /* + * BMV Much of the work is already done, but this driver does + * not support multiqueue yet. + */ + sc->vmx_ntxqueues = VMXNET3_TX_QUEUES; + sc->vmx_nrxqueues = VMXNET3_RX_QUEUES; - sc->vmx_ntxqueues = 1; - sc->vmx_nrxqueues = 1; - sc->vmx_ntxdescs = VMXNET3_MAX_TX_NDESC; - sc->vmx_nrxdescs = VMXNET3_MAX_RX_NDESC; + ndesc = vmxnet3_tunable_int(sc, "txd", vmxnet3_default_txndesc); + if (ndesc > VMXNET3_MAX_TX_NDESC || ndesc < VMXNET3_MIN_TX_NDESC) + ndesc = VMXNET3_DEF_TX_NDESC; + if (ndesc & VMXNET3_MASK_TX_NDESC) + ndesc &= ~VMXNET3_MASK_TX_NDESC; + sc->vmx_ntxdescs = ndesc; + + ndesc = vmxnet3_tunable_int(sc, "rxd", vmxnet3_default_rxndesc); + if (ndesc > VMXNET3_MAX_RX_NDESC || ndesc < VMXNET3_MIN_RX_NDESC) + ndesc = VMXNET3_DEF_RX_NDESC; + if (ndesc & VMXNET3_MASK_RX_NDESC) + ndesc &= ~VMXNET3_MASK_RX_NDESC; + sc->vmx_nrxdescs = ndesc; sc->vmx_max_rxsegs = VMXNET3_MAX_RX_SEGS; } @@ -1382,10 +1407,10 @@ vmxnet3_reinit_shared_data(struct vmxnet ds = sc->vmx_ds; ds->upt_features = 0; - if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) - ds->upt_features |= UPT1_F_VLAN; if (ifp->if_capenable & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) ds->upt_features |= UPT1_F_CSUM; + if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) + ds->upt_features |= UPT1_F_VLAN; if (ifp->if_capenable & IFCAP_LRO) ds->upt_features |= UPT1_F_LRO; @@ -1464,18 +1489,13 @@ vmxnet3_setup_interface(struct vmxnet3_s ifp->if_capabilities |= IFCAP_RXCSUM | IFCAP_TXCSUM; ifp->if_capabilities |= IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6; ifp->if_capabilities |= IFCAP_TSO4 | IFCAP_TSO6; - ifp->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING; - ifp->if_hwassist |= VMXNET3_CSUM_ALL_OFFLOAD; - + ifp->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING | + IFCAP_VLAN_HWCSUM; ifp->if_capenable = ifp->if_capabilities; - /* - * Capabilities after here are not enabled by default. - */ - - ifp->if_capabilities |= IFCAP_LRO; + /* These capabilities are not enabled by default. */ + ifp->if_capabilities |= IFCAP_LRO | IFCAP_VLAN_HWFILTER; - ifp->if_capabilities |= IFCAP_VLAN_HWFILTER; sc->vmx_vlan_attach = EVENTHANDLER_REGISTER(vlan_config, vmxnet3_register_vlan, sc, EVENTHANDLER_PRI_FIRST); sc->vmx_vlan_detach = EVENTHANDLER_REGISTER(vlan_config, @@ -2517,7 +2537,7 @@ vmxnet3_start_locked(struct ifnet *ifp) struct vmxnet3_txqueue *txq; struct vmxnet3_txring *txr; struct mbuf *m_head; - int tx; + int tx, avail; sc = ifp->if_softc; txq = &sc->vmx_txq[0]; @@ -2530,11 +2550,20 @@ vmxnet3_start_locked(struct ifnet *ifp) sc->vmx_link_active == 0) return; - while (VMXNET3_TXRING_AVAIL(txr) > 0) { + while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + if ((avail = VMXNET3_TXRING_AVAIL(txr)) < 2) + break; + IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) break; + /* Assume worse case if this mbuf is the head of a chain. */ + if (m_head->m_next != NULL && avail < VMXNET3_TX_MAXSEGS) { + IFQ_DRV_PREPEND(&ifp->if_snd, m_head); + break; + } + if (vmxnet3_txq_encap(txq, &m_head) != 0) { if (m_head != NULL) IFQ_DRV_PREPEND(&ifp->if_snd, m_head); @@ -2752,8 +2781,8 @@ vmxnet3_ioctl(struct ifnet *ifp, u_long ifp->if_capenable ^= IFCAP_TSO6; if (mask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6 | IFCAP_LRO | - IFCAP_VLAN_HWFILTER)) { - /* These Rx features require us to renegotiate. */ + IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWFILTER)) { + /* Changing these features requires us to reinit. */ reinit = 1; if (mask & IFCAP_RXCSUM) @@ -2762,6 +2791,8 @@ vmxnet3_ioctl(struct ifnet *ifp, u_long ifp->if_capenable ^= IFCAP_RXCSUM_IPV6; if (mask & IFCAP_LRO) ifp->if_capenable ^= IFCAP_LRO; + if (mask & IFCAP_VLAN_HWTAGGING) + ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; if (mask & IFCAP_VLAN_HWFILTER) ifp->if_capenable ^= IFCAP_VLAN_HWFILTER; } else @@ -2769,8 +2800,6 @@ vmxnet3_ioctl(struct ifnet *ifp, u_long if (mask & IFCAP_VLAN_HWTSO) ifp->if_capenable ^= IFCAP_VLAN_HWTSO; - if (mask & IFCAP_VLAN_HWTAGGING) - ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; if (reinit && (ifp->if_drv_flags & IFF_DRV_RUNNING)) { ifp->if_drv_flags &= ~IFF_DRV_RUNNING; @@ -3282,6 +3311,18 @@ vmxnet3_dma_free(struct vmxnet3_softc *s bzero(dma, sizeof(struct vmxnet3_dma_alloc)); } +static int +vmxnet3_tunable_int(struct vmxnet3_softc *sc, const char *knob, int def) +{ + char path[64]; + + snprintf(path, sizeof(path), + "hw.vmx.%d.%s", device_get_unit(sc->vmx_dev), knob); + TUNABLE_INT_FETCH(path, &def); + + return (def); +} + /* * Since this is a purely paravirtualized device, we do not have * to worry about DMA coherency. But at times, we must make sure Modified: head/sys/dev/vmware/vmxnet3/if_vmxvar.h ============================================================================== --- head/sys/dev/vmware/vmxnet3/if_vmxvar.h Fri Aug 30 05:36:29 2013 (r255054) +++ head/sys/dev/vmware/vmxnet3/if_vmxvar.h Fri Aug 30 05:53:00 2013 (r255055) @@ -42,10 +42,17 @@ struct vmxnet3_dma_alloc { #define VMXNET3_RXRINGS_PERQ 2 /* - * The maximum number of descriptors in each Rx/Tx ring. + * The number of descriptors in each Rx/Tx ring. */ -#define VMXNET3_MAX_TX_NDESC 512 -#define VMXNET3_MAX_RX_NDESC 256 +#define VMXNET3_DEF_TX_NDESC 512 +#define VMXNET3_MAX_TX_NDESC 4096 +#define VMXNET3_MIN_TX_NDESC 32 +#define VMXNET3_MASK_TX_NDESC 0x1F +#define VMXNET3_DEF_RX_NDESC 256 +#define VMXNET3_MAX_RX_NDESC 2048 +#define VMXNET3_MIN_RX_NDESC 32 +#define VMXNET3_MASK_RX_NDESC 0x1F + #define VMXNET3_MAX_TX_NCOMPDESC VMXNET3_MAX_TX_NDESC #define VMXNET3_MAX_RX_NCOMPDESC \ (VMXNET3_MAX_RX_NDESC * VMXNET3_RXRINGS_PERQ) From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 06:21:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C04351EE; Fri, 30 Aug 2013 06:21:01 +0000 (UTC) (envelope-from erwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 94F4D2861; Fri, 30 Aug 2013 06:21:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7U6L1G4007805; Fri, 30 Aug 2013 06:21:01 GMT (envelope-from erwin@svn.freebsd.org) Received: (from erwin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7U6L1aU007802; Fri, 30 Aug 2013 06:21:01 GMT (envelope-from erwin@svn.freebsd.org) Message-Id: <201308300621.r7U6L1aU007802@svn.freebsd.org> From: Erwin Lansing Date: Fri, 30 Aug 2013 06:21:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255056 - in head/usr.bin: dig host nslookup X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 06:21:01 -0000 Author: erwin Date: Fri Aug 30 06:21:00 2013 New Revision: 255056 URL: http://svnweb.freebsd.org/changeset/base/255056 Log: Reduce WARNS to 0 for dig, host, and nslookup to make them compile with the optional WITH_BIND_SIGCHASE. Submitted by: Andre Albsmeier Approved by: delphij (mentor, implicit) MFC after: 3 days Sponsored by: DK Hostmaster A/S Modified: head/usr.bin/dig/Makefile head/usr.bin/host/Makefile head/usr.bin/nslookup/Makefile Modified: head/usr.bin/dig/Makefile ============================================================================== --- head/usr.bin/dig/Makefile Fri Aug 30 05:53:00 2013 (r255055) +++ head/usr.bin/dig/Makefile Fri Aug 30 06:21:00 2013 (r255056) @@ -20,7 +20,7 @@ CFLAGS+= -DWITH_IDN -I/usr/local/include CFLAGS+= -L/usr/local/lib -lidnkit -R/usr/local/lib -liconv .endif -WARNS?= 1 +WARNS?= 0 DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD} LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD} Modified: head/usr.bin/host/Makefile ============================================================================== --- head/usr.bin/host/Makefile Fri Aug 30 05:53:00 2013 (r255055) +++ head/usr.bin/host/Makefile Fri Aug 30 06:21:00 2013 (r255056) @@ -15,7 +15,7 @@ SRCS+= dighost.c host.c CFLAGS+= -I${SRCDIR}/include CFLAGS+= -I${BIND_DIR}/lib/isc/${ISC_ATOMIC_ARCH}/include -WARNS?= 1 +WARNS?= 0 DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD} LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD} Modified: head/usr.bin/nslookup/Makefile ============================================================================== --- head/usr.bin/nslookup/Makefile Fri Aug 30 05:53:00 2013 (r255055) +++ head/usr.bin/nslookup/Makefile Fri Aug 30 06:21:00 2013 (r255056) @@ -18,7 +18,7 @@ CFLAGS+= -I${BIND_DIR}/lib/isc/${ISC_ATO DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD} ${LIBEDIT} LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD} ${LIBEDIT} -WARNS?= 1 +WARNS?= 0 MANFILTER= sed -e "s@^host \[server\]@\\\fBhost\\\fR \\\fI[server]\\\fR@" From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 06:21:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 399C132A; Fri, 30 Aug 2013 06:21:55 +0000 (UTC) (envelope-from erwin@mail.droso.net) Received: from mail.droso.net (koala.droso.dk [IPv6:2a01:4f8:a0:7163::2]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F1044286B; Fri, 30 Aug 2013 06:21:54 +0000 (UTC) Received: by mail.droso.net (Postfix, from userid 1001) id 0164374A3; Fri, 30 Aug 2013 08:21:52 +0200 (CEST) Date: Fri, 30 Aug 2013 08:21:52 +0200 From: Erwin Lansing To: Andre Albsmeier Subject: Re: svn commit: r254897 - in stable/9: contrib/bind9 contrib/bind9/bin contrib/bind9/bin/check contrib/bind9/bin/confgen contrib/bind9/bin/dig contrib/bind9/bin/dig/include/dig contrib/bind9/bin/dnssec... Message-ID: <20130830062152.GL83309@droso.dk> References: <201308260717.r7Q7HgMF073297@svn.freebsd.org> <20130829075631.GA96113@bali> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20130829075631.GA96113@bali> X-Operating-System: FreeBSD/amd64 9.1-RELEASE User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 06:21:55 -0000 Hi Andre, On Thu, Aug 29, 2013 at 09:56:31AM +0200, Andre Albsmeier wrote: > On Mon, 26-Aug-2013 at 07:17:42 +0000, Erwin Lansing wrote: > > Author: erwin > > Date: Mon Aug 26 07:17:41 2013 > > New Revision: 254897 > > URL: http://svnweb.freebsd.org/changeset/base/254897 > >=20 > > Log: > > MFC r254651: > > =20 > > Update Bind to 9.9.3-P2 >=20 > Thanks! >=20 > However, when enabling WITH_BIND_SIGCHASE in make.conf I get: >=20 > cc -O2 -pipe -DVERSION=3D'"9.9.3-P2"' -DHAVE_CONFIG_H -D_REENTRANT -D_THR= EAD_SAFE -DOPENSSL -DUSE_MD5 -DNS_LOCALSTATEDIR=3D'"/var"' -DNS_SYSCONFDIR= =3D'"/etc/namedb"' -DNAMED_CONFFILE=3D'"/etc/namedb/named.conf"' -DRNDC_CON= FFILE=3D'"/etc/namedb/rndc.conf"' -DRNDC_KEYFILE=3D'"/etc/namedb/rndc.key"'= -I/src/src-9/usr.bin/dig/../../lib/bind -DDIG_SIGCHASE -I/src/src-9/usr.bi= n/dig/../../contrib/bind9/lib/bind9/include -I/src/src-9/usr.bin/dig/../../= contrib/bind9/lib/dns/include/dst -I/src/src-9/usr.bin/dig/../../contrib/b= ind9/lib/dns/include -I/src/src-9/usr.bin/dig/../../lib/bind/dns -I/src/sr= c-9/usr.bin/dig/../../contrib/bind9/lib/isccc/include -I/src/src-9/usr.bin/= dig/../../contrib/bind9/lib/isccfg/include -I/src/src-9/usr.bin/dig/../../c= ontrib/bind9/lib/isc/unix/include -I/src/src-9/usr.bin/dig/../../contrib/b= ind9/lib/isc/pthreads/include -I/src/src-9/usr.bin/dig/../../contrib/bind9= /lib/isc/include -I/src/src-9/usr.bin/dig/../../lib/bind/isc -I/src/src-9/= usr.bin/dig/../../contrib/bind9/lib/lwres/unix/include -I/src/src-9/usr.bi= n/dig/../../contrib/bind9/lib/lwres/include -I/src/src-9/usr.bin/dig/../..= /lib/bind/lwres -I/src/src-9/usr.bin/dig/../../contrib/bind9/bin/dig/includ= e -I/src/src-9/usr.bin/dig/../../contrib/bind9/lib/isc/x86_32/include -UENA= BLE_ALTQ -std=3Dgnu99 -fstack-protector -Wsystem-headers -Werror -Wno-point= er-sign -c /src/src-9/usr.bin/dig/../../contrib/bind9/bin/dig/dighost.c > cc1: warnings being treated as errors > /src/src-9/usr.bin/dig/../../contrib/bind9/bin/dig/dighost.c: In function= 'nameFromString': > /src/src-9/usr.bin/dig/../../contrib/bind9/bin/dig/dighost.c:4336: warnin= g: passing argument 2 of 'isc__buffer_init' discards qualifiers from pointe= r target type > *** [dighost.o] Error code 1 >=20 > How should we deal with this? >=20 > Changing the Makefiles of dig, host and nslookup to WARNS?=3D0 > or patching dighost.c in contrib/bind9 directly? >=20 Thanks for the report. I have just reduced WARNS to 0 for those 3 in HEAD and will MFC early next week. Cheers, Erwin From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 07:37:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9AF1383E; Fri, 30 Aug 2013 07:37:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 79A062D56; Fri, 30 Aug 2013 07:37:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7U7bkfI049418; Fri, 30 Aug 2013 07:37:46 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7U7bjBA049415; Fri, 30 Aug 2013 07:37:45 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201308300737.r7U7bjBA049415@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Aug 2013 07:37:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255057 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 07:37:46 -0000 Author: kib Date: Fri Aug 30 07:37:45 2013 New Revision: 255057 URL: http://svnweb.freebsd.org/changeset/base/255057 Log: Move the definition of the struct unrhdr into a separate header file, to allow embedding the struct. Add init_unrhdr(9) initializer, which sets up preallocated unrhdr. Reviewed by: alc Tested by: pho, bf Added: head/sys/sys/_unrhdr.h (contents, props changed) Modified: head/sys/kern/subr_unit.c head/sys/sys/systm.h Modified: head/sys/kern/subr_unit.c ============================================================================== --- head/sys/kern/subr_unit.c Fri Aug 30 06:21:00 2013 (r255056) +++ head/sys/kern/subr_unit.c Fri Aug 30 07:37:45 2013 (r255057) @@ -68,8 +68,8 @@ */ #include -#include #include +#include #ifdef _KERNEL @@ -187,22 +187,6 @@ CTASSERT(sizeof(struct unr) == sizeof(st /* Number of bits in the bitmap */ #define NBITS ((int)sizeof(((struct unrb *)NULL)->map) * 8) -/* Header element for a unr number space. */ - -struct unrhdr { - TAILQ_HEAD(unrhd,unr) head; - u_int low; /* Lowest item */ - u_int high; /* Highest item */ - u_int busy; /* Count of allocated items */ - u_int alloc; /* Count of memory allocations */ - u_int first; /* items in allocated from start */ - u_int last; /* items free at end */ - struct mtx *mtx; - TAILQ_HEAD(unrfr,unr) ppfree; /* Items to be freed after mtx - lock dropped */ -}; - - #if defined(DIAGNOSTIC) || !defined(_KERNEL) /* * Consistency check function. @@ -315,20 +299,12 @@ clean_unrhdr(struct unrhdr *uh) mtx_unlock(uh->mtx); } -/* - * Allocate a new unrheader set. - * - * Highest and lowest valid values given as parameters. - */ - -struct unrhdr * -new_unrhdr(int low, int high, struct mtx *mutex) +void +init_unrhdr(struct unrhdr *uh, int low, int high, struct mtx *mutex) { - struct unrhdr *uh; KASSERT(low >= 0 && low <= high, ("UNR: use error: new_unrhdr(%d, %d)", low, high)); - uh = Malloc(sizeof *uh); if (mutex != NULL) uh->mtx = mutex; else @@ -340,6 +316,21 @@ new_unrhdr(int low, int high, struct mtx uh->first = 0; uh->last = 1 + (high - low); check_unrhdr(uh, __LINE__); +} + +/* + * Allocate a new unrheader set. + * + * Highest and lowest valid values given as parameters. + */ + +struct unrhdr * +new_unrhdr(int low, int high, struct mtx *mutex) +{ + struct unrhdr *uh; + + uh = Malloc(sizeof *uh); + init_unrhdr(uh, low, high, mutex); return (uh); } Added: head/sys/sys/_unrhdr.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/_unrhdr.h Fri Aug 30 07:37:45 2013 (r255057) @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2004 Poul-Henning Kamp + * 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_UNRHDR_H +#define _SYS_UNRHDR_H + +#include + +struct mtx; + +/* Header element for a unr number space. */ + +struct unrhdr { + TAILQ_HEAD(unrhd,unr) head; + u_int low; /* Lowest item */ + u_int high; /* Highest item */ + u_int busy; /* Count of allocated items */ + u_int alloc; /* Count of memory allocations */ + u_int first; /* items in allocated from start */ + u_int last; /* items free at end */ + struct mtx *mtx; + TAILQ_HEAD(unrfr,unr) ppfree; /* Items to be freed after mtx + lock dropped */ +}; + +#endif Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Fri Aug 30 06:21:00 2013 (r255056) +++ head/sys/sys/systm.h Fri Aug 30 07:37:45 2013 (r255057) @@ -396,6 +396,7 @@ int root_mounted(void); */ struct unrhdr; struct unrhdr *new_unrhdr(int low, int high, struct mtx *mutex); +void init_unrhdr(struct unrhdr *uh, int low, int high, struct mtx *mutex); void delete_unrhdr(struct unrhdr *uh); void clean_unrhdr(struct unrhdr *uh); void clean_unrhdrl(struct unrhdr *uh); From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 07:42:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C693C9DC; Fri, 30 Aug 2013 07:42:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B4B192DB0; Fri, 30 Aug 2013 07:42:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7U7gcRD053191; Fri, 30 Aug 2013 07:42:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7U7gcEw053190; Fri, 30 Aug 2013 07:42:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201308300742.r7U7gcEw053190@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Aug 2013 07:42:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255058 - head/sys/amd64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 07:42:38 -0000 Author: kib Date: Fri Aug 30 07:42:38 2013 New Revision: 255058 URL: http://svnweb.freebsd.org/changeset/base/255058 Log: Provide a wrapper for the INVPCID instruction, definition of the descriptor and symbolic names for the operation types. Sponsored by: The FreeBSD Foundation Reviewed by: alc Tested by: pho, bf Modified: head/sys/amd64/include/cpufunc.h Modified: head/sys/amd64/include/cpufunc.h ============================================================================== --- head/sys/amd64/include/cpufunc.h Fri Aug 30 07:37:45 2013 (r255057) +++ head/sys/amd64/include/cpufunc.h Fri Aug 30 07:42:38 2013 (r255058) @@ -472,6 +472,26 @@ invlpg(u_long addr) __asm __volatile("invlpg %0" : : "m" (*(char *)addr) : "memory"); } +#define INVPCID_ADDR 0 +#define INVPCID_CTX 1 +#define INVPCID_CTXGLOB 2 +#define INVPCID_ALLCTX 3 + +struct invpcid_descr { + uint64_t pcid:12 __packed; + uint64_t pad:52 __packed; + uint64_t addr; +} __packed; + +static __inline void +invpcid(struct invpcid_descr *d, int type) +{ + + /* invpcid (%rdx),%rax */ + __asm __volatile(".byte 0x66,0x0f,0x38,0x82,0x02" + : : "d" (d), "a" ((u_long)type) : "memory"); +} + static __inline u_short rfs(void) { From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 07:43:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BC676B3D; Fri, 30 Aug 2013 07:43:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A91812DC6; Fri, 30 Aug 2013 07:43:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7U7hZBN053546; Fri, 30 Aug 2013 07:43:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7U7hZfW053544; Fri, 30 Aug 2013 07:43:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201308300743.r7U7hZfW053544@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Aug 2013 07:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255059 - head/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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 07:43:35 -0000 Author: kib Date: Fri Aug 30 07:43:34 2013 New Revision: 255059 URL: http://svnweb.freebsd.org/changeset/base/255059 Log: Add BIT_AND_ATOMIC() and CPU_AND_ATOMIC(). Sponsored by: The FreeBSD Foundation Reviewed by: alc Tested by: pho, bf Modified: head/sys/sys/bitset.h head/sys/sys/cpuset.h Modified: head/sys/sys/bitset.h ============================================================================== --- head/sys/sys/bitset.h Fri Aug 30 07:42:38 2013 (r255058) +++ head/sys/sys/bitset.h Fri Aug 30 07:43:34 2013 (r255059) @@ -135,7 +135,14 @@ atomic_set_long(&(p)->__bits[__bitset_word(_s, n)], \ __bitset_mask((_s), n)) -/* Convenience functions catering special cases. */ +/* Convenience functions catering special cases. */ +#define BIT_AND_ATOMIC(_s, d, s) do { \ + __size_t __i; \ + for (__i = 0; __i < __bitset_words((_s)); __i++) \ + atomic_clear_long(&(d)->__bits[__i], \ + ~(s)->__bits[__i]); \ +} while (0) + #define BIT_OR_ATOMIC(_s, d, s) do { \ __size_t __i; \ for (__i = 0; __i < __bitset_words((_s)); __i++) \ Modified: head/sys/sys/cpuset.h ============================================================================== --- head/sys/sys/cpuset.h Fri Aug 30 07:42:38 2013 (r255058) +++ head/sys/sys/cpuset.h Fri Aug 30 07:43:34 2013 (r255059) @@ -55,6 +55,7 @@ #define CPU_NAND(d, s) BIT_NAND(CPU_SETSIZE, d, s) #define CPU_CLR_ATOMIC(n, p) BIT_CLR_ATOMIC(CPU_SETSIZE, n, p) #define CPU_SET_ATOMIC(n, p) BIT_SET_ATOMIC(CPU_SETSIZE, n, p) +#define CPU_AND_ATOMIC(n, p) BIT_AND_ATOMIC(CPU_SETSIZE, n, p) #define CPU_OR_ATOMIC(d, s) BIT_OR_ATOMIC(CPU_SETSIZE, d, s) #define CPU_COPY_STORE_REL(f, t) BIT_COPY_STORE_REL(CPU_SETSIZE, f, t) #define CPU_FFS(p) BIT_FFS(CPU_SETSIZE, p) From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 07:59:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6EADA500; Fri, 30 Aug 2013 07:59:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4D3D72F3B; Fri, 30 Aug 2013 07:59:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7U7xpSF061216; Fri, 30 Aug 2013 07:59:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7U7xnmY061208; Fri, 30 Aug 2013 07:59:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201308300759.r7U7xnmY061208@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Aug 2013 07:59:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255060 - in head/sys/amd64: amd64 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 07:59:51 -0000 Author: kib Date: Fri Aug 30 07:59:49 2013 New Revision: 255060 URL: http://svnweb.freebsd.org/changeset/base/255060 Log: Implement support for the process-context identifiers ('PCID') on Intel CPUs. The feature tags TLB entries with the Id of the address space and allows to avoid TLB invalidation on the context switch, it is available only in the long mode. In the microbenchmarks, using the PCID decreased latency of the context switches by ~30% on SandyBridge class desktop CPUs, measured with the lat_ctx program from lmbench. If available, use INVPCID instruction when a TLB entry in non-current address space needs to be invalidated. The instruction is typically available on the Haswell. If needed, the use of PCID can be turned off with the vm.pmap.pcid_enabled loader tunable set to 0. The state of the feature is reported by the vm.pmap.pcid_enabled sysctl. The sysctl vm.pmap.pcid_save_cnt reports the number of context switches which avoided invalidating the TLB; compare with the total number of context switches, available as sysctl vm.stats.sys.v_swtch. Sponsored by: The FreeBSD Foundation Reviewed by: alc Tested by: pho, bf Modified: head/sys/amd64/amd64/apic_vector.S head/sys/amd64/amd64/cpu_switch.S head/sys/amd64/amd64/genassym.c head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/amd64/pmap.c head/sys/amd64/amd64/vm_machdep.c head/sys/amd64/include/pcpu.h head/sys/amd64/include/pmap.h head/sys/amd64/include/smp.h Modified: head/sys/amd64/amd64/apic_vector.S ============================================================================== --- head/sys/amd64/amd64/apic_vector.S Fri Aug 30 07:43:34 2013 (r255059) +++ head/sys/amd64/amd64/apic_vector.S Fri Aug 30 07:59:49 2013 (r255060) @@ -43,6 +43,12 @@ #include "assym.s" +#ifdef SMP +#define LK lock ; +#else +#define LK +#endif + /* * I/O Interrupt Entry Point. Rather than having one entry point for * each interrupt source, we use one entry point for each 32-bit word @@ -149,6 +155,38 @@ IDTVEC(xen_intr_upcall) * Global address space TLB shootdown. */ .text + +#define NAKE_INTR_CS 24 + + SUPERALIGN_TEXT +global_invltlb: + movl %cr4,%eax + andl $~0x80,%eax + movl %eax,%cr4 + orl $0x80,%eax + movl %eax,%cr4 +invltlb_ret_clear_pm_save: + movq smp_tlb_pmap,%rdx + testq %rdx,%rdx + jz invltlb_ret + testb $SEL_RPL_MASK,NAKE_INTR_CS(%rsp) + jz 1f + swapgs +1: + movl PCPU(CPUID),%eax + jz 2f + swapgs +2: + LK btcl %eax,PM_SAVE(%rdx) + SUPERALIGN_TEXT +invltlb_ret: + movq lapic, %rax + movl $0, LA_EOI(%rax) /* End Of Interrupt to APIC */ + LK incl smp_tlb_wait + popq %rdx + popq %rax + jmp doreti_iret + SUPERALIGN_TEXT IDTVEC(invltlb) #if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) @@ -165,18 +203,44 @@ IDTVEC(invltlb) #endif pushq %rax + pushq %rdx - movq %cr3, %rax /* invalidate the TLB */ - movq %rax, %cr3 - - movq lapic, %rax - movl $0, LA_EOI(%rax) /* End Of Interrupt to APIC */ - - lock - incl smp_tlb_wait - - popq %rax - jmp doreti_iret + movq %cr3,%rax + cmpl $0,pmap_pcid_enabled + je 2f + + movq $smp_tlb_invpcid,%rdx + cmpl $0,(%rdx) + je global_invltlb + cmpl $-1,(%rdx) + je global_invltlb + + /* + * Non-zero smp_tlb_invpcid, only invalidate TLB for entries with + * current PCID. + */ + cmpl $0,invpcid_works + je 1f + /* Use invpcid if available. */ + movl $1,%eax /* INVPCID_CTX */ + /* invpcid (%rdx),%rax */ + .byte 0x66,0x0f,0x38,0x82,0x02 + jmp invltlb_ret_clear_pm_save +1: + /* Otherwise reload %cr3 twice. */ + movq pcid_cr3,%rdx + cmpq %rax,%rdx + je 2f + movq %rdx,%cr3 /* Invalidate, bit 63 is zero. */ + btsq $63,%rax + + /* + * Invalidate the TLB if PCID is not enabled. + * Restore the old address space. + */ +2: + movq %rax,%cr3 + jmp invltlb_ret_clear_pm_save /* * Single page TLB shootdown @@ -198,18 +262,54 @@ IDTVEC(invlpg) #endif pushq %rax - - movq smp_tlb_addr1, %rax - invlpg (%rax) /* invalidate single page */ - - movq lapic, %rax - movl $0, LA_EOI(%rax) /* End Of Interrupt to APIC */ - - lock - incl smp_tlb_wait - - popq %rax - jmp doreti_iret + pushq %rdx + movq $smp_tlb_invpcid,%rdx + cmpl $0,pmap_pcid_enabled + je 3f + cmpl $0,invpcid_works + jne 2f + + /* kernel pmap - use invlpg to invalidate global mapping */ + cmpl $0,(%rdx) + je 3f + cmpl $-1,(%rdx) + je global_invltlb + + /* + * PCID supported, but INVPCID is not. + * Temporarily switch to the target address space and do INVLPG. + */ + pushq %rcx + movq %cr3,%rcx + movq pcid_cr3,%rax + cmp %rcx,%rax + je 1f + btsq $63,%rax + movq %rax,%cr3 +1: movq 8(%rdx),%rax + invlpg (%rax) + btsq $63,%rcx + movq %rcx,%cr3 + popq %rcx + jmp invltlb_ret + + /* + * Invalidate the TLB entry using INVPCID_ADDR. + */ +2: + xorl %eax,%eax +/* invpcid (%rdx),%rax */ + .byte 0x66,0x0f,0x38,0x82,0x02 + jmp invltlb_ret + + /* + * PCID is not supported or kernel pmap. + * Invalidate single page using INVLPG. + */ +3: + movq 8(%rdx),%rax + invlpg (%rax) + jmp invltlb_ret /* * Page range TLB shootdown. @@ -232,23 +332,76 @@ IDTVEC(invlrng) pushq %rax pushq %rdx - - movq smp_tlb_addr1, %rdx - movq smp_tlb_addr2, %rax + movq $smp_tlb_invpcid,%rdx + cmpl $0,pmap_pcid_enabled + jne invlrng_single_page + cmpl $0,invpcid_works + jne invlrng_invpcid + + /* kernel pmap - use invlpg to invalidate global mapping */ + cmpl $0,(%rdx) + je invlrng_single_page + cmpl $-1,(%rdx) + je global_invltlb + + pushq %rcx + movq %cr3,%rcx + movq pcid_cr3,%rax + cmpq %rcx,%rax + je 1f + btsq $63,%rax + movq %rax,%cr3 +1: + movq 8(%rdx),%rdx + movq smp_tlb_addr2,%rax +2: + invlpg (%rdx) + addq $PAGE_SIZE,%rdx + cmpq %rax,%rdx + jb 2b + btsq $63,%rcx + movq %rcx,%cr3 + popq %rcx + jmp invltlb_ret + +invlrng_invpcid: + testb $SEL_RPL_MASK,NAKE_INTR_CS(%rsp) + jz 1f + swapgs +1: + pushq %rcx + movq (%rdx),%rcx + movq %rcx,PCPU(INVPCID_DESCR) + movq 8(%rdx),%rax + movq %rax,PCPU(INVPCID_DESCR)+8 + movq smp_tlb_addr2,%rcx + xorl %eax,%eax + movq $PC_INVPCID_DESCR,%rdx + gs + subq 8(%rdx),%rcx + shrq $PAGE_SHIFT,%rcx +2: + gs +// invpcid (%rdx),%rax + .byte 0x66,0x0f,0x38,0x82,0x02 + gs + addq $PAGE_SIZE,8(%rdx) + dec %rcx + jne 2b + popq %rcx + testb $SEL_RPL_MASK,NAKE_INTR_CS(%rsp) + jz invltlb_ret + swapgs + jmp invltlb_ret + +invlrng_single_page: + movq 8(%rdx),%rdx + movq smp_tlb_addr2,%rax 1: invlpg (%rdx) /* invalidate single page */ - addq $PAGE_SIZE, %rdx - cmpq %rax, %rdx + addq $PAGE_SIZE,%rdx + cmpq %rax,%rdx jb 1b - - movq lapic, %rax - movl $0, LA_EOI(%rax) /* End Of Interrupt to APIC */ - - lock - incl smp_tlb_wait - - popq %rdx - popq %rax - jmp doreti_iret + jmp invltlb_ret /* * Invalidate cache. @@ -265,17 +418,9 @@ IDTVEC(invlcache) #endif pushq %rax - + pushq %rdx wbinvd - - movq lapic, %rax - movl $0, LA_EOI(%rax) /* End Of Interrupt to APIC */ - - lock - incl smp_tlb_wait - - popq %rax - jmp doreti_iret + jmp invltlb_ret /* * Handler for IPIs sent via the per-cpu IPI bitmap. Modified: head/sys/amd64/amd64/cpu_switch.S ============================================================================== --- head/sys/amd64/amd64/cpu_switch.S Fri Aug 30 07:43:34 2013 (r255059) +++ head/sys/amd64/amd64/cpu_switch.S Fri Aug 30 07:59:49 2013 (r255060) @@ -77,8 +77,7 @@ ENTRY(cpu_throw) LK btrl %eax,PM_ACTIVE(%rdx) /* clear old */ 1: movq TD_PCB(%rsi),%r8 /* newtd->td_pcb */ - movq PCB_CR3(%r8),%rdx - movq %rdx,%cr3 /* new address space */ + movq PCB_CR3(%r8),%rcx /* new address space */ jmp swact END(cpu_throw) @@ -145,20 +144,41 @@ ctx_switch_xsave: SETLK %rdx, TD_LOCK(%rdi) /* Release the old thread */ jmp sw1 swinact: - movq %rcx,%cr3 /* new address space */ - movl PCPU(CPUID), %eax + movl PCPU(CPUID),%eax /* Release bit from old pmap->pm_active */ - movq PCPU(CURPMAP),%rcx - LK btrl %eax,PM_ACTIVE(%rcx) /* clear old */ - SETLK %rdx, TD_LOCK(%rdi) /* Release the old thread */ + movq PCPU(CURPMAP),%r12 + LK btrl %eax,PM_ACTIVE(%r12) /* clear old */ + SETLK %rdx,TD_LOCK(%rdi) /* Release the old thread */ swact: /* Set bit in new pmap->pm_active */ movq TD_PROC(%rsi),%rdx /* newproc */ movq P_VMSPACE(%rdx), %rdx addq $VM_PMAP,%rdx + cmpl $-1,PM_PCID(%rdx) + je 1f + LK btsl %eax,PM_SAVE(%rdx) + jnc 1f + btsq $63,%rcx /* CR3_PCID_SAVE */ + incq PCPU(PM_SAVE_CNT) +1: + movq %rcx,%cr3 /* new address space */ LK btsl %eax,PM_ACTIVE(%rdx) /* set new */ movq %rdx,PCPU(CURPMAP) + /* + * We might lose the race and other CPU might have changed + * the pmap after we set our bit in pmap->pm_save. Recheck. + * Reload %cr3 with CR3_PCID_SAVE bit cleared if pmap was + * modified, causing TLB flush for this pcid. + */ + btrq $63,%rcx + jnc 1f + LK btsl %eax,PM_SAVE(%rdx) + jc 1f + decq PCPU(PM_SAVE_CNT) + movq %rcx,%cr3 +1: + sw1: #if defined(SCHED_ULE) && defined(SMP) /* Wait for the new thread to become unblocked */ Modified: head/sys/amd64/amd64/genassym.c ============================================================================== --- head/sys/amd64/amd64/genassym.c Fri Aug 30 07:43:34 2013 (r255059) +++ head/sys/amd64/amd64/genassym.c Fri Aug 30 07:59:49 2013 (r255060) @@ -76,6 +76,8 @@ __FBSDID("$FreeBSD$"); ASSYM(P_VMSPACE, offsetof(struct proc, p_vmspace)); ASSYM(VM_PMAP, offsetof(struct vmspace, vm_pmap)); ASSYM(PM_ACTIVE, offsetof(struct pmap, pm_active)); +ASSYM(PM_SAVE, offsetof(struct pmap, pm_save)); +ASSYM(PM_PCID, offsetof(struct pmap, pm_pcid)); ASSYM(P_MD, offsetof(struct proc, p_md)); ASSYM(MD_LDT, offsetof(struct mdproc, md_ldt)); @@ -225,6 +227,8 @@ ASSYM(PC_GS32P, offsetof(struct pcpu, pc ASSYM(PC_LDT, offsetof(struct pcpu, pc_ldt)); ASSYM(PC_COMMONTSSP, offsetof(struct pcpu, pc_commontssp)); ASSYM(PC_TSS, offsetof(struct pcpu, pc_tss)); +ASSYM(PC_PM_SAVE_CNT, offsetof(struct pcpu, pc_pm_save_cnt)); +ASSYM(PC_INVPCID_DESCR, offsetof(struct pcpu, pc_invpcid_descr)); ASSYM(LA_VER, offsetof(struct LAPIC, version)); ASSYM(LA_TPR, offsetof(struct LAPIC, tpr)); Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Fri Aug 30 07:43:34 2013 (r255059) +++ head/sys/amd64/amd64/machdep.c Fri Aug 30 07:59:49 2013 (r255060) @@ -1909,7 +1909,7 @@ hammer_time(u_int64_t modulep, u_int64_t /* setup proc 0's pcb */ thread0.td_pcb->pcb_flags = 0; - thread0.td_pcb->pcb_cr3 = KPML4phys; + thread0.td_pcb->pcb_cr3 = KPML4phys; /* PCID 0 is reserved for kernel */ thread0.td_frame = &proc0_tf; env = getenv("kernelname"); Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Fri Aug 30 07:43:34 2013 (r255059) +++ head/sys/amd64/amd64/mp_machdep.c Fri Aug 30 07:59:49 2013 (r255060) @@ -107,9 +107,11 @@ struct pcb stoppcbs[MAXCPU]; struct pcb **susppcbs; /* Variables needed for SMP tlb shootdown. */ -vm_offset_t smp_tlb_addr1; vm_offset_t smp_tlb_addr2; +struct invpcid_descr smp_tlb_invpcid; volatile int smp_tlb_wait; +uint64_t pcid_cr3; +pmap_t smp_tlb_pmap; #ifdef COUNT_IPIS /* Interrupt counts. */ @@ -603,6 +605,8 @@ cpu_mp_announce(void) } } +extern int pmap_pcid_enabled; + /* * AP CPU's call this to initialize themselves. */ @@ -768,6 +772,8 @@ init_secondary(void) */ load_cr4(rcr4() | CR4_PGE); + if (pmap_pcid_enabled) + load_cr4(rcr4() | CR4_PCIDE); load_ds(_udatasel); load_es(_udatasel); load_fs(_ufssel); @@ -1119,7 +1125,8 @@ ipi_send_cpu(int cpu, u_int ipi) * Flush the TLB on all other CPU's */ static void -smp_tlb_shootdown(u_int vector, vm_offset_t addr1, vm_offset_t addr2) +smp_tlb_shootdown(u_int vector, pmap_t pmap, vm_offset_t addr1, + vm_offset_t addr2) { u_int ncpu; @@ -1129,8 +1136,16 @@ smp_tlb_shootdown(u_int vector, vm_offse if (!(read_rflags() & PSL_I)) panic("%s: interrupts disabled", __func__); mtx_lock_spin(&smp_ipi_mtx); - smp_tlb_addr1 = addr1; + smp_tlb_invpcid.addr = addr1; + if (pmap == NULL) { + smp_tlb_invpcid.pcid = 0; + } else { + smp_tlb_invpcid.pcid = pmap->pm_pcid; + pcid_cr3 = DMAP_TO_PHYS((vm_offset_t)pmap->pm_pml4) | + (pmap->pm_pcid == -1 ? 0 : pmap->pm_pcid); + } smp_tlb_addr2 = addr2; + smp_tlb_pmap = pmap; atomic_store_rel_int(&smp_tlb_wait, 0); ipi_all_but_self(vector); while (smp_tlb_wait < ncpu) @@ -1139,7 +1154,8 @@ smp_tlb_shootdown(u_int vector, vm_offse } static void -smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, vm_offset_t addr1, vm_offset_t addr2) +smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, pmap_t pmap, + vm_offset_t addr1, vm_offset_t addr2) { int cpu, ncpu, othercpus; @@ -1155,8 +1171,16 @@ smp_targeted_tlb_shootdown(cpuset_t mask if (!(read_rflags() & PSL_I)) panic("%s: interrupts disabled", __func__); mtx_lock_spin(&smp_ipi_mtx); - smp_tlb_addr1 = addr1; + smp_tlb_invpcid.addr = addr1; + if (pmap == NULL) { + smp_tlb_invpcid.pcid = 0; + } else { + smp_tlb_invpcid.pcid = pmap->pm_pcid; + pcid_cr3 = DMAP_TO_PHYS((vm_offset_t)pmap->pm_pml4) | + (pmap->pm_pcid == -1 ? 0 : pmap->pm_pcid); + } smp_tlb_addr2 = addr2; + smp_tlb_pmap = pmap; atomic_store_rel_int(&smp_tlb_wait, 0); if (CPU_ISFULLSET(&mask)) { ncpu = othercpus; @@ -1182,15 +1206,15 @@ smp_cache_flush(void) { if (smp_started) - smp_tlb_shootdown(IPI_INVLCACHE, 0, 0); + smp_tlb_shootdown(IPI_INVLCACHE, NULL, 0, 0); } void -smp_invltlb(void) +smp_invltlb(pmap_t pmap) { if (smp_started) { - smp_tlb_shootdown(IPI_INVLTLB, 0, 0); + smp_tlb_shootdown(IPI_INVLTLB, pmap, 0, 0); #ifdef COUNT_XINVLTLB_HITS ipi_global++; #endif @@ -1198,11 +1222,11 @@ smp_invltlb(void) } void -smp_invlpg(vm_offset_t addr) +smp_invlpg(pmap_t pmap, vm_offset_t addr) { if (smp_started) { - smp_tlb_shootdown(IPI_INVLPG, addr, 0); + smp_tlb_shootdown(IPI_INVLPG, pmap, addr, 0); #ifdef COUNT_XINVLTLB_HITS ipi_page++; #endif @@ -1210,11 +1234,11 @@ smp_invlpg(vm_offset_t addr) } void -smp_invlpg_range(vm_offset_t addr1, vm_offset_t addr2) +smp_invlpg_range(pmap_t pmap, vm_offset_t addr1, vm_offset_t addr2) { if (smp_started) { - smp_tlb_shootdown(IPI_INVLRNG, addr1, addr2); + smp_tlb_shootdown(IPI_INVLRNG, pmap, addr1, addr2); #ifdef COUNT_XINVLTLB_HITS ipi_range++; ipi_range_size += (addr2 - addr1) / PAGE_SIZE; @@ -1223,11 +1247,11 @@ smp_invlpg_range(vm_offset_t addr1, vm_o } void -smp_masked_invltlb(cpuset_t mask) +smp_masked_invltlb(cpuset_t mask, pmap_t pmap) { if (smp_started) { - smp_targeted_tlb_shootdown(mask, IPI_INVLTLB, 0, 0); + smp_targeted_tlb_shootdown(mask, IPI_INVLTLB, NULL, 0, 0); #ifdef COUNT_XINVLTLB_HITS ipi_masked_global++; #endif @@ -1235,11 +1259,11 @@ smp_masked_invltlb(cpuset_t mask) } void -smp_masked_invlpg(cpuset_t mask, vm_offset_t addr) +smp_masked_invlpg(cpuset_t mask, pmap_t pmap, vm_offset_t addr) { if (smp_started) { - smp_targeted_tlb_shootdown(mask, IPI_INVLPG, addr, 0); + smp_targeted_tlb_shootdown(mask, IPI_INVLPG, pmap, addr, 0); #ifdef COUNT_XINVLTLB_HITS ipi_masked_page++; #endif @@ -1247,11 +1271,13 @@ smp_masked_invlpg(cpuset_t mask, vm_offs } void -smp_masked_invlpg_range(cpuset_t mask, vm_offset_t addr1, vm_offset_t addr2) +smp_masked_invlpg_range(cpuset_t mask, pmap_t pmap, vm_offset_t addr1, + vm_offset_t addr2) { if (smp_started) { - smp_targeted_tlb_shootdown(mask, IPI_INVLRNG, addr1, addr2); + smp_targeted_tlb_shootdown(mask, IPI_INVLRNG, pmap, addr1, + addr2); #ifdef COUNT_XINVLTLB_HITS ipi_masked_range++; ipi_masked_range_size += (addr2 - addr1) / PAGE_SIZE; Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Aug 30 07:43:34 2013 (r255059) +++ head/sys/amd64/amd64/pmap.c Fri Aug 30 07:59:49 2013 (r255060) @@ -116,11 +116,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef SMP +#include #include -#else -#include -#endif #include #include @@ -250,6 +247,53 @@ static struct md_page *pv_table; pt_entry_t *CMAP1 = 0; caddr_t CADDR1 = 0; +static struct unrhdr pcid_unr; +static struct mtx pcid_mtx; +int pmap_pcid_enabled = 1; +SYSCTL_INT(_vm_pmap, OID_AUTO, pcid_enabled, CTLFLAG_RDTUN, &pmap_pcid_enabled, + 0, "Is TLB Context ID enabled ?"); +int invpcid_works = 0; + +/* + * Perform the guaranteed invalidation of all TLB entries. This + * includes the global entries, and entries in all PCIDs, not only the + * current context. The function works both on non-PCID CPUs and CPUs + * with the PCID turned off or on. See IA-32 SDM Vol. 3a 4.10.4.1 + * Operations that Invalidate TLBs and Paging-Structure Caches. + */ +static __inline void +invltlb_globpcid(void) +{ + uint64_t cr4; + + cr4 = rcr4(); + load_cr4(cr4 & ~CR4_PGE); + /* + * Although preemption at this point could be detrimental to + * performance, it would not lead to an error. PG_G is simply + * ignored if CR4.PGE is clear. Moreover, in case this block + * is re-entered, the load_cr4() either above or below will + * modify CR4.PGE flushing the TLB. + */ + load_cr4(cr4 | CR4_PGE); +} + +static int +pmap_pcid_save_cnt_proc(SYSCTL_HANDLER_ARGS) +{ + int i; + uint64_t res; + + res = 0; + CPU_FOREACH(i) { + res += cpuid_to_pcpu[i]->pc_pm_save_cnt; + } + return (sysctl_handle_64(oidp, &res, 0, req)); +} +SYSCTL_PROC(_vm_pmap, OID_AUTO, pcid_save_cnt, CTLTYPE_U64 | CTLFLAG_RW | + CTLFLAG_MPSAFE, NULL, 0, pmap_pcid_save_cnt_proc, "QU", + "Count of saved TLB context on switch"); + /* * Crashdump maps. */ @@ -685,6 +729,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) PMAP_LOCK_INIT(kernel_pmap); kernel_pmap->pm_pml4 = (pdp_entry_t *)PHYS_TO_DMAP(KPML4phys); CPU_FILL(&kernel_pmap->pm_active); /* don't allow deactivation */ + CPU_ZERO(&kernel_pmap->pm_save); TAILQ_INIT(&kernel_pmap->pm_pvchunk); /* @@ -716,6 +761,21 @@ pmap_bootstrap(vm_paddr_t *firstaddr) /* Initialize the PAT MSR. */ pmap_init_pat(); + +#ifdef SMP + /* Initialize TLB Context Id. */ + TUNABLE_INT_FETCH("vm.pmap.pcid_enabled", &pmap_pcid_enabled); + if ((cpu_feature2 & CPUID2_PCID) != 0 && pmap_pcid_enabled) { + load_cr4(rcr4() | CR4_PCIDE); + mtx_init(&pcid_mtx, "pcid", NULL, MTX_DEF); + init_unrhdr(&pcid_unr, 1, (1 << 12) - 1, &pcid_mtx); + /* Check for INVPCID support */ + invpcid_works = (cpu_stdext_feature & CPUID_STDEXT_INVPCID) + != 0; + kernel_pmap->pm_pcid = 0; + } else +#endif + pmap_pcid_enabled = 0; } /* @@ -952,7 +1012,6 @@ pmap_cache_bits(int mode, boolean_t is_p static void pmap_update_pde_invalidate(vm_offset_t va, pd_entry_t newpde) { - u_long cr4; if ((newpde & PG_PS) == 0) /* Demotion: flush a specific 2MB page mapping. */ @@ -968,19 +1027,34 @@ pmap_update_pde_invalidate(vm_offset_t v * Promotion: flush every 4KB page mapping from the TLB, * including any global (PG_G) mappings. */ - cr4 = rcr4(); - load_cr4(cr4 & ~CR4_PGE); - /* - * Although preemption at this point could be detrimental to - * performance, it would not lead to an error. PG_G is simply - * ignored if CR4.PGE is clear. Moreover, in case this block - * is re-entered, the load_cr4() either above or below will - * modify CR4.PGE flushing the TLB. - */ - load_cr4(cr4 | CR4_PGE); + invltlb_globpcid(); } } #ifdef SMP + +static void +pmap_invalidate_page_pcid(pmap_t pmap, vm_offset_t va) +{ + struct invpcid_descr d; + uint64_t cr3; + + if (invpcid_works) { + d.pcid = pmap->pm_pcid; + d.pad = 0; + d.addr = va; + invpcid(&d, INVPCID_ADDR); + return; + } + + cr3 = rcr3(); + critical_enter(); + load_cr3(DMAP_TO_PHYS((vm_offset_t)pmap->pm_pml4) | pmap->pm_pcid | + CR3_PCID_SAVE); + invlpg(va); + load_cr3(cr3 | CR3_PCID_SAVE); + critical_exit(); +} + /* * For SMP, these functions have to use the IPI mechanism for coherence. * @@ -1008,21 +1082,68 @@ pmap_invalidate_page(pmap_t pmap, vm_off sched_pin(); if (pmap == kernel_pmap || !CPU_CMP(&pmap->pm_active, &all_cpus)) { - invlpg(va); - smp_invlpg(va); + if (!pmap_pcid_enabled) { + invlpg(va); + } else { + if (pmap->pm_pcid != -1 && pmap->pm_pcid != 0) { + if (pmap == PCPU_GET(curpmap)) + invlpg(va); + else + pmap_invalidate_page_pcid(pmap, va); + } else { + invltlb_globpcid(); + } + } + smp_invlpg(pmap, va); } else { cpuid = PCPU_GET(cpuid); other_cpus = all_cpus; CPU_CLR(cpuid, &other_cpus); if (CPU_ISSET(cpuid, &pmap->pm_active)) invlpg(va); - CPU_AND(&other_cpus, &pmap->pm_active); + else if (pmap_pcid_enabled) { + if (pmap->pm_pcid != -1 && pmap->pm_pcid != 0) + pmap_invalidate_page_pcid(pmap, va); + else + invltlb_globpcid(); + } + if (pmap_pcid_enabled) + CPU_AND(&other_cpus, &pmap->pm_save); + else + CPU_AND(&other_cpus, &pmap->pm_active); if (!CPU_EMPTY(&other_cpus)) - smp_masked_invlpg(other_cpus, va); + smp_masked_invlpg(other_cpus, pmap, va); } sched_unpin(); } +static void +pmap_invalidate_range_pcid(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +{ + struct invpcid_descr d; + uint64_t cr3; + vm_offset_t addr; + + if (invpcid_works) { + d.pcid = pmap->pm_pcid; + d.pad = 0; + for (addr = sva; addr < eva; addr += PAGE_SIZE) { + d.addr = addr; + invpcid(&d, INVPCID_ADDR); + } + return; + } + + cr3 = rcr3(); + critical_enter(); + load_cr3(DMAP_TO_PHYS((vm_offset_t)pmap->pm_pml4) | pmap->pm_pcid | + CR3_PCID_SAVE); + for (addr = sva; addr < eva; addr += PAGE_SIZE) + invlpg(addr); + load_cr3(cr3 | CR3_PCID_SAVE); + critical_exit(); +} + void pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { @@ -1032,19 +1153,43 @@ pmap_invalidate_range(pmap_t pmap, vm_of sched_pin(); if (pmap == kernel_pmap || !CPU_CMP(&pmap->pm_active, &all_cpus)) { - for (addr = sva; addr < eva; addr += PAGE_SIZE) - invlpg(addr); - smp_invlpg_range(sva, eva); + if (!pmap_pcid_enabled) { + for (addr = sva; addr < eva; addr += PAGE_SIZE) + invlpg(addr); + } else { + if (pmap->pm_pcid != -1 && pmap->pm_pcid != 0) { + if (pmap == PCPU_GET(curpmap)) { + for (addr = sva; addr < eva; + addr += PAGE_SIZE) + invlpg(addr); + } else { + pmap_invalidate_range_pcid(pmap, + sva, eva); + } + } else { + invltlb_globpcid(); + } + } + smp_invlpg_range(pmap, sva, eva); } else { cpuid = PCPU_GET(cpuid); other_cpus = all_cpus; CPU_CLR(cpuid, &other_cpus); - if (CPU_ISSET(cpuid, &pmap->pm_active)) + if (CPU_ISSET(cpuid, &pmap->pm_active)) { for (addr = sva; addr < eva; addr += PAGE_SIZE) invlpg(addr); - CPU_AND(&other_cpus, &pmap->pm_active); + } else if (pmap_pcid_enabled) { + if (pmap->pm_pcid != -1 && pmap->pm_pcid != 0) + pmap_invalidate_range_pcid(pmap, sva, eva); + else + invltlb_globpcid(); + } + if (pmap_pcid_enabled) + CPU_AND(&other_cpus, &pmap->pm_save); + else + CPU_AND(&other_cpus, &pmap->pm_active); if (!CPU_EMPTY(&other_cpus)) - smp_masked_invlpg_range(other_cpus, sva, eva); + smp_masked_invlpg_range(other_cpus, pmap, sva, eva); } sched_unpin(); } @@ -1053,21 +1198,63 @@ void pmap_invalidate_all(pmap_t pmap) { cpuset_t other_cpus; + struct invpcid_descr d; + uint64_t cr3; u_int cpuid; sched_pin(); - if (pmap == kernel_pmap || !CPU_CMP(&pmap->pm_active, &all_cpus)) { - invltlb(); - smp_invltlb(); + cpuid = PCPU_GET(cpuid); + if (pmap == kernel_pmap || + (pmap_pcid_enabled && !CPU_CMP(&pmap->pm_save, &all_cpus)) || + !CPU_CMP(&pmap->pm_active, &all_cpus)) { + if (invpcid_works) { + bzero(&d, sizeof(d)); + invpcid(&d, INVPCID_CTXGLOB); + } else { + invltlb_globpcid(); + } + CPU_CLR_ATOMIC(cpuid, &pmap->pm_save); + smp_invltlb(pmap); } else { - cpuid = PCPU_GET(cpuid); other_cpus = all_cpus; CPU_CLR(cpuid, &other_cpus); - if (CPU_ISSET(cpuid, &pmap->pm_active)) + + /* + * This logic is duplicated in the Xinvltlb shootdown + * IPI handler. + */ + if (pmap_pcid_enabled) { + if (pmap->pm_pcid != -1 && pmap->pm_pcid != 0) { + if (invpcid_works) { + d.pcid = pmap->pm_pcid; + d.pad = 0; + d.addr = 0; + invpcid(&d, INVPCID_CTX); + } else { + cr3 = rcr3(); + critical_enter(); + + /* + * Bit 63 is clear, pcid TLB + * entries are invalidated. + */ + load_cr3(DMAP_TO_PHYS((vm_offset_t) + pmap->pm_pml4) | pmap->pm_pcid); + load_cr3(cr3 | CR3_PCID_SAVE); + critical_exit(); + } + } else { + invltlb_globpcid(); + } + } else if (CPU_ISSET(cpuid, &pmap->pm_active)) invltlb(); - CPU_AND(&other_cpus, &pmap->pm_active); + CPU_CLR_ATOMIC(cpuid, &pmap->pm_save); + if (pmap_pcid_enabled) + CPU_AND(&other_cpus, &pmap->pm_save); + else + CPU_AND(&other_cpus, &pmap->pm_active); if (!CPU_EMPTY(&other_cpus)) - smp_masked_invltlb(other_cpus); + smp_masked_invltlb(other_cpus, pmap); } sched_unpin(); } @@ -1129,8 +1316,10 @@ pmap_update_pde(pmap_t pmap, vm_offset_t CPU_CLR(cpuid, &other_cpus); if (pmap == kernel_pmap) active = all_cpus; - else + else { active = pmap->pm_active; + CPU_AND_ATOMIC(&pmap->pm_save, &active); + } if (CPU_OVERLAP(&active, &other_cpus)) { act.store = cpuid; act.invalidate = active; @@ -1193,6 +1382,8 @@ pmap_update_pde(pmap_t pmap, vm_offset_t pde_store(pde, newpde); if (pmap == kernel_pmap || !CPU_EMPTY(&pmap->pm_active)) pmap_update_pde_invalidate(va, newpde); + else + CPU_ZERO(&pmap->pm_save); } #endif /* !SMP */ @@ -1675,6 +1866,8 @@ pmap_pinit0(pmap_t pmap) PCPU_SET(curpmap, pmap); TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); + pmap->pm_pcid = pmap_pcid_enabled ? 0 : -1; + CPU_ZERO(&pmap->pm_save); } /* @@ -1716,6 +1909,8 @@ pmap_pinit(pmap_t pmap) CPU_ZERO(&pmap->pm_active); TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); + pmap->pm_pcid = pmap_pcid_enabled ? alloc_unr(&pcid_unr) : -1; + CPU_ZERO(&pmap->pm_save); return (1); } @@ -1957,6 +2152,14 @@ pmap_release(pmap_t pmap) KASSERT(vm_radix_is_empty(&pmap->pm_root), ("pmap_release: pmap has reserved page table page(s)")); + if (pmap_pcid_enabled) { + /* + * Invalidate any left TLB entries, to allow the reuse + * of the pcid. + */ + pmap_invalidate_all(pmap); + } + m = PHYS_TO_VM_PAGE(pmap->pm_pml4[PML4PML4I] & PG_FRAME); for (i = 0; i < NKPML4E; i++) /* KVA */ @@ -1968,6 +2171,8 @@ pmap_release(pmap_t pmap) m->wire_count--; atomic_subtract_int(&cnt.v_wire_count, 1); vm_page_free_zero(m); + if (pmap->pm_pcid != -1) + free_unr(&pcid_unr, pmap->pm_pcid); } static int @@ -5734,15 +5939,20 @@ pmap_activate(struct thread *td) critical_enter(); pmap = vmspace_pmap(td->td_proc->p_vmspace); oldpmap = PCPU_GET(curpmap); + CPU_ZERO(&pmap->pm_save); cpuid = PCPU_GET(cpuid); #ifdef SMP CPU_CLR_ATOMIC(cpuid, &oldpmap->pm_active); CPU_SET_ATOMIC(cpuid, &pmap->pm_active); + CPU_SET_ATOMIC(cpuid, &pmap->pm_save); #else CPU_CLR(cpuid, &oldpmap->pm_active); CPU_SET(cpuid, &pmap->pm_active); + CPU_SET(cpuid, &pmap->pm_save); #endif cr3 = DMAP_TO_PHYS((vm_offset_t)pmap->pm_pml4); + if (pmap->pm_pcid != -1) + cr3 |= pmap->pm_pcid; td->td_pcb->pcb_cr3 = cr3; load_cr3(cr3); PCPU_SET(curpmap, pmap); Modified: head/sys/amd64/amd64/vm_machdep.c ============================================================================== --- head/sys/amd64/amd64/vm_machdep.c Fri Aug 30 07:43:34 2013 (r255059) +++ head/sys/amd64/amd64/vm_machdep.c Fri Aug 30 07:59:49 2013 (r255060) @@ -221,6 +221,8 @@ cpu_fork(td1, p2, td2, flags) */ pmap2 = vmspace_pmap(p2->p_vmspace); pcb2->pcb_cr3 = DMAP_TO_PHYS((vm_offset_t)pmap2->pm_pml4); + if (pmap2->pm_pcid != -1) + pcb2->pcb_cr3 |= pmap2->pm_pcid; pcb2->pcb_r12 = (register_t)fork_return; /* fork_trampoline argument */ pcb2->pcb_rbp = 0; pcb2->pcb_rsp = (register_t)td2->td_frame - sizeof(void *); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 08:54:40 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B23A762B; Fri, 30 Aug 2013 08:54:40 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 41018233A; Fri, 30 Aug 2013 08:54:39 +0000 (UTC) Received: from mail2.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.13.6/8.13.6) with ESMTP id r7U8sVsM010454; Fri, 30 Aug 2013 10:54:31 +0200 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail2.siemens.de (8.13.6/8.13.6) with ESMTP id r7U8sVNB012414; Fri, 30 Aug 2013 10:54:31 +0200 Received: (from localhost) by curry.mchp.siemens.de (8.14.7/8.14.7) id r7U8sV2S001603; Date: Fri, 30 Aug 2013 10:54:31 +0200 From: Andre Albsmeier To: Erwin Lansing Subject: Re: svn commit: r254897 - in stable/9: contrib/bind9 contrib/bind9/bin contrib/bind9/bin/check contrib/bind9/bin/confgen contrib/bind9/bin/dig contrib/bind9/bin/dig/include/dig contrib/bind9/bin/dnssec... Message-ID: <20130830085431.GA4707@bali> References: <201308260717.r7Q7HgMF073297@svn.freebsd.org> <20130829075631.GA96113@bali> <20130830062152.GL83309@droso.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20130830062152.GL83309@droso.dk> X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-9@FreeBSD.org, Andre Albsmeier X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 08:54:40 -0000 On Fri, 30-Aug-2013 at 08:21:52 +0200, Erwin Lansing wrote: > Hi Andre, >=20 > On Thu, Aug 29, 2013 at 09:56:31AM +0200, Andre Albsmeier wrote: > > On Mon, 26-Aug-2013 at 07:17:42 +0000, Erwin Lansing wrote: > > > Author: erwin > > > Date: Mon Aug 26 07:17:41 2013 > > > New Revision: 254897 > > > URL: http://svnweb.freebsd.org/changeset/base/254897 > > >=20 > > > Log: > > > MFC r254651: > > > =20 > > > Update Bind to 9.9.3-P2 > >=20 > > Thanks! > >=20 > > However, when enabling WITH_BIND_SIGCHASE in make.conf I get: > >=20 > > cc -O2 -pipe -DVERSION=3D'"9.9.3-P2"' -DHAVE_CONFIG_H -D_REENTRANT -D_T= HREAD_SAFE -DOPENSSL -DUSE_MD5 -DNS_LOCALSTATEDIR=3D'"/var"' -DNS_SYSCONFDI= R=3D'"/etc/namedb"' -DNAMED_CONFFILE=3D'"/etc/namedb/named.conf"' -DRNDC_CO= NFFILE=3D'"/etc/namedb/rndc.conf"' -DRNDC_KEYFILE=3D'"/etc/namedb/rndc.key"= ' -I/src/src-9/usr.bin/dig/../../lib/bind -DDIG_SIGCHASE -I/src/src-9/usr.b= in/dig/../../contrib/bind9/lib/bind9/include -I/src/src-9/usr.bin/dig/../..= /contrib/bind9/lib/dns/include/dst -I/src/src-9/usr.bin/dig/../../contrib/= bind9/lib/dns/include -I/src/src-9/usr.bin/dig/../../lib/bind/dns -I/src/s= rc-9/usr.bin/dig/../../contrib/bind9/lib/isccc/include -I/src/src-9/usr.bin= /dig/../../contrib/bind9/lib/isccfg/include -I/src/src-9/usr.bin/dig/../../= contrib/bind9/lib/isc/unix/include -I/src/src-9/usr.bin/dig/../../contrib/= bind9/lib/isc/pthreads/include -I/src/src-9/usr.bin/dig/../../contrib/bind= 9/lib/isc/include -I/src/src-9/usr.bin/dig/../../lib/bind/isc -I/src/src-9= /usr.bin/dig/../../contrib/bind9/lib/lwres/unix/include -I/src/src-9/usr.b= in/dig/../../contrib/bind9/lib/lwres/include -I/src/src-9/usr.bin/dig/../.= =2E/lib/bind/lwres -I/src/src-9/usr.bin/dig/../../contrib/bind9/bin/dig/inc= lude -I/src/src-9/usr.bin/dig/../../contrib/bind9/lib/isc/x86_32/include -U= ENABLE_ALTQ -std=3Dgnu99 -fstack-protector -Wsystem-headers -Werror -Wno-po= inter-sign -c /src/src-9/usr.bin/dig/../../contrib/bind9/bin/dig/dighost.c > > cc1: warnings being treated as errors > > /src/src-9/usr.bin/dig/../../contrib/bind9/bin/dig/dighost.c: In functi= on 'nameFromString': > > /src/src-9/usr.bin/dig/../../contrib/bind9/bin/dig/dighost.c:4336: warn= ing: passing argument 2 of 'isc__buffer_init' discards qualifiers from poin= ter target type > > *** [dighost.o] Error code 1 > >=20 > > How should we deal with this? > >=20 > > Changing the Makefiles of dig, host and nslookup to WARNS?=3D0 > > or patching dighost.c in contrib/bind9 directly? > >=20 >=20 > Thanks for the report. I have just reduced WARNS to 0 for those 3 in > HEAD and will MFC early next week. Thanks. Maybe we want to ifdef the WARNS setting according to BIND_SIGCHASE? -Andre From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 10:01:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DE0FC47A; Fri, 30 Aug 2013 10:01:19 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CB502273A; Fri, 30 Aug 2013 10:01:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UA1JWr031972; Fri, 30 Aug 2013 10:01:19 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UA1JL5031971; Fri, 30 Aug 2013 10:01:19 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201308301001.r7UA1JL5031971@svn.freebsd.org> From: Sergey Kandaurov Date: Fri, 30 Aug 2013 10:01:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255064 - head/sbin/etherswitchcfg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 10:01:19 -0000 Author: pluknet Date: Fri Aug 30 10:01:19 2013 New Revision: 255064 URL: http://svnweb.freebsd.org/changeset/base/255064 Log: Typo in strtol(3). Noticed by: bde Modified: head/sbin/etherswitchcfg/etherswitchcfg.8 Modified: head/sbin/etherswitchcfg/etherswitchcfg.8 ============================================================================== --- head/sbin/etherswitchcfg/etherswitchcfg.8 Fri Aug 30 08:38:04 2013 (r255063) +++ head/sbin/etherswitchcfg/etherswitchcfg.8 Fri Aug 30 10:01:19 2013 (r255064) @@ -69,7 +69,7 @@ is usually the port number, and is the register number. Both can be provided as decimal, octal or hexadecimal numbers in any of the formats understood by -.Xr strtol 4 . +.Xr strtol 3 . To set the register value, use the form instance.register=value. .Ss port The port command selects one of the ports of the switch. From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 10:07:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 56E7C8FE; Fri, 30 Aug 2013 10:07:11 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 29048278C; Fri, 30 Aug 2013 10:07:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UA7B4w034170; Fri, 30 Aug 2013 10:07:11 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UA7AQG034166; Fri, 30 Aug 2013 10:07:10 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308301007.r7UA7AQG034166@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 30 Aug 2013 10:07:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255065 - in stable/9: bin/sh tools/regression/bin/sh/parser X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 10:07:11 -0000 Author: jilles Date: Fri Aug 30 10:07:10 2013 New Revision: 255065 URL: http://svnweb.freebsd.org/changeset/base/255065 Log: MFC r254335: sh: Allow a lone redirection before '|', ';;' or ';&'. Example: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B863CB6F; Fri, 30 Aug 2013 10:10:22 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A50AC27DC; Fri, 30 Aug 2013 10:10:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UAAMWL035650; Fri, 30 Aug 2013 10:10:22 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UAAMMJ035649; Fri, 30 Aug 2013 10:10:22 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308301010.r7UAAMMJ035649@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 30 Aug 2013 10:10:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255066 - stable/9/tools/regression/lib/libc/gen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 10:10:22 -0000 Author: jilles Date: Fri Aug 30 10:10:22 2013 New Revision: 255066 URL: http://svnweb.freebsd.org/changeset/base/255066 Log: MFC r254231: fnmatch(): Add test for r254353 (pattern with single backslash) This test cannot be converted to an sh(1) test because the syntax would be invalid. r254091 was merged to stable/9 as r254353. PR: 181129 Modified: stable/9/tools/regression/lib/libc/gen/test-fnmatch.c Directory Properties: stable/9/tools/regression/lib/libc/ (props changed) Modified: stable/9/tools/regression/lib/libc/gen/test-fnmatch.c ============================================================================== --- stable/9/tools/regression/lib/libc/gen/test-fnmatch.c Fri Aug 30 10:07:10 2013 (r255065) +++ stable/9/tools/regression/lib/libc/gen/test-fnmatch.c Fri Aug 30 10:10:22 2013 (r255066) @@ -135,6 +135,8 @@ struct testcase { "\\[", "\\[", 0, FNM_NOMATCH, "\\(", "\\(", 0, FNM_NOMATCH, "\\a", "\\a", 0, FNM_NOMATCH, + "\\", "\\", 0, FNM_NOMATCH, + "\\", "", 0, 0, "\\*", "\\*", FNM_NOESCAPE, 0, "\\?", "\\?", FNM_NOESCAPE, 0, "\\", "\\", FNM_NOESCAPE, 0, @@ -236,6 +238,8 @@ write_sh_tests(const char *progname, int if (strchr(t->pattern, '\'') != NULL || strchr(t->string, '\'') != NULL) continue; + if (t->flags == 0 && strcmp(t->pattern, "\\") == 0) + continue; if (num == 1 && t->flags == 0) printf("test%smatch '%s' '%s'\n", t->result == FNM_NOMATCH ? "no" : "", From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 10:39:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2C4BB3B5; Fri, 30 Aug 2013 10:39:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1A2BB29A1; Fri, 30 Aug 2013 10:39:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UAdudi052039; Fri, 30 Aug 2013 10:39:56 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UAduI1052038; Fri, 30 Aug 2013 10:39:56 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201308301039.r7UAduI1052038@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 30 Aug 2013 10:39:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255067 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 10:39:57 -0000 Author: hselasky Date: Fri Aug 30 10:39:56 2013 New Revision: 255067 URL: http://svnweb.freebsd.org/changeset/base/255067 Log: Simplify pause_sbt() logic. Don't call DELAY() if remainder is less than or equal to zero. Modified: head/sys/kern/kern_synch.c Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Fri Aug 30 10:10:22 2013 (r255066) +++ head/sys/kern/kern_synch.c Fri Aug 30 10:39:56 2013 (r255067) @@ -356,10 +356,7 @@ msleep_spin_sbt(void *ident, struct mtx int pause_sbt(const char *wmesg, sbintime_t sbt, sbintime_t pr, int flags) { - int sbt_sec; - - sbt_sec = sbintime_getsec(sbt); - KASSERT(sbt_sec >= 0, ("pause: timo must be >= 0")); + KASSERT(sbt >= 0, ("pause: timeout must be >= 0")); /* silently convert invalid timeouts */ if (sbt == 0) @@ -370,11 +367,14 @@ pause_sbt(const char *wmesg, sbintime_t * We delay one second at a time to avoid overflowing the * system specific DELAY() function(s): */ - while (sbt_sec > 0) { + while (sbt >= SBT_1S) { DELAY(1000000); - sbt_sec--; + sbt -= SBT_1S; } - DELAY((sbt & 0xffffffff) / SBT_1US); + /* Do the delay remainder, if any */ + sbt = (sbt + SBT_1US - 1) / SBT_1US; + if (sbt > 0) + DELAY(sbt); return (0); } return (_sleep(&pause_wchan[curcpu], NULL, 0, wmesg, sbt, pr, flags)); From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 10:45:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 063F3530; Fri, 30 Aug 2013 10:45:03 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E7E4029F0; Fri, 30 Aug 2013 10:45:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UAj2Sn055925; Fri, 30 Aug 2013 10:45:02 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UAj2G5055923; Fri, 30 Aug 2013 10:45:02 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308301045.r7UAj2G5055923@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 30 Aug 2013 10:45:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255068 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 10:45:03 -0000 Author: jilles Date: Fri Aug 30 10:45:02 2013 New Revision: 255068 URL: http://svnweb.freebsd.org/changeset/base/255068 Log: sh: Cast -1 to pointer rather than pointer to variable of wrong type. NEOF needs to be a non-null pointer distinct from valid union node pointers. It is not dereferenced. The new NEOF is much like SIG_ERR except that it is an object pointer instead of a function pointer. The variable tokpushback can now be static. Modified: head/bin/sh/parser.c head/bin/sh/parser.h Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Fri Aug 30 10:39:56 2013 (r255067) +++ head/bin/sh/parser.c Fri Aug 30 10:45:02 2013 (r255068) @@ -96,7 +96,7 @@ static struct heredoc *heredoclist; /* l static int doprompt; /* if set, prompt the user */ static int needprompt; /* true if interactive and at start of line */ static int lasttoken; /* last token read */ -int tokpushback; /* last token pushed back */ +static int tokpushback; /* last token pushed back */ static char *wordtext; /* text of last word returned by readtoken */ static int checkkwd; static struct nodelist *backquotelist; Modified: head/bin/sh/parser.h ============================================================================== --- head/bin/sh/parser.h Fri Aug 30 10:39:56 2013 (r255067) +++ head/bin/sh/parser.h Fri Aug 30 10:45:02 2013 (r255068) @@ -68,11 +68,9 @@ /* * NEOF is returned by parsecmd when it encounters an end of file. It - * must be distinct from NULL, so we use the address of a variable that - * happens to be handy. + * must be distinct from NULL. */ -extern int tokpushback; -#define NEOF ((union node *)&tokpushback) +#define NEOF ((union node *)-1) extern int whichprompt; /* 1 == PS1, 2 == PS2 */ extern const char *const parsekwd[]; From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 11:21:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E3E82DA8; Fri, 30 Aug 2013 11:21:52 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B662F2BF7; Fri, 30 Aug 2013 11:21:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UBLqcv077494; Fri, 30 Aug 2013 11:21:52 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UBLqdQ077492; Fri, 30 Aug 2013 11:21:52 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201308301121.r7UBLqdQ077492@svn.freebsd.org> From: Sergey Kandaurov Date: Fri, 30 Aug 2013 11:21:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255069 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 11:21:53 -0000 Author: pluknet Date: Fri Aug 30 11:21:52 2013 New Revision: 255069 URL: http://svnweb.freebsd.org/changeset/base/255069 Log: The round of expand_number() cleanups. o Fix range error checking to detect overflow when uint64_t < uintmax_t. o Remove a non-functional check for no valid digits as pointed out by Bruce. o Remove a rather pointless comment describing what the function does. o Clean up a bunch of style bugs. Brucified by: bde Modified: head/lib/libutil/expand_number.c Modified: head/lib/libutil/expand_number.c ============================================================================== --- head/lib/libutil/expand_number.c Fri Aug 30 10:45:02 2013 (r255068) +++ head/lib/libutil/expand_number.c Fri Aug 30 11:21:52 2013 (r255069) @@ -35,42 +35,24 @@ __FBSDID("$FreeBSD$"); #include #include -/* - * Convert an expression of the following forms to a uint64_t. - * 1) A positive decimal number. - * 2) A positive decimal number followed by a 'b' or 'B' (mult by 1). - * 3) A positive decimal number followed by a 'k' or 'K' (mult by 1 << 10). - * 4) A positive decimal number followed by a 'm' or 'M' (mult by 1 << 20). - * 5) A positive decimal number followed by a 'g' or 'G' (mult by 1 << 30). - * 6) A positive decimal number followed by a 't' or 'T' (mult by 1 << 40). - * 7) A positive decimal number followed by a 'p' or 'P' (mult by 1 << 50). - * 8) A positive decimal number followed by a 'e' or 'E' (mult by 1 << 60). - */ int expand_number(const char *buf, uint64_t *num) { + char *endptr; + uintmax_t umaxval; uint64_t number; - int saved_errno; unsigned shift; - char *endptr; + int serrno; - saved_errno = errno; + serrno = errno; errno = 0; - - number = strtoumax(buf, &endptr, 0); - - if (number == UINTMAX_MAX && errno == ERANGE) { - return (-1); - } - - if (errno == 0) - errno = saved_errno; - - if (endptr == buf) { - /* No valid digits. */ - errno = EINVAL; + umaxval = strtoumax(buf, &endptr, 0); + if (umaxval > UINT64_MAX) + errno = ERANGE; + if (errno != 0) return (-1); - } + errno = serrno; + number = umaxval; switch (tolower((unsigned char)*endptr)) { case 'e': @@ -106,7 +88,6 @@ expand_number(const char *buf, uint64_t errno = ERANGE; return (-1); } - *num = number << shift; return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 12:10:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 53B88312; Fri, 30 Aug 2013 12:10:00 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 413142EFA; Fri, 30 Aug 2013 12:10:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UCA0MJ003498; Fri, 30 Aug 2013 12:10:00 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UC9xZ9003473; Fri, 30 Aug 2013 12:09:59 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308301209.r7UC9xZ9003473@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 30 Aug 2013 12:09:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255072 - in head: bin/sh tools/regression/bin/sh/builtins X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 12:10:00 -0000 Author: jilles Date: Fri Aug 30 12:09:59 2013 New Revision: 255072 URL: http://svnweb.freebsd.org/changeset/base/255072 Log: sh: Recognize "--" as end of options in type builtin. This implementation makes minimal changes: command names starting with "-" (other than "--") can still be queried normally. Added: head/tools/regression/bin/sh/builtins/type3.0 (contents, props changed) Modified: head/bin/sh/exec.c Modified: head/bin/sh/exec.c ============================================================================== --- head/bin/sh/exec.c Fri Aug 30 11:42:57 2013 (r255071) +++ head/bin/sh/exec.c Fri Aug 30 12:09:59 2013 (r255072) @@ -762,5 +762,7 @@ typecmd_impl(int argc, char **argv, int int typecmd(int argc, char **argv) { + if (argc > 2 && strcmp(argv[1], "--") == 0) + argc--, argv++; return typecmd_impl(argc, argv, TYPECMD_TYPE, bltinlookup("PATH", 1)); } Added: head/tools/regression/bin/sh/builtins/type3.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/type3.0 Fri Aug 30 12:09:59 2013 (r255072) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +[ "$(type type)" = "$(type -- type)" ] From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 13:25:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 256CE9E1; Fri, 30 Aug 2013 13:25:16 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 12EF524A5; Fri, 30 Aug 2013 13:25:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UDPFlM048787; Fri, 30 Aug 2013 13:25:15 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UDPFl5048786; Fri, 30 Aug 2013 13:25:15 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308301325.r7UDPFl5048786@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 30 Aug 2013 13:25:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255073 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 13:25:16 -0000 Author: jilles Date: Fri Aug 30 13:25:15 2013 New Revision: 255073 URL: http://svnweb.freebsd.org/changeset/base/255073 Log: sh: Add a function for the case where one token is required in the parse. Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Fri Aug 30 12:09:59 2013 (r255072) +++ head/bin/sh/parser.c Fri Aug 30 13:25:15 2013 (r255073) @@ -121,6 +121,7 @@ static int readtoken(void); static int xxreadtoken(void); static int readtoken1(int, const char *, const char *, int); static int noexpand(char *); +static void consumetoken(int); static void synexpect(int) __dead2; static void synerror(const char *) __dead2; static void setprompt(int); @@ -413,8 +414,7 @@ command(void) n1->type = NIF; if ((n1->nif.test = list(0, 0)) == NULL) synexpect(-1); - if (readtoken() != TTHEN) - synexpect(TTHEN); + consumetoken(TTHEN); n1->nif.ifpart = list(0, 0); n2 = n1; while (readtoken() == TELIF) { @@ -423,8 +423,7 @@ command(void) n2->type = NIF; if ((n2->nif.test = list(0, 0)) == NULL) synexpect(-1); - if (readtoken() != TTHEN) - synexpect(TTHEN); + consumetoken(TTHEN); n2->nif.ifpart = list(0, 0); } if (lasttoken == TELSE) @@ -433,27 +432,20 @@ command(void) n2->nif.elsepart = NULL; tokpushback++; } - if (readtoken() != TFI) - synexpect(TFI); + consumetoken(TFI); checkkwd = CHKKWD | CHKALIAS; break; case TWHILE: - case TUNTIL: { - int got; + case TUNTIL: n1 = (union node *)stalloc(sizeof (struct nbinary)); n1->type = (lasttoken == TWHILE)? NWHILE : NUNTIL; if ((n1->nbinary.ch1 = list(0, 0)) == NULL) synexpect(-1); - if ((got=readtoken()) != TDO) { -TRACE(("expecting DO got %s %s\n", tokname[got], got == TWORD ? wordtext : "")); - synexpect(TDO); - } + consumetoken(TDO); n1->nbinary.ch2 = list(0, 0); - if (readtoken() != TDONE) - synexpect(TDONE); + consumetoken(TDONE); checkkwd = CHKKWD | CHKALIAS; break; - } case TFOR: if (readtoken() != TWORD || quoteflag || ! goodname(wordtext)) synerror("Bad for loop variable"); @@ -501,15 +493,13 @@ TRACE(("expecting DO got %s %s\n", tokna else synexpect(-1); n1->nfor.body = list(0, 0); - if (readtoken() != t) - synexpect(t); + consumetoken(t); checkkwd = CHKKWD | CHKALIAS; break; case TCASE: n1 = (union node *)stalloc(sizeof (struct ncase)); n1->type = NCASE; - if (readtoken() != TWORD) - synexpect(TWORD); + consumetoken(TWORD); n1->ncase.expr = n2 = (union node *)stalloc(sizeof (struct narg)); n2->type = NARG; n2->narg.text = wordtext; @@ -562,15 +552,13 @@ TRACE(("expecting DO got %s %s\n", tokna n1->type = NSUBSHELL; n1->nredir.n = list(0, 0); n1->nredir.redirect = NULL; - if (readtoken() != TRP) - synexpect(TRP); + consumetoken(TRP); checkkwd = CHKKWD | CHKALIAS; is_subshell = 1; break; case TBEGIN: n1 = list(0, 0); - if (readtoken() != TEND) - synexpect(TEND); + consumetoken(TEND); checkkwd = CHKKWD | CHKALIAS; break; /* A simple command must have at least one redirection or word. */ @@ -659,8 +647,7 @@ simplecmd(union node **rpp, union node * } else if (lasttoken == TLP && app == &args->narg.next && rpp == orig_rpp) { /* We have a function */ - if (readtoken() != TRP) - synexpect(TRP); + consumetoken(TRP); funclinno = plinno; /* * - Require plain text. @@ -734,8 +721,7 @@ parsefname(void) { union node *n = redirnode; - if (readtoken() != TWORD) - synexpect(-1); + consumetoken(TWORD); if (n->type == NHERE) { struct heredoc *here = heredoc; struct heredoc *p; @@ -1094,10 +1080,8 @@ done: if (oldstyle) doprompt = saveprompt; - else { - if (readtoken() != TRP) - synexpect(TRP); - } + else + consumetoken(TRP); (*nlpp)->n = n; if (oldstyle) { @@ -1880,6 +1864,14 @@ isassignment(const char *p) } +static void +consumetoken(int token) +{ + if (readtoken() != token) + synexpect(token); +} + + /* * Called when an unexpected token is read during the parse. The argument * is the token that is expected, or -1 if more than one type of token can From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 13:38:42 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E7494151; Fri, 30 Aug 2013 13:38:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 9AA162594; Fri, 30 Aug 2013 13:38:41 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA14533; Fri, 30 Aug 2013 16:38:39 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VFOuN-0007sV-9W; Fri, 30 Aug 2013 16:38:39 +0300 Message-ID: <5220A027.8070604@FreeBSD.org> Date: Fri, 30 Aug 2013 16:37:43 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130810 Thunderbird/17.0.8 MIME-Version: 1.0 To: Hans Petter Selasky Subject: Re: svn commit: r255067 - head/sys/kern References: <201308301039.r7UAduI1052038@svn.freebsd.org> In-Reply-To: <201308301039.r7UAduI1052038@svn.freebsd.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 13:38:43 -0000 on 30/08/2013 13:39 Hans Petter Selasky said the following: > Author: hselasky > Date: Fri Aug 30 10:39:56 2013 > New Revision: 255067 > URL: http://svnweb.freebsd.org/changeset/base/255067 > > Log: > Simplify pause_sbt() logic. Don't call DELAY() if remainder is less > than or equal to zero. Discussed with? Reviewed by? Tested by? Asking just because this change seems to be outside of your typical area and in the quite important infrastructural code. > Modified: > head/sys/kern/kern_synch.c > > Modified: head/sys/kern/kern_synch.c > ============================================================================== > --- head/sys/kern/kern_synch.c Fri Aug 30 10:10:22 2013 (r255066) > +++ head/sys/kern/kern_synch.c Fri Aug 30 10:39:56 2013 (r255067) > @@ -356,10 +356,7 @@ msleep_spin_sbt(void *ident, struct mtx > int > pause_sbt(const char *wmesg, sbintime_t sbt, sbintime_t pr, int flags) > { > - int sbt_sec; > - > - sbt_sec = sbintime_getsec(sbt); > - KASSERT(sbt_sec >= 0, ("pause: timo must be >= 0")); > + KASSERT(sbt >= 0, ("pause: timeout must be >= 0")); > > /* silently convert invalid timeouts */ > if (sbt == 0) > @@ -370,11 +367,14 @@ pause_sbt(const char *wmesg, sbintime_t > * We delay one second at a time to avoid overflowing the > * system specific DELAY() function(s): > */ > - while (sbt_sec > 0) { > + while (sbt >= SBT_1S) { > DELAY(1000000); > - sbt_sec--; > + sbt -= SBT_1S; > } > - DELAY((sbt & 0xffffffff) / SBT_1US); > + /* Do the delay remainder, if any */ > + sbt = (sbt + SBT_1US - 1) / SBT_1US; > + if (sbt > 0) > + DELAY(sbt); > return (0); > } > return (_sleep(&pause_wchan[curcpu], NULL, 0, wmesg, sbt, pr, flags)); > -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 13:48:06 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9A2CD90B; Fri, 30 Aug 2013 13:48:06 +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 565022653; Fri, 30 Aug 2013 13:48:06 +0000 (UTC) Received: from mail.lockless.no (mail.lockless.no [46.29.221.38]) by mta.bitpro.no (Postfix) with ESMTP id 98AFD7A18D; Fri, 30 Aug 2013 15:48:05 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.lockless.no (Postfix) with ESMTP id B43CE8F5148; Fri, 30 Aug 2013 15:48:18 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at lockless.no Received: from mail.lockless.no ([127.0.0.1]) by localhost (mail.lockless.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gVU85LvlDC6f; Fri, 30 Aug 2013 15:48:17 +0200 (CEST) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) by mail.lockless.no (Postfix) with ESMTPSA id 4ACE48F5147; Fri, 30 Aug 2013 15:48:17 +0200 (CEST) Message-ID: <5220A2DD.5040803@bitfrost.no> Date: Fri, 30 Aug 2013 15:49:17 +0200 From: Hans Petter Selasky Organization: Bitfrost A/S User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130522 Thunderbird/17.0.6 MIME-Version: 1.0 To: Andriy Gapon Subject: Re: svn commit: r255067 - head/sys/kern References: <201308301039.r7UAduI1052038@svn.freebsd.org> <5220A027.8070604@FreeBSD.org> In-Reply-To: <5220A027.8070604@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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 13:48:06 -0000 On 08/30/13 15:37, Andriy Gapon wrote: > on 30/08/2013 13:39 Hans Petter Selasky said the following: >> Author: hselasky >> Date: Fri Aug 30 10:39:56 2013 >> New Revision: 255067 >> URL: http://svnweb.freebsd.org/changeset/base/255067 >> >> Log: >> Simplify pause_sbt() logic. Don't call DELAY() if remainder is less >> than or equal to zero. > > Discussed with? > Reviewed by? > Tested by? > Hi, I've checked MAINTAINERS first. A patch was sent to the freebsd-current mailing list, See XHCI USB debugging thread. Could probably have been discussed a bit more. The cold case logic for pause() is mainly used by the USB code and was factored out from usb_pause_mtx() a long while ago by me. Do you see anything technically wrong about my patch? --HPS From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 13:56:15 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E006BEF8; Fri, 30 Aug 2013 13:56:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id D159B26EB; Fri, 30 Aug 2013 13:56:14 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA14730; Fri, 30 Aug 2013 16:56:12 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VFPBM-0007uL-Bi; Fri, 30 Aug 2013 16:56:12 +0300 Message-ID: <5220A458.3060202@FreeBSD.org> Date: Fri, 30 Aug 2013 16:55:36 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130810 Thunderbird/17.0.8 MIME-Version: 1.0 To: Hans Petter Selasky Subject: Re: svn commit: r255067 - head/sys/kern References: <201308301039.r7UAduI1052038@svn.freebsd.org> <5220A027.8070604@FreeBSD.org> <5220A2DD.5040803@bitfrost.no> In-Reply-To: <5220A2DD.5040803@bitfrost.no> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 13:56:16 -0000 on 30/08/2013 16:49 Hans Petter Selasky said the following: > On 08/30/13 15:37, Andriy Gapon wrote: >> on 30/08/2013 13:39 Hans Petter Selasky said the following: >>> Author: hselasky >>> Date: Fri Aug 30 10:39:56 2013 >>> New Revision: 255067 >>> URL: http://svnweb.freebsd.org/changeset/base/255067 >>> >>> Log: >>> Simplify pause_sbt() logic. Don't call DELAY() if remainder is less >>> than or equal to zero. >> >> Discussed with? >> Reviewed by? >> Tested by? >> > > Hi, > > I've checked MAINTAINERS first. > > A patch was sent to the freebsd-current mailing list, See XHCI USB debugging > thread. I noticed that you committed the patch just a few minutes after making it public. And later noticed that the patch did not result in any improvement. > Could probably have been discussed a bit more. Indeed. > The cold case logic for pause() > is mainly used by the USB code and was factored out from usb_pause_mtx() a long > while ago by me. Oh, I see. > Do you see anything technically wrong about my patch? I don't feel qualified enough. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 14:51:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AFD583FD; Fri, 30 Aug 2013 14:51:15 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (unknown [IPv6:2001:41d0:1:7018::1:3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 494D32AD8; Fri, 30 Aug 2013 14:51:15 +0000 (UTC) Received: from [2001:1b48:10b:cafe:225:64ff:febe:589f] (helo=viking.yzserv.com) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VFQ2a-000PGq-Pd; Fri, 30 Aug 2013 16:51:13 +0200 Message-ID: <5220B15C.6050203@FreeBSD.org> Date: Fri, 30 Aug 2013 16:51:08 +0200 From: =?ISO-8859-15?Q?Jean-S=E9bastien_P=E9dron?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130813 Thunderbird/17.0.8 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r254882 - head/sys/dev/pci References: <201308251809.r7PI9CsE052978@svn.freebsd.org> <201308261055.17964.jhb@freebsd.org> <521F1E0C.5000404@FreeBSD.org> <201308291007.26828.jhb@freebsd.org> In-Reply-To: <201308291007.26828.jhb@freebsd.org> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2ETXCTURHJDGLUJQMSAWP" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 14:51:15 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2ETXCTURHJDGLUJQMSAWP Content-Type: multipart/mixed; boundary="------------090600000304090500090803" This is a multi-part message in MIME format. --------------090600000304090500090803 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 29.08.2013 16:07, John Baldwin wrote: > Here is an untested cut at this, it only changes these functions and do= esn't > fix the callers to work with the returned struct resource, etc.: I attached an updated patch including changes to pcivar.h and radeon. However, BUS_ALLOC_RESOURCE() returns NULL in my tests. --=20 Jean-S=E9bastien P=E9dron --------------090600000304090500090803 Content-Type: text/x-patch; name="vgapci.2.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="vgapci.2.patch" diff --git a/sys/dev/drm2/radeon/radeon_bios.c b/sys/dev/drm2/radeon/rade= on_bios.c index b9ee4d1..11e9be4 100644 --- a/sys/dev/drm2/radeon/radeon_bios.c +++ b/sys/dev/drm2/radeon/radeon_bios.c @@ -100,6 +100,7 @@ static bool igp_read_bios_from_vram(struct radeon_dev= ice *rdev) =20 static bool radeon_read_bios(struct radeon_device *rdev) { + struct resource *res; uint8_t __iomem *bios; size_t size; =20 @@ -107,10 +108,13 @@ static bool radeon_read_bios(struct radeon_device *= rdev) =20 rdev->bios =3D NULL; /* XXX: some cards may return 0 for rom size? ddx has a workaround */ - bios =3D vga_pci_map_bios(rdev->dev, &size); - if (!bios) { + res =3D vga_pci_map_bios(rdev->dev); + DRM_INFO("%s: res=3D%p\n", __func__, res); + if (!res) { return false; } + bios =3D rman_get_virtual(res); + size =3D rman_get_size(res); DRM_INFO("%s: Map address: %p (%zu bytes)\n", __func__, bios, size); =20 if (size =3D=3D 0 || bios[0] !=3D 0x55 || bios[1] !=3D 0xaa) { @@ -120,11 +124,11 @@ static bool radeon_read_bios(struct radeon_device *= rdev) DRM_INFO("%s: Incorrect BIOS signature: 0x%02X%02X\n", __func__, bios[0], bios[1]); } - vga_pci_unmap_bios(rdev->dev, bios); + vga_pci_unmap_bios(rdev->dev, res); } rdev->bios =3D malloc(size, DRM_MEM_DRIVER, M_WAITOK); memcpy(rdev->bios, bios, size); - vga_pci_unmap_bios(rdev->dev, bios); + vga_pci_unmap_bios(rdev->dev, res); return true; } =20 diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index d733e3b..a8148e9 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -520,8 +520,8 @@ int pci_bar_enabled(device_t dev, struct pci_map *pm)= ; #define VGA_PCI_BIOS_SHADOW_ADDR 0xC0000 #define VGA_PCI_BIOS_SHADOW_SIZE 131072 =20 -int vga_pci_is_boot_display(device_t dev); -void * vga_pci_map_bios(device_t dev, size_t *size); -void vga_pci_unmap_bios(device_t dev, void *bios); +int vga_pci_is_boot_display(device_t dev); +struct resource * vga_pci_map_bios(device_t dev); +void vga_pci_unmap_bios(device_t dev, struct resource *res); =20 #endif /* _PCIVAR_H_ */ diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c index 94c64c0..59c954e 100644 --- a/sys/dev/pci/vga_pci.c +++ b/sys/dev/pci/vga_pci.c @@ -46,11 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include =20 -#if defined(__amd64__) || defined(__i386__) || defined(__ia64__) -#include -#include -#endif - #include #include =20 @@ -72,95 +67,6 @@ TUNABLE_INT("hw.pci.default_vgapci_unit", &vga_pci_def= ault_unit); SYSCTL_INT(_hw_pci, OID_AUTO, default_vgapci_unit, CTLFLAG_RDTUN, &vga_pci_default_unit, -1, "Default VGA-compatible display"); =20 -int -vga_pci_is_boot_display(device_t dev) -{ - - /* - * Return true if the given device is the default display used - * at boot time. - */ - - return ( - (pci_get_class(dev) =3D=3D PCIC_DISPLAY || - (pci_get_class(dev) =3D=3D PCIC_OLD && - pci_get_subclass(dev) =3D=3D PCIS_OLD_VGA)) && - device_get_unit(dev) =3D=3D vga_pci_default_unit); -} - -void * -vga_pci_map_bios(device_t dev, size_t *size) -{ - int rid; - struct resource *res; - -#if defined(__amd64__) || defined(__i386__) || defined(__ia64__) - if (vga_pci_is_boot_display(dev)) { - /* - * On x86, the System BIOS copy the default display - * device's Video BIOS at a fixed location in system - * memory (0xC0000, 128 kBytes long) at boot time. - * - * We use this copy for the default boot device, because - * the original ROM may not be valid after boot. - */ - - *size =3D VGA_PCI_BIOS_SHADOW_SIZE; - return (pmap_mapbios(VGA_PCI_BIOS_SHADOW_ADDR, *size)); - } -#endif - - rid =3D PCIR_BIOS; - res =3D bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (res =3D=3D NULL) { - return (NULL); - } - - *size =3D rman_get_size(res); - return (rman_get_virtual(res)); -} - -void -vga_pci_unmap_bios(device_t dev, void *bios) -{ - int rid; - struct resource *res; - - if (bios =3D=3D NULL) { - return; - } - -#if defined(__amd64__) || defined(__i386__) || defined(__ia64__) - if (vga_pci_is_boot_display(dev)) { - /* We mapped the BIOS shadow copy located at 0xC0000. */ - pmap_unmapdev((vm_offset_t)bios, VGA_PCI_BIOS_SHADOW_SIZE); - - return; - } -#endif - - /* - * FIXME: We returned only the virtual address of the resource - * to the caller. Now, to get the resource struct back, we - * allocate it again: the struct exists once in memory in - * device softc. Therefore, we release twice now to release the - * reference we just obtained to get the structure back and the - * caller's reference. - */ - - rid =3D PCIR_BIOS; - res =3D bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - - KASSERT(res !=3D NULL, - ("%s: Can't get BIOS resource back", __func__)); - KASSERT(bios =3D=3D rman_get_virtual(res), - ("%s: Given BIOS address doesn't match " - "resource virtual address", __func__)); - - bus_release_resource(dev, SYS_RES_MEMORY, rid, bios); - bus_release_resource(dev, SYS_RES_MEMORY, rid, bios); -} - static int vga_pci_probe(device_t dev) { @@ -327,6 +233,75 @@ vga_pci_release_resource(device_t dev, device_t chil= d, int type, int rid, return (bus_release_resource(dev, type, rid, r)); } =20 +int +vga_pci_is_boot_display(device_t dev) +{ + + /* + * Return true if the given device is the default display used + * at boot time. + */ + + return ( + (pci_get_class(dev) =3D=3D PCIC_DISPLAY || + (pci_get_class(dev) =3D=3D PCIC_OLD && + pci_get_subclass(dev) =3D=3D PCIS_OLD_VGA)) && + device_get_unit(dev) =3D=3D vga_pci_default_unit); +} + +struct resource * +vga_pci_map_bios(device_t dev) +{ + int rid; + +#if defined(__amd64__) || defined(__i386__) || defined(__ia64__) + if (vga_pci_is_boot_display(dev)) { + /* + * On x86, the System BIOS copy the default display + * device's Video BIOS at a fixed location in system + * memory (0xC0000, 128 kBytes long) at boot time. + * + * We use this copy for the default boot device, because + * the original ROM may not be valid after boot. + * + * Allocate this from our grandparent to by-pass the + * checks for a valid rid in the PCI bus driver as this + * is not a BAR. + */ + rid =3D 1; + return (BUS_ALLOC_RESOURCE(device_get_parent( + device_get_parent(dev)), dev, SYS_RES_MEMORY, &rid, + VGA_PCI_BIOS_SHADOW_ADDR, + VGA_PCI_BIOS_SHADOW_ADDR + VGA_PCI_BIOS_SHADOW_SIZE - 1, + VGA_PCI_BIOS_SHADOW_SIZE, RF_ACTIVE)); + } +#endif + + rid =3D PCIR_BIOS; + return (vga_pci_alloc_resource(dev, NULL, SYS_RES_MEMORY, &rid, 0ul, + ~0ul, 1, RF_ACTIVE)); +} + +void +vga_pci_unmap_bios(device_t dev, struct resource *res) +{ + + if (res =3D=3D NULL) { + return; + } + +#if defined(__amd64__) || defined(__i386__) || defined(__ia64__) + if (vga_pci_is_boot_display(dev)) { + /* We mapped the BIOS shadow copy located at 0xC0000. */ + BUS_RELEASE_RESOURCE(device_get_parent( + device_get_parent(dev)), dev, SYS_RES_MEMORY, 1, res); + + return; + } +#endif + vga_pci_release_resource(dev, NULL, SYS_RES_MEMORY, PCIR_BIOS, res); +} + /* PCI interface. */ =20 static uint32_t --------------090600000304090500090803-- ------enig2ETXCTURHJDGLUJQMSAWP 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.21 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIgsWAACgkQa+xGJsFYOlMSWQCgghxVpqRptcq6Elr3q4LwpReL fSgAn3Hx/EiAuclofsPShxVwLBxDwR1g =Nab5 -----END PGP SIGNATURE----- ------enig2ETXCTURHJDGLUJQMSAWP-- From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 14:53:04 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 28BF9545; Fri, 30 Aug 2013 14:53:04 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E9B462AE8; Fri, 30 Aug 2013 14:53:03 +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 1VFQ4H-000Nag-9g; Fri, 30 Aug 2013 14:52:57 +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 r7UEqss9057144; Fri, 30 Aug 2013 08:52:54 -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: U2FsdGVkX19D4VCvE3UbeaTp1OiPNNWJ Subject: Re: svn commit: r255067 - head/sys/kern From: Ian Lepore To: Andriy Gapon In-Reply-To: <5220A458.3060202@FreeBSD.org> References: <201308301039.r7UAduI1052038@svn.freebsd.org> <5220A027.8070604@FreeBSD.org> <5220A2DD.5040803@bitfrost.no> <5220A458.3060202@FreeBSD.org> Content-Type: text/plain; charset="us-ascii" Date: Fri, 30 Aug 2013 08:52:54 -0600 Message-ID: <1377874374.1111.328.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: Hans Petter Selasky , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 14:53:04 -0000 On Fri, 2013-08-30 at 16:55 +0300, Andriy Gapon wrote: > on 30/08/2013 16:49 Hans Petter Selasky said the following: > > On 08/30/13 15:37, Andriy Gapon wrote: > >> on 30/08/2013 13:39 Hans Petter Selasky said the following: > >>> Author: hselasky > >>> Date: Fri Aug 30 10:39:56 2013 > >>> New Revision: 255067 > >>> URL: http://svnweb.freebsd.org/changeset/base/255067 > >>> > >>> Log: > >>> Simplify pause_sbt() logic. Don't call DELAY() if remainder is less > >>> than or equal to zero. > >> > >> Discussed with? > >> Reviewed by? > >> Tested by? > >> > > > > Hi, > > > > I've checked MAINTAINERS first. > > > > A patch was sent to the freebsd-current mailing list, See XHCI USB debugging > > thread. > > I noticed that you committed the patch just a few minutes after making it > public. And later noticed that the patch did not result in any improvement. > > > Could probably have been discussed a bit more. > > Indeed. > > > The cold case logic for pause() > > is mainly used by the USB code and was factored out from usb_pause_mtx() a long > > while ago by me. > > Oh, I see. > > > Do you see anything technically wrong about my patch? > > I don't feel qualified enough. > What I want to know is why a DELAY() loop needs to function well with delay values longer than 1 second. Are we really doing that? -- Ian From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 15:21:01 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F316E1C4; Fri, 30 Aug 2013 15:21:00 +0000 (UTC) (envelope-from hans.petter.selasky@bitfrost.no) Received: from mta.bitpro.no (mta.bitpro.no [92.42.64.202]) by mx1.freebsd.org (Postfix) with ESMTP id 7DEEF2CAE; Fri, 30 Aug 2013 15:21:00 +0000 (UTC) Received: from mail.lockless.no (mail.lockless.no [46.29.221.38]) by mta.bitpro.no (Postfix) with ESMTP id 891657A329; Fri, 30 Aug 2013 17:20:59 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.lockless.no (Postfix) with ESMTP id B614C8EB90A; Fri, 30 Aug 2013 17:21:12 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at lockless.no Received: from mail.lockless.no ([127.0.0.1]) by localhost (mail.lockless.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CxTJt0eyZEdJ; Fri, 30 Aug 2013 17:21:11 +0200 (CEST) Received: from mail.lockless.no (localhost [127.0.0.1]) by mail.lockless.no (Postfix) with ESMTP id 653C58EB909; Fri, 30 Aug 2013 17:21:11 +0200 (CEST) Subject: RE: svn commit: r255067 - head/sys/kern From: =?utf-8?Q?Hans_Petter_Selasky?= To: =?utf-8?Q?Ian_Lepore?= , =?utf-8?Q?Andriy_Gapon?= Date: Fri, 30 Aug 2013 17:21:11 +0200 Mime-Version: 1.0 In-Reply-To: <1377874374.1111.328.camel@revolution.hippie.lan> References: <201308301039.r7UAduI1052038@svn.freebsd.org> X-Priority: 3 (Normal) X-Mailer: Zarafa 7.1.4-41394 Message-Id: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: =?utf-8?Q?svn-src-head=40FreeBSD=2Eorg?= , =?utf-8?Q?svn-src-all=40FreeBSD=2Eorg?= , =?utf-8?Q?src-committers=40FreeBSD=2Eorg?= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 15:21:01 -0000 Hi Ian,=0D=0A=0D=0AJust do a:=0D=0A=0D=0Agrep -r DELAY sys=0D=0A=0D=0AMos= tly when kernel is in panic mode and at the end of shutdown.=0D=0A=0D=0A-= -HPS=20=0D=0A=20=0D=0A-----Original message-----=0D=0A> From:Ian Lepore <= ian@FreeBSD.org >=0D=0A> Sent: Friday 30th Augus= t 2013 16:53=0D=0A> To: Andriy Gapon >=0D=0A> Cc: Hans Petter Selasky >; src-committers@FreeBSD.org <= mailto:src-committers@FreeBSD.org> ; svn-src-all@FreeBSD.org ; svn-src-head@FreeBSD.org =20=0D=0A> Subject: Re: svn commit: r255067 - head/sys/kern=0D=0A= >=20=0D=0A=0D=0A>=20=0D=0A> What I want to know is why a DELAY() loop nee= ds to function well with=0D=0A> delay values longer than 1 second. Are w= e really doing that=3F=0D=0A>=20=0D=0A> -- Ian=0D=0A>=20=0D=0A>=20=0D=0A>= =20=0D=0A=0D=0A From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 15:26:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 35811331; Fri, 30 Aug 2013 15:26:46 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 21E142CD3; Fri, 30 Aug 2013 15:26:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UFQjtk017890; Fri, 30 Aug 2013 15:26:45 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UFQjkX017889; Fri, 30 Aug 2013 15:26:45 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201308301526.r7UFQjkX017889@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 30 Aug 2013 15:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255074 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 15:26:46 -0000 Author: marcel Date: Fri Aug 30 15:26:45 2013 New Revision: 255074 URL: http://svnweb.freebsd.org/changeset/base/255074 Log: A final test with unmodified code has shown that a delay of 150ms is not giving us a 100% success rate. Bump the delay to 200ms as that seems to do the trick. Note that during testing the delay was added to uart_bus_attach() in uart_core.c. While having the delay in a different place can change the behaviour, it was not expected. Having to bump the delay with another 50ms could therefore be an indication that the problem can not be solved with delays. Reported by: kevlo@ Tested by: kevlo@ Modified: head/sys/dev/uart/uart_dev_ns8250.c Modified: head/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- head/sys/dev/uart/uart_dev_ns8250.c Fri Aug 30 13:25:15 2013 (r255073) +++ head/sys/dev/uart/uart_dev_ns8250.c Fri Aug 30 15:26:45 2013 (r255074) @@ -465,7 +465,7 @@ ns8250_bus_attach(struct uart_softc *sc) * accidental manner as before. More analysis is warranted, but * at least now we fixed a known regression. */ - DELAY(150); + DELAY(200); return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 17:14:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E46A71B3; Fri, 30 Aug 2013 17:14:01 +0000 (UTC) (envelope-from jase@FreeBSD.org) Received: from svr06-mx.btshosting.co.uk (mx-2.btshosting.co.uk [IPv6:2a01:4f8:121:2403:2::]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A56472325; Fri, 30 Aug 2013 17:14:01 +0000 (UTC) Received: from [192.168.1.65] (unknown [90.202.210.251]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by svr06-mx.btshosting.co.uk (Postfix) with ESMTPSA id CCC5184438; Fri, 30 Aug 2013 17:13:59 +0000 (UTC) Message-ID: <5220D2D5.6030105@FreeBSD.org> Date: Fri, 30 Aug 2013 18:13:57 +0100 From: Jase Thew Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Jamie Gritton Subject: Re: svn commit: r252841 - in head/sys: dev/mem kern sys References: <201307052131.r65LVGKr089550@svn.freebsd.org> In-Reply-To: <201307052131.r65LVGKr089550@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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 17:14:02 -0000 On 05/07/2013 22:31, Jamie Gritton wrote: > Author: jamie > Date: Fri Jul 5 21:31:16 2013 > New Revision: 252841 > URL: http://svnweb.freebsd.org/changeset/base/252841 > > Log: > Add new privileges, PRIV_KMEM_READ and PRIV_KMEM_WRITE, used in opening > /dev/kmem and /dev/mem (in addition to traditional file permission checks). > PRIV_KMEM_READ is different from other PRIV_* checks in that it's allowed > by default. > > Reviewed by: kib, mckusick > Hi Jamie, As a result of this commit (and r252845), it is no longer possible to access /dev/mem and /dev/kmem inside of a jail - is this behaviour intentional? # dd if=/dev/mem bs=64 count=1 dd: /dev/mem: Operation not permitted Regards, Jase. -- Jase Thew jase@FreeBSD.org FreeBSD Ports Committer From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 18:03:55 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 144D9C3C; Fri, 30 Aug 2013 18:03:55 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from m2.gritton.org (gritton.org [199.192.164.235]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E517925D3; Fri, 30 Aug 2013 18:03:54 +0000 (UTC) Received: from guppy.corp.verio.net (fw.oremut02.us.wh.verio.net [198.65.168.24]) (authenticated bits=0) by m2.gritton.org (8.14.5/8.14.5) with ESMTP id r7UI3lCk046145; Fri, 30 Aug 2013 12:03:47 -0600 (MDT) (envelope-from jamie@FreeBSD.org) Message-ID: <5220DE7D.5000806@FreeBSD.org> Date: Fri, 30 Aug 2013 12:03:41 -0600 From: Jamie Gritton User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130807 Thunderbird/17.0.7 MIME-Version: 1.0 To: Jase Thew Subject: Re: svn commit: r252841 - in head/sys: dev/mem kern sys References: <201307052131.r65LVGKr089550@svn.freebsd.org> <5220D2D5.6030105@FreeBSD.org> In-Reply-To: <5220D2D5.6030105@FreeBSD.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 18:03:55 -0000 On 08/30/13 11:13, Jase Thew wrote: > On 05/07/2013 22:31, Jamie Gritton wrote: >> Author: jamie >> Date: Fri Jul 5 21:31:16 2013 >> New Revision: 252841 >> URL: http://svnweb.freebsd.org/changeset/base/252841 >> >> Log: >> Add new privileges, PRIV_KMEM_READ and PRIV_KMEM_WRITE, used in >> opening >> /dev/kmem and /dev/mem (in addition to traditional file permission >> checks). >> PRIV_KMEM_READ is different from other PRIV_* checks in that it's >> allowed >> by default. >> >> Reviewed by: kib, mckusick >> > > Hi Jamie, > > As a result of this commit (and r252845), it is no longer possible to > access /dev/mem and /dev/kmem inside of a jail - is this behaviour > intentional? > > # dd if=/dev/mem bs=64 count=1 > dd: /dev/mem: Operation not permitted It's intentional, but it's not intended to be the full solution. I also need to add a permission flag to jails to allow kmem access. However I didn't intend to disrupt read permission, though clearly it does since it now passes through prison_priv_check. So I ought to add some code in prison_priv_check that mirrors the code in priv_check_cred to allow PRIV_KMEM_READ by default. - Jamie From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 18:29:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8058CFFE; Fri, 30 Aug 2013 18:29:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 51D5526F8; Fri, 30 Aug 2013 18:29:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UITQuM021817; Fri, 30 Aug 2013 18:29:26 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UITQwX021816; Fri, 30 Aug 2013 18:29:26 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201308301829.r7UITQwX021816@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Aug 2013 18:29:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255076 - head/contrib/llvm/lib/Transforms/InstCombine X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 18:29:26 -0000 Author: dim Date: Fri Aug 30 18:29:25 2013 New Revision: 255076 URL: http://svnweb.freebsd.org/changeset/base/255076 Log: Pull in r189672 from upstream llvm trunk: InstCombine: Check for zero shift amounts before subtracting one causing integer overflow. PR17026. Also avoid undefined shifts and shift amounts larger than 64 bits (those are always undef because we can't represent integer types that large). This should fix assertion failures when building the emulators/xmame port. Reported by: bapt Modified: head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp Modified: head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp ============================================================================== --- head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp Fri Aug 30 17:47:53 2013 (r255075) +++ head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp Fri Aug 30 18:29:25 2013 (r255076) @@ -845,21 +845,26 @@ Value *InstCombiner::SimplifyDemandedUse Value *InstCombiner::SimplifyShrShlDemandedBits(Instruction *Shr, Instruction *Shl, APInt DemandedMask, APInt &KnownZero, APInt &KnownOne) { - unsigned ShlAmt = cast(Shl->getOperand(1))->getZExtValue(); - unsigned ShrAmt = cast(Shr->getOperand(1))->getZExtValue(); + const APInt &ShlOp1 = cast(Shl->getOperand(1))->getValue(); + const APInt &ShrOp1 = cast(Shr->getOperand(1))->getValue(); + if (!ShlOp1 || !ShrOp1) + return 0; // Noop. + + Value *VarX = Shr->getOperand(0); + Type *Ty = VarX->getType(); + unsigned BitWidth = Ty->getIntegerBitWidth(); + if (ShlOp1.uge(BitWidth) || ShrOp1.uge(BitWidth)) + return 0; // Undef. + + unsigned ShlAmt = ShlOp1.getZExtValue(); + unsigned ShrAmt = ShrOp1.getZExtValue(); KnownOne.clearAllBits(); KnownZero = APInt::getBitsSet(KnownZero.getBitWidth(), 0, ShlAmt-1); KnownZero &= DemandedMask; - if (ShlAmt == 0 || ShrAmt == 0) - return 0; - - Value *VarX = Shr->getOperand(0); - Type *Ty = VarX->getType(); - - APInt BitMask1(APInt::getAllOnesValue(Ty->getIntegerBitWidth())); - APInt BitMask2(APInt::getAllOnesValue(Ty->getIntegerBitWidth())); + APInt BitMask1(APInt::getAllOnesValue(BitWidth)); + APInt BitMask2(APInt::getAllOnesValue(BitWidth)); bool isLshr = (Shr->getOpcode() == Instruction::LShr); BitMask1 = isLshr ? (BitMask1.lshr(ShrAmt) << ShlAmt) : From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 19:21:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DDA8DA76; Fri, 30 Aug 2013 19:21:12 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BC1C429B6; Fri, 30 Aug 2013 19:21:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UJLCFU052975; Fri, 30 Aug 2013 19:21:12 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UJLCCu052974; Fri, 30 Aug 2013 19:21:12 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201308301921.r7UJLCCu052974@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Fri, 30 Aug 2013 19:21:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255077 - head/sys/dev/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 19:21:13 -0000 Author: dumbbell Date: Fri Aug 30 19:21:12 2013 New Revision: 255077 URL: http://svnweb.freebsd.org/changeset/base/255077 Log: acpi_thermal: Warn about insane _TMP temperature only once A warning is emitted again if the temperature became briefly valid meanwhile. This avoids spamming the user when the sensor is broken. Other values (ie. not _TMP) always raise a warning. Modified: head/sys/dev/acpica/acpi_thermal.c Modified: head/sys/dev/acpica/acpi_thermal.c ============================================================================== --- head/sys/dev/acpica/acpi_thermal.c Fri Aug 30 18:29:25 2013 (r255076) +++ head/sys/dev/acpica/acpi_thermal.c Fri Aug 30 19:21:12 2013 (r255077) @@ -111,6 +111,7 @@ struct acpi_tz_softc { struct acpi_tz_zone tz_zone; /*Thermal zone parameters*/ int tz_validchecks; + int tz_insane_tmp_notified; /* passive cooling */ struct proc *tz_cooling_proc; @@ -161,6 +162,8 @@ static driver_t acpi_tz_driver = { sizeof(struct acpi_tz_softc), }; +static char *acpi_tz_tmp_name = "_TMP"; + static devclass_t acpi_tz_devclass; DRIVER_MODULE(acpi_tz, acpi, acpi_tz_driver, acpi_tz_devclass, 0, 0); MODULE_DEPEND(acpi_tz, acpi, 1, 1, 1); @@ -456,12 +459,11 @@ acpi_tz_get_temperature(struct acpi_tz_s { int temp; ACPI_STATUS status; - static char *tmp_name = "_TMP"; ACPI_FUNCTION_NAME ("acpi_tz_get_temperature"); /* Evaluate the thermal zone's _TMP method. */ - status = acpi_GetInteger(sc->tz_handle, tmp_name, &temp); + status = acpi_GetInteger(sc->tz_handle, acpi_tz_tmp_name, &temp); if (ACPI_FAILURE(status)) { ACPI_VPRINT(sc->tz_dev, acpi_device_get_parent_softc(sc->tz_dev), "error fetching current temperature -- %s\n", @@ -470,7 +472,7 @@ acpi_tz_get_temperature(struct acpi_tz_s } /* Check it for validity. */ - acpi_tz_sanity(sc, &temp, tmp_name); + acpi_tz_sanity(sc, &temp, acpi_tz_tmp_name); if (temp == -1) return (FALSE); @@ -696,10 +698,29 @@ static void acpi_tz_sanity(struct acpi_tz_softc *sc, int *val, char *what) { if (*val != -1 && (*val < TZ_ZEROC || *val > TZ_ZEROC + 2000)) { - device_printf(sc->tz_dev, "%s value is absurd, ignored (%d.%dC)\n", - what, TZ_KELVTOC(*val)); + /* + * If the value we are checking is _TMP, warn the user only + * once. This avoids spamming messages if, for instance, the + * sensor is broken and always returns an invalid temperature. + * + * This is only done for _TMP; other values always emit a + * warning. + */ + if (what != acpi_tz_tmp_name || !sc->tz_insane_tmp_notified) { + device_printf(sc->tz_dev, "%s value is absurd, ignored (%d.%dC)\n", + what, TZ_KELVTOC(*val)); + + /* Don't warn the user again if the read value doesn't improve. */ + if (what == acpi_tz_tmp_name) + sc->tz_insane_tmp_notified = 1; + } *val = -1; + return; } + + /* This value is correct. Warn if it's incorrect again. */ + if (what == acpi_tz_tmp_name) + sc->tz_insane_tmp_notified = 0; } /* From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 19:42:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9DD1E3BD; Fri, 30 Aug 2013 19:42:25 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A2B32B0D; Fri, 30 Aug 2013 19:42:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UJgPmB064920; Fri, 30 Aug 2013 19:42:25 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UJgPE3064919; Fri, 30 Aug 2013 19:42:25 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201308301942.r7UJgPE3064919@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 30 Aug 2013 19:42:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255078 - head/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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 19:42:25 -0000 Author: pjd Date: Fri Aug 30 19:42:25 2013 New Revision: 255078 URL: http://svnweb.freebsd.org/changeset/base/255078 Log: Style cleanups. Modified: head/sys/sys/sysctl.h Modified: head/sys/sys/sysctl.h ============================================================================== --- head/sys/sys/sysctl.h Fri Aug 30 19:21:12 2013 (r255077) +++ head/sys/sys/sysctl.h Fri Aug 30 19:42:25 2013 (r255078) @@ -48,7 +48,7 @@ struct thread; * respective subsystem header files. */ -#define CTL_MAXNAME 24 /* largest number of components supported */ +#define CTL_MAXNAME 24 /* largest number of components supported */ /* * Each subsystem defined by sysctl defines a list of variables @@ -59,10 +59,10 @@ struct thread; */ struct ctlname { char *ctl_name; /* subsystem name */ - int ctl_type; /* type of name */ + int ctl_type; /* type of name */ }; -#define CTLTYPE 0xf /* Mask for the type */ +#define CTLTYPE 0xf /* mask for the type */ #define CTLTYPE_NODE 1 /* name is a node */ #define CTLTYPE_INT 2 /* name describes an integer */ #define CTLTYPE_STRING 3 /* name describes a string */ @@ -74,35 +74,35 @@ struct ctlname { #define CTLTYPE_ULONG 8 /* name describes an unsigned long */ #define CTLTYPE_U64 9 /* name describes an unsigned 64-bit number */ -#define CTLFLAG_RD 0x80000000 /* Allow reads of variable */ -#define CTLFLAG_WR 0x40000000 /* Allow writes to the variable */ -#define CTLFLAG_RW (CTLFLAG_RD|CTLFLAG_WR) -#define CTLFLAG_ANYBODY 0x10000000 /* All users can set this var */ -#define CTLFLAG_SECURE 0x08000000 /* Permit set only if securelevel<=0 */ -#define CTLFLAG_PRISON 0x04000000 /* Prisoned roots can fiddle */ -#define CTLFLAG_DYN 0x02000000 /* Dynamic oid - can be freed */ -#define CTLFLAG_SKIP 0x01000000 /* Skip this sysctl when listing */ -#define CTLMASK_SECURE 0x00F00000 /* Secure level */ -#define CTLFLAG_TUN 0x00080000 /* Tunable variable */ +#define CTLFLAG_RD 0x80000000 /* Allow reads of variable */ +#define CTLFLAG_WR 0x40000000 /* Allow writes to the variable */ +#define CTLFLAG_RW (CTLFLAG_RD|CTLFLAG_WR) +#define CTLFLAG_ANYBODY 0x10000000 /* All users can set this var */ +#define CTLFLAG_SECURE 0x08000000 /* Permit set only if securelevel<=0 */ +#define CTLFLAG_PRISON 0x04000000 /* Prisoned roots can fiddle */ +#define CTLFLAG_DYN 0x02000000 /* Dynamic oid - can be freed */ +#define CTLFLAG_SKIP 0x01000000 /* Skip this sysctl when listing */ +#define CTLMASK_SECURE 0x00F00000 /* Secure level */ +#define CTLFLAG_TUN 0x00080000 /* Tunable variable */ #define CTLFLAG_RDTUN (CTLFLAG_RD|CTLFLAG_TUN) #define CTLFLAG_RWTUN (CTLFLAG_RW|CTLFLAG_TUN) -#define CTLFLAG_MPSAFE 0x00040000 /* Handler is MP safe */ -#define CTLFLAG_VNET 0x00020000 /* Prisons with vnet can fiddle */ -#define CTLFLAG_DYING 0x00010000 /* oid is being removed */ -#define CTLFLAG_CAPRD 0x00008000 /* Can be read in capability mode */ -#define CTLFLAG_CAPWR 0x00004000 /* Can be written in capability mode */ -#define CTLFLAG_STATS 0x00002000 /* Statistics, not a tuneable */ -#define CTLFLAG_CAPRW (CTLFLAG_CAPRD|CTLFLAG_CAPWR) +#define CTLFLAG_MPSAFE 0x00040000 /* Handler is MP safe */ +#define CTLFLAG_VNET 0x00020000 /* Prisons with vnet can fiddle */ +#define CTLFLAG_DYING 0x00010000 /* Oid is being removed */ +#define CTLFLAG_CAPRD 0x00008000 /* Can be read in capability mode */ +#define CTLFLAG_CAPWR 0x00004000 /* Can be written in capability mode */ +#define CTLFLAG_STATS 0x00002000 /* Statistics, not a tuneable */ +#define CTLFLAG_CAPRW (CTLFLAG_CAPRD|CTLFLAG_CAPWR) /* - * Secure level. Note that CTLFLAG_SECURE == CTLFLAG_SECURE1. + * Secure level. Note that CTLFLAG_SECURE == CTLFLAG_SECURE1. * * Secure when the securelevel is raised to at least N. */ -#define CTLSHIFT_SECURE 20 -#define CTLFLAG_SECURE1 (CTLFLAG_SECURE | (0 << CTLSHIFT_SECURE)) -#define CTLFLAG_SECURE2 (CTLFLAG_SECURE | (1 << CTLSHIFT_SECURE)) -#define CTLFLAG_SECURE3 (CTLFLAG_SECURE | (2 << CTLSHIFT_SECURE)) +#define CTLSHIFT_SECURE 20 +#define CTLFLAG_SECURE1 (CTLFLAG_SECURE | (0 << CTLSHIFT_SECURE)) +#define CTLFLAG_SECURE2 (CTLFLAG_SECURE | (1 << CTLSHIFT_SECURE)) +#define CTLFLAG_SECURE3 (CTLFLAG_SECURE | (2 << CTLSHIFT_SECURE)) /* * USE THIS instead of a hardwired number from the categories below @@ -110,19 +110,19 @@ struct ctlname { * technology. This is the way nearly all new sysctl variables should * be implemented. * e.g. SYSCTL_INT(_parent, OID_AUTO, name, CTLFLAG_RW, &variable, 0, ""); - */ -#define OID_AUTO (-1) + */ +#define OID_AUTO (-1) /* * The starting number for dynamically-assigned entries. WARNING! * ALL static sysctl entries should have numbers LESS than this! */ -#define CTL_AUTO_START 0x100 +#define CTL_AUTO_START 0x100 #ifdef _KERNEL #include -#define SYSCTL_HANDLER_ARGS struct sysctl_oid *oidp, void *arg1, \ +#define SYSCTL_HANDLER_ARGS struct sysctl_oid *oidp, void *arg1, \ intptr_t arg2, struct sysctl_req *req /* definitions for sysctl_req 'lock' member */ @@ -130,8 +130,8 @@ struct ctlname { #define REQ_WIRED 2 /* definitions for sysctl_req 'flags' member */ -#if defined(__amd64__) || defined(__ia64__) || defined(__powerpc64__) || \ - (defined(__mips__) && defined(__mips_n64)) +#if defined(__amd64__) || defined(__ia64__) || defined(__powerpc64__) ||\ + (defined(__mips__) && defined(__mips_n64)) #define SCTL_MASK32 1 /* 32 bit emulation */ #endif @@ -141,17 +141,17 @@ struct ctlname { */ struct sysctl_req { struct thread *td; /* used for access checking */ - int lock; /* wiring state */ + int lock; /* wiring state */ void *oldptr; - size_t oldlen; - size_t oldidx; + size_t oldlen; + size_t oldidx; int (*oldfunc)(struct sysctl_req *, const void *, size_t); void *newptr; - size_t newlen; - size_t newidx; + size_t newlen; + size_t newidx; int (*newfunc)(struct sysctl_req *, void *, size_t); - size_t validlen; - int flags; + size_t validlen; + int flags; }; SLIST_HEAD(sysctl_oid_list, sysctl_oid); @@ -163,20 +163,20 @@ SLIST_HEAD(sysctl_oid_list, sysctl_oid); struct sysctl_oid { struct sysctl_oid_list *oid_parent; SLIST_ENTRY(sysctl_oid) oid_link; - int oid_number; - u_int oid_kind; + int oid_number; + u_int oid_kind; void *oid_arg1; - intptr_t oid_arg2; + intptr_t oid_arg2; const char *oid_name; - int (*oid_handler)(SYSCTL_HANDLER_ARGS); + int (*oid_handler)(SYSCTL_HANDLER_ARGS); const char *oid_fmt; - int oid_refcnt; - u_int oid_running; + int oid_refcnt; + u_int oid_running; const char *oid_descr; }; -#define SYSCTL_IN(r, p, l) (r->newfunc)(r, p, l) -#define SYSCTL_OUT(r, p, l) (r->oldfunc)(r, p, l) +#define SYSCTL_IN(r, p, l) (r->newfunc)(r, p, l) +#define SYSCTL_OUT(r, p, l) (r->oldfunc)(r, p, l) int sysctl_handle_int(SYSCTL_HANDLER_ARGS); int sysctl_msec_to_ticks(SYSCTL_HANDLER_ARGS); @@ -197,18 +197,16 @@ void sysctl_register_oid(struct sysctl_o void sysctl_unregister_oid(struct sysctl_oid *oidp); /* Declare a static oid to allow child oids to be added to it. */ -#define SYSCTL_DECL(name) \ +#define SYSCTL_DECL(name) \ extern struct sysctl_oid_list sysctl_##name##_children -/* Hide these in macros */ -#define SYSCTL_CHILDREN(oid_ptr) (struct sysctl_oid_list *) \ - (oid_ptr)->oid_arg1 -#define SYSCTL_CHILDREN_SET(oid_ptr, val) \ - (oid_ptr)->oid_arg1 = (val); -#define SYSCTL_STATIC_CHILDREN(oid_name) \ - (&sysctl_##oid_name##_children) +/* Hide these in macros. */ +#define SYSCTL_CHILDREN(oid_ptr) \ + (struct sysctl_oid_list *)(oid_ptr)->oid_arg1 +#define SYSCTL_CHILDREN_SET(oid_ptr, val) (oid_ptr)->oid_arg1 = (val) +#define SYSCTL_STATIC_CHILDREN(oid_name) (&sysctl_##oid_name##_children) -/* === Structs and macros related to context handling === */ +/* === Structs and macros related to context handling. === */ /* All dynamically created sysctls can be tracked in a context list. */ struct sysctl_ctx_entry { @@ -218,7 +216,7 @@ struct sysctl_ctx_entry { TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); -#define SYSCTL_NODE_CHILDREN(parent, name) \ +#define SYSCTL_NODE_CHILDREN(parent, name) \ sysctl_##parent##_##name##_children /* @@ -269,37 +267,48 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a struct __hack #ifndef NO_SYSCTL_DESCR -#define __DESCR(d) d +#define __DESCR(d) d #else -#define __DESCR(d) "" +#define __DESCR(d) "" #endif /* This constructs a "raw" MIB oid. */ -#define SYSCTL_OID(parent, nbr, name, kind, a1, a2, handler, fmt, descr) \ - static struct sysctl_oid sysctl__##parent##_##name = { \ - &sysctl_##parent##_children, { NULL }, nbr, kind, \ - a1, a2, #name, handler, fmt, 0, 0, __DESCR(descr) }; \ +#define SYSCTL_OID(parent, nbr, name, kind, a1, a2, handler, fmt, descr)\ + static struct sysctl_oid sysctl__##parent##_##name = { \ + &sysctl_##parent##_children, \ + { NULL }, \ + nbr, \ + kind, \ + a1, \ + a2, \ + #name, \ + handler, \ + fmt, \ + 0, \ + 0, \ + __DESCR(descr) \ + }; \ DATA_SET(sysctl_set, sysctl__##parent##_##name) -#define SYSCTL_ADD_OID(ctx, parent, nbr, name, kind, a1, a2, handler, fmt, descr) \ +#define SYSCTL_ADD_OID(ctx, parent, nbr, name, kind, a1, a2, handler, fmt, descr) \ sysctl_add_oid(ctx, parent, nbr, name, kind, a1, a2, handler, fmt, __DESCR(descr)) /* This constructs a node from which other oids can hang. */ -#define SYSCTL_NODE(parent, nbr, name, access, handler, descr) \ +#define SYSCTL_NODE(parent, nbr, name, access, handler, descr) \ struct sysctl_oid_list SYSCTL_NODE_CHILDREN(parent, name); \ SYSCTL_OID(parent, nbr, name, CTLTYPE_NODE|(access), \ (void*)&SYSCTL_NODE_CHILDREN(parent, name), 0, handler, "N", descr) -#define SYSCTL_ADD_NODE(ctx, parent, nbr, name, access, handler, descr) \ +#define SYSCTL_ADD_NODE(ctx, parent, nbr, name, access, handler, descr) \ sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_NODE|(access), \ NULL, 0, handler, "N", __DESCR(descr)) /* Oid for a string. len can be 0 to indicate '\0' termination. */ -#define SYSCTL_STRING(parent, nbr, name, access, arg, len, descr) \ +#define SYSCTL_STRING(parent, nbr, name, access, arg, len, descr) \ SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING|(access), \ arg, len, sysctl_handle_string, "A", descr) -#define SYSCTL_ADD_STRING(ctx, parent, nbr, name, access, arg, len, descr) \ +#define SYSCTL_ADD_STRING(ctx, parent, nbr, name, access, arg, len, descr) \ sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_STRING|(access), \ arg, len, sysctl_handle_string, "A", __DESCR(descr)) @@ -394,31 +403,31 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a 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) \ +#define SYSCTL_OPAQUE(parent, nbr, name, access, ptr, len, fmt, descr) \ SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|(access), \ ptr, len, sysctl_handle_opaque, fmt, descr) -#define SYSCTL_ADD_OPAQUE(ctx, parent, nbr, name, access, ptr, len, fmt, descr)\ +#define SYSCTL_ADD_OPAQUE(ctx, parent, nbr, name, access, ptr, len, fmt, descr)\ sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_OPAQUE|(access), \ ptr, len, sysctl_handle_opaque, fmt, __DESCR(descr)) /* Oid for a struct. Specified by a pointer and a type. */ -#define SYSCTL_STRUCT(parent, nbr, name, access, ptr, type, descr) \ +#define SYSCTL_STRUCT(parent, nbr, name, access, ptr, type, descr) \ SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|(access), \ ptr, sizeof(struct type), sysctl_handle_opaque, \ "S," #type, descr) -#define SYSCTL_ADD_STRUCT(ctx, parent, nbr, name, access, ptr, type, descr) \ +#define SYSCTL_ADD_STRUCT(ctx, parent, nbr, name, access, ptr, type, descr) \ sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_OPAQUE|(access), \ ptr, sizeof(struct type), sysctl_handle_opaque, "S," #type, __DESCR(descr)) /* Oid for a procedure. Specified by a pointer and an arg. */ -#define SYSCTL_PROC(parent, nbr, name, access, ptr, arg, handler, fmt, descr) \ +#define SYSCTL_PROC(parent, nbr, name, access, ptr, arg, handler, fmt, descr) \ CTASSERT(((access) & CTLTYPE) != 0); \ SYSCTL_OID(parent, nbr, name, (access), \ ptr, arg, handler, fmt, descr) -#define SYSCTL_ADD_PROC(ctx, parent, nbr, name, access, ptr, arg, handler, fmt, descr) \ +#define SYSCTL_ADD_PROC(ctx, parent, nbr, name, access, ptr, arg, handler, fmt, descr) \ sysctl_add_oid(ctx, parent, nbr, name, (access), \ ptr, arg, handler, fmt, __DESCR(descr)) @@ -428,7 +437,7 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a */ #define FEATURE(name, desc) \ SYSCTL_INT(_kern_features, OID_AUTO, name, CTLFLAG_RD | CTLFLAG_CAPRD, \ - 0, 1, desc) + NULL, 1, desc) #endif /* _KERNEL */ @@ -450,15 +459,15 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a /* * CTL_KERN identifiers */ -#define KERN_OSTYPE 1 /* string: system version */ -#define KERN_OSRELEASE 2 /* string: system release */ -#define KERN_OSREV 3 /* int: system revision */ -#define KERN_VERSION 4 /* string: compile time info */ -#define KERN_MAXVNODES 5 /* int: max vnodes */ -#define KERN_MAXPROC 6 /* int: max processes */ -#define KERN_MAXFILES 7 /* int: max open files */ -#define KERN_ARGMAX 8 /* int: max arguments to exec */ -#define KERN_SECURELVL 9 /* int: system security level */ +#define KERN_OSTYPE 1 /* string: system version */ +#define KERN_OSRELEASE 2 /* string: system release */ +#define KERN_OSREV 3 /* int: system revision */ +#define KERN_VERSION 4 /* string: compile time info */ +#define KERN_MAXVNODES 5 /* int: max vnodes */ +#define KERN_MAXPROC 6 /* int: max processes */ +#define KERN_MAXFILES 7 /* int: max open files */ +#define KERN_ARGMAX 8 /* int: max arguments to exec */ +#define KERN_SECURELVL 9 /* int: system security level */ #define KERN_HOSTNAME 10 /* string: hostname */ #define KERN_HOSTID 11 /* int: host identifier */ #define KERN_CLOCKRATE 12 /* struct: struct clockrate */ @@ -471,14 +480,14 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a #define KERN_JOB_CONTROL 19 /* int: is job control available */ #define KERN_SAVED_IDS 20 /* int: saved set-user/group-ID */ #define KERN_BOOTTIME 21 /* struct: time kernel was booted */ -#define KERN_NISDOMAINNAME 22 /* string: YP domain name */ -#define KERN_UPDATEINTERVAL 23 /* int: update process sleep time */ -#define KERN_OSRELDATE 24 /* int: kernel release date */ -#define KERN_NTP_PLL 25 /* node: NTP PLL control */ +#define KERN_NISDOMAINNAME 22 /* string: YP domain name */ +#define KERN_UPDATEINTERVAL 23 /* int: update process sleep time */ +#define KERN_OSRELDATE 24 /* int: kernel release date */ +#define KERN_NTP_PLL 25 /* node: NTP PLL control */ #define KERN_BOOTFILE 26 /* string: name of booted kernel */ #define KERN_MAXFILESPERPROC 27 /* int: max open files per proc */ -#define KERN_MAXPROCPERUID 28 /* int: max processes per uid */ -#define KERN_DUMPDEV 29 /* struct cdev *: device to dump on */ +#define KERN_MAXPROCPERUID 28 /* int: max processes per uid */ +#define KERN_DUMPDEV 29 /* struct cdev *: device to dump on */ #define KERN_IPC 30 /* node: anything related to IPC */ #define KERN_DUMMY 31 /* unused */ #define KERN_PS_STRINGS 32 /* int: address of PS_STRINGS */ @@ -488,11 +497,10 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a #define KERN_HOSTUUID 36 /* string: host UUID identifier */ #define KERN_ARND 37 /* int: from arc4rand() */ #define KERN_MAXID 38 /* number of valid kern ids */ - /* * KERN_PROC subtypes */ -#define KERN_PROC_ALL 0 /* everything */ +#define KERN_PROC_ALL 0 /* everything */ #define KERN_PROC_PID 1 /* by process id */ #define KERN_PROC_PGRP 2 /* by process group id */ #define KERN_PROC_SESSION 3 /* by session of pid */ @@ -526,7 +534,7 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a /* * KERN_IPC identifiers */ -#define KIPC_MAXSOCKBUF 1 /* int: max size of a socket buffer */ +#define KIPC_MAXSOCKBUF 1 /* int: max size of a socket buffer */ #define KIPC_SOCKBUF_WASTE 2 /* int: wastage factor in sockbuf */ #define KIPC_SOMAXCONN 3 /* int: max length of connection q */ #define KIPC_MAX_LINKHDR 4 /* int: max length of link header */ @@ -546,8 +554,8 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a #define HW_PAGESIZE 7 /* int: software page size */ #define HW_DISKNAMES 8 /* strings: disk drive names */ #define HW_DISKSTATS 9 /* struct: diskstats[] */ -#define HW_FLOATINGPT 10 /* int: has HW floating point? */ -#define HW_MACHINE_ARCH 11 /* string: machine architecture */ +#define HW_FLOATINGPT 10 /* int: has HW floating point? */ +#define HW_MACHINE_ARCH 11 /* string: machine architecture */ #define HW_REALMEM 12 /* int: 'real' memory */ #define HW_MAXID 13 /* number of valid hw ids */ @@ -576,33 +584,33 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a #define USER_TZNAME_MAX 20 /* int: POSIX2_TZNAME_MAX */ #define USER_MAXID 21 /* number of valid user ids */ -#define CTL_P1003_1B_ASYNCHRONOUS_IO 1 /* boolean */ -#define CTL_P1003_1B_MAPPED_FILES 2 /* boolean */ -#define CTL_P1003_1B_MEMLOCK 3 /* boolean */ -#define CTL_P1003_1B_MEMLOCK_RANGE 4 /* boolean */ -#define CTL_P1003_1B_MEMORY_PROTECTION 5 /* boolean */ -#define CTL_P1003_1B_MESSAGE_PASSING 6 /* boolean */ -#define CTL_P1003_1B_PRIORITIZED_IO 7 /* boolean */ -#define CTL_P1003_1B_PRIORITY_SCHEDULING 8 /* boolean */ -#define CTL_P1003_1B_REALTIME_SIGNALS 9 /* boolean */ -#define CTL_P1003_1B_SEMAPHORES 10 /* boolean */ -#define CTL_P1003_1B_FSYNC 11 /* boolean */ -#define CTL_P1003_1B_SHARED_MEMORY_OBJECTS 12 /* boolean */ -#define CTL_P1003_1B_SYNCHRONIZED_IO 13 /* boolean */ -#define CTL_P1003_1B_TIMERS 14 /* boolean */ -#define CTL_P1003_1B_AIO_LISTIO_MAX 15 /* int */ -#define CTL_P1003_1B_AIO_MAX 16 /* int */ -#define CTL_P1003_1B_AIO_PRIO_DELTA_MAX 17 /* int */ -#define CTL_P1003_1B_DELAYTIMER_MAX 18 /* int */ -#define CTL_P1003_1B_MQ_OPEN_MAX 19 /* int */ -#define CTL_P1003_1B_PAGESIZE 20 /* int */ -#define CTL_P1003_1B_RTSIG_MAX 21 /* int */ -#define CTL_P1003_1B_SEM_NSEMS_MAX 22 /* int */ -#define CTL_P1003_1B_SEM_VALUE_MAX 23 /* int */ -#define CTL_P1003_1B_SIGQUEUE_MAX 24 /* int */ -#define CTL_P1003_1B_TIMER_MAX 25 /* int */ +#define CTL_P1003_1B_ASYNCHRONOUS_IO 1 /* boolean */ +#define CTL_P1003_1B_MAPPED_FILES 2 /* boolean */ +#define CTL_P1003_1B_MEMLOCK 3 /* boolean */ +#define CTL_P1003_1B_MEMLOCK_RANGE 4 /* boolean */ +#define CTL_P1003_1B_MEMORY_PROTECTION 5 /* boolean */ +#define CTL_P1003_1B_MESSAGE_PASSING 6 /* boolean */ +#define CTL_P1003_1B_PRIORITIZED_IO 7 /* boolean */ +#define CTL_P1003_1B_PRIORITY_SCHEDULING 8 /* boolean */ +#define CTL_P1003_1B_REALTIME_SIGNALS 9 /* boolean */ +#define CTL_P1003_1B_SEMAPHORES 10 /* boolean */ +#define CTL_P1003_1B_FSYNC 11 /* boolean */ +#define CTL_P1003_1B_SHARED_MEMORY_OBJECTS 12 /* boolean */ +#define CTL_P1003_1B_SYNCHRONIZED_IO 13 /* boolean */ +#define CTL_P1003_1B_TIMERS 14 /* boolean */ +#define CTL_P1003_1B_AIO_LISTIO_MAX 15 /* int */ +#define CTL_P1003_1B_AIO_MAX 16 /* int */ +#define CTL_P1003_1B_AIO_PRIO_DELTA_MAX 17 /* int */ +#define CTL_P1003_1B_DELAYTIMER_MAX 18 /* int */ +#define CTL_P1003_1B_MQ_OPEN_MAX 19 /* int */ +#define CTL_P1003_1B_PAGESIZE 20 /* int */ +#define CTL_P1003_1B_RTSIG_MAX 21 /* int */ +#define CTL_P1003_1B_SEM_NSEMS_MAX 22 /* int */ +#define CTL_P1003_1B_SEM_VALUE_MAX 23 /* int */ +#define CTL_P1003_1B_SIGQUEUE_MAX 24 /* int */ +#define CTL_P1003_1B_TIMER_MAX 25 /* int */ -#define CTL_P1003_1B_MAXID 26 +#define CTL_P1003_1B_MAXID 26 #ifdef _KERNEL @@ -643,43 +651,42 @@ extern char kern_ident[]; /* Dynamic oid handling */ struct sysctl_oid *sysctl_add_oid(struct sysctl_ctx_list *clist, - struct sysctl_oid_list *parent, int nbr, const char *name, - int kind, void *arg1, intptr_t arg2, - int (*handler) (SYSCTL_HANDLER_ARGS), - const char *fmt, const char *descr); + struct sysctl_oid_list *parent, int nbr, const char *name, int kind, + void *arg1, intptr_t arg2, int (*handler)(SYSCTL_HANDLER_ARGS), + const char *fmt, const char *descr); int sysctl_remove_name(struct sysctl_oid *parent, const char *name, int del, - int recurse); + int recurse); void sysctl_rename_oid(struct sysctl_oid *oidp, const char *name); int sysctl_move_oid(struct sysctl_oid *oidp, - struct sysctl_oid_list *parent); + struct sysctl_oid_list *parent); int sysctl_remove_oid(struct sysctl_oid *oidp, int del, int recurse); int sysctl_ctx_init(struct sysctl_ctx_list *clist); int sysctl_ctx_free(struct sysctl_ctx_list *clist); struct sysctl_ctx_entry *sysctl_ctx_entry_add(struct sysctl_ctx_list *clist, - struct sysctl_oid *oidp); + struct sysctl_oid *oidp); struct sysctl_ctx_entry *sysctl_ctx_entry_find(struct sysctl_ctx_list *clist, - struct sysctl_oid *oidp); + struct sysctl_oid *oidp); int sysctl_ctx_entry_del(struct sysctl_ctx_list *clist, - struct sysctl_oid *oidp); + struct sysctl_oid *oidp); int kernel_sysctl(struct thread *td, int *name, u_int namelen, void *old, - size_t *oldlenp, void *new, size_t newlen, - size_t *retval, int flags); -int kernel_sysctlbyname(struct thread *td, char *name, - void *old, size_t *oldlenp, void *new, size_t newlen, - size_t *retval, int flags); + size_t *oldlenp, void *new, size_t newlen, size_t *retval, + int flags); +int kernel_sysctlbyname(struct thread *td, char *name, void *old, + size_t *oldlenp, void *new, size_t newlen, size_t *retval, + int flags); int userland_sysctl(struct thread *td, int *name, u_int namelen, void *old, - size_t *oldlenp, int inkernel, void *new, size_t newlen, - size_t *retval, int flags); + size_t *oldlenp, int inkernel, void *new, size_t newlen, + size_t *retval, int flags); int sysctl_find_oid(int *name, u_int namelen, struct sysctl_oid **noid, - int *nindx, struct sysctl_req *req); + int *nindx, struct sysctl_req *req); void sysctl_lock(void); void sysctl_unlock(void); int sysctl_wire_old_buffer(struct sysctl_req *req, size_t len); struct sbuf; -struct sbuf *sbuf_new_for_sysctl(struct sbuf *, char *, int, - struct sysctl_req *); +struct sbuf *sbuf_new_for_sysctl(struct sbuf *, char *, int, + struct sysctl_req *); #else /* !_KERNEL */ #include From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 20:10:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 346809FF; Fri, 30 Aug 2013 20:10:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2242D2C48; Fri, 30 Aug 2013 20:10:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UKA24U080247; Fri, 30 Aug 2013 20:10:02 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UKA1VM080246; Fri, 30 Aug 2013 20:10:01 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201308302010.r7UKA1VM080246@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Aug 2013 20:10:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255079 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 20:10:02 -0000 Author: kib Date: Fri Aug 30 20:10:01 2013 New Revision: 255079 URL: http://svnweb.freebsd.org/changeset/base/255079 Log: The pm_save should be cleared on the pmap initialization, and not on the activation. Noted by: alc Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Aug 30 19:42:25 2013 (r255078) +++ head/sys/amd64/amd64/pmap.c Fri Aug 30 20:10:01 2013 (r255079) @@ -1863,6 +1863,7 @@ pmap_pinit0(pmap_t pmap) pmap->pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(KPML4phys); pmap->pm_root.rt_root = 0; CPU_ZERO(&pmap->pm_active); + CPU_ZERO(&pmap->pm_save); PCPU_SET(curpmap, pmap); TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); @@ -5939,7 +5940,6 @@ pmap_activate(struct thread *td) critical_enter(); pmap = vmspace_pmap(td->td_proc->p_vmspace); oldpmap = PCPU_GET(curpmap); - CPU_ZERO(&pmap->pm_save); cpuid = PCPU_GET(cpuid); #ifdef SMP CPU_CLR_ATOMIC(cpuid, &oldpmap->pm_active); From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 20:12:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DD7BAB93; Fri, 30 Aug 2013 20:12:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CB0CE2C82; Fri, 30 Aug 2013 20:12:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UKCNZX083375; Fri, 30 Aug 2013 20:12:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UKCNvK083374; Fri, 30 Aug 2013 20:12:23 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201308302012.r7UKCNvK083374@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Aug 2013 20:12:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255080 - head/sys/dev/md X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 20:12:23 -0000 Author: kib Date: Fri Aug 30 20:12:23 2013 New Revision: 255080 URL: http://svnweb.freebsd.org/changeset/base/255080 Log: Give the page allocations initiated by the swap-backed md(4) a higher priority. If the write is requested by a system daemon, sleeping there would starve resources and cause deadlock. Reported and tested by: pho Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/md/md.c Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Fri Aug 30 20:10:01 2013 (r255079) +++ head/sys/dev/md/md.c Fri Aug 30 20:12:23 2013 (r255080) @@ -826,7 +826,7 @@ mdstart_swap(struct md_s *sc, struct bio vm_object_pip_add(sc->object, 1); for (i = bp->bio_offset / PAGE_SIZE; i <= lastp; i++) { len = ((i == lastp) ? lastend : PAGE_SIZE) - offs; - m = vm_page_grab(sc->object, i, VM_ALLOC_NORMAL); + m = vm_page_grab(sc->object, i, VM_ALLOC_SYSTEM); if (bp->bio_cmd == BIO_READ) { if (m->valid == VM_PAGE_BITS_ALL) rv = VM_PAGER_OK; From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 20:13:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C7C91CE1; Fri, 30 Aug 2013 20:13:33 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9ACA32C95; Fri, 30 Aug 2013 20:13:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UKDXtK083852; Fri, 30 Aug 2013 20:13:33 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UKDXNS083851; Fri, 30 Aug 2013 20:13:33 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308302013.r7UKDXNS083851@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 30 Aug 2013 20:13:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255081 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 20:13:33 -0000 Author: jilles Date: Fri Aug 30 20:13:33 2013 New Revision: 255081 URL: http://svnweb.freebsd.org/changeset/base/255081 Log: sh: Use makename() where possible. Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Fri Aug 30 20:12:23 2013 (r255080) +++ head/bin/sh/parser.c Fri Aug 30 20:13:33 2013 (r255081) @@ -457,10 +457,7 @@ command(void) if (lasttoken == TWORD && ! quoteflag && equal(wordtext, "in")) { app = ≈ while (readtoken() == TWORD) { - n2 = (union node *)stalloc(sizeof (struct narg)); - n2->type = NARG; - n2->narg.text = wordtext; - n2->narg.backquote = backquotelist; + n2 = makename(); *app = n2; app = &n2->narg.next; } @@ -500,11 +497,7 @@ command(void) n1 = (union node *)stalloc(sizeof (struct ncase)); n1->type = NCASE; consumetoken(TWORD); - n1->ncase.expr = n2 = (union node *)stalloc(sizeof (struct narg)); - n2->type = NARG; - n2->narg.text = wordtext; - n2->narg.backquote = backquotelist; - n2->narg.next = NULL; + n1->ncase.expr = makename(); while (readtoken() == TNL); if (lasttoken != TWORD || ! equal(wordtext, "in")) synerror("expecting \"in\""); @@ -517,10 +510,7 @@ command(void) if (lasttoken == TLP) readtoken(); for (;;) { - *app = ap = (union node *)stalloc(sizeof (struct narg)); - ap->type = NARG; - ap->narg.text = wordtext; - ap->narg.backquote = backquotelist; + *app = ap = makename(); checkkwd = CHKNL | CHKKWD; if (readtoken() != TPIPE) break; @@ -632,10 +622,7 @@ simplecmd(union node **rpp, union node * for (;;) { checkkwd = savecheckkwd; if (readtoken() == TWORD) { - n = (union node *)stalloc(sizeof (struct narg)); - n->type = NARG; - n->narg.text = wordtext; - n->narg.backquote = backquotelist; + n = makename(); *app = n; app = &n->narg.next; if (savecheckkwd != 0 && !isassignment(wordtext)) @@ -772,11 +759,7 @@ parseheredoc(void) } readtoken1(pgetc(), here->here->type == NHERE? SQSYNTAX : DQSYNTAX, here->eofmark, here->striptabs); - n = (union node *)stalloc(sizeof (struct narg)); - n->narg.type = NARG; - n->narg.next = NULL; - n->narg.text = wordtext; - n->narg.backquote = backquotelist; + n = makename(); here->here->nhere.doc = n; } } From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 20:20:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CA369FC0; Fri, 30 Aug 2013 20:20:06 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B7F092CE9; Fri, 30 Aug 2013 20:20:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UKK6ts086224; Fri, 30 Aug 2013 20:20:06 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UKK6pG086223; Fri, 30 Aug 2013 20:20:06 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201308302020.r7UKK6pG086223@svn.freebsd.org> From: Joel Dahl Date: Fri, 30 Aug 2013 20:20:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255082 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 20:20:06 -0000 Author: joel (doc committer) Date: Fri Aug 30 20:20:06 2013 New Revision: 255082 URL: http://svnweb.freebsd.org/changeset/base/255082 Log: mdoc: add missing El. Modified: head/share/man/man4/vmx.4 Modified: head/share/man/man4/vmx.4 ============================================================================== --- head/share/man/man4/vmx.4 Fri Aug 30 20:13:33 2013 (r255081) +++ head/share/man/man4/vmx.4 Fri Aug 30 20:20:06 2013 (r255082) @@ -100,6 +100,7 @@ Number of receive descriptors per ring a The default value is 256. The value must be a multiple of 32, and the maximum is 2048. There are two rings so the actual usage is doubled. +.El .Sh EXAMPLES The following entry must be added to the VMware configuration file to provide the From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 20:28:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2C1092FB; Fri, 30 Aug 2013 20:28:36 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 16F022D53; Fri, 30 Aug 2013 20:28:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UKSaI6091176; Fri, 30 Aug 2013 20:28:36 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UKSZwe091169; Fri, 30 Aug 2013 20:28:35 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201308302028.r7UKSZwe091169@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Fri, 30 Aug 2013 20:28:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255083 - head/sys/mips/malta X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 20:28:36 -0000 Author: gonzo Date: Fri Aug 30 20:28:35 2013 New Revision: 255083 URL: http://svnweb.freebsd.org/changeset/base/255083 Log: Add PCI bus space implementation that converts all 2 and 4 bytes values to/from little endian according to PCI spec. Added: head/sys/mips/malta/gt_pci_bus_space.c (contents, props changed) head/sys/mips/malta/gt_pci_bus_space.h (contents, props changed) Modified: head/sys/mips/malta/files.malta head/sys/mips/malta/gt_pci.c Modified: head/sys/mips/malta/files.malta ============================================================================== --- head/sys/mips/malta/files.malta Fri Aug 30 20:20:06 2013 (r255082) +++ head/sys/mips/malta/files.malta Fri Aug 30 20:28:35 2013 (r255083) @@ -1,6 +1,7 @@ # $FreeBSD$ mips/malta/gt.c standard mips/malta/gt_pci.c standard +mips/malta/gt_pci_bus_space.c standard mips/malta/obio.c optional uart mips/malta/uart_cpu_maltausart.c optional uart mips/malta/uart_bus_maltausart.c optional uart Modified: head/sys/mips/malta/gt_pci.c ============================================================================== --- head/sys/mips/malta/gt_pci.c Fri Aug 30 20:20:06 2013 (r255082) +++ head/sys/mips/malta/gt_pci.c Fri Aug 30 20:28:35 2013 (r255083) @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); #include #include "pcib_if.h" +#include #define ICU_LEN 16 /* number of ISA IRQs */ @@ -635,7 +636,6 @@ gt_pci_alloc_resource(device_t bus, devi struct gt_pci_softc *sc = device_get_softc(bus); struct resource *rv = NULL; struct rman *rm; - bus_space_tag_t bt = 0; bus_space_handle_t bh = 0; switch (type) { @@ -644,12 +644,10 @@ gt_pci_alloc_resource(device_t bus, devi break; case SYS_RES_MEMORY: rm = &sc->sc_mem_rman; - bt = sc->sc_st; bh = sc->sc_mem; break; case SYS_RES_IOPORT: rm = &sc->sc_io_rman; - bt = sc->sc_st; bh = sc->sc_io; break; default: @@ -663,7 +661,7 @@ gt_pci_alloc_resource(device_t bus, devi if (type != SYS_RES_IRQ) { bh += (rman_get_start(rv)); - rman_set_bustag(rv, bt); + rman_set_bustag(rv, gt_pci_bus_space); rman_set_bushandle(rv, bh); if (flags & RF_ACTIVE) { if (bus_activate_resource(child, type, *rid, rv)) { Added: head/sys/mips/malta/gt_pci_bus_space.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/malta/gt_pci_bus_space.c Fri Aug 30 20:28:35 2013 (r255083) @@ -0,0 +1,409 @@ +/* $NetBSD: bus.h,v 1.12 1997/10/01 08:25:15 fvdl Exp $ */ +/*- + * $Id: bus.h,v 1.6 2007/08/09 11:23:32 katta Exp $ + * + * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, + * NASA Ames Research Center. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * 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. + */ + +/* + * Copyright (c) 1996 Charles M. Hannum. All rights reserved. + * Copyright (c) 1996 Christopher G. Demetriou. 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Christopher G. Demetriou + * for the NetBSD Project. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * from: src/sys/alpha/include/bus.h,v 1.5 1999/08/28 00:38:40 peter + * $FreeBSD$ + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +static bs_r_2_proto(gt_pci); +static bs_r_4_proto(gt_pci); +static bs_w_2_proto(gt_pci); +static bs_w_4_proto(gt_pci); +static bs_rm_2_proto(gt_pci); +static bs_rm_4_proto(gt_pci); +static bs_wm_2_proto(gt_pci); +static bs_wm_4_proto(gt_pci); +static bs_rr_2_proto(gt_pci); +static bs_rr_4_proto(gt_pci); +static bs_wr_2_proto(gt_pci); +static bs_wr_4_proto(gt_pci); +static bs_sm_2_proto(gt_pci); +static bs_sm_4_proto(gt_pci); +static bs_sr_2_proto(gt_pci); +static bs_sr_4_proto(gt_pci); + +static struct bus_space gt_pci_space = { + /* cookie */ + .bs_cookie = (void *) 0, + + /* mapping/unmapping */ + .bs_map = generic_bs_map, + .bs_unmap = generic_bs_unmap, + .bs_subregion = generic_bs_subregion, + + /* allocation/deallocation */ + .bs_alloc = generic_bs_alloc, + .bs_free = generic_bs_free, + + /* barrier */ + .bs_barrier = generic_bs_barrier, + + /* read (single) */ + .bs_r_1 = generic_bs_r_1, + .bs_r_2 = gt_pci_bs_r_2, + .bs_r_4 = gt_pci_bs_r_4, + .bs_r_8 = NULL, + + /* read multiple */ + .bs_rm_1 = generic_bs_rm_1, + .bs_rm_2 = gt_pci_bs_rm_2, + .bs_rm_4 = gt_pci_bs_rm_4, + .bs_rm_8 = NULL, + + /* read region */ + .bs_rr_1 = generic_bs_rr_1, + .bs_rr_2 = gt_pci_bs_rr_2, + .bs_rr_4 = gt_pci_bs_rr_4, + .bs_rr_8 = NULL, + + /* write (single) */ + .bs_w_1 = generic_bs_w_1, + .bs_w_2 = gt_pci_bs_w_2, + .bs_w_4 = gt_pci_bs_w_4, + .bs_w_8 = NULL, + + /* write multiple */ + .bs_wm_1 = generic_bs_wm_1, + .bs_wm_2 = gt_pci_bs_wm_2, + .bs_wm_4 = gt_pci_bs_wm_4, + .bs_wm_8 = NULL, + + /* write region */ + .bs_wr_1 = generic_bs_wr_1, + .bs_wr_2 = gt_pci_bs_wr_2, + .bs_wr_4 = gt_pci_bs_wr_4, + .bs_wr_8 = NULL, + + /* set multiple */ + .bs_sm_1 = generic_bs_sm_1, + .bs_sm_2 = gt_pci_bs_sm_2, + .bs_sm_4 = gt_pci_bs_sm_4, + .bs_sm_8 = NULL, + + /* set region */ + .bs_sr_1 = generic_bs_sr_1, + .bs_sr_2 = gt_pci_bs_sr_2, + .bs_sr_4 = gt_pci_bs_sr_4, + .bs_sr_8 = NULL, + + /* copy */ + .bs_c_1 = generic_bs_c_1, + .bs_c_2 = generic_bs_c_2, + .bs_c_4 = generic_bs_c_4, + .bs_c_8 = NULL, + + /* read (single) stream */ + .bs_r_1_s = generic_bs_r_1, + .bs_r_2_s = generic_bs_r_2, + .bs_r_4_s = generic_bs_r_4, + .bs_r_8_s = NULL, + + /* read multiple stream */ + .bs_rm_1_s = generic_bs_rm_1, + .bs_rm_2_s = generic_bs_rm_2, + .bs_rm_4_s = generic_bs_rm_4, + .bs_rm_8_s = NULL, + + /* read region stream */ + .bs_rr_1_s = generic_bs_rr_1, + .bs_rr_2_s = generic_bs_rr_2, + .bs_rr_4_s = generic_bs_rr_4, + .bs_rr_8_s = NULL, + + /* write (single) stream */ + .bs_w_1_s = generic_bs_w_1, + .bs_w_2_s = generic_bs_w_2, + .bs_w_4_s = generic_bs_w_4, + .bs_w_8_s = NULL, + + /* write multiple stream */ + .bs_wm_1_s = generic_bs_wm_1, + .bs_wm_2_s = generic_bs_wm_2, + .bs_wm_4_s = generic_bs_wm_4, + .bs_wm_8_s = NULL, + + /* write region stream */ + .bs_wr_1_s = generic_bs_wr_1, + .bs_wr_2_s = generic_bs_wr_2, + .bs_wr_4_s = generic_bs_wr_4, + .bs_wr_8_s = NULL, +}; + +#define rd16(a) le16toh(readw(a)) +#define rd32(a) le32toh(readl(a)) +#define wr16(a, v) writew(a, htole16(v)) +#define wr32(a, v) writel(a, htole32(v)) + +/* generic bus_space tag */ +bus_space_tag_t gt_pci_bus_space = >_pci_space; + +uint16_t +gt_pci_bs_r_2(void *t, bus_space_handle_t handle, + bus_size_t offset) +{ + + return (rd16(handle + offset)); +} + +uint32_t +gt_pci_bs_r_4(void *t, bus_space_handle_t handle, + bus_size_t offset) +{ + + return (rd32(handle + offset)); +} + +void +gt_pci_bs_rm_2(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint16_t *addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) + *addr++ = rd16(baddr); +} + +void +gt_pci_bs_rm_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint32_t *addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) + *addr++ = rd32(baddr); +} + +/* + * Read `count' 2 or 4 byte quantities from bus space + * described by tag/handle and starting at `offset' and copy into + * buffer provided. + */ +void +gt_pci_bs_rr_2(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint16_t *addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) { + *addr++ = rd16(baddr); + baddr += 2; + } +} + +void +gt_pci_bs_rr_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint32_t *addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) { + *addr++ = rd32(baddr); + baddr += 4; + } +} + +/* + * Write the 2 or 4 byte value `value' to bus space + * described by tag/handle/offset. + */ +void +gt_pci_bs_w_2(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint16_t value) +{ + + wr16(bsh + offset, value); +} + +void +gt_pci_bs_w_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint32_t value) +{ + + wr32(bsh + offset, value); +} + +/* + * Write `count' 2 or 4 byte quantities from the buffer + * provided to bus space described by tag/handle/offset. + */ +void +gt_pci_bs_wm_2(void *t, bus_space_handle_t bsh, + bus_size_t offset, const uint16_t *addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) + wr16(baddr, *addr++); +} + +void +gt_pci_bs_wm_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, const uint32_t *addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) + wr32(baddr, *addr++); +} + +/* + * Write `count' 2 or 4 byte quantities from the buffer provided + * to bus space described by tag/handle starting at `offset'. + */ +void +gt_pci_bs_wr_2(void *t, bus_space_handle_t bsh, + bus_size_t offset, const uint16_t *addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) { + wr16(baddr, *addr++); + baddr += 2; + } +} + +void +gt_pci_bs_wr_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, const uint32_t *addr, size_t count) +{ + bus_addr_t baddr = bsh + offset; + + while (count--) { + wr32(baddr, *addr++); + baddr += 4; + } +} + +/* + * Write the 2 or 4 byte value `val' to bus space described + * by tag/handle/offset `count' times. + */ +void +gt_pci_bs_sm_2(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint16_t value, size_t count) +{ + bus_addr_t addr = bsh + offset; + + while (count--) + wr16(addr, value); +} + +void +gt_pci_bs_sm_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint32_t value, size_t count) +{ + bus_addr_t addr = bsh + offset; + + while (count--) + wr32(addr, value); +} + +/* + * Write `count' 2 or 4 byte value `val' to bus space described + * by tag/handle starting at `offset'. + */ +void +gt_pci_bs_sr_2(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint16_t value, size_t count) +{ + bus_addr_t addr = bsh + offset; + + for (; count != 0; count--, addr += 2) + wr16(addr, value); +} + +void +gt_pci_bs_sr_4(void *t, bus_space_handle_t bsh, + bus_size_t offset, uint32_t value, size_t count) +{ + bus_addr_t addr = bsh + offset; + + for (; count != 0; count--, addr += 4) + wr32(addr, value); +} Added: head/sys/mips/malta/gt_pci_bus_space.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/malta/gt_pci_bus_space.h Fri Aug 30 20:28:35 2013 (r255083) @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2009, Oleksandr Tymoshenko + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 __GT_PCI_BUS_SPACEH__ +#define __GT_PCI_BUS_SPACEH__ + +extern bus_space_tag_t gt_pci_bus_space; + +#endif /* __GT_PCI_BUS_SPACEH__ */ From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 20:30:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D7206565; Fri, 30 Aug 2013 20:30:33 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AB54C2D77; Fri, 30 Aug 2013 20:30:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UKUXgW093610; Fri, 30 Aug 2013 20:30:33 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UKUXXV093609; Fri, 30 Aug 2013 20:30:33 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201308302030.r7UKUXXV093609@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Fri, 30 Aug 2013 20:30:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255084 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 20:30:33 -0000 Author: gonzo Date: Fri Aug 30 20:30:33 2013 New Revision: 255084 URL: http://svnweb.freebsd.org/changeset/base/255084 Log: Add bpf(4) to config file to get dhclient working Modified: head/sys/mips/conf/MALTA Modified: head/sys/mips/conf/MALTA ============================================================================== --- head/sys/mips/conf/MALTA Fri Aug 30 20:28:35 2013 (r255083) +++ head/sys/mips/conf/MALTA Fri Aug 30 20:30:33 2013 (r255084) @@ -65,5 +65,6 @@ device loop device ether device le device miibus +device bpf device md device uart From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 20:37:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D0B8C8C5; Fri, 30 Aug 2013 20:37:52 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A43272DD8; Fri, 30 Aug 2013 20:37:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UKbqeV096716; Fri, 30 Aug 2013 20:37:52 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UKbqgs096715; Fri, 30 Aug 2013 20:37:52 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308302037.r7UKbqgs096715@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 30 Aug 2013 20:37:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255085 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 20:37:52 -0000 Author: jilles Date: Fri Aug 30 20:37:52 2013 New Revision: 255085 URL: http://svnweb.freebsd.org/changeset/base/255085 Log: sh: Separate out nbinary allocation into a function. Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Fri Aug 30 20:30:33 2013 (r255084) +++ head/bin/sh/parser.c Fri Aug 30 20:37:52 2013 (r255085) @@ -114,6 +114,7 @@ static union node *pipeline(void); static union node *command(void); static union node *simplecmd(union node **, union node *); static union node *makename(void); +static union node *makebinary(int type, union node *n1, union node *n2); static void parsefname(void); static void parseheredoc(void); static int peektoken(void); @@ -257,17 +258,11 @@ list(int nlflag, int erflag) if (ntop == NULL) ntop = n2; else if (n1 == NULL) { - n1 = (union node *)stalloc(sizeof (struct nbinary)); - n1->type = NSEMI; - n1->nbinary.ch1 = ntop; - n1->nbinary.ch2 = n2; + n1 = makebinary(NSEMI, ntop, n2); ntop = n1; } else { - n3 = (union node *)stalloc(sizeof (struct nbinary)); - n3->type = NSEMI; - n3->nbinary.ch1 = n1->nbinary.ch2; - n3->nbinary.ch2 = n2; + n3 = makebinary(NSEMI, n1->nbinary.ch2, n2); n1->nbinary.ch2 = n3; n1 = n3; } @@ -312,10 +307,10 @@ list(int nlflag, int erflag) static union node * andor(void) { - union node *n1, *n2, *n3; + union node *n; int t; - n1 = pipeline(); + n = pipeline(); for (;;) { if ((t = readtoken()) == TAND) { t = NAND; @@ -323,14 +318,9 @@ andor(void) t = NOR; } else { tokpushback++; - return n1; + return n; } - n2 = pipeline(); - n3 = (union node *)stalloc(sizeof (struct nbinary)); - n3->type = t; - n3->nbinary.ch1 = n1; - n3->nbinary.ch2 = n2; - n1 = n3; + n = makebinary(t, n, pipeline()); } } @@ -437,12 +427,11 @@ command(void) break; case TWHILE: case TUNTIL: - n1 = (union node *)stalloc(sizeof (struct nbinary)); - n1->type = (lasttoken == TWHILE)? NWHILE : NUNTIL; - if ((n1->nbinary.ch1 = list(0, 0)) == NULL) + t = lasttoken; + if ((n1 = list(0, 0)) == NULL) synexpect(-1); consumetoken(TDO); - n1->nbinary.ch2 = list(0, 0); + n1 = makebinary((t == TWHILE)? NWHILE : NUNTIL, n1, list(0, 0)); consumetoken(TDONE); checkkwd = CHKKWD | CHKALIAS; break; @@ -682,6 +671,18 @@ makename(void) return n; } +static union node * +makebinary(int type, union node *n1, union node *n2) +{ + union node *n; + + n = (union node *)stalloc(sizeof (struct nbinary)); + n->type = type; + n->nbinary.ch1 = n1; + n->nbinary.ch2 = n2; + return (n); +} + void fixredir(union node *n, const char *text, int err) { From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 20:46:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 74D0FBA9; Fri, 30 Aug 2013 20:46:02 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 51E3B2E63; Fri, 30 Aug 2013 20:46:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UKk2MB001812; Fri, 30 Aug 2013 20:46:02 GMT (envelope-from hiren@svn.freebsd.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UKk1r4001810; Fri, 30 Aug 2013 20:46:01 GMT (envelope-from hiren@svn.freebsd.org) Message-Id: <201308302046.r7UKk1r4001810@svn.freebsd.org> From: Hiren Panchasara Date: Fri, 30 Aug 2013 20:46:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255086 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 20:46:02 -0000 Author: hiren Date: Fri Aug 30 20:46:01 2013 New Revision: 255086 URL: http://svnweb.freebsd.org/changeset/base/255086 Log: Add device PicoStation M2HP support. This is a nice small outdoor/indoor AP from Ubiquity Networks. The device has: AR7241 CPU SoC AR9287 Wifi 8MB flash 32MB RAM wifi has been tested to work along with leds. Submitted by: loos Approved by: sbruno (mentor, implicit) Tested by: hiren Added: head/sys/mips/conf/PICOSTATION_M2HP (contents, props changed) head/sys/mips/conf/PICOSTATION_M2HP.hints (contents, props changed) Added: head/sys/mips/conf/PICOSTATION_M2HP ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/PICOSTATION_M2HP Fri Aug 30 20:46:01 2013 (r255086) @@ -0,0 +1,68 @@ +# +# Specific board setup for the Picostation M2 HP board. +# +# This board has the following hardware: +# +# + AR7241 CPU SoC +# + AR9287 Wifi +# + Integrated switch (XXX speed?) +# + 8MB flash +# + 32MB RAM +# + uboot environment + +# $FreeBSD$ + +include "AR724X_BASE" +ident "PICOSTATION_M2HP" +hints "PICOSTATION_M2HP.hints" + +options AR71XX_REALMEM=32*1024*1024 + +options AR71XX_ENV_UBOOT + +# Limit inlines +makeoptions INLINE_LIMIT=768 + +# We bite the performance overhead for now; the kernel won't +# fit if the mutexes are inlined. +options MUTEX_NOINLINE +options RWLOCK_NOINLINE +options SX_NOINLINE + +# There's no need to enable swapping on this platform. +options NO_SWAPPING + +# For DOS - enable if required +# options MSDOSFS + +# uncompress - to boot read-only lzma natively from flash +device geom_uncompress +options GEOM_UNCOMPRESS +options ROOTDEVNAME=\"ufs:/dev/map/rootfs.uncompress\" + +# Not enough space for these.. +nooptions INVARIANTS +nooptions INVARIANT_SUPPORT +nooptions WITNESS +nooptions WITNESS_SKIPSPIN +nooptions DEBUG_REDZONE +nooptions DEBUG_MEMGUARD + +# Used for the static uboot partition map +device geom_map + +# Options needed for the EEPROM based calibration/PCI configuration data. +options AR71XX_ATH_EEPROM # Fetch EEPROM/PCI config from flash +options ATH_EEPROM_FIRMWARE # Use EEPROM from flash +device firmware # Used by the above + +# Options required for miiproxy and mdiobus +options ARGE_MDIO # Export an MDIO bus separate from arge +device miiproxy # MDIO bus <-> MII PHY rendezvous + +device etherswitch +device arswitch + +# Enable GPIO +device gpio +device gpioled Added: head/sys/mips/conf/PICOSTATION_M2HP.hints ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/PICOSTATION_M2HP.hints Fri Aug 30 20:46:01 2013 (r255086) @@ -0,0 +1,103 @@ +# $FreeBSD$ + +# arge1 MDIO bus +hint.argemdio.0.at="nexus0" +hint.argemdio.0.maddr=0x1a000000 +hint.argemdio.0.msize=0x1000 +hint.argemdio.0.order=0 + +# Override MAC Address with the one on EEPROM +hint.arge.0.eeprommac=0x1fff0000 + +# arge0: dedicated switch port; RMII; dedicated PHY 4 on switch, connected +# via internal switch MDIO bus. +hint.arge.0.media=100 # Map to 100/full +hint.arge.0.fduplex=1 # +hint.arge.0.phymask=0x10 # PHY4 +hint.arge.0.mdio=mdioproxy1 # .. off of the switch mdiobus + +# arge1: nail to 1000/full, RMII - connected to the switch +hint.arge.1.media=1000 # Map to 1000/full +hint.arge.1.fduplex=1 # +hint.arge.1.phymask=0x0 # no directly mapped PHYs + +# +# AR7240 switch config +# +hint.arswitch.0.at="mdio0" +hint.arswitch.0.is_7240=1 # We need to be explicitly told this +hint.arswitch.0.numphys=4 # 4 active switch PHYs (PHY 0 -> 3) +hint.arswitch.0.phy4cpu=1 # Yes, PHY 4 == dedicated PHY +hint.arswitch.0.is_rgmii=0 # No, not RGMII +hint.arswitch.0.is_gmii=0 # No, not GMII + +# ath0 hint - pcie slot 0 +hint.pcib.0.bus.0.0.0.ath_fixup_addr=0x1fff1000 +hint.pcib.0.bus.0.0.0.ath_fixup_size=4096 + +# ath +hint.ath.0.eeprom_firmware="pcib.0.bus.0.0.0.eeprom_firmware" + +# GPIO pins +# Pin 0: red led (sig1) +# Pin 1: yellow led (sig2) +# Pin 11: green len (sig3) +# Pin 7: green len (sig4) +# Pin 12: Reset switch +hint.gpio.0.pinmask=0x1883 + +# Signal leds +hint.gpioled.0.at="gpiobus0" +hint.gpioled.0.name="sig1" +hint.gpioled.0.pins=0x0001 # pin 0 +hint.gpioled.1.at="gpiobus0" +hint.gpioled.1.name="sig2" +hint.gpioled.1.pins=0x0002 # pin 1 +hint.gpioled.2.at="gpiobus0" +hint.gpioled.2.name="sig3" +hint.gpioled.2.pins=0x0800 # pin 11 +hint.gpioled.3.at="gpiobus0" +hint.gpioled.3.name="sig4" +hint.gpioled.3.pins=0x0080 # pin 7 + +# GEOM_MAP +# +# Picostation M2 HP +# +# mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),1024k(kernel),6528k(rootfs),256k(cfg),64k(EEPROM) + +hint.map.0.at="flash/spi0" +hint.map.0.start=0x00000000 +hint.map.0.end=0x00040000 # 256k u-boot +hint.map.0.name="u-boot" +hint.map.0.readonly=1 + +hint.map.1.at="flash/spi0" +hint.map.1.start=0x00040000 +hint.map.1.end=0x00050000 # 64k u-boot-env +hint.map.1.name="u-boot-env" +hint.map.1.readonly=1 + +hint.map.2.at="flash/spi0" +hint.map.2.start=0x00050000 +hint.map.2.end=0x00130000 # 896k kernel +hint.map.2.name="kernel" +hint.map.2.readonly=1 + +hint.map.3.at="flash/spi0" +hint.map.3.start=0x130000 +hint.map.3.end=0x007b0000 # 6656k rootfs +hint.map.3.name="rootfs" +hint.map.3.readonly=0 + +hint.map.4.at="flash/spi0" +hint.map.4.start=0x007b0000 +hint.map.4.end=0x007f0000 # 256k cfg +hint.map.4.name="cfg" +hint.map.4.readonly=0 + +hint.map.5.at="flash/spi0" +hint.map.5.start=0x007f0000 +hint.map.5.end=0x00800000 # 64k EEPROM +hint.map.5.name="eeprom" +hint.map.5.readonly=1 From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 20:50:28 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BC343DA2; Fri, 30 Aug 2013 20:50:28 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A9A392E98; Fri, 30 Aug 2013 20:50:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7UKoSvt003868; Fri, 30 Aug 2013 20:50:28 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7UKoSG7003867; Fri, 30 Aug 2013 20:50:28 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308302050.r7UKoSG7003867@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 30 Aug 2013 20:50:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255087 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 20:50:28 -0000 Author: jilles Date: Fri Aug 30 20:50:28 2013 New Revision: 255087 URL: http://svnweb.freebsd.org/changeset/base/255087 Log: sh: Simplify list() in the parser. The erflag argument was only used by old-style (``) command substitutions. We can remove it and handle the special case in the command substitution code. Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Fri Aug 30 20:46:01 2013 (r255086) +++ head/bin/sh/parser.c Fri Aug 30 20:50:28 2013 (r255087) @@ -108,7 +108,7 @@ static int funclinno; /* line # where t static struct parser_temp *parser_temp; -static union node *list(int, int); +static union node *list(int); static union node *andor(void); static union node *pipeline(void); static union node *command(void); @@ -225,18 +225,18 @@ parsecmd(int interact) if (t == TNL) return NULL; tokpushback++; - return list(1, 1); + return list(1); } static union node * -list(int nlflag, int erflag) +list(int nlflag) { union node *ntop, *n1, *n2, *n3; int tok; checkkwd = CHKNL | CHKKWD | CHKALIAS; - if (!nlflag && !erflag && tokendlist[peektoken()]) + if (!nlflag && tokendlist[peektoken()]) return NULL; ntop = n1 = NULL; for (;;) { @@ -283,8 +283,7 @@ list(int nlflag, int erflag) tokpushback++; } checkkwd = CHKNL | CHKKWD | CHKALIAS; - if (!nlflag && (erflag ? peektoken() == TEOF : - tokendlist[peektoken()])) + if (!nlflag && tokendlist[peektoken()]) return ntop; break; case TEOF: @@ -294,7 +293,7 @@ list(int nlflag, int erflag) pungetc(); /* push back EOF on input */ return ntop; default: - if (nlflag || erflag) + if (nlflag) synexpect(-1); tokpushback++; return ntop; @@ -402,22 +401,22 @@ command(void) case TIF: n1 = (union node *)stalloc(sizeof (struct nif)); n1->type = NIF; - if ((n1->nif.test = list(0, 0)) == NULL) + if ((n1->nif.test = list(0)) == NULL) synexpect(-1); consumetoken(TTHEN); - n1->nif.ifpart = list(0, 0); + n1->nif.ifpart = list(0); n2 = n1; while (readtoken() == TELIF) { n2->nif.elsepart = (union node *)stalloc(sizeof (struct nif)); n2 = n2->nif.elsepart; n2->type = NIF; - if ((n2->nif.test = list(0, 0)) == NULL) + if ((n2->nif.test = list(0)) == NULL) synexpect(-1); consumetoken(TTHEN); - n2->nif.ifpart = list(0, 0); + n2->nif.ifpart = list(0); } if (lasttoken == TELSE) - n2->nif.elsepart = list(0, 0); + n2->nif.elsepart = list(0); else { n2->nif.elsepart = NULL; tokpushback++; @@ -428,10 +427,10 @@ command(void) case TWHILE: case TUNTIL: t = lasttoken; - if ((n1 = list(0, 0)) == NULL) + if ((n1 = list(0)) == NULL) synexpect(-1); consumetoken(TDO); - n1 = makebinary((t == TWHILE)? NWHILE : NUNTIL, n1, list(0, 0)); + n1 = makebinary((t == TWHILE)? NWHILE : NUNTIL, n1, list(0)); consumetoken(TDONE); checkkwd = CHKKWD | CHKALIAS; break; @@ -478,7 +477,7 @@ command(void) t = TEND; else synexpect(-1); - n1->nfor.body = list(0, 0); + n1->nfor.body = list(0); consumetoken(t); checkkwd = CHKKWD | CHKALIAS; break; @@ -509,7 +508,7 @@ command(void) ap->narg.next = NULL; if (lasttoken != TRP) synexpect(TRP); - cp->nclist.body = list(0, 0); + cp->nclist.body = list(0); checkkwd = CHKNL | CHKKWD | CHKALIAS; if ((t = readtoken()) != TESAC) { @@ -529,14 +528,14 @@ command(void) case TLP: n1 = (union node *)stalloc(sizeof (struct nredir)); n1->type = NSUBSHELL; - n1->nredir.n = list(0, 0); + n1->nredir.n = list(0); n1->nredir.redirect = NULL; consumetoken(TRP); checkkwd = CHKKWD | CHKALIAS; is_subshell = 1; break; case TBEGIN: - n1 = list(0, 0); + n1 = list(0); consumetoken(TEND); checkkwd = CHKKWD | CHKALIAS; break; @@ -1060,11 +1059,13 @@ done: doprompt = 0; } - n = list(0, oldstyle); + n = list(0); - if (oldstyle) + if (oldstyle) { + if (peektoken() != TEOF) + synexpect(-1); doprompt = saveprompt; - else + } else consumetoken(TRP); (*nlpp)->n = n; From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 21:16:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 10D55292; Fri, 30 Aug 2013 21:16:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D1CB52FDE; Fri, 30 Aug 2013 21:16:04 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C4855B945; Fri, 30 Aug 2013 17:16:00 -0400 (EDT) From: John Baldwin To: "=?iso-8859-15?q?Jean-S=E9bastien?= =?iso-8859-15?q?_P=E9dron?=" Subject: Re: svn commit: r254882 - head/sys/dev/pci Date: Fri, 30 Aug 2013 16:44:36 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <201308251809.r7PI9CsE052978@svn.freebsd.org> <201308291007.26828.jhb@freebsd.org> <5220B15C.6050203@FreeBSD.org> In-Reply-To: <5220B15C.6050203@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Message-Id: <201308301644.36750.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 30 Aug 2013 17:16:00 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 21:16:05 -0000 On Friday, August 30, 2013 10:51:08 am Jean-S=E9bastien P=E9dron wrote: > On 29.08.2013 16:07, John Baldwin wrote: > > Here is an untested cut at this, it only changes these functions and do= esn't > > fix the callers to work with the returned struct resource, etc.: >=20 > I attached an updated patch including changes to pcivar.h and radeon. > However, BUS_ALLOC_RESOURCE() returns NULL in my tests. Hmm, can you get devinfo -u output? I wonder if orm0 is eating this resource. =2D-=20 John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Aug 30 22:30:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 36100747; Fri, 30 Aug 2013 22:30:16 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 111C523ED; Fri, 30 Aug 2013 22:30:15 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [69.198.165.132]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 3254CE55C; Fri, 30 Aug 2013 15:30:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1377901809; bh=VvF8OYivPwKHyXrgEPTLP9pBjVllfH4Q0Pl9G4uQdYs=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=BXgu22Y3kAejzPi+U9LaAorCjJjj2UY4+C/PPil5zOOW5AFJAhXyFRA4LYlpH/8iu DvMRBZwXtDxo8NLLPJAE7M9FNgwpkFtNpFJKuRBsLbm/irWLBq0Rdc5VhQQO7MdqkS +uBI45acDS7dTe2y0JIc4L8OK4N3B9tPcbw7tgqw= Message-ID: <52211CF0.1070807@delphij.net> Date: Fri, 30 Aug 2013 15:30:08 -0700 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: Davide Italiano Subject: Re: svn commit: r254585 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201308202231.r7KMVERi068300@svn.freebsd.org> <20130825221517.GM24767@caravan.chchile.org> <521B75CE.70103@FreeBSD.org> <521BDEAC.9080909@delphij.net> <521C5CAC.2060400@FreeBSD.org> <521D4C41.3060208@delphij.net> In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, Xin LI , svn-src-all@freebsd.org, Andriy Gapon , Xin LI , svn-src-head@freebsd.org, Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 22:30:16 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi, Davide, On 08/28/13 03:19, Davide Italiano wrote: > On Wed, Aug 28, 2013 at 3:02 AM, Xin Li > wrote: On 08/27/13 01:59, Davide Italiano wrote: >>>> I've written a patch that attempts to fix the second >>>> problem. >>>> http://people.freebsd.org/~davide/review/zfsrename_recycle.diff >>>> The culprit is that we're dereferencing sdvp without the >>>> vnode lock held, so data-stability is not guaranteed. tdvp, >>>> instead, is locked at the entry point of VOP_RENAME() (at >>>> least according to vop_rename_pre()) so it can be safely >>>> used. As pointed out by Andriy ZFS has some different >>>> mechanisms wrt other file systems that allow the vnode to not >>>> be recycled when it's referenced (ZFS_ENTER), so once we get >>>> zfsvfs_t * from tdzp we can call ZFS_ENTER and dereference >>>> sdvp in a safe manner. > > I'm not sure that this is right. Now we have: > > tdzp = VTOZ(tdvp); ZFS_VERIFY_ZP(tdzp); zfsvfs = tdzp->z_zfsvfs; > ZFS_ENTER(zfsvfs); // tdzp's z_zfsvfs entered zilog = > zfsvfs->z_log; sdzp = VTOZ(sdvp); ZFS_VERIFY_ZP(sdzp); > // (*) > >> Well, if your concern is that the running thread can exit from a >> different context than the one it entered, maybe partly inlining >> ZFS_VERIFY_ZP() might workaround the problem. > >> if (sdzp->z_sa_hdl == NULL) { ZFS_EXIT(zfsvfs); /* this is the >> right context */ return (EIO); } > >> Does this make sense for you? If not, can you propose an >> alternative? I'll be away for a couple of days but I will be >> happy to discuss this further when I'll come back. > > > Note that in the (*) step, when sdzp is invalid and sdzp have > different z_zfsvfs than tdzp (for instance when the node is in the > snapshot directory; the code later would test this), we could end > up with ZFS_EXIT()'ing the wrong z_zfsvfs. I've re-examined the code with some instruments and it looks like the case where tdzp and sdzp have different z_zfsvfs were caught by upper layer in our VFS. We probably should assert this fact in our version though, as it's not very obvious for reader. Note that this also means we can define out the EXDEV check along with the VOP_REALVP call, as they do not apply to FreeBSD. Will you commit the change against the tree? Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQEcBAEBCgAGBQJSIRzwAAoJEG80Jeu8UPuzDA4H/R5UEFJveI9lDKIwM8ldCQbV dayXCPDSE7b3T098LMh5gA5FlDz60E633qb7Uu9eFb8Ln+vmCaBGV88AKjv+P1c4 6NIU+oJLt4uKHXqn3C+9CC5zZFZLRIoGalwtCxHEoePteF+HOwmfFOEEM0v2cSro KJgFsNIeQfWtIfeZgMNXYGeKmp26baJm9AqTmUh/tOTu7lg0i5IUV4Xv0TnsBFeX OJ+Oan/2lBRvDnxZxkHKQlRTok7Lq3aD0qhit1aOFkdPGQ+9yzrPS1/B86e2JcoA riasxJbvdTccGANj/KKiRebuoCt6v9Mwt6CaYb6UlDKotXIm1oLBD52BmdSkolk= =vvE0 -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 01:24:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9926C205; Sat, 31 Aug 2013 01:24:05 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 866722CC9; Sat, 31 Aug 2013 01:24:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7V1O57Q066995; Sat, 31 Aug 2013 01:24:05 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7V1O5AA066994; Sat, 31 Aug 2013 01:24:05 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201308310124.r7V1O5AA066994@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sat, 31 Aug 2013 01:24:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255088 - head/sys/mips/malta X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 01:24:05 -0000 Author: gonzo Date: Sat Aug 31 01:24:05 2013 New Revision: 255088 URL: http://svnweb.freebsd.org/changeset/base/255088 Log: YAMON is 32-bit application and uses 32-bit pointers to pass kernel arguments and environment names/values. Cast values to proper pointer type to make MALTA kernel 64-bit compatible Modified: head/sys/mips/malta/malta_machdep.c Modified: head/sys/mips/malta/malta_machdep.c ============================================================================== --- head/sys/mips/malta/malta_machdep.c Fri Aug 30 20:50:28 2013 (r255087) +++ head/sys/mips/malta/malta_machdep.c Sat Aug 31 01:24:05 2013 (r255088) @@ -269,8 +269,8 @@ platform_start(__register_t a0, __regist vm_offset_t kernend; uint64_t platform_counter_freq; int argc = a0; - char **argv = (char **)a1; - char **envp = (char **)a2; + int32_t *argv = (int32_t*)a1; + int32_t *envp = (int32_t*)a2; unsigned int memsize = a3; int i; @@ -289,15 +289,20 @@ platform_start(__register_t a0, __regist printf("entry: platform_start()\n"); bootverbose = 1; + /* + * YAMON uses 32bit pointers to strings so + * convert them to proper type manually + */ if (bootverbose) { printf("cmd line: "); for (i = 0; i < argc; i++) - printf("%s ", argv[i]); + printf("%s ", (char*)(intptr_t)argv[i]); printf("\n"); printf("envp:\n"); for (i = 0; envp[i]; i += 2) - printf("\t%s = %s\n", envp[i], envp[i+1]); + printf("\t%s = %s\n", (char*)(intptr_t)envp[i], + (char*)(intptr_t)envp[i+1]); printf("memsize = %08x\n", memsize); } From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 01:30:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CAEF956E; Sat, 31 Aug 2013 01:30:01 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B8A8D2CFC; Sat, 31 Aug 2013 01:30:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7V1U1br069223; Sat, 31 Aug 2013 01:30:01 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7V1U1iZ069222; Sat, 31 Aug 2013 01:30:01 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201308310130.r7V1U1iZ069222@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sat, 31 Aug 2013 01:30:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255089 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 01:30:01 -0000 Author: gonzo Date: Sat Aug 31 01:30:01 2013 New Revision: 255089 URL: http://svnweb.freebsd.org/changeset/base/255089 Log: - Set proper KERNLOADADDR - Add bpf(4) required by dhclient Modified: head/sys/mips/conf/MALTA64 Modified: head/sys/mips/conf/MALTA64 ============================================================================== --- head/sys/mips/conf/MALTA64 Sat Aug 31 01:24:05 2013 (r255088) +++ head/sys/mips/conf/MALTA64 Sat Aug 31 01:30:01 2013 (r255089) @@ -31,6 +31,8 @@ makeoptions MODULES_OVERRIDE="" options TICK_USE_YAMON_FREQ=defined #options TICK_USE_MALTA_RTC=defined +makeoptions KERNLOADADDR=0xffffffff80100000 + include "../malta/std.malta" hints "MALTA.hints" #Default places to look for devices. @@ -66,4 +68,5 @@ device ether device le device miibus device md +device bpf device uart From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 06:47:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3670C46B; Sat, 31 Aug 2013 06:47:54 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 148CE2DF7; Sat, 31 Aug 2013 06:47:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7V6lrs6050860; Sat, 31 Aug 2013 06:47:53 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7V6lrhK050857; Sat, 31 Aug 2013 06:47:53 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201308310647.r7V6lrhK050857@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Aug 2013 06:47:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255090 - in head/sys: dev/usb netgraph/bluetooth/drivers/ubt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 06:47:54 -0000 Author: hselasky Date: Sat Aug 31 06:47:53 2013 New Revision: 255090 URL: http://svnweb.freebsd.org/changeset/base/255090 Log: Sync USB bluetooth product list with Linux. MFC after: 1 week Modified: head/sys/dev/usb/usbdevs head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sat Aug 31 01:30:01 2013 (r255089) +++ head/sys/dev/usb/usbdevs Sat Aug 31 06:47:53 2013 (r255090) @@ -515,11 +515,13 @@ vendor USR 0x0baf U.S. Robotics vendor AMBIT 0x0bb2 Ambit Microsystems vendor HTC 0x0bb4 HTC vendor REALTEK 0x0bda Realtek +vendor ERICSSON2 0x0bdb Ericsson vendor MEI 0x0bed MEI vendor ADDONICS2 0x0bf6 Addonics Technology vendor FSC 0x0bf8 Fujitsu Siemens Computers vendor AGATE 0x0c08 Agate Technologies vendor DMI 0x0c0b DMI +vendor CANYON 0x0c10 Canyon vendor ICOM 0x0c26 Icom Inc. vendor GNOTOMETRICS 0x0c33 GN Otometrics vendor CHICONY2 0x0c45 Chicony Modified: head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c ============================================================================== --- head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Sat Aug 31 01:30:01 2013 (r255089) +++ head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Sat Aug 31 06:47:53 2013 (r255090) @@ -437,6 +437,66 @@ static const STRUCT_USB_HOST_ID ubt_devs USB_IFACE_CLASS(UICLASS_VENDOR), USB_IFACE_SUBCLASS(UDSUBCLASS_RF), USB_IFACE_PROTOCOL(UDPROTO_BLUETOOTH) }, + + /* Apple-specific (Broadcom) devices */ + { USB_VENDOR(USB_VENDOR_APPLE), + USB_IFACE_CLASS(UICLASS_VENDOR), + USB_IFACE_SUBCLASS(UDSUBCLASS_RF), + USB_IFACE_PROTOCOL(UDPROTO_BLUETOOTH) }, + + /* Foxconn - Hon Hai */ + { USB_VENDOR(USB_VENDOR_FOXCONN), + USB_IFACE_CLASS(UICLASS_VENDOR), + USB_IFACE_SUBCLASS(UDSUBCLASS_RF), + USB_IFACE_PROTOCOL(UDPROTO_BLUETOOTH) }, + + /* MediaTek MT76x0E */ + { USB_VPI(USB_VENDOR_MEDIATEK, 0x763f, 0) }, + + /* Broadcom SoftSailing reporting vendor specific */ + { USB_VPI(USB_VENDOR_BROADCOM, 0x21e1, 0) }, + + /* Apple MacBookPro 7,1 */ + { USB_VPI(USB_VENDOR_APPLE, 0x8213, 0) }, + + /* Apple iMac11,1 */ + { USB_VPI(USB_VENDOR_APPLE, 0x8215, 0) }, + + /* Apple MacBookPro6,2 */ + { USB_VPI(USB_VENDOR_APPLE, 0x8218, 0) }, + + /* Apple MacBookAir3,1, MacBookAir3,2 */ + { USB_VPI(USB_VENDOR_APPLE, 0x821b, 0) }, + + /* Apple MacBookAir4,1 */ + { USB_VPI(USB_VENDOR_APPLE, 0x821f, 0) }, + + /* MacBookAir6,1 */ + { USB_VPI(USB_VENDOR_APPLE, 0x828f, 0) }, + + /* Apple MacBookPro8,2 */ + { USB_VPI(USB_VENDOR_APPLE, 0x821a, 0) }, + + /* Apple MacMini5,1 */ + { USB_VPI(USB_VENDOR_APPLE, 0x8281, 0) }, + + /* Bluetooth Ultraport Module from IBM */ + { USB_VPI(USB_VENDOR_TDK, 0x030a, 0) }, + + /* ALPS Modules with non-standard ID */ + { USB_VPI(USB_VENDOR_ALPS, 0x3001, 0) }, + { USB_VPI(USB_VENDOR_ALPS, 0x3002, 0) }, + + { USB_VPI(USB_VENDOR_ERICSSON2, 0x1002, 0) }, + + /* Canyon CN-BTU1 with HID interfaces */ + { USB_VPI(USB_VENDOR_CANYON, 0x0000, 0) }, + + /* Broadcom BCM20702A0 */ + { USB_VPI(USB_VENDOR_ASUS, 0x17b5, 0) }, + { USB_VPI(USB_VENDOR_LITEON, 0x2003, 0) }, + { USB_VPI(USB_VENDOR_FOXCONN, 0xe042, 0) }, + { USB_VPI(USB_VENDOR_DELL, 0x8197, 0) }, }; /* From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 07:08:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A9F6671E; Sat, 31 Aug 2013 07:08:21 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 970EA2F06; Sat, 31 Aug 2013 07:08:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7V78L4k062702; Sat, 31 Aug 2013 07:08:21 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7V78Lcn062700; Sat, 31 Aug 2013 07:08:21 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201308310708.r7V78Lcn062700@svn.freebsd.org> From: Rui Paulo Date: Sat, 31 Aug 2013 07:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255091 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 07:08:21 -0000 Author: rpaulo Date: Sat Aug 31 07:08:21 2013 New Revision: 255091 URL: http://svnweb.freebsd.org/changeset/base/255091 Log: Fix a typo in a comment. Modified: head/sys/arm/arm/machdep.c Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Sat Aug 31 06:47:53 2013 (r255090) +++ head/sys/arm/arm/machdep.c Sat Aug 31 07:08:21 2013 (r255091) @@ -1263,7 +1263,7 @@ initarm(struct arm_boot_params *abp) break; /* * Restricted region includes memory region - * skip availble region + * skip available region */ if ((start >= rstart) && (rend >= end)) { start = rend; From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 07:39:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AFF1BEF9; Sat, 31 Aug 2013 07:39:25 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from mail.made4.biz (unknown [IPv6:2001:41d0:1:7018::1:3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4C39520E3; Sat, 31 Aug 2013 07:39:25 +0000 (UTC) Received: from 141.7.19.93.rev.sfr.net ([93.19.7.141] helo=[192.168.1.176]) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1VFfmF-000Mt3-5g; Sat, 31 Aug 2013 09:39:23 +0200 Message-ID: <52219DAE.9010707@FreeBSD.org> Date: Sat, 31 Aug 2013 09:39:26 +0200 From: =?ISO-8859-15?Q?Jean-S=E9bastien_P=E9dron?= User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r254882 - head/sys/dev/pci References: <201308251809.r7PI9CsE052978@svn.freebsd.org> <201308291007.26828.jhb@freebsd.org> <5220B15C.6050203@FreeBSD.org> <201308301644.36750.jhb@freebsd.org> In-Reply-To: <201308301644.36750.jhb@freebsd.org> Content-Type: multipart/mixed; boundary="------------060801010000040209080403" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 07:39:25 -0000 This is a multi-part message in MIME format. --------------060801010000040209080403 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit Le 30/08/2013 22:44, John Baldwin a écrit : >> However, BUS_ALLOC_RESOURCE() returns NULL in my tests. > > Hmm, can you get devinfo -u output? I wonder if orm0 is eating this > resource. You'll find it attached. -- Jean-Sébastien Pédron --------------060801010000040209080403 Content-Type: text/plain; charset=windows-1252; name="devinfo-u.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="devinfo-u.txt" Interrupt request lines: 0 (attimer0) 1 (atkbd0) 3 (uart1) 4 (uart0) 5-6 (root0) 7 (ppc0) 8 (root0) 9 (acpi0) 10-13 (root0) 14 (ata0) 15-17 (root0) 18 (uhci2) 19 (root0) 20 (ahci0) 20 (hpet0) 21 (ehci0) 21 (uhci0) 22 (uhci1) 23 (uhci3) 24-71 (root0) 256 (hdac0) 257 (mpt0) 258 (bge0) 259 (root0) DMA request lines: 0-3 (root0) 4 (atdma0) 5-7 (root0) I/O ports: 0x0-0x1f (atdma0) 0x20-0x3f ---- 0x40-0x5f (attimer0) 0x60 (acpi0) 0x61 ---- 0x62-0x63 (acpi0) 0x64 (acpi0) 0x65-0x6f (acpi0) 0x70-0x7f (atrtc0) 0x80-0x9f (atdma0) 0xa0-0xbf ---- 0xc0-0xdf (atdma0) 0xe0-0xef (acpi0) 0xf0-0xff (fpupnp0) 0x100-0x16f (root0) 0x170-0x177 (atapci0) 0x178-0x1ef (root0) 0x1f0-0x1f7 (atapci0) 0x1f8-0x2f7 (root0) 0x2f8-0x2ff (uart1) 0x300-0x375 (root0) 0x376 (atapci0) 0x377 (root0) 0x378-0x37f (ppc0) 0x380-0x3bf (root0) 0x3c0-0x3df (vga0) 0x3e0-0x3f5 (root0) 0x3f6 (atapci0) 0x3f7 (root0) 0x3f8-0x3ff (uart0) 0x400-0x4cf (root0) 0x4d0-0x4d1 ---- 0x4d2-0x777 (root0) 0x778-0x77f (ppc0) 0x780-0x7ff (root0) 0x800-0x85f (acpi0) 0x860-0x8ff (acpi0) 0x900-0xbff (root0) 0xc00-0xc7f (acpi0) 0xc80-0xcf7 (root0) 0xcf8-0xcff (pcib0) 0xd00-0xbfff (root0) 0xc000-0xcfff (pcib3) 0xd000-0xdfff (pcib2) 0xe000-0xecdf (root0) 0xece0-0xecff ---- 0xed00-0xfdff (root0) 0xfe00-0xfe07 (ahci0) 0xfe08-0xfe0f (root0) 0xfe10-0xfe13 (ahci0) 0xfe14-0xfe1f (root0) 0xfe20-0xfe27 (ahci0) 0xfe28-0xfe2f (root0) 0xfe30-0xfe33 (ahci0) 0xfe34-0xfebf (root0) 0xfec0-0xfedf (ahci0) 0xfee0-0xff1f (root0) 0xff20-0xff3f (uhci3) 0xff40-0xff5f (uhci2) 0xff60-0xff7f (uhci1) 0xff80-0xff9f (uhci0) 0xffa0-0xffaf (atapci0) 0xffb0-0xffff (root0) I/O memory addresses: 0x0-0x9d3ff (ram0) 0x9d400-0x9ffff (root0) 0xa0000-0xbffff (vga0) 0xc0000-0xcffff (orm0) 0xd0000-0xd5fff (orm0) 0xd6000-0xd7fff (orm0) 0xd8000-0xda7ff (orm0) 0xda800-0xdbfff (orm0) 0xdc000-0xfffff (root0) 0x100000-0xcfe0abff (ram0) 0xcfe0ac00-0xcfffffff (root0) 0xd0000000-0xdfffffff (pcib2) 0xe0000000-0xfc7fffff (root0) 0xfc800000-0xfc8fffff (pcib8) 0xfc900000-0xfcbfffff (pcib3) 0xfcc00000-0xfcdfffff (pcib2) 0xfce00000-0xfcefffff (pcib1) 0xfcf00000-0xfebfffff (root0) 0xfec00000-0xfec0001f (apic0) 0xfec00020-0xfec87fff (root0) 0xfec88000-0xfec8801f (apic0) 0xfec88020-0xfec88fff (root0) 0xfec89000-0xfec8901f (apic0) 0xfec89020-0xfecfffff (root0) 0xfed00000-0xfed003ff (hpet0) 0xfed00400-0xfedfffff (root0) 0xfee00000-0xfee003ff (apic0) 0xfee00400-0xff96ffff (root0) 0xff970000-0xff9703ff (ahci0) 0xff970400-0xff9807ff (root0) 0xff980800-0xff980bff (ehci0) 0xff980c00-0xffffffff (root0) 0x100000000-0x1ffffffff (ram0) 0x200000000-0x22fffffff (ram0) 0x230000000-0xffffffffffffffff (root0) ACPI I/O ports: 0x60 (atkbdc0) 0x62-0x63 (root0) 0x64 (atkbdc0) 0x65-0x6f (root0) 0xe0-0xef (root0) 0x800-0x807 (root0) 0x808-0x80b (acpi_timer0) 0x80c-0x8ff (root0) 0xc00-0xc7f (root0) ACPI I/O memory addresses: pcib1 I/O port window: pcib1 memory window: 0xfce00000-0xfcefffff (root0) pcib1 prefetch window: pcib2 I/O port window: 0xd000-0xdbff (root0) 0xdc00-0xdcff (vgapci0) 0xdd00-0xdfff (root0) pcib2 memory window: 0xfcc00000-0xfccdbfff (root0) 0xfccdc000-0xfccdffff (hdac0) 0xfcce0000-0xfccfffff (vgapci0) 0xfcd00000-0xfcdfffff (root0) pcib2 prefetch window: 0xd0000000-0xdfffffff (vgapci0) pcib3 I/O port window: 0xc000-0xcfff (pcib4) pcib3 memory window: 0xfc900000-0xfcafffff (pcib4) 0xfcb00000-0xfcbfffff (root0) pcib3 prefetch window: pcib4 I/O port window: 0xc000-0xcfff (pcib6) pcib4 memory window: 0xfc900000-0xfcafffff (pcib6) pcib4 prefetch window: pcib5 I/O port window: pcib5 memory window: pcib5 prefetch window: pcib6 I/O port window: 0xc000-0xcbff (root0) 0xcc00-0xccff (mpt0) 0xcd00-0xcfff (root0) pcib6 memory window: 0xfc900000-0xfc9ebfff (root0) 0xfc9ec000-0xfc9effff (mpt0) 0xfc9f0000-0xfc9fffff (mpt0) 0xfca00000-0xfcafffff (root0) pcib6 prefetch window: pcib7 I/O port window: pcib7 memory window: pcib7 prefetch window: pcib8 I/O port window: pcib8 memory window: 0xfc800000-0xfc8effff (root0) 0xfc8f0000-0xfc8fffff (bge0) pcib8 prefetch window: pcib9 I/O port window: pcib9 memory window: pcib9 prefetch window: I/O memory addresses: 0xff970000-0xff9700ff (root0) 0xff970100-0xff97017f (ahcich0) 0xff970180-0xff9701ff (ahcich1) 0xff970200-0xff97027f (ahcich2) 0xff970280-0xff9702ff (ahcich3) 0xff970300-0xff97037f (ahcich4) 0xff970380-0xff9703ff (root0) --------------060801010000040209080403-- From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 08:50:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 275A518F; Sat, 31 Aug 2013 08:50:46 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 048BA242D; Sat, 31 Aug 2013 08:50:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7V8ojxl022385; Sat, 31 Aug 2013 08:50:45 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7V8ojQX022383; Sat, 31 Aug 2013 08:50:45 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201308310850.r7V8ojQX022383@svn.freebsd.org> From: David Chisnall Date: Sat, 31 Aug 2013 08:50:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255092 - in head: lib/libcompiler_rt sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 08:50:46 -0000 Author: theraven Date: Sat Aug 31 08:50:45 2013 New Revision: 255092 URL: http://svnweb.freebsd.org/changeset/base/255092 Log: Unconditionally compile the __sync_* atomics support functions into compiler-rt for ARM. This is quite ugly, because it has to work around a clang bug that does not allow built-in functions to be defined, even when they're ones that are expected to be built as part of a library. Reviewed by: ed Modified: head/lib/libcompiler_rt/Makefile head/sys/arm/arm/stdatomic.c Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Sat Aug 31 07:08:21 2013 (r255091) +++ head/lib/libcompiler_rt/Makefile Sat Aug 31 08:50:45 2013 (r255092) @@ -153,10 +153,11 @@ SRCF+= divsi3 \ .endif # FreeBSD-specific atomic intrinsics. -.if ${MACHINE_CPUARCH} == "arm" +.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "armv6" .PATH: ${.CURDIR}/../../sys/arm/arm SRCF+= stdatomic +CFLAGS+= -DEMIT_SYNC_ATOMICS .elif ${MACHINE_CPUARCH} == "mips" .PATH: ${.CURDIR}/../../sys/mips/mips Modified: head/sys/arm/arm/stdatomic.c ============================================================================== --- head/sys/arm/arm/stdatomic.c Sat Aug 31 07:08:21 2013 (r255091) +++ head/sys/arm/arm/stdatomic.c Sat Aug 31 08:50:45 2013 (r255092) @@ -194,6 +194,7 @@ EMIT_ALL_OPS_N(1, uint8_t) EMIT_ALL_OPS_N(2, uint16_t) EMIT_ALL_OPS_N(4, uint32_t) EMIT_ALL_OPS_N(8, uint64_t) +#undef EMIT_ALL_OPS_N #else /* !_KERNEL */ @@ -330,6 +331,7 @@ EMIT_FETCH_OP_N(N, uintN_t, ldr, str, fe EMIT_ALL_OPS_N(1, uint8_t, "ldrb", "strb", "strbeq") EMIT_ALL_OPS_N(2, uint16_t, "ldrh", "strh", "strheq") EMIT_ALL_OPS_N(4, uint32_t, "ldr", "str", "streq") +#undef EMIT_ALL_OPS_N #endif /* _KERNEL */ @@ -337,7 +339,31 @@ EMIT_ALL_OPS_N(4, uint32_t, "ldr", "str" #endif /* __CLANG_ATOMICS || __GNUC_ATOMICS */ -#if defined(__SYNC_ATOMICS) +#if defined(__SYNC_ATOMICS) || defined(EMIT_SYNC_ATOMICS) + +#ifdef __clang__ +#pragma redefine_extname __sync_lock_test_and_set_1_c __sync_lock_test_and_set_1 +#pragma redefine_extname __sync_lock_test_and_set_2_c __sync_lock_test_and_set_2 +#pragma redefine_extname __sync_lock_test_and_set_4_c __sync_lock_test_and_set_4 +#pragma redefine_extname __sync_val_compare_and_swap_1_c __sync_val_compare_and_swap_1 +#pragma redefine_extname __sync_val_compare_and_swap_2_c __sync_val_compare_and_swap_2 +#pragma redefine_extname __sync_val_compare_and_swap_4_c __sync_val_compare_and_swap_4 +#pragma redefine_extname __sync_fetch_and_add_1_c __sync_fetch_and_add_1 +#pragma redefine_extname __sync_fetch_and_add_2_c __sync_fetch_and_add_2 +#pragma redefine_extname __sync_fetch_and_add_4_c __sync_fetch_and_add_4 +#pragma redefine_extname __sync_fetch_and_and_1_c __sync_fetch_and_and_1 +#pragma redefine_extname __sync_fetch_and_and_2_c __sync_fetch_and_and_2 +#pragma redefine_extname __sync_fetch_and_and_4_c __sync_fetch_and_and_4 +#pragma redefine_extname __sync_fetch_and_or_1_c __sync_fetch_and_or_1 +#pragma redefine_extname __sync_fetch_and_or_2_c __sync_fetch_and_or_2 +#pragma redefine_extname __sync_fetch_and_or_4_c __sync_fetch_and_or_4 +#pragma redefine_extname __sync_fetch_and_xor_1_c __sync_fetch_and_xor_1 +#pragma redefine_extname __sync_fetch_and_xor_2_c __sync_fetch_and_xor_2 +#pragma redefine_extname __sync_fetch_and_xor_4_c __sync_fetch_and_xor_4 +#pragma redefine_extname __sync_fetch_and_sub_1_c __sync_fetch_and_sub_1 +#pragma redefine_extname __sync_fetch_and_sub_2_c __sync_fetch_and_sub_2 +#pragma redefine_extname __sync_fetch_and_sub_4_c __sync_fetch_and_sub_4 +#endif /* * Old __sync_* API. @@ -430,7 +456,7 @@ get_2(const reg_t *r, const uint16_t *of #define EMIT_LOCK_TEST_AND_SET_N(N, uintN_t) \ uintN_t \ -__sync_lock_test_and_set_##N(uintN_t *mem, uintN_t val) \ +__sync_lock_test_and_set_##N##_c(uintN_t *mem, uintN_t val) \ { \ uint32_t *mem32; \ reg_t val32, negmask, old; \ @@ -462,7 +488,7 @@ EMIT_LOCK_TEST_AND_SET_N(2, uint16_t) #define EMIT_VAL_COMPARE_AND_SWAP_N(N, uintN_t) \ uintN_t \ -__sync_val_compare_and_swap_##N(uintN_t *mem, uintN_t expected, \ +__sync_val_compare_and_swap_##N##_c(uintN_t *mem, uintN_t expected, \ uintN_t desired) \ { \ uint32_t *mem32; \ @@ -503,7 +529,7 @@ EMIT_VAL_COMPARE_AND_SWAP_N(2, uint16_t) #define EMIT_ARITHMETIC_FETCH_AND_OP_N(N, uintN_t, name, op) \ uintN_t \ -__sync_##name##_##N(uintN_t *mem, uintN_t val) \ +__sync_##name##_##N##_c(uintN_t *mem, uintN_t val) \ { \ uint32_t *mem32; \ reg_t val32, posmask, old; \ @@ -541,7 +567,7 @@ EMIT_ARITHMETIC_FETCH_AND_OP_N(2, uint16 #define EMIT_BITWISE_FETCH_AND_OP_N(N, uintN_t, name, op, idempotence) \ uintN_t \ -__sync_##name##_##N(uintN_t *mem, uintN_t val) \ +__sync_##name##_##N##_c(uintN_t *mem, uintN_t val) \ { \ uint32_t *mem32; \ reg_t val32, old; \ @@ -577,7 +603,7 @@ EMIT_BITWISE_FETCH_AND_OP_N(2, uint16_t, */ uint32_t -__sync_lock_test_and_set_4(uint32_t *mem, uint32_t val) +__sync_lock_test_and_set_4_c(uint32_t *mem, uint32_t val) { uint32_t old, temp; @@ -594,7 +620,7 @@ __sync_lock_test_and_set_4(uint32_t *mem } uint32_t -__sync_val_compare_and_swap_4(uint32_t *mem, uint32_t expected, +__sync_val_compare_and_swap_4_c(uint32_t *mem, uint32_t expected, uint32_t desired) { uint32_t old, temp; @@ -616,7 +642,7 @@ __sync_val_compare_and_swap_4(uint32_t * #define EMIT_FETCH_AND_OP_4(name, op) \ uint32_t \ -__sync_##name##_4(uint32_t *mem, uint32_t val) \ +__sync_##name##_4##_c(uint32_t *mem, uint32_t val) \ { \ uint32_t old, temp1, temp2; \ \ @@ -694,6 +720,7 @@ EMIT_ALL_OPS_N(1, uint8_t) EMIT_ALL_OPS_N(2, uint16_t) EMIT_ALL_OPS_N(4, uint32_t) EMIT_ALL_OPS_N(8, uint64_t) +#undef EMIT_ALL_OPS_N #else /* !_KERNEL */ @@ -705,7 +732,7 @@ EMIT_ALL_OPS_N(8, uint64_t) #define EMIT_LOCK_TEST_AND_SET_N(N, uintN_t, ldr, str) \ uintN_t \ -__sync_lock_test_and_set_##N(uintN_t *mem, uintN_t val) \ +__sync_lock_test_and_set_##N##_c(uintN_t *mem, uintN_t val) \ { \ uint32_t old, temp, ras_start; \ \ @@ -734,7 +761,7 @@ __sync_lock_test_and_set_##N(uintN_t *me #define EMIT_VAL_COMPARE_AND_SWAP_N(N, uintN_t, ldr, streq) \ uintN_t \ -__sync_val_compare_and_swap_##N(uintN_t *mem, uintN_t expected, \ +__sync_val_compare_and_swap_##N##_c(uintN_t *mem, uintN_t expected, \ uintN_t desired) \ { \ uint32_t old, temp, ras_start; \ @@ -766,7 +793,7 @@ __sync_val_compare_and_swap_##N(uintN_t #define EMIT_FETCH_AND_OP_N(N, uintN_t, ldr, str, name, op) \ uintN_t \ -__sync_##name##_##N(uintN_t *mem, uintN_t val) \ +__sync_##name##_##N##_c(uintN_t *mem, uintN_t val) \ { \ uint32_t old, temp, ras_start; \ \ @@ -807,6 +834,30 @@ EMIT_ALL_OPS_N(1, uint8_t, "ldrb", "strb EMIT_ALL_OPS_N(2, uint16_t, "ldrh", "strh", "streqh") EMIT_ALL_OPS_N(4, uint32_t, "ldr", "str", "streq") +#ifndef __clang__ +__strong_reference(__sync_lock_test_and_set_1_c, __sync_lock_test_and_set_1); +__strong_reference(__sync_lock_test_and_set_2_c, __sync_lock_test_and_set_2); +__strong_reference(__sync_lock_test_and_set_4_c, __sync_lock_test_and_set_4); +__strong_reference(__sync_val_compare_and_swap_1_c, __sync_val_compare_and_swap_1); +__strong_reference(__sync_val_compare_and_swap_2_c, __sync_val_compare_and_swap_2); +__strong_reference(__sync_val_compare_and_swap_4_c, __sync_val_compare_and_swap_4); +__strong_reference(__sync_fetch_and_add_1_c, __sync_fetch_and_add_1); +__strong_reference(__sync_fetch_and_add_2_c, __sync_fetch_and_add_2); +__strong_reference(__sync_fetch_and_add_4_c, __sync_fetch_and_add_4); +__strong_reference(__sync_fetch_and_and_1_c, __sync_fetch_and_and_1); +__strong_reference(__sync_fetch_and_and_2_c, __sync_fetch_and_and_2); +__strong_reference(__sync_fetch_and_and_4_c, __sync_fetch_and_and_4); +__strong_reference(__sync_fetch_and_sub_1_c, __sync_fetch_and_sub_1); +__strong_reference(__sync_fetch_and_sub_2_c, __sync_fetch_and_sub_2); +__strong_reference(__sync_fetch_and_sub_4_c, __sync_fetch_and_sub_4); +__strong_reference(__sync_fetch_and_or_1_c, __sync_fetch_and_or_1); +__strong_reference(__sync_fetch_and_or_2_c, __sync_fetch_and_or_2); +__strong_reference(__sync_fetch_and_or_4_c, __sync_fetch_and_or_4); +__strong_reference(__sync_fetch_and_xor_1_c, __sync_fetch_and_xor_1); +__strong_reference(__sync_fetch_and_xor_2_c, __sync_fetch_and_xor_2); +__strong_reference(__sync_fetch_and_xor_4_c, __sync_fetch_and_xor_4); +#endif + #endif /* _KERNEL */ #endif From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 08:56:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 70218305; Sat, 31 Aug 2013 08:56:34 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5C4982450; Sat, 31 Aug 2013 08:56:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7V8uY1d024582; Sat, 31 Aug 2013 08:56:34 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7V8uY1N024581; Sat, 31 Aug 2013 08:56:34 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201308310856.r7V8uY1N024581@svn.freebsd.org> From: David Chisnall Date: Sat, 31 Aug 2013 08:56:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255093 - head/contrib/libcxxrt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 08:56:34 -0000 Author: theraven Date: Sat Aug 31 08:56:33 2013 New Revision: 255093 URL: http://svnweb.freebsd.org/changeset/base/255093 Log: Don't use _Unwind_Backtrace() on ARM as it's currently missing from our libgcc_s. andrew@ has patches to add it, so this can be reverted and sync'd with upstream later. Modified: head/contrib/libcxxrt/exception.cc Modified: head/contrib/libcxxrt/exception.cc ============================================================================== --- head/contrib/libcxxrt/exception.cc Sat Aug 31 08:50:45 2013 (r255092) +++ head/contrib/libcxxrt/exception.cc Sat Aug 31 08:56:33 2013 (r255093) @@ -715,7 +715,9 @@ static void report_failure(_Unwind_Reaso if (status == 0) { free(demangled); } // Print a back trace if no handler is found. // TODO: Make this optional +#ifndef __arm__ _Unwind_Backtrace(trace, 0); +#endif break; } std::terminate(); From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 09:18:50 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8248E67C; Sat, 31 Aug 2013 09:18:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id C9CB0254E; Sat, 31 Aug 2013 09:18:48 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA24201; Sat, 31 Aug 2013 12:08:25 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VFhAP-000DCM-E1; Sat, 31 Aug 2013 12:08:25 +0300 Message-ID: <5221B24F.4040800@FreeBSD.org> Date: Sat, 31 Aug 2013 12:07:27 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130810 Thunderbird/17.0.8 MIME-Version: 1.0 To: d@delphij.net Subject: Re: svn commit: r254585 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201308202231.r7KMVERi068300@svn.freebsd.org> <20130825221517.GM24767@caravan.chchile.org> <521B75CE.70103@FreeBSD.org> <521BDEAC.9080909@delphij.net> <521C5CAC.2060400@FreeBSD.org> <521D4C41.3060208@delphij.net> <52211CF0.1070807@delphij.net> In-Reply-To: <52211CF0.1070807@delphij.net> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Davide Italiano , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, Xin LI , svn-src-head@FreeBSD.org, Konstantin Belousov , Xin Li X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 09:18:50 -0000 on 31/08/2013 01:30 Xin Li said the following: > I've re-examined the code with some instruments and it looks like the case > where tdzp and sdzp have different z_zfsvfs were caught by upper layer in > our VFS. I don't believe this to be true. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 11:30:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1979BAAD; Sat, 31 Aug 2013 11:30:04 +0000 (UTC) (envelope-from edschouten@gmail.com) Received: from mail-vc0-x22e.google.com (mail-vc0-x22e.google.com [IPv6:2607:f8b0:400c:c03::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 97EFE2ADF; Sat, 31 Aug 2013 11:30:03 +0000 (UTC) Received: by mail-vc0-f174.google.com with SMTP id gd11so1962741vcb.33 for ; Sat, 31 Aug 2013 04:30:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=lTGv9O/ctrb+yXn4DSACV4/of1dHe0vBZybfk/zA4Lk=; b=vrjWtxmZnWQGtmUxXUf5pdXrxkH8jM55K4SFFk1Qj6fBHksg45cLTLjY2nePn899AL rERGCYIDIRAeYYXVKF/zUiiFKHXp8cqtaBZZ8D6o/ttXMAkgShavBdCTH1rTaAgZgGx7 TE+EUxCJoJn41vEQnAmxAtCeVUTgwZt3FpSctyV7DwDwRcraOH5L97BdTXWD7koUCuRH fLen/o9kwlw+40IKqpYr50ZuU6mBPSj9KsZeFuL7JQ+ptfwSGLuMSkrY7SZyhmNSw2U6 0ATqS9YeuajFBP5MkR4dIjgAermqujR6UYzj+pscSSmGdAFmukxrOVYHeOVA+dseTO2d SLZA== MIME-Version: 1.0 X-Received: by 10.58.137.167 with SMTP id qj7mr12817112veb.1.1377948602413; Sat, 31 Aug 2013 04:30:02 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.220.115.206 with HTTP; Sat, 31 Aug 2013 04:30:02 -0700 (PDT) In-Reply-To: <201308310850.r7V8ojQX022383@svn.freebsd.org> References: <201308310850.r7V8ojQX022383@svn.freebsd.org> Date: Sat, 31 Aug 2013 13:30:02 +0200 X-Google-Sender-Auth: 6g2eWwSy80uHPGHSiZ9RXMAxQdQ Message-ID: Subject: Re: svn commit: r255092 - in head: lib/libcompiler_rt sys/arm/arm From: Ed Schouten To: David Chisnall 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 11:30:04 -0000 2013/8/31 David Chisnall : > Reviewed by: ed Just for the record: though I did review this patch, but did not agree with the approach taken. Though I have to confess that due all the case distinctions this code isn't the cleanest out there, the #pragmas/__strong_references make it even less readable. In my opinion, this should have been fixed as follows: 1. Fix LLVM/Clang. Never ever let LLVM/Clang emit calls to __sync_*. You can easily implement the __sync_* interface on top of __atomic_*. What baffles me, is that the calls to __sync_* are emitted by LLVM (SelectionDAGLegalize::ExpandAtomic), while Clang is responsible for emitting the __atomic_* calls (CodeGenFunction::EmitAtomicExpr). All of this should have been pushed down into LLVM in the first place. It is currently hard to implement your own programming language on top of LLVM that is capable of doing atomic operations the same way C11/C++11 does them. You either have to use the __sync_* intrinsics or duplicate all the code that emits the libcalls. I've noticed that due to this separation of doing __sync_* in LLVM and __atomic_* in Clang, the behaviour of Clang can sometimes be incredibly counter-intuitive. For example, both LLVM and Clang need a similar piece of code to determine whether hardware atomics are available. I've noticed that if this logic is not identical, Clang does some really weird things. If you call __atomic_* functions and Clang thinks we have hardware atomics, but LLVM thinks we do not, we may end up emitting calls to __sync_* instead. Furthermore, the duplication of code between EmitAtomicExpr, EmitAtomicStore and EmitAtomicLoad leads to the problem that EmitAtomicExpr properly emits power-of-two-sized calls for most primitive datatypes, while EmitAtomicStore and EmitAtomicLoad do not. 2. Fix the consumers. Right now there are only two pieces of code in our tree (libc++ and libcxxrt) that emit calls to __sync_* unconditionally. All the other code either uses or . These pieces of code could have been ported to use C11 atomics with a similar amount of effort. For libcxxrt you could even argue that this should have done in the first place, because it already used __atomic_* calls in certain source files. Example patch for libcxxrt: http://80386.nl/pub/libcxxrt.txt -- Ed Schouten From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 11:34:25 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5AF7CD69; Sat, 31 Aug 2013 11:34:25 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 128272B5F; Sat, 31 Aug 2013 11:34:24 +0000 (UTC) Received: from [192.168.0.2] (cpc27-cmbg15-2-0-cust235.5-4.cable.virginmedia.com [86.27.188.236]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id r7VBYJjt016690 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 31 Aug 2013 11:34:20 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r255092 - in head: lib/libcompiler_rt sys/arm/arm From: David Chisnall In-Reply-To: Date: Sat, 31 Aug 2013 12:34:13 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <34C4386C-25D8-449C-8E53-5A0597FEEF7A@FreeBSD.org> References: <201308310850.r7V8ojQX022383@svn.freebsd.org> To: Ed Schouten X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 11:34:25 -0000 On 31 Aug 2013, at 12:30, Ed Schouten wrote: > 1. Fix LLVM/Clang. >=20 > Never ever let LLVM/Clang emit calls to __sync_*. You can easily > implement the __sync_* interface on top of __atomic_*. What baffles > me, is that the calls to __sync_* are emitted by LLVM > (SelectionDAGLegalize::ExpandAtomic), while Clang is responsible for > emitting the __atomic_* calls (CodeGenFunction::EmitAtomicExpr). >=20 > All of this should have been pushed down into LLVM in the first place. > It is currently hard to implement your own programming language on top > of LLVM that is capable of doing atomic operations the same way > C11/C++11 does them. You either have to use the __sync_* intrinsics or > duplicate all the code that emits the libcalls. >=20 > I've noticed that due to this separation of doing __sync_* in LLVM and > __atomic_* in Clang, the behaviour of Clang can sometimes be > incredibly counter-intuitive. For example, both LLVM and Clang need a > similar piece of code to determine whether hardware atomics are > available. I've noticed that if this logic is not identical, Clang > does some really weird things. If you call __atomic_* functions and > Clang thinks we have hardware atomics, but LLVM thinks we do not, we > may end up emitting calls to __sync_* instead. >=20 > Furthermore, the duplication of code between EmitAtomicExpr, > EmitAtomicStore and EmitAtomicLoad leads to the problem that > EmitAtomicExpr properly emits power-of-two-sized calls for most > primitive datatypes, while EmitAtomicStore and EmitAtomicLoad do not. I completely agree with all of this. There are lots of things in the = layering in LLVM that I don't like that place too much target-specific = knowledge in the front ends. =20 > 2. Fix the consumers. >=20 > Right now there are only two pieces of code in our tree (libc++ and > libcxxrt) that emit calls to __sync_* unconditionally. All the other > code either uses or . These pieces of > code could have been ported to use C11 atomics with a similar amount > of effort. >=20 > For libcxxrt you could even argue that this should have done in the > first place, because it already used __atomic_* calls in certain > source files. >=20 > Example patch for libcxxrt: >=20 > http://80386.nl/pub/libcxxrt.txt libcxxrt, in particular, has the constraint that it must also compile = with gcc and Path64, so patches of this nature need careful testing. = Although this would fix the issue in the tree, a number of ports = explicitly call the __sync_* builtins, including some that have USE_GCC = set, so even fixing clang would not address this. David From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 12:04:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 98B73C7F; Sat, 31 Aug 2013 12:04:47 +0000 (UTC) (envelope-from edschouten@gmail.com) Received: from mail-ve0-x229.google.com (mail-ve0-x229.google.com [IPv6:2607:f8b0:400c:c01::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 14DF72DE6; Sat, 31 Aug 2013 12:04:47 +0000 (UTC) Received: by mail-ve0-f169.google.com with SMTP id db10so2057143veb.14 for ; Sat, 31 Aug 2013 05:04:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=phJGSWvebw06UmUz5m+MgOH29HihbtfNXJsIV9LuxZI=; b=ZfsXQJ5Z5KgIiFaeTw1nduWsoxIX3JAzbgFKxUXEL4HlAzNhlGOqwPCNHFvleAYx5d 5XFQX2fpRvKIpbmR7MaaBwuJgeqaSjXKiKqBzyFklCA+iTN1e3nKqAwZ3IVALOd57vRB fBR6kW8ZSO2PM3FbGe+QQrK6+xInq25bA0RbPvzGrAcJHhwetwpBsBHL0dq0Fdr1kjUf 2xxxheB4Txftalc0BE5EErrOxGNv5vhxXjc7aiGnQfFu07NaTmn29rw96Ny/3si4T0u3 5QMzLxJu87dchkbPjqU9q9n7DfOQKjTKJukb6Nism2CviOxVoUkLJtSmRgHMX/Fklwbr q5rQ== MIME-Version: 1.0 X-Received: by 10.58.108.8 with SMTP id hg8mr12536415veb.6.1377950686225; Sat, 31 Aug 2013 05:04:46 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.220.115.206 with HTTP; Sat, 31 Aug 2013 05:04:46 -0700 (PDT) In-Reply-To: <34C4386C-25D8-449C-8E53-5A0597FEEF7A@FreeBSD.org> References: <201308310850.r7V8ojQX022383@svn.freebsd.org> <34C4386C-25D8-449C-8E53-5A0597FEEF7A@FreeBSD.org> Date: Sat, 31 Aug 2013 14:04:46 +0200 X-Google-Sender-Auth: 3R_TqrImZH7I9Ff8nTeR0AF2CC8 Message-ID: Subject: Re: svn commit: r255092 - in head: lib/libcompiler_rt sys/arm/arm From: Ed Schouten To: David Chisnall 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 12:04:47 -0000 2013/8/31 David Chisnall : > Although this would fix the issue in the tree, a number of ports explicitly call the __sync_* builtins, including some that have USE_GCC set, so even fixing clang would not address this. Do we know how many ports there are that do this? This only affects ports that use __sync_*, have USE_GCC is set and are being built on ARMv5. I think our intent should not be to "keep compilers happy". FreeBSD should provide proper APIs instead (e.g. ). -- Ed Schouten From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 14:53:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1E1ED6BC; Sat, 31 Aug 2013 14:53:20 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0BB2F25D4; Sat, 31 Aug 2013 14:53:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7VErJCV028259; Sat, 31 Aug 2013 14:53:19 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7VErJHV028236; Sat, 31 Aug 2013 14:53:19 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201308311453.r7VErJHV028236@svn.freebsd.org> From: Andrew Turner Date: Sat, 31 Aug 2013 14:53:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255095 - head/contrib/gcc/config/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 14:53:20 -0000 Author: andrew Date: Sat Aug 31 14:53:19 2013 New Revision: 255095 URL: http://svnweb.freebsd.org/changeset/base/255095 Log: Bring in gcc r128087 to add support for _Unwind_Backtrace on ARM. This is prior to the licence change so is under the GPLv2. Modified: head/contrib/gcc/config/arm/libunwind.S head/contrib/gcc/config/arm/unwind-arm.c head/contrib/gcc/config/arm/unwind-arm.h Modified: head/contrib/gcc/config/arm/libunwind.S ============================================================================== --- head/contrib/gcc/config/arm/libunwind.S Sat Aug 31 13:41:20 2013 (r255094) +++ head/contrib/gcc/config/arm/libunwind.S Sat Aug 31 14:53:19 2013 (r255095) @@ -116,5 +116,6 @@ UNWIND_WRAPPER _Unwind_RaiseException 1 UNWIND_WRAPPER _Unwind_Resume 1 UNWIND_WRAPPER _Unwind_Resume_or_Rethrow 1 UNWIND_WRAPPER _Unwind_ForcedUnwind 3 +UNWIND_WRAPPER _Unwind_Backtrace 2 -#endif /* __symbian__ */ +#endif /* ndef __symbian__ */ Modified: head/contrib/gcc/config/arm/unwind-arm.c ============================================================================== --- head/contrib/gcc/config/arm/unwind-arm.c Sat Aug 31 13:41:20 2013 (r255094) +++ head/contrib/gcc/config/arm/unwind-arm.c Sat Aug 31 14:53:19 2013 (r255095) @@ -747,6 +747,66 @@ _Unwind_DeleteException (_Unwind_Excepti } +/* Perform stack backtrace through unwind data. */ +_Unwind_Reason_Code +__gnu_Unwind_Backtrace(_Unwind_Trace_Fn trace, void * trace_argument, + phase2_vrs * entry_vrs); +_Unwind_Reason_Code +__gnu_Unwind_Backtrace(_Unwind_Trace_Fn trace, void * trace_argument, + phase2_vrs * entry_vrs) +{ + phase1_vrs saved_vrs; + _Unwind_Reason_Code code; + + _Unwind_Control_Block ucb; + _Unwind_Control_Block *ucbp = &ucb; + + /* Set the pc to the call site. */ + entry_vrs->core.r[R_PC] = entry_vrs->core.r[R_LR]; + + /* Save the core registers. */ + saved_vrs.core = entry_vrs->core; + /* Set demand-save flags. */ + saved_vrs.demand_save_flags = ~(_uw) 0; + + do + { + /* Find the entry for this routine. */ + if (get_eit_entry (ucbp, saved_vrs.core.r[R_PC]) != _URC_OK) + { + code = _URC_FAILURE; + break; + } + + /* The dwarf unwinder assumes the context structure holds things + like the function and LSDA pointers. The ARM implementation + caches these in the exception header (UCB). To avoid + rewriting everything we make the virtual IP register point at + the UCB. */ + _Unwind_SetGR((_Unwind_Context *)&saved_vrs, 12, (_Unwind_Ptr) ucbp); + + /* Call trace function. */ + if ((*trace) ((_Unwind_Context *) &saved_vrs, trace_argument) + != _URC_NO_REASON) + { + code = _URC_FAILURE; + break; + } + + /* Call the pr to decide what to do. */ + code = ((personality_routine) UCB_PR_ADDR (ucbp)) + (_US_VIRTUAL_UNWIND_FRAME | _US_FORCE_UNWIND, + ucbp, (void *) &saved_vrs); + } + while (code != _URC_END_OF_STACK + && code != _URC_FAILURE); + + finish: + restore_non_core_regs (&saved_vrs); + return code; +} + + /* Common implementation for ARM ABI defined personality routines. ID is the index of the personality routine, other arguments are as defined by __aeabi_unwind_cpp_pr{0,1,2}. */ Modified: head/contrib/gcc/config/arm/unwind-arm.h ============================================================================== --- head/contrib/gcc/config/arm/unwind-arm.h Sat Aug 31 13:41:20 2013 (r255094) +++ head/contrib/gcc/config/arm/unwind-arm.h Sat Aug 31 14:53:19 2013 (r255095) @@ -205,6 +205,13 @@ extern "C" { _Unwind_Control_Block *, struct _Unwind_Context *, void *); _Unwind_Reason_Code _Unwind_ForcedUnwind (_Unwind_Control_Block *, _Unwind_Stop_Fn, void *); + /* @@@ Use unwind data to perform a stack backtrace. The trace callback + is called for every stack frame in the call chain, but no cleanup + actions are performed. */ + typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn) (_Unwind_Context *, void *); + _Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn, + void*); + _Unwind_Word _Unwind_GetCFA (struct _Unwind_Context *); void _Unwind_Complete(_Unwind_Control_Block *ucbp); void _Unwind_DeleteException (_Unwind_Exception *); From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 14:56:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 13D1E91B; Sat, 31 Aug 2013 14:56:10 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DBD7625F4; Sat, 31 Aug 2013 14:56:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7VEu9OI029524; Sat, 31 Aug 2013 14:56:09 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7VEu9wL029522; Sat, 31 Aug 2013 14:56:09 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201308311456.r7VEu9wL029522@svn.freebsd.org> From: Andrew Turner Date: Sat, 31 Aug 2013 14:56:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255096 - head/contrib/gcc/config/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 14:56:10 -0000 Author: andrew Date: Sat Aug 31 14:56:09 2013 New Revision: 255096 URL: http://svnweb.freebsd.org/changeset/base/255096 Log: Implement _Unwind_GetIP and _Unwind_GetIPInfo as functions as that is what we expect on FreeBSD. The implementation is based on the existing macros. Modified: head/contrib/gcc/config/arm/unwind-arm.c head/contrib/gcc/config/arm/unwind-arm.h Modified: head/contrib/gcc/config/arm/unwind-arm.c ============================================================================== --- head/contrib/gcc/config/arm/unwind-arm.c Sat Aug 31 14:53:19 2013 (r255095) +++ head/contrib/gcc/config/arm/unwind-arm.c Sat Aug 31 14:56:09 2013 (r255096) @@ -1074,3 +1074,19 @@ _Unwind_GetTextRelBase (_Unwind_Context { abort (); } + +#ifdef __FreeBSD__ +/* FreeBSD expects these to be functions */ +_Unwind_Ptr +_Unwind_GetIP (struct _Unwind_Context *context) +{ + return _Unwind_GetGR (context, 15) & ~(_Unwind_Word)1; +} + +_Unwind_Ptr +_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn) +{ + *ip_before_insn = 0; + return _Unwind_GetGR (context, 15) & ~(_Unwind_Word)1; +} +#endif Modified: head/contrib/gcc/config/arm/unwind-arm.h ============================================================================== --- head/contrib/gcc/config/arm/unwind-arm.h Sat Aug 31 14:53:19 2013 (r255095) +++ head/contrib/gcc/config/arm/unwind-arm.h Sat Aug 31 14:56:09 2013 (r255096) @@ -253,12 +253,17 @@ extern "C" { return val; } +#ifndef __FreeBSD__ /* Return the address of the instruction, not the actual IP value. */ #define _Unwind_GetIP(context) \ (_Unwind_GetGR (context, 15) & ~(_Unwind_Word)1) #define _Unwind_GetIPInfo(context, ip_before_insn) \ (*ip_before_insn = 0, _Unwind_GetGR (context, 15) & ~(_Unwind_Word)1) +#else + _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *); + _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *); +#endif static inline void _Unwind_SetGR (_Unwind_Context *context, int regno, _Unwind_Word val) From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 15:40:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 06BDF28E; Sat, 31 Aug 2013 15:40:16 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E7A3A27F1; Sat, 31 Aug 2013 15:40:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7VFeFJC055286; Sat, 31 Aug 2013 15:40:15 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7VFeF2S055285; Sat, 31 Aug 2013 15:40:15 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201308311540.r7VFeF2S055285@svn.freebsd.org> From: Kirk McKusick Date: Sat, 31 Aug 2013 15:40:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255097 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 15:40:16 -0000 Author: mckusick Date: Sat Aug 31 15:40:15 2013 New Revision: 255097 URL: http://svnweb.freebsd.org/changeset/base/255097 Log: Fix bug introduced in rewrite of keg_free_slab in -r251894. The consequence of the bug is that fini calls are not done when a slab is freed by a call-back from the page daemon. It went unnoticed for two months because fini is little used. I spotted the bug while reading the code to learn how it works so I could write it up for the next edition of the Design and Implementation of FreeBSD book. No MFC needed as this code exists only in HEAD. Reviewed by: kib, jeff Tested by: pho Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Sat Aug 31 14:56:09 2013 (r255096) +++ head/sys/vm/uma_core.c Sat Aug 31 15:40:15 2013 (r255097) @@ -780,7 +780,7 @@ finished: while ((slab = SLIST_FIRST(&freeslabs)) != NULL) { SLIST_REMOVE(&freeslabs, slab, uma_slab, us_hlink); - keg_free_slab(keg, slab, 0); + keg_free_slab(keg, slab, keg->uk_ipers); } } From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 16:21:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0288390C; Sat, 31 Aug 2013 16:21:14 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CAC962991; Sat, 31 Aug 2013 16:21:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7VGLD4F079088; Sat, 31 Aug 2013 16:21:13 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7VGLDdM079087; Sat, 31 Aug 2013 16:21:13 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201308311621.r7VGLDdM079087@svn.freebsd.org> From: Alan Cox Date: Sat, 31 Aug 2013 16:21:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255098 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 16:21:14 -0000 Author: alc Date: Sat Aug 31 16:21:13 2013 New Revision: 255098 URL: http://svnweb.freebsd.org/changeset/base/255098 Log: Implement pmap_advise(). Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Sat Aug 31 15:40:15 2013 (r255097) +++ head/sys/mips/mips/pmap.c Sat Aug 31 16:21:13 2013 (r255098) @@ -2914,11 +2914,92 @@ pmap_is_prefaultable(pmap_t pmap, vm_off } /* - * This function is advisory. + * Apply the given advice to the specified range of addresses within the + * given pmap. Depending on the advice, clear the referenced and/or + * modified flags in each mapping and set the mapped page's dirty field. */ void pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, int advice) { + pd_entry_t *pde, *pdpe; + pt_entry_t *pte; + vm_offset_t va, va_next; + vm_paddr_t pa; + vm_page_t m; + + if (advice != MADV_DONTNEED && advice != MADV_FREE) + return; + rw_wlock(&pvh_global_lock); + PMAP_LOCK(pmap); + for (; sva < eva; sva = va_next) { + pdpe = pmap_segmap(pmap, sva); +#ifdef __mips_n64 + if (*pdpe == 0) { + va_next = (sva + NBSEG) & ~SEGMASK; + if (va_next < sva) + va_next = eva; + continue; + } +#endif + va_next = (sva + NBPDR) & ~PDRMASK; + if (va_next < sva) + va_next = eva; + + pde = pmap_pdpe_to_pde(pdpe, sva); + if (*pde == NULL) + continue; + + /* + * Limit our scan to either the end of the va represented + * by the current page table page, or to the end of the + * range being write protected. + */ + if (va_next > eva) + va_next = eva; + + va = va_next; + for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++, + sva += PAGE_SIZE) { + if (!pte_test(pte, PTE_MANAGED | PTE_V)) { + if (va != va_next) { + pmap_invalidate_range(pmap, va, sva); + va = va_next; + } + continue; + } + pa = TLBLO_PTE_TO_PA(*pte); + m = PHYS_TO_VM_PAGE(pa); + m->md.pv_flags &= ~PV_TABLE_REF; + if (pte_test(pte, PTE_D)) { + if (advice == MADV_DONTNEED) { + /* + * Future calls to pmap_is_modified() + * can be avoided by making the page + * dirty now. + */ + vm_page_dirty(m); + } else { + pte_clear(pte, PTE_D); + if (va == va_next) + va = sva; + } + } else { + /* + * Unless PTE_D is set, any TLB entries + * mapping "sva" don't allow write access, so + * they needn't be invalidated. + */ + if (va != va_next) { + pmap_invalidate_range(pmap, va, sva); + va = va_next; + } + } + } + if (va != va_next) + pmap_invalidate_range(pmap, va, sva); + } + rw_wunlock(&pvh_global_lock); + PMAP_UNLOCK(pmap); } /* From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 16:30:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CB22BABA; Sat, 31 Aug 2013 16:30:21 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B81B329D7; Sat, 31 Aug 2013 16:30:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7VGULpU082445; Sat, 31 Aug 2013 16:30:21 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7VGULKJ082442; Sat, 31 Aug 2013 16:30:21 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201308311630.r7VGULKJ082442@svn.freebsd.org> From: Justin Hibbits Date: Sat, 31 Aug 2013 16:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255099 - in head/sys/cddl/dev: dtrace/powerpc fbt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 16:30:21 -0000 Author: jhibbits Date: Sat Aug 31 16:30:20 2013 New Revision: 255099 URL: http://svnweb.freebsd.org/changeset/base/255099 Log: Fixes for DTrace on PowerPC: - Implement dtrace_getarg() - Sync fbt with x86, and fix a typo. - Pull in the time synchronization code from amd64. Modified: head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c head/sys/cddl/dev/fbt/fbt_powerpc.c Modified: head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c ============================================================================== --- head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c Sat Aug 31 16:21:13 2013 (r255098) +++ head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c Sat Aug 31 16:30:20 2013 (r255099) @@ -349,50 +349,84 @@ zero: uint64_t dtrace_getarg(int arg, int aframes) { - return (0); -} - -#ifdef notyet -{ - int depth = 0; - register_t sp; - vm_offset_t callpc; - pc_t caller = (pc_t) solaris_cpu[curcpu].cpu_dtrace_caller; - - if (intrpc != 0) - pcstack[depth++] = (pc_t) intrpc; - - aframes++; - - sp = dtrace_getfp(); - - while (depth < pcstack_limit) { - if (!INKERNEL((long) frame)) - break; - - callpc = *(void **)(sp + RETURN_OFFSET); - - if (!INKERNEL(callpc)) - break; + uintptr_t val; + uintptr_t *fp = (uintptr_t *)dtrace_getfp(); + uintptr_t *stack; + int i; + + /* + * A total of 8 arguments are passed via registers; any argument with + * index of 7 or lower is therefore in a register. + */ + int inreg = 7; + + for (i = 1; i <= aframes; i++) { + fp = (uintptr_t *)*fp; + + /* + * On ppc32 AIM, and booke, trapexit() is the immediately following + * label. On ppc64 AIM trapexit() follows a nop. + */ + if (((long)(fp[1]) == (long)trapexit) || + (((long)(fp[1]) + 4 == (long)trapexit))) { + /* + * In the case of powerpc, we will use the pointer to the regs + * structure that was pushed when we took the trap. To get this + * structure, we must increment beyond the frame structure. If the + * argument that we're seeking is passed on the stack, we'll pull + * the true stack pointer out of the saved registers and decrement + * our argument by the number of arguments passed in registers; if + * the argument we're seeking is passed in regsiters, we can just + * load it directly. + */ +#ifdef __powerpc64__ + struct reg *rp = (struct reg *)((uintptr_t)fp[0] + 48); +#else + struct reg *rp = (struct reg *)((uintptr_t)fp[0] + 8); +#endif - if (aframes > 0) { - aframes--; - if ((aframes == 0) && (caller != 0)) { - pcstack[depth++] = caller; + if (arg <= inreg) { + stack = &rp->fixreg[3]; + } else { + stack = (uintptr_t *)(rp->fixreg[1]); + arg -= inreg; } - } - else { - pcstack[depth++] = callpc; + goto load; } - sp = *(void **)sp; } - for (; depth < pcstack_limit; depth++) { - pcstack[depth] = 0; + /* + * We know that we did not come through a trap to get into + * dtrace_probe() -- the provider simply called dtrace_probe() + * directly. As this is the case, we need to shift the argument + * that we're looking for: the probe ID is the first argument to + * dtrace_probe(), so the argument n will actually be found where + * one would expect to find argument (n + 1). + */ + arg++; + + if (arg <= inreg) { + /* + * This shouldn't happen. If the argument is passed in a + * register then it should have been, well, passed in a + * register... + */ + DTRACE_CPUFLAG_SET(CPU_DTRACE_ILLOP); + return (0); } + + arg -= (inreg + 1); + stack = fp + 2; + +load: + DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); + val = stack[arg]; + DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT); + + return (val); + return (0); } -#endif int dtrace_getstackdepth(int aframes) Modified: head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c Sat Aug 31 16:21:13 2013 (r255098) +++ head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c Sat Aug 31 16:30:20 2013 (r255099) @@ -51,6 +51,8 @@ extern int dtrace_in_probe; extern dtrace_id_t dtrace_probeid_error; extern int (*dtrace_invop_jump_addr)(struct trapframe *); +extern void dtrace_getnanotime(struct timespec *tsp); + int dtrace_invop(uintptr_t, uintptr_t *, uintptr_t); void dtrace_invop_init(void); void dtrace_invop_uninit(void); @@ -63,13 +65,13 @@ typedef struct dtrace_invop_hdlr { dtrace_invop_hdlr_t *dtrace_invop_hdlr; int -dtrace_invop(uintptr_t addr, uintptr_t *stack, uintptr_t eax) +dtrace_invop(uintptr_t addr, uintptr_t *stack, uintptr_t arg0) { dtrace_invop_hdlr_t *hdlr; int rval; for (hdlr = dtrace_invop_hdlr; hdlr != NULL; hdlr = hdlr->dtih_next) - if ((rval = hdlr->dtih_func(addr, stack, eax)) != 0) + if ((rval = hdlr->dtih_func(addr, stack, arg0)) != 0) return (rval); return (0); @@ -134,7 +136,7 @@ dtrace_xcall(processorid_t cpu, dtrace_x CPU_SETOF(cpu, &cpus); smp_rendezvous_cpus(cpus, smp_no_rendevous_barrier, func, - smp_no_rendevous_barrier, arg); + smp_no_rendevous_barrier, arg); } static void @@ -145,9 +147,82 @@ dtrace_sync_func(void) void dtrace_sync(void) { - dtrace_xcall(DTRACE_CPUALL, (dtrace_xcall_t)dtrace_sync_func, NULL); + dtrace_xcall(DTRACE_CPUALL, (dtrace_xcall_t)dtrace_sync_func, NULL); +} + +static int64_t tgt_cpu_tsc; +static int64_t hst_cpu_tsc; +static int64_t timebase_skew[MAXCPU]; +static uint64_t nsec_scale; + +/* See below for the explanation of this macro. */ +/* This is taken from the amd64 dtrace_subr, to provide a synchronized timer + * between multiple processors in dtrace. Since PowerPC Timebases can be much + * lower than x86, the scale shift is 26 instead of 28, allowing for a 15.63MHz + * timebase. + */ +#define SCALE_SHIFT 26 + +static void +dtrace_gethrtime_init_cpu(void *arg) +{ + uintptr_t cpu = (uintptr_t) arg; + + if (cpu == curcpu) + tgt_cpu_tsc = mftb(); + else + hst_cpu_tsc = mftb(); +} + +static void +dtrace_gethrtime_init(void *arg) +{ + struct pcpu *pc; + uint64_t tb_f; + cpuset_t map; + int i; + + tb_f = cpu_tickrate(); + + /* + * The following line checks that nsec_scale calculated below + * doesn't overflow 32-bit unsigned integer, so that it can multiply + * another 32-bit integer without overflowing 64-bit. + * Thus minimum supported Timebase frequency is 15.63MHz. + */ + KASSERT(tb_f > (NANOSEC >> (32 - SCALE_SHIFT)), ("Timebase frequency is too low")); + + /* + * We scale up NANOSEC/tb_f ratio to preserve as much precision + * as possible. + * 2^26 factor was chosen quite arbitrarily from practical + * considerations: + * - it supports TSC frequencies as low as 15.63MHz (see above); + */ + nsec_scale = ((uint64_t)NANOSEC << SCALE_SHIFT) / tb_f; + + /* The current CPU is the reference one. */ + sched_pin(); + timebase_skew[curcpu] = 0; + CPU_FOREACH(i) { + if (i == curcpu) + continue; + + pc = pcpu_find(i); + CPU_SETOF(PCPU_GET(cpuid), &map); + CPU_SET(pc->pc_cpuid, &map); + + smp_rendezvous_cpus(map, NULL, + dtrace_gethrtime_init_cpu, + smp_no_rendevous_barrier, (void *)(uintptr_t) i); + + timebase_skew[i] = tgt_cpu_tsc - hst_cpu_tsc; + } + sched_unpin(); } +SYSINIT(dtrace_gethrtime_init, SI_SUB_SMP, SI_ORDER_ANY, dtrace_gethrtime_init, NULL); + /* * DTrace needs a high resolution time function which can * be called from a probe context and guaranteed not to have @@ -158,12 +233,21 @@ dtrace_sync(void) uint64_t dtrace_gethrtime() { - struct timespec curtime; - - nanouptime(&curtime); - - return (curtime.tv_sec * 1000000000UL + curtime.tv_nsec); + uint64_t timebase; + uint32_t lo; + uint32_t hi; + /* + * We split timebase value into lower and higher 32-bit halves and separately + * scale them with nsec_scale, then we scale them down by 2^28 + * (see nsec_scale calculations) taking into account 32-bit shift of + * the higher half and finally add. + */ + timebase = mftb() - timebase_skew[curcpu]; + lo = timebase; + hi = timebase >> 32; + return (((lo * nsec_scale) >> SCALE_SHIFT) + + ((hi * nsec_scale) << (32 - SCALE_SHIFT))); } uint64_t @@ -171,12 +255,12 @@ dtrace_gethrestime(void) { struct timespec curtime; - getnanotime(&curtime); + dtrace_getnanotime(&curtime); return (curtime.tv_sec * 1000000000UL + curtime.tv_nsec); } -/* Function to handle DTrace traps during probes. See amd64/amd64/trap.c */ +/* Function to handle DTrace traps during probes. See powerpc/powerpc/trap.c */ int dtrace_trap(struct trapframe *frame, u_int type) { @@ -196,34 +280,34 @@ dtrace_trap(struct trapframe *frame, u_i * All the rest will be handled in the usual way. */ switch (type) { - /* Page fault. */ - case EXC_DSI: - case EXC_DSE: - /* Flag a bad address. */ - cpu_core[curcpu].cpuc_dtrace_flags |= CPU_DTRACE_BADADDR; - cpu_core[curcpu].cpuc_dtrace_illval = frame->cpu.aim.dar; - - /* - * Offset the instruction pointer to the instruction - * following the one causing the fault. - */ - frame->srr0 += sizeof(int); - return (1); - case EXC_ISI: - case EXC_ISE: - /* Flag a bad address. */ - cpu_core[curcpu].cpuc_dtrace_flags |= CPU_DTRACE_BADADDR; - cpu_core[curcpu].cpuc_dtrace_illval = frame->srr0; - - /* - * Offset the instruction pointer to the instruction - * following the one causing the fault. - */ - frame->srr0 += sizeof(int); - return (1); - default: - /* Handle all other traps in the usual way. */ - break; + /* Page fault. */ + case EXC_DSI: + case EXC_DSE: + /* Flag a bad address. */ + cpu_core[curcpu].cpuc_dtrace_flags |= CPU_DTRACE_BADADDR; + cpu_core[curcpu].cpuc_dtrace_illval = frame->cpu.aim.dar; + + /* + * Offset the instruction pointer to the instruction + * following the one causing the fault. + */ + frame->srr0 += sizeof(int); + return (1); + case EXC_ISI: + case EXC_ISE: + /* Flag a bad address. */ + cpu_core[curcpu].cpuc_dtrace_flags |= CPU_DTRACE_BADADDR; + cpu_core[curcpu].cpuc_dtrace_illval = frame->srr0; + + /* + * Offset the instruction pointer to the instruction + * following the one causing the fault. + */ + frame->srr0 += sizeof(int); + return (1); + default: + /* Handle all other traps in the usual way. */ + break; } } @@ -237,28 +321,29 @@ dtrace_probe_error(dtrace_state_t *state { dtrace_probe(dtrace_probeid_error, (uint64_t)(uintptr_t)state, - (uintptr_t)epid, - (uintptr_t)which, (uintptr_t)fault, (uintptr_t)fltoffs); + (uintptr_t)epid, + (uintptr_t)which, (uintptr_t)fault, (uintptr_t)fltoffs); } static int dtrace_invop_start(struct trapframe *frame) { switch (dtrace_invop(frame->srr0, (uintptr_t *)frame, frame->fixreg[3])) { - case DTRACE_INVOP_JUMP: - break; - case DTRACE_INVOP_BCTR: - frame->srr0 = frame->ctr; - break; - case DTRACE_INVOP_BLR: - frame->srr0 = frame->lr; - break; - case DTRACE_INVOP_MFLR_R0: - frame->fixreg[0] = frame->lr ; - break; - default: - return (-1); - break; + case DTRACE_INVOP_JUMP: + break; + case DTRACE_INVOP_BCTR: + frame->srr0 = frame->ctr; + break; + case DTRACE_INVOP_BLR: + frame->srr0 = frame->lr; + break; + case DTRACE_INVOP_MFLR_R0: + frame->fixreg[0] = frame->lr; + frame->srr0 = frame->srr0 + 4; + break; + default: + return (-1); + break; } return (0); Modified: head/sys/cddl/dev/fbt/fbt_powerpc.c ============================================================================== --- head/sys/cddl/dev/fbt/fbt_powerpc.c Sat Aug 31 16:21:13 2013 (r255098) +++ head/sys/cddl/dev/fbt/fbt_powerpc.c Sat Aug 31 16:30:20 2013 (r255099) @@ -57,6 +57,7 @@ #include #include #include +#include #include #include @@ -172,7 +173,11 @@ fbt_invop(uintptr_t addr, uintptr_t *sta tmp = fbt->fbtp_savedval & FBT_BR_MASK; /* Sign extend. */ if (tmp & 0x02000000) - tmp |= 0xFC000000; +#ifdef __powerpc64__ + tmp |= 0xfffffffffc000000ULL; +#else + tmp |= 0xfc000000UL; +#endif frame->srr0 += tmp; } cpu->cpu_dtrace_caller = 0; @@ -193,9 +198,12 @@ fbt_provide_module_function(linker_file_ const char *name = symval->name; fbt_probe_t *fbt, *retfbt; int j; - int size; u_int32_t *instr, *limit; + /* PowerPC64 uses '.' prefixes on symbol names, ignore it. */ + if (name[0] == '.') + name++; + if (strncmp(name, "dtrace_", 7) == 0 && strncmp(name, "dtrace_safe_", 12) != 0) { /* @@ -210,8 +218,6 @@ fbt_provide_module_function(linker_file_ if (name[0] == '_' && name[1] == '_') return (0); - size = symval->size; - instr = (u_int32_t *) symval->value; limit = (u_int32_t *) symval->value + symval->size; @@ -219,7 +225,7 @@ fbt_provide_module_function(linker_file_ if (*instr == FBT_MFLR_R0) break; - if (*instr != FBT_MFLR_R0); + if (*instr != FBT_MFLR_R0) return (0); fbt = malloc(sizeof (fbt_probe_t), M_FBT, M_WAITOK | M_ZERO); @@ -264,9 +270,6 @@ again: } } - if (*instr == FBT_MFLR_R0) - return (0); - if (*instr != FBT_MTLR_R0) { instr++; goto again; @@ -291,7 +294,7 @@ again: if (retfbt == NULL) { fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, - name, FBT_RETURN, 3, fbt); + name, FBT_RETURN, 5, fbt); } else { retfbt->fbtp_next = fbt; fbt->fbtp_id = retfbt->fbtp_id; @@ -317,7 +320,7 @@ again: lf->fbt_nentries++; - instr += size; + instr += 4; goto again; } @@ -434,6 +437,7 @@ fbt_enable(void *arg, dtrace_id_t id, vo for (; fbt != NULL; fbt = fbt->fbtp_next) { *fbt->fbtp_patchpoint = fbt->fbtp_patchval; + __syncicache(fbt->fbtp_patchpoint, 4); } } @@ -449,8 +453,10 @@ fbt_disable(void *arg, dtrace_id_t id, v if ((ctl->loadcnt != fbt->fbtp_loadcnt)) return; - for (; fbt != NULL; fbt = fbt->fbtp_next) + for (; fbt != NULL; fbt = fbt->fbtp_next) { *fbt->fbtp_patchpoint = fbt->fbtp_savedval; + __syncicache(fbt->fbtp_patchpoint, 4); + } } static void @@ -464,8 +470,10 @@ fbt_suspend(void *arg, dtrace_id_t id, v if ((ctl->loadcnt != fbt->fbtp_loadcnt)) return; - for (; fbt != NULL; fbt = fbt->fbtp_next) + for (; fbt != NULL; fbt = fbt->fbtp_next) { *fbt->fbtp_patchpoint = fbt->fbtp_savedval; + __syncicache(fbt->fbtp_patchpoint, 4); + } } static void @@ -479,15 +487,16 @@ fbt_resume(void *arg, dtrace_id_t id, vo if ((ctl->loadcnt != fbt->fbtp_loadcnt)) return; - for (; fbt != NULL; fbt = fbt->fbtp_next) + for (; fbt != NULL; fbt = fbt->fbtp_next) { *fbt->fbtp_patchpoint = fbt->fbtp_patchval; + __syncicache(fbt->fbtp_patchpoint, 4); + } } static int fbt_ctfoff_init(modctl_t *lf, linker_ctf_t *lc) { const Elf_Sym *symp = lc->symtab;; - const char *name; const ctf_header_t *hp = (const ctf_header_t *) lc->ctftab; const uint8_t *ctfdata = lc->ctftab + sizeof(ctf_header_t); int i; @@ -519,11 +528,6 @@ fbt_ctfoff_init(modctl_t *lf, linker_ctf continue; } - if (symp->st_name < lc->strcnt) - name = lc->strtab + symp->st_name; - else - name = "(?)"; - switch (ELF_ST_TYPE(symp->st_info)) { case STT_OBJECT: if (objtoff >= hp->cth_funcoff || @@ -690,6 +694,8 @@ fbt_typoff_init(linker_ctf_t *lc) pop[kind]++; } + /* account for a sentinel value below */ + ctf_typemax++; *lc->typlenp = ctf_typemax; if ((xp = malloc(sizeof(uint32_t) * ctf_typemax, M_LINKER, M_ZERO | M_WAITOK)) == NULL) @@ -1171,6 +1177,11 @@ fbt_getargdesc(void *arg __unused, dtrac uint32_t offset; ushort_t info, kind, n; + if (fbt->fbtp_roffset != 0 && desc->dtargd_ndx == 0) { + (void) strcpy(desc->dtargd_native, "int"); + return; + } + desc->dtargd_ndx = DTRACE_ARGNONE; /* Get a pointer to the CTF data and it's length. */ @@ -1221,12 +1232,19 @@ fbt_getargdesc(void *arg __unused, dtrac return; } - /* Check if the requested argument doesn't exist. */ - if (ndx >= n) - return; + if (fbt->fbtp_roffset != 0) { + /* Only return type is available for args[1] in return probe. */ + if (ndx > 1) + return; + ASSERT(ndx == 1); + } else { + /* Check if the requested argument doesn't exist. */ + if (ndx >= n) + return; - /* Skip the return type and arguments up to the one requested. */ - dp += ndx + 1; + /* Skip the return type and arguments up to the one requested. */ + dp += ndx + 1; + } if (fbt_type_name(&lc, *dp, desc->dtargd_native, sizeof(desc->dtargd_native)) > 0) desc->dtargd_ndx = ndx; @@ -1234,6 +1252,15 @@ fbt_getargdesc(void *arg __unused, dtrac return; } +static int +fbt_linker_file_cb(linker_file_t lf, void *arg) +{ + + fbt_provide_module(arg, lf); + + return (0); +} + static void fbt_load(void *dummy) { @@ -1257,6 +1284,9 @@ fbt_load(void *dummy) if (dtrace_register("fbt", &fbt_attr, DTRACE_PRIV_USER, NULL, &fbt_pops, NULL, &fbt_id) != 0) return; + + /* Create probes for the kernel and already-loaded modules. */ + linker_file_foreach(fbt_linker_file_cb, NULL); } From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 16:31:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 04120C04; Sat, 31 Aug 2013 16:31:49 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E64852A08; Sat, 31 Aug 2013 16:31:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7VGVm2V084910; Sat, 31 Aug 2013 16:31:48 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7VGVmXk084908; Sat, 31 Aug 2013 16:31:48 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201308311631.r7VGVmXk084908@svn.freebsd.org> From: Justin Hibbits Date: Sat, 31 Aug 2013 16:31:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255100 - head/sys/powerpc/powermac X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 16:31:49 -0000 Author: jhibbits Date: Sat Aug 31 16:31:48 2013 New Revision: 255100 URL: http://svnweb.freebsd.org/changeset/base/255100 Log: Only add the backlight device if it actually exists in OF. MFC after: 1 week Modified: head/sys/powerpc/powermac/atibl.c head/sys/powerpc/powermac/nvbl.c Modified: head/sys/powerpc/powermac/atibl.c ============================================================================== --- head/sys/powerpc/powermac/atibl.c Sat Aug 31 16:30:20 2013 (r255099) +++ head/sys/powerpc/powermac/atibl.c Sat Aug 31 16:31:48 2013 (r255100) @@ -86,6 +86,8 @@ DRIVER_MODULE(atibl, vgapci, atibl_drive static void atibl_identify(driver_t *driver, device_t parent) { + if (OF_finddevice("mac-io/backlight") == -1) + return; if (device_find_child(parent, "backlight", -1) == NULL) device_add_child(parent, "backlight", -1); } Modified: head/sys/powerpc/powermac/nvbl.c ============================================================================== --- head/sys/powerpc/powermac/nvbl.c Sat Aug 31 16:30:20 2013 (r255099) +++ head/sys/powerpc/powermac/nvbl.c Sat Aug 31 16:31:48 2013 (r255100) @@ -82,6 +82,8 @@ DRIVER_MODULE(nvbl, vgapci, nvbl_driver, static void nvbl_identify(driver_t *driver, device_t parent) { + if (OF_finddevice("mac-io/backlight") == -1) + return; if (device_find_child(parent, "backlight", -1) == NULL) device_add_child(parent, "backlight", -1); } From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 17:33:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5D36392A; Sat, 31 Aug 2013 17:33:26 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 49F862C6E; Sat, 31 Aug 2013 17:33:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7VHXQsU019664; Sat, 31 Aug 2013 17:33:26 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7VHXQRS019663; Sat, 31 Aug 2013 17:33:26 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201308311733.r7VHXQRS019663@svn.freebsd.org> From: Kirk McKusick Date: Sat, 31 Aug 2013 17:33:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255103 - stable/9/sys/ufs/ffs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 17:33:26 -0000 Author: mckusick Date: Sat Aug 31 17:33:25 2013 New Revision: 255103 URL: http://svnweb.freebsd.org/changeset/base/255103 Log: MFC of 253973: To better understand performance problems with journalled soft updates, we need to collect the highest level of allocation for each of the different soft update dependency structures. This change collects these statistics and makes them available using `sysctl debug.softdep.highuse'. Reviewed by: kib Tested by: Peter Holm MFC of 253974: With the addition of journalled soft updates, the "newblk" structures persist much longer than previously. Historically we had at most 100 entries; now the count may reach a million. With the increased count we spent far too much time looking them up in the grossly undersized newblk hash table. Configure the newblk hash table to accurately reflect the number of entries that it must index. Reviewed by: kib Tested by: Peter Holm MFC after: 2 weeks Modified: stable/9/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/9/sys/ufs/ffs/ffs_softdep.c Sat Aug 31 17:22:43 2013 (r255102) +++ stable/9/sys/ufs/ffs/ffs_softdep.c Sat Aug 31 17:33:25 2013 (r255103) @@ -660,14 +660,16 @@ FEATURE(softupdates, "FFS soft-updates s #define D_LAST D_SENTINEL unsigned long dep_current[D_LAST + 1]; +unsigned long dep_highuse[D_LAST + 1]; unsigned long dep_total[D_LAST + 1]; unsigned long dep_write[D_LAST + 1]; - static SYSCTL_NODE(_debug, OID_AUTO, softdep, CTLFLAG_RW, 0, "soft updates stats"); static SYSCTL_NODE(_debug_softdep, OID_AUTO, total, CTLFLAG_RW, 0, "total dependencies allocated"); +static SYSCTL_NODE(_debug_softdep, OID_AUTO, highuse, CTLFLAG_RW, 0, + "high use dependencies allocated"); static SYSCTL_NODE(_debug_softdep, OID_AUTO, current, CTLFLAG_RW, 0, "current dependencies allocated"); static SYSCTL_NODE(_debug_softdep, OID_AUTO, write, CTLFLAG_RW, 0, @@ -679,6 +681,8 @@ static SYSCTL_NODE(_debug_softdep, OID_A &dep_total[D_ ## type], 0, ""); \ SYSCTL_ULONG(_debug_softdep_current, OID_AUTO, str, CTLFLAG_RD, \ &dep_current[D_ ## type], 0, ""); \ + SYSCTL_ULONG(_debug_softdep_highuse, OID_AUTO, str, CTLFLAG_RD, \ + &dep_highuse[D_ ## type], 0, ""); \ SYSCTL_ULONG(_debug_softdep_write, OID_AUTO, str, CTLFLAG_RD, \ &dep_write[D_ ## type], 0, ""); @@ -1203,8 +1207,12 @@ jwork_insert(dst, jsegdep) */ static void workitem_free(struct worklist *, int); static void workitem_alloc(struct worklist *, int, struct mount *); +static void workitem_reassign(struct worklist *, int); -#define WORKITEM_FREE(item, type) workitem_free((struct worklist *)(item), (type)) +#define WORKITEM_FREE(item, type) \ + workitem_free((struct worklist *)(item), (type)) +#define WORKITEM_REASSIGN(item, type) \ + workitem_reassign((struct worklist *)(item), (type)) static void workitem_free(item, type) @@ -1218,16 +1226,22 @@ workitem_free(item, type) if (item->wk_state & ONWORKLIST) panic("workitem_free: %s(0x%X) still on list", TYPENAME(item->wk_type), item->wk_state); - if (item->wk_type != type) + if (item->wk_type != type && type != D_NEWBLK) panic("workitem_free: type mismatch %s != %s", TYPENAME(item->wk_type), TYPENAME(type)); #endif if (item->wk_state & IOWAITING) wakeup(item); ump = VFSTOUFS(item->wk_mp); + KASSERT(ump->softdep_deps > 0, + ("workitem_free: %s: softdep_deps going negative", + ump->um_fs->fs_fsmnt)); if (--ump->softdep_deps == 0 && ump->softdep_req) wakeup(&ump->softdep_deps); - dep_current[type]--; + KASSERT(dep_current[item->wk_type] > 0, + ("workitem_free: %s: dep_current[%s] going negative", + ump->um_fs->fs_fsmnt, TYPENAME(item->wk_type))); + dep_current[item->wk_type]--; free(item, DtoM(type)); } @@ -1246,12 +1260,31 @@ workitem_alloc(item, type, mp) ump = VFSTOUFS(mp); ACQUIRE_LOCK(&lk); dep_current[type]++; + if (dep_current[type] > dep_highuse[type]) + dep_highuse[type] = dep_current[type]; dep_total[type]++; ump->softdep_deps++; ump->softdep_accdeps++; FREE_LOCK(&lk); } +static void +workitem_reassign(item, newtype) + struct worklist *item; + int newtype; +{ + + KASSERT(dep_current[item->wk_type] > 0, + ("workitem_reassign: %s: dep_current[%s] going negative", + VFSTOUFS(item->wk_mp)->um_fs->fs_fsmnt, TYPENAME(item->wk_type))); + dep_current[item->wk_type]--; + dep_current[newtype]++; + if (dep_current[newtype] > dep_highuse[newtype]) + dep_highuse[newtype] = dep_current[newtype]; + dep_total[newtype]++; + item->wk_type = newtype; +} + /* * Workitem queue management */ @@ -2365,7 +2398,7 @@ softdep_initialize() max_softdeps = desiredvnodes * 4; pagedep_hashtbl = hashinit(desiredvnodes / 5, M_PAGEDEP, &pagedep_hash); inodedep_hashtbl = hashinit(desiredvnodes, M_INODEDEP, &inodedep_hash); - newblk_hashtbl = hashinit(desiredvnodes / 5, M_NEWBLK, &newblk_hash); + newblk_hashtbl = hashinit(max_softdeps / 2, M_NEWBLK, &newblk_hash); bmsafemap_hashtbl = hashinit(1024, M_BMSAFEMAP, &bmsafemap_hash); i = 1 << (ffs(desiredvnodes / 10) - 1); indir_hashtbl = malloc(i * sizeof(indir_hashtbl[0]), M_FREEWORK, @@ -5129,7 +5162,7 @@ softdep_setup_allocdirect(ip, off, newbl /* * Convert the newblk to an allocdirect. */ - newblk->nb_list.wk_type = D_ALLOCDIRECT; + WORKITEM_REASSIGN(newblk, D_ALLOCDIRECT); adp = (struct allocdirect *)newblk; newblk->nb_freefrag = freefrag; adp->ad_offset = off; @@ -5485,7 +5518,7 @@ softdep_setup_allocext(ip, off, newblkno /* * Convert the newblk to an allocdirect. */ - newblk->nb_list.wk_type = D_ALLOCDIRECT; + WORKITEM_REASSIGN(newblk, D_ALLOCDIRECT); adp = (struct allocdirect *)newblk; newblk->nb_freefrag = freefrag; adp->ad_offset = off; @@ -5594,7 +5627,7 @@ newallocindir(ip, ptrno, newblkno, oldbl panic("new_allocindir: lost block"); KASSERT(newblk->nb_list.wk_type == D_NEWBLK, ("newallocindir: newblk already initialized")); - newblk->nb_list.wk_type = D_ALLOCINDIR; + WORKITEM_REASSIGN(newblk, D_ALLOCINDIR); newblk->nb_freefrag = freefrag; aip = (struct allocindir *)newblk; aip->ai_offset = ptrno; @@ -7227,7 +7260,9 @@ free_newblk(newblk) struct worklist *wk; KASSERT(newblk->nb_jnewblk == NULL, - ("free_newblk; jnewblk %p still attached", newblk->nb_jnewblk)); + ("free_newblk: jnewblk %p still attached", newblk->nb_jnewblk)); + KASSERT(newblk->nb_list.wk_type != D_NEWBLK, + ("free_newblk: unclaimed newblk")); mtx_assert(&lk, MA_OWNED); newblk_freefrag(newblk); if (newblk->nb_state & ONDEPLIST) @@ -7242,7 +7277,6 @@ free_newblk(newblk) while ((indirdep = LIST_FIRST(&newblk->nb_indirdeps)) != NULL) indirdep_complete(indirdep); handle_jwork(&newblk->nb_jwork); - newblk->nb_list.wk_type = D_NEWBLK; WORKITEM_FREE(newblk, D_NEWBLK); } From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 17:38:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9BB9ABD1; Sat, 31 Aug 2013 17:38:49 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 88A462C9B; Sat, 31 Aug 2013 17:38:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7VHcnEG021633; Sat, 31 Aug 2013 17:38:49 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7VHcnRR021632; Sat, 31 Aug 2013 17:38:49 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201308311738.r7VHcnRR021632@svn.freebsd.org> From: Kirk McKusick Date: Sat, 31 Aug 2013 17:38:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r255104 - stable/9/sys/ufs/ufs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 17:38:49 -0000 Author: mckusick Date: Sat Aug 31 17:38:49 2013 New Revision: 255104 URL: http://svnweb.freebsd.org/changeset/base/255104 Log: MFC of 253998: This bug fix is in a code path in rename taken when there is a collision between a rename and an open system call for the same target file. Here, rename releases its vnode references, waits for the open to finish, and then restarts by reacquiring its needed vnode locks. In this case, rename was unlocking but failing to release its reference to one of its held vnodes. The effect was that even after all the actual references to the vnode had gone, the vnode still showed active references. For files that had been removed, their space was not reclaimed until the filesystem was forcibly unmounted. This bug manifested itself in the Postgres server which would leak/lose hundreds of files per day amounting to many gigabytes of disk space. This bug required shutting down Postgres, forcibly unmounting its filesystem, remounting its filesystem and restarting Postgres every few days to recover the lost space. Reported by: Dan Thomas and Palle Girgensohn Bug-fix by: kib Tested by: Dan Thomas and Palle Girgensohn Modified: stable/9/sys/ufs/ufs/ufs_vnops.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/9/sys/ufs/ufs/ufs_vnops.c Sat Aug 31 17:33:25 2013 (r255103) +++ stable/9/sys/ufs/ufs/ufs_vnops.c Sat Aug 31 17:38:49 2013 (r255104) @@ -1271,7 +1271,7 @@ relock: error = VFS_VGET(mp, ino, LK_EXCLUSIVE, &nvp); if (error != 0) goto releout; - VOP_UNLOCK(nvp, 0); + vput(nvp); atomic_add_int(&rename_restarts, 1); goto relock; } From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 18:13:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 42DD63DB; Sat, 31 Aug 2013 18:13:21 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 307E22E0A; Sat, 31 Aug 2013 18:13:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7VIDLFF043429; Sat, 31 Aug 2013 18:13:21 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7VIDLXx043428; Sat, 31 Aug 2013 18:13:21 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201308311813.r7VIDLXx043428@svn.freebsd.org> From: Andrew Turner Date: Sat, 31 Aug 2013 18:13:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255105 - head/lib/libelf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 18:13:21 -0000 Author: andrew Date: Sat Aug 31 18:13:20 2013 New Revision: 255105 URL: http://svnweb.freebsd.org/changeset/base/255105 Log: Add support to the ARM platform specific section types. Modified: head/lib/libelf/libelf_data.c Modified: head/lib/libelf/libelf_data.c ============================================================================== --- head/lib/libelf/libelf_data.c Sat Aug 31 17:38:49 2013 (r255104) +++ head/lib/libelf/libelf_data.c Sat Aug 31 18:13:20 2013 (r255105) @@ -84,13 +84,21 @@ _libelf_xlate_shtype(uint32_t sht) case SHT_SUNW_dof: return (ELF_T_BYTE); #endif + case SHT_ARM_PREEMPTMAP: + /* FALLTHROUGH */ + case SHT_ARM_ATTRIBUTES: + /* FALLTHROUGH */ + case SHT_ARM_DEBUGOVERLAY: + /* FALLTHROUGH */ + case SHT_ARM_OVERLAYSECTION: + /* FALLTHROUGH */ case SHT_MIPS_DWARF: /* FALLTHROUGH */ case SHT_MIPS_REGINFO: /* FALLTHROUGH */ case SHT_MIPS_OPTIONS: /* FALLTHROUGH */ - case SHT_AMD64_UNWIND: /* == SHT_IA_64_UNWIND */ + case SHT_AMD64_UNWIND: /* == SHT_IA_64_UNWIND == SHT_ARM_EXIDX */ return (ELF_T_BYTE); default: return (-1); From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 19:13:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5AD45E8F; Sat, 31 Aug 2013 19:13:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 47DB3201F; Sat, 31 Aug 2013 19:13:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7VJDMR0078675; Sat, 31 Aug 2013 19:13:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7VJDLwL078673; Sat, 31 Aug 2013 19:13:21 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201308311913.r7VJDLwL078673@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 31 Aug 2013 19:13:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255106 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 19:13:22 -0000 Author: kib Date: Sat Aug 31 19:13:21 2013 New Revision: 255106 URL: http://svnweb.freebsd.org/changeset/base/255106 Log: Fix two build failures for non-tb configurations, UP [2] and when using gas [1]. Reported by: andreast [1], bf [2] Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/amd64/apic_vector.S head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/apic_vector.S ============================================================================== --- head/sys/amd64/amd64/apic_vector.S Sat Aug 31 18:13:20 2013 (r255105) +++ head/sys/amd64/amd64/apic_vector.S Sat Aug 31 19:13:21 2013 (r255106) @@ -160,11 +160,11 @@ IDTVEC(xen_intr_upcall) SUPERALIGN_TEXT global_invltlb: - movl %cr4,%eax - andl $~0x80,%eax - movl %eax,%cr4 - orl $0x80,%eax - movl %eax,%cr4 + movq %cr4,%rax + andq $~0x80,%rax /* PGE */ + movq %rax,%cr4 + orq $0x80,%rax + movq %rax,%cr4 invltlb_ret_clear_pm_save: movq smp_tlb_pmap,%rdx testq %rdx,%rdx Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sat Aug 31 18:13:20 2013 (r255105) +++ head/sys/amd64/amd64/pmap.c Sat Aug 31 19:13:21 2013 (r255106) @@ -762,7 +762,6 @@ pmap_bootstrap(vm_paddr_t *firstaddr) /* Initialize the PAT MSR. */ pmap_init_pat(); -#ifdef SMP /* Initialize TLB Context Id. */ TUNABLE_INT_FETCH("vm.pmap.pcid_enabled", &pmap_pcid_enabled); if ((cpu_feature2 & CPUID2_PCID) != 0 && pmap_pcid_enabled) { @@ -773,8 +772,10 @@ pmap_bootstrap(vm_paddr_t *firstaddr) invpcid_works = (cpu_stdext_feature & CPUID_STDEXT_INVPCID) != 0; kernel_pmap->pm_pcid = 0; - } else +#ifndef SMP + pmap_pcid_enabled = 0; #endif + } else pmap_pcid_enabled = 0; } From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 20:33:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 858E39E6; Sat, 31 Aug 2013 20:33:38 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 62FC7235F; Sat, 31 Aug 2013 20:33:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7VKXcsQ025440; Sat, 31 Aug 2013 20:33:38 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7VKXbW7025436; Sat, 31 Aug 2013 20:33:37 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201308312033.r7VKXbW7025436@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sat, 31 Aug 2013 20:33:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255107 - in head/contrib: gcc gcc/doc gcclibs/libcpp gcclibs/libcpp/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 20:33:38 -0000 Author: pfg Date: Sat Aug 31 20:33:37 2013 New Revision: 255107 URL: http://svnweb.freebsd.org/changeset/base/255107 Log: Add support for the GCC binary integer constants extension. This is required to build the i965 backend with newer versions of mesa. Original patch from Joerg Wunsch in GCC Bug 23479, under the GPLv2; also taken from there in OpenBSD. Obtained from: gcc 4.3 (rev. 125346; GPLv2) MFC after: 5 days Modified: head/contrib/gcc/ChangeLog.gcc43 head/contrib/gcc/doc/extend.texi head/contrib/gcclibs/libcpp/expr.c head/contrib/gcclibs/libcpp/include/cpplib.h Modified: head/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/ChangeLog.gcc43 Sat Aug 31 19:13:21 2013 (r255106) +++ head/contrib/gcc/ChangeLog.gcc43 Sat Aug 31 20:33:37 2013 (r255107) @@ -1,3 +1,9 @@ +2007-06-05 Joerg Wunsch (r23479) + + PR preprocessor/23479 + * doc/extend.texi: Document the 0b-prefixed binary integer + constant extension. + 2007-05-01 Dwarakanath Rajagopal (r124341) * doc/invoke.texi: Fix typo, 'AMD Family 10h core' instead of Modified: head/contrib/gcc/doc/extend.texi ============================================================================== --- head/contrib/gcc/doc/extend.texi Sat Aug 31 19:13:21 2013 (r255106) +++ head/contrib/gcc/doc/extend.texi Sat Aug 31 20:33:37 2013 (r255107) @@ -81,6 +81,7 @@ extensions, accepted by GCC in C89 mode * Pragmas:: Pragmas accepted by GCC. * Unnamed Fields:: Unnamed struct/union fields within structs/unions. * Thread-Local:: Per-thread variables. +* Binary constants:: Binary constants using the @samp{0b} prefix. @end menu @node Statement Exprs @@ -10424,6 +10425,28 @@ Non-@code{static} members shall not be @ @end quotation @end itemize +@node Binary constants +@section Binary constants using the @samp{0b} prefix +@cindex Binary constants using the @samp{0b} prefix + +Integer constants can be written as binary constants, consisting of a +sequence of @samp{0} and @samp{1} digits, prefixed by @samp{0b} or +@samp{0B}. This is particularly useful in environments that operate a +lot on the bit-level (like microcontrollers). + +The following statements are identical: + +@smallexample +i = 42; +i = 0x2a; +i = 052; +i = 0b101010; +@end smallexample + +The type of these constants follows the same rules as for octal or +hexadecimal integer constants, so suffixes like @samp{L} or @samp{UL} +can be applied. + @node C++ Extensions @chapter Extensions to the C++ Language @cindex extensions, C++ language Modified: head/contrib/gcclibs/libcpp/expr.c ============================================================================== --- head/contrib/gcclibs/libcpp/expr.c Sat Aug 31 19:13:21 2013 (r255106) +++ head/contrib/gcclibs/libcpp/expr.c Sat Aug 31 20:33:37 2013 (r255107) @@ -188,6 +188,11 @@ cpp_classify_number (cpp_reader *pfile, radix = 16; str++; } + else if ((*str == 'b' || *str == 'B') && (str[1] == '0' || str[1] == '1')) + { + radix = 2; + str++; + } } /* Now scan for a well-formed integer or float. */ @@ -226,10 +231,22 @@ cpp_classify_number (cpp_reader *pfile, radix = 10; if (max_digit >= radix) - SYNTAX_ERROR2 ("invalid digit \"%c\" in octal constant", '0' + max_digit); + { + if (radix == 2) + SYNTAX_ERROR2 ("invalid digit \"%c\" in binary constant", '0' + max_digit); + else + SYNTAX_ERROR2 ("invalid digit \"%c\" in octal constant", '0' + max_digit); + } if (float_flag != NOT_FLOAT) { + if (radix == 2) + { + cpp_error (pfile, CPP_DL_ERROR, + "invalid prefix \"0b\" for floating constant"); + return CPP_N_INVALID; + } + if (radix == 16 && CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, c99)) cpp_error (pfile, CPP_DL_PEDWARN, "use of C99 hexadecimal floating constant"); @@ -321,11 +338,16 @@ cpp_classify_number (cpp_reader *pfile, if ((result & CPP_N_IMAGINARY) && CPP_PEDANTIC (pfile)) cpp_error (pfile, CPP_DL_PEDWARN, "imaginary constants are a GCC extension"); + if (radix == 2 && CPP_PEDANTIC (pfile)) + cpp_error (pfile, CPP_DL_PEDWARN, + "binary constants are a GCC extension"); if (radix == 10) result |= CPP_N_DECIMAL; else if (radix == 16) result |= CPP_N_HEX; + else if (radix == 2) + result |= CPP_N_BINARY; else result |= CPP_N_OCTAL; @@ -376,6 +398,11 @@ cpp_interpret_integer (cpp_reader *pfile base = 16; p += 2; } + else if ((type & CPP_N_RADIX) == CPP_N_BINARY) + { + base = 2; + p += 2; + } /* We can add a digit to numbers strictly less than this without needing the precision and slowness of double integers. */ @@ -431,12 +458,25 @@ static cpp_num append_digit (cpp_num num, int digit, int base, size_t precision) { cpp_num result; - unsigned int shift = 3 + (base == 16); + unsigned int shift; bool overflow; cpp_num_part add_high, add_low; - /* Multiply by 8 or 16. Catching this overflow here means we don't + /* Multiply by 2, 8 or 16. Catching this overflow here means we don't need to worry about add_high overflowing. */ + switch (base) + { + case 2: + shift = 1; + break; + + case 16: + shift = 4; + break; + + default: + shift = 3; + } overflow = !!(num.high >> (PART_PRECISION - shift)); result.high = num.high << shift; result.low = num.low << shift; Modified: head/contrib/gcclibs/libcpp/include/cpplib.h ============================================================================== --- head/contrib/gcclibs/libcpp/include/cpplib.h Sat Aug 31 19:13:21 2013 (r255106) +++ head/contrib/gcclibs/libcpp/include/cpplib.h Sat Aug 31 20:33:37 2013 (r255107) @@ -745,6 +745,7 @@ struct cpp_num #define CPP_N_DECIMAL 0x0100 #define CPP_N_HEX 0x0200 #define CPP_N_OCTAL 0x0400 +#define CPP_N_BINARY 0x0800 #define CPP_N_UNSIGNED 0x1000 /* Properties. */ #define CPP_N_IMAGINARY 0x2000 From owner-svn-src-all@FreeBSD.ORG Sat Aug 31 22:32:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6532F854; Sat, 31 Aug 2013 22:32:43 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 410C027CC; Sat, 31 Aug 2013 22:32:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7VMWhVb094256; Sat, 31 Aug 2013 22:32:43 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7VMWgvH094252; Sat, 31 Aug 2013 22:32:42 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308312232.r7VMWgvH094252@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 31 Aug 2013 22:32:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255108 - in head/lib/libc: gen include stdio string X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 22:32:43 -0000 Author: jilles Date: Sat Aug 31 22:32:42 2013 New Revision: 255108 URL: http://svnweb.freebsd.org/changeset/base/255108 Log: libc: Always use our own copy of sys_errlist and sys_nerr (.so only). This ensures strerror() and friends continue to work correctly even if a (non-PIE) executable linked against an older libc imports sys_errlist (which causes sys_errlist to refer to the executable's copy with a size fixed when that executable was linked). The executable's use of sys_errlist remains broken because it uses the current value of sys_nerr and may access past the bounds of the array. Different from the message "Using sys_errlist from executables is not ABI-stable" on freebsd-arch, this change does not affect the static library. There seems no reason to prevent overriding the error messages in the static library. Added: head/lib/libc/include/errlst.h (contents, props changed) Modified: head/lib/libc/gen/errlst.c head/lib/libc/stdio/xprintf_errno.c head/lib/libc/string/strerror.c Modified: head/lib/libc/gen/errlst.c ============================================================================== --- head/lib/libc/gen/errlst.c Sat Aug 31 20:33:37 2013 (r255107) +++ head/lib/libc/gen/errlst.c Sat Aug 31 22:32:42 2013 (r255108) @@ -34,6 +34,7 @@ static char sccsid[] = "@(#)errlst.c 8.2 __FBSDID("$FreeBSD$"); #include +#include "errlst.h" const char *const sys_errlist[] = { "No error: 0", /* 0 - ENOERROR */ @@ -156,3 +157,8 @@ const char *const sys_errlist[] = { "Previous owner died", /* 96 - EOWNERDEAD */ }; const int sys_nerr = sizeof(sys_errlist) / sizeof(sys_errlist[0]); + +#ifdef PIC +__strong_reference(sys_errlist, __hidden_sys_errlist); +__strong_reference(sys_nerr, __hidden_sys_nerr); +#endif Added: head/lib/libc/include/errlst.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/include/errlst.h Sat Aug 31 22:32:42 2013 (r255108) @@ -0,0 +1,43 @@ +/*- + * Copyright (c) 2013 Jilles Tjoelker + * 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 __ERRLST_H__ +#define __ERRLST_H__ + +#include + +#ifdef PIC +/* If the main executable imports these, do not use its copy from libc.so. */ +extern const char *const __hidden_sys_errlist[] __hidden; +extern const int __hidden_sys_nerr __hidden; +#else +#define __hidden_sys_errlist sys_errlist +#define __hidden_sys_nerr sys_nerr +#endif + +#endif /* __ERRLST_H__ */ Modified: head/lib/libc/stdio/xprintf_errno.c ============================================================================== --- head/lib/libc/stdio/xprintf_errno.c Sat Aug 31 20:33:37 2013 (r255107) +++ head/lib/libc/stdio/xprintf_errno.c Sat Aug 31 22:32:42 2013 (r255108) @@ -34,6 +34,7 @@ #include #include #include +#include "errlst.h" #include "printf.h" int @@ -54,7 +55,7 @@ __printf_render_errno(struct __printf_io ret = 0; error = *((const int *)arg[0]); - if (error >= 0 && error < sys_nerr) { + if (error >= 0 && error < __hidden_sys_nerr) { p = strerror(error); return (__printf_out(io, pi, p, strlen(p))); } Modified: head/lib/libc/string/strerror.c ============================================================================== --- head/lib/libc/string/strerror.c Sat Aug 31 20:33:37 2013 (r255107) +++ head/lib/libc/string/strerror.c Sat Aug 31 22:32:42 2013 (r255108) @@ -42,6 +42,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include "errlst.h" + #define UPREFIX "Unknown error" /* @@ -87,7 +89,7 @@ strerror_r(int errnum, char *strerrbuf, catd = catopen("libc", NL_CAT_LOCALE); #endif - if (errnum < 0 || errnum >= sys_nerr) { + if (errnum < 0 || errnum >= __hidden_sys_nerr) { errstr(errnum, #if defined(NLS) catgets(catd, 1, 0xffff, UPREFIX), @@ -99,9 +101,9 @@ strerror_r(int errnum, char *strerrbuf, } else { if (strlcpy(strerrbuf, #if defined(NLS) - catgets(catd, 1, errnum, sys_errlist[errnum]), + catgets(catd, 1, errnum, __hidden_sys_errlist[errnum]), #else - sys_errlist[errnum], + __hidden_sys_errlist[errnum], #endif buflen) >= buflen) retval = ERANGE;