From owner-svn-src-head@freebsd.org Sun Jul 30 00:00:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B70CDDCE1EC; Sun, 30 Jul 2017 00:00:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85387810B0; Sun, 30 Jul 2017 00:00:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6U00URt029784; Sun, 30 Jul 2017 00:00:30 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6U00UTZ029783; Sun, 30 Jul 2017 00:00:30 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707300000.v6U00UTZ029783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 30 Jul 2017 00:00:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321709 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 321709 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 00:00:31 -0000 Author: ian Date: Sun Jul 30 00:00:30 2017 New Revision: 321709 URL: https://svnweb.freebsd.org/changeset/base/321709 Log: Fix building this driver on non-FDT platforms. Modified: head/sys/dev/iicbus/ds1307.c Modified: head/sys/dev/iicbus/ds1307.c ============================================================================== --- head/sys/dev/iicbus/ds1307.c Sat Jul 29 23:45:57 2017 (r321708) +++ head/sys/dev/iicbus/ds1307.c Sun Jul 30 00:00:30 2017 (r321709) @@ -299,8 +299,10 @@ ds1307_attach(device_t dev) sc->enum_hook.ich_func = ds1307_start; sc->enum_hook.ich_arg = dev; +#ifdef FDT if (ofw_bus_is_compatible(dev, "microchip,mcp7941x")) sc->sc_mcp7941x = 1; +#endif /* * We have to wait until interrupts are enabled. Usually I2C read From owner-svn-src-head@freebsd.org Sun Jul 30 00:01:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 207A3DCE416; Sun, 30 Jul 2017 00:01:33 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFA0C812C7; Sun, 30 Jul 2017 00:01:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6U01VhM032852; Sun, 30 Jul 2017 00:01:31 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6U01VhW032851; Sun, 30 Jul 2017 00:01:31 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707300001.v6U01VhW032851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 30 Jul 2017 00:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321710 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 321710 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 00:01:33 -0000 Author: ian Date: Sun Jul 30 00:01:31 2017 New Revision: 321710 URL: https://svnweb.freebsd.org/changeset/base/321710 Log: Add a few missing i2c devices that build fine on all arches. Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun Jul 30 00:00:30 2017 (r321709) +++ head/sys/conf/NOTES Sun Jul 30 00:01:31 2017 (r321710) @@ -2523,14 +2523,24 @@ device iicoc # OpenCores I2C controller support # I2C peripheral devices # +# ds1307 Dallas Semiconductor DS1307 RTC and compatible # ds133x Dallas Semiconductor DS1337, DS1338 and DS1339 RTC # ds1374 Dallas Semiconductor DS1374 RTC # ds1672 Dallas Semiconductor DS1672 RTC +# ds3231 Dallas Semiconductor DS3231 RTC + temperature +# icee AT24Cxxx and compatible EEPROMs +# lm75 LM75 compatible temperature sensor +# nxprtc NXP RTCs: PCA2129 PCA8565 PCF2127 PCF2129 PCF8523 PCF8563 # s35390a Seiko Instruments S-35390A RTC # +device ds1307 device ds133x device ds1374 device ds1672 +device ds3231 +device icee +device lm75 +device nxprtc device s35390a # Parallel-Port Bus From owner-svn-src-head@freebsd.org Sun Jul 30 00:24:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A47CDCE980; Sun, 30 Jul 2017 00:24:17 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B13581C42; Sun, 30 Jul 2017 00:24:16 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6U0OGUY041711; Sun, 30 Jul 2017 00:24:16 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6U0OGO7041710; Sun, 30 Jul 2017 00:24:16 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707300024.v6U0OGO7041710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 30 Jul 2017 00:24:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321711 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 321711 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 00:24:17 -0000 Author: ian Date: Sun Jul 30 00:24:15 2017 New Revision: 321711 URL: https://svnweb.freebsd.org/changeset/base/321711 Log: Move the device descriptions onto the device lines, so they cut and paste nicely into other config files. Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun Jul 30 00:01:31 2017 (r321710) +++ head/sys/conf/NOTES Sun Jul 30 00:24:15 2017 (r321711) @@ -2523,25 +2523,15 @@ device iicoc # OpenCores I2C controller support # I2C peripheral devices # -# ds1307 Dallas Semiconductor DS1307 RTC and compatible -# ds133x Dallas Semiconductor DS1337, DS1338 and DS1339 RTC -# ds1374 Dallas Semiconductor DS1374 RTC -# ds1672 Dallas Semiconductor DS1672 RTC -# ds3231 Dallas Semiconductor DS3231 RTC + temperature -# icee AT24Cxxx and compatible EEPROMs -# lm75 LM75 compatible temperature sensor -# nxprtc NXP RTCs: PCA2129 PCA8565 PCF2127 PCF2129 PCF8523 PCF8563 -# s35390a Seiko Instruments S-35390A RTC -# -device ds1307 -device ds133x -device ds1374 -device ds1672 -device ds3231 -device icee -device lm75 -device nxprtc -device s35390a +device ds1307 # Dallas DS1307 RTC and compatible +device ds133x # Dallas DS1337, DS1338 and DS1339 RTC +device ds1374 # Dallas DS1374 RTC +device ds1672 # Dallas DS1672 RTC +device ds3231 # Dallas DS3231 RTC + temperature +device icee # AT24Cxxx and compatible EEPROMs +device lm75 # LM75 compatible temperature sensor +device nxprtc # NXP RTCs: PCA/PFC212x PCA/PCF85xx +device s35390a # Seiko Instruments S-35390A RTC # Parallel-Port Bus # From owner-svn-src-head@freebsd.org Sun Jul 30 00:25:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A71B5DCE9F0; Sun, 30 Jul 2017 00:25:30 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74CCC81D9A; Sun, 30 Jul 2017 00:25:30 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6U0PTKr041803; Sun, 30 Jul 2017 00:25:29 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6U0PTiO041802; Sun, 30 Jul 2017 00:25:29 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707300025.v6U0PTiO041802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 30 Jul 2017 00:25:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321712 - head/sys/arm/conf X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/conf X-SVN-Commit-Revision: 321712 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 00:25:30 -0000 Author: ian Date: Sun Jul 30 00:25:29 2017 New Revision: 321712 URL: https://svnweb.freebsd.org/changeset/base/321712 Log: Add the i2c RTC drivers found on various arm systems. Modified: head/sys/arm/conf/GENERIC Modified: head/sys/arm/conf/GENERIC ============================================================================== --- head/sys/arm/conf/GENERIC Sun Jul 30 00:24:15 2017 (r321711) +++ head/sys/arm/conf/GENERIC Sun Jul 30 00:25:29 2017 (r321712) @@ -128,15 +128,22 @@ device p2wi # Allwinner Push-Pull Two Wire device axp209 # AXP209 Power Management Unit device axp81x # AXP813/818 Power Management Unit device bcm2835_bsc -device icee +device icee # AT24Cxxx and compatible EEPROMs device sy8106a # SY8106A Buck Regulator device ti_i2c device am335x_pmic # AM335x Power Management IC (TPC65217) device am335x_rtc # RTC support (power management only) -#define am335x_dmtpps # Pulse Per Second capture driver device twl # TI TWLX0X0/TPS659x0 Power Management device twl_vreg # twl voltage regulation device twl_clks # twl external clocks + +# i2c RTCs +device ds1307 # Dallas DS1307 RTC and compatible +device ds133x # Dallas DS1337, DS1338 and DS1339 RTC +device ds1672 # Dallas DS1672 RTC +device ds3231 # Dallas DS3231 RTC + temperature +device nxprtc # NXP RTCs: PCA/PFC212x PCA/PCF85xx +device s35390a # Seiko Instruments S-35390A RTC # GPIO device gpio From owner-svn-src-head@freebsd.org Sun Jul 30 06:27:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E46CDB00E2; Sun, 30 Jul 2017 06:27:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E94F67321; Sun, 30 Jul 2017 06:27:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6U6RWW6087128; Sun, 30 Jul 2017 06:27:32 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6U6RWPD087127; Sun, 30 Jul 2017 06:27:32 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201707300627.v6U6RWPD087127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 30 Jul 2017 06:27:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321713 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 321713 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 06:27:33 -0000 Author: delphij Date: Sun Jul 30 06:27:32 2017 New Revision: 321713 URL: https://svnweb.freebsd.org/changeset/base/321713 Log: Bump copyright year. MFC after: 3 days Modified: head/sys/sys/copyright.h Modified: head/sys/sys/copyright.h ============================================================================== --- head/sys/sys/copyright.h Sun Jul 30 00:25:29 2017 (r321712) +++ head/sys/sys/copyright.h Sun Jul 30 06:27:32 2017 (r321713) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 1992-2016 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2017 The FreeBSD Project. 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-head@freebsd.org Sun Jul 30 06:54:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18B58DB08C3; Sun, 30 Jul 2017 06:54:00 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D965067CFE; Sun, 30 Jul 2017 06:53:59 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6U6rwGo099102; Sun, 30 Jul 2017 06:53:58 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6U6rwLN099096; Sun, 30 Jul 2017 06:53:58 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201707300653.v6U6rwLN099096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sun, 30 Jul 2017 06:53:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321714 - in head/sys/dev: mpr mps X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head/sys/dev: mpr mps X-SVN-Commit-Revision: 321714 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 06:54:00 -0000 Author: scottl Date: Sun Jul 30 06:53:58 2017 New Revision: 321714 URL: https://svnweb.freebsd.org/changeset/base/321714 Log: Split the interrupt setup code into two parts: allocation and configuration. Do the allocation before requesting the IOCFacts message. This triggers the LSI firmware to recognize the multiqueue should be enabled if available. Multiqueue isn't used by the driver yet, but this also fixes a problem with the cached IOCFacts not matching latter checks, leading to potential problems with error recovery. As a side-effect, fetch the driver tunables as early as possible. Reviewed by: slm Obtained from: Netflix Differential Revision: D9243 Modified: head/sys/dev/mpr/mpr.c head/sys/dev/mpr/mpr_pci.c head/sys/dev/mpr/mprvar.h head/sys/dev/mps/mps.c head/sys/dev/mps/mps_pci.c head/sys/dev/mps/mpsvar.h Modified: head/sys/dev/mpr/mpr.c ============================================================================== --- head/sys/dev/mpr/mpr.c Sun Jul 30 06:27:32 2017 (r321713) +++ head/sys/dev/mpr/mpr.c Sun Jul 30 06:53:58 2017 (r321714) @@ -1482,7 +1482,7 @@ mpr_init_queues(struct mpr_softc *sc) * Next are the global settings, if they exist. Highest are the per-unit * settings, if they exist. */ -static void +void mpr_get_tunables(struct mpr_softc *sc) { char tmpstr[80]; @@ -1657,8 +1657,6 @@ int mpr_attach(struct mpr_softc *sc) { int error; - - mpr_get_tunables(sc); MPR_FUNCTRACE(sc); Modified: head/sys/dev/mpr/mpr_pci.c ============================================================================== --- head/sys/dev/mpr/mpr_pci.c Sun Jul 30 06:27:32 2017 (r321713) +++ head/sys/dev/mpr/mpr_pci.c Sun Jul 30 06:53:58 2017 (r321714) @@ -69,6 +69,7 @@ static int mpr_pci_resume(device_t); static void mpr_pci_free(struct mpr_softc *); static int mpr_alloc_msix(struct mpr_softc *sc, int msgs); static int mpr_alloc_msi(struct mpr_softc *sc, int msgs); +static int mpr_pci_alloc_interrupts(struct mpr_softc *sc); static device_method_t mpr_methods[] = { DEVMETHOD(device_probe, mpr_pci_probe), @@ -191,6 +192,8 @@ mpr_pci_attach(device_t dev) m = mpr_find_ident(dev); sc->mpr_flags = m->flags; + mpr_get_tunables(sc); + /* Twiddle basic PCI config bits for a sanity check */ pci_enable_busmaster(dev); @@ -240,28 +243,51 @@ mpr_pci_attach(device_t dev) return (ENOMEM); } - if ((error = mpr_attach(sc)) != 0) + if (((error = mpr_pci_alloc_interrupts(sc)) != 0) || + ((error = mpr_attach(sc)) != 0)) mpr_pci_free(sc); return (error); } +/* + * Allocate, but don't assign interrupts early. Doing it before requesting + * the IOCFacts message informs the firmware that we want to do MSI-X + * multiqueue. We might not use all of the available messages, but there's + * no reason to re-alloc if we don't. + */ int -mpr_pci_setup_interrupts(struct mpr_softc *sc) +mpr_pci_alloc_interrupts(struct mpr_softc *sc) { device_t dev; - int i, error, msgs; + int error, msgs; dev = sc->mpr_dev; - error = ENXIO; + error = 0; + if ((sc->disable_msix == 0) && ((msgs = pci_msix_count(dev)) >= MPR_MSI_COUNT)) error = mpr_alloc_msix(sc, MPR_MSI_COUNT); if ((error != 0) && (sc->disable_msi == 0) && ((msgs = pci_msi_count(dev)) >= MPR_MSI_COUNT)) error = mpr_alloc_msi(sc, MPR_MSI_COUNT); + else + msgs = 0; - if (error != 0) { + sc->msi_msgs = msgs; + return (error); +} + +int +mpr_pci_setup_interrupts(struct mpr_softc *sc) +{ + device_t dev; + int i, error; + + dev = sc->mpr_dev; + error = ENXIO; + + if (sc->msi_msgs == 0) { sc->mpr_flags |= MPR_FLAGS_INTX; sc->mpr_irq_rid[0] = 0; sc->mpr_irq[0] = bus_alloc_resource_any(dev, SYS_RES_IRQ, Modified: head/sys/dev/mpr/mprvar.h ============================================================================== --- head/sys/dev/mpr/mprvar.h Sun Jul 30 06:27:32 2017 (r321713) +++ head/sys/dev/mpr/mprvar.h Sun Jul 30 06:53:58 2017 (r321714) @@ -278,6 +278,7 @@ struct mpr_softc { u_int mpr_debug; u_int disable_msix; u_int disable_msi; + int msi_msgs; u_int atomic_desc_capable; int tm_cmds_active; int io_cmds_active; @@ -702,6 +703,7 @@ mpr_unmask_intr(struct mpr_softc *sc) int mpr_pci_setup_interrupts(struct mpr_softc *sc); int mpr_pci_restore(struct mpr_softc *sc); +void mpr_get_tunables(struct mpr_softc *sc); int mpr_attach(struct mpr_softc *sc); int mpr_free(struct mpr_softc *sc); void mpr_intr(void *); Modified: head/sys/dev/mps/mps.c ============================================================================== --- head/sys/dev/mps/mps.c Sun Jul 30 06:27:32 2017 (r321713) +++ head/sys/dev/mps/mps.c Sun Jul 30 06:53:58 2017 (r321714) @@ -1341,7 +1341,7 @@ mps_init_queues(struct mps_softc *sc) * Next are the global settings, if they exist. Highest are the per-unit * settings, if they exist. */ -static void +void mps_get_tunables(struct mps_softc *sc) { char tmpstr[80]; @@ -1512,8 +1512,6 @@ int mps_attach(struct mps_softc *sc) { int error; - - mps_get_tunables(sc); MPS_FUNCTRACE(sc); Modified: head/sys/dev/mps/mps_pci.c ============================================================================== --- head/sys/dev/mps/mps_pci.c Sun Jul 30 06:27:32 2017 (r321713) +++ head/sys/dev/mps/mps_pci.c Sun Jul 30 06:53:58 2017 (r321714) @@ -68,6 +68,7 @@ static int mps_pci_resume(device_t); static void mps_pci_free(struct mps_softc *); static int mps_alloc_msix(struct mps_softc *sc, int msgs); static int mps_alloc_msi(struct mps_softc *sc, int msgs); +static int mps_pci_alloc_interrupts(struct mps_softc *sc); static device_method_t mps_methods[] = { DEVMETHOD(device_probe, mps_pci_probe), @@ -191,6 +192,8 @@ mps_pci_attach(device_t dev) m = mps_find_ident(dev); sc->mps_flags = m->flags; + mps_get_tunables(sc); + /* Twiddle basic PCI config bits for a sanity check */ pci_enable_busmaster(dev); @@ -221,28 +224,51 @@ mps_pci_attach(device_t dev) return (ENOMEM); } - if ((error = mps_attach(sc)) != 0) + if (((error = mps_pci_alloc_interrupts(sc)) != 0) || + ((error = mps_attach(sc)) != 0)) mps_pci_free(sc); return (error); } -int -mps_pci_setup_interrupts(struct mps_softc *sc) +/* + * Allocate, but don't assign interrupts early. Doing it before requesting + * the IOCFacts message informs the firmware that we want to do MSI-X + * multiqueue. We might not use all of the available messages, but there's + * no reason to re-alloc if we don't. + */ +static int +mps_pci_alloc_interrupts(struct mps_softc *sc) { device_t dev; - int i, error, msgs; + int error, msgs; dev = sc->mps_dev; - error = ENXIO; + error = 0; + if ((sc->disable_msix == 0) && ((msgs = pci_msix_count(dev)) >= MPS_MSI_COUNT)) error = mps_alloc_msix(sc, MPS_MSI_COUNT); if ((error != 0) && (sc->disable_msi == 0) && ((msgs = pci_msi_count(dev)) >= MPS_MSI_COUNT)) error = mps_alloc_msi(sc, MPS_MSI_COUNT); + else + msgs = 0; - if (error != 0) { + sc->msi_msgs = msgs; + return (error); +} + +int +mps_pci_setup_interrupts(struct mps_softc *sc) +{ + device_t dev; + int i, error; + + dev = sc->mps_dev; + error = ENXIO; + + if (sc->msi_msgs == 0) { sc->mps_flags |= MPS_FLAGS_INTX; sc->mps_irq_rid[0] = 0; sc->mps_irq[0] = bus_alloc_resource_any(dev, SYS_RES_IRQ, Modified: head/sys/dev/mps/mpsvar.h ============================================================================== --- head/sys/dev/mps/mpsvar.h Sun Jul 30 06:27:32 2017 (r321713) +++ head/sys/dev/mps/mpsvar.h Sun Jul 30 06:53:58 2017 (r321714) @@ -274,6 +274,7 @@ struct mps_softc { u_int mps_debug; u_int disable_msix; u_int disable_msi; + u_int msi_msgs; int tm_cmds_active; int io_cmds_active; int io_cmds_highwater; @@ -671,6 +672,7 @@ mps_unmask_intr(struct mps_softc *sc) int mps_pci_setup_interrupts(struct mps_softc *sc); int mps_pci_restore(struct mps_softc *sc); +void mps_get_tunables(struct mps_softc *sc); int mps_attach(struct mps_softc *sc); int mps_free(struct mps_softc *sc); void mps_intr(void *); From owner-svn-src-head@freebsd.org Sun Jul 30 11:50:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 209ABDB56DB; Sun, 30 Jul 2017 11:50:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E366E6E45E; Sun, 30 Jul 2017 11:50:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6UBoH7v015949; Sun, 30 Jul 2017 11:50:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6UBoHBN015948; Sun, 30 Jul 2017 11:50:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707301150.v6UBoHBN015948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 30 Jul 2017 11:50:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321719 - head/contrib/llvm/tools/clang/lib/Lex X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/llvm/tools/clang/lib/Lex X-SVN-Commit-Revision: 321719 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 11:50:18 -0000 Author: dim Date: Sun Jul 30 11:50:16 2017 New Revision: 321719 URL: https://svnweb.freebsd.org/changeset/base/321719 Log: Pull in r309503 from upstream clang trunk (by Richard Smith): PR33902: Invalidate line number cache when adding more text to existing buffer. This led to crashes as the line number cache would report a bogus line number for a line of code, and we'd try to find a nonexistent column within the line when printing diagnostics. This fixes an assertion when building the graphics/champlain port. Reported by: antoine, kwm PR: 219139 Modified: head/contrib/llvm/tools/clang/lib/Lex/ScratchBuffer.cpp Modified: head/contrib/llvm/tools/clang/lib/Lex/ScratchBuffer.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Lex/ScratchBuffer.cpp Sun Jul 30 10:49:13 2017 (r321718) +++ head/contrib/llvm/tools/clang/lib/Lex/ScratchBuffer.cpp Sun Jul 30 11:50:16 2017 (r321719) @@ -35,6 +35,14 @@ SourceLocation ScratchBuffer::getToken(const char *Buf const char *&DestPtr) { if (BytesUsed+Len+2 > ScratchBufSize) AllocScratchBuffer(Len+2); + else { + // Clear out the source line cache if it's already been computed. + // FIXME: Allow this to be incrementally extended. + auto *ContentCache = const_cast( + SourceMgr.getSLocEntry(SourceMgr.getFileID(BufferStartLoc)) + .getFile().getContentCache()); + ContentCache->SourceLineCache = nullptr; + } // Prefix the token with a \n, so that it looks like it is the first thing on // its own virtual line in caret diagnostics. From owner-svn-src-head@freebsd.org Sun Jul 30 15:19:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F911DBD6C8; Sun, 30 Jul 2017 15:19:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BAF074928; Sun, 30 Jul 2017 15:19:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6UFJ7Ed004184; Sun, 30 Jul 2017 15:19:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6UFJ7AT004183; Sun, 30 Jul 2017 15:19:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201707301519.v6UFJ7AT004183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 30 Jul 2017 15:19:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321720 - head/sys/dev/ichwd X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/ichwd X-SVN-Commit-Revision: 321720 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 15:19:08 -0000 Author: mav Date: Sun Jul 30 15:19:07 2017 New Revision: 321720 URL: https://svnweb.freebsd.org/changeset/base/321720 Log: Attach ichwd(4) only to ISA bus of the LPC bridge. Resource allocation for parent device does not look good by itself, but attempt to allocate them for unrelated device just does not end up good. On Asus X99-E WS/USB3.1 system reporting ISA bridge via both PCI and ACPI this reported to cause kernel panic on shutdown due to messed resources: https://bugs.freenas.org/issues/25237. MFC after: 1 week Modified: head/sys/dev/ichwd/ichwd.c Modified: head/sys/dev/ichwd/ichwd.c ============================================================================== --- head/sys/dev/ichwd/ichwd.c Sun Jul 30 11:50:16 2017 (r321719) +++ head/sys/dev/ichwd/ichwd.c Sun Jul 30 15:19:07 2017 (r321720) @@ -533,23 +533,26 @@ ichwd_event(void *arg, unsigned int cmd, int *error) } static device_t -ichwd_find_ich_lpc_bridge(struct ichwd_device **id_p) +ichwd_find_ich_lpc_bridge(device_t isa, struct ichwd_device **id_p) { struct ichwd_device *id; - device_t ich = NULL; + device_t isab; + uint16_t devid; - /* look for an ICH LPC interface bridge */ - for (id = ichwd_devices; id->desc != NULL; ++id) - if ((ich = pci_find_device(VENDORID_INTEL, id->device)) != NULL) - break; - - if (ich == NULL) + /* Check whether parent ISA bridge looks familiar. */ + isab = device_get_parent(isa); + if (pci_get_vendor(isab) != VENDORID_INTEL) return (NULL); + devid = pci_get_device(isab); + for (id = ichwd_devices; id->desc != NULL; ++id) { + if (devid == id->device) { + if (id_p != NULL) + *id_p = id; + return (isab); + } + } - if (id_p) - *id_p = id; - - return (ich); + return (NULL); } /* @@ -565,7 +568,7 @@ ichwd_identify(driver_t *driver, device_t parent) uint32_t base_address; int rc; - ich = ichwd_find_ich_lpc_bridge(&id_p); + ich = ichwd_find_ich_lpc_bridge(parent, &id_p); if (ich == NULL) return; @@ -618,7 +621,7 @@ ichwd_probe(device_t dev) if (isa_get_logicalid(dev) != 0) return (ENXIO); - if (ichwd_find_ich_lpc_bridge(&id_p) == NULL) + if (ichwd_find_ich_lpc_bridge(device_get_parent(dev), &id_p) == NULL) return (ENXIO); device_set_desc_copy(dev, id_p->desc); @@ -636,7 +639,7 @@ ichwd_attach(device_t dev) sc = device_get_softc(dev); sc->device = dev; - ich = ichwd_find_ich_lpc_bridge(&id_p); + ich = ichwd_find_ich_lpc_bridge(device_get_parent(dev), &id_p); if (ich == NULL) { device_printf(sc->device, "Can not find ICH device.\n"); goto fail; @@ -726,7 +729,6 @@ static int ichwd_detach(device_t dev) { struct ichwd_softc *sc; - device_t ich = NULL; sc = device_get_softc(dev); @@ -751,9 +753,8 @@ ichwd_detach(device_t dev) bus_release_resource(dev, SYS_RES_IOPORT, sc->smi_rid, sc->smi_res); /* deallocate memory resource */ - ich = ichwd_find_ich_lpc_bridge(NULL); - if (sc->gcs_res && ich) - bus_release_resource(ich, SYS_RES_MEMORY, sc->gcs_rid, + if (sc->gcs_res) + bus_release_resource(sc->ich, SYS_RES_MEMORY, sc->gcs_rid, sc->gcs_res); return (0); From owner-svn-src-head@freebsd.org Sun Jul 30 16:17:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AAE5DBE521; Sun, 30 Jul 2017 16:17:07 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46FF27602E; Sun, 30 Jul 2017 16:17:07 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6UGH6uj028695; Sun, 30 Jul 2017 16:17:06 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6UGH6ZE028694; Sun, 30 Jul 2017 16:17:06 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707301617.v6UGH6ZE028694@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 30 Jul 2017 16:17:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321721 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 321721 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 16:17:07 -0000 Author: ian Date: Sun Jul 30 16:17:06 2017 New Revision: 321721 URL: https://svnweb.freebsd.org/changeset/base/321721 Log: Switch from using iic_transfer() to iicdev_readfrom/writeto(), mostly so that transfers will be done with proper ownership of the bus. No behavioral changes. Modified: head/sys/dev/iicbus/ds1307.c Modified: head/sys/dev/iicbus/ds1307.c ============================================================================== --- head/sys/dev/iicbus/ds1307.c Sun Jul 30 15:19:07 2017 (r321720) +++ head/sys/dev/iicbus/ds1307.c Sun Jul 30 16:17:06 2017 (r321721) @@ -75,24 +75,17 @@ static const struct ofw_compat_data ds1307_compat_data #endif static int -ds1307_read(device_t dev, uint16_t addr, uint8_t reg, uint8_t *data, size_t len) +ds1307_read1(device_t dev, uint8_t reg, uint8_t *data) { - struct iic_msg msg[2] = { - { addr, IIC_M_WR | IIC_M_NOSTOP, 1, ® }, - { addr, IIC_M_RD, len, data }, - }; - return (iicbus_transfer(dev, msg, nitems(msg))); + return(iicdev_readfrom(dev, reg, data, 1, IIC_INTRWAIT)); } static int -ds1307_write(device_t dev, uint16_t addr, uint8_t *data, size_t len) +ds1307_write1(device_t dev, uint8_t reg, uint8_t data) { - struct iic_msg msg[1] = { - { addr, IIC_M_WR, len, data }, - }; - return (iicbus_transfer(dev, msg, nitems(msg))); + return(iicdev_writeto(dev, reg, &data, 1, IIC_INTRWAIT)); } static int @@ -101,8 +94,7 @@ ds1307_ctrl_read(struct ds1307_softc *sc) int error; sc->sc_ctrl = 0; - error = ds1307_read(sc->sc_dev, sc->sc_addr, DS1307_CONTROL, - &sc->sc_ctrl, sizeof(sc->sc_ctrl)); + error = ds1307_read1(sc->sc_dev, DS1307_CONTROL, &sc->sc_ctrl); if (error) { device_printf(sc->sc_dev, "cannot read from RTC.\n"); return (error); @@ -115,11 +107,10 @@ static int ds1307_ctrl_write(struct ds1307_softc *sc) { int error; - uint8_t data[2]; + uint8_t ctrl; - data[0] = DS1307_CONTROL; - data[1] = sc->sc_ctrl & DS1307_CTRL_MASK; - error = ds1307_write(sc->sc_dev, sc->sc_addr, data, sizeof(data)); + ctrl = sc->sc_ctrl & DS1307_CTRL_MASK; + error = ds1307_write1(sc->sc_dev, DS1307_CONTROL, ctrl); if (error != 0) device_printf(sc->sc_dev, "cannot write to RTC.\n"); @@ -130,11 +121,9 @@ static int ds1307_osc_enable(struct ds1307_softc *sc) { int error; - uint8_t data[2], secs; + uint8_t secs; - secs = 0; - error = ds1307_read(sc->sc_dev, sc->sc_addr, DS1307_SECS, - &secs, sizeof(secs)); + error = ds1307_read1(sc->sc_dev, DS1307_SECS, &secs); if (error) { device_printf(sc->sc_dev, "cannot read from RTC.\n"); return (error); @@ -143,9 +132,8 @@ ds1307_osc_enable(struct ds1307_softc *sc) if ((secs & DS1307_SECS_CH) == 0) return (0); device_printf(sc->sc_dev, "clock was halted, check the battery.\n"); - data[0] = DS1307_SECS; - data[1] = secs & DS1307_SECS_MASK; - error = ds1307_write(sc->sc_dev, sc->sc_addr, data, sizeof(data)); + secs &= DS1307_SECS_MASK; + error = ds1307_write1(sc->sc_dev, DS1307_SECS, secs); if (error != 0) device_printf(sc->sc_dev, "cannot write to RTC.\n"); @@ -156,18 +144,15 @@ static int ds1307_set_24hrs_mode(struct ds1307_softc *sc) { int error; - uint8_t data[2], hour; + uint8_t hour; - hour = 0; - error = ds1307_read(sc->sc_dev, sc->sc_addr, DS1307_HOUR, - &hour, sizeof(hour)); + error = ds1307_read1(sc->sc_dev, DS1307_HOUR, &hour); if (error) { device_printf(sc->sc_dev, "cannot read from RTC.\n"); return (error); } - data[0] = DS1307_HOUR; - data[1] = hour & DS1307_HOUR_MASK; - error = ds1307_write(sc->sc_dev, sc->sc_addr, data, sizeof(data)); + hour &= DS1307_HOUR_MASK; + error = ds1307_write1(sc->sc_dev, DS1307_HOUR, hour); if (error != 0) device_printf(sc->sc_dev, "cannot write to RTC.\n"); @@ -362,9 +347,8 @@ ds1307_gettime(device_t dev, struct timespec *ts) uint8_t data[7]; sc = device_get_softc(dev); - memset(data, 0, sizeof(data)); - error = ds1307_read(sc->sc_dev, sc->sc_addr, DS1307_SECS, - data, sizeof(data)); + error = iicdev_readfrom(sc->sc_dev, DS1307_SECS, data, sizeof(data), + IIC_INTRWAIT); if (error != 0) { device_printf(dev, "cannot read from RTC.\n"); return (error); @@ -377,9 +361,6 @@ ds1307_gettime(device_t dev, struct timespec *ts) ct.dow = data[DS1307_WEEKDAY] & DS1307_WEEKDAY_MASK; ct.mon = FROMBCD(data[DS1307_MONTH] & DS1307_MONTH_MASK); ct.year = FROMBCD(data[DS1307_YEAR] & DS1307_YEAR_MASK); - ct.year += sc->sc_year0; - if (ct.year < POSIX_BASE_YEAR) - ct.year += 100; /* assume [1970, 2069] */ return (clock_ct_to_ts(&ct, ts)); } @@ -390,25 +371,21 @@ ds1307_settime(device_t dev, struct timespec *ts) int error; struct clocktime ct; struct ds1307_softc *sc; - uint8_t data[8]; + uint8_t data[7]; sc = device_get_softc(dev); - /* Accuracy is only one second. */ - if (ts->tv_nsec >= 500000000) - ts->tv_sec++; ts->tv_nsec = 0; clock_ts_to_ct(ts, &ct); - memset(data, 0, sizeof(data)); - data[0] = DS1307_SECS; - data[DS1307_SECS + 1] = TOBCD(ct.sec); - data[DS1307_MINS + 1] = TOBCD(ct.min); - data[DS1307_HOUR + 1] = TOBCD(ct.hour); - data[DS1307_DATE + 1] = TOBCD(ct.day); - data[DS1307_WEEKDAY + 1] = ct.dow; - data[DS1307_MONTH + 1] = TOBCD(ct.mon); - data[DS1307_YEAR + 1] = TOBCD(ct.year % 100); + data[DS1307_SECS] = TOBCD(ct.sec); + data[DS1307_MINS] = TOBCD(ct.min); + data[DS1307_HOUR] = TOBCD(ct.hour); + data[DS1307_DATE] = TOBCD(ct.day); + data[DS1307_WEEKDAY] = ct.dow; + data[DS1307_MONTH] = TOBCD(ct.mon); + data[DS1307_YEAR] = TOBCD(ct.year % 100); /* Write the time back to RTC. */ - error = ds1307_write(dev, sc->sc_addr, data, sizeof(data)); + error = iicdev_writeto(sc->sc_dev, DS1307_SECS, data, sizeof(data), + IIC_INTRWAIT); if (error != 0) device_printf(dev, "cannot write to RTC.\n"); From owner-svn-src-head@freebsd.org Sun Jul 30 16:45:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C32A5DBE990; Sun, 30 Jul 2017 16:45:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 990DE76A7D; Sun, 30 Jul 2017 16:45:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6UGjSM9040895; Sun, 30 Jul 2017 16:45:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6UGjSi6040894; Sun, 30 Jul 2017 16:45:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201707301645.v6UGjSi6040894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 30 Jul 2017 16:45:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321722 - head/sys/dev/usb/wlan X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/usb/wlan X-SVN-Commit-Revision: 321722 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 16:45:29 -0000 Author: hselasky Date: Sun Jul 30 16:45:28 2017 New Revision: 321722 URL: https://svnweb.freebsd.org/changeset/base/321722 Log: Properly range check length of parsed information elements in RSU driver. Found by: Ilja van Sprundel MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Sun Jul 30 16:17:06 2017 (r321721) +++ head/sys/dev/usb/wlan/if_rsu.c Sun Jul 30 16:45:28 2017 (r321722) @@ -2031,6 +2031,8 @@ rsu_hwrssi_to_rssi(struct rsu_softc *sc, int hw_rssi) return (v); } +CTASSERT(MCLBYTES > sizeof(struct ieee80211_frame)); + static void rsu_event_survey(struct rsu_softc *sc, uint8_t *buf, int len) { @@ -2039,28 +2041,31 @@ rsu_event_survey(struct rsu_softc *sc, uint8_t *buf, i struct ndis_wlan_bssid_ex *bss; struct ieee80211_rx_stats rxs; struct mbuf *m; - int pktlen; + uint32_t ieslen; + uint32_t pktlen; if (__predict_false(len < sizeof(*bss))) return; bss = (struct ndis_wlan_bssid_ex *)buf; - if (__predict_false(len < sizeof(*bss) + le32toh(bss->ieslen))) + ieslen = le32toh(bss->ieslen); + /* range check length of information element */ + if (__predict_false(ieslen > (uint32_t)(len - sizeof(*bss)))) return; RSU_DPRINTF(sc, RSU_DEBUG_SCAN, "%s: found BSS %s: len=%d chan=%d inframode=%d " "networktype=%d privacy=%d, RSSI=%d\n", __func__, - ether_sprintf(bss->macaddr), le32toh(bss->len), + ether_sprintf(bss->macaddr), ieslen, le32toh(bss->config.dsconfig), le32toh(bss->inframode), le32toh(bss->networktype), le32toh(bss->privacy), le32toh(bss->rssi)); /* Build a fake beacon frame to let net80211 do all the parsing. */ /* XXX TODO: just call the new scan API methods! */ - pktlen = sizeof(*wh) + le32toh(bss->ieslen); - if (__predict_false(pktlen > MCLBYTES)) + if (__predict_false(ieslen > (size_t)(MCLBYTES - sizeof(*wh)))) return; + pktlen = sizeof(*wh) + ieslen; m = m_get2(pktlen, M_NOWAIT, MT_DATA, M_PKTHDR); if (__predict_false(m == NULL)) return; @@ -2073,7 +2078,7 @@ rsu_event_survey(struct rsu_softc *sc, uint8_t *buf, i IEEE80211_ADDR_COPY(wh->i_addr2, bss->macaddr); IEEE80211_ADDR_COPY(wh->i_addr3, bss->macaddr); *(uint16_t *)wh->i_seq = 0; - memcpy(&wh[1], (uint8_t *)&bss[1], le32toh(bss->ieslen)); + memcpy(&wh[1], (uint8_t *)&bss[1], ieslen); /* Finalize mbuf. */ m->m_pkthdr.len = m->m_len = pktlen; @@ -3373,6 +3378,8 @@ rsu_fw_loadsection(struct rsu_softc *sc, const uint8_t return (0); } +CTASSERT(sizeof(size_t) >= sizeof(uint32_t)); + static int rsu_load_firmware(struct rsu_softc *sc) { @@ -3380,7 +3387,7 @@ rsu_load_firmware(struct rsu_softc *sc) struct r92s_fw_priv *dmem; struct ieee80211com *ic = &sc->sc_ic; const uint8_t *imem, *emem; - int imemsz, ememsz; + uint32_t imemsz, ememsz; const struct firmware *fw; size_t size; uint32_t reg; @@ -3432,7 +3439,8 @@ rsu_load_firmware(struct rsu_softc *sc) imemsz = le32toh(hdr->imemsz); ememsz = le32toh(hdr->sramsz); /* Check that all FW sections fit in image. */ - if (size < sizeof(*hdr) + imemsz + ememsz) { + if (imemsz > (size_t)(size - sizeof(*hdr)) || + ememsz > (size_t)(size - sizeof(*hdr) - imemsz)) { device_printf(sc->sc_dev, "firmware too short\n"); error = EINVAL; goto fail; From owner-svn-src-head@freebsd.org Sun Jul 30 18:01:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CCD5DBF8CB; Sun, 30 Jul 2017 18:01:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 090BD7C316; Sun, 30 Jul 2017 18:01:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6UI1ccA072891; Sun, 30 Jul 2017 18:01:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6UI1YXl072853; Sun, 30 Jul 2017 18:01:34 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201707301801.v6UI1YXl072853@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 30 Jul 2017 18:01:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321723 - in head: contrib/llvm/include/llvm/CodeGen/GlobalISel contrib/llvm/include/llvm/Support contrib/llvm/include/llvm/Transforms/Utils contrib/llvm/lib/CodeGen contrib/llvm/lib/Co... X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: contrib/llvm/include/llvm/CodeGen/GlobalISel contrib/llvm/include/llvm/Support contrib/llvm/include/llvm/Transforms/Utils contrib/llvm/lib/CodeGen contrib/llvm/lib/CodeGen/SelectionDAG contri... X-SVN-Commit-Revision: 321723 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 18:01:39 -0000 Author: dim Date: Sun Jul 30 18:01:34 2017 New Revision: 321723 URL: https://svnweb.freebsd.org/changeset/base/321723 Log: Upgrade our copies of clang, llvm, lld and lldb to r309439 from the upstream release_50 branch. This is just after upstream's 5.0.0-rc1. MFC after: 2 months X-MFC-with: r321369 Modified: head/contrib/llvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h head/contrib/llvm/include/llvm/Support/CommandLine.h head/contrib/llvm/include/llvm/Support/TargetRegistry.h head/contrib/llvm/include/llvm/Transforms/Utils/LoopUtils.h head/contrib/llvm/lib/CodeGen/InlineSpiller.cpp head/contrib/llvm/lib/CodeGen/RegAllocBase.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp head/contrib/llvm/lib/Option/OptTable.cpp head/contrib/llvm/lib/Support/CommandLine.cpp head/contrib/llvm/lib/Support/ErrorHandling.cpp head/contrib/llvm/lib/Support/TargetRegistry.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp head/contrib/llvm/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp head/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.td head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZScheduleZ14.td head/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp head/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp head/contrib/llvm/lib/Transforms/Utils/LoopUtils.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp head/contrib/llvm/tools/clang/include/clang/AST/Type.h head/contrib/llvm/tools/clang/lib/AST/StmtProfile.cpp head/contrib/llvm/tools/clang/lib/AST/Type.cpp head/contrib/llvm/tools/clang/lib/Basic/DiagnosticIDs.cpp head/contrib/llvm/tools/clang/lib/Basic/Version.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp head/contrib/llvm/tools/clang/lib/Driver/Driver.cpp head/contrib/llvm/tools/clang/lib/Headers/unwind.h head/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp head/contrib/llvm/tools/clang/tools/clang-format/ClangFormat.cpp head/contrib/llvm/tools/lld/COFF/Config.h head/contrib/llvm/tools/lld/COFF/Driver.cpp head/contrib/llvm/tools/lld/ELF/InputFiles.cpp head/contrib/llvm/tools/lld/ELF/InputFiles.h head/contrib/llvm/tools/lld/ELF/SymbolTable.cpp head/contrib/llvm/tools/lld/lib/ReaderWriter/MachO/ObjCPass.cpp head/contrib/llvm/tools/lldb/include/lldb/API/SBAttachInfo.h head/contrib/llvm/tools/lldb/include/lldb/API/SBBreakpoint.h head/contrib/llvm/tools/lldb/include/lldb/API/SBProcess.h head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/clang/Config/config.h head/lib/clang/include/lld/Config/Version.inc head/lib/clang/include/llvm/Support/VCSRevision.h head/lib/clang/libllvm/Makefile Directory Properties: head/contrib/compiler-rt/ (props changed) head/contrib/libc++/ (props changed) head/contrib/llvm/ (props changed) head/contrib/llvm/tools/clang/ (props changed) head/contrib/llvm/tools/lld/ (props changed) head/contrib/llvm/tools/lldb/ (props changed) Modified: head/contrib/llvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h ============================================================================== --- head/contrib/llvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/include/llvm/CodeGen/GlobalISel/InstructionSelector.h Sun Jul 30 18:01:34 2017 (r321723) @@ -40,7 +40,8 @@ class TargetRegisterInfo; /// This is convenient because std::bitset does not have a constructor /// with an initializer list of set bits. /// -/// Each InstructionSelector subclass should define a PredicateBitset class with: +/// Each InstructionSelector subclass should define a PredicateBitset class +/// with: /// const unsigned MAX_SUBTARGET_PREDICATES = 192; /// using PredicateBitset = PredicateBitsetImpl; /// and updating the constant to suit the target. Tablegen provides a suitable @@ -102,7 +103,8 @@ enum { /// - OpIdx - Operand index /// - Expected integer GIM_CheckConstantInt, - /// Check the operand is a specific literal integer (i.e. MO.isImm() or MO.isCImm() is true). + /// Check the operand is a specific literal integer (i.e. MO.isImm() or + /// MO.isCImm() is true). /// - InsnID - Instruction ID /// - OpIdx - Operand index /// - Expected integer Modified: head/contrib/llvm/include/llvm/Support/CommandLine.h ============================================================================== --- head/contrib/llvm/include/llvm/Support/CommandLine.h Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/include/llvm/Support/CommandLine.h Sun Jul 30 18:01:34 2017 (r321723) @@ -66,15 +66,12 @@ bool ParseCommandLineOptions(int argc, const char *con void ParseEnvironmentOptions(const char *progName, const char *envvar, const char *Overview = ""); -// Function pointer type for printing version information. -using VersionPrinterTy = std::function; - ///===---------------------------------------------------------------------===// /// SetVersionPrinter - Override the default (LLVM specific) version printer /// used to print out the version when --version is given /// on the command line. This allows other systems using the /// CommandLine utilities to print their own version string. -void SetVersionPrinter(VersionPrinterTy func); +void SetVersionPrinter(void (*func)()); ///===---------------------------------------------------------------------===// /// AddExtraVersionPrinter - Add an extra printer to use in addition to the @@ -83,7 +80,7 @@ void SetVersionPrinter(VersionPrinterTy func); /// which will be called after the basic LLVM version /// printing is complete. Each can then add additional /// information specific to the tool. -void AddExtraVersionPrinter(VersionPrinterTy func); +void AddExtraVersionPrinter(void (*func)()); // PrintOptionValues - Print option values. // With -print-options print the difference between option values and defaults. Modified: head/contrib/llvm/include/llvm/Support/TargetRegistry.h ============================================================================== --- head/contrib/llvm/include/llvm/Support/TargetRegistry.h Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/include/llvm/Support/TargetRegistry.h Sun Jul 30 18:01:34 2017 (r321723) @@ -599,7 +599,7 @@ struct TargetRegistry { /// printRegisteredTargetsForVersion - Print the registered targets /// appropriately for inclusion in a tool's version output. - static void printRegisteredTargetsForVersion(raw_ostream &OS); + static void printRegisteredTargetsForVersion(); /// @name Registry Access /// @{ Modified: head/contrib/llvm/include/llvm/Transforms/Utils/LoopUtils.h ============================================================================== --- head/contrib/llvm/include/llvm/Transforms/Utils/LoopUtils.h Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/include/llvm/Transforms/Utils/LoopUtils.h Sun Jul 30 18:01:34 2017 (r321723) @@ -531,8 +531,10 @@ Value *createTargetReduction(IRBuilder<> &B, const Tar /// Get the intersection (logical and) of all of the potential IR flags /// of each scalar operation (VL) that will be converted into a vector (I). +/// If OpValue is non-null, we only consider operations similar to OpValue +/// when intersecting. /// Flag set: NSW, NUW, exact, and all of fast-math. -void propagateIRFlags(Value *I, ArrayRef VL); +void propagateIRFlags(Value *I, ArrayRef VL, Value *OpValue = nullptr); } // end namespace llvm Modified: head/contrib/llvm/lib/CodeGen/InlineSpiller.cpp ============================================================================== --- head/contrib/llvm/lib/CodeGen/InlineSpiller.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/lib/CodeGen/InlineSpiller.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -643,8 +643,11 @@ void InlineSpiller::reMaterializeAll() { Edit->eraseVirtReg(Reg); continue; } - assert((LIS.hasInterval(Reg) && !LIS.getInterval(Reg).empty()) && - "Reg with empty interval has reference"); + + assert(LIS.hasInterval(Reg) && + (!LIS.getInterval(Reg).empty() || !MRI.reg_nodbg_empty(Reg)) && + "Empty and not used live-range?!"); + RegsToSpill[ResultPos++] = Reg; } RegsToSpill.erase(RegsToSpill.begin() + ResultPos, RegsToSpill.end()); Modified: head/contrib/llvm/lib/CodeGen/RegAllocBase.cpp ============================================================================== --- head/contrib/llvm/lib/CodeGen/RegAllocBase.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/lib/CodeGen/RegAllocBase.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -133,18 +133,19 @@ void RegAllocBase::allocatePhysRegs() { if (AvailablePhysReg) Matrix->assign(*VirtReg, AvailablePhysReg); - for (VirtRegVec::iterator I = SplitVRegs.begin(), E = SplitVRegs.end(); - I != E; ++I) { - LiveInterval *SplitVirtReg = &LIS->getInterval(*I); + for (unsigned Reg : SplitVRegs) { + assert(LIS->hasInterval(Reg)); + + LiveInterval *SplitVirtReg = &LIS->getInterval(Reg); assert(!VRM->hasPhys(SplitVirtReg->reg) && "Register already assigned"); if (MRI->reg_nodbg_empty(SplitVirtReg->reg)) { + assert(SplitVirtReg->empty() && "Non-empty but used interval"); DEBUG(dbgs() << "not queueing unused " << *SplitVirtReg << '\n'); aboutToRemoveInterval(*SplitVirtReg); LIS->removeInterval(SplitVirtReg->reg); continue; } DEBUG(dbgs() << "queuing new interval: " << *SplitVirtReg << "\n"); - assert(!SplitVirtReg->empty() && "expecting non-empty interval"); assert(TargetRegisterInfo::isVirtualRegister(SplitVirtReg->reg) && "expect split value in virtual register"); enqueue(SplitVirtReg); Modified: head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp ============================================================================== --- head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -2965,7 +2965,12 @@ static inline bool isSETCCorConvertedSETCC(SDValue N) else if (N.getOpcode() == ISD::SIGN_EXTEND) N = N.getOperand(0); - return (N.getOpcode() == ISD::SETCC); + if (isLogicalMaskOp(N.getOpcode())) + return isSETCCorConvertedSETCC(N.getOperand(0)) && + isSETCCorConvertedSETCC(N.getOperand(1)); + + return (N.getOpcode() == ISD::SETCC || + ISD::isBuildVectorOfConstantSDNodes(N.getNode())); } #endif @@ -2973,28 +2978,20 @@ static inline bool isSETCCorConvertedSETCC(SDValue N) // to ToMaskVT if needed with vector extension or truncation. SDValue DAGTypeLegalizer::convertMask(SDValue InMask, EVT MaskVT, EVT ToMaskVT) { - LLVMContext &Ctx = *DAG.getContext(); - // Currently a SETCC or a AND/OR/XOR with two SETCCs are handled. - unsigned InMaskOpc = InMask->getOpcode(); - // FIXME: This code seems to be too restrictive, we might consider // generalizing it or dropping it. - assert((InMaskOpc == ISD::SETCC || - ISD::isBuildVectorOfConstantSDNodes(InMask.getNode()) || - (isLogicalMaskOp(InMaskOpc) && - isSETCCorConvertedSETCC(InMask->getOperand(0)) && - isSETCCorConvertedSETCC(InMask->getOperand(1)))) && - "Unexpected mask argument."); + assert(isSETCCorConvertedSETCC(InMask) && "Unexpected mask argument."); // Make a new Mask node, with a legal result VT. SmallVector Ops; for (unsigned i = 0; i < InMask->getNumOperands(); ++i) Ops.push_back(InMask->getOperand(i)); - SDValue Mask = DAG.getNode(InMaskOpc, SDLoc(InMask), MaskVT, Ops); + SDValue Mask = DAG.getNode(InMask->getOpcode(), SDLoc(InMask), MaskVT, Ops); // If MaskVT has smaller or bigger elements than ToMaskVT, a vector sign // extend or truncate is needed. + LLVMContext &Ctx = *DAG.getContext(); unsigned MaskScalarBits = MaskVT.getScalarSizeInBits(); unsigned ToMaskScalBits = ToMaskVT.getScalarSizeInBits(); if (MaskScalarBits < ToMaskScalBits) { Modified: head/contrib/llvm/lib/Option/OptTable.cpp ============================================================================== --- head/contrib/llvm/lib/Option/OptTable.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/lib/Option/OptTable.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -235,7 +235,9 @@ OptTable::findByPrefix(StringRef Cur, unsigned short D continue; for (int I = 0; In.Prefixes[I]; I++) { - std::string S = std::string(In.Prefixes[I]) + std::string(In.Name); + std::string S = std::string(In.Prefixes[I]) + std::string(In.Name) + "\t"; + if (In.HelpText) + S += In.HelpText; if (StringRef(S).startswith(Cur)) Ret.push_back(S); } Modified: head/contrib/llvm/lib/Support/CommandLine.cpp ============================================================================== --- head/contrib/llvm/lib/Support/CommandLine.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/lib/Support/CommandLine.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -2039,9 +2039,9 @@ void CommandLineParser::printOptionValues() { Opts[i].second->printOptionValue(MaxArgLen, PrintAllOptions); } -static VersionPrinterTy OverrideVersionPrinter = nullptr; +static void (*OverrideVersionPrinter)() = nullptr; -static std::vector *ExtraVersionPrinters = nullptr; +static std::vector *ExtraVersionPrinters = nullptr; namespace { class VersionPrinter { @@ -2081,7 +2081,7 @@ class VersionPrinter { (public) return; if (OverrideVersionPrinter != nullptr) { - OverrideVersionPrinter(outs()); + (*OverrideVersionPrinter)(); exit(0); } print(); @@ -2090,8 +2090,10 @@ class VersionPrinter { (public) // information. if (ExtraVersionPrinters != nullptr) { outs() << '\n'; - for (auto I : *ExtraVersionPrinters) - I(outs()); + for (std::vector::iterator I = ExtraVersionPrinters->begin(), + E = ExtraVersionPrinters->end(); + I != E; ++I) + (*I)(); } exit(0); @@ -2129,11 +2131,11 @@ void cl::PrintHelpMessage(bool Hidden, bool Categorize /// Utility function for printing version number. void cl::PrintVersionMessage() { VersionPrinterInstance.print(); } -void cl::SetVersionPrinter(VersionPrinterTy func) { OverrideVersionPrinter = func; } +void cl::SetVersionPrinter(void (*func)()) { OverrideVersionPrinter = func; } -void cl::AddExtraVersionPrinter(VersionPrinterTy func) { +void cl::AddExtraVersionPrinter(void (*func)()) { if (!ExtraVersionPrinters) - ExtraVersionPrinters = new std::vector; + ExtraVersionPrinters = new std::vector; ExtraVersionPrinters->push_back(func); } Modified: head/contrib/llvm/lib/Support/ErrorHandling.cpp ============================================================================== --- head/contrib/llvm/lib/Support/ErrorHandling.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/lib/Support/ErrorHandling.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -169,7 +169,8 @@ void llvm::report_bad_alloc_error(const char *Reason, // Don't call the normal error handler. It may allocate memory. Directly write // an OOM to stderr and abort. char OOMMessage[] = "LLVM ERROR: out of memory\n"; - (void)::write(2, OOMMessage, strlen(OOMMessage)); + ssize_t written = ::write(2, OOMMessage, strlen(OOMMessage)); + (void)written; abort(); #endif } Modified: head/contrib/llvm/lib/Support/TargetRegistry.cpp ============================================================================== --- head/contrib/llvm/lib/Support/TargetRegistry.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/lib/Support/TargetRegistry.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -114,7 +114,7 @@ static int TargetArraySortFn(const std::pairfirst.compare(RHS->first); } -void TargetRegistry::printRegisteredTargetsForVersion(raw_ostream &OS) { +void TargetRegistry::printRegisteredTargetsForVersion() { std::vector > Targets; size_t Width = 0; for (const auto &T : TargetRegistry::targets()) { @@ -123,6 +123,7 @@ void TargetRegistry::printRegisteredTargetsForVersion( } array_pod_sort(Targets.begin(), Targets.end(), TargetArraySortFn); + raw_ostream &OS = outs(); OS << " Registered Targets:\n"; for (unsigned i = 0, e = Targets.size(); i != e; ++i) { OS << " " << Targets[i].first; Modified: head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -2889,9 +2889,12 @@ void AArch64TargetLowering::saveVarArgRegisters(CCStat unsigned GPRSaveSize = 8 * (NumGPRArgRegs - FirstVariadicGPR); int GPRIdx = 0; if (GPRSaveSize != 0) { - if (IsWin64) + if (IsWin64) { GPRIdx = MFI.CreateFixedObject(GPRSaveSize, -(int)GPRSaveSize, false); - else + if (GPRSaveSize & 15) + // The extra size here, if triggered, will always be 8. + MFI.CreateFixedObject(16 - (GPRSaveSize & 15), -(int)alignTo(GPRSaveSize, 16), false); + } else GPRIdx = MFI.CreateStackObject(GPRSaveSize, 8, false); SDValue FIN = DAG.getFrameIndex(GPRIdx, PtrVT); Modified: head/contrib/llvm/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp ============================================================================== --- head/contrib/llvm/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -297,6 +297,11 @@ void AMDGPUInstPrinter::printRegOperand(unsigned RegNo case AMDGPU::FLAT_SCR_HI: O << "flat_scratch_hi"; return; + case AMDGPU::FP_REG: + case AMDGPU::SP_REG: + case AMDGPU::SCRATCH_WAVE_OFFSET_REG: + case AMDGPU::PRIVATE_RSRC_REG: + llvm_unreachable("pseudo-register should not ever be emitted"); default: break; } Modified: head/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.td ============================================================================== --- head/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.td Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.td Sun Jul 30 18:01:34 2017 (r321723) @@ -274,8 +274,7 @@ def VGPR_512 : RegisterTuples<[sub0, sub1, sub2, sub3, def SReg_32_XM0_XEXEC : RegisterClass<"AMDGPU", [i32, f32, i16, f16, v2i16, v2f16], 32, (add SGPR_32, VCC_LO, VCC_HI, FLAT_SCR_LO, FLAT_SCR_HI, TTMP_32, TMA_LO, TMA_HI, TBA_LO, TBA_HI, SRC_SHARED_BASE, SRC_SHARED_LIMIT, - SRC_PRIVATE_BASE, SRC_PRIVATE_LIMIT, - FP_REG, SP_REG, SCRATCH_WAVE_OFFSET_REG)> { + SRC_PRIVATE_BASE, SRC_PRIVATE_LIMIT)> { let AllocationPriority = 7; } Modified: head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp ============================================================================== --- head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -61,14 +61,6 @@ static unsigned adjustFixupValue(unsigned Kind, uint64 case Sparc::fixup_sparc_lo10: return Value & 0x3ff; - case Sparc::fixup_sparc_tls_ldo_hix22: - case Sparc::fixup_sparc_tls_le_hix22: - return (~Value >> 10) & 0x3fffff; - - case Sparc::fixup_sparc_tls_ldo_lox10: - case Sparc::fixup_sparc_tls_le_lox10: - return (~(~Value & 0x3ff)) & 0x1fff; - case Sparc::fixup_sparc_h44: return (Value >> 22) & 0x3fffff; @@ -83,6 +75,13 @@ static unsigned adjustFixupValue(unsigned Kind, uint64 case Sparc::fixup_sparc_hm: return (Value >> 32) & 0x3ff; + + case Sparc::fixup_sparc_tls_ldo_hix22: + case Sparc::fixup_sparc_tls_le_hix22: + case Sparc::fixup_sparc_tls_ldo_lox10: + case Sparc::fixup_sparc_tls_le_lox10: + assert(Value == 0 && "Sparc TLS relocs expect zero Value"); + return 0; case Sparc::fixup_sparc_tls_gd_add: case Sparc::fixup_sparc_tls_gd_call: Modified: head/contrib/llvm/lib/Target/SystemZ/SystemZScheduleZ14.td ============================================================================== --- head/contrib/llvm/lib/Target/SystemZ/SystemZScheduleZ14.td Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/lib/Target/SystemZ/SystemZScheduleZ14.td Sun Jul 30 18:01:34 2017 (r321723) @@ -455,10 +455,10 @@ def : InstRW<[FXa, LSU, Lat8], (instregex "MH(Y)?$")>; def : InstRW<[FXa2, Lat6, GroupAlone], (instregex "M(L)?R$")>; def : InstRW<[FXa2, LSU, Lat10, GroupAlone], (instregex "M(FY|L)?$")>; def : InstRW<[FXa, LSU, Lat8], (instregex "MGH$")>; -def : InstRW<[FXa, LSU, Lat12, GroupAlone], (instregex "MG$")>; -def : InstRW<[FXa, Lat8, GroupAlone], (instregex "MGRK$")>; -def : InstRW<[FXa, LSU, Lat9, GroupAlone], (instregex "MSC$")>; -def : InstRW<[FXa, LSU, Lat11, GroupAlone], (instregex "MSGC$")>; +def : InstRW<[FXa, FXa, LSU, Lat12, GroupAlone], (instregex "MG$")>; +def : InstRW<[FXa, FXa, Lat8, GroupAlone], (instregex "MGRK$")>; +def : InstRW<[FXa, LSU, Lat9], (instregex "MSC$")>; +def : InstRW<[FXa, LSU, Lat11], (instregex "MSGC$")>; def : InstRW<[FXa, Lat5], (instregex "MSRKC$")>; def : InstRW<[FXa, Lat7], (instregex "MSGRKC$")>; @@ -620,7 +620,7 @@ def : InstRW<[FXa, Lat30], (instregex "(PCC|PPNO|PRNO) def : InstRW<[LSU], (instregex "LGG$")>; def : InstRW<[LSU, Lat5], (instregex "LLGFSG$")>; -def : InstRW<[LSU, Lat30, GroupAlone], (instregex "(L|ST)GSC$")>; +def : InstRW<[LSU, Lat30], (instregex "(L|ST)GSC$")>; //===----------------------------------------------------------------------===// // Decimal arithmetic @@ -708,7 +708,7 @@ def : InstRW<[FXb, LSU, Lat5], (instregex "NTSTG$")>; // Processor assist //===----------------------------------------------------------------------===// -def : InstRW<[FXb], (instregex "PPA$")>; +def : InstRW<[FXb, GroupAlone], (instregex "PPA$")>; //===----------------------------------------------------------------------===// // Miscellaneous Instructions. @@ -1276,9 +1276,9 @@ def : InstRW<[VecXsPm], (instregex "VESRL(B|F|G|H)?$") def : InstRW<[VecXsPm], (instregex "VESRLV(B|F|G|H)?$")>; def : InstRW<[VecXsPm], (instregex "VSL(DB)?$")>; -def : InstRW<[VecXsPm, VecXsPm, Lat8], (instregex "VSLB$")>; +def : InstRW<[VecXsPm], (instregex "VSLB$")>; def : InstRW<[VecXsPm], (instregex "VSR(A|L)$")>; -def : InstRW<[VecXsPm, VecXsPm, Lat8], (instregex "VSR(A|L)B$")>; +def : InstRW<[VecXsPm], (instregex "VSR(A|L)B$")>; def : InstRW<[VecXsPm], (instregex "VSB(I|IQ|CBI|CBIQ)?$")>; def : InstRW<[VecXsPm], (instregex "VSCBI(B|F|G|H|Q)?$")>; @@ -1435,9 +1435,9 @@ def : InstRW<[VecStr, Lat5], (instregex "VSTRCZ(B|F|H) // Vector: Packed-decimal instructions //===----------------------------------------------------------------------===// -def : InstRW<[VecDF, VecDF, Lat10, GroupAlone], (instregex "VLIP$")>; -def : InstRW<[VecDFX, LSU, Lat12, GroupAlone], (instregex "VPKZ$")>; -def : InstRW<[VecDFX, FXb, LSU, Lat12, GroupAlone], (instregex "VUPKZ$")>; +def : InstRW<[VecDF, VecDF, Lat10], (instregex "VLIP$")>; +def : InstRW<[VecDFX, LSU, GroupAlone], (instregex "VPKZ$")>; +def : InstRW<[VecDFX, FXb, LSU, Lat12, BeginGroup], (instregex "VUPKZ$")>; def : InstRW<[VecDF, VecDF, FXb, Lat20, GroupAlone], (instregex "VCVB(G)?$")>; def : InstRW<[VecDF, VecDF, FXb, Lat20, GroupAlone], (instregex "VCVD(G)?$")>; def : InstRW<[VecDFX], (instregex "V(A|S)P$")>; Modified: head/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -1055,7 +1055,10 @@ static bool foldMaskAndShiftToScale(SelectionDAG &DAG, // Scale the leading zero count down based on the actual size of the value. // Also scale it down based on the size of the shift. - MaskLZ -= (64 - X.getSimpleValueType().getSizeInBits()) + ShiftAmt; + unsigned ScaleDown = (64 - X.getSimpleValueType().getSizeInBits()) + ShiftAmt; + if (MaskLZ < ScaleDown) + return true; + MaskLZ -= ScaleDown; // The final check is to ensure that any masked out high bits of X are // already known to be zero. Otherwise, the mask has a semantic impact Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -22022,8 +22022,9 @@ static SDValue LowerScalarImmediateShift(SDValue Op, S return getTargetVShiftByConstNode(X86Opc, dl, VT, R, ShiftAmt, DAG); // i64 SRA needs to be performed as partial shifts. - if ((VT == MVT::v2i64 || (Subtarget.hasInt256() && VT == MVT::v4i64)) && - Op.getOpcode() == ISD::SRA && !Subtarget.hasXOP()) + if (((!Subtarget.hasXOP() && VT == MVT::v2i64) || + (Subtarget.hasInt256() && VT == MVT::v4i64)) && + Op.getOpcode() == ISD::SRA) return ArithmeticShiftRight64(ShiftAmt); if (VT == MVT::v16i8 || Modified: head/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp ============================================================================== --- head/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -64,6 +64,11 @@ ImplicationSearchThreshold( "condition to use to thread over a weaker condition"), cl::init(3), cl::Hidden); +static cl::opt PrintLVIAfterJumpThreading( + "print-lvi-after-jump-threading", + cl::desc("Print the LazyValueInfo cache after JumpThreading"), cl::init(false), + cl::Hidden); + namespace { /// This pass performs 'jump threading', which looks at blocks that have /// multiple predecessors and multiple successors. If one or more of the @@ -93,9 +98,10 @@ namespace { bool runOnFunction(Function &F) override; void getAnalysisUsage(AnalysisUsage &AU) const override { + if (PrintLVIAfterJumpThreading) + AU.addRequired(); AU.addRequired(); AU.addRequired(); - AU.addPreserved(); AU.addPreserved(); AU.addRequired(); } @@ -137,8 +143,14 @@ bool JumpThreading::runOnFunction(Function &F) { BFI.reset(new BlockFrequencyInfo(F, *BPI, LI)); } - return Impl.runImpl(F, TLI, LVI, AA, HasProfileData, std::move(BFI), - std::move(BPI)); + bool Changed = Impl.runImpl(F, TLI, LVI, AA, HasProfileData, std::move(BFI), + std::move(BPI)); + if (PrintLVIAfterJumpThreading) { + dbgs() << "LVI for function '" << F.getName() << "':\n"; + LVI->printLVI(F, getAnalysis().getDomTree(), + dbgs()); + } + return Changed; } PreservedAnalyses JumpThreadingPass::run(Function &F, @@ -231,13 +243,15 @@ bool JumpThreadingPass::runImpl(Function &F, TargetLib // Can't thread an unconditional jump, but if the block is "almost // empty", we can replace uses of it with uses of the successor and make // this dead. - // We should not eliminate the loop header either, because eliminating - // a loop header might later prevent LoopSimplify from transforming nested - // loops into simplified form. + // We should not eliminate the loop header or latch either, because + // eliminating a loop header or latch might later prevent LoopSimplify + // from transforming nested loops into simplified form. We will rely on + // later passes in backend to clean up empty blocks. if (BI && BI->isUnconditional() && BB != &BB->getParent()->getEntryBlock() && // If the terminator is the only non-phi instruction, try to nuke it. - BB->getFirstNonPHIOrDbg()->isTerminator() && !LoopHeaders.count(BB)) { + BB->getFirstNonPHIOrDbg()->isTerminator() && !LoopHeaders.count(BB) && + !LoopHeaders.count(BI->getSuccessor(0))) { // FIXME: It is always conservatively correct to drop the info // for a block even if it doesn't get erased. This isn't totally // awesome, but it allows us to use AssertingVH to prevent nasty Modified: head/contrib/llvm/lib/Transforms/Utils/LoopUtils.cpp ============================================================================== --- head/contrib/llvm/lib/Transforms/Utils/LoopUtils.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/lib/Transforms/Utils/LoopUtils.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -1376,16 +1376,21 @@ Value *llvm::createTargetReduction(IRBuilder<> &Builde } } -void llvm::propagateIRFlags(Value *I, ArrayRef VL) { - if (auto *VecOp = dyn_cast(I)) { - if (auto *I0 = dyn_cast(VL[0])) { - // VecOVp is initialized to the 0th scalar, so start counting from index - // '1'. - VecOp->copyIRFlags(I0); - for (int i = 1, e = VL.size(); i < e; ++i) { - if (auto *Scalar = dyn_cast(VL[i])) - VecOp->andIRFlags(Scalar); - } - } +void llvm::propagateIRFlags(Value *I, ArrayRef VL, Value *OpValue) { + auto *VecOp = dyn_cast(I); + if (!VecOp) + return; + auto *Intersection = (OpValue == nullptr) ? dyn_cast(VL[0]) + : dyn_cast(OpValue); + if (!Intersection) + return; + const unsigned Opcode = Intersection->getOpcode(); + VecOp->copyIRFlags(Intersection); + for (auto *V : VL) { + auto *Instr = dyn_cast(V); + if (!Instr) + continue; + if (OpValue == nullptr || Opcode == Instr->getOpcode()) + VecOp->andIRFlags(V); } } Modified: head/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp ============================================================================== --- head/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -5656,20 +5656,22 @@ static bool TryToMergeLandingPad(LandingPadInst *LPad, bool SimplifyCFGOpt::SimplifyUncondBranch(BranchInst *BI, IRBuilder<> &Builder) { BasicBlock *BB = BI->getParent(); + BasicBlock *Succ = BI->getSuccessor(0); if (SinkCommon && SinkThenElseCodeToEnd(BI)) return true; // If the Terminator is the only non-phi instruction, simplify the block. - // if LoopHeader is provided, check if the block is a loop header - // (This is for early invocations before loop simplify and vectorization - // to keep canonical loop forms for nested loops. - // These blocks can be eliminated when the pass is invoked later - // in the back-end.) + // if LoopHeader is provided, check if the block or its successor is a loop + // header (This is for early invocations before loop simplify and + // vectorization to keep canonical loop forms for nested loops. These blocks + // can be eliminated when the pass is invoked later in the back-end.) + bool NeedCanonicalLoop = + !LateSimplifyCFG && + (LoopHeaders && (LoopHeaders->count(BB) || LoopHeaders->count(Succ))); BasicBlock::iterator I = BB->getFirstNonPHIOrDbg()->getIterator(); if (I->isTerminator() && BB != &BB->getParent()->getEntryBlock() && - (!LoopHeaders || !LoopHeaders->count(BB)) && - TryToSimplifyUncondBranchFromEmptyBlock(BB)) + !NeedCanonicalLoop && TryToSimplifyUncondBranchFromEmptyBlock(BB)) return true; // If the only instruction in the block is a seteq/setne comparison Modified: head/contrib/llvm/tools/clang/include/clang/AST/Type.h ============================================================================== --- head/contrib/llvm/tools/clang/include/clang/AST/Type.h Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/tools/clang/include/clang/AST/Type.h Sun Jul 30 18:01:34 2017 (r321723) @@ -1752,6 +1752,7 @@ class Type : public ExtQualsTypeCommonBase { (public) bool isTemplateTypeParmType() const; // C++ template type parameter bool isNullPtrType() const; // C++11 std::nullptr_t bool isAlignValT() const; // C++17 std::align_val_t + bool isStdByteType() const; // C++17 std::byte bool isAtomicType() const; // C11 _Atomic() #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ Modified: head/contrib/llvm/tools/clang/lib/AST/StmtProfile.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/AST/StmtProfile.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/tools/clang/lib/AST/StmtProfile.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -1388,6 +1388,15 @@ static Stmt::StmtClass DecodeOperatorCall(const CXXOpe llvm_unreachable("Invalid overloaded operator expression"); } +#if defined(_MSC_VER) +#if _MSC_VER == 1911 +// Work around https://developercommunity.visualstudio.com/content/problem/84002/clang-cl-when-built-with-vc-2017-crashes-cause-vc.html +// MSVC 2017 update 3 miscompiles this function, and a clang built with it +// will crash in stage 2 of a bootstrap build. +#pragma optimize("", off) +#endif +#endif + void StmtProfiler::VisitCXXOperatorCallExpr(const CXXOperatorCallExpr *S) { if (S->isTypeDependent()) { // Type-dependent operator calls are profiled like their underlying @@ -1419,6 +1428,12 @@ void StmtProfiler::VisitCXXOperatorCallExpr(const CXXO VisitCallExpr(S); ID.AddInteger(S->getOperator()); } + +#if defined(_MSC_VER) +#if _MSC_VER == 1911 +#pragma optimize("", on) +#endif +#endif void StmtProfiler::VisitCXXMemberCallExpr(const CXXMemberCallExpr *S) { VisitCallExpr(S); Modified: head/contrib/llvm/tools/clang/lib/AST/Type.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/AST/Type.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/tools/clang/lib/AST/Type.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -2313,6 +2313,15 @@ bool Type::isAlignValT() const { return false; } +bool Type::isStdByteType() const { + if (auto *ET = getAs()) { + auto *II = ET->getDecl()->getIdentifier(); + if (II && II->isStr("byte") && ET->getDecl()->isInStdNamespace()) + return true; + } + return false; +} + bool Type::isPromotableIntegerType() const { if (const BuiltinType *BT = getAs()) switch (BT->getKind()) { Modified: head/contrib/llvm/tools/clang/lib/Basic/DiagnosticIDs.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Basic/DiagnosticIDs.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/tools/clang/lib/Basic/DiagnosticIDs.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -516,7 +516,7 @@ std::vector DiagnosticIDs::getDiagnosticF std::string Diag(DiagGroupNames + I + 1, DiagGroupNames[I]); I += DiagGroupNames[I] + 1; Res.push_back("-W" + Diag); - Res.push_back("-Wno" + Diag); + Res.push_back("-Wno-" + Diag); } return Res; Modified: head/contrib/llvm/tools/clang/lib/Basic/Version.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Basic/Version.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/tools/clang/lib/Basic/Version.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -36,7 +36,7 @@ std::string getClangRepositoryPath() { // If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us // pick up a tag in an SVN export, for example. - StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/trunk/lib/Basic/Version.cpp $"); + StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/branches/release_50/lib/Basic/Version.cpp $"); if (URL.empty()) { URL = SVNRepository.slice(SVNRepository.find(':'), SVNRepository.find("/lib/Basic")); Modified: head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -139,6 +139,12 @@ CodeGenTBAA::getTBAAInfo(QualType QTy) { } } + // C++1z [basic.lval]p10: "If a program attempts to access the stored value of + // an object through a glvalue of other than one of the following types the + // behavior is undefined: [...] a char, unsigned char, or std::byte type." + if (Ty->isStdByteType()) + return MetadataCache[Ty] = getChar(); + // Handle pointers. // TODO: Implement C++'s type "similarity" and consider dis-"similar" // pointers distinct. Modified: head/contrib/llvm/tools/clang/lib/Driver/Driver.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Driver/Driver.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/tools/clang/lib/Driver/Driver.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -69,7 +69,6 @@ #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/Process.h" #include "llvm/Support/Program.h" -#include "llvm/Support/TargetRegistry.h" #include "llvm/Support/raw_ostream.h" #include #include @@ -1193,10 +1192,6 @@ bool Driver::HandleImmediateArgs(const Compilation &C) if (C.getArgs().hasArg(options::OPT__version)) { // Follow gcc behavior and use stdout for --version and stderr for -v. PrintVersion(C, llvm::outs()); - - // Print registered targets. - llvm::outs() << '\n'; - llvm::TargetRegistry::printRegisteredTargetsForVersion(llvm::outs()); return false; } @@ -1299,7 +1294,7 @@ bool Driver::HandleImmediateArgs(const Compilation &C) std::sort(SuggestedCompletions.begin(), SuggestedCompletions.end(), [](StringRef A, StringRef B) { return A.compare_lower(B) < 0; }); - llvm::outs() << llvm::join(SuggestedCompletions, " ") << '\n'; + llvm::outs() << llvm::join(SuggestedCompletions, "\n") << '\n'; return false; } Modified: head/contrib/llvm/tools/clang/lib/Headers/unwind.h ============================================================================== --- head/contrib/llvm/tools/clang/lib/Headers/unwind.h Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/tools/clang/lib/Headers/unwind.h Sun Jul 30 18:01:34 2017 (r321723) @@ -76,7 +76,13 @@ typedef intptr_t _sleb128_t; typedef uintptr_t _uleb128_t; struct _Unwind_Context; +#if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || defined(__ARM_DWARF_EH___)) +struct _Unwind_Control_Block; +typedef struct _Unwind_Control_Block _Unwind_Exception; /* Alias */ +#else struct _Unwind_Exception; +typedef struct _Unwind_Exception _Unwind_Exception; +#endif typedef enum { _URC_NO_REASON = 0, #if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \ @@ -109,8 +115,42 @@ typedef enum { } _Unwind_Action; typedef void (*_Unwind_Exception_Cleanup_Fn)(_Unwind_Reason_Code, - struct _Unwind_Exception *); + _Unwind_Exception *); +#if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || defined(__ARM_DWARF_EH___)) +typedef struct _Unwind_Control_Block _Unwind_Control_Block; +typedef uint32_t _Unwind_EHT_Header; + +struct _Unwind_Control_Block { + uint64_t exception_class; + void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block *); + /* unwinder cache (private fields for the unwinder's use) */ + struct { + uint32_t reserved1; /* forced unwind stop function, 0 if not forced */ + uint32_t reserved2; /* personality routine */ + uint32_t reserved3; /* callsite */ + uint32_t reserved4; /* forced unwind stop argument */ + uint32_t reserved5; + } unwinder_cache; + /* propagation barrier cache (valid after phase 1) */ + struct { + uint32_t sp; + uint32_t bitpattern[5]; + } barrier_cache; + /* cleanup cache (preserved over cleanup) */ + struct { + uint32_t bitpattern[4]; + } cleanup_cache; + /* personality cache (for personality's benefit) */ + struct { + uint32_t fnstart; /* function start address */ + _Unwind_EHT_Header *ehtp; /* pointer to EHT entry header word */ + uint32_t additional; /* additional data */ + uint32_t reserved1; + } pr_cache; + long long int : 0; /* force alignment of next item to 8-byte boundary */ +}; +#else struct _Unwind_Exception { _Unwind_Exception_Class exception_class; _Unwind_Exception_Cleanup_Fn exception_cleanup; @@ -120,23 +160,24 @@ struct _Unwind_Exception { * aligned". GCC has interpreted this to mean "use the maximum useful * alignment for the target"; so do we. */ } __attribute__((__aligned__)); +#endif typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)(int, _Unwind_Action, _Unwind_Exception_Class, - struct _Unwind_Exception *, + _Unwind_Exception *, struct _Unwind_Context *, void *); -typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn)( - int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); +typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn)(int, _Unwind_Action, + _Unwind_Exception_Class, + _Unwind_Exception *, + struct _Unwind_Context *); typedef _Unwind_Personality_Fn __personality_routine; typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn)(struct _Unwind_Context *, void *); -#if defined(__arm__) && !defined(__APPLE__) - +#if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || defined(__ARM_DWARF_EH___)) typedef enum { _UVRSC_CORE = 0, /* integer register */ _UVRSC_VFP = 1, /* vfp */ @@ -158,14 +199,12 @@ typedef enum { _UVRSR_FAILED = 2 } _Unwind_VRS_Result; -#if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__ARM_DWARF_EH__) typedef uint32_t _Unwind_State; #define _US_VIRTUAL_UNWIND_FRAME ((_Unwind_State)0) #define _US_UNWIND_FRAME_STARTING ((_Unwind_State)1) #define _US_UNWIND_FRAME_RESUME ((_Unwind_State)2) #define _US_ACTION_MASK ((_Unwind_State)3) #define _US_FORCE_UNWIND ((_Unwind_State)8) -#endif _Unwind_VRS_Result _Unwind_VRS_Get(struct _Unwind_Context *__context, _Unwind_VRS_RegClass __regclass, @@ -224,14 +263,13 @@ _Unwind_Ptr _Unwind_GetRegionStart(struct _Unwind_Cont /* DWARF EH functions; currently not available on Darwin/ARM */ #if !defined(__APPLE__) || !defined(__arm__) +_Unwind_Reason_Code _Unwind_RaiseException(_Unwind_Exception *); +_Unwind_Reason_Code _Unwind_ForcedUnwind(_Unwind_Exception *, _Unwind_Stop_Fn, + void *); +void _Unwind_DeleteException(_Unwind_Exception *); +void _Unwind_Resume(_Unwind_Exception *); +_Unwind_Reason_Code _Unwind_Resume_or_Rethrow(_Unwind_Exception *); -_Unwind_Reason_Code _Unwind_RaiseException(struct _Unwind_Exception *); -_Unwind_Reason_Code _Unwind_ForcedUnwind(struct _Unwind_Exception *, - _Unwind_Stop_Fn, void *); -void _Unwind_DeleteException(struct _Unwind_Exception *); -void _Unwind_Resume(struct _Unwind_Exception *); -_Unwind_Reason_Code _Unwind_Resume_or_Rethrow(struct _Unwind_Exception *); - #endif _Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn, void *); @@ -241,11 +279,11 @@ typedef struct SjLj_Function_Context *_Unwind_Function void _Unwind_SjLj_Register(_Unwind_FunctionContext_t); void _Unwind_SjLj_Unregister(_Unwind_FunctionContext_t); -_Unwind_Reason_Code _Unwind_SjLj_RaiseException(struct _Unwind_Exception *); -_Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind(struct _Unwind_Exception *, +_Unwind_Reason_Code _Unwind_SjLj_RaiseException(_Unwind_Exception *); +_Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind(_Unwind_Exception *, _Unwind_Stop_Fn, void *); -void _Unwind_SjLj_Resume(struct _Unwind_Exception *); -_Unwind_Reason_Code _Unwind_SjLj_Resume_or_Rethrow(struct _Unwind_Exception *); +void _Unwind_SjLj_Resume(_Unwind_Exception *); +_Unwind_Reason_Code _Unwind_SjLj_Resume_or_Rethrow(_Unwind_Exception *); void *_Unwind_FindEnclosingFunction(void *); Modified: head/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -2398,6 +2398,37 @@ formatBlockPlaceholder(const PrintingPolicy &Policy, c return Result; } +static std::string GetDefaultValueString(const ParmVarDecl *Param, + const SourceManager &SM, + const LangOptions &LangOpts) { + const Expr *defaultArg = Param->getDefaultArg(); + if (!defaultArg) + return ""; + const SourceRange SrcRange = defaultArg->getSourceRange(); + CharSourceRange CharSrcRange = CharSourceRange::getTokenRange(SrcRange); + bool Invalid = CharSrcRange.isInvalid(); + if (Invalid) + return ""; + StringRef srcText = Lexer::getSourceText(CharSrcRange, SM, LangOpts, &Invalid); + if (Invalid) + return ""; + + if (srcText.empty() || srcText == "=") { + // Lexer can't determine the value. + // This happens if the code is incorrect (for example class is forward declared). + return ""; + } + std::string DefValue(srcText.str()); + // FIXME: remove this check if the Lexer::getSourceText value is fixed and + // this value always has (or always does not have) '=' in front of it + if (DefValue.at(0) != '=') { + // If we don't have '=' in front of value. + // Lexer returns built-in types values without '=' and user-defined types values with it. + return " = " + DefValue; + } + return " " + DefValue; +} + /// \brief Add function parameter chunks to the given code completion string. static void AddFunctionParameterChunks(Preprocessor &PP, const PrintingPolicy &Policy, @@ -2431,6 +2462,8 @@ static void AddFunctionParameterChunks(Preprocessor &P // Format the placeholder string. std::string PlaceholderStr = FormatFunctionParameter(Policy, Param); + if (Param->hasDefaultArg()) + PlaceholderStr += GetDefaultValueString(Param, PP.getSourceManager(), PP.getLangOpts()); if (Function->isVariadic() && P == N - 1) PlaceholderStr += ", ..."; @@ -3012,10 +3045,14 @@ static void AddOverloadParameterChunks(ASTContext &Con // Format the placeholder string. std::string Placeholder; - if (Function) - Placeholder = FormatFunctionParameter(Policy, Function->getParamDecl(P)); - else + if (Function) { + const ParmVarDecl *Param = Function->getParamDecl(P); + Placeholder = FormatFunctionParameter(Policy, Param); + if (Param->hasDefaultArg()) + Placeholder += GetDefaultValueString(Param, Context.getSourceManager(), Context.getLangOpts()); + } else { Placeholder = Prototype->getParamType(P).getAsString(Policy); + } if (P == CurrentArg) Result.AddCurrentParameterChunk( Modified: head/contrib/llvm/tools/clang/tools/clang-format/ClangFormat.cpp ============================================================================== --- head/contrib/llvm/tools/clang/tools/clang-format/ClangFormat.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/tools/clang/tools/clang-format/ClangFormat.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -328,7 +328,8 @@ static bool format(StringRef FileName) { } // namespace format } // namespace clang -static void PrintVersion(raw_ostream &OS) { +static void PrintVersion() { + raw_ostream &OS = outs(); OS << clang::getClangToolFullVersion("clang-format") << '\n'; } Modified: head/contrib/llvm/tools/lld/COFF/Config.h ============================================================================== --- head/contrib/llvm/tools/lld/COFF/Config.h Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/tools/lld/COFF/Config.h Sun Jul 30 18:01:34 2017 (r321723) @@ -130,7 +130,7 @@ struct Configuration { std::map Section; // Options for manifest files. - ManifestKind Manifest = SideBySide; + ManifestKind Manifest = No; int ManifestID = 1; StringRef ManifestDependency; bool ManifestUAC = true; Modified: head/contrib/llvm/tools/lld/COFF/Driver.cpp ============================================================================== --- head/contrib/llvm/tools/lld/COFF/Driver.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/tools/lld/COFF/Driver.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -899,18 +899,25 @@ void LinkerDriver::link(ArrayRef ArgsArr for (auto *Arg : Args.filtered(OPT_section)) parseSection(Arg->getValue()); - // Handle /manifest - if (auto *Arg = Args.getLastArg(OPT_manifest_colon)) - parseManifest(Arg->getValue()); + // Handle /manifestdependency. This enables /manifest unless /manifest:no is + // also passed. + if (auto *Arg = Args.getLastArg(OPT_manifestdependency)) { + Config->ManifestDependency = Arg->getValue(); + Config->Manifest = Configuration::SideBySide; + } + // Handle /manifest and /manifest: + if (auto *Arg = Args.getLastArg(OPT_manifest, OPT_manifest_colon)) { + if (Arg->getOption().getID() == OPT_manifest) + Config->Manifest = Configuration::SideBySide; + else + parseManifest(Arg->getValue()); + } + // Handle /manifestuac if (auto *Arg = Args.getLastArg(OPT_manifestuac)) parseManifestUAC(Arg->getValue()); - // Handle /manifestdependency - if (auto *Arg = Args.getLastArg(OPT_manifestdependency)) - Config->ManifestDependency = Arg->getValue(); - // Handle /manifestfile if (auto *Arg = Args.getLastArg(OPT_manifestfile)) Config->ManifestFile = Arg->getValue(); @@ -918,6 +925,11 @@ void LinkerDriver::link(ArrayRef ArgsArr // Handle /manifestinput for (auto *Arg : Args.filtered(OPT_manifestinput)) Config->ManifestInput.push_back(Arg->getValue()); + + if (!Config->ManifestInput.empty() && + Config->Manifest != Configuration::Embed) { + fatal("/MANIFESTINPUT: requires /MANIFEST:EMBED"); + } // Handle miscellaneous boolean flags. if (Args.hasArg(OPT_allowisolation_no)) Modified: head/contrib/llvm/tools/lld/ELF/InputFiles.cpp ============================================================================== --- head/contrib/llvm/tools/lld/ELF/InputFiles.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/tools/lld/ELF/InputFiles.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -91,8 +91,7 @@ template void elf::ObjectFile::init template Optional elf::ObjectFile::getDILineInfo(InputSectionBase *S, uint64_t Offset) { - if (!DwarfLine) - initializeDwarfLine(); + llvm::call_once(InitDwarfLine, [this]() { initializeDwarfLine(); }); // The offset to CU is 0. const DWARFDebugLine::LineTable *Tbl = DwarfLine->getLineTable(0); Modified: head/contrib/llvm/tools/lld/ELF/InputFiles.h ============================================================================== --- head/contrib/llvm/tools/lld/ELF/InputFiles.h Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/tools/lld/ELF/InputFiles.h Sun Jul 30 18:01:34 2017 (r321723) @@ -24,6 +24,7 @@ #include "llvm/Object/Archive.h" #include "llvm/Object/ELF.h" #include "llvm/Object/IRObjectFile.h" +#include "llvm/Support/Threading.h" #include @@ -211,6 +212,7 @@ template class ObjectFile : public ELFFil // single object file, so we cache debugging information in order to // parse it only once for each object file we link. std::unique_ptr DwarfLine; + llvm::once_flag InitDwarfLine; }; // LazyObjectFile is analogous to ArchiveFile in the sense that Modified: head/contrib/llvm/tools/lld/ELF/SymbolTable.cpp ============================================================================== --- head/contrib/llvm/tools/lld/ELF/SymbolTable.cpp Sun Jul 30 16:45:28 2017 (r321722) +++ head/contrib/llvm/tools/lld/ELF/SymbolTable.cpp Sun Jul 30 18:01:34 2017 (r321723) @@ -211,6 +211,12 @@ static uint8_t getMinVisibility(uint8_t VA, uint8_t VB // Find an existing symbol or create and insert a new one. template std::pair SymbolTable::insert(StringRef Name) { + // @@ means the symbol is the default version. In that + // case @@ will be used to resolve references to . + size_t Pos = Name.find("@@"); + if (Pos != StringRef::npos) + Name = Name.take_front(Pos); + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sun Jul 30 18:46:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D239DC01DB; Sun, 30 Jul 2017 18:46:39 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 630A67D490; Sun, 30 Jul 2017 18:46:39 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6UIkcFY089516; Sun, 30 Jul 2017 18:46:38 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6UIkcnx089514; Sun, 30 Jul 2017 18:46:38 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707301846.v6UIkcnx089514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 30 Jul 2017 18:46:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321726 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 321726 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 18:46:39 -0000 Author: ian Date: Sun Jul 30 18:46:38 2017 New Revision: 321726 URL: https://svnweb.freebsd.org/changeset/base/321726 Log: Bugfixes and enhancements... Don't enable the oscillator when it is found to be stopped at init time, just let the first setting of valid time start it. But still report a dead battery if it's stopped at init time. Don't force the chip into 24hr mode, just cope with whatever mode it is already in. Align the RTC clock to top of second when setting it. Modified: head/sys/dev/iicbus/ds1307.c head/sys/dev/iicbus/ds1307reg.h Modified: head/sys/dev/iicbus/ds1307.c ============================================================================== --- head/sys/dev/iicbus/ds1307.c Sun Jul 30 18:38:05 2017 (r321725) +++ head/sys/dev/iicbus/ds1307.c Sun Jul 30 18:46:38 2017 (r321726) @@ -56,20 +56,20 @@ __FBSDID("$FreeBSD$"); struct ds1307_softc { device_t sc_dev; - int sc_year0; - struct intr_config_hook enum_hook; - uint16_t sc_addr; /* DS1307 slave address. */ + struct intr_config_hook + enum_hook; uint8_t sc_ctrl; - int sc_mcp7941x; + bool sc_mcp7941x; + bool sc_use_ampm; }; static void ds1307_start(void *); #ifdef FDT static const struct ofw_compat_data ds1307_compat_data[] = { - {"dallas,ds1307", (uintptr_t)"Maxim DS1307 RTC"}, - {"maxim,ds1307", (uintptr_t)"Maxim DS1307 RTC"}, - {"microchip,mcp7941x", (uintptr_t)"Microchip MCP7941x RTC"}, + {"dallas,ds1307", (uintptr_t)"Dallas DS1307 RTC"}, + {"maxim,ds1307", (uintptr_t)"Maxim DS1307 RTC"}, + {"microchip,mcp7941x", (uintptr_t)"Microchip MCP7941x RTC"}, { NULL, 0 } }; #endif @@ -118,48 +118,6 @@ ds1307_ctrl_write(struct ds1307_softc *sc) } static int -ds1307_osc_enable(struct ds1307_softc *sc) -{ - int error; - uint8_t secs; - - error = ds1307_read1(sc->sc_dev, DS1307_SECS, &secs); - if (error) { - device_printf(sc->sc_dev, "cannot read from RTC.\n"); - return (error); - } - /* Check if the oscillator is disabled. */ - if ((secs & DS1307_SECS_CH) == 0) - return (0); - device_printf(sc->sc_dev, "clock was halted, check the battery.\n"); - secs &= DS1307_SECS_MASK; - error = ds1307_write1(sc->sc_dev, DS1307_SECS, secs); - if (error != 0) - device_printf(sc->sc_dev, "cannot write to RTC.\n"); - - return (error); -} - -static int -ds1307_set_24hrs_mode(struct ds1307_softc *sc) -{ - int error; - uint8_t hour; - - error = ds1307_read1(sc->sc_dev, DS1307_HOUR, &hour); - if (error) { - device_printf(sc->sc_dev, "cannot read from RTC.\n"); - return (error); - } - hour &= DS1307_HOUR_MASK; - error = ds1307_write1(sc->sc_dev, DS1307_HOUR, hour); - if (error != 0) - device_printf(sc->sc_dev, "cannot write to RTC.\n"); - - return (error); -} - -static int ds1307_sqwe_sysctl(SYSCTL_HANDLER_ARGS) { int sqwe, error, newv, sqwe_bit; @@ -268,7 +226,7 @@ ds1307_probe(device_t dev) #else device_set_desc(dev, "Maxim DS1307 RTC"); - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_NOWILDCARD); #endif } @@ -279,8 +237,6 @@ ds1307_attach(device_t dev) sc = device_get_softc(dev); sc->sc_dev = dev; - sc->sc_addr = iicbus_get_addr(dev); - sc->sc_year0 = 1900; sc->enum_hook.ich_func = ds1307_start; sc->enum_hook.ich_arg = dev; @@ -307,6 +263,7 @@ ds1307_start(void *xdev) struct sysctl_ctx_list *ctx; struct sysctl_oid *tree_node; struct sysctl_oid_list *tree; + uint8_t secs; dev = (device_t)xdev; sc = device_get_softc(dev); @@ -315,12 +272,16 @@ ds1307_start(void *xdev) tree = SYSCTL_CHILDREN(tree_node); config_intrhook_disestablish(&sc->enum_hook); - /* Set the 24 hours mode. */ - if (ds1307_set_24hrs_mode(sc) != 0) + + /* Check if the oscillator is disabled. */ + if (ds1307_read1(sc->sc_dev, DS1307_SECS, &secs) != 0) { + device_printf(sc->sc_dev, "cannot read from RTC.\n"); return; - /* Enable the oscillator if halted. */ - if (ds1307_osc_enable(sc) != 0) - return; + } + if ((secs & DS1307_SECS_CH) != 0) { + device_printf(sc->sc_dev, + "WARNING: RTC clock stopped, check the battery.\n"); + } /* Configuration parameters. */ SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "sqwe", @@ -334,8 +295,8 @@ ds1307_start(void *xdev) CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_MPSAFE, sc, 0, ds1307_sqw_out_sysctl, "IU", "DS1307 square-wave output state"); - /* 1 second resolution. */ - clock_register(dev, 1000000); + /* Register as a clock with 1 second resolution. */ + clock_register_flags(dev, 1000000, CLOCKF_SETTIME_NO_TS); } static int @@ -344,7 +305,7 @@ ds1307_gettime(device_t dev, struct timespec *ts) int error; struct clocktime ct; struct ds1307_softc *sc; - uint8_t data[7]; + uint8_t data[7], hourmask; sc = device_get_softc(dev); error = iicdev_readfrom(sc->sc_dev, DS1307_SECS, data, sizeof(data), @@ -353,32 +314,72 @@ ds1307_gettime(device_t dev, struct timespec *ts) device_printf(dev, "cannot read from RTC.\n"); return (error); } + + /* If chip is in AM/PM mode remember that. */ + if (data[DS1307_HOUR] & DS1307_HOUR_USE_AMPM) { + sc->sc_use_ampm = true; + hourmask = DS1307_HOUR_MASK_12HR; + } else + hourmask = DS1307_HOUR_MASK_24HR; + ct.nsec = 0; - ct.sec = FROMBCD(data[DS1307_SECS] & DS1307_SECS_MASK); - ct.min = FROMBCD(data[DS1307_MINS] & DS1307_MINS_MASK); - ct.hour = FROMBCD(data[DS1307_HOUR] & DS1307_HOUR_MASK); - ct.day = FROMBCD(data[DS1307_DATE] & DS1307_DATE_MASK); - ct.dow = data[DS1307_WEEKDAY] & DS1307_WEEKDAY_MASK; - ct.mon = FROMBCD(data[DS1307_MONTH] & DS1307_MONTH_MASK); - ct.year = FROMBCD(data[DS1307_YEAR] & DS1307_YEAR_MASK); + ct.sec = FROMBCD(data[DS1307_SECS] & DS1307_SECS_MASK); + ct.min = FROMBCD(data[DS1307_MINS] & DS1307_MINS_MASK); + ct.hour = FROMBCD(data[DS1307_HOUR] & hourmask); + ct.day = FROMBCD(data[DS1307_DATE] & DS1307_DATE_MASK); + ct.mon = FROMBCD(data[DS1307_MONTH] & DS1307_MONTH_MASK); + ct.year = FROMBCD(data[DS1307_YEAR] & DS1307_YEAR_MASK); + if (sc->sc_use_ampm) { + if (ct.hour == 12) + ct.hour = 0; + if (data[DS1307_HOUR] & DS1307_HOUR_IS_PM) + ct.hour += 12; + } + return (clock_ct_to_ts(&ct, ts)); } static int ds1307_settime(device_t dev, struct timespec *ts) { - int error; struct clocktime ct; struct ds1307_softc *sc; + long waitns; + int error; uint8_t data[7]; + uint8_t pmflags; sc = device_get_softc(dev); + + /* Sleep until 1ms into the second, to align RTC's second to ours. */ + getnanotime(ts); + waitns = 1000000 - ts->tv_nsec; + if (waitns < 0) + waitns += 1000000000; + pause_sbt("set1307", nstosbt(waitns), 0, C_PREL(31)); + + /* Grab a fresh post-sleep idea of the time. */ + getnanotime(ts); + ts->tv_sec -= utc_offset(); ts->tv_nsec = 0; clock_ts_to_ct(ts, &ct); + + /* If the chip is in AM/PM mode, adjust hour and set flags as needed. */ + if (sc->sc_use_ampm) { + pmflags = DS1307_HOUR_USE_AMPM; + if (ct.hour >= 12) { + ct.hour -= 12; + pmflags |= DS1307_HOUR_IS_PM; + } + if (ct.hour == 0) + ct.hour = 12; + } else + pmflags = 0; + data[DS1307_SECS] = TOBCD(ct.sec); data[DS1307_MINS] = TOBCD(ct.min); - data[DS1307_HOUR] = TOBCD(ct.hour); + data[DS1307_HOUR] = TOBCD(ct.hour) | pmflags; data[DS1307_DATE] = TOBCD(ct.day); data[DS1307_WEEKDAY] = ct.dow; data[DS1307_MONTH] = TOBCD(ct.mon); Modified: head/sys/dev/iicbus/ds1307reg.h ============================================================================== --- head/sys/dev/iicbus/ds1307reg.h Sun Jul 30 18:38:05 2017 (r321725) +++ head/sys/dev/iicbus/ds1307reg.h Sun Jul 30 18:46:38 2017 (r321726) @@ -39,7 +39,10 @@ #define DS1307_MINS 0x01 #define DS1307_MINS_MASK 0x7f #define DS1307_HOUR 0x02 -#define DS1307_HOUR_MASK 0x3f +#define DS1307_HOUR_MASK_12HR 0x1f +#define DS1307_HOUR_MASK_24HR 0x3f +#define DS1307_HOUR_IS_PM 0x20 +#define DS1307_HOUR_USE_AMPM 0x40 #define DS1307_WEEKDAY 0x03 #define DS1307_WEEKDAY_MASK 0x07 #define DS1307_DATE 0x04 From owner-svn-src-head@freebsd.org Sun Jul 30 19:58:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F69ADC1149; Sun, 30 Jul 2017 19:58:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BB5C7EDBA; Sun, 30 Jul 2017 19:58:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6UJwVaV018163; Sun, 30 Jul 2017 19:58:31 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6UJwVKo018162; Sun, 30 Jul 2017 19:58:31 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707301958.v6UJwVKo018162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 30 Jul 2017 19:58:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321727 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 321727 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 19:58:32 -0000 Author: ian Date: Sun Jul 30 19:58:31 2017 New Revision: 321727 URL: https://svnweb.freebsd.org/changeset/base/321727 Log: Fix AM/PM mode handling. The bits to mask off in the hours register changes between 12/24 hour mode. Also fix conversion between 12 and 24 hour mode. It's not as easy as adding/subtracting 12, because the clock doesn't roll over 11->0, it rolls over 12->1; 0 isn't a valid hour in AM/PM mode. Modified: head/sys/dev/iicbus/nxprtc.c Modified: head/sys/dev/iicbus/nxprtc.c ============================================================================== --- head/sys/dev/iicbus/nxprtc.c Sun Jul 30 18:46:38 2017 (r321726) +++ head/sys/dev/iicbus/nxprtc.c Sun Jul 30 19:58:31 2017 (r321727) @@ -83,7 +83,8 @@ __FBSDID("$FreeBSD$"); #define PCF85xx_M_SECOND 0x7f /* Masks for all BCD time regs... */ #define PCF85xx_M_MINUTE 0x7f -#define PCF85xx_M_HOUR 0x3f +#define PCF85xx_M_12HOUR 0x1f +#define PCF85xx_M_24HOUR 0x3f #define PCF85xx_M_DAY 0x3f #define PCF85xx_M_MONTH 0x1f #define PCF85xx_M_YEAR 0xff @@ -525,7 +526,7 @@ nxprtc_gettime(device_t dev, struct timespec *ts) struct time_regs tregs; struct nxprtc_softc *sc; int err; - uint8_t cs1, tmrcount; + uint8_t cs1, hourmask, tmrcount; sc = device_get_softc(dev); @@ -548,10 +549,15 @@ nxprtc_gettime(device_t dev, struct timespec *ts) return (EINVAL); /* hardware is good, time is not. */ } + if (sc->flags & SC_F_AMPM) + hourmask = PCF85xx_M_12HOUR; + else + hourmask = PCF85xx_M_24HOUR; + ct.nsec = ((uint64_t)tmrcount * 1000000000) / TMR_TICKS_SEC; ct.sec = FROMBCD(tregs.sec & PCF85xx_M_SECOND); ct.min = FROMBCD(tregs.min & PCF85xx_M_MINUTE); - ct.hour = FROMBCD(tregs.hour & PCF85xx_M_HOUR); + ct.hour = FROMBCD(tregs.hour & hourmask); ct.day = FROMBCD(tregs.day & PCF85xx_M_DAY); ct.mon = FROMBCD(tregs.month & PCF85xx_M_MONTH); ct.year = FROMBCD(tregs.year & PCF85xx_M_YEAR); @@ -574,8 +580,12 @@ nxprtc_gettime(device_t dev, struct timespec *ts) } /* If this chip is running in 12-hour/AMPM mode, deal with it. */ - if ((sc->flags & SC_F_AMPM) && (tregs.hour & PCF8523_B_HOUR_PM)) - ct.hour += 12; + if (sc->flags & SC_F_AMPM) { + if (ct.hour == 12) + ct.hour = 0; + if (tregs.hour & PCF8523_B_HOUR_PM) + ct.hour += 12; + } err = clock_ct_to_ts(&ct, ts); ts->tv_sec += utc_offset(); @@ -628,9 +638,13 @@ nxprtc_settime(device_t dev, struct timespec *ts) /* If the chip is in AMPM mode deal with the PM flag. */ pmflag = 0; - if ((sc->flags & SC_F_AMPM) && ct.hour > 12) { - ct.hour -= 12; - pmflag = PCF8523_B_HOUR_PM; + if (sc->flags & SC_F_AMPM) { + if (ct.hour >= 12) { + ct.hour -= 12; + pmflag = PCF8523_B_HOUR_PM; + } + if (ct.hour == 0) + ct.hour = 12; } /* On 8563 set the century based on the polarity seen when reading. */ From owner-svn-src-head@freebsd.org Sun Jul 30 21:24:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58CF0DC29CF; Sun, 30 Jul 2017 21:24:22 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3202A8144E; Sun, 30 Jul 2017 21:24:22 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6ULOLKd054089; Sun, 30 Jul 2017 21:24:21 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6ULOKVf054084; Sun, 30 Jul 2017 21:24:20 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201707302124.v6ULOKVf054084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 30 Jul 2017 21:24:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321728 - in head/sys: amd64/linux amd64/linux32 compat/linux i386/linux X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 compat/linux i386/linux X-SVN-Commit-Revision: 321728 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 21:24:22 -0000 Author: dchagin Date: Sun Jul 30 21:24:20 2017 New Revision: 321728 URL: https://svnweb.freebsd.org/changeset/base/321728 Log: Avoid using [LINUX_]SHAREDPAGE constant directly in the vdso code. This is needed for https://reviews.freebsd.org/D11780. Reported by: kib@ Modified: head/sys/amd64/linux/linux_sysvec.c head/sys/amd64/linux32/linux32_sysvec.c head/sys/compat/linux/linux_vdso.c head/sys/compat/linux/linux_vdso.h head/sys/i386/linux/linux_sysvec.c Modified: head/sys/amd64/linux/linux_sysvec.c ============================================================================== --- head/sys/amd64/linux/linux_sysvec.c Sun Jul 30 19:58:31 2017 (r321727) +++ head/sys/amd64/linux/linux_sysvec.c Sun Jul 30 21:24:20 2017 (r321728) @@ -844,14 +844,14 @@ linux_vdso_install(void *param) linux_shared_page_obj = __elfN(linux_shared_page_init) (&linux_shared_page_mapping); - __elfN(linux_vdso_reloc)(&elf_linux_sysvec, SHAREDPAGE); + __elfN(linux_vdso_reloc)(&elf_linux_sysvec); bcopy(elf_linux_sysvec.sv_sigcode, linux_shared_page_mapping, linux_szsigcode); elf_linux_sysvec.sv_shared_page_obj = linux_shared_page_obj; linux_kplatform = linux_shared_page_mapping + - (linux_platform - (caddr_t)SHAREDPAGE); + (linux_platform - (caddr_t)elf_linux_sysvec.sv_shared_page_base); } SYSINIT(elf_linux_vdso_init, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t)linux_vdso_install, NULL); Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Sun Jul 30 19:58:31 2017 (r321727) +++ head/sys/amd64/linux32/linux32_sysvec.c Sun Jul 30 21:24:20 2017 (r321728) @@ -1062,14 +1062,14 @@ linux_vdso_install(void *param) linux_shared_page_obj = __elfN(linux_shared_page_init) (&linux_shared_page_mapping); - __elfN(linux_vdso_reloc)(&elf_linux_sysvec, LINUX32_SHAREDPAGE); + __elfN(linux_vdso_reloc)(&elf_linux_sysvec); bcopy(elf_linux_sysvec.sv_sigcode, linux_shared_page_mapping, linux_szsigcode); elf_linux_sysvec.sv_shared_page_obj = linux_shared_page_obj; linux_kplatform = linux_shared_page_mapping + - (linux_platform - (caddr_t)LINUX32_SHAREDPAGE); + (linux_platform - (caddr_t)elf_linux_sysvec.sv_shared_page_base); } SYSINIT(elf_linux_vdso_init, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t)linux_vdso_install, NULL); Modified: head/sys/compat/linux/linux_vdso.c ============================================================================== --- head/sys/compat/linux/linux_vdso.c Sun Jul 30 19:58:31 2017 (r321727) +++ head/sys/compat/linux/linux_vdso.c Sun Jul 30 21:24:20 2017 (r321728) @@ -139,7 +139,7 @@ __elfN(linux_vdso_fixup)(struct sysentvec *sv) } void -__elfN(linux_vdso_reloc)(struct sysentvec *sv, long vdso_adjust) +__elfN(linux_vdso_reloc)(struct sysentvec *sv) { struct linux_vdso_sym *lsym; Elf_Ehdr *ehdr; @@ -152,13 +152,13 @@ __elfN(linux_vdso_reloc)(struct sysentvec *sv, long vd ehdr = (Elf_Ehdr *) sv->sv_sigcode; /* Adjust our so relative to the sigcode_base */ - if (vdso_adjust != 0) { - ehdr->e_entry += vdso_adjust; + if (sv->sv_shared_page_base != 0) { + ehdr->e_entry += sv->sv_shared_page_base; phdr = (Elf_Phdr *)((caddr_t)ehdr + ehdr->e_phoff); /* phdrs */ for (i = 0; i < ehdr->e_phnum; i++) { - phdr[i].p_vaddr += vdso_adjust; + phdr[i].p_vaddr += sv->sv_shared_page_base; if (phdr[i].p_type != PT_DYNAMIC) continue; dyn = (Elf_Dyn *)((caddr_t)ehdr + phdr[i].p_offset); @@ -178,13 +178,13 @@ __elfN(linux_vdso_reloc)(struct sysentvec *sv, long vd case DT_VERDEF: case DT_VERNEED: case DT_ADDRRNGLO ... DT_ADDRRNGHI: - dyn->d_un.d_ptr += vdso_adjust; + dyn->d_un.d_ptr += sv->sv_shared_page_base; break; case DT_ENCODING ... DT_LOOS-1: case DT_LOOS ... DT_HIOS: if (dyn->d_tag >= DT_ENCODING && (dyn->d_tag & 1) == 0) - dyn->d_un.d_ptr += vdso_adjust; + dyn->d_un.d_ptr += sv->sv_shared_page_base; break; default: break; @@ -197,7 +197,7 @@ __elfN(linux_vdso_reloc)(struct sysentvec *sv, long vd for(i = 0; i < ehdr->e_shnum; i++) { if (!(shdr[i].sh_flags & SHF_ALLOC)) continue; - shdr[i].sh_addr += vdso_adjust; + shdr[i].sh_addr += sv->sv_shared_page_base; if (shdr[i].sh_type != SHT_SYMTAB && shdr[i].sh_type != SHT_DYNSYM) continue; @@ -209,7 +209,7 @@ __elfN(linux_vdso_reloc)(struct sysentvec *sv, long vd if (sym->st_shndx == SHN_UNDEF || sym->st_shndx == SHN_ABS) continue; - sym->st_value += vdso_adjust; + sym->st_value += sv->sv_shared_page_base; } } } Modified: head/sys/compat/linux/linux_vdso.h ============================================================================== --- head/sys/compat/linux/linux_vdso.h Sun Jul 30 19:58:31 2017 (r321727) +++ head/sys/compat/linux/linux_vdso.h Sun Jul 30 21:24:20 2017 (r321728) @@ -41,7 +41,7 @@ struct linux_vdso_sym { vm_object_t __elfN(linux_shared_page_init)(char **); void __elfN(linux_shared_page_fini)(vm_object_t); void __elfN(linux_vdso_fixup)(struct sysentvec *); -void __elfN(linux_vdso_reloc)(struct sysentvec *, long); +void __elfN(linux_vdso_reloc)(struct sysentvec *); void __elfN(linux_vdso_sym_init)(struct linux_vdso_sym *); #define LINUX_VDSO_SYM_INTPTR(name) \ Modified: head/sys/i386/linux/linux_sysvec.c ============================================================================== --- head/sys/i386/linux/linux_sysvec.c Sun Jul 30 19:58:31 2017 (r321727) +++ head/sys/i386/linux/linux_sysvec.c Sun Jul 30 21:24:20 2017 (r321728) @@ -1044,7 +1044,7 @@ linux_vdso_install(void *param) linux_shared_page_obj = __elfN(linux_shared_page_init) (&linux_shared_page_mapping); - __elfN(linux_vdso_reloc)(&elf_linux_sysvec, LINUX_SHAREDPAGE); + __elfN(linux_vdso_reloc)(&elf_linux_sysvec); bcopy(elf_linux_sysvec.sv_sigcode, linux_shared_page_mapping, linux_szsigcode); From owner-svn-src-head@freebsd.org Sun Jul 30 21:50:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50C70DC324F; Sun, 30 Jul 2017 21:50:47 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A8B081DB5; Sun, 30 Jul 2017 21:50:47 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6ULokbk062792; Sun, 30 Jul 2017 21:50:46 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6ULokh6062791; Sun, 30 Jul 2017 21:50:46 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201707302150.v6ULokh6062791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 30 Jul 2017 21:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321729 - head/sys/dev/rtwn/rtl8188e X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/dev/rtwn/rtl8188e X-SVN-Commit-Revision: 321729 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 21:50:47 -0000 Author: avos Date: Sun Jul 30 21:50:45 2017 New Revision: 321729 URL: https://svnweb.freebsd.org/changeset/base/321729 Log: rtwn: drop unnecessary / wrong conversion. The 'chan' field occupies only one byte. Modified: head/sys/dev/rtwn/rtl8188e/r88e_rx.c Modified: head/sys/dev/rtwn/rtl8188e/r88e_rx.c ============================================================================== --- head/sys/dev/rtwn/rtl8188e/r88e_rx.c Sun Jul 30 21:24:20 2017 (r321728) +++ head/sys/dev/rtwn/rtl8188e/r88e_rx.c Sun Jul 30 21:50:45 2017 (r321729) @@ -221,7 +221,7 @@ r88e_get_rx_stats(struct rtwn_softc *sc, struct ieee80 if (!sc->sc_ht40) { /* XXX center channel */ rxs->r_flags |= IEEE80211_R_IEEE | IEEE80211_R_FREQ; - rxs->c_ieee = le16toh(physt->chan); + rxs->c_ieee = physt->chan; rxs->c_freq = ieee80211_ieee2mhz(rxs->c_ieee, IEEE80211_CHAN_2GHZ); } From owner-svn-src-head@freebsd.org Sun Jul 30 21:52:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89DE4DC32D1; Sun, 30 Jul 2017 21:52:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56C9A82111; Sun, 30 Jul 2017 21:52:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6ULqMEG066399; Sun, 30 Jul 2017 21:52:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6ULqMM4066397; Sun, 30 Jul 2017 21:52:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201707302152.v6ULqMM4066397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 30 Jul 2017 21:52:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321730 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 X-SVN-Commit-Revision: 321730 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 21:52:23 -0000 Author: kib Date: Sun Jul 30 21:52:22 2017 New Revision: 321730 URL: https://svnweb.freebsd.org/changeset/base/321730 Log: Remove unused symbols. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/genassym.c head/sys/i386/i386/genassym.c Modified: head/sys/amd64/amd64/genassym.c ============================================================================== --- head/sys/amd64/amd64/genassym.c Sun Jul 30 21:50:45 2017 (r321729) +++ head/sys/amd64/amd64/genassym.c Sun Jul 30 21:52:22 2017 (r321730) @@ -108,12 +108,10 @@ ASSYM(PML4SHIFT, PML4SHIFT); ASSYM(val_KPDPI, KPDPI); ASSYM(val_KPML4I, KPML4I); ASSYM(val_PML4PML4I, PML4PML4I); -ASSYM(USRSTACK, USRSTACK); ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS); ASSYM(KERNBASE, KERNBASE); ASSYM(DMAP_MIN_ADDRESS, DMAP_MIN_ADDRESS); ASSYM(DMAP_MAX_ADDRESS, DMAP_MAX_ADDRESS); -ASSYM(MCLBYTES, MCLBYTES); ASSYM(PCB_R15, offsetof(struct pcb, pcb_r15)); ASSYM(PCB_R14, offsetof(struct pcb, pcb_r14)); Modified: head/sys/i386/i386/genassym.c ============================================================================== --- head/sys/i386/i386/genassym.c Sun Jul 30 21:50:45 2017 (r321729) +++ head/sys/i386/i386/genassym.c Sun Jul 30 21:52:22 2017 (r321730) @@ -112,11 +112,9 @@ ASSYM(PAGE_SHIFT, PAGE_SHIFT); ASSYM(PAGE_MASK, PAGE_MASK); ASSYM(PDRSHIFT, PDRSHIFT); ASSYM(PDRMASK, PDRMASK); -ASSYM(USRSTACK, USRSTACK); ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS); ASSYM(KERNBASE, KERNBASE); ASSYM(KERNLOAD, KERNLOAD); -ASSYM(MCLBYTES, MCLBYTES); ASSYM(PCB_CR0, offsetof(struct pcb, pcb_cr0)); ASSYM(PCB_CR2, offsetof(struct pcb, pcb_cr2)); ASSYM(PCB_CR3, offsetof(struct pcb, pcb_cr3)); From owner-svn-src-head@freebsd.org Sun Jul 30 22:17:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2624DC380D; Sun, 30 Jul 2017 22:17:09 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2DCE82B55; Sun, 30 Jul 2017 22:17:09 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6UMH8lQ074932; Sun, 30 Jul 2017 22:17:08 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6UMH8ff074931; Sun, 30 Jul 2017 22:17:08 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201707302217.v6UMH8ff074931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 30 Jul 2017 22:17:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321732 - head/sys/dev/usb/wlan X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/dev/usb/wlan X-SVN-Commit-Revision: 321732 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 22:17:10 -0000 Author: avos Date: Sun Jul 30 22:17:08 2017 New Revision: 321732 URL: https://svnweb.freebsd.org/changeset/base/321732 Log: zyd: code cleanup + drop unneeded cast. No functional change intended. Modified: head/sys/dev/usb/wlan/if_zyd.c Modified: head/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- head/sys/dev/usb/wlan/if_zyd.c Sun Jul 30 21:57:19 2017 (r321731) +++ head/sys/dev/usb/wlan/if_zyd.c Sun Jul 30 22:17:08 2017 (r321732) @@ -648,11 +648,12 @@ zyd_intr_read_callback(struct usb_xfer *xfer, usb_erro { struct zyd_notif_retry *retry = (struct zyd_notif_retry *)cmd->data; + uint16_t count = le16toh(retry->count); DPRINTF(sc, ZYD_DEBUG_TX_PROC, "retry intr: rate=0x%x addr=%s count=%d (0x%x)\n", le16toh(retry->rate), ether_sprintf(retry->macaddr), - le16toh(retry->count)&0xff, le16toh(retry->count)); + count & 0xff, count); /* * Find the node to which the packet was sent and @@ -664,13 +665,12 @@ zyd_intr_read_callback(struct usb_xfer *xfer, usb_erro if (ni != NULL) { struct ieee80211_ratectl_tx_status *txs = &sc->sc_txs; - int retrycnt = - (int)(le16toh(retry->count) & 0xff); + int retrycnt = count & 0xff; txs->flags = IEEE80211_RATECTL_STATUS_LONG_RETRY; txs->long_retries = retrycnt; - if (le16toh(retry->count) & 0x100) { + if (count & 0x100) { txs->status = IEEE80211_RATECTL_TX_FAIL_LONG; } else { @@ -682,7 +682,7 @@ zyd_intr_read_callback(struct usb_xfer *xfer, usb_erro ieee80211_ratectl_tx_complete(ni, txs); ieee80211_free_node(ni); } - if (le16toh(retry->count) & 0x100) + if (count & 0x100) /* too many retries */ if_inc_counter(vap->iv_ifp, IFCOUNTER_OERRORS, 1); From owner-svn-src-head@freebsd.org Sun Jul 30 22:34:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44349DC3B0A; Sun, 30 Jul 2017 22:34:26 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04D69831F4; Sun, 30 Jul 2017 22:34:25 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6UMYPOC082783; Sun, 30 Jul 2017 22:34:25 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6UMYOQW082775; Sun, 30 Jul 2017 22:34:24 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201707302234.v6UMYOQW082775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sun, 30 Jul 2017 22:34:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321733 - in head/sys/dev: mpr mps X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head/sys/dev: mpr mps X-SVN-Commit-Revision: 321733 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 22:34:26 -0000 Author: scottl Date: Sun Jul 30 22:34:24 2017 New Revision: 321733 URL: https://svnweb.freebsd.org/changeset/base/321733 Log: Change from using underbar function names to normal function names for the informational print functions. Collapse the debug API a bit to be more generic and not require as much code duplication. While here, fix a bug in MPS that was already fixed in MPR. Modified: head/sys/dev/mpr/mpr.c head/sys/dev/mpr/mpr_sas_lsi.c head/sys/dev/mpr/mpr_table.c head/sys/dev/mpr/mpr_table.h head/sys/dev/mps/mps.c head/sys/dev/mps/mps_sas_lsi.c head/sys/dev/mps/mps_table.c head/sys/dev/mps/mps_table.h Modified: head/sys/dev/mpr/mpr.c ============================================================================== --- head/sys/dev/mpr/mpr.c Sun Jul 30 22:17:08 2017 (r321732) +++ head/sys/dev/mpr/mpr.c Sun Jul 30 22:34:24 2017 (r321733) @@ -381,7 +381,7 @@ mpr_iocfacts_allocate(struct mpr_softc *sc, uint8_t at } } - mpr_print_iocfacts(sc, sc->facts); + MPR_DPRINT_PAGE(sc, MPR_XINFO, iocfacts, sc->facts); snprintf(sc->fw_version, sizeof(sc->fw_version), "%02d.%02d.%02d.%02d", @@ -1772,7 +1772,7 @@ mpr_log_evt_handler(struct mpr_softc *sc, uintptr_t da { MPI2_EVENT_DATA_LOG_ENTRY_ADDED *entry; - mpr_print_event(sc, event); + MPR_DPRINT_EVENT(sc, generic, event); switch (event->Event) { case MPI2_EVENT_LOG_DATA: @@ -2187,7 +2187,7 @@ mpr_reregister_events_complete(struct mpr_softc *sc, s mpr_dprint(sc, MPR_TRACE, "%s\n", __func__); if (cm->cm_reply) - mpr_print_event(sc, + MPR_DPRINT_EVENT(sc, generic, (MPI2_EVENT_NOTIFICATION_REPLY *)cm->cm_reply); mpr_free_command(sc, cm); @@ -2270,7 +2270,7 @@ mpr_update_events(struct mpr_softc *sc, struct mpr_eve error = ENXIO; if (reply) - mpr_print_event(sc, reply); + MPR_DPRINT_EVENT(sc, generic, reply); mpr_dprint(sc, MPR_TRACE, "%s finished error %d\n", __func__, error); Modified: head/sys/dev/mpr/mpr_sas_lsi.c ============================================================================== --- head/sys/dev/mpr/mpr_sas_lsi.c Sun Jul 30 22:17:08 2017 (r321732) +++ head/sys/dev/mpr/mpr_sas_lsi.c Sun Jul 30 22:34:24 2017 (r321733) @@ -139,7 +139,7 @@ mprsas_evt_handler(struct mpr_softc *sc, uintptr_t dat u16 sz; mpr_dprint(sc, MPR_TRACE, "%s\n", __func__); - mpr_print_evt_sas(sc, event); + MPR_DPRINT_EVENT(sc, sas, event); mprsas_record_event(sc, event); fw_event = malloc(sizeof(struct mpr_fw_event_work), M_MPR, Modified: head/sys/dev/mpr/mpr_table.c ============================================================================== --- head/sys/dev/mpr/mpr_table.c Sun Jul 30 22:17:08 2017 (r321732) +++ head/sys/dev/mpr/mpr_table.c Sun Jul 30 22:34:24 2017 (r321733) @@ -219,7 +219,7 @@ mpr_describe_devinfo(uint32_t devinfo, char *string, i } void -_mpr_print_iocfacts(struct mpr_softc *sc, MPI2_IOC_FACTS_REPLY *facts) +mpr_print_iocfacts(struct mpr_softc *sc, MPI2_IOC_FACTS_REPLY *facts) { MPR_PRINTFIELD_START(sc, "IOCFacts"); MPR_PRINTFIELD(sc, facts, MsgVersion, 0x%x); @@ -259,7 +259,7 @@ _mpr_print_iocfacts(struct mpr_softc *sc, MPI2_IOC_FAC } void -_mpr_print_portfacts(struct mpr_softc *sc, MPI2_PORT_FACTS_REPLY *facts) +mpr_print_portfacts(struct mpr_softc *sc, MPI2_PORT_FACTS_REPLY *facts) { MPR_PRINTFIELD_START(sc, "PortFacts"); @@ -269,7 +269,7 @@ _mpr_print_portfacts(struct mpr_softc *sc, MPI2_PORT_F } void -_mpr_print_event(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) +mpr_print_evt_generic(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) { MPR_PRINTFIELD_START(sc, "EventReply"); @@ -281,7 +281,7 @@ _mpr_print_event(struct mpr_softc *sc, MPI2_EVENT_NOTI } void -_mpr_print_sasdev0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_DEV_0 *buf) +mpr_print_sasdev0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_DEV_0 *buf) { MPR_PRINTFIELD_START(sc, "SAS Device Page 0"); MPR_PRINTFIELD(sc, buf, Slot, %d); @@ -310,10 +310,10 @@ _mpr_print_sasdev0(struct mpr_softc *sc, MPI2_CONFIG_P } void -_mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) +mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) { - _mpr_print_event(sc, event); + mpr_print_evt_generic(sc, event); switch(event->Event) { case MPI2_EVENT_SAS_DISCOVERY: @@ -407,7 +407,7 @@ _mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NO } void -_mpr_print_expander1(struct mpr_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) +mpr_print_expander1(struct mpr_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) { MPR_PRINTFIELD_START(sc, "SAS Expander Page 1 #%d", buf->Phy); MPR_PRINTFIELD(sc, buf, PhysicalPort, %d); @@ -447,7 +447,7 @@ _mpr_print_expander1(struct mpr_softc *sc, MPI2_CONFIG } void -_mpr_print_sasphy0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) +mpr_print_sasphy0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) { MPR_PRINTFIELD_START(sc, "SAS PHY Page 0"); MPR_PRINTFIELD(sc, buf, OwnerDevHandle, 0x%04x); Modified: head/sys/dev/mpr/mpr_table.h ============================================================================== --- head/sys/dev/mpr/mpr_table.h Sun Jul 30 22:17:08 2017 (r321732) +++ head/sys/dev/mpr/mpr_table.h Sun Jul 30 22:34:24 2017 (r321733) @@ -42,63 +42,22 @@ extern struct mpr_table_lookup mpr_phystatus_names[]; extern struct mpr_table_lookup mpr_linkrate_names[]; extern struct mpr_table_lookup mpr_pcie_linkrate_names[]; -void _mpr_print_iocfacts(struct mpr_softc *, MPI2_IOC_FACTS_REPLY *); -void _mpr_print_portfacts(struct mpr_softc *, MPI2_PORT_FACTS_REPLY *); -void _mpr_print_event(struct mpr_softc *, MPI2_EVENT_NOTIFICATION_REPLY *); -void _mpr_print_sasdev0(struct mpr_softc *, MPI2_CONFIG_PAGE_SAS_DEV_0 *); -void _mpr_print_evt_sas(struct mpr_softc *, MPI2_EVENT_NOTIFICATION_REPLY *); -void _mpr_print_expander1(struct mpr_softc *, MPI2_CONFIG_PAGE_EXPANDER_1 *); -void _mpr_print_sasphy0(struct mpr_softc *, MPI2_CONFIG_PAGE_SAS_PHY_0 *); +void mpr_print_iocfacts(struct mpr_softc *, MPI2_IOC_FACTS_REPLY *); +void mpr_print_portfacts(struct mpr_softc *, MPI2_PORT_FACTS_REPLY *); +void mpr_print_evt_generic(struct mpr_softc *, MPI2_EVENT_NOTIFICATION_REPLY *); +void mpr_print_sasdev0(struct mpr_softc *, MPI2_CONFIG_PAGE_SAS_DEV_0 *); +void mpr_print_evt_sas(struct mpr_softc *, MPI2_EVENT_NOTIFICATION_REPLY *); +void mpr_print_expander1(struct mpr_softc *, MPI2_CONFIG_PAGE_EXPANDER_1 *); +void mpr_print_sasphy0(struct mpr_softc *, MPI2_CONFIG_PAGE_SAS_PHY_0 *); void mpr_print_sgl(struct mpr_softc *, struct mpr_command *, int); void mpr_print_scsiio_cmd(struct mpr_softc *, struct mpr_command *); -static __inline void -mpr_print_iocfacts(struct mpr_softc *sc, MPI2_IOC_FACTS_REPLY *facts) -{ - if (sc->mpr_debug & MPR_XINFO) - _mpr_print_iocfacts(sc, facts); -} +#define MPR_DPRINT_PAGE(sc, level, func, buf) \ +do { \ + if ((sc)->mpr_debug & level) \ + mpr_print_##func((sc), buf); \ +} while (0) -static __inline void -mpr_print_portfacts(struct mpr_softc *sc, MPI2_PORT_FACTS_REPLY *facts) -{ - if (sc->mpr_debug & MPR_XINFO) - _mpr_print_portfacts(sc, facts); -} - -static __inline void -mpr_print_event(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) -{ - if (sc->mpr_debug & MPR_EVENT) - _mpr_print_event(sc, event); -} - -static __inline void -mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) -{ - if (sc->mpr_debug & MPR_EVENT) - _mpr_print_evt_sas(sc, event); -} - -static __inline void -mpr_print_sasdev0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_DEV_0 *buf) -{ - if (sc->mpr_debug & MPR_XINFO) - _mpr_print_sasdev0(sc, buf); -} - -static __inline void -mpr_print_expander1(struct mpr_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) -{ - if (sc->mpr_debug & MPR_XINFO) - _mpr_print_expander1(sc, buf); -} - -static __inline void -mpr_print_sasphy0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) -{ - if (sc->mpr_debug & MPR_XINFO) - _mpr_print_sasphy0(sc, buf); -} - +#define MPR_DPRINT_EVENT(sc, func, buf) \ + MPR_DPRINT_PAGE(sc, MPR_EVENT, evt_##func, buf) #endif Modified: head/sys/dev/mps/mps.c ============================================================================== --- head/sys/dev/mps/mps.c Sun Jul 30 22:17:08 2017 (r321732) +++ head/sys/dev/mps/mps.c Sun Jul 30 22:34:24 2017 (r321733) @@ -373,7 +373,7 @@ mps_iocfacts_allocate(struct mps_softc *sc, uint8_t at } } - mps_print_iocfacts(sc, sc->facts); + MPS_DPRINT_PAGE(sc, MPS_XINFO, iocfacts, sc->facts); snprintf(sc->fw_version, sizeof(sc->fw_version), "%02d.%02d.%02d.%02d", @@ -1623,7 +1623,7 @@ mps_log_evt_handler(struct mps_softc *sc, uintptr_t da { MPI2_EVENT_DATA_LOG_ENTRY_ADDED *entry; - mps_print_event(sc, event); + MPS_DPRINT_EVENT(sc, generic, event); switch (event->Event) { case MPI2_EVENT_LOG_DATA: @@ -2033,7 +2033,7 @@ mps_reregister_events_complete(struct mps_softc *sc, s mps_dprint(sc, MPS_TRACE, "%s\n", __func__); if (cm->cm_reply) - mps_print_event(sc, + MPS_DPRINT_EVENT(sc, generic, (MPI2_EVENT_NOTIFICATION_REPLY *)cm->cm_reply); mps_free_command(sc, cm); @@ -2118,7 +2118,10 @@ mps_update_events(struct mps_softc *sc, struct mps_eve if ((reply == NULL) || (reply->IOCStatus & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) error = ENXIO; - mps_print_event(sc, reply); + + if (reply) + MPS_DPRINT_EVENT(sc, generic, reply); + mps_dprint(sc, MPS_TRACE, "%s finished error %d\n", __func__, error); mps_free_command(sc, cm); Modified: head/sys/dev/mps/mps_sas_lsi.c ============================================================================== --- head/sys/dev/mps/mps_sas_lsi.c Sun Jul 30 22:17:08 2017 (r321732) +++ head/sys/dev/mps/mps_sas_lsi.c Sun Jul 30 22:34:24 2017 (r321733) @@ -136,7 +136,7 @@ mpssas_evt_handler(struct mps_softc *sc, uintptr_t dat u16 sz; mps_dprint(sc, MPS_TRACE, "%s\n", __func__); - mps_print_evt_sas(sc, event); + MPS_DPRINT_EVENT(sc, sas, event); mpssas_record_event(sc, event); fw_event = malloc(sizeof(struct mps_fw_event_work), M_MPT2, Modified: head/sys/dev/mps/mps_table.c ============================================================================== --- head/sys/dev/mps/mps_table.c Sun Jul 30 22:17:08 2017 (r321732) +++ head/sys/dev/mps/mps_table.c Sun Jul 30 22:34:24 2017 (r321733) @@ -196,7 +196,7 @@ mps_describe_devinfo(uint32_t devinfo, char *string, i } void -_mps_print_iocfacts(struct mps_softc *sc, MPI2_IOC_FACTS_REPLY *facts) +mps_print_iocfacts(struct mps_softc *sc, MPI2_IOC_FACTS_REPLY *facts) { MPS_PRINTFIELD_START(sc, "IOCFacts"); @@ -237,7 +237,7 @@ _mps_print_iocfacts(struct mps_softc *sc, MPI2_IOC_FAC } void -_mps_print_portfacts(struct mps_softc *sc, MPI2_PORT_FACTS_REPLY *facts) +mps_print_portfacts(struct mps_softc *sc, MPI2_PORT_FACTS_REPLY *facts) { MPS_PRINTFIELD_START(sc, "PortFacts"); @@ -247,7 +247,7 @@ _mps_print_portfacts(struct mps_softc *sc, MPI2_PORT_F } void -_mps_print_event(struct mps_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) +mps_print_evt_generic(struct mps_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) { MPS_PRINTFIELD_START(sc, "EventReply"); @@ -259,7 +259,7 @@ _mps_print_event(struct mps_softc *sc, MPI2_EVENT_NOTI } void -_mps_print_sasdev0(struct mps_softc *sc, MPI2_CONFIG_PAGE_SAS_DEV_0 *buf) +mps_print_sasdev0(struct mps_softc *sc, MPI2_CONFIG_PAGE_SAS_DEV_0 *buf) { MPS_PRINTFIELD_START(sc, "SAS Device Page 0"); MPS_PRINTFIELD(sc, buf, Slot, %d); @@ -288,10 +288,10 @@ _mps_print_sasdev0(struct mps_softc *sc, MPI2_CONFIG_P } void -_mps_print_evt_sas(struct mps_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) +mps_print_evt_sas(struct mps_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) { - _mps_print_event(sc, event); + mps_print_evt_generic(sc, event); switch(event->Event) { case MPI2_EVENT_SAS_DISCOVERY: @@ -384,7 +384,7 @@ _mps_print_evt_sas(struct mps_softc *sc, MPI2_EVENT_NO } void -_mps_print_expander1(struct mps_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) +mps_print_expander1(struct mps_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) { MPS_PRINTFIELD_START(sc, "SAS Expander Page 1 #%d", buf->Phy); MPS_PRINTFIELD(sc, buf, PhysicalPort, %d); @@ -424,7 +424,7 @@ _mps_print_expander1(struct mps_softc *sc, MPI2_CONFIG } void -_mps_print_sasphy0(struct mps_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) +mps_print_sasphy0(struct mps_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) { MPS_PRINTFIELD_START(sc, "SAS PHY Page 0"); MPS_PRINTFIELD(sc, buf, OwnerDevHandle, 0x%04x); Modified: head/sys/dev/mps/mps_table.h ============================================================================== --- head/sys/dev/mps/mps_table.h Sun Jul 30 22:17:08 2017 (r321732) +++ head/sys/dev/mps/mps_table.h Sun Jul 30 22:34:24 2017 (r321733) @@ -41,63 +41,23 @@ extern struct mps_table_lookup mps_event_names[]; extern struct mps_table_lookup mps_phystatus_names[]; extern struct mps_table_lookup mps_linkrate_names[]; -void _mps_print_iocfacts(struct mps_softc *, MPI2_IOC_FACTS_REPLY *); -void _mps_print_portfacts(struct mps_softc *, MPI2_PORT_FACTS_REPLY *); -void _mps_print_event(struct mps_softc *, MPI2_EVENT_NOTIFICATION_REPLY *); -void _mps_print_sasdev0(struct mps_softc *, MPI2_CONFIG_PAGE_SAS_DEV_0 *); -void _mps_print_evt_sas(struct mps_softc *, MPI2_EVENT_NOTIFICATION_REPLY *); -void _mps_print_expander1(struct mps_softc *, MPI2_CONFIG_PAGE_EXPANDER_1 *); -void _mps_print_sasphy0(struct mps_softc *, MPI2_CONFIG_PAGE_SAS_PHY_0 *); +void mps_print_iocfacts(struct mps_softc *, MPI2_IOC_FACTS_REPLY *); +void mps_print_portfacts(struct mps_softc *, MPI2_PORT_FACTS_REPLY *); +void mps_print_evt_generic(struct mps_softc *, MPI2_EVENT_NOTIFICATION_REPLY *); +void mps_print_sasdev0(struct mps_softc *, MPI2_CONFIG_PAGE_SAS_DEV_0 *); +void mps_print_evt_sas(struct mps_softc *, MPI2_EVENT_NOTIFICATION_REPLY *); +void mps_print_expander1(struct mps_softc *, MPI2_CONFIG_PAGE_EXPANDER_1 *); +void mps_print_sasphy0(struct mps_softc *, MPI2_CONFIG_PAGE_SAS_PHY_0 *); void mps_print_sgl(struct mps_softc *, struct mps_command *, int); void mps_print_scsiio_cmd(struct mps_softc *, struct mps_command *); -static __inline void -mps_print_iocfacts(struct mps_softc *sc, MPI2_IOC_FACTS_REPLY *facts) -{ - if (sc->mps_debug & MPS_XINFO) - _mps_print_iocfacts(sc, facts); -} +#define MPS_DPRINT_PAGE(sc, level, func, buf) \ +do { \ + if ((sc)->mps_debug & level) \ + mps_print_##func((sc), buf); \ +} while (0) -static __inline void -mps_print_portfacts(struct mps_softc *sc, MPI2_PORT_FACTS_REPLY *facts) -{ - if (sc->mps_debug & MPS_XINFO) - _mps_print_portfacts(sc, facts); -} - -static __inline void -mps_print_event(struct mps_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) -{ - if (sc->mps_debug & MPS_EVENT) - _mps_print_event(sc, event); -} - -static __inline void -mps_print_sasdev0(struct mps_softc *sc, MPI2_CONFIG_PAGE_SAS_DEV_0 *buf) -{ - if (sc->mps_debug & MPS_XINFO) - _mps_print_sasdev0(sc, buf); -} - -static __inline void -mps_print_evt_sas(struct mps_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) -{ - if (sc->mps_debug & MPS_EVENT) - _mps_print_evt_sas(sc, event); -} - -static __inline void -mps_print_expander1(struct mps_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) -{ - if (sc->mps_debug & MPS_XINFO) - _mps_print_expander1(sc, buf); -} - -static __inline void -mps_print_sasphy0(struct mps_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) -{ - if (sc->mps_debug & MPS_XINFO) - _mps_print_sasphy0(sc, buf); -} +#define MPS_DPRINT_EVENT(sc, func, buf) \ + MPS_DPRINT_PAGE(sc, MPS_EVENT, evt_##func, buf) #endif From owner-svn-src-head@freebsd.org Sun Jul 30 23:15:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C269CDC449F; Sun, 30 Jul 2017 23:15:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F67E84196; Sun, 30 Jul 2017 23:15:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6UNFUWO099100; Sun, 30 Jul 2017 23:15:30 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6UNFUH4099099; Sun, 30 Jul 2017 23:15:30 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201707302315.v6UNFUH4099099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 30 Jul 2017 23:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321734 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 321734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 23:15:31 -0000 Author: emaste Date: Sun Jul 30 23:15:30 2017 New Revision: 321734 URL: https://svnweb.freebsd.org/changeset/base/321734 Log: bsdinstall: default to UEFI-only boot on arm64 Reviewed by: allanjude Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11721 Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Sun Jul 30 22:34:24 2017 (r321733) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Sun Jul 30 23:15:30 2017 (r321734) @@ -1554,17 +1554,27 @@ f_dprintf "BSDINSTALL_TMPETC=[%s]" "$BSDINSTALL_TMPETC f_dprintf "FSTAB_FMT=[%s]" "$FSTAB_FMT" # -# If the system was booted with UEFI, set the default boot type to UEFI +# Determine default boot type # -bootmethod=$( sysctl -n machdep.bootmethod ) -f_dprintf "machdep.bootmethod=[%s]" "$bootmethod" -if [ "$bootmethod" = "UEFI" ]; then - : ${ZFSBOOT_BOOT_TYPE:=BIOS+UEFI} +case $(uname -m) in +arm64) + # We support only UEFI boot for arm64 + : ${ZFSBOOT_BOOT_TYPE:=UEFI} : ${ZFSBOOT_PARTITION_SCHEME:=GPT} -else - : ${ZFSBOOT_BOOT_TYPE:=BIOS} - : ${ZFSBOOT_PARTITION_SCHEME:=GPT} -fi + ;; +*) + # If the system was booted with UEFI, set the default boot type to UEFI + bootmethod=$( sysctl -n machdep.bootmethod ) + f_dprintf "machdep.bootmethod=[%s]" "$bootmethod" + if [ "$bootmethod" = "UEFI" ]; then + : ${ZFSBOOT_BOOT_TYPE:=BIOS+UEFI} + : ${ZFSBOOT_PARTITION_SCHEME:=GPT} + else + : ${ZFSBOOT_BOOT_TYPE:=BIOS} + : ${ZFSBOOT_PARTITION_SCHEME:=GPT} + fi + ;; +esac # # Loop over the main menu until we've accomplished what we came here to do From owner-svn-src-head@freebsd.org Sun Jul 30 23:35:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A668DC4B11; Sun, 30 Jul 2017 23:35:23 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D192C849F5; Sun, 30 Jul 2017 23:35:22 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6UNZLMX007416; Sun, 30 Jul 2017 23:35:21 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6UNZL7x007411; Sun, 30 Jul 2017 23:35:21 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201707302335.v6UNZL7x007411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 30 Jul 2017 23:35:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321735 - in head/sys/dev/rtwn: . usb X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in head/sys/dev/rtwn: . usb X-SVN-Commit-Revision: 321735 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jul 2017 23:35:23 -0000 Author: avos Date: Sun Jul 30 23:35:21 2017 New Revision: 321735 URL: https://svnweb.freebsd.org/changeset/base/321735 Log: rtwn_usb: add support for fragmented Rx. Since device can pass multiple frames in a single payload temporary Rx buffer was big enough to hold all of them; now the driver can concatenate a single frame from multiple payloads. The Rx buffer size may be configured via tunable (dev.rtwn.%d.rx_buf_size). Tested with: - rtl8188cus, rtl8188eu and rtl8821au (STA mode). - (by kevlo) rtl8192cu and rtl8188eu. PR: 218527 Reviewed by: kevlo Differential Revision: https://reviews.freebsd.org/D11705 Modified: head/sys/dev/rtwn/if_rtwnreg.h head/sys/dev/rtwn/usb/rtwn_usb_attach.c head/sys/dev/rtwn/usb/rtwn_usb_ep.c head/sys/dev/rtwn/usb/rtwn_usb_rx.c head/sys/dev/rtwn/usb/rtwn_usb_var.h Modified: head/sys/dev/rtwn/if_rtwnreg.h ============================================================================== --- head/sys/dev/rtwn/if_rtwnreg.h Sun Jul 30 23:15:30 2017 (r321734) +++ head/sys/dev/rtwn/if_rtwnreg.h Sun Jul 30 23:35:21 2017 (r321735) @@ -18,6 +18,9 @@ * $FreeBSD$ */ +#ifndef IF_RTWNREG_H +#define IF_RTWNREG_H + #define R92C_MIN_TX_PWR 0x00 #define R92C_MAX_TX_PWR 0x3f @@ -165,3 +168,5 @@ rtwn_chan2centieee(const struct ieee80211_channel *c) return (chan); } + +#endif /* IF_RTWNREG_H */ Modified: head/sys/dev/rtwn/usb/rtwn_usb_attach.c ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_attach.c Sun Jul 30 23:15:30 2017 (r321734) +++ head/sys/dev/rtwn/usb/rtwn_usb_attach.c Sun Jul 30 23:35:21 2017 (r321735) @@ -77,12 +77,14 @@ static void rtwn_usb_reset_lists(struct rtwn_softc *, struct ieee80211vap *); static void rtwn_usb_reset_tx_list(struct rtwn_usb_softc *, rtwn_datahead *, struct ieee80211vap *); +static void rtwn_usb_reset_rx_list(struct rtwn_usb_softc *); static void rtwn_usb_start_xfers(struct rtwn_softc *); static void rtwn_usb_abort_xfers(struct rtwn_softc *); static int rtwn_usb_fw_write_block(struct rtwn_softc *, const uint8_t *, uint16_t, int); static void rtwn_usb_drop_incorrect_tx(struct rtwn_softc *); static void rtwn_usb_attach_methods(struct rtwn_softc *); +static void rtwn_usb_sysctlattach(struct rtwn_softc *); #define RTWN_CONFIG_INDEX 0 @@ -133,9 +135,8 @@ rtwn_usb_alloc_rx_list(struct rtwn_softc *sc) struct rtwn_usb_softc *uc = RTWN_USB_SOFTC(sc); int error, i; - /* XXX recheck */ error = rtwn_usb_alloc_list(sc, uc->uc_rx, RTWN_USB_RX_LIST_COUNT, - sc->rx_dma_size + 1024); + uc->uc_rx_buf_size * RTWN_USB_RXBUFSZ_UNIT); if (error != 0) return (error); @@ -199,6 +200,9 @@ rtwn_usb_free_rx_list(struct rtwn_softc *sc) rtwn_usb_free_list(sc, uc->uc_rx, RTWN_USB_RX_LIST_COUNT); + uc->uc_rx_stat_len = 0; + uc->uc_rx_off = 0; + STAILQ_INIT(&uc->uc_rx_active); STAILQ_INIT(&uc->uc_rx_inactive); } @@ -224,8 +228,10 @@ rtwn_usb_reset_lists(struct rtwn_softc *sc, struct iee rtwn_usb_reset_tx_list(uc, &uc->uc_tx_active, vap); rtwn_usb_reset_tx_list(uc, &uc->uc_tx_pending, vap); - if (vap == NULL) + if (vap == NULL) { + rtwn_usb_reset_rx_list(uc); sc->qfullmsk = 0; + } } static void @@ -259,6 +265,23 @@ rtwn_usb_reset_tx_list(struct rtwn_usb_softc *uc, } static void +rtwn_usb_reset_rx_list(struct rtwn_usb_softc *uc) +{ + int i; + + for (i = 0; i < RTWN_USB_RX_LIST_COUNT; i++) { + struct rtwn_data *dp = &uc->uc_rx[i]; + + if (dp->m != NULL) { + m_freem(dp->m); + dp->m = NULL; + } + } + uc->uc_rx_stat_len = 0; + uc->uc_rx_off = 0; +} + +static void rtwn_usb_start_xfers(struct rtwn_softc *sc) { struct rtwn_usb_softc *uc = RTWN_USB_SOFTC(sc); @@ -327,6 +350,31 @@ rtwn_usb_attach_methods(struct rtwn_softc *sc) sc->bcn_check_interval = 100; } +static void +rtwn_usb_sysctlattach(struct rtwn_softc *sc) +{ + struct rtwn_usb_softc *uc = RTWN_USB_SOFTC(sc); + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev); + struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev); + char str[64]; + int ret; + + ret = snprintf(str, sizeof(str), + "Rx buffer size, 512-byte units [%d...%d]", + RTWN_USB_RXBUFSZ_MIN, RTWN_USB_RXBUFSZ_MAX); + KASSERT(ret > 0, ("ret (%d) <= 0!\n", ret)); + (void) ret; + + uc->uc_rx_buf_size = RTWN_USB_RXBUFSZ_DEF; + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "rx_buf_size", CTLFLAG_RDTUN, &uc->uc_rx_buf_size, + uc->uc_rx_buf_size, str); + if (uc->uc_rx_buf_size < RTWN_USB_RXBUFSZ_MIN) + uc->uc_rx_buf_size = RTWN_USB_RXBUFSZ_MIN; + if (uc->uc_rx_buf_size > RTWN_USB_RXBUFSZ_MAX) + uc->uc_rx_buf_size = RTWN_USB_RXBUFSZ_MAX; +} + static int rtwn_usb_attach(device_t self) { @@ -343,6 +391,7 @@ rtwn_usb_attach(device_t self) /* Need to be initialized early. */ rtwn_sysctlattach(sc); + rtwn_usb_sysctlattach(sc); mtx_init(&sc->sc_mtx, ic->ic_name, MTX_NETWORK_LOCK, MTX_DEF); rtwn_usb_attach_methods(sc); Modified: head/sys/dev/rtwn/usb/rtwn_usb_ep.c ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_ep.c Sun Jul 30 23:15:30 2017 (r321734) +++ head/sys/dev/rtwn/usb/rtwn_usb_ep.c Sun Jul 30 23:35:21 2017 (r321735) @@ -225,7 +225,8 @@ rtwn_usb_setup_endpoints(struct rtwn_usb_softc *uc) break; } - rtwn_config[RTWN_BULK_RX].bufsize = sc->rx_dma_size + 1024; + rtwn_config[RTWN_BULK_RX].bufsize = + uc->uc_rx_buf_size * RTWN_USB_RXBUFSZ_UNIT; error = usbd_transfer_setup(uc->uc_udev, &iface_index, uc->uc_xfer, rtwn_config, RTWN_N_TRANSFER, uc, &sc->sc_mtx); free(rtwn_config, M_TEMP); Modified: head/sys/dev/rtwn/usb/rtwn_usb_rx.c ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_rx.c Sun Jul 30 23:15:30 2017 (r321734) +++ head/sys/dev/rtwn/usb/rtwn_usb_rx.c Sun Jul 30 23:35:21 2017 (r321735) @@ -63,31 +63,24 @@ __FBSDID("$FreeBSD$"); #include #include +static struct mbuf * rtwn_rxeof(struct rtwn_softc *, struct rtwn_data *, + uint8_t *, int); -static struct mbuf * -rtwn_rx_copy_to_mbuf(struct rtwn_softc *sc, struct rtwn_rx_stat_common *stat, - int totlen) +static int +rtwn_rx_check_pre_alloc(struct rtwn_softc *sc, + struct rtwn_rx_stat_common *stat) { - struct ieee80211com *ic = &sc->sc_ic; - struct mbuf *m; uint32_t rxdw0; int pktlen; RTWN_ASSERT_LOCKED(sc); - /* Dump Rx descriptor. */ - RTWN_DPRINTF(sc, RTWN_DEBUG_RECV_DESC, - "%s: dw: 0 %08X, 1 %08X, 2 %08X, 3 %08X, 4 %08X, tsfl %08X\n", - __func__, le32toh(stat->rxdw0), le32toh(stat->rxdw1), - le32toh(stat->rxdw2), le32toh(stat->rxdw3), le32toh(stat->rxdw4), - le32toh(stat->tsf_low)); - /* * don't pass packets to the ieee80211 framework if the driver isn't * RUNNING. */ if (!(sc->sc_flags & RTWN_RUNNING)) - return (NULL); + return (-1); rxdw0 = le32toh(stat->rxdw0); if (__predict_false(rxdw0 & (RTWN_RXDW0_CRCERR | RTWN_RXDW0_ICVERR))) { @@ -98,7 +91,7 @@ rtwn_rx_copy_to_mbuf(struct rtwn_softc *sc, struct rtw RTWN_DPRINTF(sc, RTWN_DEBUG_RECV, "%s: RX flags error (%s)\n", __func__, rxdw0 & RTWN_RXDW0_CRCERR ? "CRC" : "ICV"); - goto fail; + return (-1); } pktlen = MS(rxdw0, RTWN_RXDW0_PKTLEN); @@ -108,9 +101,31 @@ rtwn_rx_copy_to_mbuf(struct rtwn_softc *sc, struct rtw */ RTWN_DPRINTF(sc, RTWN_DEBUG_RECV, "%s: frame is too short: %d\n", __func__, pktlen); - goto fail; + return (-1); } + return (0); +} + +static struct mbuf * +rtwn_rx_copy_to_mbuf(struct rtwn_softc *sc, struct rtwn_rx_stat_common *stat, + int totlen) +{ + struct ieee80211com *ic = &sc->sc_ic; + struct mbuf *m; + + RTWN_ASSERT_LOCKED(sc); + + /* Dump Rx descriptor. */ + RTWN_DPRINTF(sc, RTWN_DEBUG_RECV_DESC, + "%s: dw: 0 %08X, 1 %08X, 2 %08X, 3 %08X, 4 %08X, tsfl %08X\n", + __func__, le32toh(stat->rxdw0), le32toh(stat->rxdw1), + le32toh(stat->rxdw2), le32toh(stat->rxdw3), le32toh(stat->rxdw4), + le32toh(stat->tsf_low)); + + if (rtwn_rx_check_pre_alloc(sc, stat) != 0) + goto fail; + m = m_get2(totlen, M_NOWAIT, MT_DATA, M_PKTHDR); if (__predict_false(m == NULL)) { device_printf(sc->sc_dev, "%s: could not allocate RX mbuf\n", @@ -134,14 +149,108 @@ fail: } static struct mbuf * -rtwn_rxeof(struct rtwn_softc *sc, uint8_t *buf, int len) +rtwn_rxeof_fragmented(struct rtwn_usb_softc *uc, struct rtwn_data *data, + uint8_t *buf, int len) { + struct rtwn_softc *sc = &uc->uc_sc; + struct ieee80211com *ic = &sc->sc_ic; + struct rtwn_rx_stat_common *stat = &uc->uc_rx_stat; + uint32_t rxdw0; + int totlen, pktlen, infosz, min_len; + int orig_len = len; + int alloc_mbuf = 0; + + /* Check if Rx descriptor is not truncated. */ + if (uc->uc_rx_stat_len < sizeof(*stat)) { + min_len = min(sizeof(*stat) - uc->uc_rx_stat_len, len); + memcpy((uint8_t *)stat + uc->uc_rx_stat_len, buf, min_len); + + uc->uc_rx_stat_len += min_len; + buf += min_len; + len -= min_len; + + if (uc->uc_rx_stat_len < sizeof(*stat)) + goto end; + + KASSERT(data->m == NULL, ("%s: data->m != NULL!\n", __func__)); + alloc_mbuf = 1; + + /* Dump Rx descriptor. */ + RTWN_DPRINTF(sc, RTWN_DEBUG_RECV_DESC, + "%s: dw: 0 %08X, 1 %08X, 2 %08X, 3 %08X, 4 %08X, " + "tsfl %08X\n", __func__, le32toh(stat->rxdw0), + le32toh(stat->rxdw1), le32toh(stat->rxdw2), + le32toh(stat->rxdw3), le32toh(stat->rxdw4), + le32toh(stat->tsf_low)); + } + + rxdw0 = le32toh(stat->rxdw0); + pktlen = MS(rxdw0, RTWN_RXDW0_PKTLEN); + infosz = MS(rxdw0, RTWN_RXDW0_INFOSZ) * 8; + totlen = sizeof(*stat) + infosz + pktlen; + if (alloc_mbuf) { + if (rtwn_rx_check_pre_alloc(sc, stat) == 0) { + data->m = m_getm(NULL, totlen, M_NOWAIT, MT_DATA); + if (data->m != NULL) { + m_copyback(data->m, 0, uc->uc_rx_stat_len, + (caddr_t)stat); + + if (rtwn_check_frame(sc, data->m) != 0) { + m_freem(data->m); + data->m = NULL; + counter_u64_add(ic->ic_ierrors, 1); + } + } else + counter_u64_add(ic->ic_ierrors, 1); + } else + counter_u64_add(ic->ic_ierrors, 1); + + uc->uc_rx_off = sizeof(*stat); + } + + /* If mbuf allocation fails just discard the data. */ + min_len = min(totlen - uc->uc_rx_off, len); + if (data->m != NULL) + m_copyback(data->m, uc->uc_rx_off, min_len, buf); + + uc->uc_rx_off += min_len; + if (uc->uc_rx_off == totlen) { + /* Align next frame. */ + min_len = rtwn_usb_align_rx(uc, + orig_len - len + min_len, orig_len); + min_len -= (orig_len - len); + KASSERT(len >= min_len, ("%s: len (%d) < min_len (%d)!\n", + __func__, len, min_len)); + + /* Clear mbuf stats. */ + uc->uc_rx_stat_len = 0; + uc->uc_rx_off = 0; + } + len -= min_len; + buf += min_len; +end: + if (uc->uc_rx_stat_len == 0) + return (rtwn_rxeof(sc, data, buf, len)); + else + return (NULL); +} + +static struct mbuf * +rtwn_rxeof(struct rtwn_softc *sc, struct rtwn_data *data, uint8_t *buf, + int len) +{ struct rtwn_usb_softc *uc = RTWN_USB_SOFTC(sc); struct rtwn_rx_stat_common *stat; struct mbuf *m, *m0 = NULL; uint32_t rxdw0; int totlen, pktlen, infosz; + /* Prepend defragmented frame (if any). */ + if (data->m != NULL) { + m0 = m = data->m; + data->m = NULL; + } + /* Process packets. */ while (len >= sizeof(*stat)) { stat = (struct rtwn_rx_stat_common *)buf; @@ -156,8 +265,8 @@ rtwn_rxeof(struct rtwn_softc *sc, uint8_t *buf, int le /* Make sure everything fits in xfer. */ totlen = sizeof(*stat) + infosz + pktlen; if (totlen > len) { - device_printf(sc->sc_dev, - "%s: totlen (%d) > len (%d)!\n", + RTWN_DPRINTF(sc, RTWN_DEBUG_RECV, + "%s: frame is fragmented (totlen %d len %d)\n", __func__, totlen, len); break; } @@ -165,9 +274,9 @@ rtwn_rxeof(struct rtwn_softc *sc, uint8_t *buf, int le if (m0 == NULL) m0 = m = rtwn_rx_copy_to_mbuf(sc, stat, totlen); else { - m->m_next = rtwn_rx_copy_to_mbuf(sc, stat, totlen); - if (m->m_next != NULL) - m = m->m_next; + m->m_nextpkt = rtwn_rx_copy_to_mbuf(sc, stat, totlen); + if (m->m_nextpkt != NULL) + m = m->m_nextpkt; } /* Align next frame. */ @@ -176,6 +285,9 @@ rtwn_rxeof(struct rtwn_softc *sc, uint8_t *buf, int le len -= totlen; } + if (len > 0) + (void)rtwn_rxeof_fragmented(uc, data, buf, len); + return (m0); } @@ -190,15 +302,19 @@ rtwn_report_intr(struct rtwn_usb_softc *uc, struct usb usbd_xfer_status(xfer, &len, NULL, NULL, NULL); - if (__predict_false(len < sizeof(struct rtwn_rx_stat_common))) { + if (__predict_false(len < sizeof(struct rtwn_rx_stat_common) && + uc->uc_rx_stat_len == 0)) { counter_u64_add(ic->ic_ierrors, 1); return (NULL); } buf = data->buf; + if (uc->uc_rx_stat_len > 0) + return (rtwn_rxeof_fragmented(uc, data, data->buf, len)); + switch (rtwn_classify_intr(sc, buf, len)) { case RTWN_RX_DATA: - return (rtwn_rxeof(sc, buf, len)); + return (rtwn_rxeof(sc, data, buf, len)); case RTWN_RX_TX_REPORT: if (sc->sc_ratectl != RTWN_RATECTL_NET80211) { /* shouldn't happen */ @@ -284,8 +400,8 @@ tr_setup: * callback and safe to unlock. */ while (m != NULL) { - next = m->m_next; - m->m_next = NULL; + next = m->m_nextpkt; + m->m_nextpkt = NULL; ni = rtwn_rx_frame(sc, m); @@ -309,6 +425,8 @@ tr_setup: STAILQ_INSERT_TAIL(&uc->uc_rx_inactive, data, next); } if (error != USB_ERR_CANCELLED) { + /* XXX restart device if frame was fragmented? */ + usbd_xfer_set_stall(xfer); counter_u64_add(ic->ic_ierrors, 1); goto tr_setup; Modified: head/sys/dev/rtwn/usb/rtwn_usb_var.h ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_var.h Sun Jul 30 23:15:30 2017 (r321734) +++ head/sys/dev/rtwn/usb/rtwn_usb_var.h Sun Jul 30 23:35:21 2017 (r321735) @@ -21,6 +21,12 @@ #ifndef RTWN_USBVAR_H #define RTWN_USBVAR_H +#include /* for struct rtwn_rx_stat_common */ + +#define RTWN_USB_RXBUFSZ_UNIT (512) +#define RTWN_USB_RXBUFSZ_MIN ( 4) +#define RTWN_USB_RXBUFSZ_DEF (24) +#define RTWN_USB_RXBUFSZ_MAX (64) #define RTWN_USB_TXBUFSZ (16 * 1024) #define RTWN_IFACE_INDEX 0 @@ -58,6 +64,12 @@ struct rtwn_usb_softc { struct rtwn_data uc_rx[RTWN_USB_RX_LIST_COUNT]; rtwn_datahead uc_rx_active; rtwn_datahead uc_rx_inactive; + int uc_rx_buf_size; + + struct rtwn_rx_stat_common uc_rx_stat; + int uc_rx_stat_len; + int uc_rx_off; + struct rtwn_data uc_tx[RTWN_USB_TX_LIST_COUNT]; rtwn_datahead uc_tx_active; rtwn_datahead uc_tx_inactive; From owner-svn-src-head@freebsd.org Mon Jul 31 00:03:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 050DFDC554A; Mon, 31 Jul 2017 00:03:44 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C62B877B; Mon, 31 Jul 2017 00:03:43 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6V03gD2019540; Mon, 31 Jul 2017 00:03:42 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6V03gNe019539; Mon, 31 Jul 2017 00:03:42 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201707310003.v6V03gNe019539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 31 Jul 2017 00:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321736 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 321736 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 00:03:44 -0000 Author: avos Date: Mon Jul 31 00:03:42 2017 New Revision: 321736 URL: https://svnweb.freebsd.org/changeset/base/321736 Log: rtwn(4): refresh manpage - Remove 'if_rtwn_load="YES"' line from loader.conf; the module was renamed in r319733 + it will be loaded automatically as a dependency. - Move new sentence to new line. - Add short description for dev.rtwn.%d.rx_buf_size tunable. Modified: head/share/man/man4/rtwn.4 Modified: head/share/man/man4/rtwn.4 ============================================================================== --- head/share/man/man4/rtwn.4 Sun Jul 30 23:35:21 2017 (r321735) +++ head/share/man/man4/rtwn.4 Mon Jul 31 00:03:42 2017 (r321736) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 24, 2017 +.Dd July 31, 2017 .Dt RTWN 4 .Os .Sh NAME @@ -44,7 +44,6 @@ Alternatively, to load the driver as a module at boot time, place following lines in .Xr loader.conf 5 : .Bd -literal -offset indent -if_rtwn_load="YES" if_rtwn_pci_load="YES" if_rtwn_usb_load="YES" .Ed @@ -53,7 +52,8 @@ The .Nm driver provides support for wireless network devices based on the Realtek RTL8192C, RTL8188E, RTL8192E, RTL8812A and RTL8821A -programming APIs. These APIs are used by a wide variety of chips; +programming APIs. +These APIs are used by a wide variety of chips; most chips with USB and some with PCI interface are supported. .Pp To enable use for PCI/PCIe systems, see the rtwn_pci(4) driver; @@ -175,6 +175,9 @@ algorithm in case if it is not implemented Currently selected algorithm is reported via .Em Va dev.rtwn.%d.ratectl_selected read-only OID. +.It Va dev.rtwn.%d.rx_buf_size +(USB only) Controls size of temporary Rx buffer; smaller buffer size +may increase number of interrupts. .El .Sh DIAGNOSTICS .Bl -diag From owner-svn-src-head@freebsd.org Mon Jul 31 00:05:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06D09DC56CE; Mon, 31 Jul 2017 00:05:51 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5961959; Mon, 31 Jul 2017 00:05:50 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6V05ogO019658; Mon, 31 Jul 2017 00:05:50 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6V05omg019657; Mon, 31 Jul 2017 00:05:50 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201707310005.v6V05omg019657@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Mon, 31 Jul 2017 00:05:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321737 - head/sys/dev/mpr X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: head/sys/dev/mpr X-SVN-Commit-Revision: 321737 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 00:05:51 -0000 Author: scottl Date: Mon Jul 31 00:05:49 2017 New Revision: 321737 URL: https://svnweb.freebsd.org/changeset/base/321737 Log: Don't re-parse PCI IDs in order to set card-specific flags, use the flags field in the PCIID table. Modified: head/sys/dev/mpr/mpr_pci.c Modified: head/sys/dev/mpr/mpr_pci.c ============================================================================== --- head/sys/dev/mpr/mpr_pci.c Mon Jul 31 00:03:42 2017 (r321736) +++ head/sys/dev/mpr/mpr_pci.c Mon Jul 31 00:05:49 2017 (r321737) @@ -125,23 +125,32 @@ struct mpr_ident { { MPI2_MFGPAGE_VENDORID_LSI, MPI26_MFGPAGE_DEVID_SAS3324_2, 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3324_2" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI26_MFGPAGE_DEVID_SAS3408, - 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3408" }, + 0xffff, 0xffff, MPR_FLAGS_GEN35_IOC, + "Avago Technologies (LSI) SAS3408" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI26_MFGPAGE_DEVID_SAS3416, - 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3416" }, + 0xffff, 0xffff, MPR_FLAGS_GEN35_IOC, + "Avago Technologies (LSI) SAS3416" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI26_MFGPAGE_DEVID_SAS3508, - 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3508" }, + 0xffff, 0xffff, MPR_FLAGS_GEN35_IOC, + "Avago Technologies (LSI) SAS3508" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI26_MFGPAGE_DEVID_SAS3508_1, - 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3508_1" }, + 0xffff, 0xffff, MPR_FLAGS_GEN35_IOC, + "Avago Technologies (LSI) SAS3508_1" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI26_MFGPAGE_DEVID_SAS3516, - 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3516" }, + 0xffff, 0xffff, MPR_FLAGS_GEN35_IOC, + "Avago Technologies (LSI) SAS3516" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI26_MFGPAGE_DEVID_SAS3516_1, - 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3516_1" }, + 0xffff, 0xffff, MPR_FLAGS_GEN35_IOC, + "Avago Technologies (LSI) SAS3516_1" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI26_MFGPAGE_DEVID_SAS3616, - 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3616" }, + 0xffff, 0xffff, MPR_FLAGS_GEN35_IOC, + "Avago Technologies (LSI) SAS3616" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI26_MFGPAGE_DEVID_SAS3708, - 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3708" }, + 0xffff, 0xffff, MPR_FLAGS_GEN35_IOC, + "Avago Technologies (LSI) SAS3708" }, { MPI2_MFGPAGE_VENDORID_LSI, MPI26_MFGPAGE_DEVID_SAS3716, - 0xffff, 0xffff, 0, "Avago Technologies (LSI) SAS3716" }, + 0xffff, 0xffff, MPR_FLAGS_GEN35_IOC, + "Avago Technologies (LSI) SAS3716" }, { 0, 0, 0, 0, 0, NULL } }; @@ -196,19 +205,6 @@ mpr_pci_attach(device_t dev) /* Twiddle basic PCI config bits for a sanity check */ pci_enable_busmaster(dev); - - /* Set flag if this is a Gen3.5 IOC */ - if ((m->device == MPI26_MFGPAGE_DEVID_SAS3508) || - (m->device == MPI26_MFGPAGE_DEVID_SAS3508_1) || - (m->device == MPI26_MFGPAGE_DEVID_SAS3408) || - (m->device == MPI26_MFGPAGE_DEVID_SAS3516) || - (m->device == MPI26_MFGPAGE_DEVID_SAS3516_1) || - (m->device == MPI26_MFGPAGE_DEVID_SAS3416) || - (m->device == MPI26_MFGPAGE_DEVID_SAS3716) || - (m->device == MPI26_MFGPAGE_DEVID_SAS3616) || - (m->device == MPI26_MFGPAGE_DEVID_SAS3708)) { - sc->mpr_flags |= MPR_FLAGS_GEN35_IOC; - } for (i = 0; i < PCI_MAXMAPS_0; i++) { sc->mpr_regs_rid = PCIR_BAR(i); From owner-svn-src-head@freebsd.org Mon Jul 31 00:54:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A570FDC611C; Mon, 31 Jul 2017 00:54:51 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66ADE208D; Mon, 31 Jul 2017 00:54:51 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6V0soM4039813; Mon, 31 Jul 2017 00:54:50 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6V0soGn039810; Mon, 31 Jul 2017 00:54:50 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707310054.v6V0soGn039810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 31 Jul 2017 00:54:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321743 - in head: share/man/man9 sys/kern sys/sys X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head: share/man/man9 sys/kern sys/sys X-SVN-Commit-Revision: 321743 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 00:54:51 -0000 Author: ian Date: Mon Jul 31 00:54:50 2017 New Revision: 321743 URL: https://svnweb.freebsd.org/changeset/base/321743 Log: Add taskqueue_enqueue_timeout_sbt(), because sometimes you want more control over the scheduling precision than 'ticks' can offer, and because sometimes you're already working with sbintime_t units and it's dumb to convert them to ticks just so they can get converted back to sbintime_t under the hood. Modified: head/share/man/man9/taskqueue.9 head/sys/kern/subr_taskqueue.c head/sys/sys/taskqueue.h Modified: head/share/man/man9/taskqueue.9 ============================================================================== --- head/share/man/man9/taskqueue.9 Mon Jul 31 00:41:05 2017 (r321742) +++ head/share/man/man9/taskqueue.9 Mon Jul 31 00:54:50 2017 (r321743) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 1, 2016 +.Dd July 30, 2017 .Dt TASKQUEUE 9 .Os .Sh NAME @@ -82,6 +82,8 @@ struct timeout_task; .Ft int .Fn taskqueue_enqueue_timeout "struct taskqueue *queue" "struct timeout_task *timeout_task" "int ticks" .Ft int +.Fn taskqueue_enqueue_timeout_sbt "struct taskqueue *queue" "struct timeout_task *timeout_task" "sbintime_t sbt" "sbintime_t pr" "int flags" +.Ft int .Fn taskqueue_cancel "struct taskqueue *queue" "struct task *task" "u_int *pendp" .Ft int .Fn taskqueue_cancel_timeout "struct taskqueue *queue" "struct timeout_task *timeout_task" "u_int *pendp" @@ -211,8 +213,17 @@ is called on the task pointer passed to .Pp The .Fn taskqueue_enqueue_timeout -is used to schedule the enqueue after the specified amount of +function is used to schedule the enqueue after the specified number of .Va ticks . +The +.Fn taskqueue_enqueue_timeout_sbt +function provides finer control over the scheduling based on +.Va sbt , +.Va pr , +and +.Va flags , +as detailed in +.Xr timeout 9 . Only non-fast task queues can be used for .Va timeout_task scheduling. @@ -483,6 +494,7 @@ be created with a dedicated processing thread. .Xr ithread 9 , .Xr kthread 9 , .Xr swi 9 +.Xr timeout 9 .Sh HISTORY This interface first appeared in .Fx 5.0 . Modified: head/sys/kern/subr_taskqueue.c ============================================================================== --- head/sys/kern/subr_taskqueue.c Mon Jul 31 00:41:05 2017 (r321742) +++ head/sys/kern/subr_taskqueue.c Mon Jul 31 00:54:50 2017 (r321743) @@ -289,8 +289,8 @@ taskqueue_timeout_func(void *arg) } int -taskqueue_enqueue_timeout(struct taskqueue *queue, - struct timeout_task *timeout_task, int ticks) +taskqueue_enqueue_timeout_sbt(struct taskqueue *queue, + struct timeout_task *timeout_task, sbintime_t sbt, sbintime_t pr, int flags) { int res; @@ -304,7 +304,7 @@ taskqueue_enqueue_timeout(struct taskqueue *queue, /* Do nothing */ TQ_UNLOCK(queue); res = -1; - } else if (ticks == 0) { + } else if (sbt == 0) { taskqueue_enqueue_locked(queue, &timeout_task->t); /* The lock is released inside. */ } else { @@ -313,16 +313,25 @@ taskqueue_enqueue_timeout(struct taskqueue *queue, } else { queue->tq_callouts++; timeout_task->f |= DT_CALLOUT_ARMED; - if (ticks < 0) - ticks = -ticks; /* Ignore overflow. */ + if (sbt < 0) + sbt = -sbt; /* Ignore overflow. */ } - if (ticks > 0) { - callout_reset(&timeout_task->c, ticks, - taskqueue_timeout_func, timeout_task); + if (sbt > 0) { + callout_reset_sbt(&timeout_task->c, sbt, pr, + taskqueue_timeout_func, timeout_task, flags); } TQ_UNLOCK(queue); } return (res); +} + +int +taskqueue_enqueue_timeout(struct taskqueue *queue, + struct timeout_task *ttask, int ticks) +{ + + return (taskqueue_enqueue_timeout_sbt(queue, ttask, ticks * tick_sbt, + 0, 0)); } static void Modified: head/sys/sys/taskqueue.h ============================================================================== --- head/sys/sys/taskqueue.h Mon Jul 31 00:41:05 2017 (r321742) +++ head/sys/sys/taskqueue.h Mon Jul 31 00:54:50 2017 (r321743) @@ -79,6 +79,9 @@ int taskqueue_start_threads_cpuset(struct taskqueue ** int taskqueue_enqueue(struct taskqueue *queue, struct task *task); int taskqueue_enqueue_timeout(struct taskqueue *queue, struct timeout_task *timeout_task, int ticks); +int taskqueue_enqueue_timeout_sbt(struct taskqueue *queue, + struct timeout_task *timeout_task, sbintime_t sbt, sbintime_t pr, + int flags); int taskqueue_poll_is_busy(struct taskqueue *queue, struct task *task); int taskqueue_cancel(struct taskqueue *queue, struct task *task, u_int *pendp); From owner-svn-src-head@freebsd.org Mon Jul 31 00:59:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9D4DDC61B1; Mon, 31 Jul 2017 00:59:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BC702241; Mon, 31 Jul 2017 00:59:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6V0xSWl040028; Mon, 31 Jul 2017 00:59:28 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6V0xSU1040027; Mon, 31 Jul 2017 00:59:28 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201707310059.v6V0xSU1040027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 31 Jul 2017 00:59:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321744 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 321744 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 00:59:29 -0000 Author: markj Date: Mon Jul 31 00:59:28 2017 New Revision: 321744 URL: https://svnweb.freebsd.org/changeset/base/321744 Log: Correct the predicates on which lockstat:::{thread,spin}-spin fire. In particular, they should fire only if the lock was owned by another thread when we first attempted to acquire that lock. MFC after: 1 week Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Mon Jul 31 00:54:50 2017 (r321743) +++ head/sys/kern/kern_mutex.c Mon Jul 31 00:59:28 2017 (r321744) @@ -766,7 +766,7 @@ _mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire, m, contested, waittime, file, line); #ifdef KDTRACE_HOOKS - if (spin_time != 0) + if (lda.spin_cnt != 0) LOCKSTAT_RECORD1(spin__spin, m, spin_time); #endif } @@ -879,7 +879,7 @@ retry: LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire, m, contested, waittime, file, line); #ifdef KDTRACE_HOOKS - if (spin_time != 0) + if (lda.spin_cnt != 0) LOCKSTAT_RECORD1(thread__spin, m, spin_time); #endif } From owner-svn-src-head@freebsd.org Mon Jul 31 01:18:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF05ADC6761; Mon, 31 Jul 2017 01:18:22 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC0E42C76; Mon, 31 Jul 2017 01:18:22 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6V1ILop048525; Mon, 31 Jul 2017 01:18:21 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6V1ILjF048523; Mon, 31 Jul 2017 01:18:21 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707310118.v6V1ILjF048523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 31 Jul 2017 01:18:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321745 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 321745 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 01:18:23 -0000 Author: ian Date: Mon Jul 31 01:18:21 2017 New Revision: 321745 URL: https://svnweb.freebsd.org/changeset/base/321745 Log: Add clock_schedule(), a feature that allows realtime clock drivers to request that their clock_settime() methods be called at a given offset from top-of-second. This adds a timeout_task to the rtc_instance so that each clock can be separately added to taskqueue_thread with the scheduling it prefers, instead of looping through all the clocks at once with a single task on taskqueue_thread. If a driver doesn't call clock_schedule() the default is the old behavior: clock_settime() is queued immediately. The motivation behind this is that I was on the path of adding identical code to a third RTC driver to figure out a delta to top-of-second and sleep for that amount of time because writing the the RTC registers resets the hardware's concept of top-of-second. (Sometimes it's not top-of-second, some RTC clocks tick over a half second after you set their time registers.) Worst-case would be to sleep for almost a full second, which is a rude thing to do on a shared task queue thread. Modified: head/sys/kern/subr_rtc.c head/sys/sys/clock.h Modified: head/sys/kern/subr_rtc.c ============================================================================== --- head/sys/kern/subr_rtc.c Mon Jul 31 00:59:28 2017 (r321744) +++ head/sys/kern/subr_rtc.c Mon Jul 31 01:18:21 2017 (r321745) @@ -95,7 +95,10 @@ struct rtc_instance { device_t clockdev; int resolution; int flags; + u_int schedns; struct timespec resadj; + struct timeout_task + stask; LIST_ENTRY(rtc_instance) rtc_entries; }; @@ -104,7 +107,6 @@ struct rtc_instance { * Clocks are updated using a task running on taskqueue_thread. */ static void settime_task_func(void *arg, int pending); -static struct task settime_task = TASK_INITIALIZER(0, settime_task_func, NULL); /* * Registered clocks are kept in a list which is sorted by resolution; the more @@ -116,9 +118,9 @@ static struct sx rtc_list_lock; SX_SYSINIT(rtc_list_lock_init, &rtc_list_lock, "rtc list"); /* - * On the task thread, invoke the clock_settime() method of each registered - * clock. Do so holding only an sxlock, so that clock drivers are free to do - * whatever kind of locking or sleeping they need to. + * On the task thread, invoke the clock_settime() method of the clock. Do so + * holding no locks, so that clock drivers are free to do whatever kind of + * locking or sleeping they need to. */ static void settime_task_func(void *arg, int pending) @@ -126,21 +128,18 @@ settime_task_func(void *arg, int pending) struct timespec ts; struct rtc_instance *rtc; - sx_xlock(&rtc_list_lock); - LIST_FOREACH(rtc, &rtc_list, rtc_entries) { - if (!(rtc->flags & CLOCKF_SETTIME_NO_TS)) { - getnanotime(&ts); - if (!(rtc->flags & CLOCKF_SETTIME_NO_ADJ)) { - ts.tv_sec -= utc_offset(); - timespecadd(&ts, &rtc->resadj); - } - } else { - ts.tv_sec = 0; - ts.tv_nsec = 0; + rtc = arg; + if (!(rtc->flags & CLOCKF_SETTIME_NO_TS)) { + getnanotime(&ts); + if (!(rtc->flags & CLOCKF_SETTIME_NO_ADJ)) { + ts.tv_sec -= utc_offset(); + timespecadd(&ts, &rtc->resadj); } - CLOCK_SETTIME(rtc->clockdev, &ts); + } else { + ts.tv_sec = 0; + ts.tv_nsec = 0; } - sx_xunlock(&rtc_list_lock); + CLOCK_SETTIME(rtc->clockdev, &ts); } void @@ -152,8 +151,11 @@ clock_register_flags(device_t clockdev, long resolutio newrtc->clockdev = clockdev; newrtc->resolution = (int)resolution; newrtc->flags = flags; + newrtc->schedns = 0; newrtc->resadj.tv_sec = newrtc->resolution / 2 / 1000000; newrtc->resadj.tv_nsec = newrtc->resolution / 2 % 1000000 * 1000; + TIMEOUT_TASK_INIT(taskqueue_thread, &newrtc->stask, 0, + settime_task_func, newrtc); sx_xlock(&rtc_list_lock); if (LIST_EMPTY(&rtc_list)) { @@ -192,12 +194,32 @@ clock_unregister(device_t clockdev) LIST_FOREACH_SAFE(rtc, &rtc_list, rtc_entries, tmp) { if (rtc->clockdev == clockdev) { LIST_REMOVE(rtc, rtc_entries); - free(rtc, M_DEVBUF); + break; } } sx_xunlock(&rtc_list_lock); + if (rtc != NULL) { + taskqueue_cancel_timeout(taskqueue_thread, &rtc->stask, NULL); + taskqueue_drain_timeout(taskqueue_thread, &rtc->stask); + free(rtc, M_DEVBUF); + } } +void +clock_schedule(device_t clockdev, u_int offsetns) +{ + struct rtc_instance *rtc; + + sx_xlock(&rtc_list_lock); + LIST_FOREACH(rtc, &rtc_list, rtc_entries) { + if (rtc->clockdev == clockdev) { + rtc->schedns = offsetns; + break; + } + } + sx_xunlock(&rtc_list_lock); +} + /* * Initialize the system time. Must be called from a context which does not * restrict any locking or sleeping that clock drivers may need to do. @@ -275,9 +297,26 @@ inittodr(time_t base) void resettodr(void) { + struct timespec now; + struct rtc_instance *rtc; + sbintime_t sbt; + long waitns; if (disable_rtc_set) return; - taskqueue_enqueue(taskqueue_thread, &settime_task); + sx_xlock(&rtc_list_lock); + LIST_FOREACH(rtc, &rtc_list, rtc_entries) { + if (rtc->schedns != 0) { + getnanotime(&now); + waitns = rtc->schedns - now.tv_nsec; + if (waitns < 0) + waitns += 1000000000; + sbt = nstosbt(waitns); + } else + sbt = 0; + taskqueue_enqueue_timeout_sbt(taskqueue_thread, + &rtc->stask, -sbt, 0, C_PREL(31)); + } + sx_xunlock(&rtc_list_lock); } Modified: head/sys/sys/clock.h ============================================================================== --- head/sys/sys/clock.h Mon Jul 31 00:59:28 2017 (r321744) +++ head/sys/sys/clock.h Mon Jul 31 01:18:21 2017 (r321745) @@ -77,10 +77,17 @@ int clock_ct_to_ts(struct clocktime *, struct timespec void clock_ts_to_ct(struct timespec *, struct clocktime *); /* - * Time-of-day clock register/unregister functions, and associated flags. These - * functions can sleep. Upon return from unregister, the clock's methods are - * not running and will not be called again. + * Time-of-day clock functions and flags. These functions might sleep. * + * clock_register and clock_unregister() do what they say. Upon return from + * unregister, the clock's methods are not running and will not be called again. + * + * clock_schedule() requests that a registered clock's clock_settime() calls + * happen at the given offset into the second. The default is 0, meaning no + * specific scheduling. To schedule the call as soon after top-of-second as + * possible, specify 1. Each clock has its own schedule, but taskqueue_thread + * is shared by many tasks; the timing of the call is not guaranteed. + * * Flags: * * CLOCKF_SETTIME_NO_TS @@ -102,6 +109,7 @@ void clock_ts_to_ct(struct timespec *, struct clocktim void clock_register(device_t _clockdev, long _resolution_us); void clock_register_flags(device_t _clockdev, long _resolution_us, int _flags); +void clock_schedule(device_t clockdev, u_int _offsetns); void clock_unregister(device_t _clockdev); /* From owner-svn-src-head@freebsd.org Mon Jul 31 01:36:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DCDDDC6CA2; Mon, 31 Jul 2017 01:36:52 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EFAE3503; Mon, 31 Jul 2017 01:36:52 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6V1ap8x056372; Mon, 31 Jul 2017 01:36:51 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6V1apth056370; Mon, 31 Jul 2017 01:36:51 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707310136.v6V1apth056370@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 31 Jul 2017 01:36:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321746 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 321746 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 01:36:52 -0000 Author: ian Date: Mon Jul 31 01:36:51 2017 New Revision: 321746 URL: https://svnweb.freebsd.org/changeset/base/321746 Log: Use the new clock_schedule() to arrange for clock_settime() to be called at the right time to keep the RTC hardware time in sync, instead of using pause_sbt() to sleep until the right time. Modified: head/sys/dev/iicbus/ds1307.c head/sys/dev/iicbus/nxprtc.c Modified: head/sys/dev/iicbus/ds1307.c ============================================================================== --- head/sys/dev/iicbus/ds1307.c Mon Jul 31 01:18:21 2017 (r321745) +++ head/sys/dev/iicbus/ds1307.c Mon Jul 31 01:36:51 2017 (r321746) @@ -295,8 +295,13 @@ ds1307_start(void *xdev) CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_MPSAFE, sc, 0, ds1307_sqw_out_sysctl, "IU", "DS1307 square-wave output state"); - /* Register as a clock with 1 second resolution. */ + /* + * Register as a clock with 1 second resolution. Schedule the + * clock_settime() method to be called just after top-of-second; + * resetting the time resets top-of-second in the hardware. + */ clock_register_flags(dev, 1000000, CLOCKF_SETTIME_NO_TS); + clock_schedule(dev, 1); } static int @@ -351,19 +356,6 @@ ds1307_settime(device_t dev, struct timespec *ts) uint8_t pmflags; sc = device_get_softc(dev); - - /* Sleep until 1ms into the second, to align RTC's second to ours. */ - getnanotime(ts); - waitns = 1000000 - ts->tv_nsec; - if (waitns < 0) - waitns += 1000000000; - pause_sbt("set1307", nstosbt(waitns), 0, C_PREL(31)); - - /* Grab a fresh post-sleep idea of the time. */ - getnanotime(ts); - ts->tv_sec -= utc_offset(); - ts->tv_nsec = 0; - clock_ts_to_ct(ts, &ct); /* If the chip is in AM/PM mode, adjust hour and set flags as needed. */ if (sc->sc_use_ampm) { Modified: head/sys/dev/iicbus/nxprtc.c ============================================================================== --- head/sys/dev/iicbus/nxprtc.c Mon Jul 31 01:18:21 2017 (r321745) +++ head/sys/dev/iicbus/nxprtc.c Mon Jul 31 01:36:51 2017 (r321746) @@ -513,10 +513,15 @@ nxprtc_start(void *dev) * we're using the timer to count fractional seconds, our resolution is * 1e6/64, about 15.6ms. Without the timer we still align the RTC clock * when setting it so our error is an average .5s when reading it. + * Schedule our clock_settime() method to be called at a .495ms offset + * into the second, because the clock hardware resets the divider chain + * to the mid-second point when you set the time and it takes about 5ms + * of i2c bus activity to set the clock. */ resolution = sc->use_timer ? 1000000 / TMR_TICKS_SEC : 1000000 / 2; clockflags = CLOCKF_GETTIME_NO_ADJ | CLOCKF_SETTIME_NO_TS; clock_register_flags(sc->dev, resolution, clockflags); + clock_schedule(sc->dev, 495000000); } static int @@ -599,7 +604,6 @@ nxprtc_settime(device_t dev, struct timespec *ts) struct clocktime ct; struct time_regs tregs; struct nxprtc_softc *sc; - long waitns; int err; uint8_t cflag, cs1, pmflag; @@ -608,16 +612,9 @@ nxprtc_settime(device_t dev, struct timespec *ts) /* * We stop the clock, set the time, then restart the clock. Half a * second after restarting the clock it ticks over to the next second. - * So to align the RTC, sleep until system time is halfway through the - * current second (shoot for .495 to allow time for i2c operations). - */ - getnanotime(ts); - waitns = 495000000 - ts->tv_nsec; - if (waitns < 0) - waitns += 1000000000; - pause_sbt("nxpset", nstosbt(waitns), 0, C_PREL(31)); - - /* + * So to align the RTC, we schedule this function to be called when + * system time is roughly halfway (.495) through the current second. + * * Reserve use of the i2c bus and stop the RTC clock. Note that if * anything goes wrong from this point on, we leave the clock stopped, * because we don't really know what state it's in. From owner-svn-src-head@freebsd.org Mon Jul 31 03:19:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AFC9DC84B2; Mon, 31 Jul 2017 03:19:18 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E956F653B8; Mon, 31 Jul 2017 03:19:17 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6V3JGHs098127; Mon, 31 Jul 2017 03:19:16 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6V3JGvE098126; Mon, 31 Jul 2017 03:19:16 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707310319.v6V3JGvE098126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 31 Jul 2017 03:19:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321751 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 321751 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 03:19:18 -0000 Author: ian Date: Mon Jul 31 03:19:16 2017 New Revision: 321751 URL: https://svnweb.freebsd.org/changeset/base/321751 Log: Remove now-unused variable. Modified: head/sys/dev/iicbus/ds1307.c Modified: head/sys/dev/iicbus/ds1307.c ============================================================================== --- head/sys/dev/iicbus/ds1307.c Mon Jul 31 03:04:39 2017 (r321750) +++ head/sys/dev/iicbus/ds1307.c Mon Jul 31 03:19:16 2017 (r321751) @@ -350,7 +350,6 @@ ds1307_settime(device_t dev, struct timespec *ts) { struct clocktime ct; struct ds1307_softc *sc; - long waitns; int error; uint8_t data[7]; uint8_t pmflags; From owner-svn-src-head@freebsd.org Mon Jul 31 03:25:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B62B5DC8696; Mon, 31 Jul 2017 03:25:22 +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 ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9AAD0657A4; Mon, 31 Jul 2017 03:25:22 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from Xins-MBP.ut.rhv.delphij.net (unknown [IPv6:2601:646:8882:37a:dd8a:e75a:9211:e42a]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 21F5F16B47; Sun, 30 Jul 2017 20:25:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1501471522; x=1501485922; bh=nVWrdevmntQTfrx6lGfpHGjvTDTQ9VSns0VuPnCvnKc=; h=Cc:Subject:To:References:From:Date:In-Reply-To; b=5ID7QVHtb6qKqIBb2fxC2pw6UY7rgRn85dP4hjlX80g0cwPgzLLipqcqjQhqvJyh3 5rg/gKHr6YQV35biQ5E5ENXXO7yEVwY9Cu+wrgnUBxmgVSPw++5nX0qJm6VlPf3uDq e4UqfDfO56psX0tCC9jubkRWmADjAG1/m5arLh2o= Cc: d@delphij.net Subject: Re: svn commit: r321605 - head/contrib/ipfilter To: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201707270626.v6R6QFpx016943@repo.freebsd.org> From: Xin Li Message-ID: <59e80a44-d9de-5081-9eda-f068188b843f@delphij.net> Date: Sun, 30 Jul 2017 20:25:19 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <201707270626.v6R6QFpx016943@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qkHf0G7WFcstcsFV7l4rWHvsuGQw2vRUe" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 03:25:22 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qkHf0G7WFcstcsFV7l4rWHvsuGQw2vRUe Content-Type: multipart/mixed; boundary="Jr1WPDWc9v4DdGMW1MpMm9tsIXBjADiqo"; protected-headers="v1" From: Xin Li To: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Cc: d@delphij.net Message-ID: <59e80a44-d9de-5081-9eda-f068188b843f@delphij.net> Subject: Re: svn commit: r321605 - head/contrib/ipfilter References: <201707270626.v6R6QFpx016943@repo.freebsd.org> In-Reply-To: <201707270626.v6R6QFpx016943@repo.freebsd.org> --Jr1WPDWc9v4DdGMW1MpMm9tsIXBjADiqo Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 7/26/17 23:26, Cy Schubert wrote: > Author: cy > Date: Thu Jul 27 06:26:15 2017 > New Revision: 321605 > URL: https://svnweb.freebsd.org/changeset/base/321605 >=20 > Log: > As in r315225, discard 3072 bytes of RC4 bytestream instead of 1024. > =20 > PR: 217920 > Submitted by: codarren@hackers.mu > Reviewed by: emaste, cem > Approved by: so (implicit, in r315225) Why ipfilter is using its own pseudo random number generator? Please remove them altogether and use the system PRNG instead. Cheers, --Jr1WPDWc9v4DdGMW1MpMm9tsIXBjADiqo-- --qkHf0G7WFcstcsFV7l4rWHvsuGQw2vRUe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJZfqMiAAoJEJW2GBstM+nsjK4P/161Peu4RfRmB8f0r+7CdWlG Dxcbrtr5pf+4TeKtPPIOv9QobeVPCxcCN2Ec3Pb/+LBjy3f/XrJYzzS0yAWz6gkr 2TB67Kuvp9wTCLZcyxu8fB10L4lT3cNOrwQ2Xr8FjJdJJXrPp6Dol3P5TGHdbpD4 K0F3wOw7ZNjWH6RmhKJXEFSkzX4VFtKONMItZlCtgqubObvWEbpUvsoC95hfs8er IIAlPNh48LxtTrEpyRDu2hqd/XTx52Rpcut1jfRo5rvaKAfZl2YGalnYX0NllFjo P1wpmI2ZJSMxfKaopeFLjwac9ri1IKicJaahGryU1r82YdMDrcDmoMJ7Bu8JsZoC NBzVc9mFmiv11MdyIUUbPsnVWXzhaDjkXedPuRSjWriODk2JzQf5t3NIS1kEyU8I lsCU16CWndH4+l7Kdg3G5BGFGCpM1/ubYobiJObUjrahwE2TGNrytu49ESm5eUdy LVbOwoq1NWg+M6nGLnPyZUEz0emorXbmebVzGFyl7NX6cIh31yNXoupvR+O9Gm/L jQmD9Mhfnb5Vi/N2KEl2Io4udVMOX84/vqALWN+09YgretG3MY4V1QywBbA8ZZJk 8bpEVsTrBJNFpZq8rF08t5O7jYs9AfzZ5qWEehBIus1AhpyVz/kSj+E9Bc7FbYRG lgFwudjhcxnLZqk+vBXh =B0Ry -----END PGP SIGNATURE----- --qkHf0G7WFcstcsFV7l4rWHvsuGQw2vRUe-- From owner-svn-src-head@freebsd.org Mon Jul 31 05:23:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E5ACDCA35A; Mon, 31 Jul 2017 05:23:26 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 224F7683A1; Mon, 31 Jul 2017 05:23:25 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id c3AhdiB1sMaqMc3AidJ8xw; Sun, 30 Jul 2017 23:23:19 -0600 X-Authority-Analysis: v=2.2 cv=Qc8WhoTv c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=G3gG6ho9WtcA:10 a=SWg00rOMAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=r2EcXQugN9ykcdfzfG0A:9 a=CjuIK1q_8ugA:10 a=nWvTgx2JuP7DHgfbJPXu:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 434FE3DF; Sun, 30 Jul 2017 22:23:15 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v6V5Lxs6004242; Sun, 30 Jul 2017 22:21:59 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201707310521.v6V5Lxs6004242@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Xin Li cc: Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, d@delphij.net Subject: Re: svn commit: r321605 - head/contrib/ipfilter In-Reply-To: Message from Xin Li of "Sun, 30 Jul 2017 20:25:19 -0700." <59e80a44-d9de-5081-9eda-f068188b843f@delphij.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 30 Jul 2017 22:21:59 -0700 X-CMAE-Envelope: MS4wfCNe+NdSOKEpMiS/Kbc5T7bdvTawLBc+gWGL2+kPTDEMQPy4wiXXvJxcqDjGWb2uwsz3HgMvyAaaHAC4RsimWNhzCQGKD5lh2YoQbkNAKBSAeQeOSClW osRFjtCWpeCwRUCMUCDYNnHmh+VCuImSfdiaZusQHsQLv8129wmsws4uBsPnMd2efLdLxmgVok3MLUjB2RCDFslrMMpENkkyylNOXA8xDVPSIVrRU+8Eajqw BWebfzV65c/a3KRpPQFr1+CFC0Xv9+i3hS2kVqL/VfqvvIiAmDPclfheNEThwT+/GRKbSH7wFb4g2AdOczIRd77rKeAMgVCFk6/0y9Fiy+w= X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 05:23:26 -0000 In message <59e80a44-d9de-5081-9eda-f068188b843f@delphij.net>, Xin Li writes: > On 7/26/17 23:26, Cy Schubert wrote: > > Author: cy > > Date: Thu Jul 27 06:26:15 2017 > > New Revision: 321605 > > URL: https://svnweb.freebsd.org/changeset/base/321605 > >=20 > > Log: > > As in r315225, discard 3072 bytes of RC4 bytestream instead of 1024. > > =20 > > PR: 217920 > > Submitted by: codarren@hackers.mu > > Reviewed by: emaste, cem > > Approved by: so (implicit, in r315225) > > Why ipfilter is using its own pseudo random number generator? Please > remove them altogether and use the system PRNG instead. It uses this code when it builds the kernel sources in a userland program called ipftest. ipftest is a userland application outside of the kernel in which users pass generated or captured packets into it to test arbitrary ipfilter rules, which are separate from those in the kernel. ipftest is a rule testing application. ipftest is currently broken (it segfaults) and in my queue for loving attention. I'll look into using the libkern version of arc4rand(9) in this userland utility. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Mon Jul 31 05:28:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A6EEDCA469; Mon, 31 Jul 2017 05:28:37 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id EAE446860E; Mon, 31 Jul 2017 05:28:36 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id c3FldiCCbMaqMc3FmdJ9QJ; Sun, 30 Jul 2017 23:28:30 -0600 X-Authority-Analysis: v=2.2 cv=Qc8WhoTv c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=G3gG6ho9WtcA:10 a=SWg00rOMAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=jfMoK7GJBfBctF8Pp8sA:9 a=CjuIK1q_8ugA:10 a=nWvTgx2JuP7DHgfbJPXu:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 03EB33F5; Sun, 30 Jul 2017 22:28:28 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v6V5RDRJ004333; Sun, 30 Jul 2017 22:27:13 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201707310527.v6V5RDRJ004333@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Xin Li , Cy Schubert cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, d@delphij.net Subject: Re: svn commit: r321605 - head/contrib/ipfilter In-Reply-To: Message from Cy Schubert of "Sun, 30 Jul 2017 22:21:59 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 30 Jul 2017 22:27:13 -0700 X-CMAE-Envelope: MS4wfI0yYcNQFo3jw2BQXfLyntdqsYItq3Gzq6b2vKVJhcBpNgvmLXAAvXdDc7JwTZ/h3pQg4T5onpMhDtZDAcusCKGHDgiQfLTCDpauxnFzgXA2PO873cpa n0Dd4gTIGKH+kwZE8UbSLfq1BTLDhgt+P+1DiyoftgfbPV0wvGyQfCypeefdhFV7mBSvZQJaLJzDX5dVEifMaO3U65Sj0YcLLIJovJ2IP09OIJUHzR5VdNwI N3tT22n2Sl38L5bON//hC/mzpBkHtbbBaRpMXto/mXa+OHlBDKl0P/LWaoTPDwPcTYNo/11Xvsu5lrkmY+/ko9XvVolp77CnHjs+j745oS4= X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 05:28:37 -0000 Cy Schubert writes: > In message <59e80a44-d9de-5081-9eda-f068188b843f@delphij.net>, Xin Li > writes: > > On 7/26/17 23:26, Cy Schubert wrote: > > > Author: cy > > > Date: Thu Jul 27 06:26:15 2017 > > > New Revision: 321605 > > > URL: https://svnweb.freebsd.org/changeset/base/321605 > > >=20 > > > Log: > > > As in r315225, discard 3072 bytes of RC4 bytestream instead of 1024. > > > =20 > > > PR: 217920 > > > Submitted by: codarren@hackers.mu > > > Reviewed by: emaste, cem > > > Approved by: so (implicit, in r315225) > > > > Why ipfilter is using its own pseudo random number generator? Please > > remove them altogether and use the system PRNG instead. > > It uses this code when it builds the kernel sources in a userland program > called ipftest. ipftest is a userland application outside of the kernel in > which users pass generated or captured packets into it to test arbitrary > ipfilter rules, which are separate from those in the kernel. ipftest is a > rule testing application. ipftest is currently broken (it segfaults) and in > my queue for loving attention. I'll look into using the libkern version of > arc4rand(9) in this userland utility. This will take a little more surgery than initially thought. make: "/export/home/cy/freebsd/svn/current/share/mk/src.libnames.mk" line 563: /export/home/cy/freebsd/svn/current/sbin/ipf/ipftest: Invalid LIBADD used which may need to be added to src.libnames.mk: libkern Probably not a good idea anyway to reference libkern from a userland utility. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Mon Jul 31 06:17:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C704DCAC83; Mon, 31 Jul 2017 06:17:22 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3396D6966D; Mon, 31 Jul 2017 06:17:21 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id c411diM2nMaqMc412dJDBY; Mon, 31 Jul 2017 00:17:20 -0600 X-Authority-Analysis: v=2.2 cv=Qc8WhoTv c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=G3gG6ho9WtcA:10 a=VxmjJ2MpAAAA:8 a=SWg00rOMAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=aQURqbsA0iTKZVjtE9oA:9 a=gvgE5aWGGUghFNBC:21 a=zhIP_C7Dr5RDXHsw:21 a=CjuIK1q_8ugA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=nWvTgx2JuP7DHgfbJPXu:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 1C4C540B; Sun, 30 Jul 2017 23:17:19 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v6V6G36T052681; Sun, 30 Jul 2017 23:16:03 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201707310616.v6V6G36T052681@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Xin Li , Cy Schubert cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, d@delphij.net Subject: Re: svn commit: r321605 - head/contrib/ipfilter In-Reply-To: Message from Cy Schubert of "Sun, 30 Jul 2017 22:27:13 -0700." <201707310527.v6V5RDRJ004333@slippy.cwsent.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 30 Jul 2017 23:16:03 -0700 X-CMAE-Envelope: MS4wfC2/41cM6FHv14ZG9j1laIZn9h7v92Yqpc61RPF98kpyNX7B+zaAqpwj5gIWgOGiiBa4D8v48tnd8iBSFTKom6x0zKMtFtZvEiuFp9OzJ2NO/YWPu/ns lPE2mm7YwgX2+TELPfwd+GFasjnRKmRHpjNs14ogwyxNBG+u7lvzurkOWHVx27VkjbSZWra3B2PP97iSCPD0v54rT2tL8K9CPFj1U4W5bksodHaS2dcc+rgt HXSQTF+wgw+dh2sPF8JswH7BfUoBVzCfYWj9UVj364bkDlpU+sRwAIB2JAVUVQn0zkISN6wbmdzK0sBL1zzRma8Sk+0uWrBddsv00QG61ls= X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 06:17:22 -0000 In message <201707310527.v6V5RDRJ004333@slippy.cwsent.com>, Cy Schubert writes: > Cy Schubert writes: > > In message <59e80a44-d9de-5081-9eda-f068188b843f@delphij.net>, Xin Li > > writes: > > > On 7/26/17 23:26, Cy Schubert wrote: > > > > Author: cy > > > > Date: Thu Jul 27 06:26:15 2017 > > > > New Revision: 321605 > > > > URL: https://svnweb.freebsd.org/changeset/base/321605 > > > >=20 > > > > Log: > > > > As in r315225, discard 3072 bytes of RC4 bytestream instead of 1024. > > > > =20 > > > > PR: 217920 > > > > Submitted by: codarren@hackers.mu > > > > Reviewed by: emaste, cem > > > > Approved by: so (implicit, in r315225) > > > > > > Why ipfilter is using its own pseudo random number generator? Please > > > remove them altogether and use the system PRNG instead. > > > > It uses this code when it builds the kernel sources in a userland program > > called ipftest. ipftest is a userland application outside of the kernel in > > which users pass generated or captured packets into it to test arbitrary > > ipfilter rules, which are separate from those in the kernel. ipftest is a > > rule testing application. ipftest is currently broken (it segfaults) and in > > > my queue for loving attention. I'll look into using the libkern version of > > arc4rand(9) in this userland utility. > > This will take a little more surgery than initially thought. > > make: "/export/home/cy/freebsd/svn/current/share/mk/src.libnames.mk" line > 563: /export/home/cy/freebsd/svn/current/sbin/ipf/ipftest: Invalid LIBADD > used which may need to be added to src.libnames.mk: libkern > > Probably not a good idea anyway to reference libkern from a userland > utility. Late night moving furniture. Sorry, I should have worded this better. This is an approximation of the libkern arc4rand(9) used in the ipftest(1) userland arbitrary rule testing utility. IP Filter "duplicates" a number of kernel function calls, including this one, to facilitate ipftest's use of ipfilter's kernel sources in the userland utility. My previous email's wording was disrespectful and simply bad. My apologies. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Mon Jul 31 07:18:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6228DCBD7F; Mon, 31 Jul 2017 07:18:16 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A4796B22B; Mon, 31 Jul 2017 07:18:16 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6V7IFoT095307; Mon, 31 Jul 2017 07:18:15 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6V7IFmv095303; Mon, 31 Jul 2017 07:18:15 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201707310718.v6V7IFmv095303@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 31 Jul 2017 07:18:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321762 - in head: contrib/hyperv/tools/scripts etc/devd libexec/hyperv X-SVN-Group: head X-SVN-Commit-Author: sephe X-SVN-Commit-Paths: in head: contrib/hyperv/tools/scripts etc/devd libexec/hyperv X-SVN-Commit-Revision: 321762 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 07:18:16 -0000 Author: sephe Date: Mon Jul 31 07:18:15 2017 New Revision: 321762 URL: https://svnweb.freebsd.org/changeset/base/321762 Log: hyperv: Add VF bringup scripts and devd rules. How network VF works with hn(4) on Hyper-V in non-transparent mode: - Each network VF has a cooresponding hn(4). - The network VF and the it's cooresponding hn(4) have the same hardware address. - Once the network VF is up, e.g. ifconfig VF up: o All of the transmission should go through the network VF. o Most of the reception goes through the network VF. o Small amount of reception may go through the cooresponding hn(4). This reception will happen, even if the the cooresponding hn(4) is down. The cooresponding hn(4) will change the reception interface to the network VF, so that network layer and application layer will be tricked into thinking that these packets were received by the network VF. o The cooresponding hn(4) pretends the physical link is down. - Once the network VF is down or detached: o All of the transmission should go through the cooresponding hn(4). o All of the reception goes through the cooresponding hn(4). o The cooresponding hn(4) fallbacks to the original physical link detection logic. All these features are mainly used to help live migration, during which the network VF will be detached, while the network communication to the VM must not be cut off. In order to reach this level of live migration transparency, we use failover mode lagg(4) with the network VF and the cooresponding hn(4) attached to it. To ease user configuration for both network VF and non-network VF, the lagg(4) will be created by the following rules, and the configuration of the cooresponding hn(4) will be applied to the lagg(4) automatically. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11635 Added: head/contrib/hyperv/tools/scripts/hyperv_vfattach head/contrib/hyperv/tools/scripts/hyperv_vfup Modified: head/etc/devd/hyperv.conf head/libexec/hyperv/Makefile Added: head/contrib/hyperv/tools/scripts/hyperv_vfattach ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/hyperv/tools/scripts/hyperv_vfattach Mon Jul 31 07:18:15 2017 (r321762) @@ -0,0 +1,79 @@ +#!/bin/sh + +# +# If transparent VF is enabled, don't do anything. +# + +sysctl -n hw.hn.vf_transparent > /dev/null 2>&1 +if [ $? -ne 0 ] +then + # Old kernel; no transparent VF. + vf_transparent=0 +else + vf_transparent=`sysctl -n hw.hn.vf_transparent` +fi + +if [ $vf_transparent -ne 0 ] +then + # Transparent VF; done! + exit 0 +fi + +iface=$1 +delay=$2 + +if [ $delay -gt 0 ] +then + # + # Delayed VF up. + # + sleep $delay + ifconfig $iface up + # Done! + exit $? +fi + +# +# Check to see whether $iface is a VF or not. +# If $iface is a VF, bring it up now. +# + +# for hyperv_vf_delay +. /etc/rc.conf + +sysctl -n hw.hn.vflist > /dev/null 2>&1 +if [ $? -ne 0 ] +then + # Old kernel; nothing could be done properly. + exit 0 +fi +vf_list=`sysctl -n hw.hn.vflist` + +for vf in $vf_list +do + if [ $vf = $iface ] + then + # + # Linger a little bit (at least 2 seconds) mainly to + # make sure that $iface is fully attached. + # + # NOTE: + # In Azure hyperv_vf_delay should be configured to a + # large value, e.g. 120 seconds, to avoid racing cloud + # agent goofs. + # + test $hyperv_vf_delay -ge 2 > /dev/null 2>&1 + if [ $? -ne 0 ] + then + hyperv_vf_delay=2 + fi + # + # NOTE: + # "(sleep ..; ifconfig .. up) > /dev/null 2>&1 &" + # does _not_ work. + # + daemon -f /usr/libexec/hyperv/hyperv_vfattach \ + $iface $hyperv_vf_delay + break + fi +done Added: head/contrib/hyperv/tools/scripts/hyperv_vfup ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/hyperv/tools/scripts/hyperv_vfup Mon Jul 31 07:18:15 2017 (r321762) @@ -0,0 +1,119 @@ +#!/bin/sh + +. /etc/rc.subr +. /etc/network.subr + +load_rc_config netif + +# +# Customized per-interface setup, e.g. hyperv_vfup.hn1 +# +# NOTE-CUSTOMIZE: +# Comment this out, if this script is used as template +# for the customized per-interface setup. +# +if [ -f /usr/libexec/hyperv/hyperv_vfup.$1 ] +then + /usr/libexec/hyperv/hyperv_vfup.$1 + exit $? +fi + +# NOTE-CUSTOMIZE: +#hn=${0##*.} +hn=$1 +hn_unit=`echo $hn | sed 's/[^0-9]*//g'` + +vf=`sysctl -n dev.hn.$hn_unit.vf` +if [ ! $vf ] +then + # Race happened; VF was removed, before we ran. + echo "$hn: VF was detached" + exit 0 +fi + +# +# Create laggX for hnX. +# Add VF and hnX to laggX. +# + +lagg=lagg$hn_unit + +ifconfig $lagg > /dev/null 2>&1 +if [ $? -ne 0 ] +then + # + # No laggX, create it now. + # + ifconfig $lagg create > /dev/null 2>&1 + if [ $? -ne 0 ] + then + echo "$lagg creation failed" + exit 1 + fi + + # + # Configure laggX (failover), add hnX and VF to it. + # + ifconfig $lagg laggproto failover laggport $hn laggport $vf + ifconfig $lagg inet6 no_dad + + # + # Stop dhclient on hnX, if any. + # + pidfile=/var/run/dhclient.$hn.pid + if [ -f $pidfile ] + then + kill -TERM `cat $pidfile` + fi + + # + # Remove all configured IPv4 addresses on hnX, e.g. + # configured by dhclient. laggX will take over the + # network operations. + # + while true + do + ifconfig $hn -alias > /dev/null 2>&1 + if [ $? -ne 0 ] + then + break + fi + done + + # TODO: Remove IPv6 addresses on hnX + + # + # Use hnX's configuration for laggX + # + # NOTE-CUSTOMIZE: + # If this script is used as template for the customized + # per-interface setup, replace this with whatever you + # want to do with the laggX. + # + if dhcpif $hn; + then + ifconfig $lagg up + if syncdhcpif $hn; + then + dhclient $lagg + else + dhclient -b $lagg + fi + else + ifconfig_args=`ifconfig_getargs $hn` + if [ -n "$ifconfig_args" ] + then + ifconfig $lagg $ifconfig_args + fi + fi +else + # + # laggX exists. Check whether VF was there or not. + # If VF was not added to laggX, add it now. + # + ifconfig $lagg | grep "laggport: $vf" > /dev/null 2>&1 + if [ $? -ne 0 ] + then + ifconfig $lagg laggport $vf + fi +fi Modified: head/etc/devd/hyperv.conf ============================================================================== --- head/etc/devd/hyperv.conf Mon Jul 31 06:53:43 2017 (r321761) +++ head/etc/devd/hyperv.conf Mon Jul 31 07:18:15 2017 (r321762) @@ -33,3 +33,76 @@ notify 11 { match "cdev" "hv_fsvss_dev"; action "pkill -x hv_vss_daemon"; }; + +# +# Rules for non-transparent network VF. +# +# How network VF works with hn(4) on Hyper-V in non-transparent mode: +# +# - Each network VF has a cooresponding hn(4). +# - The network VF and the it's cooresponding hn(4) have the same hardware +# address. +# - Once the network VF is up, e.g. ifconfig VF up: +# o All of the transmission should go through the network VF. +# o Most of the reception goes through the network VF. +# o Small amount of reception may go through the cooresponding hn(4). +# This reception will happen, even if the the cooresponding hn(4) is +# down. The cooresponding hn(4) will change the reception interface +# to the network VF, so that network layer and application layer will +# be tricked into thinking that these packets were received by the +# network VF. +# o The cooresponding hn(4) pretends the physical link is down. +# - Once the network VF is down or detached: +# o All of the transmission should go through the cooresponding hn(4). +# o All of the reception goes through the cooresponding hn(4). +# o The cooresponding hn(4) fallbacks to the original physical link +# detection logic. +# +# All these features are mainly used to help live migration, during which +# the network VF will be detached, while the network communication to the +# VM must not be cut off. In order to reach this level of live migration +# transparency, we use failover mode lagg(4) with the network VF and the +# cooresponding hn(4) attached to it. +# +# To ease user configuration for both network VF and non-network VF, the +# lagg(4) will be created by the following rules, and the configuration +# of the cooresponding hn(4) will be applied to the lagg(4) automatically. +# +# NOTE: +# If live migration is not needed at all, the following rules could be +# commented out, and the network VF interface could be used exclusively. +# Most often the cooresponding hn(4) could be completely ignored. +# +# +# Default workflow for the network VF bringup: +# 1) ETHERNET/IFATTACH -> VF interface up (delayed by rc.conf hyperv_vf_delay +# seconds). This operation will trigger HYPERV_NIC_VF/VF_UP. +# 2) HYPERV_NIC_VF/VF_UP: +# a) Create laggX coresponding to hnX. +# b) Add hnX and VF to laggX. +# c) Whack all previous network configuration on hnX, including stopping +# dhclient. +# d) Apply rc.conf ifconfig_hnX to laggX; i.e. including starting dhclient. +# +# NOTE: +# HYPERV_NIC_VF/VF_UP action script could be customized per-interface by +# adding /usr/libexec/hyperv/hyperv_vfup.hnX script. +# /usr/libexec/hyperv/hyperv_vfup could be used as the template for the +# customized per-interface script. +# +# NOTE: +# For transparent network VF, hyperv_vfattach does nothing and +# HYPERV_NIC_VF/VF_UP will not be triggered at all. +# + +notify 10 { + match "system" "HYPERV_NIC_VF"; + match "type" "VF_UP"; + action "/usr/libexec/hyperv/hyperv_vfup $subsystem"; +}; + +notify 10 { + match "system" "ETHERNET"; + match "type" "IFATTACH"; + action "/usr/libexec/hyperv/hyperv_vfattach $subsystem 0"; +}; Modified: head/libexec/hyperv/Makefile ============================================================================== --- head/libexec/hyperv/Makefile Mon Jul 31 06:53:43 2017 (r321761) +++ head/libexec/hyperv/Makefile Mon Jul 31 07:18:15 2017 (r321762) @@ -5,5 +5,6 @@ BINDIR= ${LIBEXECDIR}/hyperv SCRIPTS= hv_set_ifconfig hv_get_dns_info hv_get_dhcp_info +SCRIPTS+= hyperv_vfattach hyperv_vfup .include From owner-svn-src-head@freebsd.org Mon Jul 31 07:48:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C438DCC636; Mon, 31 Jul 2017 07:48:10 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9AF06C16A; Mon, 31 Jul 2017 07:48:09 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6V7m9NY007661; Mon, 31 Jul 2017 07:48:09 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6V7m9VS007660; Mon, 31 Jul 2017 07:48:09 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201707310748.v6V7m9VS007660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 31 Jul 2017 07:48:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321763 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: sephe X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321763 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 07:48:10 -0000 Author: sephe Date: Mon Jul 31 07:48:08 2017 New Revision: 321763 URL: https://svnweb.freebsd.org/changeset/base/321763 Log: calendar: Add myself. Reminded by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 07:18:15 2017 (r321762) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 07:48:08 2017 (r321763) @@ -364,6 +364,7 @@ 11/21 Mark Johnston born in Toronto, Ontario, Canada, 1989 11/22 Frederic Culot born in Saint-Germain-En-Laye, France, 1976 11/23 Josef Lawrence Karthauser born in Pembury, Kent, United Kingdom, 1972 +11/23 Sepherosa Ziehau born in Shanghai, China, 1980 11/24 Andrey Zakhvatov born in Chelyabinsk, Russian Federation, 1974 11/24 Daniel Gerzo born in Bratislava, Slovakia, 1986 11/28 Nik Clayton born in Peterborough, United Kingdom, 1973 From owner-svn-src-head@freebsd.org Mon Jul 31 07:58:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 756B5DCC849; Mon, 31 Jul 2017 07:58:31 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3260F6C586; Mon, 31 Jul 2017 07:58:31 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6V7wUwd011567; Mon, 31 Jul 2017 07:58:30 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6V7wUZ4011566; Mon, 31 Jul 2017 07:58:30 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201707310758.v6V7wUZ4011566@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 31 Jul 2017 07:58:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321764 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321764 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 07:58:31 -0000 Author: manu Date: Mon Jul 31 07:58:29 2017 New Revision: 321764 URL: https://svnweb.freebsd.org/changeset/base/321764 Log: Add myself to calendar Reminded by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 07:48:08 2017 (r321763) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 07:58:29 2017 (r321764) @@ -384,6 +384,7 @@ 12/18 Muhammad Moinur Rahman born in Dhaka, Bangladesh, 1983 12/18 Semen Ustimenko born in Novosibirsk, Russian Federation, 1979 12/19 Stephen Hurd born in Estevan, Saskatchewan, Canada, 1975 +12/19 Emmanuel Vadot born in Decines-Charpieu, France, 1983 12/21 Rong-En Fan born in Taipei, Taiwan, Republic of China, 1982 12/22 Maxim Sobolev born in Dnepropetrovsk, Ukraine, 1976 12/23 Sean Chittenden born in Seattle, Washington, United States, 1979 From owner-svn-src-head@freebsd.org Mon Jul 31 08:10:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F31CDCCBB4; Mon, 31 Jul 2017 08:10:04 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD0916CABF; Mon, 31 Jul 2017 08:10:03 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6V8A2LR015718; Mon, 31 Jul 2017 08:10:02 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6V8A2Ht015717; Mon, 31 Jul 2017 08:10:02 GMT (envelope-from br@FreeBSD.org) Message-Id: <201707310810.v6V8A2Ht015717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Mon, 31 Jul 2017 08:10:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321766 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321766 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 08:10:04 -0000 Author: br Date: Mon Jul 31 08:10:02 2017 New Revision: 321766 URL: https://svnweb.freebsd.org/changeset/base/321766 Log: Add my birthday. Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 08:02:25 2017 (r321765) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 08:10:02 2017 (r321766) @@ -18,6 +18,7 @@ 01/10 Jean-Yves Lefort born in Charleroi, Belgium, 1980 01/12 Yen-Ming Lee born in Taipei, Taiwan, Republic of China, 1977 01/12 Ying-Chieh Liao born in Taipei, Taiwan, Republic of China, 1979 +01/13 Ruslan Bukin born in Dudinka, Russian Federation, 1985 01/14 Yi-Jheng Lin born in Taichung, Taiwan, Republic of China, 1985 01/16 Ariff Abdullah born in Kuala Lumpur, Malaysia, 1978 01/16 Dmitry Sivachenko born in Moscow, USSR, 1978 From owner-svn-src-head@freebsd.org Mon Jul 31 08:11:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86296DCCD30; Mon, 31 Jul 2017 08:11:06 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 536956CC66; Mon, 31 Jul 2017 08:11:06 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6V8B5aE017948; Mon, 31 Jul 2017 08:11:05 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6V8B55p017947; Mon, 31 Jul 2017 08:11:05 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201707310811.v6V8B55p017947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Mon, 31 Jul 2017 08:11:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321767 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321767 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 08:11:06 -0000 Author: tsoome Date: Mon Jul 31 08:11:05 2017 New Revision: 321767 URL: https://svnweb.freebsd.org/changeset/base/321767 Log: Add myself to calendar Reminded by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 08:10:02 2017 (r321766) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 08:11:05 2017 (r321767) @@ -343,6 +343,7 @@ 10/25 Eric Melville born in Los Gatos, California, United States, 1980 10/25 Julien Laffaye born in Toulouse, France, 1988 10/25 Ashish SHUKLA born in Kanpur, India, 1985 +10/25 Toomas Soome born Estonia, 1971 10/26 Matthew Ahrens born in United States, 1979 10/26 Philip M. Gollucci born in Silver Spring, Maryland, United States, 1979 10/27 Takanori Watanabe born in Numazu, Shizuoka, Japan, 1972 From owner-svn-src-head@freebsd.org Mon Jul 31 08:11:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF7F0DCCDA2; Mon, 31 Jul 2017 08:11:59 +0000 (UTC) (envelope-from romain@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CD846CF31; Mon, 31 Jul 2017 08:11:59 +0000 (UTC) (envelope-from romain@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6V8Bwbh019423; Mon, 31 Jul 2017 08:11:58 GMT (envelope-from romain@FreeBSD.org) Received: (from romain@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6V8Bwre019422; Mon, 31 Jul 2017 08:11:58 GMT (envelope-from romain@FreeBSD.org) Message-Id: <201707310811.v6V8Bwre019422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: romain set sender to romain@FreeBSD.org using -f From: =?UTF-8?Q?Romain_Tarti=c3=a8re?= Date: Mon, 31 Jul 2017 08:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321768 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: romain X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321768 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 08:11:59 -0000 Author: romain (ports committer) Date: Mon Jul 31 08:11:58 2017 New Revision: 321768 URL: https://svnweb.freebsd.org/changeset/base/321768 Log: Add myself Reminded by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 08:11:05 2017 (r321767) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 08:11:58 2017 (r321768) @@ -340,6 +340,7 @@ 10/21 Ben Smithurst born in Sheffield, South Yorkshire, United Kingdom, 1981 10/22 Jean-Sebastien Pedron born in Redon, Ille-et-Vilaine, France, 1980 10/23 Mario Sergio Fujikawa Ferreira born in Brasilia, Distrito Federal, Brazil, 1976 +10/23 Romain Tartière born in Clermont-Ferrand, France, 1984 10/25 Eric Melville born in Los Gatos, California, United States, 1980 10/25 Julien Laffaye born in Toulouse, France, 1988 10/25 Ashish SHUKLA born in Kanpur, India, 1985 From owner-svn-src-head@freebsd.org Mon Jul 31 08:16:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 134E3DCCE2D; Mon, 31 Jul 2017 08:16:14 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C697C6D0F8; Mon, 31 Jul 2017 08:16:13 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6V8GCLb019618; Mon, 31 Jul 2017 08:16:12 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6V8GCa0019617; Mon, 31 Jul 2017 08:16:12 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <201707310816.v6V8GCa0019617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Mon, 31 Jul 2017 08:16:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321769 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: n_hibma X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321769 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 08:16:14 -0000 Author: n_hibma Date: Mon Jul 31 08:16:12 2017 New Revision: 321769 URL: https://svnweb.freebsd.org/changeset/base/321769 Log: Add my birthday entry to the calendar file. Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 08:11:58 2017 (r321768) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 08:16:12 2017 (r321769) @@ -34,6 +34,7 @@ 01/23 Hideyuki KURASHINA born in Niigata, Japan, 1982 01/24 Fabien Thomas born in Avignon, France, 1971 01/24 Matteo Riondato born in Padova, Italy, 1986 +01/25 Nick Hibma born in Groningen, the Netherlands, 1972 01/25 Bernd Walter born in Moers, Nordrhein-Westfalen, Germany, 1974 01/26 Andrew Gallatin born in Buffalo, New York, United States, 1970 01/27 Nick Sayer born in San Diego, California, United States, 1968 From owner-svn-src-head@freebsd.org Mon Jul 31 09:13:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC934DCE3F4; Mon, 31 Jul 2017 09:13:19 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 895F96F230; Mon, 31 Jul 2017 09:13:19 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6V9DIdd044419; Mon, 31 Jul 2017 09:13:18 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6V9DIp9044418; Mon, 31 Jul 2017 09:13:18 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201707310913.v6V9DIp9044418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Mon, 31 Jul 2017 09:13:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321771 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321771 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 09:13:19 -0000 Author: kp Date: Mon Jul 31 09:13:18 2017 New Revision: 321771 URL: https://svnweb.freebsd.org/changeset/base/321771 Log: Add myself to calendar Reminded by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 08:19:44 2017 (r321770) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 09:13:18 2017 (r321771) @@ -18,6 +18,7 @@ 01/10 Jean-Yves Lefort born in Charleroi, Belgium, 1980 01/12 Yen-Ming Lee born in Taipei, Taiwan, Republic of China, 1977 01/12 Ying-Chieh Liao born in Taipei, Taiwan, Republic of China, 1979 +01/12 Kristof Provost born in Aalst, Belgium, 1983 01/13 Ruslan Bukin born in Dudinka, Russian Federation, 1985 01/14 Yi-Jheng Lin born in Taichung, Taiwan, Republic of China, 1985 01/16 Ariff Abdullah born in Kuala Lumpur, Malaysia, 1978 From owner-svn-src-head@freebsd.org Mon Jul 31 09:15:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D94BDCE49E; Mon, 31 Jul 2017 09:15:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 094236F395; Mon, 31 Jul 2017 09:15:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6V9FGj8044535; Mon, 31 Jul 2017 09:15:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6V9FFRw044532; Mon, 31 Jul 2017 09:15:15 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201707310915.v6V9FFRw044532@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 31 Jul 2017 09:15:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321772 - in head/sys/dev/mlx4: . mlx4_core mlx4_ib X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev/mlx4: . mlx4_core mlx4_ib X-SVN-Commit-Revision: 321772 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 09:15:17 -0000 Author: hselasky Date: Mon Jul 31 09:15:15 2017 New Revision: 321772 URL: https://svnweb.freebsd.org/changeset/base/321772 Log: Fix broken usage of the mlx4_read_clock() function: - return value has too small width - cycle_t is unsigned and cannot be less than zero Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/dev/mlx4/device.h head/sys/dev/mlx4/mlx4_core/mlx4_main.c head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c Modified: head/sys/dev/mlx4/device.h ============================================================================== --- head/sys/dev/mlx4/device.h Mon Jul 31 09:13:18 2017 (r321771) +++ head/sys/dev/mlx4/device.h Mon Jul 31 09:15:15 2017 (r321772) @@ -1337,7 +1337,7 @@ int mlx4_get_roce_gid_from_slave(struct mlx4_dev *dev, int mlx4_FLOW_STEERING_IB_UC_QP_RANGE(struct mlx4_dev *dev, u32 min_range_qpn, u32 max_range_qpn); -int mlx4_read_clock(struct mlx4_dev *dev); +s64 mlx4_read_clock(struct mlx4_dev *dev); int mlx4_get_internal_clock_params(struct mlx4_dev *dev, struct mlx4_clock_params *params); Modified: head/sys/dev/mlx4/mlx4_core/mlx4_main.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_main.c Mon Jul 31 09:13:18 2017 (r321771) +++ head/sys/dev/mlx4/mlx4_core/mlx4_main.c Mon Jul 31 09:15:15 2017 (r321772) @@ -1793,10 +1793,10 @@ static void unmap_bf_area(struct mlx4_dev *dev) io_mapping_free(mlx4_priv(dev)->bf_mapping); } -int mlx4_read_clock(struct mlx4_dev *dev) +s64 mlx4_read_clock(struct mlx4_dev *dev) { u32 clockhi, clocklo, clockhi1; - cycle_t cycles; + s64 cycles; int i; struct mlx4_priv *priv = mlx4_priv(dev); @@ -1813,7 +1813,7 @@ int mlx4_read_clock(struct mlx4_dev *dev) cycles = (u64) clockhi << 32 | (u64) clocklo; - return cycles; + return cycles & CORE_CLOCK_MASK; } EXPORT_SYMBOL_GPL(mlx4_read_clock); Modified: head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c ============================================================================== --- head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c Mon Jul 31 09:13:18 2017 (r321771) +++ head/sys/dev/mlx4/mlx4_ib/mlx4_ib_main.c Mon Jul 31 09:15:15 2017 (r321772) @@ -877,12 +877,12 @@ static int mlx4_ib_query_values(struct ib_device *devi struct ib_device_values *values) { struct mlx4_ib_dev *dev = to_mdev(device); - cycle_t cycles; + s64 cycles; values->values_mask = 0; if (q_values & IBV_VALUES_HW_CLOCK) { cycles = mlx4_read_clock(dev->dev); - if (cycles < 0) { + if (cycles >= 0) { values->hwclock = cycles & CORE_CLOCK_MASK; values->values_mask |= IBV_VALUES_HW_CLOCK; } From owner-svn-src-head@freebsd.org Mon Jul 31 09:17:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82F07DCE716; Mon, 31 Jul 2017 09:17:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5161D6F5FA; Mon, 31 Jul 2017 09:17:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6V9HseO044663; Mon, 31 Jul 2017 09:17:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6V9HsjD044662; Mon, 31 Jul 2017 09:17:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201707310917.v6V9HsjD044662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 31 Jul 2017 09:17:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321773 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 321773 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 09:17:55 -0000 Author: hselasky Date: Mon Jul 31 09:17:54 2017 New Revision: 321773 URL: https://svnweb.freebsd.org/changeset/base/321773 Log: Remove cycle_t type from the LinuxKPI similar to Linux upstream. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/clocksource.h Modified: head/sys/compat/linuxkpi/common/include/linux/clocksource.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/clocksource.h Mon Jul 31 09:15:15 2017 (r321772) +++ head/sys/compat/linuxkpi/common/include/linux/clocksource.h Mon Jul 31 09:17:54 2017 (r321773) @@ -33,9 +33,6 @@ #include -#define CLOCKSOURCE_MASK(x) ((cycle_t)(-1ULL >> ((-(x)) & 63))) - -/* clocksource cycle base type */ -typedef u64 cycle_t; +#define CLOCKSOURCE_MASK(x) ((u64)(-1ULL >> ((-(x)) & 63))) #endif /* _LINUX_CLOCKSOURCE_H */ From owner-svn-src-head@freebsd.org Mon Jul 31 09:18:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FBE9DCE791; Mon, 31 Jul 2017 09:18:55 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EFCC6F741; Mon, 31 Jul 2017 09:18:55 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6V9IseT044751; Mon, 31 Jul 2017 09:18:54 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6V9IsB2044750; Mon, 31 Jul 2017 09:18:54 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201707310918.v6V9IsB2044750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 31 Jul 2017 09:18:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321774 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321774 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 09:18:55 -0000 Author: eugen (ports committer) Date: Mon Jul 31 09:18:53 2017 New Revision: 321774 URL: https://svnweb.freebsd.org/changeset/base/321774 Log: Add myself. Reminded by: mckusick Approved by: vsevolod (mentor) Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 09:17:54 2017 (r321773) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 09:18:53 2017 (r321774) @@ -332,6 +332,7 @@ 10/09 Stefan Walter born in Werne, Nordrhein-Westfalen, Germany, 1978 10/12 Pawel Jakub Dawidek born in Radzyn Podlaski, Poland, 1980 10/15 Maxim Konovalov born in Khabarovsk, USSR, 1973 +10/15 Eugene Grosbein born in Novokuznetsk, Russian Republic, USSR, 1976 10/16 Remko Lodder born in Rotterdam, the Netherlands, 1983 10/17 Maho NAKATA born in Osaka, Japan, 1974 10/18 Sheldon Hearn born in Cape Town, Western Cape, South Africa, 1974 From owner-svn-src-head@freebsd.org Mon Jul 31 09:46:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD6D5DCEC6C; Mon, 31 Jul 2017 09:46:49 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F48C702C2; Mon, 31 Jul 2017 09:46:49 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6V9kmEk056875; Mon, 31 Jul 2017 09:46:48 GMT (envelope-from sgalabov@FreeBSD.org) Received: (from sgalabov@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6V9kmkI056874; Mon, 31 Jul 2017 09:46:48 GMT (envelope-from sgalabov@FreeBSD.org) Message-Id: <201707310946.v6V9kmkI056874@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sgalabov set sender to sgalabov@FreeBSD.org using -f From: Stanislav Galabov Date: Mon, 31 Jul 2017 09:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321776 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: sgalabov X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321776 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 09:46:50 -0000 Author: sgalabov Date: Mon Jul 31 09:46:48 2017 New Revision: 321776 URL: https://svnweb.freebsd.org/changeset/base/321776 Log: Add myself to calendar Reminded by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 09:28:43 2017 (r321775) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 09:46:48 2017 (r321776) @@ -207,6 +207,7 @@ 06/06 Alan Eldridge died in Denver, Colorado, 2003 06/07 Jimmy Olgeni born in Milano, Italy, 1976 06/07 Benjamin Close born in Adelaide, Australia, 1978 +06/09 Stanislav Galabov born in Sofia, Bulgaria 1978 06/11 Alonso Cardenas Marquez born in Arequipa, Peru, 1979 06/14 Josh Paetzel born in Minneapolis, Minnesota, United States, 1973 06/17 Tilman Linneweh born in Weinheim, Baden-Wuerttemberg, Germany, 1978 From owner-svn-src-head@freebsd.org Mon Jul 31 11:04:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 008E3DD0368; Mon, 31 Jul 2017 11:04:37 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D06BE72A4F; Mon, 31 Jul 2017 11:04:36 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VB4aFe089405; Mon, 31 Jul 2017 11:04:36 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VB4ZeM089400; Mon, 31 Jul 2017 11:04:35 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201707311104.v6VB4ZeM089400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 31 Jul 2017 11:04:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321779 - in head/sys: net netipsec X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in head/sys: net netipsec X-SVN-Commit-Revision: 321779 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 11:04:37 -0000 Author: ae Date: Mon Jul 31 11:04:35 2017 New Revision: 321779 URL: https://svnweb.freebsd.org/changeset/base/321779 Log: Add inpcb pointer to struct ipsec_ctx_data and pass it to the pfil hook from enc_hhook(). This should solve the problem when pf is used with if_enc(4) interface, and outbound packet with existing PCB checked by pf, and this leads to deadlock due to pf does its own PCB lookup and tries to take rlock when wlock is already held. Now we pass PCB pointer if it is known to the pfil hook, this helps to avoid extra PCB lookup and thus rlock acquiring is not needed. For inbound packets it is safe to pass NULL, because we do not held any PCB locks yet. PR: 220217 MFC after: 3 weeks Sponsored by: Yandex LLC Modified: head/sys/net/if_enc.c head/sys/net/if_enc.h head/sys/netipsec/ipsec.h head/sys/netipsec/ipsec_input.c head/sys/netipsec/ipsec_output.c Modified: head/sys/net/if_enc.c ============================================================================== --- head/sys/net/if_enc.c Mon Jul 31 09:54:04 2017 (r321778) +++ head/sys/net/if_enc.c Mon Jul 31 11:04:35 2017 (r321779) @@ -284,7 +284,7 @@ enc_hhook(int32_t hhook_type, int32_t hhook_id, void * /* Make a packet looks like it was received on enc(4) */ rcvif = (*ctx->mp)->m_pkthdr.rcvif; (*ctx->mp)->m_pkthdr.rcvif = ifp; - if (pfil_run_hooks(ph, ctx->mp, ifp, pdir, NULL) != 0 || + if (pfil_run_hooks(ph, ctx->mp, ifp, pdir, ctx->inp) != 0 || *ctx->mp == NULL) { *ctx->mp = NULL; /* consumed by filter */ return (EACCES); Modified: head/sys/net/if_enc.h ============================================================================== --- head/sys/net/if_enc.h Mon Jul 31 09:54:04 2017 (r321778) +++ head/sys/net/if_enc.h Mon Jul 31 11:04:35 2017 (r321779) @@ -33,6 +33,7 @@ struct ipsec_ctx_data { struct mbuf **mp; struct secasvar *sav; + struct inpcb *inp; uint8_t af; #define IPSEC_ENC_BEFORE 0x01 #define IPSEC_ENC_AFTER 0x02 Modified: head/sys/netipsec/ipsec.h ============================================================================== --- head/sys/netipsec/ipsec.h Mon Jul 31 09:54:04 2017 (r321778) +++ head/sys/netipsec/ipsec.h Mon Jul 31 11:04:35 2017 (r321779) @@ -253,8 +253,9 @@ struct ipsecstat { #include struct ipsec_ctx_data; -#define IPSEC_INIT_CTX(_ctx, _mp, _sav, _af, _enc) do { \ +#define IPSEC_INIT_CTX(_ctx, _mp, _inp, _sav, _af, _enc) do { \ (_ctx)->mp = (_mp); \ + (_ctx)->inp = (_inp); \ (_ctx)->sav = (_sav); \ (_ctx)->af = (_af); \ (_ctx)->enc = (_enc); \ Modified: head/sys/netipsec/ipsec_input.c ============================================================================== --- head/sys/netipsec/ipsec_input.c Mon Jul 31 09:54:04 2017 (r321778) +++ head/sys/netipsec/ipsec_input.c Mon Jul 31 11:04:35 2017 (r321779) @@ -325,7 +325,7 @@ ipsec4_common_input_cb(struct mbuf *m, struct secasvar (prot == IPPROTO_UDP || prot == IPPROTO_TCP)) udp_ipsec_adjust_cksum(m, sav, prot, skip); - IPSEC_INIT_CTX(&ctx, &m, sav, AF_INET, IPSEC_ENC_BEFORE); + IPSEC_INIT_CTX(&ctx, &m, NULL, sav, AF_INET, IPSEC_ENC_BEFORE); if ((error = ipsec_run_hhooks(&ctx, HHOOK_TYPE_IPSEC_IN)) != 0) goto bad; ip = mtod(m, struct ip *); /* update pointer */ @@ -416,7 +416,7 @@ ipsec4_common_input_cb(struct mbuf *m, struct secasvar goto bad; } - IPSEC_INIT_CTX(&ctx, &m, sav, af, IPSEC_ENC_AFTER); + IPSEC_INIT_CTX(&ctx, &m, NULL, sav, af, IPSEC_ENC_AFTER); if ((error = ipsec_run_hhooks(&ctx, HHOOK_TYPE_IPSEC_IN)) != 0) goto bad; @@ -522,7 +522,7 @@ ipsec6_common_input_cb(struct mbuf *m, struct secasvar goto bad; } - IPSEC_INIT_CTX(&ctx, &m, sav, af, IPSEC_ENC_BEFORE); + IPSEC_INIT_CTX(&ctx, &m, NULL, sav, af, IPSEC_ENC_BEFORE); if ((error = ipsec_run_hhooks(&ctx, HHOOK_TYPE_IPSEC_IN)) != 0) goto bad; @@ -593,7 +593,7 @@ ipsec6_common_input_cb(struct mbuf *m, struct secasvar else #endif af = AF_INET6; - IPSEC_INIT_CTX(&ctx, &m, sav, af, IPSEC_ENC_AFTER); + IPSEC_INIT_CTX(&ctx, &m, NULL, sav, af, IPSEC_ENC_AFTER); if ((error = ipsec_run_hhooks(&ctx, HHOOK_TYPE_IPSEC_IN)) != 0) goto bad; if (skip == 0) { Modified: head/sys/netipsec/ipsec_output.c ============================================================================== --- head/sys/netipsec/ipsec_output.c Mon Jul 31 09:54:04 2017 (r321778) +++ head/sys/netipsec/ipsec_output.c Mon Jul 31 11:04:35 2017 (r321779) @@ -181,7 +181,8 @@ next: * IPsec output logic for IPv4. */ static int -ipsec4_perform_request(struct mbuf *m, struct secpolicy *sp, u_int idx) +ipsec4_perform_request(struct mbuf *m, struct secpolicy *sp, + struct inpcb *inp, u_int idx) { struct ipsec_ctx_data ctx; union sockaddr_union *dst; @@ -211,7 +212,7 @@ ipsec4_perform_request(struct mbuf *m, struct secpolic /* * XXXAE: most likely ip_sum at this point is wrong. */ - IPSEC_INIT_CTX(&ctx, &m, sav, AF_INET, IPSEC_ENC_BEFORE); + IPSEC_INIT_CTX(&ctx, &m, inp, sav, AF_INET, IPSEC_ENC_BEFORE); if ((error = ipsec_run_hhooks(&ctx, HHOOK_TYPE_IPSEC_OUT)) != 0) goto bad; @@ -235,9 +236,10 @@ ipsec4_perform_request(struct mbuf *m, struct secpolic /* XXXAE: IPSEC_OSTAT_INC(tunnel); */ goto bad; } + inp = NULL; } - IPSEC_INIT_CTX(&ctx, &m, sav, dst->sa.sa_family, IPSEC_ENC_AFTER); + IPSEC_INIT_CTX(&ctx, &m, inp, sav, dst->sa.sa_family, IPSEC_ENC_AFTER); if ((error = ipsec_run_hhooks(&ctx, HHOOK_TYPE_IPSEC_OUT)) != 0) goto bad; @@ -285,7 +287,7 @@ ipsec4_process_packet(struct mbuf *m, struct secpolicy struct inpcb *inp) { - return (ipsec4_perform_request(m, sp, 0)); + return (ipsec4_perform_request(m, sp, inp, 0)); } static int @@ -491,7 +493,8 @@ next: * IPsec output logic for IPv6. */ static int -ipsec6_perform_request(struct mbuf *m, struct secpolicy *sp, u_int idx) +ipsec6_perform_request(struct mbuf *m, struct secpolicy *sp, + struct inpcb *inp, u_int idx) { struct ipsec_ctx_data ctx; union sockaddr_union *dst; @@ -514,7 +517,7 @@ ipsec6_perform_request(struct mbuf *m, struct secpolic ip6 = mtod(m, struct ip6_hdr *); ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(*ip6)); - IPSEC_INIT_CTX(&ctx, &m, sav, AF_INET6, IPSEC_ENC_BEFORE); + IPSEC_INIT_CTX(&ctx, &m, inp, sav, AF_INET6, IPSEC_ENC_BEFORE); if ((error = ipsec_run_hhooks(&ctx, HHOOK_TYPE_IPSEC_OUT)) != 0) goto bad; @@ -540,9 +543,10 @@ ipsec6_perform_request(struct mbuf *m, struct secpolic /* XXXAE: IPSEC_OSTAT_INC(tunnel); */ goto bad; } + inp = NULL; } - IPSEC_INIT_CTX(&ctx, &m, sav, dst->sa.sa_family, IPSEC_ENC_AFTER); + IPSEC_INIT_CTX(&ctx, &m, inp, sav, dst->sa.sa_family, IPSEC_ENC_AFTER); if ((error = ipsec_run_hhooks(&ctx, HHOOK_TYPE_IPSEC_OUT)) != 0) goto bad; @@ -585,7 +589,7 @@ ipsec6_process_packet(struct mbuf *m, struct secpolicy struct inpcb *inp) { - return (ipsec6_perform_request(m, sp, 0)); + return (ipsec6_perform_request(m, sp, inp, 0)); } static int @@ -750,14 +754,14 @@ ipsec_process_done(struct mbuf *m, struct secpolicy *s case AF_INET: key_freesav(&sav); IPSECSTAT_INC(ips_out_bundlesa); - return (ipsec4_perform_request(m, sp, idx)); + return (ipsec4_perform_request(m, sp, NULL, idx)); /* NOTREACHED */ #endif #ifdef INET6 case AF_INET6: key_freesav(&sav); IPSEC6STAT_INC(ips_out_bundlesa); - return (ipsec6_perform_request(m, sp, idx)); + return (ipsec6_perform_request(m, sp, NULL, idx)); /* NOTREACHED */ #endif /* INET6 */ default: From owner-svn-src-head@freebsd.org Mon Jul 31 12:03:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99F59DD1E02; Mon, 31 Jul 2017 12:03:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68A5E746A4; Mon, 31 Jul 2017 12:03:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VC3jbS014105; Mon, 31 Jul 2017 12:03:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VC3jrX014104; Mon, 31 Jul 2017 12:03:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201707311203.v6VC3jrX014104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 31 Jul 2017 12:03:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321780 - head/sys/dev/mlx4/mlx4_ib X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx4/mlx4_ib X-SVN-Commit-Revision: 321780 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 12:03:46 -0000 Author: hselasky Date: Mon Jul 31 12:03:45 2017 New Revision: 321780 URL: https://svnweb.freebsd.org/changeset/base/321780 Log: Make sure on-stack buffer is properly aligned. Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mad.c Modified: head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mad.c ============================================================================== --- head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mad.c Mon Jul 31 11:04:35 2017 (r321779) +++ head/sys/dev/mlx4/mlx4_ib/mlx4_ib_mad.c Mon Jul 31 12:03:45 2017 (r321780) @@ -983,7 +983,7 @@ static int iboe_process_mad(struct ib_device *ibdev, i int err; u32 counter_index = dev->counters[port_num - 1].counter_index & 0xffff; u8 mode; - char counter_buf[MLX4_IF_STAT_SZ(1)]; + char counter_buf[MLX4_IF_STAT_SZ(1)] __aligned(8); union mlx4_counter *counter = (union mlx4_counter *) counter_buf; From owner-svn-src-head@freebsd.org Mon Jul 31 12:09:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71BEADAB172; Mon, 31 Jul 2017 12:09:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32DFD74989; Mon, 31 Jul 2017 12:09:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VC9PFj014390; Mon, 31 Jul 2017 12:09:25 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VC9O01014385; Mon, 31 Jul 2017 12:09:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201707311209.v6VC9O01014385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 31 Jul 2017 12:09:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321782 - in head/sys/dev/mlx4: . mlx4_core mlx4_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/dev/mlx4: . mlx4_core mlx4_en X-SVN-Commit-Revision: 321782 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 12:09:26 -0000 Author: hselasky Date: Mon Jul 31 12:09:24 2017 New Revision: 321782 URL: https://svnweb.freebsd.org/changeset/base/321782 Log: Remove some dead statistics related code and a structure field from the mlx4en driver which is used by its Linux counterpart, but not under FreeBSD. Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/dev/mlx4/device.h head/sys/dev/mlx4/mlx4_core/mlx4_port.c head/sys/dev/mlx4/mlx4_en/en.h head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c head/sys/dev/mlx4/stats.h Modified: head/sys/dev/mlx4/device.h ============================================================================== --- head/sys/dev/mlx4/device.h Mon Jul 31 12:08:44 2017 (r321781) +++ head/sys/dev/mlx4/device.h Mon Jul 31 12:09:24 2017 (r321782) @@ -1273,7 +1273,6 @@ int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, u64 mac); int mlx4_get_base_qpn(struct mlx4_dev *dev, u8 port); int __mlx4_replace_mac(struct mlx4_dev *dev, u8 port, int qpn, u64 new_mac); -void mlx4_set_stats_bitmap(struct mlx4_dev *dev, unsigned long *stats_bitmap); int mlx4_SET_PORT_general(struct mlx4_dev *dev, u8 port, int mtu, u8 pptx, u8 pfctx, u8 pprx, u8 pfcrx); int mlx4_SET_PORT_qpn_calc(struct mlx4_dev *dev, u8 port, u32 base_qpn, Modified: head/sys/dev/mlx4/mlx4_core/mlx4_port.c ============================================================================== --- head/sys/dev/mlx4/mlx4_core/mlx4_port.c Mon Jul 31 12:08:44 2017 (r321781) +++ head/sys/dev/mlx4/mlx4_core/mlx4_port.c Mon Jul 31 12:09:24 2017 (r321782) @@ -982,38 +982,6 @@ int mlx4_DUMP_ETH_STATS_wrapper(struct mlx4_dev *dev, return 0; } -void mlx4_set_stats_bitmap(struct mlx4_dev *dev, unsigned long *stats_bitmap) -{ - int last_i = 0; - - bitmap_zero(stats_bitmap, NUM_ALL_STATS); - - if (mlx4_is_slave(dev)) { - last_i = dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_FLOWSTATS_EN ? - NUM_PKT_STATS + NUM_FLOW_STATS : NUM_PKT_STATS; - } else { - bitmap_set(stats_bitmap, last_i, NUM_PKT_STATS); - last_i = NUM_PKT_STATS; - - if (dev->caps.flags2 & - MLX4_DEV_CAP_FLAG2_FLOWSTATS_EN) { - bitmap_set(stats_bitmap, last_i, NUM_FLOW_STATS); - last_i += NUM_FLOW_STATS; - } - } - - if (mlx4_is_slave(dev)) - bitmap_set(stats_bitmap, last_i, NUM_VF_STATS); - last_i += NUM_VF_STATS; - - if (mlx4_is_master(dev)) - bitmap_set(stats_bitmap, last_i, NUM_VPORT_STATS); - last_i += NUM_VPORT_STATS; - - bitmap_set(stats_bitmap, last_i, NUM_PORT_STATS); -} -EXPORT_SYMBOL(mlx4_set_stats_bitmap); - int mlx4_get_slave_from_roce_gid(struct mlx4_dev *dev, int port, u8 *gid, int *slave_id) { struct mlx4_priv *priv = mlx4_priv(dev); Modified: head/sys/dev/mlx4/mlx4_en/en.h ============================================================================== --- head/sys/dev/mlx4/mlx4_en/en.h Mon Jul 31 12:08:44 2017 (r321781) +++ head/sys/dev/mlx4/mlx4_en/en.h Mon Jul 31 12:09:24 2017 (r321782) @@ -572,7 +572,6 @@ struct mlx4_en_priv { struct mlx4_en_port_stats port_stats; struct mlx4_en_vport_stats vport_stats; struct mlx4_en_vf_stats vf_stats; - DECLARE_BITMAP(stats_bitmap, NUM_ALL_STATS); struct list_head mc_list; struct list_head curr_list; u64 broadcast_id; Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Mon Jul 31 12:08:44 2017 (r321781) +++ head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Mon Jul 31 12:09:24 2017 (r321782) @@ -1377,8 +1377,6 @@ int mlx4_en_start_port(struct net_device *dev) /* Schedule multicast task to populate multicast list */ queue_work(mdev->workqueue, &priv->rx_mode_task); - mlx4_set_stats_bitmap(mdev->dev, priv->stats_bitmap); - priv->port_up = true; /* Enable the queues. */ @@ -2731,28 +2729,6 @@ static void mlx4_en_sysctl_stat(struct mlx4_en_priv *p SYSCTL_ADD_ULONG(ctx, node_list, OID_AUTO, "rx_gt_1548_bytes_packets", CTLFLAG_RD, &priv->pkstats.rx_gt_1548_bytes_packets, "RX Greater Then 1548 bytes Packets"); - -struct mlx4_en_pkt_stats { - unsigned long tx_packets; - unsigned long tx_bytes; - unsigned long tx_multicast_packets; - unsigned long tx_broadcast_packets; - unsigned long tx_errors; - unsigned long tx_dropped; - unsigned long tx_lt_64_bytes_packets; - unsigned long tx_127_bytes_packets; - unsigned long tx_255_bytes_packets; - unsigned long tx_511_bytes_packets; - unsigned long tx_1023_bytes_packets; - unsigned long tx_1518_bytes_packets; - unsigned long tx_1522_bytes_packets; - unsigned long tx_1548_bytes_packets; - unsigned long tx_gt_1548_bytes_packets; - unsigned long rx_prio[NUM_PRIORITIES][NUM_PRIORITY_STATS]; - unsigned long tx_prio[NUM_PRIORITIES][NUM_PRIORITY_STATS]; -#define NUM_PKT_STATS 72 -}; - SYSCTL_ADD_ULONG(ctx, node_list, OID_AUTO, "tx_packets", CTLFLAG_RD, &priv->pkstats.tx_packets, "TX packets"); Modified: head/sys/dev/mlx4/stats.h ============================================================================== --- head/sys/dev/mlx4/stats.h Mon Jul 31 12:08:44 2017 (r321781) +++ head/sys/dev/mlx4/stats.h Mon Jul 31 12:09:24 2017 (r321782) @@ -82,7 +82,6 @@ struct mlx4_en_pkt_stats { unsigned long tx_gt_1548_bytes_packets; unsigned long rx_prio[NUM_PRIORITIES][NUM_PRIORITY_STATS]; unsigned long tx_prio[NUM_PRIORITIES][NUM_PRIORITY_STATS]; -#define NUM_PKT_STATS 72 }; struct mlx4_en_vf_stats { @@ -97,7 +96,6 @@ struct mlx4_en_vf_stats { unsigned long tx_multicast_packets; unsigned long tx_broadcast_packets; unsigned long tx_errors; -#define NUM_VF_STATS 11 }; struct mlx4_en_vport_stats { @@ -116,7 +114,6 @@ struct mlx4_en_vport_stats { unsigned long tx_broadcast_packets; unsigned long tx_broadcast_bytes; unsigned long tx_errors; -#define NUM_VPORT_STATS 15 }; struct mlx4_en_port_stats { @@ -129,7 +126,6 @@ struct mlx4_en_port_stats { unsigned long rx_chksum_good; unsigned long rx_chksum_none; unsigned long tx_chksum_offload; -#define NUM_PORT_STATS 8 }; struct mlx4_en_perf_stats { @@ -139,7 +135,6 @@ struct mlx4_en_perf_stats { u16 tx_coal_avg; u16 rx_coal_avg; u32 napi_quota; -#define NUM_PERF_COUNTERS 6 }; struct mlx4_en_flow_stats { @@ -151,8 +146,6 @@ struct mlx4_en_flow_stats { u64 tx_pause_transition; }; #define MLX4_NUM_PRIORITIES 8 -#define NUM_FLOW_PRIORITY_STATS 6 -#define NUM_FLOW_STATS (NUM_FLOW_PRIORITY_STATS*MLX4_NUM_PRIORITIES) struct mlx4_en_stat_out_flow_control_mbox { @@ -180,6 +173,4 @@ int mlx4_get_vport_ethtool_stats(struct mlx4_dev *dev, struct mlx4_en_vport_stats *vport_stats, int reset); -#define NUM_ALL_STATS (NUM_PKT_STATS + NUM_FLOW_STATS + NUM_VPORT_STATS + \ - NUM_VF_STATS + NUM_PORT_STATS + NUM_PERF_STATS) #endif From owner-svn-src-head@freebsd.org Mon Jul 31 13:08:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 341F1DAD6CA; Mon, 31 Jul 2017 13:08:49 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F347776417; Mon, 31 Jul 2017 13:08:48 +0000 (UTC) (envelope-from lifanov@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VD8mCk038757; Mon, 31 Jul 2017 13:08:48 GMT (envelope-from lifanov@FreeBSD.org) Received: (from lifanov@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VD8ma9038756; Mon, 31 Jul 2017 13:08:48 GMT (envelope-from lifanov@FreeBSD.org) Message-Id: <201707311308.v6VD8ma9038756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lifanov set sender to lifanov@FreeBSD.org using -f From: Nikolai Lifanov Date: Mon, 31 Jul 2017 13:08:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321783 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: lifanov X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321783 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 13:08:49 -0000 Author: lifanov (ports committer) Date: Mon Jul 31 13:08:47 2017 New Revision: 321783 URL: https://svnweb.freebsd.org/changeset/base/321783 Log: add myself to calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 12:09:24 2017 (r321782) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 13:08:47 2017 (r321783) @@ -94,6 +94,7 @@ 03/07 Michael P. Pritchard born in Los Angeles, California, United States, 1964 03/07 Giorgos Keramidas born in Athens, Greece, 1976 03/10 Andreas Klemm born in Duesseldorf, Nordrhein-Westfalen, Germany, 1963 +03/10 Nikolai Lifanov born in Moscow, Russian Federation, 1989 03/11 Soeren Straarup born in Andst, Denmark, 1978 03/12 Greg Lewis born in Adelaide, South Australia, Australia, 1969 03/13 Alexander Leidinger born in Neunkirchen, Saarland, Germany, 1976 From owner-svn-src-head@freebsd.org Mon Jul 31 13:32:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 335F3DAE0F5; Mon, 31 Jul 2017 13:32:37 +0000 (UTC) (envelope-from wen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4C897729B; Mon, 31 Jul 2017 13:32:36 +0000 (UTC) (envelope-from wen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VDWa26050610; Mon, 31 Jul 2017 13:32:36 GMT (envelope-from wen@FreeBSD.org) Received: (from wen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VDWaVf050609; Mon, 31 Jul 2017 13:32:36 GMT (envelope-from wen@FreeBSD.org) Message-Id: <201707311332.v6VDWaVf050609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wen set sender to wen@FreeBSD.org using -f From: Wen Heping Date: Mon, 31 Jul 2017 13:32:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321784 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: wen X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321784 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 13:32:37 -0000 Author: wen (ports committer) Date: Mon Jul 31 13:32:35 2017 New Revision: 321784 URL: https://svnweb.freebsd.org/changeset/base/321784 Log: add myself to calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 13:08:47 2017 (r321783) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 13:32:35 2017 (r321784) @@ -192,6 +192,7 @@ 05/27 Ollivier Robert born in Paris, France, 1967 05/29 Wilko Bulte born in Arnhem, the Netherlands, 1965 05/29 Seigo Tanimura born in Kitakyushu, Fukuoka, Japan, 1976 +05/30 Wen Heping born in Xiangxiang, Hunan, China, 1970 05/31 Ville Skytta born in Helsinki, Finland, 1974 06/02 Jean-Marc Zucconi born in Pontarlier, France, 1954 06/02 Alexander Botero-Lowry born in Austin, Texas, United States, 1986 From owner-svn-src-head@freebsd.org Mon Jul 31 14:16:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0437DAEAFB; Mon, 31 Jul 2017 14:16:36 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E5DD7C451; Mon, 31 Jul 2017 14:16:36 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VEGZCR067064; Mon, 31 Jul 2017 14:16:35 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VEGZKE067063; Mon, 31 Jul 2017 14:16:35 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201707311416.v6VEGZKE067063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 31 Jul 2017 14:16:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321785 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321785 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 14:16:36 -0000 Author: jhibbits Date: Mon Jul 31 14:16:35 2017 New Revision: 321785 URL: https://svnweb.freebsd.org/changeset/base/321785 Log: Add myself to the calendar Reminded by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 13:32:35 2017 (r321784) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 14:16:35 2017 (r321785) @@ -69,6 +69,7 @@ 02/14 Erwin Lansing born in 's-Hertogenbosch, the Netherlands, 1975 02/14 Martin Blapp born in Olten, Switzerland, 1976 02/15 Hiren Panchasara born in Ahmedabad, Gujarat, India, 1984 +02/16 Justin Hibbits born in Toledo, Ohio, United States, 1983 02/19 Murray Stokely born in Jacksonville, Florida, United States, 1979 02/20 Anders Nordby born in Oslo, Norway, 1976 02/21 Alexey Zelkin born in Simferopol, Ukraine, 1978 From owner-svn-src-head@freebsd.org Mon Jul 31 14:42:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D941BDAF4E2; Mon, 31 Jul 2017 14:42:39 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A837C7D13C; Mon, 31 Jul 2017 14:42:39 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VEgc4E078881; Mon, 31 Jul 2017 14:42:38 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VEgcwn078880; Mon, 31 Jul 2017 14:42:38 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201707311442.v6VEgcwn078880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Mon, 31 Jul 2017 14:42:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321786 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: rpokala X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321786 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 14:42:40 -0000 Author: rpokala Date: Mon Jul 31 14:42:38 2017 New Revision: 321786 URL: https://svnweb.freebsd.org/changeset/base/321786 Log: Add my birthday to the FreeBSD calendar Requested by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 14:16:35 2017 (r321785) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 14:42:38 2017 (r321786) @@ -210,6 +210,7 @@ 06/06 Alan Eldridge died in Denver, Colorado, 2003 06/07 Jimmy Olgeni born in Milano, Italy, 1976 06/07 Benjamin Close born in Adelaide, Australia, 1978 +06/08 Ravi Pokala born in Royal Oak, Michigan, United States, 1980 06/09 Stanislav Galabov born in Sofia, Bulgaria 1978 06/11 Alonso Cardenas Marquez born in Arequipa, Peru, 1979 06/14 Josh Paetzel born in Minneapolis, Minnesota, United States, 1973 From owner-svn-src-head@freebsd.org Mon Jul 31 14:49:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 123EEDAF798; Mon, 31 Jul 2017 14:49:46 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3FCC7D477; Mon, 31 Jul 2017 14:49:45 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VEnjOc079230; Mon, 31 Jul 2017 14:49:45 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VEnj5X079229; Mon, 31 Jul 2017 14:49:45 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201707311449.v6VEnj5X079229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Mon, 31 Jul 2017 14:49:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321787 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: mm X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321787 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 14:49:46 -0000 Author: mm Date: Mon Jul 31 14:49:44 2017 New Revision: 321787 URL: https://svnweb.freebsd.org/changeset/base/321787 Log: Add myself to the calendar Reminded by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 14:42:38 2017 (r321786) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 14:49:44 2017 (r321787) @@ -321,6 +321,7 @@ 09/20 Kevin Lo born in Taipei, Taiwan, Republic of China, 1972 09/21 Gleb Kurtsou born in Minsk, Belarus, 1984 09/22 Bryan Drewery born in San Diego, California, United States, 1984 +09/23 Martin Matuska born in Bratislava, Slovakia, 1979 09/24 Larry Rosenman born in Queens, New York, United States, 1957 09/27 Neil Blakey-Milner born in Port Elizabeth, South Africa, 1978 09/27 Renato Botelho born in Araras, Sao Paulo, Brazil, 1979 From owner-svn-src-head@freebsd.org Mon Jul 31 14:50:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 509FDDAF83A; Mon, 31 Jul 2017 14:50:44 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14ED67D5FC; Mon, 31 Jul 2017 14:50:44 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VEoh40080301; Mon, 31 Jul 2017 14:50:43 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VEohvA080300; Mon, 31 Jul 2017 14:50:43 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201707311450.v6VEohvA080300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 31 Jul 2017 14:50:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321788 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321788 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 14:50:44 -0000 Author: asomers Date: Mon Jul 31 14:50:42 2017 New Revision: 321788 URL: https://svnweb.freebsd.org/changeset/base/321788 Log: Add myself to the calendar Reported by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 14:49:44 2017 (r321787) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 14:50:42 2017 (r321788) @@ -320,6 +320,7 @@ 09/18 Matthew Fleming born in Cleveland, Ohio, United States, 1975 09/20 Kevin Lo born in Taipei, Taiwan, Republic of China, 1972 09/21 Gleb Kurtsou born in Minsk, Belarus, 1984 +09/22 Alan Somers born in San Antonio, Texas, United States, 1982 09/22 Bryan Drewery born in San Diego, California, United States, 1984 09/23 Martin Matuska born in Bratislava, Slovakia, 1979 09/24 Larry Rosenman born in Queens, New York, United States, 1957 From owner-svn-src-head@freebsd.org Mon Jul 31 14:53:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBD6ADAFAC0; Mon, 31 Jul 2017 14:53:04 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8AEFA7DAEB; Mon, 31 Jul 2017 14:53:04 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VEr3IH083431; Mon, 31 Jul 2017 14:53:03 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VEr3WS083430; Mon, 31 Jul 2017 14:53:03 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201707311453.v6VEr3WS083430@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Mon, 31 Jul 2017 14:53:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321789 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: nyan X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321789 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 14:53:04 -0000 Author: nyan Date: Mon Jul 31 14:53:03 2017 New Revision: 321789 URL: https://svnweb.freebsd.org/changeset/base/321789 Log: Add myself. Reminded by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 14:50:42 2017 (r321788) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 14:53:03 2017 (r321789) @@ -53,6 +53,7 @@ 02/02 Michael W Lucas born in Detroit, Michigan, United States, 1967 02/02 Dmitry Chagin born in Stalingrad, USSR, 1976 02/02 Yoichi Nakayama born in Tsu, Mie, Japan, 1976 +02/02 Yoshihiro Takahashi born in Yokohama, Kanagawa, Japan, 1976 02/03 Jason Helfman born in Royal Oak, Michigan, United States, 1972 02/04 Eitan Adler born in West Hempstead, New York, United States, 1991 02/05 Frank Laszlo born in Howell, Michigan, United States, 1983 From owner-svn-src-head@freebsd.org Mon Jul 31 14:56:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A555EDAFC65; Mon, 31 Jul 2017 14:56:36 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F34F7DD0D; Mon, 31 Jul 2017 14:56:36 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VEuZkr083623; Mon, 31 Jul 2017 14:56:35 GMT (envelope-from gallatin@FreeBSD.org) Received: (from gallatin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VEuZvT083622; Mon, 31 Jul 2017 14:56:35 GMT (envelope-from gallatin@FreeBSD.org) Message-Id: <201707311456.v6VEuZvT083622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gallatin set sender to gallatin@FreeBSD.org using -f From: Andrew Gallatin Date: Mon, 31 Jul 2017 14:56:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321790 - head/sbin/sysctl X-SVN-Group: head X-SVN-Commit-Author: gallatin X-SVN-Commit-Paths: head/sbin/sysctl X-SVN-Commit-Revision: 321790 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 14:56:36 -0000 Author: gallatin Date: Mon Jul 31 14:56:35 2017 New Revision: 321790 URL: https://svnweb.freebsd.org/changeset/base/321790 Log: Don't request CTLTYPE_OPAQUE if we can't print them. The intent is to skip expensive opaque sysctls like tcp_pcblist unless they are explicitly requested. Sysctl nodes like this don't show up in sysctl -a, but they do generate output that winds up being dropped, unless the user specifically requested binary/hex output or opaques. This reduces the runtime of sysctl in many circumstances on a loaded system. It also reduces the likelihood that simply gathering diagnostics on a sick machine (stuck lock, etc) via sysctl -a might push it over the edge into a total lockup. Reviewed by: jtl Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D11461 Modified: head/sbin/sysctl/sysctl.c Modified: head/sbin/sysctl/sysctl.c ============================================================================== --- head/sbin/sysctl/sysctl.c Mon Jul 31 14:53:03 2017 (r321789) +++ head/sbin/sysctl/sysctl.c Mon Jul 31 14:56:35 2017 (r321790) @@ -925,6 +925,32 @@ show_var(int *oid, int nlen) printf("%s", buf); return (0); } + + /* don't fetch opaques that we don't know how to print */ + if (ctltype == CTLTYPE_OPAQUE) { + if (strcmp(fmt, "S,clockinfo") == 0) + func = S_clockinfo; + else if (strcmp(fmt, "S,timeval") == 0) + func = S_timeval; + else if (strcmp(fmt, "S,loadavg") == 0) + func = S_loadavg; + else if (strcmp(fmt, "S,vmtotal") == 0) + func = S_vmtotal; +#ifdef __amd64__ + else if (strcmp(fmt, "S,efi_map_header") == 0) + func = S_efi_map; +#endif +#if defined(__amd64__) || defined(__i386__) + else if (strcmp(fmt, "S,bios_smap_xattr") == 0) + func = S_bios_smap_xattr; +#endif + else { + func = NULL; + if (!bflag && !oflag && !xflag) + return (1); + } + } + /* find an estimate of how much we need for this var */ if (Bflag) j = Bflag; @@ -1045,24 +1071,6 @@ show_var(int *oid, int nlen) case CTLTYPE_OPAQUE: i = 0; - if (strcmp(fmt, "S,clockinfo") == 0) - func = S_clockinfo; - else if (strcmp(fmt, "S,timeval") == 0) - func = S_timeval; - else if (strcmp(fmt, "S,loadavg") == 0) - func = S_loadavg; - else if (strcmp(fmt, "S,vmtotal") == 0) - func = S_vmtotal; -#ifdef __amd64__ - else if (strcmp(fmt, "S,efi_map_header") == 0) - func = S_efi_map; -#endif -#if defined(__amd64__) || defined(__i386__) - else if (strcmp(fmt, "S,bios_smap_xattr") == 0) - func = S_bios_smap_xattr; -#endif - else - func = NULL; if (func) { if (!nflag) printf("%s%s", name, sep); From owner-svn-src-head@freebsd.org Mon Jul 31 14:57:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C13DDAFCE8; Mon, 31 Jul 2017 14:57:03 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57C5E7DE59; Mon, 31 Jul 2017 14:57:03 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VEv2HU083685; Mon, 31 Jul 2017 14:57:02 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VEv2gM083684; Mon, 31 Jul 2017 14:57:02 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707311457.v6VEv2gM083684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 31 Jul 2017 14:57:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321791 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 321791 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 14:57:03 -0000 Author: ian Date: Mon Jul 31 14:57:02 2017 New Revision: 321791 URL: https://svnweb.freebsd.org/changeset/base/321791 Log: Switch from using iic_transfer() to iicdev_readfrom/writeto(), mostly so that transfers will be done with proper ownership of the bus. No behavioral changes. Also add a detach() method. Modified: head/sys/dev/iicbus/ds3231.c Modified: head/sys/dev/iicbus/ds3231.c ============================================================================== --- head/sys/dev/iicbus/ds3231.c Mon Jul 31 14:56:35 2017 (r321790) +++ head/sys/dev/iicbus/ds3231.c Mon Jul 31 14:57:02 2017 (r321791) @@ -67,24 +67,17 @@ struct ds3231_softc { static void ds3231_start(void *); static int -ds3231_read(device_t dev, uint16_t addr, uint8_t reg, uint8_t *data, size_t len) +ds3231_read1(device_t dev, uint8_t reg, uint8_t *data) { - struct iic_msg msg[2] = { - { addr, IIC_M_WR | IIC_M_NOSTOP, 1, ® }, - { addr, IIC_M_RD, len, data }, - }; - return (iicbus_transfer(dev, msg, nitems(msg))); + return (iicdev_readfrom(dev, reg, data, 1, IIC_INTRWAIT)); } static int -ds3231_write(device_t dev, uint16_t addr, uint8_t *data, size_t len) +ds3231_write1(device_t dev, uint8_t reg, uint8_t data) { - struct iic_msg msg[1] = { - { addr, IIC_M_WR, len, data }, - }; - return (iicbus_transfer(dev, msg, nitems(msg))); + return (iicdev_writeto(dev, reg, &data, 1, IIC_INTRWAIT)); } static int @@ -92,14 +85,11 @@ ds3231_ctrl_read(struct ds3231_softc *sc) { int error; - sc->sc_ctrl = 0; - error = ds3231_read(sc->sc_dev, sc->sc_addr, DS3231_CONTROL, - &sc->sc_ctrl, sizeof(sc->sc_ctrl)); + error = ds3231_read1(sc->sc_dev, DS3231_CONTROL, &sc->sc_ctrl); if (error) { device_printf(sc->sc_dev, "cannot read from RTC.\n"); return (error); } - return (0); } @@ -107,12 +97,11 @@ static int ds3231_ctrl_write(struct ds3231_softc *sc) { int error; - uint8_t data[2]; + uint8_t data; - data[0] = DS3231_CONTROL; /* Always enable the oscillator. Always disable both alarms. */ - data[1] = sc->sc_ctrl & ~DS3231_CTRL_MASK; - error = ds3231_write(sc->sc_dev, sc->sc_addr, data, sizeof(data)); + data = sc->sc_ctrl & ~DS3231_CTRL_MASK; + error = ds3231_write1(sc->sc_dev, DS3231_CONTROL, data); if (error != 0) device_printf(sc->sc_dev, "cannot write to RTC.\n"); @@ -124,9 +113,7 @@ ds3231_status_read(struct ds3231_softc *sc) { int error; - sc->sc_status = 0; - error = ds3231_read(sc->sc_dev, sc->sc_addr, DS3231_STATUS, - &sc->sc_status, sizeof(sc->sc_status)); + error = ds3231_read1(sc->sc_dev, DS3231_STATUS, &sc->sc_status); if (error) { device_printf(sc->sc_dev, "cannot read from RTC.\n"); return (error); @@ -139,15 +126,14 @@ static int ds3231_status_write(struct ds3231_softc *sc, int clear_a1, int clear_a2) { int error; - uint8_t data[2]; + uint8_t data; - data[0] = DS3231_STATUS; - data[1] = sc->sc_status; + data = sc->sc_status; if (clear_a1 == 0) - data[1] |= DS3231_STATUS_A1F; + data |= DS3231_STATUS_A1F; if (clear_a2 == 0) - data[1] |= DS3231_STATUS_A2F; - error = ds3231_write(sc->sc_dev, sc->sc_addr, data, sizeof(data)); + data |= DS3231_STATUS_A2F; + error = ds3231_write1(sc->sc_dev, DS3231_STATUS, data); if (error != 0) device_printf(sc->sc_dev, "cannot write to RTC.\n"); @@ -158,18 +144,15 @@ static int ds3231_set_24hrs_mode(struct ds3231_softc *sc) { int error; - uint8_t data[2], hour; + uint8_t hour; - hour = 0; - error = ds3231_read(sc->sc_dev, sc->sc_addr, DS3231_HOUR, - &hour, sizeof(hour)); + error = ds3231_read1(sc->sc_dev, DS3231_HOUR, &hour); if (error) { device_printf(sc->sc_dev, "cannot read from RTC.\n"); return (error); } - data[0] = DS3231_HOUR; - data[1] = hour & ~DS3231_C_MASK; - error = ds3231_write(sc->sc_dev, sc->sc_addr, data, sizeof(data)); + hour &= ~DS3231_C_MASK; + error = ds3231_write1(sc->sc_dev, DS3231_HOUR, hour); if (error != 0) device_printf(sc->sc_dev, "cannot write to RTC.\n"); @@ -183,8 +166,8 @@ ds3231_temp_read(struct ds3231_softc *sc, int *temp) uint8_t buf8[2]; uint16_t buf; - error = ds3231_read(sc->sc_dev, sc->sc_addr, DS3231_TEMP, - buf8, sizeof(buf8)); + error = iicdev_readfrom(sc->sc_dev, DS3231_TEMP, buf8, sizeof(buf8), + IIC_INTRWAIT); if (error != 0) return (error); buf = (buf8[0] << 8) | (buf8[1] & 0xff); @@ -426,6 +409,14 @@ ds3231_attach(device_t dev) return (0); } +static int +ds3231_detach(device_t dev) +{ + + clock_unregister(dev); + return (0); +} + static void ds3231_start(void *xdev) { @@ -499,8 +490,8 @@ ds3231_gettime(device_t dev, struct timespec *ts) sc = device_get_softc(dev); memset(data, 0, sizeof(data)); - error = ds3231_read(sc->sc_dev, sc->sc_addr, DS3231_SECS, - data, sizeof(data)); + error = iicdev_readfrom(sc->sc_dev, DS3231_SECS, data, sizeof(data), + IIC_INTRWAIT); if (error != 0) { device_printf(dev, "cannot read from RTC.\n"); return (error); @@ -533,7 +524,7 @@ ds3231_settime(device_t dev, struct timespec *ts) int error; struct clocktime ct; struct ds3231_softc *sc; - uint8_t data[8]; + uint8_t data[7]; sc = device_get_softc(dev); /* Accuracy is only one second. */ @@ -542,18 +533,18 @@ ds3231_settime(device_t dev, struct timespec *ts) ts->tv_nsec = 0; clock_ts_to_ct(ts, &ct); memset(data, 0, sizeof(data)); - data[0] = DS3231_SECS; - data[DS3231_SECS + 1] = TOBCD(ct.sec); - data[DS3231_MINS + 1] = TOBCD(ct.min); - data[DS3231_HOUR + 1] = TOBCD(ct.hour); - data[DS3231_DATE + 1] = TOBCD(ct.day); - data[DS3231_WEEKDAY + 1] = ct.dow; - data[DS3231_MONTH + 1] = TOBCD(ct.mon); - data[DS3231_YEAR + 1] = TOBCD(ct.year % 100); + data[DS3231_SECS] = TOBCD(ct.sec); + data[DS3231_MINS] = TOBCD(ct.min); + data[DS3231_HOUR] = TOBCD(ct.hour); + data[DS3231_DATE] = TOBCD(ct.day); + data[DS3231_WEEKDAY] = ct.dow; + data[DS3231_MONTH] = TOBCD(ct.mon); + data[DS3231_YEAR] = TOBCD(ct.year % 100); if (sc->sc_last_c) data[DS3231_MONTH] |= DS3231_C_MASK; /* Write the time back to RTC. */ - error = ds3231_write(dev, sc->sc_addr, data, sizeof(data)); + error = iicdev_writeto(dev, DS3231_SECS, data, sizeof(data), + IIC_INTRWAIT); if (error != 0) device_printf(dev, "cannot write to RTC.\n"); @@ -563,6 +554,7 @@ ds3231_settime(device_t dev, struct timespec *ts) static device_method_t ds3231_methods[] = { DEVMETHOD(device_probe, ds3231_probe), DEVMETHOD(device_attach, ds3231_attach), + DEVMETHOD(device_detach, ds3231_detach), DEVMETHOD(clock_gettime, ds3231_gettime), DEVMETHOD(clock_settime, ds3231_settime), From owner-svn-src-head@freebsd.org Mon Jul 31 14:58:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7802DDAFDA7; Mon, 31 Jul 2017 14:58:02 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 424B27DFA5; Mon, 31 Jul 2017 14:58:02 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VEw14N083759; Mon, 31 Jul 2017 14:58:01 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VEw1nj083758; Mon, 31 Jul 2017 14:58:01 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707311458.v6VEw1nj083758@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 31 Jul 2017 14:58:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321792 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 321792 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 14:58:02 -0000 Author: ian Date: Mon Jul 31 14:58:01 2017 New Revision: 321792 URL: https://svnweb.freebsd.org/changeset/base/321792 Log: Add a detach() method. Modified: head/sys/dev/iicbus/ds1307.c Modified: head/sys/dev/iicbus/ds1307.c ============================================================================== --- head/sys/dev/iicbus/ds1307.c Mon Jul 31 14:57:02 2017 (r321791) +++ head/sys/dev/iicbus/ds1307.c Mon Jul 31 14:58:01 2017 (r321792) @@ -78,14 +78,14 @@ static int ds1307_read1(device_t dev, uint8_t reg, uint8_t *data) { - return(iicdev_readfrom(dev, reg, data, 1, IIC_INTRWAIT)); + return (iicdev_readfrom(dev, reg, data, 1, IIC_INTRWAIT)); } static int ds1307_write1(device_t dev, uint8_t reg, uint8_t data) { - return(iicdev_writeto(dev, reg, &data, 1, IIC_INTRWAIT)); + return (iicdev_writeto(dev, reg, &data, 1, IIC_INTRWAIT)); } static int @@ -255,6 +255,14 @@ ds1307_attach(device_t dev) return (0); } +static int +ds1307_detach(device_t dev) +{ + + clock_unregister(dev); + return (0); +} + static void ds1307_start(void *xdev) { @@ -387,6 +395,7 @@ ds1307_settime(device_t dev, struct timespec *ts) static device_method_t ds1307_methods[] = { DEVMETHOD(device_probe, ds1307_probe), DEVMETHOD(device_attach, ds1307_attach), + DEVMETHOD(device_detach, ds1307_detach), DEVMETHOD(clock_gettime, ds1307_gettime), DEVMETHOD(clock_settime, ds1307_settime), From owner-svn-src-head@freebsd.org Mon Jul 31 15:21:27 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8E90DB0A17; Mon, 31 Jul 2017 15:21:27 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 945CD7EED4; Mon, 31 Jul 2017 15:21:27 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VFLQ2e095223; Mon, 31 Jul 2017 15:21:26 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VFLQJY095222; Mon, 31 Jul 2017 15:21:26 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201707311521.v6VFLQJY095222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 31 Jul 2017 15:21:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321793 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321793 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 15:21:27 -0000 Author: asomers Date: Mon Jul 31 15:21:26 2017 New Revision: 321793 URL: https://svnweb.freebsd.org/changeset/base/321793 Log: spellcheck jhale's calendar entry Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 14:58:01 2017 (r321792) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 15:21:26 2017 (r321793) @@ -61,7 +61,7 @@ 02/10 David Greenman born in Portland, Oregon, United States, 1968 02/10 Paul Richards born in Ammanford, Carmarthenshire, United Kingdom, 1968 02/10 Simon Barner born in Rosenheim, Bayern, Germany, 1980 -02/10 Jason E. Hale born in Pittsburgh, Pennsylvania, Unites States, 1982 +02/10 Jason E. Hale born in Pittsburgh, Pennsylvania, United States, 1982 02/13 Jesper Skriver born in Aarhus, Denmark, 1975 02/13 Steve Wills born in Lynchburg, Virginia, United States, 1975 02/13 Andrey Slusar born in Odessa, USSR, 1979 From owner-svn-src-head@freebsd.org Mon Jul 31 15:23:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBFDBDB0ED1; Mon, 31 Jul 2017 15:23:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C86B67F1C4; Mon, 31 Jul 2017 15:23:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VFNJDm096225; Mon, 31 Jul 2017 15:23:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VFNJIV096222; Mon, 31 Jul 2017 15:23:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201707311523.v6VFNJIV096222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 31 Jul 2017 15:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321794 - in head/sys: fs/nfsserver nfs X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in head/sys: fs/nfsserver nfs X-SVN-Commit-Revision: 321794 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 15:23:21 -0000 Author: mav Date: Mon Jul 31 15:23:19 2017 New Revision: 321794 URL: https://svnweb.freebsd.org/changeset/base/321794 Log: Improve FHA locality control for NFS read/write requests. This change adds two new tunables, allowing to control serialization for read and write NFS requests separately. It does not change the default behavior since there are too many factors to consider, but gives additional space for further experiments and tuning. The main motivation for this change is very low write speed in case of ZFS with sync=always or when NFS clients requests sychronous operation, when every separate request has to be written/flushed to ZIL, and requests are processed one at a time. Setting vfs.nfsd.fha.write=0 in that case allows to increase ZIL throughput by several times by coalescing writes and cache flushes. There is a worry that doing it may increase data fragmentation on disks, but I suppose it should not happen for pool with SLOG. MFC after: 1 week Sponsored by: iXsystems, Inc. Modified: head/sys/fs/nfsserver/nfs_fha_new.c head/sys/nfs/nfs_fha.c head/sys/nfs/nfs_fha.h Modified: head/sys/fs/nfsserver/nfs_fha_new.c ============================================================================== --- head/sys/fs/nfsserver/nfs_fha_new.c Mon Jul 31 15:21:26 2017 (r321793) +++ head/sys/fs/nfsserver/nfs_fha_new.c Mon Jul 31 15:23:19 2017 (r321794) @@ -93,7 +93,7 @@ fhanew_init(void *foo) sysctl_ctx_init(&softc->sysctl_ctx); softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_vfs_nfsd), OID_AUTO, "fha", CTLFLAG_RD, - 0, "fha node"); + 0, "NFS File Handle Affinity (FHA)"); if (softc->sysctl_tree == NULL) { printf("%s: unable to allocate sysctl tree\n", __func__); return; Modified: head/sys/nfs/nfs_fha.c ============================================================================== --- head/sys/nfs/nfs_fha.c Mon Jul 31 15:21:26 2017 (r321793) +++ head/sys/nfs/nfs_fha.c Mon Jul 31 15:23:19 2017 (r321794) @@ -51,7 +51,6 @@ static MALLOC_DEFINE(M_NFS_FHA, "NFS FHA", "NFS FHA"); void fha_init(struct fha_params *softc) { - char tmpstr[128]; int i; for (i = 0; i < FHA_HASH_SIZE; i++) @@ -61,47 +60,38 @@ fha_init(struct fha_params *softc) * Set the default tuning parameters. */ softc->ctls.enable = FHA_DEF_ENABLE; + softc->ctls.read = FHA_DEF_READ; + softc->ctls.write = FHA_DEF_WRITE; softc->ctls.bin_shift = FHA_DEF_BIN_SHIFT; softc->ctls.max_nfsds_per_fh = FHA_DEF_MAX_NFSDS_PER_FH; softc->ctls.max_reqs_per_nfsd = FHA_DEF_MAX_REQS_PER_NFSD; /* - * Allow the user to override the defaults at boot time with - * tunables. + * Add sysctls so the user can change the tuning parameters. */ - snprintf(tmpstr, sizeof(tmpstr), "vfs.%s.fha.enable", - softc->server_name); - TUNABLE_INT_FETCH(tmpstr, &softc->ctls.enable); - snprintf(tmpstr, sizeof(tmpstr), "vfs.%s.fha.bin_shift", - softc->server_name); - TUNABLE_INT_FETCH(tmpstr, &softc->ctls.bin_shift); - snprintf(tmpstr, sizeof(tmpstr), "vfs.%s.fha.max_nfsds_per_fh", - softc->server_name); - TUNABLE_INT_FETCH(tmpstr, &softc->ctls.max_nfsds_per_fh); - snprintf(tmpstr, sizeof(tmpstr), "vfs.%s.fha.max_reqs_per_nfsd", - softc->server_name); - TUNABLE_INT_FETCH(tmpstr, &softc->ctls.max_reqs_per_nfsd); - - /* - * Add sysctls so the user can change the tuning parameters at - * runtime. - */ SYSCTL_ADD_UINT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "enable", CTLFLAG_RW, + OID_AUTO, "enable", CTLFLAG_RWTUN, &softc->ctls.enable, 0, "Enable NFS File Handle Affinity (FHA)"); SYSCTL_ADD_UINT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "bin_shift", CTLFLAG_RW, - &softc->ctls.bin_shift, 0, "For FHA reads, no two requests will " - "contend if they're 2^(bin_shift) bytes apart"); + OID_AUTO, "read", CTLFLAG_RWTUN, + &softc->ctls.read, 0, "Enable NFS FHA read locality"); SYSCTL_ADD_UINT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "max_nfsds_per_fh", CTLFLAG_RW, + OID_AUTO, "write", CTLFLAG_RWTUN, + &softc->ctls.write, 0, "Enable NFS FHA write locality"); + + SYSCTL_ADD_UINT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "bin_shift", CTLFLAG_RWTUN, + &softc->ctls.bin_shift, 0, "Maximum locality distance 2^(bin_shift) bytes"); + + SYSCTL_ADD_UINT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), + OID_AUTO, "max_nfsds_per_fh", CTLFLAG_RWTUN, &softc->ctls.max_nfsds_per_fh, 0, "Maximum nfsd threads that " "should be working on requests for the same file handle"); SYSCTL_ADD_UINT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "max_reqs_per_nfsd", CTLFLAG_RW, + OID_AUTO, "max_reqs_per_nfsd", CTLFLAG_RWTUN, &softc->ctls.max_reqs_per_nfsd, 0, "Maximum requests that " "single nfsd thread should be working on at any time"); @@ -144,6 +134,7 @@ fha_extract_info(struct svc_req *req, struct fha_info i->fh = ++random_fh; i->offset = 0; i->locktype = LK_EXCLUSIVE; + i->read = i->write = 0; /* * Extract the procnum and convert to v3 form if necessary, @@ -169,6 +160,9 @@ fha_extract_info(struct svc_req *req, struct fha_info if (cb->no_offset(procnum)) goto out; + i->read = cb->is_read(procnum); + i->write = cb->is_write(procnum); + error = cb->realign(&req->rq_args, M_NOWAIT); if (error) goto out; @@ -181,7 +175,7 @@ fha_extract_info(struct svc_req *req, struct fha_info goto out; /* Content ourselves with zero offset for all but reads. */ - if (cb->is_read(procnum) || cb->is_write(procnum)) + if (i->read || i->write) cb->get_offset(&md, &dpos, v3, i); out: @@ -311,8 +305,13 @@ fha_hash_entry_choose_thread(struct fha_params *softc, return (thread); } + /* Check whether we should consider locality. */ + if ((i->read && !softc->ctls.read) || + (i->write && !softc->ctls.write)) + goto noloc; + /* - * Check for read locality, making sure that we won't + * Check for locality, making sure that we won't * exceed our per-thread load limit in the process. */ offset1 = i->offset; @@ -332,6 +331,7 @@ fha_hash_entry_choose_thread(struct fha_params *softc, } } +noloc: /* * We don't have a locality match, so skip this thread, * but keep track of the most attractive thread in case Modified: head/sys/nfs/nfs_fha.h ============================================================================== --- head/sys/nfs/nfs_fha.h Mon Jul 31 15:21:26 2017 (r321793) +++ head/sys/nfs/nfs_fha.h Mon Jul 31 15:23:19 2017 (r321794) @@ -31,6 +31,8 @@ /* Sysctl defaults. */ #define FHA_DEF_ENABLE 1 +#define FHA_DEF_READ 1 +#define FHA_DEF_WRITE 1 #define FHA_DEF_BIN_SHIFT 22 /* 4MB */ #define FHA_DEF_MAX_NFSDS_PER_FH 8 #define FHA_DEF_MAX_REQS_PER_NFSD 0 /* Unlimited */ @@ -39,6 +41,8 @@ struct fha_ctls { int enable; + int read; + int write; uint32_t bin_shift; uint32_t max_nfsds_per_fh; uint32_t max_reqs_per_nfsd; @@ -79,6 +83,8 @@ struct fha_info { u_int64_t fh; off_t offset; int locktype; + int read; + int write; }; struct fha_callbacks { From owner-svn-src-head@freebsd.org Mon Jul 31 15:24:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07C99DB0FCC; Mon, 31 Jul 2017 15:24:42 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C67207F324; Mon, 31 Jul 2017 15:24:41 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VFOenq096312; Mon, 31 Jul 2017 15:24:40 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VFOeDl096311; Mon, 31 Jul 2017 15:24:40 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707311524.v6VFOeDl096311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 31 Jul 2017 15:24:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321795 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 321795 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 15:24:42 -0000 Author: ian Date: Mon Jul 31 15:24:40 2017 New Revision: 321795 URL: https://svnweb.freebsd.org/changeset/base/321795 Log: Check the clock-halted flag every time the clock is read, not just once at startup. The flag stays set until the clock is loaded with good time, so we need to keep saying the time is invalid until that happens. Modified: head/sys/dev/iicbus/ds1307.c Modified: head/sys/dev/iicbus/ds1307.c ============================================================================== --- head/sys/dev/iicbus/ds1307.c Mon Jul 31 15:23:19 2017 (r321794) +++ head/sys/dev/iicbus/ds1307.c Mon Jul 31 15:24:40 2017 (r321795) @@ -328,6 +328,10 @@ ds1307_gettime(device_t dev, struct timespec *ts) return (error); } + /* If the clock halted, we don't have good data. */ + if (data[DS1307_SECS] & DS1307_SECS_CH) + return (EINVAL); + /* If chip is in AM/PM mode remember that. */ if (data[DS1307_HOUR] & DS1307_HOUR_USE_AMPM) { sc->sc_use_ampm = true; From owner-svn-src-head@freebsd.org Mon Jul 31 15:29:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5262DB127B; Mon, 31 Jul 2017 15:29:45 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92B907F553; Mon, 31 Jul 2017 15:29:45 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VFTilT096539; Mon, 31 Jul 2017 15:29:44 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VFTiYA096538; Mon, 31 Jul 2017 15:29:44 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201707311529.v6VFTiYA096538@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Mon, 31 Jul 2017 15:29:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321796 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: jamie X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321796 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 15:29:45 -0000 Author: jamie Date: Mon Jul 31 15:29:44 2017 New Revision: 321796 URL: https://svnweb.freebsd.org/changeset/base/321796 Log: Add myself to the birthday calendar. Reminded by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 15:24:40 2017 (r321795) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 15:29:44 2017 (r321796) @@ -180,6 +180,7 @@ 05/19 Sofian Brabez born in Toulouse, France, 1984 05/20 Dan Moschuk died in Burlington, Ontario, Canada, 2010 05/21 Kris Kennaway born in Winnipeg, Manitoba, Canada, 1978 +05/22 James Gritton born in San Francisco, California, United States, 1967 05/22 Clive Tong-I Lin born in Changhua, Taiwan, Republic of China, 1978 05/22 Michael Bushkov born in Rostov-on-Don, Russian Federation, 1985 05/22 Rui Paulo born in Evora, Portugal, 1986 From owner-svn-src-head@freebsd.org Mon Jul 31 15:50:59 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 547F6DB233D; Mon, 31 Jul 2017 15:50:59 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D4EE80989; Mon, 31 Jul 2017 15:50:59 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VFowkL008249; Mon, 31 Jul 2017 15:50:58 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VFownb008248; Mon, 31 Jul 2017 15:50:58 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201707311550.v6VFownb008248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Mon, 31 Jul 2017 15:50:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321797 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321797 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 15:50:59 -0000 Author: scottl Date: Mon Jul 31 15:50:58 2017 New Revision: 321797 URL: https://svnweb.freebsd.org/changeset/base/321797 Log: Add an entry to the freebsd calendar for myself. Reported by: kirk Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 15:29:44 2017 (r321796) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 15:50:58 2017 (r321797) @@ -290,6 +290,7 @@ 08/24 Alexander Botero-Lowry died in San Francisco, California, United States, 2012 08/25 Beech Rintoul born in Oakland, California, United States, 1952 08/25 Jean Milanez Melo born in Divinopolis, Minas Gerais, Brazil, 1982 +08/26 Scott Long born in Chicago, Illinois, United States, 1974 08/26 Dima Ruban born in Nalchik, USSR, 1970 08/26 Marc Fonvieille born in Avignon, France, 1972 08/26 Herve Quiroz born in Aix-en-Provence, France, 1977 From owner-svn-src-head@freebsd.org Mon Jul 31 16:46:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28A0FDB4013; Mon, 31 Jul 2017 16:46:18 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6D2B83AF0; Mon, 31 Jul 2017 16:46:17 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VGkH5O032509; Mon, 31 Jul 2017 16:46:17 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VGkHif032508; Mon, 31 Jul 2017 16:46:17 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707311646.v6VGkHif032508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 31 Jul 2017 16:46:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321798 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 321798 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 16:46:18 -0000 Author: ian Date: Mon Jul 31 16:46:16 2017 New Revision: 321798 URL: https://svnweb.freebsd.org/changeset/base/321798 Log: Restore a few rather important lines of code that got fumbled in r321746. Modified: head/sys/dev/iicbus/ds1307.c Modified: head/sys/dev/iicbus/ds1307.c ============================================================================== --- head/sys/dev/iicbus/ds1307.c Mon Jul 31 15:50:58 2017 (r321797) +++ head/sys/dev/iicbus/ds1307.c Mon Jul 31 16:46:16 2017 (r321798) @@ -380,6 +380,10 @@ ds1307_settime(device_t dev, struct timespec *ts) } else pmflags = 0; + getnanotime(ts); + ts->tv_sec -= utc_offset(); + clock_ts_to_ct(ts, &ct); + data[DS1307_SECS] = TOBCD(ct.sec); data[DS1307_MINS] = TOBCD(ct.min); data[DS1307_HOUR] = TOBCD(ct.hour) | pmflags; From owner-svn-src-head@freebsd.org Mon Jul 31 16:55:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32930DB4213; Mon, 31 Jul 2017 16:55:58 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F381B83F53; Mon, 31 Jul 2017 16:55:57 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VGtuFE036442; Mon, 31 Jul 2017 16:55:56 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VGtuEC036440; Mon, 31 Jul 2017 16:55:56 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201707311655.v6VGtuEC036440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Mon, 31 Jul 2017 16:55:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321799 - in head/sys/dev: mpr mps X-SVN-Group: head X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: in head/sys/dev: mpr mps X-SVN-Commit-Revision: 321799 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 16:55:58 -0000 Author: scottl Date: Mon Jul 31 16:55:56 2017 New Revision: 321799 URL: https://svnweb.freebsd.org/changeset/base/321799 Log: Fix a logic bug in the split PCI interrupt code that slipped through Reported by: Harry Schmalzbauer Modified: head/sys/dev/mpr/mpr_pci.c head/sys/dev/mps/mps_pci.c Modified: head/sys/dev/mpr/mpr_pci.c ============================================================================== --- head/sys/dev/mpr/mpr_pci.c Mon Jul 31 16:46:16 2017 (r321798) +++ head/sys/dev/mpr/mpr_pci.c Mon Jul 31 16:55:56 2017 (r321799) @@ -260,6 +260,7 @@ mpr_pci_alloc_interrupts(struct mpr_softc *sc) dev = sc->mpr_dev; error = 0; + msgs = 0; if ((sc->disable_msix == 0) && ((msgs = pci_msix_count(dev)) >= MPR_MSI_COUNT)) @@ -267,7 +268,7 @@ mpr_pci_alloc_interrupts(struct mpr_softc *sc) if ((error != 0) && (sc->disable_msi == 0) && ((msgs = pci_msi_count(dev)) >= MPR_MSI_COUNT)) error = mpr_alloc_msi(sc, MPR_MSI_COUNT); - else + if (error != 0) msgs = 0; sc->msi_msgs = msgs; Modified: head/sys/dev/mps/mps_pci.c ============================================================================== --- head/sys/dev/mps/mps_pci.c Mon Jul 31 16:46:16 2017 (r321798) +++ head/sys/dev/mps/mps_pci.c Mon Jul 31 16:55:56 2017 (r321799) @@ -245,6 +245,7 @@ mps_pci_alloc_interrupts(struct mps_softc *sc) dev = sc->mps_dev; error = 0; + msgs = 0; if ((sc->disable_msix == 0) && ((msgs = pci_msix_count(dev)) >= MPS_MSI_COUNT)) @@ -252,7 +253,7 @@ mps_pci_alloc_interrupts(struct mps_softc *sc) if ((error != 0) && (sc->disable_msi == 0) && ((msgs = pci_msi_count(dev)) >= MPS_MSI_COUNT)) error = mps_alloc_msi(sc, MPS_MSI_COUNT); - else + if (error != 0) msgs = 0; sc->msi_msgs = msgs; From owner-svn-src-head@freebsd.org Mon Jul 31 17:33:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6707ADB5341; Mon, 31 Jul 2017 17:33:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4341B1A94; Mon, 31 Jul 2017 17:33:58 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VHXvwK052448; Mon, 31 Jul 2017 17:33:57 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VHXv7K052447; Mon, 31 Jul 2017 17:33:57 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201707311733.v6VHXv7K052447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 31 Jul 2017 17:33:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321800 - head/tools/tools/net80211/wlanwds X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/tools/tools/net80211/wlanwds X-SVN-Commit-Revision: 321800 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 17:33:58 -0000 Author: adrian Date: Mon Jul 31 17:33:57 2017 New Revision: 321800 URL: https://svnweb.freebsd.org/changeset/base/321800 Log: [wlanwds] allow for a DWDS AP VAP to be not be the first VAP on a NIC. The wlanwds code was just creating a clone VAP without specifying the MAC address to use for said clone VAP. This meant that if an interface was cloned from an AP interface that wasn't the first created VAP (which shares the same MAC as the parent physical interface by default) then the cloned interface would have the wrong MAC and traffic wouldn't work. Besides chip bugs (ha!) this isn't a requirement. So, teach wlanwds to: * look up the link layer address for a given interface (which really should be a library interface, and will likely quickly become one); * use this when creating a cloned interface for a DWDS peer; * (net80211 already has the infrastructure to do this, it just needed to be used); * add some extra logging to see what MAC addresses, parent interfaces, etc are being created. Whilst here, add a reminder that I should extend this to include monitoring a specific VAP for DWDS updates rather than just the parent interface. This is the first step in allowing for multiple DWDS hops, which is a pre-requisite for adrian's house having wifi in the single upstairs room. Tested: * AR9380, DWDS AP + AP mode - with DWDS AP being the second VAP created with a different MAC address; * AR9331 (Carambola2), AP + DWDS STA; * passing traffic TODO: * fix 802.11s so this DWDS stuff is no longer required! Modified: head/tools/tools/net80211/wlanwds/wlanwds.c Modified: head/tools/tools/net80211/wlanwds/wlanwds.c ============================================================================== --- head/tools/tools/net80211/wlanwds/wlanwds.c Mon Jul 31 16:55:56 2017 (r321799) +++ head/tools/tools/net80211/wlanwds/wlanwds.c Mon Jul 31 17:33:57 2017 (r321800) @@ -55,6 +55,9 @@ #include #include +#include +#include + #include #include #include @@ -90,7 +93,8 @@ static void wds_discovery(const char *ifname, const uint8_t bssid[IEEE80211_ADDR_LEN]); static void wds_destroy(const char *ifname); static void wds_leave(const uint8_t bssid[IEEE80211_ADDR_LEN]); -static int wds_vap_create(const char *ifname, struct wds *); +static int wds_vap_create(const char *ifname, uint8_t macaddr[ETHER_ADDR_LEN], + struct wds *); static int wds_vap_destroy(const char *ifname); static void @@ -201,6 +205,11 @@ getparent(const char *ifname, char parent[IFNAMSIZ+1]) * Check if the specified ifnet is one we're supposed to monitor. * The ifnet is assumed to be a vap; we find it's parent and check * it against the set of ifnet's specified on the command line. + * + * TODO: extend this to also optionally allow the specific DWDS + * VAP to be monitored, instead of assuming all VAPs on a parent + * physical interface are being monitored by this instance of + * wlanwds. */ static int checkifnet(const char *ifname, int complain) @@ -257,6 +266,70 @@ getbssid(int s, const char *ifname, uint8_t bssid[IEEE } /* + * Fetch the mac address configured for a given ifnet. + * (Note - the current link level address, NOT hwaddr.) + * + * This is currently, sigh, O(n) because there's no current kernel + * API that will do it for a single interface. + * + * Return 0 if successful, -1 if failure. + */ +static int +getlladdr(const char *ifname, uint8_t macaddr[ETHER_ADDR_LEN]) +{ + struct ifaddrs *ifap, *ifa; + struct sockaddr_dl *sdl; + + if (getifaddrs(&ifap) < 0) { + warn("%s: getifaddrs", __func__); + return (-1); + } + + /* Look for a matching interface */ + for (ifa = ifap; ifa != NULL; ifa++) { + if (strcmp(ifname, ifa->ifa_name) != 0) + continue; + + /* Found it - check if there's an ifa_addr */ + if (ifa->ifa_addr == NULL) { + syslog(LOG_CRIT, "%s: ifname %s; ifa_addr is NULL\n", + __func__, ifname); + goto err; + } + + /* Check address family */ + sdl = (struct sockaddr_dl *) ifa->ifa_addr; + if (sdl->sdl_type != IFT_ETHER) { + syslog(LOG_CRIT, "%s: %s: unknown aftype (%d)\n", + __func__, + ifname, + sdl->sdl_type); + goto err; + } + if (sdl->sdl_alen != ETHER_ADDR_LEN) { + syslog(LOG_CRIT, "%s: %s: aflen too short (%d)\n", + __func__, + ifname, + sdl->sdl_alen); + goto err; + } + + /* Ok, found it */ + memcpy(macaddr, (void *) LLADDR(sdl), ETHER_ADDR_LEN); + goto ok; + } + syslog(LOG_CRIT, "%s: couldn't find ifname %s\n", __func__, ifname); + /* FALLTHROUGH */ +err: + freeifaddrs(ifap); + return (-1); + +ok: + freeifaddrs(ifap); + return (0); +} + +/* * Scan the system for WDS vaps associated with the ifnet's we're * supposed to monitor. Any vaps are added to our internal table * so we can find them (and destroy them) on station leave. @@ -374,6 +447,7 @@ wds_discovery(const char *ifname, const uint8_t bssid[ struct wds *p; char parent[256]; char cmd[1024]; + uint8_t macaddr[ETHER_ADDR_LEN]; int status; for (p = wds; p != NULL; p = p->next) @@ -388,13 +462,19 @@ wds_discovery(const char *ifname, const uint8_t bssid[ return; } + if (getlladdr(ifname, macaddr) < 0) { + syslog(LOG_ERR, "%s: couldn't get lladdr for parent interface: %m", + ifname); + return; + } + p = malloc(sizeof(struct wds)); if (p == NULL) { syslog(LOG_ERR, "%s: malloc failed: %m", __func__); return; } IEEE80211_ADDR_COPY(p->bssid, bssid); - if (wds_vap_create(parent, p) < 0) { + if (wds_vap_create(parent, macaddr, p) < 0) { free(p); return; } @@ -403,8 +483,11 @@ wds_discovery(const char *ifname, const uint8_t bssid[ */ p->next = wds; wds = p; - syslog(LOG_INFO, "[%s] create wds vap %s", ether_sprintf(bssid), - p->ifname); + syslog(LOG_INFO, "[%s] create wds vap %s, parent %s (%s)", + ether_sprintf(bssid), + p->ifname, + ifname, + parent); if (script != NULL) { snprintf(cmd, sizeof(cmd), "%s %s", script, p->ifname); status = system(cmd); @@ -454,17 +537,35 @@ wds_leave(const uint8_t bssid[IEEE80211_ADDR_LEN]) } static int -wds_vap_create(const char *parent, struct wds *p) +wds_vap_create(const char *parent, uint8_t macaddr[ETHER_ADDR_LEN], + struct wds *p) { struct ieee80211_clone_params cp; struct ifreq ifr; int s, status; + char bssid_str[32], macaddr_str[32]; memset(&cp, 0, sizeof(cp)); + + /* Parent interface */ strncpy(cp.icp_parent, parent, IFNAMSIZ); + + /* WDS interface */ cp.icp_opmode = IEEE80211_M_WDS; + + /* BSSID for the current node */ IEEE80211_ADDR_COPY(cp.icp_bssid, p->bssid); + /* + * Set the MAC address to match the actual interface + * that we received the discovery event from. + * That way we can run WDS on any VAP rather than + * only the first VAP and then correctly set the + * MAC address. + */ + cp.icp_flags |= IEEE80211_CLONE_MACADDR; + IEEE80211_ADDR_COPY(cp.icp_macaddr, macaddr); + memset(&ifr, 0, sizeof(ifr)); strncpy(ifr.ifr_name, "wlan", IFNAMSIZ); ifr.ifr_data = (void *) &cp; @@ -477,9 +578,10 @@ wds_vap_create(const char *parent, struct wds *p) status = 0; } else { syslog(LOG_ERR, "SIOCIFCREATE2(" - "mode %u flags 0x%x parent %s bssid %s): %m", + "mode %u flags 0x%x parent %s bssid %s macaddr %s): %m", cp.icp_opmode, cp.icp_flags, parent, - ether_sprintf(cp.icp_bssid)); + ether_ntoa_r((void *) cp.icp_bssid, bssid_str), + ether_ntoa_r((void *) cp.icp_macaddr, macaddr_str)); } close(s); } else From owner-svn-src-head@freebsd.org Mon Jul 31 17:49:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5317DB56E9; Mon, 31 Jul 2017 17:49:48 +0000 (UTC) (envelope-from dru@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93E582267; Mon, 31 Jul 2017 17:49:48 +0000 (UTC) (envelope-from dru@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VHnlub056942; Mon, 31 Jul 2017 17:49:47 GMT (envelope-from dru@FreeBSD.org) Received: (from dru@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VHnl5i056941; Mon, 31 Jul 2017 17:49:47 GMT (envelope-from dru@FreeBSD.org) Message-Id: <201707311749.v6VHnl5i056941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dru set sender to dru@FreeBSD.org using -f From: Dru Lavigne Date: Mon, 31 Jul 2017 17:49:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321801 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: dru X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321801 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 17:49:48 -0000 Author: dru (doc committer) Date: Mon Jul 31 17:49:47 2017 New Revision: 321801 URL: https://svnweb.freebsd.org/changeset/base/321801 Log: Add myself to calendar. Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 17:33:57 2017 (r321800) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 17:49:47 2017 (r321801) @@ -254,6 +254,7 @@ 07/19 Masafumi NAKANE born in Okazaki, Aichi, Japan, 1972 07/19 Simon L. Nielsen born in Copenhagen, Denmark, 1980 07/19 Gleb Smirnoff born in Kharkov, USSR, 1981 +07/20 Dru Lavigne born in Kingston, Ontario, Canada, 1965 07/20 Andrey V. Elsukov born in Kotelnich, Russian Federation, 1981 07/22 James Housley born in Chicago, Illinois, United States, 1965 07/22 Jens Schweikhardt born in Waiblingen, Baden-Wuerttemberg, Germany, 1967 From owner-svn-src-head@freebsd.org Mon Jul 31 17:57:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E2C7DB5A24; Mon, 31 Jul 2017 17:57:45 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AD2928CD; Mon, 31 Jul 2017 17:57:45 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VHviv1061303; Mon, 31 Jul 2017 17:57:44 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VHviUY061302; Mon, 31 Jul 2017 17:57:44 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201707311757.v6VHviUY061302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Mon, 31 Jul 2017 17:57:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321802 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: erj X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321802 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 17:57:45 -0000 Author: erj Date: Mon Jul 31 17:57:44 2017 New Revision: 321802 URL: https://svnweb.freebsd.org/changeset/base/321802 Log: Add myself to calendar.freebsd Reported by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 17:49:47 2017 (r321801) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 17:57:44 2017 (r321802) @@ -309,6 +309,7 @@ 09/05 Mark Robert Vaughan Murray born in Harare, Mashonaland, Zimbabwe, 1961 09/05 Adrian Harold Chadd born in Perth, Western Australia, Australia, 1979 09/05 Rodrigo Osorio born in Montevideo, Uruguay, 1975 +09/06 Eric Joyner born in Fairfax, Virginia, United States, 1991 09/07 Tim Bishop born in Cornwall, United Kingdom, 1978 09/07 Chris Rees born in Kettering, United Kingdom, 1987 09/08 Boris Samorodov born in Krasnodar, Russian Federation, 1963 From owner-svn-src-head@freebsd.org Mon Jul 31 17:57:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E786DB5A6E; Mon, 31 Jul 2017 17:57:56 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28355294F; Mon, 31 Jul 2017 17:57:56 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VHvteQ061353; Mon, 31 Jul 2017 17:57:55 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VHvtlP061352; Mon, 31 Jul 2017 17:57:55 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201707311757.v6VHvtlP061352@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 31 Jul 2017 17:57:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321803 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 321803 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 17:57:56 -0000 Author: markj Date: Mon Jul 31 17:57:54 2017 New Revision: 321803 URL: https://svnweb.freebsd.org/changeset/base/321803 Log: Don't trace running threads that have interrupts disabled. In this case we shouldn't assume that the thread has a valid frame pointer. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11787 Modified: head/sys/x86/x86/stack_machdep.c Modified: head/sys/x86/x86/stack_machdep.c ============================================================================== --- head/sys/x86/x86/stack_machdep.c Mon Jul 31 17:57:44 2017 (r321802) +++ head/sys/x86/x86/stack_machdep.c Mon Jul 31 17:57:54 2017 (r321803) @@ -49,12 +49,14 @@ __FBSDID("$FreeBSD$"); #ifdef __i386__ #define PCB_FP(pcb) ((pcb)->pcb_ebp) +#define TF_FLAGS(tf) ((tf)->tf_eflags) #define TF_FP(tf) ((tf)->tf_ebp) #define TF_PC(tf) ((tf)->tf_eip) typedef struct i386_frame *x86_frame_t; #else #define PCB_FP(pcb) ((pcb)->pcb_rbp) +#define TF_FLAGS(tf) ((tf)->tf_rflags) #define TF_FP(tf) ((tf)->tf_rbp) #define TF_PC(tf) ((tf)->tf_rip) @@ -104,10 +106,10 @@ stack_nmi_handler(struct trapframe *tf) if (nmi_stack == NULL || curthread != nmi_pending) return (0); - if (INKERNEL(TF_PC(tf))) + if (INKERNEL(TF_PC(tf)) && (TF_FLAGS(tf) & PSL_I) != 0) stack_capture(curthread, nmi_stack, TF_FP(tf)); else - /* We interrupted a thread in user mode. */ + /* We were running in usermode or had interrupts disabled. */ nmi_stack->depth = 0; atomic_store_rel_ptr((long *)&nmi_pending, (long)NULL); @@ -155,7 +157,6 @@ stack_save_td_running(struct stack *st, struct thread mtx_unlock_spin(&nmi_lock); if (st->depth == 0) - /* We interrupted a thread in user mode. */ return (EAGAIN); #else /* !SMP */ KASSERT(0, ("curthread isn't running")); From owner-svn-src-head@freebsd.org Mon Jul 31 18:10:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1D7ADB5E21; Mon, 31 Jul 2017 18:10:11 +0000 (UTC) (envelope-from mjoras@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EE00306E; Mon, 31 Jul 2017 18:10:11 +0000 (UTC) (envelope-from mjoras@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VIAAFF065495; Mon, 31 Jul 2017 18:10:10 GMT (envelope-from mjoras@FreeBSD.org) Received: (from mjoras@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VIAAjF065494; Mon, 31 Jul 2017 18:10:10 GMT (envelope-from mjoras@FreeBSD.org) Message-Id: <201707311810.v6VIAAjF065494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjoras set sender to mjoras@FreeBSD.org using -f From: Matt Joras Date: Mon, 31 Jul 2017 18:10:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321804 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: mjoras X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321804 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 18:10:11 -0000 Author: mjoras Date: Mon Jul 31 18:10:10 2017 New Revision: 321804 URL: https://svnweb.freebsd.org/changeset/base/321804 Log: Add myself to the calendar. Reported by: mckusick Approved by: rstone (mentor) Differential Revision: https://reviews.freebsd.org/D11797 Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 17:57:54 2017 (r321803) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 18:10:10 2017 (r321804) @@ -374,6 +374,7 @@ 11/15 Lars Engels born in Hilden, Nordrhein-Westfalen, Germany, 1980 11/15 Tijl Coosemans born in Duffel, Belgium, 1983 11/16 Jose Maria Alcaide Salinas born in Madrid, Spain, 1962 +11/16 Matt Joras born in Evanston, Illinois, United States, 1992 11/17 Ralf S. Engelschall born in Dachau, Bavaria, Germany, 1972 11/18 Thomas Quinot born in Paris, France, 1977 11/19 Konstantin Belousov born in Kiev, USSR, 1972 From owner-svn-src-head@freebsd.org Mon Jul 31 18:49:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3286DDB6A96; Mon, 31 Jul 2017 18:49:00 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E738B635D3; Mon, 31 Jul 2017 18:48:59 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VImxSX081722; Mon, 31 Jul 2017 18:48:59 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VImxpY081721; Mon, 31 Jul 2017 18:48:59 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201707311848.v6VImxpY081721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 31 Jul 2017 18:48:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321805 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 321805 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 18:49:00 -0000 Author: markj Date: Mon Jul 31 18:48:58 2017 New Revision: 321805 URL: https://svnweb.freebsd.org/changeset/base/321805 Log: Batch v_wire_count decrements in vm_hold_free_pages(). Atomic updates to v_wire_count are a significant source of contention, so combine multiple updates into one in this easy case. Also remove an old printf that gets executed if the page is shared-busied, which is a case that will lead to a panic anyway. Reviewed by: alc, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11791 Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Mon Jul 31 18:10:10 2017 (r321804) +++ head/sys/kern/vfs_bio.c Mon Jul 31 18:48:58 2017 (r321805) @@ -4532,13 +4532,10 @@ vm_hold_free_pages(struct buf *bp, int newbsize) for (index = newnpages; index < bp->b_npages; index++) { p = bp->b_pages[index]; bp->b_pages[index] = NULL; - if (vm_page_sbusied(p)) - printf("vm_hold_free_pages: blkno: %jd, lblkno: %jd\n", - (intmax_t)bp->b_blkno, (intmax_t)bp->b_lblkno); p->wire_count--; vm_page_free(p); - atomic_subtract_int(&vm_cnt.v_wire_count, 1); } + atomic_subtract_int(&vm_cnt.v_wire_count, bp->b_npages - newnpages); bp->b_npages = newnpages; } From owner-svn-src-head@freebsd.org Mon Jul 31 19:07:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51D26DB6FAB; Mon, 31 Jul 2017 19:07:46 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C5C763F70; Mon, 31 Jul 2017 19:07:46 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VJ7j9O089783; Mon, 31 Jul 2017 19:07:45 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VJ7j4s089782; Mon, 31 Jul 2017 19:07:45 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201707311907.v6VJ7j4s089782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 31 Jul 2017 19:07:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321806 - head/lib/libtelnet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/lib/libtelnet X-SVN-Commit-Revision: 321806 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 19:07:46 -0000 Author: cy Date: Mon Jul 31 19:07:45 2017 New Revision: 321806 URL: https://svnweb.freebsd.org/changeset/base/321806 Log: Remove redundant include directories which expand to a noop, "-I/lib/krb5 -I -I". Reviewed by: ngie@, markm@ MFC after: 1 month Differential Revision: D11769 Modified: head/lib/libtelnet/Makefile Modified: head/lib/libtelnet/Makefile ============================================================================== --- head/lib/libtelnet/Makefile Mon Jul 31 18:48:58 2017 (r321805) +++ head/lib/libtelnet/Makefile Mon Jul 31 19:07:45 2017 (r321806) @@ -23,8 +23,7 @@ CFLAGS+= -DENCRYPTION -DAUTHENTICATION -DSRA .if ${MK_KERBEROS_SUPPORT} != "no" SRCS+= kerberos5.c -CFLAGS+= -DKRB5 -I${KRB5DIR}/lib/krb5 -I${KRB5OBJDIR} -I${ASN1OBJDIR} -CFLAGS+= -DFORWARD -Dnet_write=telnet_net_write +CFLAGS+= -DKRB5 -DFORWARD -Dnet_write=telnet_net_write .endif .include From owner-svn-src-head@freebsd.org Mon Jul 31 19:34:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA446DB7B91; Mon, 31 Jul 2017 19:34:40 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A2A36528A; Mon, 31 Jul 2017 19:34:40 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VJYdTS002484; Mon, 31 Jul 2017 19:34:39 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VJYcMx002466; Mon, 31 Jul 2017 19:34:38 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201707311934.v6VJYcMx002466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 31 Jul 2017 19:34:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321810 - in head: contrib/mdocml usr.bin/mandoc X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in head: contrib/mdocml usr.bin/mandoc X-SVN-Commit-Revision: 321810 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 19:34:40 -0000 Author: bapt Date: Mon Jul 31 19:34:38 2017 New Revision: 321810 URL: https://svnweb.freebsd.org/changeset/base/321810 Log: Update mandoc to 1.14.2 Added: head/contrib/mdocml/compat_recallocarray.c - copied unchanged from r321808, vendor/mdocml/dist/compat_recallocarray.c head/contrib/mdocml/mandoc_xr.c - copied unchanged from r321808, vendor/mdocml/dist/mandoc_xr.c head/contrib/mdocml/mandoc_xr.h - copied unchanged from r321808, vendor/mdocml/dist/mandoc_xr.h head/contrib/mdocml/test-recallocarray.c - copied unchanged from r321808, vendor/mdocml/dist/test-recallocarray.c Modified: head/contrib/mdocml/INSTALL head/contrib/mdocml/LICENSE head/contrib/mdocml/Makefile head/contrib/mdocml/Makefile.depend head/contrib/mdocml/NEWS head/contrib/mdocml/TODO head/contrib/mdocml/apropos.1 head/contrib/mdocml/att.c head/contrib/mdocml/cgi.c head/contrib/mdocml/chars.c head/contrib/mdocml/config.h head/contrib/mdocml/configure head/contrib/mdocml/configure.local.example head/contrib/mdocml/demandoc.c head/contrib/mdocml/eqn.7 head/contrib/mdocml/eqn.c head/contrib/mdocml/eqn_html.c head/contrib/mdocml/eqn_term.c head/contrib/mdocml/gmdiff head/contrib/mdocml/html.c head/contrib/mdocml/html.h head/contrib/mdocml/lib.c head/contrib/mdocml/libmandoc.h head/contrib/mdocml/libroff.h head/contrib/mdocml/main.c head/contrib/mdocml/man.7 head/contrib/mdocml/man.c head/contrib/mdocml/man.options.1 head/contrib/mdocml/man_html.c head/contrib/mdocml/man_macro.c head/contrib/mdocml/man_term.c head/contrib/mdocml/man_validate.c head/contrib/mdocml/manconf.h head/contrib/mdocml/mandoc.1 head/contrib/mdocml/mandoc.3 head/contrib/mdocml/mandoc.c head/contrib/mdocml/mandoc.css head/contrib/mdocml/mandoc.h head/contrib/mdocml/mandoc_aux.c head/contrib/mdocml/mandoc_aux.h head/contrib/mdocml/mandoc_char.7 head/contrib/mdocml/mandoc_escape.3 head/contrib/mdocml/mandoc_headers.3 head/contrib/mdocml/mandoc_html.3 head/contrib/mdocml/mandocd.c head/contrib/mdocml/mandocdb.c head/contrib/mdocml/manpath.c head/contrib/mdocml/mansearch.c head/contrib/mdocml/mdoc.7 head/contrib/mdocml/mdoc.c head/contrib/mdocml/mdoc_html.c head/contrib/mdocml/mdoc_man.c head/contrib/mdocml/mdoc_markdown.c head/contrib/mdocml/mdoc_term.c head/contrib/mdocml/mdoc_validate.c head/contrib/mdocml/msec.in head/contrib/mdocml/out.c head/contrib/mdocml/out.h head/contrib/mdocml/read.c head/contrib/mdocml/roff.7 head/contrib/mdocml/roff.c head/contrib/mdocml/roff.h head/contrib/mdocml/roff_html.c head/contrib/mdocml/roff_int.h head/contrib/mdocml/roff_term.c head/contrib/mdocml/roff_validate.c head/contrib/mdocml/soelim.1 head/contrib/mdocml/st.c head/contrib/mdocml/st.in head/contrib/mdocml/tbl.7 head/contrib/mdocml/tbl.c head/contrib/mdocml/tbl_data.c head/contrib/mdocml/tbl_html.c head/contrib/mdocml/tbl_layout.c head/contrib/mdocml/tbl_term.c head/contrib/mdocml/term.c head/contrib/mdocml/term.h head/contrib/mdocml/term_ascii.c head/contrib/mdocml/term_tab.c head/contrib/mdocml/tree.c head/usr.bin/mandoc/Makefile Directory Properties: head/contrib/mdocml/ (props changed) Modified: head/contrib/mdocml/INSTALL ============================================================================== --- head/contrib/mdocml/INSTALL Mon Jul 31 19:30:23 2017 (r321809) +++ head/contrib/mdocml/INSTALL Mon Jul 31 19:34:38 2017 (r321810) @@ -1,22 +1,24 @@ -$Id: INSTALL,v 1.18 2017/02/08 12:24:10 schwarze Exp $ +$Id: INSTALL,v 1.20 2017/07/28 14:57:56 schwarze Exp $ -About mdocml, the portable mandoc distribution ----------------------------------------------- -The mandoc manpage compiler toolset is a suite of tools compiling -mdoc(7), the roff(7) macro language of choice for BSD manual pages, -and man(7), the predominant historical language for UNIX manuals. +About the portable mandoc distribution +-------------------------------------- +The mandoc manpage compiler toolset (formerly called "mdocml") +is a suite of tools compiling mdoc(7), the roff(7) macro language +of choice for BSD manual pages, and man(7), the predominant +historical language for UNIX manuals. + It includes a man(1) manual viewer and additional tools. -For general information, see . +For general information, see . In case you have questions or want to provide feedback, read -. Consider subscribing to the +. Consider subscribing to the discuss@ mailing list mentioned on that page. If you intend to help with the development of mandoc, consider subscribing to the tech@ mailing list, too. Enjoy using the mandoc toolset! -Ingo Schwarze, Karlsruhe, February 2017 +Ingo Schwarze, Karlsruhe, July 2017 Installation @@ -25,7 +27,7 @@ Before manually installing mandoc on your system, plea whether the newest version of mandoc is already installed by default or available via a binary package or a ports system. A list of the latest bundled and ported versions of mandoc for various operating -systems is maintained at . +systems is maintained at . Regarding how packages and ports are maintained for your operating system, please consult your operating system documentation. @@ -35,7 +37,7 @@ To install mandoc manually, the following steps are ne run the command "echo BUILD_CGI=1 >> configure.local". Then run "cp cgi.h.example cgi.h" and edit cgi.h as desired. -2. If you also want to build the new catman(8) utility, run the +2. If you also want to build the catman(8) utility, run the command "echo BUILD_CATMAN=1 >> configure.local". Note that it is unlikely to be a drop-in replacement providing the same functionality as your system's "catman", if your operating @@ -75,7 +77,7 @@ command like "make DESTDIR=... install". Read the *-i in the "Makefile" to understand how DESTDIR is used. 9. Run the command "sudo makewhatis" to build mandoc.db(5) databases -in all the directory trees configured in step 6. Whenever installing +in all the directory trees configured in step 3. Whenever installing new manual pages, re-run makewhatis(8) to update the databases, or apropos(1) will not find the new pages. Modified: head/contrib/mdocml/LICENSE ============================================================================== --- head/contrib/mdocml/LICENSE Mon Jul 31 19:30:23 2017 (r321809) +++ head/contrib/mdocml/LICENSE Mon Jul 31 19:34:38 2017 (r321810) @@ -1,7 +1,7 @@ -$Id: LICENSE,v 1.15 2017/02/21 00:37:03 schwarze Exp $ +$Id: LICENSE,v 1.17 2017/06/23 15:58:14 schwarze Exp $ With the exceptions noted below, all code and documentation -contained in the mdocml toolkit is protected by the Copyright +contained in the mandoc toolkit is protected by the Copyright of the following developers: Copyright (c) 2008-2012, 2014 Kristaps Dzonsons @@ -13,7 +13,7 @@ Copyright (c) 2016 Ed Maste Copyright (c) 2017 Michael Stapelberg Copyright (c) 1999, 2004 Marc Espie Copyright (c) 1998, 2004, 2010 Todd C. Miller -Copyright (c) 2008 Otto Moerbeek +Copyright (c) 2008, 2017 Otto Moerbeek Copyright (c) 2004 Ted Unangst Copyright (c) 1994 Christos Zoulas Copyright (c) 2003, 2007, 2008, 2014 Jason McIntyre @@ -22,7 +22,7 @@ See the individual source files for information about to which file during which years. -The mdocml distribution as a whole is distributed by its developers +The mandoc distribution as a whole is distributed by its developers under the following license: Permission to use, copy, modify, and distribute this software for any Modified: head/contrib/mdocml/Makefile ============================================================================== --- head/contrib/mdocml/Makefile Mon Jul 31 19:30:23 2017 (r321809) +++ head/contrib/mdocml/Makefile Mon Jul 31 19:34:38 2017 (r321810) @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.512 2017/05/07 17:31:45 schwarze Exp $ +# $Id: Makefile,v 1.516 2017/07/20 16:24:53 schwarze Exp $ # # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons # Copyright (c) 2011, 2013-2017 Ingo Schwarze @@ -15,7 +15,7 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -VERSION = 1.14.1 +VERSION = 1.14.2 # === LIST OF FILES ==================================================== @@ -38,6 +38,7 @@ TESTSRCS = test-be32toh.c \ test-progname.c \ test-recvmsg.c \ test-reallocarray.c \ + test-recallocarray.c \ test-rewb-bsd.c \ test-rewb-sysv.c \ test-sandbox_init.c \ @@ -64,6 +65,7 @@ SRCS = att.c \ compat_ohash.c \ compat_progname.c \ compat_reallocarray.c \ + compat_recallocarray.c \ compat_strcasestr.c \ compat_stringlist.c \ compat_strlcat.c \ @@ -92,6 +94,7 @@ SRCS = att.c \ mandoc.c \ mandoc_aux.c \ mandoc_ohash.c \ + mandoc_xr.c \ mandocd.c \ mandocdb.c \ manpath.c \ @@ -178,6 +181,7 @@ DISTFILES = INSTALL \ mandoc_html.3 \ mandoc_malloc.3 \ mandoc_ohash.h \ + mandoc_xr.h \ mandocd.8 \ mansearch.3 \ mansearch.h \ @@ -227,6 +231,7 @@ LIBMANDOC_OBJS = $(LIBMAN_OBJS) \ mandoc.o \ mandoc_aux.o \ mandoc_ohash.o \ + mandoc_xr.o \ msec.o \ preconv.o \ read.o @@ -240,6 +245,7 @@ COMPAT_OBJS = compat_err.o \ compat_ohash.o \ compat_progname.o \ compat_reallocarray.o \ + compat_recallocarray.o \ compat_strcasestr.o \ compat_strlcat.o \ compat_strlcpy.o \ @@ -341,9 +347,6 @@ WWW_MANS = apropos.1.html \ mdoc.h.html \ roff.h.html -WWW_OBJS = mdocml.tar.gz \ - mdocml.sha256 - # === USER CONFIGURATION =============================================== include Makefile.local @@ -354,7 +357,7 @@ all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile. install: base-install $(INSTALL_TARGETS) -www: $(WWW_OBJS) $(WWW_MANS) +www: $(WWW_MANS) $(WWW_MANS): mandoc @@ -372,10 +375,10 @@ clean: rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS) rm -f mandoc $(MAIN_OBJS) rm -f man.cgi $(CGI_OBJS) - rm -f mandocd catman $(MANDOCD_OBJS) + rm -f mandocd catman catman.o $(MANDOCD_OBJS) rm -f demandoc $(DEMANDOC_OBJS) rm -f soelim $(SOELIM_OBJS) - rm -f $(WWW_MANS) $(WWW_OBJS) + rm -f $(WWW_MANS) mandoc.tar.gz mandoc.sha256 rm -rf *.dSYM base-install: mandoc demandoc soelim @@ -509,13 +512,7 @@ soelim: $(SOELIM_OBJS) # --- maintainer targets --- www-install: www - mkdir -p $(HTDOCDIR)/snapshots $(INSTALL_DATA) $(WWW_MANS) mandoc.css $(HTDOCDIR) - $(INSTALL_DATA) $(WWW_OBJS) $(HTDOCDIR)/snapshots - $(INSTALL_DATA) mdocml.tar.gz \ - $(HTDOCDIR)/snapshots/mdocml-$(VERSION).tar.gz - $(INSTALL_DATA) mdocml.sha256 \ - $(HTDOCDIR)/snapshots/mdocml-$(VERSION).sha256 depend: config.h mkdep -f Makefile.depend $(CFLAGS) $(SRCS) @@ -542,24 +539,25 @@ regress-distcheck: ! -name '*.out_ascii' \ ! -name '*.out_utf8' \ ! -name '*.out_html' \ + ! -name '*.out_markdown' \ ! -name '*.out_lint' \ ! -path regress/regress.pl \ ! -path regress/regress.pl.1 -dist: mdocml.sha256 +dist: mandoc.sha256 -mdocml.sha256: mdocml.tar.gz - sha256 mdocml.tar.gz > $@ +mandoc.sha256: mandoc.tar.gz + sha256 mandoc.tar.gz > $@ -mdocml.tar.gz: $(DISTFILES) +mandoc.tar.gz: $(DISTFILES) ls regress/*/*/*.mandoc_* && exit 1 || true - mkdir -p .dist/mdocml-$(VERSION)/ - $(INSTALL) -m 0644 $(DISTFILES) .dist/mdocml-$(VERSION) - cp -pR regress .dist/mdocml-$(VERSION) - find .dist/mdocml-$(VERSION)/regress \ + mkdir -p .dist/mandoc-$(VERSION)/ + $(INSTALL) -m 0644 $(DISTFILES) .dist/mandoc-$(VERSION) + cp -pR regress .dist/mandoc-$(VERSION) + find .dist/mandoc-$(VERSION)/regress \ -type d -name CVS -print0 | xargs -0 rm -rf - chmod 755 .dist/mdocml-$(VERSION)/configure - ( cd .dist/ && tar zcf ../$@ mdocml-$(VERSION) ) + chmod 755 .dist/mandoc-$(VERSION)/configure + ( cd .dist/ && tar zcf ../$@ mandoc-$(VERSION) ) rm -rf .dist/ # === SUFFIX RULES ===================================================== Modified: head/contrib/mdocml/Makefile.depend ============================================================================== --- head/contrib/mdocml/Makefile.depend Mon Jul 31 19:30:23 2017 (r321809) +++ head/contrib/mdocml/Makefile.depend Mon Jul 31 19:34:38 2017 (r321810) @@ -1,4 +1,4 @@ -att.o: att.c config.h roff.h mdoc.h libmdoc.h +att.o: att.c config.h mandoc.h roff.h mdoc.h libmdoc.h catman.o: catman.c config.h compat_fts.h cgi.o: cgi.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h main.h manconf.h mansearch.h cgi.h chars.o: chars.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h libmandoc.h @@ -11,6 +11,7 @@ compat_mkdtemp.o: compat_mkdtemp.c config.h compat_ohash.o: compat_ohash.c config.h compat_ohash.h compat_progname.o: compat_progname.c config.h compat_reallocarray.o: compat_reallocarray.c config.h +compat_recallocarray.o: compat_recallocarray.c config.h compat_strcasestr.o: compat_strcasestr.c config.h compat_stringlist.o: compat_stringlist.c config.h compat_stringlist.h compat_strlcat.o: compat_strlcat.c config.h @@ -24,44 +25,45 @@ dba_read.o: dba_read.c mandoc_aux.h mansearch.h dba_ar dba_write.o: dba_write.c config.h dba_write.h dbm.o: dbm.c config.h mansearch.h dbm_map.h dbm.h dbm_map.o: dbm_map.c config.h mansearch.h dbm_map.h dbm.h -demandoc.o: demandoc.c config.h roff.h man.h mdoc.h mandoc.h -eqn.o: eqn.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h +demandoc.o: demandoc.c config.h mandoc.h roff.h man.h mdoc.h +eqn.o: eqn.c config.h mandoc_aux.h mandoc.h roff.h libmandoc.h libroff.h eqn_html.o: eqn_html.c config.h mandoc.h out.h html.h eqn_term.o: eqn_term.c config.h mandoc.h out.h term.h html.o: html.c config.h mandoc_aux.h mandoc.h roff.h out.h html.h manconf.h main.h -lib.o: lib.c config.h roff.h mdoc.h libmdoc.h lib.in -main.o: main.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h tag.h main.h manconf.h mansearch.h +lib.o: lib.c config.h mandoc.h roff.h mdoc.h libmdoc.h lib.in +main.o: main.c config.h mandoc_aux.h mandoc.h mandoc_xr.h roff.h mdoc.h man.h tag.h main.h manconf.h mansearch.h man.o: man.c config.h mandoc_aux.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h -man_html.o: man_html.c config.h mandoc_aux.h roff.h man.h out.h html.h main.h +man_html.o: man_html.c config.h mandoc_aux.h mandoc.h roff.h man.h out.h html.h main.h man_macro.o: man_macro.c config.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h man_term.o: man_term.c config.h mandoc_aux.h mandoc.h roff.h man.h out.h term.h main.h man_validate.o: man_validate.c config.h mandoc_aux.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h -mandoc.o: mandoc.c config.h mandoc.h mandoc_aux.h libmandoc.h +mandoc.o: mandoc.c config.h mandoc_aux.h mandoc.h roff.h libmandoc.h mandoc_aux.o: mandoc_aux.c config.h mandoc.h mandoc_aux.h mandoc_ohash.o: mandoc_ohash.c mandoc_aux.h mandoc_ohash.h compat_ohash.h +mandoc_xr.o: mandoc_xr.c mandoc_aux.h mandoc_ohash.h compat_ohash.h mandoc_xr.h mandocd.o: mandocd.c config.h mandoc.h roff.h mdoc.h man.h main.h manconf.h mandocdb.o: mandocdb.c config.h compat_fts.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mandoc.h roff.h mdoc.h man.h manconf.h mansearch.h dba_array.h dba.h manpath.o: manpath.c config.h mandoc_aux.h manconf.h mansearch.o: mansearch.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h manconf.h mansearch.h dbm.h mdoc.o: mdoc.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h mdoc_argv.o: mdoc_argv.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h -mdoc_html.o: mdoc_html.c config.h mandoc_aux.h roff.h mdoc.h out.h html.h main.h +mdoc_html.o: mdoc_html.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h out.h html.h main.h mdoc_macro.o: mdoc_macro.c config.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h mdoc_man.o: mdoc_man.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h out.h main.h mdoc_markdown.o: mdoc_markdown.c mandoc_aux.h mandoc.h roff.h mdoc.h main.h mdoc_state.o: mdoc_state.c mandoc.h roff.h mdoc.h libmandoc.h libmdoc.h mdoc_term.o: mdoc_term.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h out.h term.h tag.h main.h -mdoc_validate.o: mdoc_validate.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h +mdoc_validate.o: mdoc_validate.c config.h mandoc_aux.h mandoc.h mandoc_xr.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h msec.o: msec.c config.h mandoc.h libmandoc.h msec.in out.o: out.c config.h mandoc_aux.h mandoc.h out.h preconv.o: preconv.c config.h mandoc.h libmandoc.h -read.o: read.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h libmandoc.h roff_int.h +read.o: read.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h libmandoc.h roff.o: roff.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h roff.h libmandoc.h roff_int.h libroff.h predefs.in -roff_html.o: roff_html.c roff.h out.h html.h -roff_term.o: roff_term.c roff.h out.h term.h +roff_html.o: roff_html.c mandoc.h roff.h out.h html.h +roff_term.o: roff_term.c mandoc.h roff.h out.h term.h roff_validate.o: roff_validate.c mandoc.h roff.h libmandoc.h roff_int.h soelim.o: soelim.c config.h compat_stringlist.h -st.o: st.c config.h roff.h mdoc.h libmdoc.h st.in +st.o: st.c config.h mandoc.h roff.h mdoc.h libmdoc.h st.in tag.o: tag.c config.h mandoc_aux.h mandoc_ohash.h compat_ohash.h tag.h tbl.o: tbl.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h tbl_data.o: tbl_data.c config.h mandoc.h mandoc_aux.h libmandoc.h libroff.h Modified: head/contrib/mdocml/NEWS ============================================================================== --- head/contrib/mdocml/NEWS Mon Jul 31 19:30:23 2017 (r321809) +++ head/contrib/mdocml/NEWS Mon Jul 31 19:34:38 2017 (r321810) @@ -1,7 +1,93 @@ -$Id: NEWS,v 1.21 2017/02/21 00:37:03 schwarze Exp $ +$Id: NEWS,v 1.26 2017/07/28 14:57:56 schwarze Exp $ -This file lists the most important changes in the mdocml.bsd.lv distribution. +This file lists the most important changes in the mandoc.bsd.lv distribution. +Changes in version 1.14.2, released on July 28, 2017 + + --- MAJOR NEW FEATURES --- + * New mdoc(7) -Tmarkdown output mode. + * For -Thtml, implement internal hyperlinks pointing to authoritative + definitions of various syntax elements, similar to the ctags(1)-like + less(1) :t internal searching in terminal mode. + * Provide a superset of the functionality of the former mdoclint(1) + utility and a new -Wstyle message level with several new messages, + including validity checking of .Xr cross references. + * tbl(7): Implement automatic line breaking inside individual table + cells, and several other formatting improvements. + * eqn(7): Complete rewrite of the lexer, resulting in several bugfixes. + * Continue parser unification, in particular allowing generation + of syntax tree nodes on the roff(7) level, allowing implementation + of many additional roff requests. + --- REMOVED FUNCTIONALITY --- + * Delete the manpage(1) utility. It was never enabled in any release. + * Delete the -Txhtml command line option. It has been an obsolete + alias for the -Thtml output mode for more than two years. + --- MINOR NEW FEATURES --- + * -Tlint now puts parser messages on stdout instead of stderr, + making commands like "man -l -Tlint *.1" useful. + * mdoc(7): Various .Lk formatting improvements. + * mdoc(7) -Thtml: Better CSS for .Bl lists. + * man(7): Implement the .MT/.ME block macro (mailto hyperlink). + * man(7): Implement the .DT macro (restore default tab positions). + * man(7): Improved support for manuals generated with reStructuredText + by partial support for the \n[an-margin] number register. + * man(7) -Thtml: Support deep linking to .SH and .SS headers. + * tbl(7): Implement the "allbox" table option. + * tbl(7): Implement the column spacing and the 'w' (minimum column + width) layout modifiers. + * tbl(7): Significant improvements of the manual page. + * eqn(7): Much improved font selection, including recognition of + well-known function names, and a few other formatting improvements. + * eqn(7) -Thtml: Use and in addition to . + * roff(7): Implement the .ce (centering), .mc (margin character), + .rj (right justify), .ta (define tab stops), .ti (temporary indent), + .als (macro alias), .ec and .eo (escape character control), + .po (page offset), and .rn (macro rename) requests. + * roff(7) .am: Implement appending to mdoc(7) and man(7) macros. + * roff(7): implement the \h (horizontol motion), \l (horizontal + line drawing), and \p (break output line) escape sequences, + and also several additional character escape sequences. + * roff(7): Implement the 'd' conditional (macro or string defined). + * man.cgi(8) now uses pledge(2), too. + * regress.pl(1): simpler user interface, better summary output, + simpler code, and no more recursion. + --- THANKS TO --- + * Anthony Bentley (OpenBSD) for the implementation of .MT/.ME, + reports of many bugs and missing features, and suggestions + for a number of feature and documentation improvements. + * Sebastien Marie (OpenBSD) for two source code patches and + for some useful discussions. + * Florian Obser (OpenBSD) for a bugfix patch and a bug report. + * Jonathan Gray (OpenBSD) for several bug reports from afl(1) + and several more from static analysis tools. + * Theo Buehler (OpenBSD) for several bug reports, most from afl(1). + * Jason McIntyre (OpenBSD) for many useful discussions about a + wide variety of topics, lots of continuous testing, a number of + bug reports, and some suggestions for messages and documentation. + * Thomas Klausner (NetBSD) for lots of help while migrating + mdoclint(1) functionality to mandoc -Tlint, for suggesting + several useful new messages, and for release testing. + * Reyk Floeter (OpenBSD) and Vsevolod Stakhov (FreeBSD) for + suggesting a markdown output mode. + * Thomas Guettler for suggesting -Thtml internal hyperlinks. + * Yuri Pankov (Illumos) for inspiring new warning messages and + for extensive release testing. + * Anton Lindqvist and TJ Townsend (both OpenBSD) and Jan Stary + for multiple bug reports. + * Leah Neukirchen (Void Linux) for bug reports and release testing. + * Michael Stapelberg (Debian) for suggesting feature improvements + and for release testing. + * Martin Natano and Theo de Raadt (both OpenBSD), Andreas Voegele, + Gabriel Guzman, Gonzalo Tornaria, Markus Waldeck, and Raf Czlonka + for bug reports. + * Antoine Jacoutot (OpenBSD) and Steffen Nurpmeso for suggesting + feature improvements. + * Dag-Erling Smoergrav (FreeBSD) for inspiring new warning messages. + * Ted Unangst and Marc Espie (OpenBSD) for providing useful ideas. + * Svyatoslav Mishyn (Crux Linux) for release testing. + * Carsten Kunze (Heirloom roff) for help keeping mandoc and groff + compatible and for committing some of my patches to groff. + Changes in version 1.14.1, released on February 21, 2017 --- MAJOR NEW FEATURES --- @@ -274,11 +360,11 @@ Changes in version 1.13.3, released on March 13, 2015 * New -Wunsupp message level. --- POTENTIONALLY SECURITY RELEVANT BUGFIXES --- * Fix a potential write buffer overrun on incomplete string conditionals. - http://mdocml.bsd.lv/cgi-bin/cvsweb/roff.c#rev1.241 + http://mandoc.bsd.lv/cgi-bin/cvsweb/roff.c#rev1.241 * Fix a potential write buffer overrun on backslash at EOF in a conditional. - http://mdocml.bsd.lv/cgi-bin/cvsweb/roff.c#rev1.247 + http://mandoc.bsd.lv/cgi-bin/cvsweb/roff.c#rev1.247 * Fix a use after free sometimes hit when validation deletes a block. - http://mdocml.bsd.lv/cgi-bin/cvsweb/mdoc_macro.c#rev1.180 + http://mandoc.bsd.lv/cgi-bin/cvsweb/mdoc_macro.c#rev1.180 --- MAJOR FUNCTIONALLY RELEVANT BUGFIXES --- * Let man(1) show manuals for the current architecture by default, and support the MACHINE environment variable. @@ -889,4 +975,4 @@ Changes in version 1.9.15, released on February 18, 20 * and column lengths handled correctly. For older releases, see the ChangeLog files -in http://mdocml.bsd.lv/snapshots/ . +in http://mandoc.bsd.lv/snapshots/ . Modified: head/contrib/mdocml/TODO ============================================================================== --- head/contrib/mdocml/TODO Mon Jul 31 19:30:23 2017 (r321809) +++ head/contrib/mdocml/TODO Mon Jul 31 19:34:38 2017 (r321810) @@ -1,6 +1,6 @@ ************************************************************************ * Official mandoc TODO. -* $Id: TODO,v 1.237 2017/05/16 19:06:30 schwarze Exp $ +* $Id: TODO,v 1.246 2017/07/24 11:15:12 schwarze Exp $ ************************************************************************ Many issues are annotated for difficulty as follows: @@ -65,21 +65,10 @@ are mere guesses, and some may be wrong. found by jca@ in ratpoison(1) Sun, 30 Jun 2013 12:01:09 +0200 loc * exist ** algo ** size ** imp ** -- \h horizontal move - #2 most important issue naddy@ Mon, 16 Feb 2015 20:59:17 +0100 - found in cclive(1) nasm(1) bogofilter(1) asciidoc/DocBook output - bentley@ on discuss@ Sat, 21 Sep 2013 22:29:34 -0600 - naddy@ Thu, 4 Dec 2014 16:26:41 +0100 - loc ** exist ** algo ** size * imp *** (parser reorg helps a lot) - - \n+ and \n- numerical register increment and decrement found by bentley@ in sbcl(1) Mon, 9 Dec 2013 18:36:57 -0700 loc * exist * algo * size * imp ** -- \n(.$ macro argument count number register; ocserv(8) by autogen - found by sthen@ Thu, 19 Feb 2015 22:03:01 +0000 - loc * exist ** algo * size * imp ** - - \w'' improve width measurements would not be very useful without an expression parser, see below needed for Tcl_NewStringObj(3) via wiz@ Wed, 5 Mar 2014 22:27:43 +0100 @@ -183,22 +172,6 @@ are mere guesses, and some may be wrong. --- missing tbl features ----------------------------------------------- -- horizontal lines in the layout still consume data cells - and can be mixed with actual data on the same table line - synaptics(4) found by tedu@ Mon, 17 Aug 2015 21:17:42 -0400 - loc ** exist ** algo ** size ** imp *** - -- break long text into lines inside cells - net/lftp(1) from jirib via bentley@ Sep 13, 2016 - -- layout l1 for a column of max text width 3 reduces the following - inter-column spacing for groff, but not for mandoc - net/lftp(1) from jirib via bentley@ Sep 13, 2016 - -- the "w" layout option is ignored - synaptics(4) found by tedu@ Mon, 17 Aug 2015 21:17:42 -0400 - loc * exist * algo * size * imp ** - - the "s" layout column specifier is used for placement of data into columns, but ignored during column width calculations synaptics(4) found by tedu@ Mon, 17 Aug 2015 21:17:42 -0400 @@ -240,6 +213,16 @@ are mere guesses, and some may be wrong. see User's Guide (Second Edition) page 5 section 15. loc ** exist ** algo ** size ** imp ** +- GNU eqn converts some operators to special characters, for example, + input HYPHEN-MINUS becomes output \(mi, unless it is part of a + quoted word. mandoc(1) only does this when the operator is + surrounded by blanks, not when it is part of an unquoted word. + Also, check whether there are more such cases (e.g., +?). + reported by bentley@ 20 Jun 2017 02:04:29 -0600 + +- Primes, opprime, and ' + bentley@ Thu, 13 Jul 2017 23:14:20 -0600 + --- missing misc features ---------------------------------------------- - italic correction (\/) in PostScript mode @@ -359,6 +342,12 @@ are mere guesses, and some may be wrong. .Vt vs .Vt/.Va vs .Ft/.Va vs .Ft/.Fa ... from kristaps@ Tue, 08 Jun 2010 11:13:32 +0200 +- implicit whitespace around inline equations + example code: where '$times$' denotes matrix multiplication + must not have an HTML line break, nor a blank, before + partial solution: html.c {"math", HTML_NLINSIDE | HTML_INDENT}, + bentley@ Thu, 13 Jul 2017 19:00:59 -0600 + - in enclosures, mandoc sometimes fancies a bogus end of sentence reminded by jmc@ Thu, 23 Sep 2010 18:13:39 +0059 loc * exist ** algo *** size * imp *** @@ -421,9 +410,6 @@ are mere guesses, and some may be wrong. Steffen Nurpmeso Sat, 08 Nov 2014 13:34:59 +0100 loc * exist ** algo ** size * imp ** -- .Lk formatting for long links with line breaks - Franco Fichtner 8 Oct 2013 00:33:42 +0200 - - In .Bl -enum -width 0n, groff continues one the same line after the number, mandoc breaks the line. mail to kristaps@ Mon, 20 Jul 2009 02:21:39 +0200 @@ -450,16 +436,6 @@ are mere guesses, and some may be wrong. Probably, this should be fixed somewhere in termp_it_pre(), not sure. loc * exist ** algo ** size * imp ** -- .Nx 1.0a - should be "NetBSD 1.0A", not "NetBSD 1.0a", - see OpenBSD ccdconfig(8). - loc * exist * algo * size * imp ** - -- In .Bl -tag, if a tag exceeds the right margin and must be continued - on the next line, it must be indented by -width, not width+1; - see "rule block|pass" in OpenBSD ifconfig(8). - loc * exist *** algo ** size * imp ** - - When the -width string contains macros, the macros must be rendered before measuring the width, for example .Bl -tag -width ".Dv message" @@ -495,15 +471,24 @@ are mere guesses, and some may be wrong. * warning issues ************************************************************************ -- provide a way in mandoc(1) to warn about broken .Xr links; - probably cannot be on by default in -Tlint because it needs - to access the manpath and mandoc.db(3) after parsing. - asked for by jmc@ Fri, 4 Dec 2015 22:39:40 +0000 +- style message about macros inside .Bd -literal and .Dl, in particular + font changing macros like .Cm, .Ar, .Fa (from the mdoclint TODO) +- style message about mismatches between the section number in the + file name (if it is known) and the section number in .Dt + (from the mdoclint TODO) + +- style message about NULL without .Dv (from the mdoclint TODO) + +- style message about error constants without .Er (from the mdoclint TODO) + - warn when .Sh or .Ss contain other macros Steffen Nurpmeso, savannah.gnu.org/bugs/index.php?45034 loc * exist * algo * size * imp ** +- style message about violations of the convention + .An name Aq Mt localpart@domain in AUTHORS (from the mdoclint TODO) + - warn about attempts to call non-callable macros Steffen Nurpmeso Tue, 11 Nov 2014 22:55:16 +0100 Note that formatting is inconsistent in groff. @@ -512,25 +497,25 @@ are mere guesses, and some may be wrong. all over mdoc_macro.c and all subtly different. loc ** exist ** algo ** size ** imp ** +- style message about suspicious uses of - vs. \- vs. \(mi + e.g. -1 is likely wrong (from the mdoclint TODO) + +- warn about punctuation - e.g. ',' and ';' - at the beginning + of a text line, if it is likely intended to follow the preceding + output without intervening whitespace, in particular after a + macro line (from the mdoclint TODO) + - mandoc_special does not really check the escape sequence, but just the overall format loc ** exist ** algo *** size ** imp ** -- integrate mdoclint into mandoc ("end-of-line whitespace" thread) - from jmc@ Mon, 13 Jul 2009 17:12:09 +0100 - from kristaps@ Mon, 13 Jul 2009 18:34:53 +0200 - from jmc@ Mon, 13 Jul 2009 17:45:37 +0059 - from kristaps@ Mon, 13 Jul 2009 19:02:03 +0200 - (mostly done, check what remains) - -- -Tlint parser errors and warnings to stdout - to tech@mdocml, naddy@ Wed, 28 Sep 2011 11:21:46 +0200 - wait! kristaps@ Sun, 02 Oct 2011 17:12:52 +0200 - ************************************************************************ * documentation issues ************************************************************************ +- dashes, hyphens, and minus signs in manual pages + jmc@ Fri, 28 Mar 2014 07:19:27 +0000 + - mark macros as: page structure domain, manual domain, general text domain is this useful? @@ -543,11 +528,6 @@ are mere guesses, and some may be wrong. * performance issues ************************************************************************ -- Why are we using MAP_SHARED, not MAP_PRIVATE for mmap(2)? - from kristaps@ Sat, 09 Aug 2014 13:51:36 +0200 - -Several areas can be cleaned up to make mandoc even faster. These are - - the PDF file is HUGE: this can be reduced by using relative offsets ************************************************************************ @@ -565,13 +545,13 @@ Several areas can be cleaned up to make mandoc even fa same-line from different-line input. That plainly doesn't work with user-defined macros, leading to random breakage. +- Is it possible to further simplify ENDBODY_SPACE? + - Find better ways to prevent endless loops in roff(7) macro and string expansion. -- Finish cleanup of date handling. - Decide which formats should be recognized where. - Update both mdoc(7) and man(7) documentation. - Triggered by Tim van der Molen Tue, 22 Feb 2011 20:30:45 +0100 +- make buffers for parsing functions const + christos@ via wiz@ Fri, 18 Dec 2015 17:10:01 +0100 - struct mparse refactoring Steffen Nurpmeso Thu, 04 Sep 2014 12:50:00 +0200 Modified: head/contrib/mdocml/apropos.1 ============================================================================== --- head/contrib/mdocml/apropos.1 Mon Jul 31 19:30:23 2017 (r321809) +++ head/contrib/mdocml/apropos.1 Mon Jul 31 19:34:38 2017 (r321810) @@ -1,4 +1,4 @@ -.\" $Id: apropos.1,v 1.45 2017/03/27 18:51:36 schwarze Exp $ +.\" $Id: apropos.1,v 1.46 2017/07/04 23:40:01 schwarze Exp $ .\" .\" Copyright (c) 2011, 2012 Kristaps Dzonsons .\" Copyright (c) 2011, 2012, 2014, 2017 Ingo Schwarze @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: March 27 2017 $ +.Dd $Mdocdate: July 4 2017 $ .Dt APROPOS 1 .Os .Sh NAME @@ -407,7 +407,7 @@ variables: .Dl $ apropos \-s 3 Va=optind \-a Va=optarg .Pp Do exactly the same as calling -.Xr whatis 1 +.Nm whatis with the argument .Qq ssh : .Pp Modified: head/contrib/mdocml/att.c ============================================================================== --- head/contrib/mdocml/att.c Mon Jul 31 19:30:23 2017 (r321809) +++ head/contrib/mdocml/att.c Mon Jul 31 19:34:38 2017 (r321810) @@ -1,4 +1,4 @@ -/* $Id: att.c,v 1.15 2015/10/06 18:32:19 schwarze Exp $ */ +/* $Id: att.c,v 1.16 2017/06/24 14:38:32 schwarze Exp $ */ /* * Copyright (c) 2009 Kristaps Dzonsons * @@ -19,6 +19,7 @@ #include #include +#include "mandoc.h" #include "roff.h" #include "mdoc.h" #include "libmdoc.h" Modified: head/contrib/mdocml/cgi.c ============================================================================== --- head/contrib/mdocml/cgi.c Mon Jul 31 19:30:23 2017 (r321809) +++ head/contrib/mdocml/cgi.c Mon Jul 31 19:34:38 2017 (r321810) @@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.154 2017/04/19 01:00:03 schwarze Exp $ */ +/* $Id: cgi.c,v 1.156 2017/06/24 14:38:32 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze @@ -140,16 +140,16 @@ html_putchar(char c) { switch (c) { - case ('"'): + case '"': printf("""); break; - case ('&'): + case '&': printf("&"); break; - case ('>'): + case '>': printf(">"); break; - case ('<'): + case '<': printf("<"); break; default: @@ -832,7 +832,7 @@ resp_format(const struct req *req, const char *file) mchars_alloc(); mp = mparse_alloc(MPARSE_SO | MPARSE_UTF8 | MPARSE_LATIN1, - MANDOCLEVEL_BADARG, NULL, req->q.manpath); + MANDOCERR_MAX, NULL, MANDOC_OS_OTHER, req->q.manpath); mparse_readfd(mp, fd, file); close(fd); Modified: head/contrib/mdocml/chars.c ============================================================================== --- head/contrib/mdocml/chars.c Mon Jul 31 19:30:23 2017 (r321809) +++ head/contrib/mdocml/chars.c Mon Jul 31 19:34:38 2017 (r321810) @@ -1,4 +1,4 @@ -/* $Id: chars.c,v 1.70 2017/06/02 12:43:52 schwarze Exp $ */ +/* $Id: chars.c,v 1.71 2017/06/14 20:57:07 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011, 2014, 2015, 2017 Ingo Schwarze @@ -61,6 +61,7 @@ static struct ln lines[] = { { "ba", "|", 0x007c }, { "br", "|", 0x2502 }, { "ul", "_", 0x005f }, + { "ru", "_", 0x005f }, { "rn", "-", 0x203e }, { "bb", "|", 0x00a6 }, { "sl", "/", 0x002f }, Copied: head/contrib/mdocml/compat_recallocarray.c (from r321808, vendor/mdocml/dist/compat_recallocarray.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/mdocml/compat_recallocarray.c Mon Jul 31 19:34:38 2017 (r321810, copy of r321808, vendor/mdocml/dist/compat_recallocarray.c) @@ -0,0 +1,108 @@ +#include "config.h" + +#if HAVE_RECALLOCARRAY + +int dummy; + +#else + +/* $Id: compat_recallocarray.c,v 1.1 2017/06/12 19:05:47 schwarze Exp $ */ +/* $OpenBSD: malloc.c,v 1.225 2017/05/13 07:11:29 otto Exp $ */ +/* + * Copyright (c) 2017 Otto Moerbeek + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include +#include +#include + +/* + * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX + * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW + */ +#define MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4)) + +/* + * Even though specified in POSIX, the PAGESIZE and PAGE_SIZE + * macros have very poor portability. Since we only use this + * to avoid free() overhead for small shrinking, simply pick + * an arbitrary number. + */ +#define MALLOC_PAGESIZE (1UL << 12) + + +void * +recallocarray(void *ptr, size_t oldnmemb, size_t newnmemb, size_t size) +{ + size_t oldsize, newsize; + void *newptr; + + if (ptr == NULL) + return calloc(newnmemb, size); + + if ((newnmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && + newnmemb > 0 && SIZE_MAX / newnmemb < size) { + errno = ENOMEM; + return NULL; + } + newsize = newnmemb * size; + + if ((oldnmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && + oldnmemb > 0 && SIZE_MAX / oldnmemb < size) { + errno = EINVAL; + return NULL; + } + oldsize = oldnmemb * size; + + /* + * Don't bother too much if we're shrinking just a bit, + * we do not shrink for series of small steps, oh well. + */ + if (newsize <= oldsize) { + size_t d = oldsize - newsize; + + if (d < oldsize / 2 && d < MALLOC_PAGESIZE) { + memset((char *)ptr + newsize, 0, d); + return ptr; + } + } + + newptr = malloc(newsize); + if (newptr == NULL) + return NULL; + + if (newsize > oldsize) { + memcpy(newptr, ptr, oldsize); + memset((char *)newptr + oldsize, 0, newsize - oldsize); + } else + memcpy(newptr, ptr, newsize); + + /* + * At this point, the OpenBSD implementation calls + * explicit_bzero() on the old memory before it is + * freed. Since explicit_bzero() is hard to implement + * portably and we don't handle confidential data in + * mandoc in the first place, simply free the memory + * without clearing it. + */ + + free(ptr); + + return newptr; +} + +#endif /* !HAVE_RECALLOCARRAY */ Modified: head/contrib/mdocml/config.h ============================================================================== --- head/contrib/mdocml/config.h Mon Jul 31 19:30:23 2017 (r321809) +++ head/contrib/mdocml/config.h Mon Jul 31 19:34:38 2017 (r321810) @@ -10,14 +10,18 @@ #define _GNU_SOURCE /* See test-*.c what needs this. */ #endif +#include #define MAN_CONF_FILE "/etc/man.conf" +#define MANPATH_BASE "/usr/share/man" #define MANPATH_DEFAULT "/usr/share/man:/usr/local/man" #define UTF8_LOCALE "en_US.UTF-8" +#define HAVE_CMSG_XPG42 0 #define HAVE_DIRENT_NAMLEN 1 #define HAVE_ENDIAN 0 #define HAVE_ERR 1 #define HAVE_FTS 1 +#define HAVE_FTS_COMPARE_CONST 1 #define HAVE_GETLINE 1 #define HAVE_GETSUBOPT 1 #define HAVE_ISBLANK 1 @@ -26,6 +30,7 @@ #define HAVE_PLEDGE 0 #define HAVE_PROGNAME 1 #define HAVE_REALLOCARRAY 1 +#define HAVE_RECALLOCARRAY 0 #define HAVE_REWB_BSD 1 #define HAVE_REWB_SYSV 1 #define HAVE_SANDBOX_INIT 0 @@ -40,10 +45,11 @@ #define HAVE_VASPRINTF 1 #define HAVE_WCHAR 1 #define HAVE_OHASH 1 -#define HAVE_FTS_COMPARE_CONST 1 #define BINM_APROPOS "apropos" #define BINM_MAKEWHATIS "makewhatis" #define BINM_MAN "man" #define BINM_SOELIM "soelim" #define BINM_WHATIS "whatis" + +extern void *recallocarray(void *, size_t, size_t, size_t); Modified: head/contrib/mdocml/configure ============================================================================== --- head/contrib/mdocml/configure Mon Jul 31 19:30:23 2017 (r321809) +++ head/contrib/mdocml/configure Mon Jul 31 19:34:38 2017 (r321810) @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: configure,v 1.62 2017/03/04 16:36:29 schwarze Exp $ +# $Id: configure,v 1.64 2017/07/01 09:47:30 schwarze Exp $ # # Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze # @@ -35,6 +35,7 @@ echo "config.log: writing..." SOURCEDIR=`dirname "$0"` +MANPATH_BASE="/usr/share/man:/usr/X11R6/man" MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man" OSNAME= UTF8_LOCALE= @@ -73,6 +74,7 @@ HAVE_PATH_MAX= HAVE_PLEDGE= HAVE_PROGNAME= HAVE_REALLOCARRAY= +HAVE_RECALLOCARRAY= HAVE_RECVMSG= HAVE_REWB_BSD= HAVE_REWB_SYSV= @@ -229,6 +231,7 @@ runtest pledge PLEDGE || true runtest sandbox_init SANDBOX_INIT || true runtest progname PROGNAME || true runtest reallocarray REALLOCARRAY || true +runtest recallocarray RECALLOCARRAY || true runtest rewb-bsd REWB_BSD || true runtest rewb-sysv REWB_SYSV || true runtest strcasestr STRCASESTR || true @@ -348,7 +351,8 @@ cat << __HEREDOC__ __HEREDOC__ -[ ${HAVE_GETLINE} -eq 0 -o ${HAVE_REALLOCARRAY} -eq 0 -o \ +[ ${HAVE_GETLINE} -eq 0 -o \ + ${HAVE_REALLOCARRAY} -eq 0 -o ${HAVE_RECALLOCARRAY} -eq 0 -o \ ${HAVE_STRLCAT} -eq 0 -o ${HAVE_STRLCPY} -eq 0 ] \ && echo "#include " [ ${HAVE_VASPRINTF} -eq 0 ] && echo "#include " @@ -356,6 +360,7 @@ __HEREDOC__ echo echo "#define MAN_CONF_FILE \"/etc/${MANM_MANCONF}\"" +echo "#define MANPATH_BASE \"${MANPATH_BASE}\"" echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\"" [ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\"" [ -n "${UTF8_LOCALE}" ] && echo "#define UTF8_LOCALE \"${UTF8_LOCALE}\"" @@ -383,6 +388,7 @@ cat << __HEREDOC__ #define HAVE_PLEDGE ${HAVE_PLEDGE} #define HAVE_PROGNAME ${HAVE_PROGNAME} #define HAVE_REALLOCARRAY ${HAVE_REALLOCARRAY} +#define HAVE_RECALLOCARRAY ${HAVE_RECALLOCARRAY} #define HAVE_REWB_BSD ${HAVE_REWB_BSD} #define HAVE_REWB_SYSV ${HAVE_REWB_SYSV} #define HAVE_SANDBOX_INIT ${HAVE_SANDBOX_INIT} @@ -433,6 +439,9 @@ fi [ ${HAVE_REALLOCARRAY} -eq 0 ] && \ echo "extern void *reallocarray(void *, size_t, size_t);" + +[ ${HAVE_RECALLOCARRAY} -eq 0 ] && \ + echo "extern void *recallocarray(void *, size_t, size_t, size_t);" [ ${HAVE_STRCASESTR} -eq 0 ] && \ echo "extern char *strcasestr(const char *, const char *);" Modified: head/contrib/mdocml/configure.local.example ============================================================================== --- head/contrib/mdocml/configure.local.example Mon Jul 31 19:30:23 2017 (r321809) +++ head/contrib/mdocml/configure.local.example Mon Jul 31 19:34:38 2017 (r321810) @@ -1,4 +1,4 @@ -# $Id: configure.local.example,v 1.30 2017/03/04 16:36:29 schwarze Exp $ +# $Id: configure.local.example,v 1.33 2017/07/20 16:24:53 schwarze Exp $ # # Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze # @@ -20,7 +20,7 @@ # and put any of these settings into it if ./configure autodetection # fails or if you want to make different choices for other reasons. -# If autodetection fails, please tell . +# If autodetection fails, please tell . # We recommend that you write ./configure.local from scratch and # only put the lines there you need. This file contains examples. @@ -62,6 +62,11 @@ UTF8_LOCALE=en_US.UTF-8 MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man" +# Validation of cross references with mandoc -Tlint only looks +# for manual pages in the following directories: + +MANPATH_BASE="/usr/share/man:/usr/X11R6/man" + # In manual pages written in the mdoc(7) language, the operating system # version is displayed in the page footer line. If an operating system # is specified as an argument to the .Os macro, that is always used. @@ -292,6 +297,7 @@ HAVE_PATH_MAX=0 HAVE_PLEDGE=0 HAVE_PROGNAME=0 HAVE_REALLOCARRAY=0 +HAVE_RECALLOCARRAY=0 HAVE_REWB_BSD=0 HAVE_REWB_SYSV=0 HAVE_STRCASESTR=0 Modified: head/contrib/mdocml/demandoc.c ============================================================================== --- head/contrib/mdocml/demandoc.c Mon Jul 31 19:30:23 2017 (r321809) +++ head/contrib/mdocml/demandoc.c Mon Jul 31 19:34:38 2017 (r321810) @@ -1,4 +1,4 @@ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Jul 31 19:51:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF82EDBC2FB; Mon, 31 Jul 2017 19:51:37 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 970F165F4F; Mon, 31 Jul 2017 19:51:37 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VJpaIg010745; Mon, 31 Jul 2017 19:51:36 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VJpawW010744; Mon, 31 Jul 2017 19:51:36 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201707311951.v6VJpawW010744@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 31 Jul 2017 19:51:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321812 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 321812 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 19:51:37 -0000 Author: bapt Date: Mon Jul 31 19:51:36 2017 New Revision: 321812 URL: https://svnweb.freebsd.org/changeset/base/321812 Log: Update pci_vendors to 2017.07.27 MFC after: 2 days Modified: head/share/misc/pci_vendors Modified: head/share/misc/pci_vendors ============================================================================== --- head/share/misc/pci_vendors Mon Jul 31 19:48:29 2017 (r321811) +++ head/share/misc/pci_vendors Mon Jul 31 19:51:36 2017 (r321812) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.07.13 -# Date: 2017-07-13 03:15:01 +# Version: 2017.07.27 +# Date: 2017-07-27 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -2436,7 +2436,7 @@ 144d c0c7 Radeon HD 7550M 6842 Thames LE [Radeon HD 7000M Series] 6843 Thames [Radeon HD 7670M] - 6863 Vega 10 [Radeon Vega Frontier Edition] + 6863 Vega 10 XTX [Radeon Vega Frontier Edition] 687f Vega [Radeon RX Vega] 6888 Cypress XT [FirePro V8800] 6889 Cypress PRO [FirePro V7800] @@ -2952,6 +2952,8 @@ 6987 Polaris12 6995 Lexa XT [Radeon PRO WX 2100] 699f Lexa PRO [Radeon RX 550] + 148c 2380 Lexa XL [Radeon RX 550] + 1da2 e367 Lexa PRO [Radeon RX 550] 700f RS100 AGP Bridge 7010 RS200/RS250 AGP Bridge 7100 R520 [Radeon X1800 XT] @@ -6026,11 +6028,12 @@ 1077 e4f4 FastLinQ QL45411H 40GbE Adapter 1644 FastLinQ QL45000 Series 100GbE Controller 1077 e4f8 FastLinQ QL45611H 100GbE Adapter + 1654 FastLinQ QL45000 Series 50GbE Controller + 1590 0223 Synergy 6810C 25/50Gb Ethernet Adapter 1656 FastLinQ QL45000 Series 25GbE Controller 1077 02a7 QL45212-DE 25GbE Adapter 1077 e4f6 FastLinQ QL45211H 25GbE Adapter 1077 e4f7 FastLinQ QL45212H 25GbE Adapter - 1590 0223 Synergy 6810C 25/50Gb Ethernet Adapter 165c FastLinQ QL45000 Series 40GbE Controller (FCoE) 1077 e4f1 FastLinQ QL45462H 40GbE FCoE Adapter 1077 e4f2 FastLinQ QL45461H 40GbE FCoE Adapter @@ -16128,6 +16131,8 @@ 50a0 T540-50A0 Unified Wire Ethernet Controller 50a1 T540-50A1 Unified Wire Ethernet Controller 50a2 T580-50A2 Unified Wire Ethernet Controller + 50a3 T580-50A3 Unified Wire Ethernet Controller + 50a4 T540-50A4 Unified Wire Ethernet Controller 5401 T520-CR Unified Wire Ethernet Controller 5402 T522-CR Unified Wire Ethernet Controller 5403 T540-CR Unified Wire Ethernet Controller @@ -16181,6 +16186,8 @@ 54a0 T540-50A0 Unified Wire Ethernet Controller 54a1 T540-50A1 Unified Wire Ethernet Controller 54a2 T580-50A2 Unified Wire Ethernet Controller + 54a3 T580-50A3 Unified Wire Ethernet Controller + 54a4 T540-50A4 Unified Wire Ethernet Controller 5501 T520-CR Unified Wire Storage Controller 5502 T522-CR Unified Wire Storage Controller 5503 T540-CR Unified Wire Storage Controller @@ -16234,6 +16241,8 @@ 55a0 T540-50A0 Unified Wire Storage Controller 55a1 T540-50A1 Unified Wire Storage Controller 55a2 T580-50A2 Unified Wire Storage Controller + 55a3 T580-50A3 Unified Wire Storage Controller + 55a4 T540-50A4 Unified Wire Storage Controller 5601 T520-CR Unified Wire Storage Controller 5602 T522-CR Unified Wire Storage Controller 5603 T540-CR Unified Wire Storage Controller @@ -16287,6 +16296,8 @@ 56a0 T540-50A0 Unified Wire Storage Controller 56a1 T540-50A1 Unified Wire Storage Controller 56a2 T580-50A2 Unified Wire Storage Controller + 56a3 T580-50A3 Unified Wire Storage Controller + 56a4 T540-50A4 Unified Wire Storage Controller 5701 T520-CR Unified Wire Ethernet Controller 5702 T522-CR Unified Wire Ethernet Controller 5703 T540-CR Unified Wire Ethernet Controller @@ -16379,6 +16390,8 @@ 58a0 T540-50A0 Unified Wire Ethernet Controller [VF] 58a1 T540-50A1 Unified Wire Ethernet Controller [VF] 58a2 T580-50A2 Unified Wire Ethernet Controller [VF] + 58a3 T580-50A3 Unified Wire Ethernet Controller [VF] + 58a4 T540-50A4 Unified Wire Ethernet Controller [VF] 6001 T6225-CR Unified Wire Ethernet Controller 6002 T6225-SO-CR Unified Wire Ethernet Controller 6003 T6425-CR Unified Wire Ethernet Controller @@ -16594,6 +16607,7 @@ e836 M115S Hybrid Analog/DVB PAL/SECAM/NTSC Tuner f436 AVerTV Hybrid+FM 1462 Micro-Star International Co., Ltd. [MSI] + aaf0 Radeon RX 580 Gaming X 8G 1463 Fast Corporation 1464 Interactive Circuits & Systems Ltd 1465 GN NETTEST Telecom DIV. @@ -19273,6 +19287,7 @@ 17d3 1880 ARC-1880 8/12/16/24 Port PCIe 2.0 to SAS/SATA 6Gb RAID Controller 17d3 1882 ARC-1882 8/12/16/24 Port PCIe 3.0 to SAS/SATA 6Gb RAID Controller 17d3 1883 ARC-1883 8/12/16/24 Port PCIe 3.0 to SAS/SATA 12Gb RAID Controller + 1884 ARC-1884 series PCIe 3.0 to SAS/SATA 12/6Gb RAID Controller # nee Neterion Inc., previously S2io Inc. 17d5 Exar Corp. 5731 Xframe 10-Gigabit Ethernet PCI-X @@ -19348,12 +19363,15 @@ 17e4 Sectra AB 0001 KK671 Cardbus encryption board 0002 KK672 Cardbus encryption board -17e6 Entropic Communications Inc. +# nee Entropic Communications Inc. +17e6 MaxLinear 0010 EN2010 [c.Link] MoCA Network Controller (Coax, PCI interface) 0011 EN2010 [c.Link] MoCA Network Controller (Coax, MPEG interface) 0021 EN2210 [c.Link] MoCA Network Controller (Coax) 0025 EN2510 [c.Link] MoCA Network Controller (Coax, PCIe interface) 0027 EN2710 [c.Link] MoCA 2.0 Network Controller (Coax, PCIe interface) + 3706 MoCA 2.0 Network Controller (Coax, PCIe interface) + 3711 MoCA 2.5 Network Controller (Coax, PCIe interface) 17ee Connect Components Ltd 17f2 Albatron Corp. 17f3 RDC Semiconductor, Inc. @@ -24631,6 +24649,7 @@ 24f3 Wireless 8260 # Snow Field Peak AC 8086 0010 Dual Band Wireless-AC 8260 + 8086 1010 Dual Band Wireless-AC 8260 24f4 Wireless 8260 # Snow Field Peak AC 8086 0030 Dual Band Wireless-AC 8260 From owner-svn-src-head@freebsd.org Mon Jul 31 20:15:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 260EFDBCA24; Mon, 31 Jul 2017 20:15:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E96DD66CC6; Mon, 31 Jul 2017 20:15:12 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VKFC65019159; Mon, 31 Jul 2017 20:15:12 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VKFCUM019158; Mon, 31 Jul 2017 20:15:12 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201707312015.v6VKFCUM019158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 31 Jul 2017 20:15:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321814 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321814 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 20:15:13 -0000 Author: mjg Date: Mon Jul 31 20:15:11 2017 New Revision: 321814 URL: https://svnweb.freebsd.org/changeset/base/321814 Log: Add myself to the calendar. Prodded by: invisible peer pressure Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 19:58:49 2017 (r321813) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 20:15:11 2017 (r321814) @@ -233,6 +233,7 @@ 06/30 Guido van Rooij born in Best, Noord-Brabant, the Netherlands, 1965 06/30 Second quarter status reports are due on 07/15 07/01 Matthew Dillon born in San Francisco, California, United States, 1966 +07/01 Mateusz Guzik born in Nowy Targ, Poland, 1986 07/02 Mark Christopher Ovens born in Preston, Lancashire, United Kingdom, 1958 07/02 Vasil Venelinov Dimov born in Shumen, Bulgaria, 1982 07/04 Motoyuki Konno born in Musashino, Tokyo, Japan, 1969 From owner-svn-src-head@freebsd.org Mon Jul 31 20:35:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB6A1DBD1C9; Mon, 31 Jul 2017 20:35:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8B89678D2; Mon, 31 Jul 2017 20:35:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 19A9A10AB01; Mon, 31 Jul 2017 16:35:39 -0400 (EDT) From: John Baldwin To: Andrew Gallatin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321790 - head/sbin/sysctl Date: Mon, 31 Jul 2017 10:20:50 -0700 Message-ID: <2175723.Ple0o0TTz8@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201707311456.v6VEuZvT083622@repo.freebsd.org> References: <201707311456.v6VEuZvT083622@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 31 Jul 2017 16:35:39 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 20:35:47 -0000 On Monday, July 31, 2017 02:56:35 PM Andrew Gallatin wrote: > Author: gallatin > Date: Mon Jul 31 14:56:35 2017 > New Revision: 321790 > URL: https://svnweb.freebsd.org/changeset/base/321790 > > Log: > Don't request CTLTYPE_OPAQUE if we can't print them. > > The intent is to skip expensive opaque sysctls like tcp_pcblist unless > they are explicitly requested. Sysctl nodes like this don't show up in > sysctl -a, but they do generate output that winds up being dropped, > unless the user specifically requested binary/hex output or opaques. > > This reduces the runtime of sysctl in many circumstances on a loaded > system. It also reduces the likelihood that simply gathering > diagnostics on a sick machine (stuck lock, etc) via sysctl -a might > push it over the edge into a total lockup. > > Reviewed by: jtl > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D11461 > > Modified: > head/sbin/sysctl/sysctl.c > > Modified: head/sbin/sysctl/sysctl.c > ============================================================================== > --- head/sbin/sysctl/sysctl.c Mon Jul 31 14:53:03 2017 (r321789) > +++ head/sbin/sysctl/sysctl.c Mon Jul 31 14:56:35 2017 (r321790) > @@ -925,6 +925,32 @@ show_var(int *oid, int nlen) > printf("%s", buf); > return (0); > } > + > + /* don't fetch opaques that we don't know how to print */ > + if (ctltype == CTLTYPE_OPAQUE) { > + if (strcmp(fmt, "S,clockinfo") == 0) > + func = S_clockinfo; > + else if (strcmp(fmt, "S,timeval") == 0) > + func = S_timeval; > + else if (strcmp(fmt, "S,loadavg") == 0) > + func = S_loadavg; > + else if (strcmp(fmt, "S,vmtotal") == 0) > + func = S_vmtotal; > +#ifdef __amd64__ > + else if (strcmp(fmt, "S,efi_map_header") == 0) > + func = S_efi_map; > +#endif > +#if defined(__amd64__) || defined(__i386__) > + else if (strcmp(fmt, "S,bios_smap_xattr") == 0) > + func = S_bios_smap_xattr; > +#endif > + else { > + func = NULL; > + if (!bflag && !oflag && !xflag) > + return (1); > + } > + } > + > /* find an estimate of how much we need for this var */ > if (Bflag) > j = Bflag; > @@ -1045,24 +1071,6 @@ show_var(int *oid, int nlen) > > case CTLTYPE_OPAQUE: > i = 0; > - if (strcmp(fmt, "S,clockinfo") == 0) > - func = S_clockinfo; > - else if (strcmp(fmt, "S,timeval") == 0) > - func = S_timeval; > - else if (strcmp(fmt, "S,loadavg") == 0) > - func = S_loadavg; > - else if (strcmp(fmt, "S,vmtotal") == 0) > - func = S_vmtotal; > -#ifdef __amd64__ > - else if (strcmp(fmt, "S,efi_map_header") == 0) > - func = S_efi_map; > -#endif > -#if defined(__amd64__) || defined(__i386__) > - else if (strcmp(fmt, "S,bios_smap_xattr") == 0) > - func = S_bios_smap_xattr; > -#endif > - else > - func = NULL; > if (func) { func should always be true now? -- John Baldwin From owner-svn-src-head@freebsd.org Mon Jul 31 20:35:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEB31DBD1CE; Mon, 31 Jul 2017 20:35:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CE5B678D4; Mon, 31 Jul 2017 20:35:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 0149210AF01; Mon, 31 Jul 2017 16:35:42 -0400 (EDT) From: John Baldwin To: Alexander Motin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321720 - head/sys/dev/ichwd Date: Mon, 31 Jul 2017 10:13:56 -0700 Message-ID: <21813108.1FpTYCymMM@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201707301519.v6UFJ7AT004183@repo.freebsd.org> References: <201707301519.v6UFJ7AT004183@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 31 Jul 2017 16:35:42 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 20:35:48 -0000 On Sunday, July 30, 2017 03:19:07 PM Alexander Motin wrote: > Author: mav > Date: Sun Jul 30 15:19:07 2017 > New Revision: 321720 > URL: https://svnweb.freebsd.org/changeset/base/321720 > > Log: > Attach ichwd(4) only to ISA bus of the LPC bridge. > > Resource allocation for parent device does not look good by itself, but > attempt to allocate them for unrelated device just does not end up good. > On Asus X99-E WS/USB3.1 system reporting ISA bridge via both PCI and ACPI > this reported to cause kernel panic on shutdown due to messed resources: > https://bugs.freenas.org/issues/25237. > > MFC after: 1 week > > Modified: > head/sys/dev/ichwd/ichwd.c > > Modified: head/sys/dev/ichwd/ichwd.c > ============================================================================== > --- head/sys/dev/ichwd/ichwd.c Sun Jul 30 11:50:16 2017 (r321719) > +++ head/sys/dev/ichwd/ichwd.c Sun Jul 30 15:19:07 2017 (r321720) > @@ -533,23 +533,26 @@ ichwd_event(void *arg, unsigned int cmd, int *error) > } > > static device_t > -ichwd_find_ich_lpc_bridge(struct ichwd_device **id_p) > +ichwd_find_ich_lpc_bridge(device_t isa, struct ichwd_device **id_p) > { > struct ichwd_device *id; > - device_t ich = NULL; > + device_t isab; > + uint16_t devid; > > - /* look for an ICH LPC interface bridge */ > - for (id = ichwd_devices; id->desc != NULL; ++id) > - if ((ich = pci_find_device(VENDORID_INTEL, id->device)) != NULL) > - break; > - > - if (ich == NULL) > + /* Check whether parent ISA bridge looks familiar. */ > + isab = device_get_parent(isa); > + if (pci_get_vendor(isab) != VENDORID_INTEL) > return (NULL); You probably need to do slightly more work to verify that the isab device is a PCI child before you use pci_get_vendor(). I believe isa0 can be a child of legacy0 for example (though I doubt we run on such hardware without PCI anymore). Seeing if the devclass of device_get_parent(isab) == devclass_find("pci") would be sufficient. It might also be nice to add a 'device_is_pci()' helper function as I think we probably have a similar check in some other places. The general change is definitely an improvement though. -- John Baldwin From owner-svn-src-head@freebsd.org Mon Jul 31 20:41:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBAFDDBD608; Mon, 31 Jul 2017 20:41:46 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B86AD681EA; Mon, 31 Jul 2017 20:41:46 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VKfjUg031280; Mon, 31 Jul 2017 20:41:45 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VKfjw7031279; Mon, 31 Jul 2017 20:41:45 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201707312041.v6VKfjw7031279@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Mon, 31 Jul 2017 20:41:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321816 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 321816 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 20:41:47 -0000 Author: mckusick Date: Mon Jul 31 20:41:45 2017 New Revision: 321816 URL: https://svnweb.freebsd.org/changeset/base/321816 Log: Avoid reading a snapshot block when it is already in the cache. Update the use of the B_CACHE flag (since the May 1999 commit that made it the correct test here). Reported by: Andreas Longwitz Reviewed by: kib Tested by: Peter Holm MFC after: 1 week Modified: head/sys/ufs/ffs/ffs_snapshot.c Modified: head/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- head/sys/ufs/ffs/ffs_snapshot.c Mon Jul 31 20:28:26 2017 (r321815) +++ head/sys/ufs/ffs/ffs_snapshot.c Mon Jul 31 20:41:45 2017 (r321816) @@ -1394,7 +1394,7 @@ indiracct_ufs2(snapvp, cancelvp, level, blkno, lbn, rl */ bp = getblk(cancelvp, lbn, fs->fs_bsize, 0, 0, 0); bp->b_blkno = fsbtodb(fs, blkno); - if ((bp->b_flags & (B_DONE | B_DELWRI)) == 0 && + if ((bp->b_flags & B_CACHE) == 0 && (error = readblock(cancelvp, bp, fragstoblks(fs, blkno)))) { brelse(bp); return (error); From owner-svn-src-head@freebsd.org Mon Jul 31 20:54:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48466DBD7F3; Mon, 31 Jul 2017 20:54:25 +0000 (UTC) (envelope-from pawel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0831B6870D; Mon, 31 Jul 2017 20:54:24 +0000 (UTC) (envelope-from pawel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VKsO9R035579; Mon, 31 Jul 2017 20:54:24 GMT (envelope-from pawel@FreeBSD.org) Received: (from pawel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VKsOBh035578; Mon, 31 Jul 2017 20:54:24 GMT (envelope-from pawel@FreeBSD.org) Message-Id: <201707312054.v6VKsOBh035578@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pawel set sender to pawel@FreeBSD.org using -f From: Pawel Pekala Date: Mon, 31 Jul 2017 20:54:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321817 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: pawel X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 20:54:25 -0000 Author: pawel (ports committer) Date: Mon Jul 31 20:54:23 2017 New Revision: 321817 URL: https://svnweb.freebsd.org/changeset/base/321817 Log: Add myself to the calendar.freebsd Reported by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 20:41:45 2017 (r321816) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 20:54:23 2017 (r321817) @@ -188,6 +188,7 @@ 05/23 Munechika Sumikawa born in Osaka, Osaka, Japan, 1972 05/24 Duncan McLennan Barclay born in London, Middlesex, United Kingdom, 1970 05/24 Oliver Lehmann born in Karlsburg, Germany, 1981 +05/25 Pawel Pekala born in Swidnica, Poland, 1980 05/25 Tom Rhodes born in Ellwood City, Pennsylvania, United States, 1981 05/25 Roman Divacky born in Brno, Czech Republic, 1983 05/26 Jim Pirzyk born in Chicago, Illinois, United States, 1968 From owner-svn-src-head@freebsd.org Mon Jul 31 21:08:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7ED1DBDA51; Mon, 31 Jul 2017 21:08:32 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79B5868C93; Mon, 31 Jul 2017 21:08:32 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VL8V07039676; Mon, 31 Jul 2017 21:08:31 GMT (envelope-from tcberner@FreeBSD.org) Received: (from tcberner@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VL8VBr039675; Mon, 31 Jul 2017 21:08:31 GMT (envelope-from tcberner@FreeBSD.org) Message-Id: <201707312108.v6VL8VBr039675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tcberner set sender to tcberner@FreeBSD.org using -f From: "Tobias C. Berner" Date: Mon, 31 Jul 2017 21:08:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321818 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: tcberner X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321818 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 21:08:32 -0000 Author: tcberner (ports committer) Date: Mon Jul 31 21:08:31 2017 New Revision: 321818 URL: https://svnweb.freebsd.org/changeset/base/321818 Log: Add myself to the calendar.freebsd Reported by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 20:54:23 2017 (r321817) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Jul 31 21:08:31 2017 (r321818) @@ -71,6 +71,7 @@ 02/14 Martin Blapp born in Olten, Switzerland, 1976 02/15 Hiren Panchasara born in Ahmedabad, Gujarat, India, 1984 02/16 Justin Hibbits born in Toledo, Ohio, United States, 1983 +02/16 Tobias Christian Berner born in Bern, Switzerland, 1985 02/19 Murray Stokely born in Jacksonville, Florida, United States, 1979 02/20 Anders Nordby born in Oslo, Norway, 1976 02/21 Alexey Zelkin born in Simferopol, Ukraine, 1978 From owner-svn-src-head@freebsd.org Mon Jul 31 21:53:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E170CDBEB59; Mon, 31 Jul 2017 21:53:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEF366A7B6; Mon, 31 Jul 2017 21:53:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VLr0ll060161; Mon, 31 Jul 2017 21:53:00 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VLr0cm060160; Mon, 31 Jul 2017 21:53:00 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707312153.v6VLr0cm060160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 31 Jul 2017 21:53:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321821 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 321821 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 21:53:02 -0000 Author: ian Date: Mon Jul 31 21:53:00 2017 New Revision: 321821 URL: https://svnweb.freebsd.org/changeset/base/321821 Log: No need to call getnanotime() now that the waiting is done by the central subr_rtc code, switch from CLOCKF_SETTIME_NO_TS to CLOCKF_SETTIME_NO_ADJ so that we get fed a timestamp, but it's not adjusted to compensate for inaccuracy in setting time. Modified: head/sys/dev/iicbus/ds1307.c Modified: head/sys/dev/iicbus/ds1307.c ============================================================================== --- head/sys/dev/iicbus/ds1307.c Mon Jul 31 21:52:08 2017 (r321820) +++ head/sys/dev/iicbus/ds1307.c Mon Jul 31 21:53:00 2017 (r321821) @@ -303,12 +303,12 @@ ds1307_start(void *xdev) CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_MPSAFE, sc, 0, ds1307_sqw_out_sysctl, "IU", "DS1307 square-wave output state"); - /* - * Register as a clock with 1 second resolution. Schedule the - * clock_settime() method to be called just after top-of-second; - * resetting the time resets top-of-second in the hardware. - */ - clock_register_flags(dev, 1000000, CLOCKF_SETTIME_NO_TS); + /* + * Register as a clock with 1 second resolution. Schedule the + * clock_settime() method to be called just after top-of-second; + * resetting the time resets top-of-second in the hardware. + */ + clock_register_flags(dev, 1000000, CLOCKF_SETTIME_NO_ADJ); clock_schedule(dev, 1); } @@ -368,6 +368,13 @@ ds1307_settime(device_t dev, struct timespec *ts) sc = device_get_softc(dev); + /* + * We request a timespec with no resolution-adjustment. That also + * disables utc adjustment, so apply that ourselves. + */ + ts->tv_sec -= utc_offset(); + clock_ts_to_ct(ts, &ct); + /* If the chip is in AM/PM mode, adjust hour and set flags as needed. */ if (sc->sc_use_ampm) { pmflags = DS1307_HOUR_USE_AMPM; @@ -379,10 +386,6 @@ ds1307_settime(device_t dev, struct timespec *ts) ct.hour = 12; } else pmflags = 0; - - getnanotime(ts); - ts->tv_sec -= utc_offset(); - clock_ts_to_ct(ts, &ct); data[DS1307_SECS] = TOBCD(ct.sec); data[DS1307_MINS] = TOBCD(ct.min); From owner-svn-src-head@freebsd.org Mon Jul 31 22:00:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3EA4DBEC17; Mon, 31 Jul 2017 22:00:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE0F86AA4E; Mon, 31 Jul 2017 22:00:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VM00HU060554; Mon, 31 Jul 2017 22:00:00 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VM00U9060552; Mon, 31 Jul 2017 22:00:00 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707312200.v6VM00U9060552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 31 Jul 2017 22:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321823 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 321823 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 22:00:02 -0000 Author: ian Date: Mon Jul 31 22:00:00 2017 New Revision: 321823 URL: https://svnweb.freebsd.org/changeset/base/321823 Log: Bugfixes and enhancements... Don't enable the oscillator when it is found to be stopped at init time, just let the first setting of valid time start it. But still report a dead battery if it's stopped at init time. Don't force the chip into 24hr mode, just cope with whatever mode it is already in. Schedule the clock_settime() callbacks to align the RTC clock to top of second when setting it. Modified: head/sys/dev/iicbus/ds3231.c head/sys/dev/iicbus/ds3231reg.h Modified: head/sys/dev/iicbus/ds3231.c ============================================================================== --- head/sys/dev/iicbus/ds3231.c Mon Jul 31 21:59:06 2017 (r321822) +++ head/sys/dev/iicbus/ds3231.c Mon Jul 31 22:00:00 2017 (r321823) @@ -62,6 +62,7 @@ struct ds3231_softc { uint16_t sc_addr; /* DS3231 slave address. */ uint8_t sc_ctrl; uint8_t sc_status; + bool sc_use_ampm; }; static void ds3231_start(void *); @@ -141,25 +142,6 @@ ds3231_status_write(struct ds3231_softc *sc, int clear } static int -ds3231_set_24hrs_mode(struct ds3231_softc *sc) -{ - int error; - uint8_t hour; - - error = ds3231_read1(sc->sc_dev, DS3231_HOUR, &hour); - if (error) { - device_printf(sc->sc_dev, "cannot read from RTC.\n"); - return (error); - } - hour &= ~DS3231_C_MASK; - error = ds3231_write1(sc->sc_dev, DS3231_HOUR, hour); - if (error != 0) - device_printf(sc->sc_dev, "cannot write to RTC.\n"); - - return (error); -} - -static int ds3231_temp_read(struct ds3231_softc *sc, int *temp) { int error, neg, t; @@ -437,20 +419,20 @@ ds3231_start(void *xdev) return; if (ds3231_status_read(sc) != 0) return; - /* Clear the OSF bit and ack any pending alarm interrupt. */ + /* + * Warn if the clock stopped, but don't restart it until the first + * clock_settime() call. + */ if (sc->sc_status & DS3231_STATUS_OSF) { device_printf(sc->sc_dev, - "oscillator has stopped, check the battery.\n"); - sc->sc_status &= ~DS3231_STATUS_OSF; + "WARNING: RTC clock stopped, check the battery.\n"); } + /* Ack any pending alarm interrupt. */ if (ds3231_status_write(sc, 1, 1) != 0) return; /* Always enable the oscillator. */ if (ds3231_ctrl_write(sc) != 0) return; - /* Set the 24 hours mode. */ - if (ds3231_set_24hrs_mode(sc) != 0) - return; /* Temperature. */ SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "temperature", @@ -476,8 +458,13 @@ ds3231_start(void *xdev) CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_MPSAFE, sc, 0, ds3231_en32khz_sysctl, "IU", "DS3231 enable the 32kHz output"); - /* 1 second resolution. */ - clock_register(dev, 1000000); + /* + * Register as a clock with 1 second resolution. Schedule the + * clock_settime() method to be called just after top-of-second; + * resetting the time resets top-of-second in the hardware. + */ + clock_register_flags(dev, 1000000, CLOCKF_SETTIME_NO_ADJ); + clock_schedule(dev, 1); } static int @@ -486,24 +473,45 @@ ds3231_gettime(device_t dev, struct timespec *ts) int c, error; struct clocktime ct; struct ds3231_softc *sc; - uint8_t data[7]; + uint8_t data[7], hourmask; sc = device_get_softc(dev); - memset(data, 0, sizeof(data)); + + /* If the clock halted, we don't have good data. */ + if ((error = ds3231_status_read(sc)) != 0) { + device_printf(dev, "cannot read from RTC.\n"); + return (error); + } + if (sc->sc_status & DS3231_STATUS_OSF) + return (EINVAL); + error = iicdev_readfrom(sc->sc_dev, DS3231_SECS, data, sizeof(data), IIC_INTRWAIT); if (error != 0) { device_printf(dev, "cannot read from RTC.\n"); return (error); } + + /* If chip is in AM/PM mode remember that. */ + if (data[DS3231_HOUR] & DS3231_HOUR_USE_AMPM) { + sc->sc_use_ampm = true; + hourmask = DS3231_HOUR_MASK_12HR; + } else + hourmask = DS3231_HOUR_MASK_24HR; + ct.nsec = 0; - ct.sec = FROMBCD(data[DS3231_SECS] & DS3231_SECS_MASK); - ct.min = FROMBCD(data[DS3231_MINS] & DS3231_MINS_MASK); - ct.hour = FROMBCD(data[DS3231_HOUR] & DS3231_HOUR_MASK); - ct.day = FROMBCD(data[DS3231_DATE] & DS3231_DATE_MASK); - ct.dow = data[DS3231_WEEKDAY] & DS3231_WEEKDAY_MASK; - ct.mon = FROMBCD(data[DS3231_MONTH] & DS3231_MONTH_MASK); - ct.year = FROMBCD(data[DS3231_YEAR] & DS3231_YEAR_MASK); + ct.sec = FROMBCD(data[DS3231_SECS] & DS3231_SECS_MASK); + ct.min = FROMBCD(data[DS3231_MINS] & DS3231_MINS_MASK); + ct.hour = FROMBCD(data[DS3231_HOUR] & hourmask); + ct.day = FROMBCD(data[DS3231_DATE] & DS3231_DATE_MASK); + ct.mon = FROMBCD(data[DS3231_MONTH] & DS3231_MONTH_MASK); + ct.year = FROMBCD(data[DS3231_YEAR] & DS3231_YEAR_MASK); + + /* + * If the century flag has toggled since we last saw it, there has been + * a century rollover. If this is the first time we're seeing it, + * remember the state so we can preserve its polarity on writes. + */ c = (data[DS3231_MONTH] & DS3231_C_MASK) ? 1 : 0; if (sc->sc_last_c == -1) sc->sc_last_c = c; @@ -515,6 +523,14 @@ ds3231_gettime(device_t dev, struct timespec *ts) if (ct.year < POSIX_BASE_YEAR) ct.year += 100; /* assume [1970, 2069] */ + /* If running in AM/PM mode, deal with it. */ + if (sc->sc_use_ampm) { + if (ct.hour == 12) + ct.hour = 0; + if (data[DS3231_HOUR] & DS3231_HOUR_IS_PM) + ct.hour += 12; + } + return (clock_ct_to_ts(&ct, ts)); } @@ -525,28 +541,62 @@ ds3231_settime(device_t dev, struct timespec *ts) struct clocktime ct; struct ds3231_softc *sc; uint8_t data[7]; + uint8_t pmflags; sc = device_get_softc(dev); - /* Accuracy is only one second. */ - if (ts->tv_nsec >= 500000000) - ts->tv_sec++; - ts->tv_nsec = 0; + + /* + * We request a timespec with no resolution-adjustment. That also + * disables utc adjustment, so apply that ourselves. + */ + ts->tv_sec -= utc_offset(); clock_ts_to_ct(ts, &ct); - memset(data, 0, sizeof(data)); - data[DS3231_SECS] = TOBCD(ct.sec); - data[DS3231_MINS] = TOBCD(ct.min); - data[DS3231_HOUR] = TOBCD(ct.hour); - data[DS3231_DATE] = TOBCD(ct.day); + + /* If the chip is in AM/PM mode, adjust hour and set flags as needed. */ + if (sc->sc_use_ampm) { + pmflags = DS3231_HOUR_USE_AMPM; + if (ct.hour >= 12) { + ct.hour -= 12; + pmflags |= DS3231_HOUR_IS_PM; + } + if (ct.hour == 0) + ct.hour = 12; + } else + pmflags = 0; + + data[DS3231_SECS] = TOBCD(ct.sec); + data[DS3231_MINS] = TOBCD(ct.min); + data[DS3231_HOUR] = TOBCD(ct.hour) | pmflags; + data[DS3231_DATE] = TOBCD(ct.day); data[DS3231_WEEKDAY] = ct.dow; - data[DS3231_MONTH] = TOBCD(ct.mon); - data[DS3231_YEAR] = TOBCD(ct.year % 100); + data[DS3231_MONTH] = TOBCD(ct.mon); + data[DS3231_YEAR] = TOBCD(ct.year % 100); if (sc->sc_last_c) data[DS3231_MONTH] |= DS3231_C_MASK; + /* Write the time back to RTC. */ error = iicdev_writeto(dev, DS3231_SECS, data, sizeof(data), IIC_INTRWAIT); - if (error != 0) + if (error != 0) { device_printf(dev, "cannot write to RTC.\n"); + return (error); + } + + /* + * Unlike most hardware, the osc-was-stopped bit does not clear itself + * after setting the time, it has to be manually written to zero. + */ + if (sc->sc_status & DS3231_STATUS_OSF) { + if ((error = ds3231_status_read(sc)) != 0) { + device_printf(dev, "cannot read from RTC.\n"); + return (error); + } + sc->sc_status &= ~DS3231_STATUS_OSF; + if ((error = ds3231_status_write(sc, 0, 0)) != 0) { + device_printf(dev, "cannot write to RTC.\n"); + return (error); + } + } return (error); } Modified: head/sys/dev/iicbus/ds3231reg.h ============================================================================== --- head/sys/dev/iicbus/ds3231reg.h Mon Jul 31 21:59:06 2017 (r321822) +++ head/sys/dev/iicbus/ds3231reg.h Mon Jul 31 22:00:00 2017 (r321823) @@ -38,7 +38,10 @@ #define DS3231_MINS 0x01 #define DS3231_MINS_MASK 0x7f #define DS3231_HOUR 0x02 -#define DS3231_HOUR_MASK 0x3f +#define DS3231_HOUR_MASK_12HR 0x3f +#define DS3231_HOUR_MASK_24HR 0x1f +#define DS3231_HOUR_IS_PM 0x20 +#define DS3231_HOUR_USE_AMPM 0x40 #define DS3231_WEEKDAY 0x03 #define DS3231_WEEKDAY_MASK 0x07 #define DS3231_DATE 0x04 From owner-svn-src-head@freebsd.org Mon Jul 31 22:00:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AFC9DBEC90; Mon, 31 Jul 2017 22:00:28 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39EB06AB96; Mon, 31 Jul 2017 22:00:28 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VM0REw060610; Mon, 31 Jul 2017 22:00:27 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VM0R19060609; Mon, 31 Jul 2017 22:00:27 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201707312200.v6VM0R19060609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 31 Jul 2017 22:00:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321824 - head/tests/sys/file X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/tests/sys/file X-SVN-Commit-Revision: 321824 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 22:00:28 -0000 Author: bdrewery Date: Mon Jul 31 22:00:27 2017 New Revision: 321824 URL: https://svnweb.freebsd.org/changeset/base/321824 Log: Allow changing the test PORT at compile-time. Sponsored by: Dell EMC Isilon Modified: head/tests/sys/file/newfileops_on_fork_test.c Modified: head/tests/sys/file/newfileops_on_fork_test.c ============================================================================== --- head/tests/sys/file/newfileops_on_fork_test.c Mon Jul 31 22:00:00 2017 (r321823) +++ head/tests/sys/file/newfileops_on_fork_test.c Mon Jul 31 22:00:27 2017 (r321824) @@ -50,7 +50,9 @@ #include #include +#ifndef PORT #define PORT 9000 +#endif static int listen_fd; From owner-svn-src-head@freebsd.org Mon Jul 31 22:01:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A15E6DBECF3; Mon, 31 Jul 2017 22:01:05 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x232.google.com (mail-pf0-x232.google.com [IPv6:2607:f8b0:400e:c00::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D6F56AD36; Mon, 31 Jul 2017 22:01:05 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x232.google.com with SMTP id d67so58128939pfc.0; Mon, 31 Jul 2017 15:01:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=RCeU0MuR7n4GeD552nL/gPI8l4ninCavuIfj7EMHIn4=; b=lbOvWU8ZYqMWVHlzdt72W+NcOf6+Xh0TZMD9G0bT004AmC0hE+HDVsszCUxFjiBiSd t4XFEXb/6d9UVTIMgLjNc8fWY1lJF8gz8Me4Jq6Btrrs86UZB7b0JggJFtd3bq8JMJZY F/QX1ZjzLIW/zYsVxI4HXDQ2woPjcEsHuQezulI0XHHqmgLBOFbiEXhCgbWMM26jFyhJ k+uYE7oWjJYG8J01V0CdNs6me2U65Nr3wEmet6TT4gQsBlulKLAblcij0TlWP7adpZJR HD6ZPqxEILTKjMBf+bkp7nVDpel46zUfLTJouLKo53TUk6RZLkwu/CYsJPFj2vFdaeLF BP9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=RCeU0MuR7n4GeD552nL/gPI8l4ninCavuIfj7EMHIn4=; b=bV1ZI/pEysVM47uLH3ooP8PMI+TNWz4d43FHxrqLXstBTq1uriVdjlccGzUjMj+MK6 v8/zOyEevaL2pofXTt/YUfUZsNdGaFUyjP0KU119/vKT8vcxlMHRonK3p4PXYj+Hu8nG tGxRTbbYOJ2wJDGZfjQvnInWOFGhBMYyjqDauaqa2OJreNg9mpSLXhTNpBT4592tt1ks MDlI8JCadyWzXpPTmgaJpOFBCrtbCVSfuHFyqs6f7XFwNrDU3QtxF0ZrjYIQDYbWsNeB E5SaqugFz3SkFFz77tgSi4ekPs2tYpyiPwbHPHbLXBThFt0TzCptCJCTxGgzeV1L27bP M2mA== X-Gm-Message-State: AIVw112B59lB1Ruhj42LwseetW4IGIY4WpUN9pLjlIN4I57N0fxx2VOR J+NO06IY+6nnMLJzmDw= X-Received: by 10.84.229.8 with SMTP id b8mr18004421plk.93.1501538464689; Mon, 31 Jul 2017 15:01:04 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id v9sm68876486pge.26.2017.07.31.15.01.03 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 31 Jul 2017 15:01:03 -0700 (PDT) Subject: Re: svn commit: r321824 - head/tests/sys/file Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_DF4AEF59-FC31-49E5-A956-59AD01EC9F47"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201707312200.v6VM0R19060609@repo.freebsd.org> Date: Mon, 31 Jul 2017 15:01:01 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201707312200.v6VM0R19060609@repo.freebsd.org> To: Bryan Drewery X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 22:01:05 -0000 --Apple-Mail=_DF4AEF59-FC31-49E5-A956-59AD01EC9F47 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Jul 31, 2017, at 15:00, Bryan Drewery wrote: > > Author: bdrewery > Date: Mon Jul 31 22:00:27 2017 > New Revision: 321824 > URL: https://svnweb.freebsd.org/changeset/base/321824 > > Log: > Allow changing the test PORT at compile-time. > > Sponsored by: Dell EMC Isilon MFC after? --Apple-Mail=_DF4AEF59-FC31-49E5-A956-59AD01EC9F47 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZf6ieAAoJEPWDqSZpMIYVbLkP/1lt4k9EnxVN5KJxC4fgqW05 8+GbMdJ0Z0kZDJl/36QC8RuiCBtXJCSWnRYJjv7aGKVd+rINVHzAN8OMRDq+QUl3 XWp66vRM2nUsZGGaxN7q4umF7HM+oJ8XNfTkL5XXInZ03ChVvHA6Ln4j8+6Qwu3h VQ/HLuNIM2UrPvLxeehfb6Aa4/qhpVhIobZBf0qfdFhT8mRNhKdFBaTGVnIagF5P kOfqLtv11a0fUxLvYqdQHlqp1DE8AB9N6zq83/ID6C4bcmaqJ5U/fcaZrmOZol2j zVncJ1hz1Q1v5IB6wcV/MT1zv2e5UROKR3mBKDUjA1fwWyVrTTREJlDGJyJwTcI2 XQ3Vn41xf2g9YP79dPFwES39i6TEmgDsY2tagfgETlWJoDLOI+IcnHlMhPjdH/di GkfTq/BsbIjXUKNJ6c69cN0KtXdHBaUD/De0LjVtXR4s3KeN4UoLnIi9VX8Y+KTw Ui2VpcyurIVkW9et+ZEP7PZUZbNBUIZeDXfbAI9ZKc3rj7wWpZ8wFrRCE3FIhyJG pVZYtgdp/VnU2SRi/90IuJnIJzwcWPK3H9Vzjxwn10BNgafkj7a2P5ahf8q5oGYg w+GLjlaDENqtmY9HpFDdo3PVo10zuYBNKIlHdCAYaysGPahBbXFnk8WoralabDER YauacuPiSnSWhArbdEPU =+LZs -----END PGP SIGNATURE----- --Apple-Mail=_DF4AEF59-FC31-49E5-A956-59AD01EC9F47-- From owner-svn-src-head@freebsd.org Mon Jul 31 22:26:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AB18DBF2B3; Mon, 31 Jul 2017 22:26:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53C0E6BCD0; Mon, 31 Jul 2017 22:26:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VMQUop073098; Mon, 31 Jul 2017 22:26:30 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VMQUtS073097; Mon, 31 Jul 2017 22:26:30 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707312226.v6VMQUtS073097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 31 Jul 2017 22:26:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321826 - head/sys/modules/i2c X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/modules/i2c X-SVN-Commit-Revision: 321826 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 22:26:31 -0000 Author: ian Date: Mon Jul 31 22:26:30 2017 New Revision: 321826 URL: https://svnweb.freebsd.org/changeset/base/321826 Log: Restructure the SUBDIR list as 1-per-line and alphabetize, so it will be easier to add new things (and see what changed) in the future. Modified: head/sys/modules/i2c/Makefile Modified: head/sys/modules/i2c/Makefile ============================================================================== --- head/sys/modules/i2c/Makefile Mon Jul 31 22:19:39 2017 (r321825) +++ head/sys/modules/i2c/Makefile Mon Jul 31 22:26:30 2017 (r321826) @@ -1,6 +1,16 @@ # $FreeBSD$ -SUBDIR = -SUBDIR += controllers if_ic smbus iicbus iicbb iicsmb iic cyapa smb isl jedec_ts +SUBDIR = \ + controllers \ + cyapa \ + if_ic \ + iic \ + iicbb \ + iicbus \ + iicsmb \ + isl \ + jedec_ts \ + smb \ + smbus \ .include From owner-svn-src-head@freebsd.org Mon Jul 31 22:32:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11C63DBF4DB; Mon, 31 Jul 2017 22:32:13 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA0D36C07B; Mon, 31 Jul 2017 22:32:12 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VMWBN4076250; Mon, 31 Jul 2017 22:32:11 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VMWBvV076246; Mon, 31 Jul 2017 22:32:11 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201707312232.v6VMWBvV076246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 31 Jul 2017 22:32:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321828 - in head/sys/modules/i2c: . ds1307 ds3231 nxprtc X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys/modules/i2c: . ds1307 ds3231 nxprtc X-SVN-Commit-Revision: 321828 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 22:32:13 -0000 Author: ian Date: Mon Jul 31 22:32:11 2017 New Revision: 321828 URL: https://svnweb.freebsd.org/changeset/base/321828 Log: Build iicbus/{ds1307,ds3231,nxprtc} as modules. Added: head/sys/modules/i2c/ds1307/ head/sys/modules/i2c/ds1307/Makefile (contents, props changed) head/sys/modules/i2c/ds3231/ head/sys/modules/i2c/ds3231/Makefile (contents, props changed) head/sys/modules/i2c/nxprtc/ head/sys/modules/i2c/nxprtc/Makefile (contents, props changed) Modified: head/sys/modules/i2c/Makefile Modified: head/sys/modules/i2c/Makefile ============================================================================== --- head/sys/modules/i2c/Makefile Mon Jul 31 22:28:33 2017 (r321827) +++ head/sys/modules/i2c/Makefile Mon Jul 31 22:32:11 2017 (r321828) @@ -3,6 +3,8 @@ SUBDIR = \ controllers \ cyapa \ + ds1307 \ + ds3231 \ if_ic \ iic \ iicbb \ @@ -10,6 +12,7 @@ SUBDIR = \ iicsmb \ isl \ jedec_ts \ + nxprtc \ smb \ smbus \ Added: head/sys/modules/i2c/ds1307/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/i2c/ds1307/Makefile Mon Jul 31 22:32:11 2017 (r321828) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/dev/iicbus +KMOD = ds1307 +SRCS = ds1307.c bus_if.h clock_if.h device_if.h iicbus_if.h + +.include Added: head/sys/modules/i2c/ds3231/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/i2c/ds3231/Makefile Mon Jul 31 22:32:11 2017 (r321828) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/dev/iicbus +KMOD = ds3231 +SRCS = ds3231.c bus_if.h clock_if.h device_if.h iicbus_if.h + +.include Added: head/sys/modules/i2c/nxprtc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/i2c/nxprtc/Makefile Mon Jul 31 22:32:11 2017 (r321828) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/dev/iicbus +KMOD = nxprtc +SRCS = nxprtc.c bus_if.h clock_if.h device_if.h iicbus_if.h + +.include From owner-svn-src-head@freebsd.org Tue Aug 1 01:35:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6E2BDC3995; Tue, 1 Aug 2017 01:35:24 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A34E971771; Tue, 1 Aug 2017 01:35:24 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v711ZNfd051181; Tue, 1 Aug 2017 01:35:23 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v711ZNAj051180; Tue, 1 Aug 2017 01:35:23 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201708010135.v711ZNAj051180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 1 Aug 2017 01:35:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321834 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321834 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 01:35:24 -0000 Author: pfg Date: Tue Aug 1 01:35:23 2017 New Revision: 321834 URL: https://svnweb.freebsd.org/changeset/base/321834 Log: Bring my aging self to calendar.freebsd. Requested by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 01:25:18 2017 (r321833) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 01:35:23 2017 (r321834) @@ -353,6 +353,7 @@ 10/18 Sheldon Hearn born in Cape Town, Western Cape, South Africa, 1974 10/19 Nicholas Souchu born in Suresnes, Hauts-de-Seine, France, 1972 10/19 Nick Barkas born in Longview, Washington, United States, 1981 +10/19 Pedro Giffuni born in Bogotá, Colombia, 1968 10/20 Joel Dahl born in Bitterna, Skaraborg, Sweden, 1983 10/20 Dmitry Marakasov born in Moscow, Russian Federation, 1984 10/21 Ben Smithurst born in Sheffield, South Yorkshire, United Kingdom, 1981 From owner-svn-src-head@freebsd.org Tue Aug 1 01:39:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 106D9DC3D1B; Tue, 1 Aug 2017 01:39:56 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1B5A71A2E; Tue, 1 Aug 2017 01:39:55 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v711dttB051483; Tue, 1 Aug 2017 01:39:55 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v711dtYC051482; Tue, 1 Aug 2017 01:39:55 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201708010139.v711dtYC051482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Tue, 1 Aug 2017 01:39:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321835 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: jah X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321835 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 01:39:56 -0000 Author: jah Date: Tue Aug 1 01:39:54 2017 New Revision: 321835 URL: https://svnweb.freebsd.org/changeset/base/321835 Log: Add myself to FreeBSD calendar Requested by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 01:35:23 2017 (r321834) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 01:39:54 2017 (r321835) @@ -290,6 +290,7 @@ 08/19 Chin-San Huang born in Yi-Lan, Taiwan, Republic of China, 1979 08/19 Pav Lucistnik born in Kutna Hora, Czech Republic, 1980 08/20 Michael Heffner born in Cleona, Pennsylvania, United States, 1981 +08/21 Jason A. Harmening born in Fort Wayne, Indiana, United States, 1981 08/24 Mark Linimon born in Houston, Texas, United States, 1955 08/24 Alexander Botero-Lowry died in San Francisco, California, United States, 2012 08/25 Beech Rintoul born in Oakland, California, United States, 1952 From owner-svn-src-head@freebsd.org Tue Aug 1 02:45:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95B90DC721A; Tue, 1 Aug 2017 02:45:55 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A6FF74345; Tue, 1 Aug 2017 02:45:55 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v712jskZ081175; Tue, 1 Aug 2017 02:45:54 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v712js5h081173; Tue, 1 Aug 2017 02:45:54 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201708010245.v712js5h081173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Tue, 1 Aug 2017 02:45:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321836 - head/sys/dev/hyperv/netvsc X-SVN-Group: head X-SVN-Commit-Author: sephe X-SVN-Commit-Paths: head/sys/dev/hyperv/netvsc X-SVN-Commit-Revision: 321836 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 02:45:55 -0000 Author: sephe Date: Tue Aug 1 02:45:54 2017 New Revision: 321836 URL: https://svnweb.freebsd.org/changeset/base/321836 Log: hyperv/hn: Renaming and minor cleanup This prepares for the upcoming transparent VF support. MFC after: 3 days Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11708 Modified: head/sys/dev/hyperv/netvsc/if_hn.c head/sys/dev/hyperv/netvsc/if_hnvar.h Modified: head/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hn.c Tue Aug 1 01:39:54 2017 (r321835) +++ head/sys/dev/hyperv/netvsc/if_hn.c Tue Aug 1 02:45:54 2017 (r321836) @@ -222,9 +222,9 @@ struct hn_rxinfo { uint32_t hash_value; }; -struct hn_update_vf { +struct hn_rxvf_setarg { struct hn_rx_ring *rxr; - struct ifnet *vf; + struct ifnet *vf_ifp; }; #define HN_RXINFO_VLAN 0x0001 @@ -264,6 +264,13 @@ static void hn_ifaddr_event(void *, struct ifnet *); static void hn_ifnet_attevent(void *, struct ifnet *); static void hn_ifnet_detevent(void *, struct ifnet *); +static bool hn_ismyvf(const struct hn_softc *, + const struct ifnet *); +static void hn_rxvf_change(struct hn_softc *, + struct ifnet *, bool); +static void hn_rxvf_set(struct hn_softc *, struct ifnet *); +static void hn_rxvf_set_task(void *, int); + static int hn_rndis_rxinfo(const void *, int, struct hn_rxinfo *); static void hn_rndis_rx_data(struct hn_rx_ring *, @@ -801,7 +808,7 @@ hn_rxfilter_config(struct hn_softc *sc) HN_LOCK_ASSERT(sc); if ((ifp->if_flags & IFF_PROMISC) || - (sc->hn_flags & HN_FLAG_VF)) { + (sc->hn_flags & HN_FLAG_RXVF)) { filter = NDIS_PACKET_TYPE_PROMISCUOUS; } else { filter = NDIS_PACKET_TYPE_DIRECTED; @@ -991,39 +998,39 @@ hn_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *i } static void -hn_update_vf_task(void *arg, int pending __unused) +hn_rxvf_set_task(void *xarg, int pending __unused) { - struct hn_update_vf *uv = arg; + struct hn_rxvf_setarg *arg = xarg; - uv->rxr->hn_rxvf_ifp = uv->vf; + arg->rxr->hn_rxvf_ifp = arg->vf_ifp; } static void -hn_update_vf(struct hn_softc *sc, struct ifnet *vf) +hn_rxvf_set(struct hn_softc *sc, struct ifnet *vf_ifp) { struct hn_rx_ring *rxr; - struct hn_update_vf uv; + struct hn_rxvf_setarg arg; struct task task; int i; HN_LOCK_ASSERT(sc); - TASK_INIT(&task, 0, hn_update_vf_task, &uv); + TASK_INIT(&task, 0, hn_rxvf_set_task, &arg); for (i = 0; i < sc->hn_rx_ring_cnt; ++i) { rxr = &sc->hn_rx_ring[i]; if (i < sc->hn_rx_ring_inuse) { - uv.rxr = rxr; - uv.vf = vf; + arg.rxr = rxr; + arg.vf_ifp = vf_ifp; vmbus_chan_run_task(rxr->hn_chan, &task); } else { - rxr->hn_rxvf_ifp = vf; + rxr->hn_rxvf_ifp = vf_ifp; } } } -static __inline bool +static bool hn_ismyvf(const struct hn_softc *sc, const struct ifnet *ifp) { const struct ifnet *hn_ifp; @@ -1048,7 +1055,7 @@ hn_ismyvf(const struct hn_softc *sc, const struct ifne } static void -hn_set_vf(struct hn_softc *sc, struct ifnet *ifp, bool vf) +hn_rxvf_change(struct hn_softc *sc, struct ifnet *ifp, bool rxvf) { struct ifnet *hn_ifp; @@ -1059,21 +1066,19 @@ hn_set_vf(struct hn_softc *sc, struct ifnet *ifp, bool if (!hn_ismyvf(sc, ifp)) goto out; - hn_ifp = sc->hn_ifp; - /* Now we're sure 'ifp' is a real VF device. */ - if (vf) { - if (sc->hn_flags & HN_FLAG_VF) + if (rxvf) { + if (sc->hn_flags & HN_FLAG_RXVF) goto out; - sc->hn_flags |= HN_FLAG_VF; + sc->hn_flags |= HN_FLAG_RXVF; hn_rxfilter_config(sc); } else { - if (!(sc->hn_flags & HN_FLAG_VF)) + if (!(sc->hn_flags & HN_FLAG_RXVF)) goto out; - sc->hn_flags &= ~HN_FLAG_VF; + sc->hn_flags &= ~HN_FLAG_RXVF; if (hn_ifp->if_drv_flags & IFF_DRV_RUNNING) hn_rxfilter_config(sc); else @@ -1081,11 +1086,11 @@ hn_set_vf(struct hn_softc *sc, struct ifnet *ifp, bool } hn_nvs_set_datapath(sc, - vf ? HN_NVS_DATAPATH_VF : HN_NVS_DATAPATH_SYNTHETIC); + rxvf ? HN_NVS_DATAPATH_VF : HN_NVS_DATAPATH_SYNTHETIC); - hn_update_vf(sc, vf ? ifp : NULL); + hn_rxvf_set(sc, rxvf ? ifp : NULL); - if (vf) { + if (rxvf) { hn_suspend_mgmt(sc); sc->hn_link_flags &= ~(HN_LINK_FLAG_LINKUP | HN_LINK_FLAG_NETCHG); @@ -1094,12 +1099,13 @@ hn_set_vf(struct hn_softc *sc, struct ifnet *ifp, bool hn_resume_mgmt(sc); } - devctl_notify("HYPERV_NIC_VF", if_name(hn_ifp), - vf ? "VF_UP" : "VF_DOWN", NULL); + devctl_notify("HYPERV_NIC_VF", hn_ifp->if_xname, + rxvf ? "VF_UP" : "VF_DOWN", NULL); - if (bootverbose) - if_printf(hn_ifp, "Data path is switched %s %s\n", - vf ? "to" : "from", if_name(ifp)); + if (bootverbose) { + if_printf(hn_ifp, "datapath is switched %s %s\n", + rxvf ? "to" : "from", ifp->if_xname); + } out: HN_UNLOCK(sc); } @@ -1107,16 +1113,17 @@ out: static void hn_ifnet_event(void *arg, struct ifnet *ifp, int event) { + if (event != IFNET_EVENT_UP && event != IFNET_EVENT_DOWN) return; - - hn_set_vf(arg, ifp, event == IFNET_EVENT_UP); + hn_rxvf_change(arg, ifp, event == IFNET_EVENT_UP); } static void hn_ifaddr_event(void *arg, struct ifnet *ifp) { - hn_set_vf(arg, ifp, ifp->if_flags & IFF_UP); + + hn_rxvf_change(arg, ifp, ifp->if_flags & IFF_UP); } static void @@ -2902,7 +2909,7 @@ hn_stop(struct hn_softc *sc, bool detaching) * If the VF is active, make sure the filter is not 0, even if * the synthetic NIC is down. */ - if (!detaching && (sc->hn_flags & HN_FLAG_VF)) + if (!detaching && (sc->hn_flags & HN_FLAG_RXVF)) hn_rxfilter_config(sc); } @@ -3438,13 +3445,13 @@ hn_vf_sysctl(SYSCTL_HANDLER_ARGS) { struct hn_softc *sc = arg1; char vf_name[IFNAMSIZ + 1]; - struct ifnet *vf; + struct ifnet *vf_ifp; HN_LOCK(sc); vf_name[0] = '\0'; - vf = sc->hn_vf_ifp; - if (vf != NULL) - snprintf(vf_name, sizeof(vf_name), "%s", if_name(vf)); + vf_ifp = sc->hn_vf_ifp; + if (vf_ifp != NULL) + snprintf(vf_name, sizeof(vf_name), "%s", vf_ifp->if_xname); HN_UNLOCK(sc); return sysctl_handle_string(oidp, vf_name, sizeof(vf_name), req); } @@ -3454,13 +3461,13 @@ hn_rxvf_sysctl(SYSCTL_HANDLER_ARGS) { struct hn_softc *sc = arg1; char vf_name[IFNAMSIZ + 1]; - struct ifnet *vf; + struct ifnet *vf_ifp; HN_LOCK(sc); vf_name[0] = '\0'; - vf = sc->hn_rx_ring[0].hn_rxvf_ifp; - if (vf != NULL) - snprintf(vf_name, sizeof(vf_name), "%s", if_name(vf)); + vf_ifp = sc->hn_rx_ring[0].hn_rxvf_ifp; + if (vf_ifp != NULL) + snprintf(vf_name, sizeof(vf_name), "%s", vf_ifp->if_xname); HN_UNLOCK(sc); return sysctl_handle_string(oidp, vf_name, sizeof(vf_name), req); } @@ -5445,7 +5452,7 @@ hn_suspend(struct hn_softc *sc) hn_polling(sc, 0); if ((sc->hn_ifp->if_drv_flags & IFF_DRV_RUNNING) || - (sc->hn_flags & HN_FLAG_VF)) + (sc->hn_flags & HN_FLAG_RXVF)) hn_suspend_data(sc); hn_suspend_mgmt(sc); } @@ -5535,16 +5542,16 @@ hn_resume(struct hn_softc *sc) { if ((sc->hn_ifp->if_drv_flags & IFF_DRV_RUNNING) || - (sc->hn_flags & HN_FLAG_VF)) + (sc->hn_flags & HN_FLAG_RXVF)) hn_resume_data(sc); /* * When the VF is activated, the synthetic interface is changed - * to DOWN in hn_set_vf(). Here, if the VF is still active, we - * don't call hn_resume_mgmt() until the VF is deactivated in - * hn_set_vf(). + * to DOWN in hn_rxvf_change(). Here, if the VF is still active, + * we don't call hn_resume_mgmt() until the VF is deactivated in + * hn_rxvf_change(). */ - if (!(sc->hn_flags & HN_FLAG_VF)) + if (!(sc->hn_flags & HN_FLAG_RXVF)) hn_resume_mgmt(sc); /* Modified: head/sys/dev/hyperv/netvsc/if_hnvar.h ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hnvar.h Tue Aug 1 01:39:54 2017 (r321835) +++ head/sys/dev/hyperv/netvsc/if_hnvar.h Tue Aug 1 02:45:54 2017 (r321836) @@ -251,7 +251,7 @@ struct hn_softc { #define HN_FLAG_NO_SLEEPING 0x0020 #define HN_FLAG_RXBUF_REF 0x0040 #define HN_FLAG_CHIM_REF 0x0080 -#define HN_FLAG_VF 0x0100 +#define HN_FLAG_RXVF 0x0100 #define HN_FLAG_ERRORS (HN_FLAG_RXBUF_REF | HN_FLAG_CHIM_REF) From owner-svn-src-head@freebsd.org Tue Aug 1 02:55:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DAEBDC76F7; Tue, 1 Aug 2017 02:55:45 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBF0B7493B; Tue, 1 Aug 2017 02:55:44 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v712th0l085305; Tue, 1 Aug 2017 02:55:43 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v712th0p085304; Tue, 1 Aug 2017 02:55:43 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201708010255.v712th0p085304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Tue, 1 Aug 2017 02:55:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321837 - head/sys/dev/hyperv/netvsc X-SVN-Group: head X-SVN-Commit-Author: sephe X-SVN-Commit-Paths: head/sys/dev/hyperv/netvsc X-SVN-Commit-Revision: 321837 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 02:55:45 -0000 Author: sephe Date: Tue Aug 1 02:55:43 2017 New Revision: 321837 URL: https://svnweb.freebsd.org/changeset/base/321837 Log: hyperv/hn: Add comment about ether_ifattach event subscription. MFC after: 3 days Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11710 Modified: head/sys/dev/hyperv/netvsc/if_hn.c Modified: head/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hn.c Tue Aug 1 02:45:54 2017 (r321836) +++ head/sys/dev/hyperv/netvsc/if_hn.c Tue Aug 1 02:55:43 2017 (r321837) @@ -1541,6 +1541,12 @@ hn_attach(device_t dev) sc->hn_ifaddr_evthand = EVENTHANDLER_REGISTER(ifaddr_event, hn_ifaddr_event, sc, EVENTHANDLER_PRI_ANY); + /* + * NOTE: + * Subscribe ether_ifattach event, instead of ifnet_arrival event, + * since interface's LLADDR is needed; interface LLADDR is not + * available when ifnet_arrival event is triggered. + */ sc->hn_ifnet_atthand = EVENTHANDLER_REGISTER(ether_ifattach_event, hn_ifnet_attevent, sc, EVENTHANDLER_PRI_ANY); sc->hn_ifnet_dethand = EVENTHANDLER_REGISTER(ifnet_departure_event, From owner-svn-src-head@freebsd.org Tue Aug 1 03:13:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 568BEDC7F6C; Tue, 1 Aug 2017 03:13:44 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 235E675441; Tue, 1 Aug 2017 03:13:44 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v713DhdF093990; Tue, 1 Aug 2017 03:13:43 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v713Dh1L093988; Tue, 1 Aug 2017 03:13:43 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201708010313.v713Dh1L093988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 1 Aug 2017 03:13:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321838 - head/sys/net80211 X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/sys/net80211 X-SVN-Commit-Revision: 321838 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 03:13:44 -0000 Author: pfg Date: Tue Aug 1 03:13:43 2017 New Revision: 321838 URL: https://svnweb.freebsd.org/changeset/base/321838 Log: sys/net8021: Add missing braces in setcurchan(). Obtained from: DragonFlyBSD (git c69e37d6) MFC after: 3 days Modified: head/sys/net80211/ieee80211_ioctl.c head/sys/net80211/ieee80211_mesh.c Modified: head/sys/net80211/ieee80211_ioctl.c ============================================================================== --- head/sys/net80211/ieee80211_ioctl.c Tue Aug 1 02:55:43 2017 (r321837) +++ head/sys/net80211/ieee80211_ioctl.c Tue Aug 1 03:13:43 2017 (r321838) @@ -2014,9 +2014,10 @@ setcurchan(struct ieee80211vap *vap, struct ieee80211_ /* XXX need state machine for other vap's to follow */ ieee80211_setcurchan(ic, vap->iv_des_chan); vap->iv_bss->ni_chan = ic->ic_curchan; - } else + } else { ic->ic_curchan = vap->iv_des_chan; ic->ic_rt = ieee80211_get_ratetable(ic->ic_curchan); + } } else { /* * Need to go through the state machine in case we Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Tue Aug 1 02:55:43 2017 (r321837) +++ head/sys/net80211/ieee80211_mesh.c Tue Aug 1 03:13:43 2017 (r321838) @@ -2630,7 +2630,7 @@ mesh_recv_action_meshgate(struct ieee80211_node *ni, /* popagate only if decremented ttl >= 1 && forwarding is enabled */ if ((ie.gann_ttl - 1) < 1 && !(ms->ms_flags & IEEE80211_MESHFLAGS_FWD)) return 0; - pgann.gann_flags = ie.gann_flags; /* Reserved */ + pgann.gann_flags = ie.gann_flags; /* Reserved */ pgann.gann_hopcount = ie.gann_hopcount + 1; pgann.gann_ttl = ie.gann_ttl - 1; IEEE80211_ADDR_COPY(pgann.gann_addr, ie.gann_addr); From owner-svn-src-head@freebsd.org Tue Aug 1 03:40:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7081EDC88EE; Tue, 1 Aug 2017 03:40:21 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C83E75F72; Tue, 1 Aug 2017 03:40:21 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v713eKUv002484; Tue, 1 Aug 2017 03:40:20 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v713eJVp002477; Tue, 1 Aug 2017 03:40:19 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201708010340.v713eJVp002477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Tue, 1 Aug 2017 03:40:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321839 - in head: share/man/man4 share/man/man5 sys/fs/fdescfs sys/kern sys/sys X-SVN-Group: head X-SVN-Commit-Author: dchagin X-SVN-Commit-Paths: in head: share/man/man4 share/man/man5 sys/fs/fdescfs sys/kern sys/sys X-SVN-Commit-Revision: 321839 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 03:40:21 -0000 Author: dchagin Date: Tue Aug 1 03:40:19 2017 New Revision: 321839 URL: https://svnweb.freebsd.org/changeset/base/321839 Log: Implement proper Linux /dev/fd and /proc/self/fd behavior by adding Linux specific things to the native fdescfs file system. Unlike FreeBSD, the Linux fdescfs is a directory containing a symbolic links to the actual files, which the process has open. A readlink(2) call on this file returns a full path in case of regular file or a string in a special format (type:[inode], anon_inode:, etc..). As well as in a FreeBSD, opening the file in the Linux fdescfs directory is equivalent to duplicating the corresponding file descriptor. Here we have mutually exclusive requirements: - in case of readlink(2) call fdescfs lookup() method should return VLNK vnode otherwise our kern_readlink() fail with EINVAL error; - in the other calls fdescfs lookup() method should return non VLNK vnode. For what new vnode v_flag VV_READLINK was added, which is set if fdescfs has beed mounted with linrdlnk option an modified kern_readlinkat() to properly handle it. For now For Linux ABI compatibility mount fdescfs volume with linrdlnk option: mount -t fdescfs -o linrdlnk null /compat/linux/dev/fd Reviewed by: kib@ MFC after: 1 week Relnotes: yes Modified: head/share/man/man4/linux.4 head/share/man/man5/fdescfs.5 head/sys/fs/fdescfs/fdesc.h head/sys/fs/fdescfs/fdesc_vfsops.c head/sys/fs/fdescfs/fdesc_vnops.c head/sys/kern/vfs_syscalls.c head/sys/sys/vnode.h Modified: head/share/man/man4/linux.4 ============================================================================== --- head/share/man/man4/linux.4 Tue Aug 1 03:13:43 2017 (r321838) +++ head/share/man/man4/linux.4 Tue Aug 1 03:40:19 2017 (r321839) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2010 +.Dd August 1, 2017 .Dt LINUX 4 .Os .Sh NAME @@ -127,9 +127,11 @@ regardless of whether the module is statically linked into the kernel or loaded as a module. .Sh FILES -.Bl -tag -width /compat/linux/proc -compact +.Bl -tag -width /compat/linux/dev/fd -compact .It Pa /compat/linux minimal Linux run-time environment +.It Pa /compat/linux/dev/fd +limited Linux file-descriptor file system .It Pa /compat/linux/proc limited Linux process file system .It Pa /compat/linux/sys @@ -138,6 +140,7 @@ limited Linux system file system .Sh SEE ALSO .Xr brandelf 1 , .Xr elf 5 , +.Xr fdescfs 5 , .Xr linprocfs 5 , .Xr linsysfs 5 .Sh HISTORY Modified: head/share/man/man5/fdescfs.5 ============================================================================== --- head/share/man/man5/fdescfs.5 Tue Aug 1 03:13:43 2017 (r321838) +++ head/share/man/man5/fdescfs.5 Tue Aug 1 03:40:19 2017 (r321839) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 18, 2010 +.Dd August 1, 2017 .Dt FDESCFS 5 .Os .Sh NAME @@ -92,6 +92,14 @@ and files are created by default when devfs alone is mounted. .Nm creates entries for all file descriptors opened by the process. +.Pp +For +.Xr linux 4 +ABI compatibility mount +.Nm +volume with +.Cm linrdlnk +option. .Sh FILES .Bl -tag -width /dev/stderr -compact .It Pa /dev/fd/# @@ -103,6 +111,12 @@ volume located on .Pa /dev/fd : .Pp .Dl "mount -t fdescfs null /dev/fd" +.Pp +For +.Xr linux 4 +ABI compatibility: +.Pp +.Dl "mount -t fdescfs -o linrdlnk null /compat/linux/dev/fd" .Sh SEE ALSO .Xr devfs 5 , .Xr mount 8 Modified: head/sys/fs/fdescfs/fdesc.h ============================================================================== --- head/sys/fs/fdescfs/fdesc.h Tue Aug 1 03:13:43 2017 (r321838) +++ head/sys/fs/fdescfs/fdesc.h Tue Aug 1 03:40:19 2017 (r321839) @@ -38,7 +38,9 @@ #define _FS_FDESC_H_ /* Private mount flags for fdescfs. */ -#define FMNT_UNMOUNTF 0x01 +#define FMNT_UNMOUNTF 0x01 +#define FMNT_LINRDLNKF 0x02 + struct fdescmount { struct vnode *f_root; /* Root node */ int flags; Modified: head/sys/fs/fdescfs/fdesc_vfsops.c ============================================================================== --- head/sys/fs/fdescfs/fdesc_vfsops.c Tue Aug 1 03:13:43 2017 (r321838) +++ head/sys/fs/fdescfs/fdesc_vfsops.c Tue Aug 1 03:40:19 2017 (r321839) @@ -101,6 +101,8 @@ fdesc_mount(struct mount *mp) */ mp->mnt_data = fmp; fmp->flags = 0; + if (vfs_getopt(mp->mnt_optnew, "linrdlnk", NULL, NULL) == 0) + fmp->flags |= FMNT_LINRDLNKF; error = fdesc_allocvp(Froot, -1, FD_ROOT, mp, &rvp); if (error) { free(fmp, M_FDESCMNT); Modified: head/sys/fs/fdescfs/fdesc_vnops.c ============================================================================== --- head/sys/fs/fdescfs/fdesc_vnops.c Tue Aug 1 03:13:43 2017 (r321838) +++ head/sys/fs/fdescfs/fdesc_vnops.c Tue Aug 1 03:40:19 2017 (r321839) @@ -69,6 +69,7 @@ static vop_getattr_t fdesc_getattr; static vop_lookup_t fdesc_lookup; static vop_open_t fdesc_open; static vop_readdir_t fdesc_readdir; +static vop_readlink_t fdesc_readlink; static vop_reclaim_t fdesc_reclaim; static vop_setattr_t fdesc_setattr; @@ -81,6 +82,7 @@ static struct vop_vector fdesc_vnodeops = { .vop_open = fdesc_open, .vop_pathconf = vop_stdpathconf, .vop_readdir = fdesc_readdir, + .vop_readlink = fdesc_readlink, .vop_reclaim = fdesc_reclaim, .vop_setattr = fdesc_setattr, }; @@ -195,6 +197,8 @@ loop: fd->fd_type = ftype; fd->fd_fd = fd_fd; fd->fd_ix = ix; + if (ftype == Fdesc && fmp->flags & FMNT_LINRDLNKF) + vp->v_vflag |= VV_READLINK; error = insmntque1(vp, mp, fdesc_insmntque_dtr, NULL); if (error != 0) { *vpp = NULLVP; @@ -420,7 +424,7 @@ fdesc_getattr(struct vop_getattr_args *ap) break; case Fdesc: - vap->va_type = VCHR; + vap->va_type = (vp->v_vflag & VV_READLINK) == 0 ? VCHR : VLNK; vap->va_nlink = 1; vap->va_size = 0; vap->va_rdev = makedev(0, vap->va_fileid); @@ -490,6 +494,7 @@ fdesc_setattr(struct vop_setattr_args *ap) static int fdesc_readdir(struct vop_readdir_args *ap) { + struct fdescmount *fmp; struct uio *uio = ap->a_uio; struct filedesc *fdp; struct dirent d; @@ -499,6 +504,7 @@ fdesc_readdir(struct vop_readdir_args *ap) if (VTOFDESC(ap->a_vp)->fd_type != Froot) panic("fdesc_readdir: not dir"); + fmp = VFSTOFDESC(ap->a_vp->v_mount); if (ap->a_ncookies != NULL) *ap->a_ncookies = 0; @@ -530,7 +536,8 @@ fdesc_readdir(struct vop_readdir_args *ap) break; dp->d_namlen = sprintf(dp->d_name, "%d", fcnt); dp->d_reclen = UIO_MX; - dp->d_type = DT_CHR; + dp->d_type = (fmp->flags & FMNT_LINRDLNKF) == 0 ? + DT_CHR : DT_LNK; dp->d_fileno = i + FD_DESC; break; } @@ -566,4 +573,53 @@ fdesc_reclaim(struct vop_reclaim_args *ap) free(vp->v_data, M_TEMP); vp->v_data = NULL; return (0); +} + +static int +fdesc_readlink(struct vop_readlink_args *va) +{ + struct vnode *vp, *vn; + cap_rights_t rights; + struct thread *td; + struct uio *uio; + struct file *fp; + char *freepath, *fullpath; + size_t pathlen; + int lockflags, fd_fd; + int error; + + freepath = NULL; + vn = va->a_vp; + if (VTOFDESC(vn)->fd_type != Fdesc) + panic("fdesc_readlink: not fdescfs link"); + fd_fd = ((struct fdescnode *)vn->v_data)->fd_fd; + lockflags = VOP_ISLOCKED(vn); + VOP_UNLOCK(vn, 0); + + td = curthread; + error = fget_cap(td, fd_fd, cap_rights_init(&rights), &fp, NULL); + if (error != 0) + goto out; + + switch (fp->f_type) { + case DTYPE_VNODE: + vp = fp->f_vnode; + error = vn_fullpath(td, vp, &fullpath, &freepath); + break; + default: + fullpath = "anon_inode:[unknown]"; + break; + } + if (error == 0) { + uio = va->a_uio; + pathlen = strlen(fullpath); + error = uiomove(fullpath, pathlen, uio); + } + if (freepath != NULL) + free(freepath, M_TEMP); + fdrop(fp, td); + +out: + vn_lock(vn, lockflags | LK_RETRY); + return (error); } Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Tue Aug 1 03:13:43 2017 (r321838) +++ head/sys/kern/vfs_syscalls.c Tue Aug 1 03:40:19 2017 (r321839) @@ -2484,7 +2484,7 @@ kern_readlinkat(struct thread *td, int fd, char *path, return (error); } #endif - if (vp->v_type != VLNK) + if (vp->v_type != VLNK && (vp->v_vflag & VV_READLINK) == 0) error = EINVAL; else { aiov.iov_base = buf; Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Tue Aug 1 03:13:43 2017 (r321838) +++ head/sys/sys/vnode.h Tue Aug 1 03:40:19 2017 (r321839) @@ -250,6 +250,7 @@ struct xvnode { #define VV_DELETED 0x0400 /* should be removed */ #define VV_MD 0x0800 /* vnode backs the md device */ #define VV_FORCEINSMQ 0x1000 /* force the insmntque to succeed */ +#define VV_READLINK 0x2000 /* fdescfs linux vnode */ #define VMP_TMPMNTFREELIST 0x0001 /* Vnode is on mnt's tmp free list */ From owner-svn-src-head@freebsd.org Tue Aug 1 03:51:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 481A8DC8D24; Tue, 1 Aug 2017 03:51:28 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0ECF976509; Tue, 1 Aug 2017 03:51:27 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v713pRkL007141; Tue, 1 Aug 2017 03:51:27 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v713pRAJ007139; Tue, 1 Aug 2017 03:51:27 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201708010351.v713pRAJ007139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Tue, 1 Aug 2017 03:51:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321840 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 321840 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 03:51:28 -0000 Author: alc Date: Tue Aug 1 03:51:26 2017 New Revision: 321840 URL: https://svnweb.freebsd.org/changeset/base/321840 Log: The blist_meta_* routines that process a subtree take arguments 'radix' and 'skip', which denote, respectively, the largest number of blocks that can be managed by a subtree of that height, and one less than the number of nodes in a subtree of that height. This change removes the 'skip' argument from those functions because 'skip' can be trivially computed from 'radius'. This change also redefines 'skip' so that it denotes the number of nodes in the subtree, and so changes loop upper bound tests from '<= skip' to '< skip' to account for the change. The 'skip' field is also removed from the blist struct. The self-test program is changed so that the print command includes the cursor value in the output. Submitted by: Doug Moore MFC after: 1 week Modified: head/sys/kern/subr_blist.c head/sys/sys/blist.h Modified: head/sys/kern/subr_blist.c ============================================================================== --- head/sys/kern/subr_blist.c Tue Aug 1 03:40:19 2017 (r321839) +++ head/sys/kern/subr_blist.c Tue Aug 1 03:51:26 2017 (r321840) @@ -123,20 +123,19 @@ void panic(const char *ctl, ...); static daddr_t blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count, daddr_t cursor); static daddr_t blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t count, - daddr_t radix, daddr_t skip, daddr_t cursor); + daddr_t radix, daddr_t cursor); static void blst_leaf_free(blmeta_t *scan, daddr_t relblk, int count); static void blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_t count, - daddr_t radix, daddr_t skip, daddr_t blk); + daddr_t radix, daddr_t blk); static void blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, - daddr_t skip, blist_t dest, daddr_t count); + blist_t dest, daddr_t count); static daddr_t blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count); static daddr_t blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr_t count, - daddr_t radix, daddr_t skip, daddr_t blk); -static daddr_t blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t skip, - daddr_t count); + daddr_t radix, daddr_t blk); +static daddr_t blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t count); #ifndef _KERNEL static void blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, - daddr_t skip, int tab); + int tab); #endif #ifdef _KERNEL @@ -144,6 +143,28 @@ static MALLOC_DEFINE(M_SWAP, "SWAP", "Swap space"); #endif /* + * For a subtree that can represent the state of up to 'radix' blocks, the + * number of leaf nodes of the subtree is L=radix/BLIST_BMAP_RADIX. If 'm' + * is short for BLIST_META_RADIX, then for a tree of height h with L=m**h + * leaf nodes, the total number of tree nodes is 1 + m + m**2 + ... + m**h, + * or, equivalently, (m**(h+1)-1)/(m-1). This quantity is called 'skip' + * in the 'meta' functions that process subtrees. Since integer division + * discards remainders, we can express this computation as + * skip = (m * m**h) / (m - 1) + * skip = (m * radix / BLIST_BMAP_RADIX) / (m - 1) + * and if m divides BLIST_BMAP_RADIX, we can simplify further to + * skip = radix / (BLIST_BMAP_RADIX / m * (m - 1)) + * so that a simple integer division is enough for the calculation. + */ +static inline daddr_t +radix_to_skip(daddr_t radix) +{ + + return (radix / + (BLIST_BMAP_RADIX / BLIST_META_RADIX * (BLIST_META_RADIX - 1))); +} + +/* * blist_create() - create a blist capable of handling up to the specified * number of blocks * @@ -157,18 +178,16 @@ blist_t blist_create(daddr_t blocks, int flags) { blist_t bl; - daddr_t nodes, radix, skip; + daddr_t nodes, radix; /* - * Calculate radix and skip field used for scanning. + * Calculate the radix field used for scanning. */ radix = BLIST_BMAP_RADIX; - skip = 0; while (radix < blocks) { radix *= BLIST_META_RADIX; - skip = (skip + 1) * BLIST_META_RADIX; } - nodes = 1 + blst_radix_init(NULL, radix, skip, blocks); + nodes = 1 + blst_radix_init(NULL, radix, blocks); bl = malloc(sizeof(struct blist), M_SWAP, flags); if (bl == NULL) @@ -176,14 +195,13 @@ blist_create(daddr_t blocks, int flags) bl->bl_blocks = blocks; bl->bl_radix = radix; - bl->bl_skip = skip; bl->bl_cursor = 0; bl->bl_root = malloc(nodes * sizeof(blmeta_t), M_SWAP, flags); if (bl->bl_root == NULL) { free(bl, M_SWAP); return (NULL); } - blst_radix_init(bl->bl_root, radix, skip, blocks); + blst_radix_init(bl->bl_root, radix, blocks); #if defined(BLIST_DEBUG) printf( @@ -225,7 +243,7 @@ blist_alloc(blist_t bl, daddr_t count) */ while (count <= bl->bl_root->bm_bighint) { blk = blst_meta_alloc(bl->bl_root, 0, count, bl->bl_radix, - bl->bl_skip, bl->bl_cursor); + bl->bl_cursor); if (blk != SWAPBLK_NONE) { bl->bl_cursor = blk + count; return (blk); @@ -257,7 +275,7 @@ void blist_free(blist_t bl, daddr_t blkno, daddr_t count) { - blst_meta_free(bl->bl_root, blkno, count, bl->bl_radix, bl->bl_skip, 0); + blst_meta_free(bl->bl_root, blkno, count, bl->bl_radix, 0); } /* @@ -270,8 +288,7 @@ daddr_t blist_fill(blist_t bl, daddr_t blkno, daddr_t count) { - return (blst_meta_fill(bl->bl_root, blkno, count, bl->bl_radix, - bl->bl_skip, 0)); + return (blst_meta_fill(bl->bl_root, blkno, count, bl->bl_radix, 0)); } /* @@ -290,7 +307,7 @@ blist_resize(blist_t *pbl, daddr_t count, int freenew, *pbl = newbl; if (count > save->bl_blocks) count = save->bl_blocks; - blst_copy(save->bl_root, 0, save->bl_radix, save->bl_skip, newbl, count); + blst_copy(save->bl_root, 0, save->bl_radix, newbl, count); /* * If resizing upwards, should we free the new space or not? @@ -309,8 +326,8 @@ blist_resize(blist_t *pbl, daddr_t count, int freenew, void blist_print(blist_t bl) { - printf("BLIST {\n"); - blst_radix_print(bl->bl_root, 0, bl->bl_radix, bl->bl_skip, 4); + printf("BLIST cursor = %08jx {\n", (uintmax_t)bl->bl_cursor); + blst_radix_print(bl->bl_root, 0, bl->bl_radix, 4); printf("}\n"); } @@ -426,9 +443,9 @@ blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count */ static daddr_t blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t count, daddr_t radix, - daddr_t skip, daddr_t cursor) + daddr_t cursor) { - daddr_t i, next_skip, r; + daddr_t i, next_skip, r, skip; int child; bool scan_from_start; @@ -443,6 +460,7 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t c scan->bm_bighint = scan->u.bmu_avail; return (SWAPBLK_NONE); } + skip = radix_to_skip(radix); next_skip = skip / BLIST_META_RADIX; /* @@ -456,7 +474,7 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t c * Reinitialize each of the meta node's children. An ALL-FREE * meta node cannot have a terminator in any subtree. */ - for (i = 1; i <= skip; i += next_skip) { + for (i = 1; i < skip; i += next_skip) { if (next_skip == 1) scan[i].u.bmu_bitmap = (u_daddr_t)-1; else @@ -477,13 +495,13 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t c scan_from_start = cursor == blk; child = (cursor - blk) / radix; blk += child * radix; - for (i = 1 + child * next_skip; i <= skip; i += next_skip) { + for (i = 1 + child * next_skip; i < skip; i += next_skip) { if (count <= scan[i].bm_bighint) { /* * The allocation might fit in the i'th subtree. */ r = blst_meta_alloc(&scan[i], blk, count, radix, - next_skip - 1, cursor > blk ? cursor : blk); + cursor > blk ? cursor : blk); if (r != SWAPBLK_NONE) { scan->u.bmu_avail -= count; return (r); @@ -552,15 +570,16 @@ blst_leaf_free(blmeta_t *scan, daddr_t blk, int count) */ static void blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_t count, daddr_t radix, - daddr_t skip, daddr_t blk) + daddr_t blk) { - daddr_t i, next_skip, v; + daddr_t i, next_skip, skip, v; int child; if (scan->bm_bighint == (daddr_t)-1) panic("freeing invalid range"); if (radix == BLIST_BMAP_RADIX) return (blst_leaf_free(scan, freeBlk, count)); + skip = radix_to_skip(radix); next_skip = skip / BLIST_META_RADIX; if (scan->u.bmu_avail == 0) { @@ -572,7 +591,7 @@ blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_ scan->bm_bighint = count; if (count != radix) { - for (i = 1; i <= skip; i += next_skip) { + for (i = 1; i < skip; i += next_skip) { if (scan[i].bm_bighint == (daddr_t)-1) break; scan[i].bm_bighint = 0; @@ -609,11 +628,11 @@ blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_ child = (freeBlk - blk) / radix; blk += child * radix; i = 1 + child * next_skip; - while (i <= skip && blk < freeBlk + count) { + while (i < skip && blk < freeBlk + count) { v = blk + radix - freeBlk; if (v > count) v = count; - blst_meta_free(&scan[i], freeBlk, v, radix, next_skip - 1, blk); + blst_meta_free(&scan[i], freeBlk, v, radix, blk); if (scan->bm_bighint < scan[i].bm_bighint) scan->bm_bighint = scan[i].bm_bighint; count -= v; @@ -630,10 +649,10 @@ blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_ * tree. The space may not already be free in the destination. */ static void -blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, daddr_t skip, - blist_t dest, daddr_t count) +blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, blist_t dest, + daddr_t count) { - daddr_t i, next_skip; + daddr_t i, next_skip, skip; /* * Leaf node @@ -677,21 +696,20 @@ blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, } - radix /= BLIST_META_RADIX; + skip = radix_to_skip(radix); next_skip = skip / BLIST_META_RADIX; + radix /= BLIST_META_RADIX; - for (i = 1; count && i <= skip; i += next_skip) { + for (i = 1; count && i < skip; i += next_skip) { if (scan[i].bm_bighint == (daddr_t)-1) break; if (count >= radix) { - blst_copy(&scan[i], blk, radix, next_skip - 1, dest, - radix); + blst_copy(&scan[i], blk, radix, dest, radix); count -= radix; } else { if (count) { - blst_copy(&scan[i], blk, radix, next_skip - 1, - dest, count); + blst_copy(&scan[i], blk, radix, dest, count); } count = 0; } @@ -733,9 +751,9 @@ blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count) */ static daddr_t blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr_t count, daddr_t radix, - daddr_t skip, daddr_t blk) + daddr_t blk) { - daddr_t i, nblks, next_skip, v; + daddr_t i, nblks, next_skip, skip, v; int child; if (scan->bm_bighint == (daddr_t)-1) @@ -758,6 +776,7 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr scan->bm_bighint = 0; return (nblks); } + skip = radix_to_skip(radix); next_skip = skip / BLIST_META_RADIX; /* @@ -771,7 +790,7 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr * Reinitialize each of the meta node's children. An ALL-FREE * meta node cannot have a terminator in any subtree. */ - for (i = 1; i <= skip; i += next_skip) { + for (i = 1; i < skip; i += next_skip) { if (next_skip == 1) scan[i].u.bmu_bitmap = (u_daddr_t)-1; else @@ -786,12 +805,11 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr child = (allocBlk - blk) / radix; blk += child * radix; i = 1 + child * next_skip; - while (i <= skip && blk < allocBlk + count) { + while (i < skip && blk < allocBlk + count) { v = blk + radix - allocBlk; if (v > count) v = count; - nblks += blst_meta_fill(&scan[i], allocBlk, v, radix, - next_skip - 1, blk); + nblks += blst_meta_fill(&scan[i], allocBlk, v, radix, blk); count -= v; allocBlk += v; blk += radix; @@ -810,9 +828,9 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr * RADIX values we use. */ static daddr_t -blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t skip, daddr_t count) +blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t count) { - daddr_t i, memindex, next_skip; + daddr_t i, memindex, next_skip, skip; memindex = 0; @@ -839,17 +857,18 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t scan->u.bmu_avail = 0; } - radix /= BLIST_META_RADIX; + skip = radix_to_skip(radix); next_skip = skip / BLIST_META_RADIX; + radix /= BLIST_META_RADIX; - for (i = 1; i <= skip; i += next_skip) { + for (i = 1; i < skip; i += next_skip) { if (count >= radix) { /* * Allocate the entire object */ memindex = i + blst_radix_init(((scan) ? &scan[i] : NULL), radix, - next_skip - 1, radix); + radix); count -= radix; } else if (count > 0) { /* @@ -857,7 +876,7 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t */ memindex = i + blst_radix_init(((scan) ? &scan[i] : NULL), radix, - next_skip - 1, count); + count); count = 0; } else { /* @@ -876,10 +895,9 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t #ifdef BLIST_DEBUG static void -blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, daddr_t skip, - int tab) +blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, int tab) { - daddr_t i, next_skip; + daddr_t i, next_skip, skip; if (radix == BLIST_BMAP_RADIX) { printf( @@ -920,11 +938,12 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t (long long)scan->bm_bighint ); - radix /= BLIST_META_RADIX; + skip = radix_to_skip(radix); next_skip = skip / BLIST_META_RADIX; + radix /= BLIST_META_RADIX; tab += 4; - for (i = 1; i <= skip; i += next_skip) { + for (i = 1; i < skip; i += next_skip) { if (scan[i].bm_bighint == (daddr_t)-1) { printf( "%*.*s(%08llx,%lld): Terminator\n", @@ -933,7 +952,7 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t ); break; } - blst_radix_print(&scan[i], blk, radix, next_skip - 1, tab); + blst_radix_print(&scan[i], blk, radix, tab); blk += radix; } tab -= 4; Modified: head/sys/sys/blist.h ============================================================================== --- head/sys/sys/blist.h Tue Aug 1 03:40:19 2017 (r321839) +++ head/sys/sys/blist.h Tue Aug 1 03:51:26 2017 (r321840) @@ -81,7 +81,6 @@ typedef struct blmeta { typedef struct blist { daddr_t bl_blocks; /* area of coverage */ daddr_t bl_radix; /* coverage radix */ - daddr_t bl_skip; /* starting skip */ daddr_t bl_cursor; /* next-fit search starts at */ blmeta_t *bl_root; /* root of radix tree */ } *blist_t; From owner-svn-src-head@freebsd.org Tue Aug 1 04:04:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F043FDC919E; Tue, 1 Aug 2017 04:04:46 +0000 (UTC) (envelope-from dchagin@mordor.heemeyer.club) Received: from heemeyer.club (heemeyer.club [108.61.204.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "heemeyer.club", Issuer "heemeyer.club" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C52B576C9B; Tue, 1 Aug 2017 04:04:46 +0000 (UTC) (envelope-from dchagin@mordor.heemeyer.club) Received: from mordor.heemeyer.club (dchagin.static.corbina.ru [78.107.232.239] (may be forged)) by heemeyer.club (8.15.2/8.15.1) with ESMTPS id v713hmA6029901 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 1 Aug 2017 03:43:49 GMT (envelope-from dchagin@mordor.heemeyer.club) X-Authentication-Warning: heemeyer.club: Host dchagin.static.corbina.ru [78.107.232.239] (may be forged) claimed to be mordor.heemeyer.club Received: from mordor.heemeyer.club (localhost [127.0.0.1]) by mordor.heemeyer.club (8.15.2/8.15.1) with ESMTPS id v713hfCC036505 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 1 Aug 2017 06:43:41 +0300 (MSK) (envelope-from dchagin@mordor.heemeyer.club) Received: (from dchagin@localhost) by mordor.heemeyer.club (8.15.2/8.15.2/Submit) id v713hfKm036504; Tue, 1 Aug 2017 06:43:41 +0300 (MSK) (envelope-from dchagin) Date: Tue, 1 Aug 2017 06:43:40 +0300 From: Chagin Dmitry To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321839 - in head: share/man/man4 share/man/man5 sys/fs/fdescfs sys/kern sys/sys Message-ID: <20170801034340.GA36494@mordor.heemeyer.club> References: <201708010340.v713eJVp002477@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201708010340.v713eJVp002477@repo.freebsd.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 04:04:47 -0000 On Tue, Aug 01, 2017 at 03:40:19AM +0000, Dmitry Chagin wrote: > Author: dchagin > Date: Tue Aug 1 03:40:19 2017 > New Revision: 321839 > URL: https://svnweb.freebsd.org/changeset/base/321839 > > Log: > Implement proper Linux /dev/fd and /proc/self/fd behavior by adding > Linux specific things to the native fdescfs file system. > > Unlike FreeBSD, the Linux fdescfs is a directory containing a symbolic > links to the actual files, which the process has open. > A readlink(2) call on this file returns a full path in case of regular file > or a string in a special format (type:[inode], anon_inode:, etc..). > As well as in a FreeBSD, opening the file in the Linux fdescfs directory is > equivalent to duplicating the corresponding file descriptor. > > Here we have mutually exclusive requirements: > - in case of readlink(2) call fdescfs lookup() method should return VLNK > vnode otherwise our kern_readlink() fail with EINVAL error; > - in the other calls fdescfs lookup() method should return non VLNK vnode. > > For what new vnode v_flag VV_READLINK was added, which is set if fdescfs has beed > mounted with linrdlnk option an modified kern_readlinkat() to properly handle it. > > For now For Linux ABI compatibility mount fdescfs volume with linrdlnk option: > > mount -t fdescfs -o linrdlnk null /compat/linux/dev/fd > > Reviewed by: kib@ > MFC after: 1 week > Relnotes: yes Differential Revision: https://reviews.freebsd.org/D11452 From owner-svn-src-head@freebsd.org Tue Aug 1 04:16:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A09CDC969A; Tue, 1 Aug 2017 04:16:54 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0181771BE; Tue, 1 Aug 2017 04:16:53 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v714Gq3e018458; Tue, 1 Aug 2017 04:16:52 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v714Gqv7018454; Tue, 1 Aug 2017 04:16:52 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201708010416.v714Gqv7018454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 1 Aug 2017 04:16:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321841 - in head/sys: conf dev/iicbus modules/i2c modules/i2c/isl12xx X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys: conf dev/iicbus modules/i2c modules/i2c/isl12xx X-SVN-Commit-Revision: 321841 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 04:16:54 -0000 Author: ian Date: Tue Aug 1 04:16:52 2017 New Revision: 321841 URL: https://svnweb.freebsd.org/changeset/base/321841 Log: Add a driver for the Intersil ISL12xx family of i2c RTC chips. Supports ISL1209, ISL1218, ISL1219, ISL1220, ISL1221 (just basic RTC functionality, not all the other fancy stuff the chips can do). Added: head/sys/dev/iicbus/isl12xx.c (contents, props changed) head/sys/modules/i2c/isl12xx/ head/sys/modules/i2c/isl12xx/Makefile (contents, props changed) Modified: head/sys/conf/files head/sys/modules/i2c/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Aug 1 03:51:26 2017 (r321840) +++ head/sys/conf/files Tue Aug 1 04:16:52 2017 (r321841) @@ -1736,6 +1736,7 @@ dev/iicbus/iiconf.c optional iicbus dev/iicbus/iicsmb.c optional iicsmb \ dependency "iicbus_if.h" dev/iicbus/iicoc.c optional iicoc +dev/iicbus/isl12xx.c optional isl12xx dev/iicbus/lm75.c optional lm75 dev/iicbus/nxprtc.c optional nxprtc | pcf8563 dev/iicbus/ofw_iicbus.c optional fdt iicbus Added: head/sys/dev/iicbus/isl12xx.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iicbus/isl12xx.c Tue Aug 1 04:16:52 2017 (r321841) @@ -0,0 +1,354 @@ +/*- + * Copyright (c) 2017 Ian Lepore. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Driver for ISL12xx family i2c realtime clocks: + * - ISL1209 = 2B sram, tamper/event timestamp + * - ISL1218 = 8B sram, DS13xx pin compatible (but not software compatible) + * - ISL1219 = 2B sram, tamper/event timestamp + * - ISL1220 = 8B sram, separate Fout + * - ISL1221 = 2B sram, separate Fout, tamper/event timestamp + * + * This driver supports only the basic RTC functionality in all these chips. + */ + +#include "opt_platform.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef FDT +#include +#include +#endif + +#include +#include + +#include "clock_if.h" +#include "iicbus_if.h" + +/* + * All register and bit names as found in the datasheet. When a bit name ends + * in 'B' that stands for "bar" and it is an active-low signal; something named + * "EVENB" implies 1=event-disable, 0=event-enable. + */ + +#define ISL12XX_SC_REG 0x00 /* RTC Seconds */ + +#define ISL12XX_SR_REG 0x07 /* Status */ +#define ISL12XX_SR_ARST (1u << 7) /* Auto-reset on status read */ +#define ISL12XX_SR_XTOSCB (1u << 5) /* Osc disable (use ext osc) */ +#define ISL12XX_SR_WRTC (1u << 4) /* Write RTC enable */ +#define ISL12XX_SR_EVT (1u << 3) /* Event occurred (w0c) */ +#define ISL12XX_SR_ALM (1u << 2) /* Alarm occurred (w0c) */ +#define ISL12XX_SR_BAT (1u << 1) /* Running on battery (w0c) */ +#define ISL12XX_SR_RTCF (1u << 0) /* RTC fail (power loss) */ +#define ISL12XX_SR_W0C_BITS (ISL12XX_SR_BAT | ISL12XX_SR_ALM | ISL12XX_SR_EVT) + +#define ISL12XX_INT_REG 0x08 /* Interrupts */ +#define ISL12XX_INT_IM (1u << 7) /* Alarm interrupt mode */ +#define ISL12XX_INT_ALME (1u << 6) /* Alarm enable */ +#define ISL12XX_INT_LPMODE (1u << 5) /* Low Power mode */ +#define ISL12XX_INT_FOBATB (1u << 4) /* Fout/IRQ disabled on bat */ +#define ISL12XX_INT_FO_SHIFT 0 /* Frequency output select */ +#define ISL12XX_INT_FO_MASK 0x0f /* shift and mask. */ + +#define ISL12XX_EV_REG 0x09 /* Event */ +#define ISL12XX_EV_EVIENB (1u << 7) /* Disable internal pullup */ +#define ISL12XX_EV_EVBATB (1u << 6) /* Disable ev detect on bat */ +#define ISL12XX_EV_RTCHLT (1u << 5) /* Halt RTC on event */ +#define ISL12XX_EV_EVEN (1u << 4) /* Event detect enable */ +#define ISL12XX_EV_EHYS_SHIFT 2 /* Event input hysteresis */ +#define ISL12XX_EV_EHYS_MASK 0x03 /* selection; see datasheet */ +#define ISL12XX_EV_ESMP_SHIFT 0 /* Event input sample rate */ +#define ISL12XX_EV_ESMP_MASK 0x03 /* selection; see datasheet */ + +#define ISL12XX_ATR_REG 0x0a /* Analog trim (osc adjust) */ + +#define ISL12XX_DTR_REG 0x0b /* Digital trim (osc adjust) */ + +#define ISL12XX_SCA_REG 0x0c /* Alarm seconds */ + +#define ISL12XX_USR1_REG 0x12 /* User byte 1 */ + +#define ISL12XX_USR2_REG 0x13 /* User byte 2 */ + +#define ISL12XX_SCT_REG 0x14 /* Timestamp (event) seconds */ + +#define ISL12XX_24HR_FLAG (1u << 7) /* Hours register 24-hr mode */ +#define ISL12XX_PM_FLAG (1u << 5) /* Hours register PM flag */ +#define ISL12xx_12HR_MASK 0x1f /* Hours mask in AM/PM mode */ +#define ISL12xx_24HR_MASK 0x3f /* Hours mask in 24-hr mode */ + +/* + * A struct laid out in the same order as the time registers in the chip. + */ +struct time_regs { + uint8_t sec, min, hour, day, month, year; +}; + +struct isl12xx_softc { + device_t dev; + device_t busdev; + struct intr_config_hook + init_hook; + bool use_ampm; +}; + +#ifdef FDT +static struct ofw_compat_data compat_data[] = { + {"isil,isl1209", 1}, + {"isil,isl1218", 1}, + {"isil,isl1219", 1}, + {"isil,isl1220", 1}, + {"isil,isl1221", 1}, + {NULL, 0}, +}; +#endif + +static inline int +isl12xx_read1(struct isl12xx_softc *sc, uint8_t reg, uint8_t *data) +{ + + return (iicdev_readfrom(sc->dev, reg, data, 1, IIC_WAIT)); +} + +static inline int +isl12xx_write1(struct isl12xx_softc *sc, uint8_t reg, uint8_t val) +{ + + return (iicdev_writeto(sc->dev, reg, &val, 1, IIC_WAIT)); +} + +static void +isl12xx_init(void *arg) +{ + struct isl12xx_softc *sc = arg; + uint8_t sreg; + + config_intrhook_disestablish(&sc->init_hook); + + /* + * Check the clock-stopped/power-fail bit, just so we can report it to + * the user at boot time. + */ + isl12xx_read1(sc, ISL12XX_SR_REG, &sreg); + if (sreg & ISL12XX_SR_RTCF) { + device_printf(sc->dev, + "RTC clock stopped; check battery\n"); + } + + /* + * Register as a system realtime clock. + */ + clock_register_flags(sc->dev, 1000000, CLOCKF_SETTIME_NO_ADJ); + clock_schedule(sc->dev, 1); +} + +static int +isl12xx_probe(device_t dev) +{ + +#ifdef FDT + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { + device_set_desc(dev, "Intersil ISL12xx RTC"); + return (BUS_PROBE_DEFAULT); + } +#endif + return (ENXIO); +} + +static int +isl12xx_attach(device_t dev) +{ + struct isl12xx_softc *sc = device_get_softc(dev); + + sc->dev = dev; + sc->busdev = device_get_parent(sc->dev); + + /* + * Chip init must wait until interrupts are enabled. Often i2c access + * works only when the interrupts are available. + */ + sc->init_hook.ich_func = isl12xx_init; + sc->init_hook.ich_arg = sc; + if (config_intrhook_establish(&sc->init_hook) != 0) + return (ENOMEM); + + return (0); +} + +static int +isl12xx_detach(device_t dev) +{ + + clock_unregister(dev); + return (0); +} + +static int +isl12xx_gettime(device_t dev, struct timespec *ts) +{ + struct isl12xx_softc *sc = device_get_softc(dev); + struct clocktime ct; + struct time_regs tregs; + int err; + uint8_t hourmask, sreg; + + /* If power failed, we can't provide valid time. */ + if ((err = isl12xx_read1(sc, ISL12XX_SR_REG, &sreg)) != 0) + return (err); + if (sreg & ISL12XX_SR_RTCF) + return (EINVAL); + + /* Read the bcd time registers. */ + if ((err = iicdev_readfrom(sc->dev, ISL12XX_SC_REG, &tregs, sizeof(tregs), + IIC_WAIT)) != 0) + return (EINVAL); + + /* If chip is in AM/PM mode remember that for when we set time. */ + if (tregs.hour & ISL12XX_24HR_FLAG) { + hourmask = ISL12xx_24HR_MASK; + } else { + sc->use_ampm = true; + hourmask = ISL12xx_12HR_MASK; + } + + ct.nsec = 0; + ct.sec = FROMBCD(tregs.sec); + ct.min = FROMBCD(tregs.min); + ct.hour = FROMBCD(tregs.hour & hourmask); + ct.day = FROMBCD(tregs.day); + ct.mon = FROMBCD(tregs.month); + ct.year = FROMBCD(tregs.year); + + if (sc->use_ampm) { + if (ct.hour == 12) + ct.hour = 0; + if (tregs.hour & ISL12XX_PM_FLAG) + ct.hour += 12; + } + + return (clock_ct_to_ts(&ct, ts)); +} + +static int +isl12xx_settime(device_t dev, struct timespec *ts) +{ + struct isl12xx_softc *sc = device_get_softc(dev); + struct clocktime ct; + struct time_regs tregs; + int err; + uint8_t ampmflags, sreg; + + /* + * We request a timespec with no resolution-adjustment. That also + * disables utc adjustment, so apply that ourselves. + */ + ts->tv_sec -= utc_offset(); + ts->tv_nsec = 0; + clock_ts_to_ct(ts, &ct); + + /* If the chip is in AM/PM mode, adjust hour and set flags as needed. */ + if (!sc->use_ampm) { + ampmflags = ISL12XX_24HR_FLAG; + } else { + ampmflags = 0; + if (ct.hour >= 12) { + ct.hour -= 12; + ampmflags |= ISL12XX_PM_FLAG; + } + if (ct.hour == 0) + ct.hour = 12; + } + + tregs.sec = TOBCD(ct.sec); + tregs.min = TOBCD(ct.min); + tregs.hour = TOBCD(ct.hour) | ampmflags; + tregs.day = TOBCD(ct.day); + tregs.month = TOBCD(ct.mon); + tregs.year = TOBCD(ct.year % 100); + + /* + * To set the time we have to set the WRTC enable bit in the control + * register, then write the time regs, then clear the WRTC bit. While + * doing so we have to be careful to not write a 0 to any sreg bit which + * is "write 0 to clear". One of those bits could get set between + * reading and writing the register. All those bits ignore attempts to + * write a 1, so just always OR-in all the W0C bits to be sure we never + * accidentally clear one. We hold ownership of the i2c bus for the + * whole read-modify-write sequence. + */ + if ((err = iicbus_request_bus(sc->busdev, sc->dev, IIC_WAIT)) != 0) + return (err); + if ((err = isl12xx_read1(sc, ISL12XX_SR_REG, &sreg)) == 0) { + sreg |= ISL12XX_SR_WRTC | ISL12XX_SR_W0C_BITS; + if ((err = isl12xx_write1(sc, ISL12XX_SR_REG, sreg)) == 0) { + err = iicdev_writeto(sc->dev, ISL12XX_SC_REG, &tregs, + sizeof(tregs), IIC_WAIT); + sreg &= ~ISL12XX_SR_WRTC; + isl12xx_write1(sc, ISL12XX_SR_REG, sreg); + } + } + iicbus_release_bus(sc->busdev, sc->dev); + + return (err); +} + +static device_method_t isl12xx_methods[] = { + /* device_if methods */ + DEVMETHOD(device_probe, isl12xx_probe), + DEVMETHOD(device_attach, isl12xx_attach), + DEVMETHOD(device_detach, isl12xx_detach), + + /* clock_if methods */ + DEVMETHOD(clock_gettime, isl12xx_gettime), + DEVMETHOD(clock_settime, isl12xx_settime), + + DEVMETHOD_END, +}; + +static driver_t isl12xx_driver = { + "isl12xx", + isl12xx_methods, + sizeof(struct isl12xx_softc), +}; +static devclass_t isl12xx_devclass; + +DRIVER_MODULE(isl12xx, iicbus, isl12xx_driver, isl12xx_devclass, NULL, NULL); +MODULE_VERSION(isl12xx, 1); +MODULE_DEPEND(isl12xx, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER); Modified: head/sys/modules/i2c/Makefile ============================================================================== --- head/sys/modules/i2c/Makefile Tue Aug 1 03:51:26 2017 (r321840) +++ head/sys/modules/i2c/Makefile Tue Aug 1 04:16:52 2017 (r321841) @@ -11,6 +11,7 @@ SUBDIR = \ iicbus \ iicsmb \ isl \ + isl12xx \ jedec_ts \ nxprtc \ smb \ Added: head/sys/modules/i2c/isl12xx/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/i2c/isl12xx/Makefile Tue Aug 1 04:16:52 2017 (r321841) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/dev/iicbus +KMOD = isl12xx +SRCS = isl12xx.c bus_if.h clock_if.h device_if.h iicbus_if.h + +.include From owner-svn-src-head@freebsd.org Tue Aug 1 04:20:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA040DC9869 for ; Tue, 1 Aug 2017 04:20:33 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7BB96773A3 for ; Tue, 1 Aug 2017 04:20:33 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x232.google.com with SMTP id h199so1917060ith.0 for ; Mon, 31 Jul 2017 21:20:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=date:subject:message-id:from:to:mime-version; bh=FNVfozCdDnuoeO8usbX0jFwC/YoiWnVuUVt9RFNDAHo=; b=YTWBI5f+2634a6I2HD9oMQvdG0hSMt5ZrYKWzrzwPURm5ZhacEQgi4XmqpXBebOA7/ OsI6aSmNhyIxCnvOqGGC07FCmtXc/Wt5TeHIIRL9j5rx4sDT7jdQXd1fk7DqShKYj8tK YQlpGNKFhMf68ZeNCSk/wp6nogQeqKhtBYXVEp9nJDdZtdggDdxp0Fvtf7k+MZwlCakM epjecklm8+99bAxpPPqvbWWC5F2PiCikfoSPcX829h3gE1pMcZOa0lZpPQfnbxwhZHQu juzECIWmRwPSYGGYmCs6f8IYg83yfLgKWN1v1GnbEswNPKlHmTmbC+98iseyNtam1Dwu Vmfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:message-id:from:to:mime-version; bh=FNVfozCdDnuoeO8usbX0jFwC/YoiWnVuUVt9RFNDAHo=; b=YBEL9uOpDTvc3v3GJp6WHWHjuMSjLTIj/NriCcEzRuzYv+hdtVEPqW78H3ngZBVNXl N7VslTucX9g9RkoKvyYdbgTC0hhp7gAI9zQma4LNY3LIuB7oEGmX8OVry8BTSLtfxbp0 3zPVCJCLmP6aSt4zA/4bbK0X7391nnQG/5whRvoh6csmrVl074qA4Nyb98EppYJcJHl4 bYKgAGF83r6vQSmC1V1z2uryhG/gi6O9LG5Sfi0ulF5DFySlDFAUcu/vISaj0kPyo1Io kwV4wJ7Z2X5ZGtcdeWoDAcci7I5VLipUx9EtacRAJc+A5u67sWZ/lcr+F5JcbUnKqcRi 73QQ== X-Gm-Message-State: AIVw111tjC58i6PQxsihMVk1KZ2Eza45MrtJjgWIDhyyNYNzbdlX/z1f W/pt4HflfDlYvMG6we1V4w== X-Received: by 10.36.121.207 with SMTP id z198mr415849itc.83.1501561232376; Mon, 31 Jul 2017 21:20:32 -0700 (PDT) Received: from [10.0.0.93] (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id b14sm242738itb.18.2017.07.31.21.20.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Jul 2017 21:20:31 -0700 (PDT) Date: Mon, 31 Jul 2017 22:20:29 -0600 Subject: Re: svn commit: r321840 - in head/sys: kern sys Message-ID: <5lny7794f8b19a2l8vlaannr.1501561229506@email.android.com> From: Warner Losh To: Alan Cox , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 04:20:33 -0000 CgpPbiBKdWx5IDMxLCAyMDE3LCBhdCA5OjUxIFBNLCBBbGFuIENveCA8YWxjQGZyZWVic2Qub3Jn PiB3cm90ZToKCj5BdXRob3I6IGFsYwo+RGF0ZTogVHVlIEF1Z8KgIDEgMDM6NTE6MjYgMjAxNwo+ TmV3IFJldmlzaW9uOiAzMjE4NDAKPlVSTDogaHR0cHM6Ly9zdm53ZWIuZnJlZWJzZC5vcmcvY2hh bmdlc2V0L2Jhc2UvMzIxODQwCj5Mb2c6Cj7CoCBUaGUgYmxpc3RfbWV0YV8qIHJvdXRpbmVzIHRo YXQgcHJvY2VzcyBhIHN1YnRyZWUgdGFrZSBhcmd1bWVudHMgJ3JhZGl4JyBhbmQKPsKgICdza2lw Jywgd2hpY2ggZGVub3RlLCByZXNwZWN0aXZlbHksIHRoZSBsYXJnZXN0IG51bWJlciBvZiBibG9j a3MgdGhhdCBjYW4gYmUKPsKgIG1hbmFnZWQgYnkgYSBzdWJ0cmVlIG9mIHRoYXQgaGVpZ2h0LCBh bmQgb25lIGxlc3MgdGhhbiB0aGUgbnVtYmVyIG9mIG5vZGVzCj7CoCBpbiBhIHN1YnRyZWUgb2Yg dGhhdCBoZWlnaHQuwqAgVGhpcyBjaGFuZ2UgcmVtb3ZlcyB0aGUgJ3NraXAnIGFyZ3VtZW50IGZy b20KPsKgIHRob3NlIGZ1bmN0aW9ucyBiZWNhdXNlICdza2lwJyBjYW4gYmUgdHJpdmlhbGx5IGNv bXB1dGVkIGZyb20gJ3JhZGl1cycuCj7CoCBUaGlzIGNoYW5nZSBhbHNvIHJlZGVmaW5lcyAnc2tp cCcgc28gdGhhdCBpdCBkZW5vdGVzIHRoZSBudW1iZXIgb2Ygbm9kZXMgaW4KPsKgIHRoZSBzdWJ0 cmVlLCBhbmQgc28gY2hhbmdlcyBsb29wIHVwcGVyIGJvdW5kIHRlc3RzIGZyb20gJzw9IHNraXAn IHRvICc8Cj7CoCBza2lwJyB0byBhY2NvdW50IGZvciB0aGUgY2hhbmdlLgo+wqAgCj7CoCBUaGUg J3NraXAnIGZpZWxkIGlzIGFsc28gcmVtb3ZlZCBmcm9tIHRoZSBibGlzdCBzdHJ1Y3QuCj7CoCAK PsKgIFRoZSBzZWxmLXRlc3QgcHJvZ3JhbSBpcyBjaGFuZ2VkIHNvIHRoYXQgdGhlIHByaW50IGNv bW1hbmQgaW5jbHVkZXMgdGhlCj7CoCBjdXJzb3IgdmFsdWUgaW4gdGhlIG91dHB1dC4KPsKgIAo+ wqAgU3VibWl0dGVkIGJ5OiBEb3VnIE1vb3JlIDxkb3VnbUByaWNlLmVkdT4KPsKgIE1GQyBhZnRl cjogMSB3ZWVrCj5Nb2RpZmllZDoKPsKgIGhlYWQvc3lzL2tlcm4vc3Vicl9ibGlzdC5jCj7CoCBo ZWFkL3N5cy9zeXMvYmxpc3QuaAo+TW9kaWZpZWQ6IGhlYWQvc3lzL2tlcm4vc3Vicl9ibGlzdC5j Cj49PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT0KPi0tLSBoZWFkL3N5cy9rZXJuL3N1YnJfYmxpc3QuYyBU dWUgQXVnwqAgMSAwMzo0MDoxOSAyMDE3IChyMzIxODM5KQo+KysrIGhlYWQvc3lzL2tlcm4vc3Vi cl9ibGlzdC5jIFR1ZSBBdWfCoCAxIDAzOjUxOjI2IDIwMTcgKHIzMjE4NDApCj5AQCAtMTIzLDIw ICsxMjMsMTkgQEAgdm9pZCBwYW5pYyhjb25zdCBjaGFyICpjdGwsIC4uLik7Cj5zdGF0aWMgZGFk ZHJfdCBibHN0X2xlYWZfYWxsb2MoYmxtZXRhX3QgKnNjYW4sIGRhZGRyX3QgYmxrLCBpbnQgY291 bnQsCj7CoMKgwqAgZGFkZHJfdCBjdXJzb3IpOwo+c3RhdGljIGRhZGRyX3QgYmxzdF9tZXRhX2Fs bG9jKGJsbWV0YV90ICpzY2FuLCBkYWRkcl90IGJsaywgZGFkZHJfdCBjb3VudCwKPi0gwqDCoMKg IGRhZGRyX3QgcmFkaXgsIGRhZGRyX3Qgc2tpcCwgZGFkZHJfdCBjdXJzb3IpOwo+KyDCoMKgwqAg ZGFkZHJfdCByYWRpeCwgZGFkZHJfdCBjdXJzb3IpOwo+c3RhdGljIHZvaWQgYmxzdF9sZWFmX2Zy ZWUoYmxtZXRhX3QgKnNjYW4sIGRhZGRyX3QgcmVsYmxrLCBpbnQgY291bnQpOwo+c3RhdGljIHZv aWQgYmxzdF9tZXRhX2ZyZWUoYmxtZXRhX3QgKnNjYW4sIGRhZGRyX3QgZnJlZUJsaywgZGFkZHJf dCBjb3VudCwKPi0gwqDCoMKgIGRhZGRyX3QgcmFkaXgsIGRhZGRyX3Qgc2tpcCwgZGFkZHJfdCBi bGspOwo+KyDCoMKgwqAgZGFkZHJfdCByYWRpeCwgZGFkZHJfdCBibGspOwo+c3RhdGljIHZvaWQg YmxzdF9jb3B5KGJsbWV0YV90ICpzY2FuLCBkYWRkcl90IGJsaywgZGFkZHJfdCByYWRpeCwKPi0g wqDCoMKgIGRhZGRyX3Qgc2tpcCwgYmxpc3RfdCBkZXN0LCBkYWRkcl90IGNvdW50KTsKPisgwqDC oMKgIGJsaXN0X3QgZGVzdCwgZGFkZHJfdCBjb3VudCk7Cj5zdGF0aWMgZGFkZHJfdCBibHN0X2xl YWZfZmlsbChibG1ldGFfdCAqc2NhbiwgZGFkZHJfdCBibGssIGludCBjb3VudCk7Cj5zdGF0aWMg ZGFkZHJfdCBibHN0X21ldGFfZmlsbChibG1ldGFfdCAqc2NhbiwgZGFkZHJfdCBhbGxvY0Jsaywg ZGFkZHJfdCBjb3VudCwKPi0gwqDCoMKgIGRhZGRyX3QgcmFkaXgsIGRhZGRyX3Qgc2tpcCwgZGFk ZHJfdCBibGspOwo+LXN0YXRpYyBkYWRkcl90IGJsc3RfcmFkaXhfaW5pdChibG1ldGFfdCAqc2Nh biwgZGFkZHJfdCByYWRpeCwgZGFkZHJfdCBza2lwLAo+LSDCoMKgwqAgZGFkZHJfdCBjb3VudCk7 Cj4rIMKgwqDCoCBkYWRkcl90IHJhZGl4LCBkYWRkcl90IGJsayk7Cj4rc3RhdGljIGRhZGRyX3Qg YmxzdF9yYWRpeF9pbml0KGJsbWV0YV90ICpzY2FuLCBkYWRkcl90IHJhZGl4LCBkYWRkcl90IGNv dW50KTsKPiNpZm5kZWYgX0tFUk5FTAo+c3RhdGljIHZvaWQgYmxzdF9yYWRpeF9wcmludChibG1l dGFfdCAqc2NhbiwgZGFkZHJfdCBibGssIGRhZGRyX3QgcmFkaXgsCj4tIMKgwqDCoCBkYWRkcl90 IHNraXAsIGludCB0YWIpOwo+KyDCoMKgwqAgaW50IHRhYik7Cj4jZW5kaWYKPiNpZmRlZiBfS0VS TkVMCj5AQCAtMTQ0LDYgKzE0MywyOCBAQCBzdGF0aWMgTUFMTE9DX0RFRklORShNX1NXQVAsICJT V0FQIiwgIlN3YXAgc3BhY2UiKTsKPiNlbmRpZgo+LyoKPisgKiBGb3IgYSBzdWJ0cmVlIHRoYXQg Y2FuIHJlcHJlc2VudCB0aGUgc3RhdGUgb2YgdXAgdG8gJ3JhZGl4JyBibG9ja3MsIHRoZQo+KyAq IG51bWJlciBvZiBsZWFmIG5vZGVzIG9mIHRoZSBzdWJ0cmVlIGlzIEw9cmFkaXgvQkxJU1RfQk1B UF9SQURJWC7CoCBJZiAnbScKPisgKiBpcyBzaG9ydCBmb3IgQkxJU1RfTUVUQV9SQURJWCwgdGhl biBmb3IgYSB0cmVlIG9mIGhlaWdodCBoIHdpdGggTD1tKipoCj4rICogbGVhZiBub2RlcywgdGhl IHRvdGFsIG51bWJlciBvZiB0cmVlIG5vZGVzIGlzIDEgKyBtICsgbSoqMiArIC4uLiArIG0qKmgs Cj4rICogb3IsIGVxdWl2YWxlbnRseSwgKG0qKihoKzEpLTEpLyhtLTEpLsKgIFRoaXMgcXVhbnRp dHkgaXMgY2FsbGVkICdza2lwJwo+KyAqIGluIHRoZSAnbWV0YScgZnVuY3Rpb25zIHRoYXQgcHJv Y2VzcyBzdWJ0cmVlcy7CoCBTaW5jZSBpbnRlZ2VyIGRpdmlzaW9uCj4rICogZGlzY2FyZHMgcmVt YWluZGVycywgd2UgY2FuIGV4cHJlc3MgdGhpcyBjb21wdXRhdGlvbiBhcwo+KyAqIHNraXAgPSAo bSAqIG0qKmgpIC8gKG0gLSAxKQo+KyAqIHNraXAgPSAobSAqIHJhZGl4IC8gQkxJU1RfQk1BUF9S QURJWCkgLyAobSAtIDEpCj4rICogYW5kIGlmIG0gZGl2aWRlcyBCTElTVF9CTUFQX1JBRElYLCB3 ZSBjYW4gc2ltcGxpZnkgZnVydGhlciB0bwo+KyAqIHNraXAgPSByYWRpeCAvIChCTElTVF9CTUFQ X1JBRElYIC8gbSAqIChtIC0gMSkpCj4rICogc28gdGhhdCBhIHNpbXBsZSBpbnRlZ2VyIGRpdmlz aW9uIGlzIGVub3VnaCBmb3IgdGhlIGNhbGN1bGF0aW9uLgo+KyAqLwo+K3N0YXRpYyBpbmxpbmUg ZGFkZHJfdAo+K3JhZGl4X3RvX3NraXAoZGFkZHJfdCByYWRpeCkKPit7Cj4rCj4rIHJldHVybiAo cmFkaXggLwo+KyDCoMKgwqAgKEJMSVNUX0JNQVBfUkFESVggLyBCTElTVF9NRVRBX1JBRElYICog KEJMSVNUX01FVEFfUkFESVggLSAxKSkpOwoKSSBkb24ndCB0aGluayB0aGlzIG1hdGNoZXMgdGhl IGNvbW1lbnQuIEl0IGlzIG1pc3NpbmcgcGFyZW5zLCBubz8KCldhcm5lcgo+K30KPisKPisvKgo+ wqAgKiBibGlzdF9jcmVhdGUoKSAtIGNyZWF0ZSBhIGJsaXN0IGNhcGFibGUgb2YgaGFuZGxpbmcg dXAgdG8gdGhlIHNwZWNpZmllZAo+wqAgKiDCoMKgwqAgbnVtYmVyIG9mIGJsb2Nrcwo+wqAgKgo+ QEAgLTE1NywxOCArMTc4LDE2IEBAIGJsaXN0X3QKPmJsaXN0X2NyZWF0ZShkYWRkcl90IGJsb2Nr cywgaW50IGZsYWdzKQo+ewo+Ymxpc3RfdCBibDsKPi0gZGFkZHJfdCBub2RlcywgcmFkaXgsIHNr aXA7Cj4rIGRhZGRyX3Qgbm9kZXMsIHJhZGl4Owo+LyoKPi0gKiBDYWxjdWxhdGUgcmFkaXggYW5k IHNraXAgZmllbGQgdXNlZCBmb3Igc2Nhbm5pbmcuCj4rICogQ2FsY3VsYXRlIHRoZSByYWRpeCBm aWVsZCB1c2VkIGZvciBzY2FubmluZy4KPiovCj5yYWRpeCA9IEJMSVNUX0JNQVBfUkFESVg7Cj4t IHNraXAgPSAwOwo+d2hpbGUgKHJhZGl4IDwgYmxvY2tzKSB7Cj5yYWRpeCAqPSBCTElTVF9NRVRB X1JBRElYOwo+LSBza2lwID0gKHNraXAgKyAxKSAqIEJMSVNUX01FVEFfUkFESVg7Cj59Cj4tIG5v ZGVzID0gMSArIGJsc3RfcmFkaXhfaW5pdChOVUxMLCByYWRpeCwgc2tpcCwgYmxvY2tzKTsKPisg bm9kZXMgPSAxICsgYmxzdF9yYWRpeF9pbml0KE5VTEwsIHJhZGl4LCBibG9ja3MpOwo+YmwgPSBt YWxsb2Moc2l6ZW9mKHN0cnVjdCBibGlzdCksIE1fU1dBUCwgZmxhZ3MpOwo+aWYgKGJsID09IE5V TEwpCj5AQCAtMTc2LDE0ICsxOTUsMTMgQEAgYmxpc3RfY3JlYXRlKGRhZGRyX3QgYmxvY2tzLCBp bnQgZmxhZ3MpCj5ibC0+YmxfYmxvY2tzID0gYmxvY2tzOwo+YmwtPmJsX3JhZGl4ID0gcmFkaXg7 Cj4tIGJsLT5ibF9za2lwID0gc2tpcDsKPmJsLT5ibF9jdXJzb3IgPSAwOwo+YmwtPmJsX3Jvb3Qg PSBtYWxsb2Mobm9kZXMgKiBzaXplb2YoYmxtZXRhX3QpLCBNX1NXQVAsIGZsYWdzKTsKPmlmIChi bC0+Ymxfcm9vdCA9PSBOVUxMKSB7Cj5mcmVlKGJsLCBNX1NXQVApOwo+cmV0dXJuIChOVUxMKTsK Pn0KPi0gYmxzdF9yYWRpeF9pbml0KGJsLT5ibF9yb290LCByYWRpeCwgc2tpcCwgYmxvY2tzKTsK PisgYmxzdF9yYWRpeF9pbml0KGJsLT5ibF9yb290LCByYWRpeCwgYmxvY2tzKTsKPiNpZiBkZWZp bmVkKEJMSVNUX0RFQlVHKQo+cHJpbnRmKAo+QEAgLTIyNSw3ICsyNDMsNyBAQCBibGlzdF9hbGxv YyhibGlzdF90IGJsLCBkYWRkcl90IGNvdW50KQo+Ki8KPndoaWxlIChjb3VudCA8PSBibC0+Ymxf cm9vdC0+Ym1fYmlnaGludCkgewo+YmxrID0gYmxzdF9tZXRhX2FsbG9jKGJsLT5ibF9yb290LCAw LCBjb3VudCwgYmwtPmJsX3JhZGl4LAo+LSDCoMKgwqAgYmwtPmJsX3NraXAsIGJsLT5ibF9jdXJz b3IpOwo+KyDCoMKgwqAgYmwtPmJsX2N1cnNvcik7Cj5pZiAoYmxrICE9IFNXQVBCTEtfTk9ORSkg ewo+YmwtPmJsX2N1cnNvciA9IGJsayArIGNvdW50Owo+cmV0dXJuIChibGspOwo+QEAgLTI1Nyw3 ICsyNzUsNyBAQCB2b2lkCj5ibGlzdF9mcmVlKGJsaXN0X3QgYmwsIGRhZGRyX3QgYmxrbm8sIGRh ZGRyX3QgY291bnQpCj57Cj4tIGJsc3RfbWV0YV9mcmVlKGJsLT5ibF9yb290LCBibGtubywgY291 bnQsIGJsLT5ibF9yYWRpeCwgYmwtPmJsX3NraXAsIDApOwo+KyBibHN0X21ldGFfZnJlZShibC0+ Ymxfcm9vdCwgYmxrbm8sIGNvdW50LCBibC0+YmxfcmFkaXgsIDApOwo+fQo+LyoKPkBAIC0yNzAs OCArMjg4LDcgQEAgZGFkZHJfdAo+Ymxpc3RfZmlsbChibGlzdF90IGJsLCBkYWRkcl90IGJsa25v LCBkYWRkcl90IGNvdW50KQo+ewo+LSByZXR1cm4gKGJsc3RfbWV0YV9maWxsKGJsLT5ibF9yb290 LCBibGtubywgY291bnQsIGJsLT5ibF9yYWRpeCwKPi0gwqDCoMKgIGJsLT5ibF9za2lwLCAwKSk7 Cj4rIHJldHVybiAoYmxzdF9tZXRhX2ZpbGwoYmwtPmJsX3Jvb3QsIGJsa25vLCBjb3VudCwgYmwt PmJsX3JhZGl4LCAwKSk7Cj59Cj4vKgo+QEAgLTI5MCw3ICszMDcsNyBAQCBibGlzdF9yZXNpemUo Ymxpc3RfdCAqcGJsLCBkYWRkcl90IGNvdW50LCBpbnQgZnJlZW5ldywKPsKgwqDCoMKgICpwYmwg PSBuZXdibDsKPsKgwqDCoMKgIGlmIChjb3VudCA+IHNhdmUtPmJsX2Jsb2NrcykKPsKgwqDCoCBj b3VudCA9IHNhdmUtPmJsX2Jsb2NrczsKPi3CoMKgwqAgYmxzdF9jb3B5KHNhdmUtPmJsX3Jvb3Qs IDAsIHNhdmUtPmJsX3JhZGl4LCBzYXZlLT5ibF9za2lwLCBuZXdibCwgY291bnQpOwo+K8KgwqDC oCBibHN0X2NvcHkoc2F2ZS0+Ymxfcm9vdCwgMCwgc2F2ZS0+YmxfcmFkaXgsIG5ld2JsLCBjb3Vu dCk7Cj7CoMKgwqDCoCAvKgo+wqDCoMKgwqDCoCAqIElmIHJlc2l6aW5nIHVwd2FyZHMsIHNob3Vs ZCB3ZSBmcmVlIHRoZSBuZXcgc3BhY2Ugb3Igbm90Pwo+QEAgLTMwOSw4ICszMjYsOCBAQCBibGlz dF9yZXNpemUoYmxpc3RfdCAqcGJsLCBkYWRkcl90IGNvdW50LCBpbnQgZnJlZW5ldywKPnZvaWQK PmJsaXN0X3ByaW50KGJsaXN0X3QgYmwpCj57Cj4tIHByaW50ZigiQkxJU1Qge1xuIik7Cj4tIGJs c3RfcmFkaXhfcHJpbnQoYmwtPmJsX3Jvb3QsIDAsIGJsLT5ibF9yYWRpeCwgYmwtPmJsX3NraXAs IDQpOwo+KyBwcmludGYoIkJMSVNUIGN1cnNvciA9ICUwOGp4IHtcbiIsICh1aW50bWF4X3QpYmwt PmJsX2N1cnNvcik7Cj4rIGJsc3RfcmFkaXhfcHJpbnQoYmwtPmJsX3Jvb3QsIDAsIGJsLT5ibF9y YWRpeCwgNCk7Cj5wcmludGYoIn1cbiIpOwo+fQo+QEAgLTQyNiw5ICs0NDMsOSBAQCBibHN0X2xl YWZfYWxsb2MoYmxtZXRhX3QgKnNjYW4sIGRhZGRyX3QgYmxrLCBpbnQgY291bnQKPsKgICovCj5z dGF0aWMgZGFkZHJfdAo+YmxzdF9tZXRhX2FsbG9jKGJsbWV0YV90ICpzY2FuLCBkYWRkcl90IGJs aywgZGFkZHJfdCBjb3VudCwgZGFkZHJfdCByYWRpeCwKPi3CoMKgwqAgZGFkZHJfdCBza2lwLCBk YWRkcl90IGN1cnNvcikKPivCoMKgwqAgZGFkZHJfdCBjdXJzb3IpCj57Cj4tIGRhZGRyX3QgaSwg bmV4dF9za2lwLCByOwo+KyBkYWRkcl90IGksIG5leHRfc2tpcCwgciwgc2tpcDsKPmludCBjaGls ZDsKPmJvb2wgc2Nhbl9mcm9tX3N0YXJ0Owo+QEAgLTQ0Myw2ICs0NjAsNyBAQCBibHN0X21ldGFf YWxsb2MoYmxtZXRhX3QgKnNjYW4sIGRhZGRyX3QgYmxrLCBkYWRkcl90IGMKPnNjYW4tPmJtX2Jp Z2hpbnQgPSBzY2FuLT51LmJtdV9hdmFpbDsKPnJldHVybiAoU1dBUEJMS19OT05FKTsKPn0KPisg c2tpcCA9IHJhZGl4X3RvX3NraXAocmFkaXgpOwo+bmV4dF9za2lwID0gc2tpcCAvIEJMSVNUX01F VEFfUkFESVg7Cj4vKgo+QEAgLTQ1Niw3ICs0NzQsNyBAQCBibHN0X21ldGFfYWxsb2MoYmxtZXRh X3QgKnNjYW4sIGRhZGRyX3QgYmxrLCBkYWRkcl90IGMKPiogUmVpbml0aWFsaXplIGVhY2ggb2Yg dGhlIG1ldGEgbm9kZSdzIGNoaWxkcmVuLsKgIEFuIEFMTC1GUkVFCj4qIG1ldGEgbm9kZSBjYW5u b3QgaGF2ZSBhIHRlcm1pbmF0b3IgaW4gYW55IHN1YnRyZWUuCj4qLwo+LSBmb3IgKGkgPSAxOyBp IDw9IHNraXA7IGkgKz0gbmV4dF9za2lwKSB7Cj4rIGZvciAoaSA9IDE7IGkgPCBza2lwOyBpICs9 IG5leHRfc2tpcCkgewo+aWYgKG5leHRfc2tpcCA9PSAxKQo+c2NhbltpXS51LmJtdV9iaXRtYXAg PSAodV9kYWRkcl90KS0xOwo+ZWxzZQo+QEAgLTQ3NywxMyArNDk1LDEzIEBAIGJsc3RfbWV0YV9h bGxvYyhibG1ldGFfdCAqc2NhbiwgZGFkZHJfdCBibGssIGRhZGRyX3QgYwo+c2Nhbl9mcm9tX3N0 YXJ0ID0gY3Vyc29yID09IGJsazsKPmNoaWxkID0gKGN1cnNvciAtIGJsaykgLyByYWRpeDsKPmJs ayArPSBjaGlsZCAqIHJhZGl4Owo+LSBmb3IgKGkgPSAxICsgY2hpbGQgKiBuZXh0X3NraXA7IGkg PD0gc2tpcDsgaSArPSBuZXh0X3NraXApIHsKPisgZm9yIChpID0gMSArIGNoaWxkICogbmV4dF9z a2lwOyBpIDwgc2tpcDsgaSArPSBuZXh0X3NraXApIHsKPmlmIChjb3VudCA8PSBzY2FuW2ldLmJt X2JpZ2hpbnQpIHsKPi8qCj4qIFRoZSBhbGxvY2F0aW9uIG1pZ2h0IGZpdCBpbiB0aGUgaSd0aCBz dWJ0cmVlLgo+Ki8KPnIgPSBibHN0X21ldGFfYWxsb2MoJnNjYW5baV0sIGJsaywgY291bnQsIHJh ZGl4LAo+LSDCoMKgwqAgbmV4dF9za2lwIC0gMSwgY3Vyc29yID4gYmxrID8gY3Vyc29yIDogYmxr KTsKPisgwqDCoMKgIGN1cnNvciA+IGJsayA/IGN1cnNvciA6IGJsayk7Cj5pZiAociAhPSBTV0FQ QkxLX05PTkUpIHsKPnNjYW4tPnUuYm11X2F2YWlsIC09IGNvdW50Owo+cmV0dXJuIChyKTsKPkBA IC01NTIsMTUgKzU3MCwxNiBAQCBibHN0X2xlYWZfZnJlZShibG1ldGFfdCAqc2NhbiwgZGFkZHJf dCBibGssIGludCBjb3VudCkKPsKgICovCj5zdGF0aWMgdm9pZAo+YmxzdF9tZXRhX2ZyZWUoYmxt ZXRhX3QgKnNjYW4sIGRhZGRyX3QgZnJlZUJsaywgZGFkZHJfdCBjb3VudCwgZGFkZHJfdCByYWRp eCwKPi3CoMKgwqAgZGFkZHJfdCBza2lwLCBkYWRkcl90IGJsaykKPivCoMKgwqAgZGFkZHJfdCBi bGspCj57Cj4tIGRhZGRyX3QgaSwgbmV4dF9za2lwLCB2Owo+KyBkYWRkcl90IGksIG5leHRfc2tp cCwgc2tpcCwgdjsKPmludCBjaGlsZDsKPmlmIChzY2FuLT5ibV9iaWdoaW50ID09IChkYWRkcl90 KS0xKQo+cGFuaWMoImZyZWVpbmcgaW52YWxpZCByYW5nZSIpOwo+aWYgKHJhZGl4ID09IEJMSVNU X0JNQVBfUkFESVgpCj5yZXR1cm4gKGJsc3RfbGVhZl9mcmVlKHNjYW4sIGZyZWVCbGssIGNvdW50 KSk7Cj4rIHNraXAgPSByYWRpeF90b19za2lwKHJhZGl4KTsKPm5leHRfc2tpcCA9IHNraXAgLyBC TElTVF9NRVRBX1JBRElYOwo+aWYgKHNjYW4tPnUuYm11X2F2YWlsID09IDApIHsKPkBAIC01NzIs NyArNTkxLDcgQEAgYmxzdF9tZXRhX2ZyZWUoYmxtZXRhX3QgKnNjYW4sIGRhZGRyX3QgZnJlZUJs aywgZGFkZHJfCj5zY2FuLT5ibV9iaWdoaW50ID0gY291bnQ7Cj5pZiAoY291bnQgIT0gcmFkaXgp wqAgewo+LSBmb3IgKGkgPSAxOyBpIDw9IHNraXA7IGkgKz0gbmV4dF9za2lwKSB7Cj4rIGZvciAo aSA9IDE7IGkgPCBza2lwOyBpICs9IG5leHRfc2tpcCkgewo+aWYgKHNjYW5baV0uYm1fYmlnaGlu dCA9PSAoZGFkZHJfdCktMSkKPmJyZWFrOwo+c2NhbltpXS5ibV9iaWdoaW50ID0gMDsKPkBAIC02 MDksMTEgKzYyOCwxMSBAQCBibHN0X21ldGFfZnJlZShibG1ldGFfdCAqc2NhbiwgZGFkZHJfdCBm cmVlQmxrLCBkYWRkcl8KPmNoaWxkID0gKGZyZWVCbGsgLSBibGspIC8gcmFkaXg7Cj5ibGsgKz0g Y2hpbGQgKiByYWRpeDsKPmkgPSAxICsgY2hpbGQgKiBuZXh0X3NraXA7Cj4tIHdoaWxlIChpIDw9 IHNraXAgJiYgYmxrIDwgZnJlZUJsayArIGNvdW50KSB7Cj4rIHdoaWxlIChpIDwgc2tpcCAmJiBi bGsgPCBmcmVlQmxrICsgY291bnQpIHsKPnYgPSBibGsgKyByYWRpeCAtIGZyZWVCbGs7Cj5pZiAo diA+IGNvdW50KQo+diA9IGNvdW50Owo+LSBibHN0X21ldGFfZnJlZSgmc2NhbltpXSwgZnJlZUJs aywgdiwgcmFkaXgsIG5leHRfc2tpcCAtIDEsIGJsayk7Cj4rIGJsc3RfbWV0YV9mcmVlKCZzY2Fu W2ldLCBmcmVlQmxrLCB2LCByYWRpeCwgYmxrKTsKPmlmIChzY2FuLT5ibV9iaWdoaW50IDwgc2Nh bltpXS5ibV9iaWdoaW50KQo+c2Nhbi0+Ym1fYmlnaGludCA9IHNjYW5baV0uYm1fYmlnaGludDsK PmNvdW50IC09IHY7Cj5AQCAtNjMwLDEwICs2NDksMTAgQEAgYmxzdF9tZXRhX2ZyZWUoYmxtZXRh X3QgKnNjYW4sIGRhZGRyX3QgZnJlZUJsaywgZGFkZHJfCj7CoCAqIHRyZWUuwqAgVGhlIHNwYWNl IG1heSBub3QgYWxyZWFkeSBiZSBmcmVlIGluIHRoZSBkZXN0aW5hdGlvbi4KPsKgICovCj5zdGF0 aWMgdm9pZAo+LWJsc3RfY29weShibG1ldGFfdCAqc2NhbiwgZGFkZHJfdCBibGssIGRhZGRyX3Qg cmFkaXgsIGRhZGRyX3Qgc2tpcCwKPi3CoMKgwqAgYmxpc3RfdCBkZXN0LCBkYWRkcl90IGNvdW50 KQo+K2Jsc3RfY29weShibG1ldGFfdCAqc2NhbiwgZGFkZHJfdCBibGssIGRhZGRyX3QgcmFkaXgs IGJsaXN0X3QgZGVzdCwKPivCoMKgwqAgZGFkZHJfdCBjb3VudCkKPnsKPi0gZGFkZHJfdCBpLCBu ZXh0X3NraXA7Cj4rIGRhZGRyX3QgaSwgbmV4dF9za2lwLCBza2lwOwo+LyoKPiogTGVhZiBub2Rl Cj5AQCAtNjc3LDIxICs2OTYsMjAgQEAgYmxzdF9jb3B5KGJsbWV0YV90ICpzY2FuLCBkYWRkcl90 IGJsaywgZGFkZHJfdCByYWRpeCwgCj59Cj4tIHJhZGl4IC89IEJMSVNUX01FVEFfUkFESVg7Cj4r IHNraXAgPSByYWRpeF90b19za2lwKHJhZGl4KTsKPm5leHRfc2tpcCA9IHNraXAgLyBCTElTVF9N RVRBX1JBRElYOwo+KyByYWRpeCAvPSBCTElTVF9NRVRBX1JBRElYOwo+LSBmb3IgKGkgPSAxOyBj b3VudCAmJiBpIDw9IHNraXA7IGkgKz0gbmV4dF9za2lwKSB7Cj4rIGZvciAoaSA9IDE7IGNvdW50 ICYmIGkgPCBza2lwOyBpICs9IG5leHRfc2tpcCkgewo+aWYgKHNjYW5baV0uYm1fYmlnaGludCA9 PSAoZGFkZHJfdCktMSkKPmJyZWFrOwo+aWYgKGNvdW50ID49IHJhZGl4KSB7Cj4tIGJsc3RfY29w eSgmc2NhbltpXSwgYmxrLCByYWRpeCwgbmV4dF9za2lwIC0gMSwgZGVzdCwKPi0gwqDCoMKgIHJh ZGl4KTsKPisgYmxzdF9jb3B5KCZzY2FuW2ldLCBibGssIHJhZGl4LCBkZXN0LCByYWRpeCk7Cj5j b3VudCAtPSByYWRpeDsKPn0gZWxzZSB7Cj5pZiAoY291bnQpIHsKPi0gYmxzdF9jb3B5KCZzY2Fu W2ldLCBibGssIHJhZGl4LCBuZXh0X3NraXAgLSAxLAo+LSDCoMKgwqAgZGVzdCwgY291bnQpOwo+ KyBibHN0X2NvcHkoJnNjYW5baV0sIGJsaywgcmFkaXgsIGRlc3QsIGNvdW50KTsKPn0KPmNvdW50 ID0gMDsKPn0KPkBAIC03MzMsOSArNzUxLDkgQEAgYmxzdF9sZWFmX2ZpbGwoYmxtZXRhX3QgKnNj YW4sIGRhZGRyX3QgYmxrLCBpbnQgY291bnQpCj7CoCAqLwo+c3RhdGljIGRhZGRyX3QKPmJsc3Rf bWV0YV9maWxsKGJsbWV0YV90ICpzY2FuLCBkYWRkcl90IGFsbG9jQmxrLCBkYWRkcl90IGNvdW50 LCBkYWRkcl90IHJhZGl4LAo+LcKgwqDCoCBkYWRkcl90IHNraXAsIGRhZGRyX3QgYmxrKQo+K8Kg wqDCoCBkYWRkcl90IGJsaykKPnsKPi0gZGFkZHJfdCBpLCBuYmxrcywgbmV4dF9za2lwLCB2Owo+ KyBkYWRkcl90IGksIG5ibGtzLCBuZXh0X3NraXAsIHNraXAsIHY7Cj5pbnQgY2hpbGQ7Cj5pZiAo c2Nhbi0+Ym1fYmlnaGludCA9PSAoZGFkZHJfdCktMSkKPkBAIC03NTgsNiArNzc2LDcgQEAgYmxz dF9tZXRhX2ZpbGwoYmxtZXRhX3QgKnNjYW4sIGRhZGRyX3QgYWxsb2NCbGssIGRhZGRyCj5zY2Fu LT5ibV9iaWdoaW50ID0gMDsKPnJldHVybiAobmJsa3MpOwo+fQo+KyBza2lwID0gcmFkaXhfdG9f c2tpcChyYWRpeCk7Cj5uZXh0X3NraXAgPSBza2lwIC8gQkxJU1RfTUVUQV9SQURJWDsKPi8qCj5A QCAtNzcxLDcgKzc5MCw3IEBAIGJsc3RfbWV0YV9maWxsKGJsbWV0YV90ICpzY2FuLCBkYWRkcl90 IGFsbG9jQmxrLCBkYWRkcgo+KiBSZWluaXRpYWxpemUgZWFjaCBvZiB0aGUgbWV0YSBub2RlJ3Mg Y2hpbGRyZW4uwqAgQW4gQUxMLUZSRUUKPiogbWV0YSBub2RlIGNhbm5vdCBoYXZlIGEgdGVybWlu YXRvciBpbiBhbnkgc3VidHJlZS4KPiovCj4tIGZvciAoaSA9IDE7IGkgPD0gc2tpcDsgaSArPSBu ZXh0X3NraXApIHsKPisgZm9yIChpID0gMTsgaSA8IHNraXA7IGkgKz0gbmV4dF9za2lwKSB7Cj5p ZiAobmV4dF9za2lwID09IDEpCj5zY2FuW2ldLnUuYm11X2JpdG1hcCA9ICh1X2RhZGRyX3QpLTE7 Cj5lbHNlCj5AQCAtNzg2LDEyICs4MDUsMTEgQEAgYmxzdF9tZXRhX2ZpbGwoYmxtZXRhX3QgKnNj YW4sIGRhZGRyX3QgYWxsb2NCbGssIGRhZGRyCj5jaGlsZCA9IChhbGxvY0JsayAtIGJsaykgLyBy YWRpeDsKPmJsayArPSBjaGlsZCAqIHJhZGl4Owo+aSA9IDEgKyBjaGlsZCAqIG5leHRfc2tpcDsK Pi0gd2hpbGUgKGkgPD0gc2tpcCAmJiBibGsgPCBhbGxvY0JsayArIGNvdW50KSB7Cj4rIHdoaWxl IChpIDwgc2tpcCAmJiBibGsgPCBhbGxvY0JsayArIGNvdW50KSB7Cj52ID0gYmxrICsgcmFkaXgg LSBhbGxvY0JsazsKPmlmICh2ID4gY291bnQpCj52ID0gY291bnQ7Cj4tIG5ibGtzICs9IGJsc3Rf bWV0YV9maWxsKCZzY2FuW2ldLCBhbGxvY0JsaywgdiwgcmFkaXgsCj4tIMKgwqDCoCBuZXh0X3Nr aXAgLSAxLCBibGspOwo+KyBuYmxrcyArPSBibHN0X21ldGFfZmlsbCgmc2NhbltpXSwgYWxsb2NC bGssIHYsIHJhZGl4LCBibGspOwo+Y291bnQgLT0gdjsKPmFsbG9jQmxrICs9IHY7Cj5ibGsgKz0g cmFkaXg7Cj5AQCAtODEwLDkgKzgyOCw5IEBAIGJsc3RfbWV0YV9maWxsKGJsbWV0YV90ICpzY2Fu LCBkYWRkcl90IGFsbG9jQmxrLCBkYWRkcgo+wqAgKiBSQURJWCB2YWx1ZXMgd2UgdXNlLgo+wqAg Ki8KPnN0YXRpYyBkYWRkcl90Cj4tYmxzdF9yYWRpeF9pbml0KGJsbWV0YV90ICpzY2FuLCBkYWRk cl90IHJhZGl4LCBkYWRkcl90IHNraXAsIGRhZGRyX3QgY291bnQpCj4rYmxzdF9yYWRpeF9pbml0 KGJsbWV0YV90ICpzY2FuLCBkYWRkcl90IHJhZGl4LCBkYWRkcl90IGNvdW50KQo+ewo+LSBkYWRk cl90IGksIG1lbWluZGV4LCBuZXh0X3NraXA7Cj4rIGRhZGRyX3QgaSwgbWVtaW5kZXgsIG5leHRf c2tpcCwgc2tpcDsKPm1lbWluZGV4ID0gMDsKPkBAIC04MzksMTcgKzg1NywxOCBAQCBibHN0X3Jh ZGl4X2luaXQoYmxtZXRhX3QgKnNjYW4sIGRhZGRyX3QgcmFkaXgsIGRhZGRyX3QKPnNjYW4tPnUu Ym11X2F2YWlsID0gMDsKPn0KPi0gcmFkaXggLz0gQkxJU1RfTUVUQV9SQURJWDsKPisgc2tpcCA9 IHJhZGl4X3RvX3NraXAocmFkaXgpOwo+bmV4dF9za2lwID0gc2tpcCAvIEJMSVNUX01FVEFfUkFE SVg7Cj4rIHJhZGl4IC89IEJMSVNUX01FVEFfUkFESVg7Cj4tIGZvciAoaSA9IDE7IGkgPD0gc2tp cDsgaSArPSBuZXh0X3NraXApIHsKPisgZm9yIChpID0gMTsgaSA8IHNraXA7IGkgKz0gbmV4dF9z a2lwKSB7Cj5pZiAoY291bnQgPj0gcmFkaXgpIHsKPi8qCj4qIEFsbG9jYXRlIHRoZSBlbnRpcmUg b2JqZWN0Cj4qLwo+bWVtaW5kZXggPSBpICsKPsKgwqDCoCBibHN0X3JhZGl4X2luaXQoKChzY2Fu KSA/ICZzY2FuW2ldIDogTlVMTCksIHJhZGl4LAo+LSDCoMKgwqAgbmV4dF9za2lwIC0gMSwgcmFk aXgpOwo+KyDCoMKgwqAgcmFkaXgpOwo+Y291bnQgLT0gcmFkaXg7Cj59IGVsc2UgaWYgKGNvdW50 ID4gMCkgewo+LyoKPkBAIC04NTcsNyArODc2LDcgQEAgYmxzdF9yYWRpeF9pbml0KGJsbWV0YV90 ICpzY2FuLCBkYWRkcl90IHJhZGl4LCBkYWRkcl90Cj4qLwo+bWVtaW5kZXggPSBpICsKPsKgwqDC oCBibHN0X3JhZGl4X2luaXQoKChzY2FuKSA/ICZzY2FuW2ldIDogTlVMTCksIHJhZGl4LAo+LSDC oMKgwqAgbmV4dF9za2lwIC0gMSwgY291bnQpOwo+KyDCoMKgwqAgY291bnQpOwo+Y291bnQgPSAw Owo+fSBlbHNlIHsKPi8qCj5AQCAtODc2LDEwICs4OTUsOSBAQCBibHN0X3JhZGl4X2luaXQoYmxt ZXRhX3QgKnNjYW4sIGRhZGRyX3QgcmFkaXgsIGRhZGRyX3QKPiNpZmRlZiBCTElTVF9ERUJVRwo+ c3RhdGljIHZvaWQKPi1ibHN0X3JhZGl4X3ByaW50KGJsbWV0YV90ICpzY2FuLCBkYWRkcl90IGJs aywgZGFkZHJfdCByYWRpeCwgZGFkZHJfdCBza2lwLAo+LcKgwqDCoCBpbnQgdGFiKQo+K2Jsc3Rf cmFkaXhfcHJpbnQoYmxtZXRhX3QgKnNjYW4sIGRhZGRyX3QgYmxrLCBkYWRkcl90IHJhZGl4LCBp bnQgdGFiKQo+ewo+LSBkYWRkcl90IGksIG5leHRfc2tpcDsKPisgZGFkZHJfdCBpLCBuZXh0X3Nr aXAsIHNraXA7Cj5pZiAocmFkaXggPT0gQkxJU1RfQk1BUF9SQURJWCkgewo+cHJpbnRmKAo+QEAg LTkyMCwxMSArOTM4LDEyIEBAIGJsc3RfcmFkaXhfcHJpbnQoYmxtZXRhX3QgKnNjYW4sIGRhZGRy X3QgYmxrLCBkYWRkcl90IAo+wqDCoMKgIChsb25nIGxvbmcpc2Nhbi0+Ym1fYmlnaGludAo+KTsK Pi0gcmFkaXggLz0gQkxJU1RfTUVUQV9SQURJWDsKPisgc2tpcCA9IHJhZGl4X3RvX3NraXAocmFk aXgpOwo+bmV4dF9za2lwID0gc2tpcCAvIEJMSVNUX01FVEFfUkFESVg7Cj4rIHJhZGl4IC89IEJM SVNUX01FVEFfUkFESVg7Cj50YWIgKz0gNDsKPi0gZm9yIChpID0gMTsgaSA8PSBza2lwOyBpICs9 IG5leHRfc2tpcCkgewo+KyBmb3IgKGkgPSAxOyBpIDwgc2tpcDsgaSArPSBuZXh0X3NraXApIHsK PmlmIChzY2FuW2ldLmJtX2JpZ2hpbnQgPT0gKGRhZGRyX3QpLTEpIHsKPnByaW50ZigKPsKgwqDC oCAiJSouKnMoJTA4bGx4LCVsbGQpOiBUZXJtaW5hdG9yXG4iLAo+QEAgLTkzMyw3ICs5NTIsNyBA QCBibHN0X3JhZGl4X3ByaW50KGJsbWV0YV90ICpzY2FuLCBkYWRkcl90IGJsaywgZGFkZHJfdCAK Pik7Cj5icmVhazsKPn0KPi0gYmxzdF9yYWRpeF9wcmludCgmc2NhbltpXSwgYmxrLCByYWRpeCwg bmV4dF9za2lwIC0gMSwgdGFiKTsKPisgYmxzdF9yYWRpeF9wcmludCgmc2NhbltpXSwgYmxrLCBy YWRpeCwgdGFiKTsKPmJsayArPSByYWRpeDsKPn0KPnRhYiAtPSA0Owo+TW9kaWZpZWQ6IGhlYWQv c3lzL3N5cy9ibGlzdC5oCj49PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KPi0tLSBoZWFkL3N5cy9zeXMv Ymxpc3QuaCBUdWUgQXVnwqAgMSAwMzo0MDoxOSAyMDE3IChyMzIxODM5KQo+KysrIGhlYWQvc3lz L3N5cy9ibGlzdC5oIFR1ZSBBdWfCoCAxIDAzOjUxOjI2IDIwMTcgKHIzMjE4NDApCj5AQCAtODEs NyArODEsNiBAQCB0eXBlZGVmIHN0cnVjdCBibG1ldGEgewo+dHlwZWRlZiBzdHJ1Y3QgYmxpc3Qg ewo+ZGFkZHJfdCBibF9ibG9ja3M7IC8qIGFyZWEgb2YgY292ZXJhZ2UgKi8KPmRhZGRyX3QgYmxf cmFkaXg7IC8qIGNvdmVyYWdlIHJhZGl4ICovCj4tIGRhZGRyX3QgYmxfc2tpcDsgLyogc3RhcnRp bmcgc2tpcCAqLwo+ZGFkZHJfdCBibF9jdXJzb3I7IC8qIG5leHQtZml0IHNlYXJjaCBzdGFydHMg YXQgKi8KPmJsbWV0YV90ICpibF9yb290OyAvKiByb290IG9mIHJhZGl4IHRyZWUgKi8KPn0gKmJs aXN0X3Q7Cg== From owner-svn-src-head@freebsd.org Tue Aug 1 04:49:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 729E0DCA281; Tue, 1 Aug 2017 04:49:55 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 399A27C2AD; Tue, 1 Aug 2017 04:49:55 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v714nstj030906; Tue, 1 Aug 2017 04:49:54 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v714ns4b030905; Tue, 1 Aug 2017 04:49:54 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201708010449.v714ns4b030905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 1 Aug 2017 04:49:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321842 - head/cddl/contrib/opensolaris/cmd/lockstat X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/cmd/lockstat X-SVN-Commit-Revision: 321842 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 04:49:55 -0000 Author: markj Date: Tue Aug 1 04:49:54 2017 New Revision: 321842 URL: https://svnweb.freebsd.org/changeset/base/321842 Log: Let lockstat use ksyms(4)'s mmap interface. The workaround described in the deleted comment is no longer needed. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/lockstat/sym.c Modified: head/cddl/contrib/opensolaris/cmd/lockstat/sym.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/lockstat/sym.c Tue Aug 1 04:16:52 2017 (r321841) +++ head/cddl/contrib/opensolaris/cmd/lockstat/sym.c Tue Aug 1 04:49:54 2017 (r321842) @@ -194,33 +194,9 @@ symtab_init(void) return (-1); #endif -#ifdef illumos (void) elf_version(EV_CURRENT); elf = elf_begin(fd, ELF_C_READ, NULL); -#else - /* - * XXX - libelf needs to be fixed so it will work with - * non 'ordinary' files like /dev/ksyms. The following - * is a work around for now. - */ - if (elf_version(EV_CURRENT) == EV_NONE) { - close(fd); - return (-1); - } - if (ioctl(fd, KIOCGSIZE, &sz) < 0) { - close(fd); - return (-1); - } - if (ioctl(fd, KIOCGADDR, &ksyms) < 0) { - close(fd); - return (-1); - } - if ((elf = elf_memory(ksyms, sz)) == NULL) { - close(fd); - return (-1); - } -#endif for (cnt = 1; (scn = elf_nextscn(elf, scn)) != NULL; cnt++) { Shdr *shdr = elf_getshdr(scn); From owner-svn-src-head@freebsd.org Tue Aug 1 04:50:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FE06DCA2AA; Tue, 1 Aug 2017 04:50:00 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2322C7C2CD; Tue, 1 Aug 2017 04:49:59 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.16.0.17/8.16.0.17) with SMTP id v714PXRF024207; Mon, 31 Jul 2017 23:26:55 -0500 Received: from mh3.mail.rice.edu (mh3.mail.rice.edu [128.42.199.10]) by pp2.rice.edu with ESMTP id 2c0ndj8rne-1; Mon, 31 Jul 2017 23:26:55 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh3.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh3.mail.rice.edu (Postfix) with ESMTPSA id 4784D40448; Mon, 31 Jul 2017 23:26:54 -0500 (CDT) Subject: Re: svn commit: r321840 - in head/sys: kern sys To: Warner Losh , Alan Cox , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <5lny7794f8b19a2l8vlaannr.1501561229506@email.android.com> From: Alan Cox Message-ID: <5cc355e9-817c-1b61-14f5-59270d7cba9a@rice.edu> Date: Mon, 31 Jul 2017 23:26:53 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <5lny7794f8b19a2l8vlaannr.1501561229506@email.android.com> Content-Language: en-US X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=10 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611190142 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 04:50:00 -0000 On 07/31/2017 23:20, Warner Losh wrote: > > On July 31, 2017, at 9:51 PM, Alan Cox wrote: > > >Author: alc > >Date: Tue Aug 1 03:51:26 2017 > >New Revision: 321840 > >URL: https://svnweb.freebsd.org/changeset/base/321840 > >Log: > > The blist_meta_* routines that process a subtree take arguments > 'radix' and > > 'skip', which denote, respectively, the largest number of blocks > that can be > > managed by a subtree of that height, and one less than the number > of nodes > > in a subtree of that height. This change removes the 'skip' > argument from > > those functions because 'skip' can be trivially computed from 'radius'. > > This change also redefines 'skip' so that it denotes the number of > nodes in > > the subtree, and so changes loop upper bound tests from '<= skip' to '< > > skip' to account for the change. > > > > The 'skip' field is also removed from the blist struct. > > > > The self-test program is changed so that the print command includes the > > cursor value in the output. > > > > Submitted by: Doug Moore > > MFC after: 1 week > >Modified: > > head/sys/kern/subr_blist.c > > head/sys/sys/blist.h > >Modified: head/sys/kern/subr_blist.c > >============================================================================== > >--- head/sys/kern/subr_blist.c Tue Aug 1 03:40:19 2017 (r321839) > >+++ head/sys/kern/subr_blist.c Tue Aug 1 03:51:26 2017 (r321840) > >@@ -123,20 +123,19 @@ void panic(const char *ctl, ...); > >static daddr_t blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int count, > > daddr_t cursor); > >static daddr_t blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t > count, > >- daddr_t radix, daddr_t skip, daddr_t cursor); > >+ daddr_t radix, daddr_t cursor); > >static void blst_leaf_free(blmeta_t *scan, daddr_t relblk, int count); > >static void blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_t > count, > >- daddr_t radix, daddr_t skip, daddr_t blk); > >+ daddr_t radix, daddr_t blk); > >static void blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, > >- daddr_t skip, blist_t dest, daddr_t count); > >+ blist_t dest, daddr_t count); > >static daddr_t blst_leaf_fill(blmeta_t *scan, daddr_t blk, int count); > >static daddr_t blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, > daddr_t count, > >- daddr_t radix, daddr_t skip, daddr_t blk); > >-static daddr_t blst_radix_init(blmeta_t *scan, daddr_t radix, > daddr_t skip, > >- daddr_t count); > >+ daddr_t radix, daddr_t blk); > >+static daddr_t blst_radix_init(blmeta_t *scan, daddr_t radix, > daddr_t count); > >#ifndef _KERNEL > >static void blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, > >- daddr_t skip, int tab); > >+ int tab); > >#endif > >#ifdef _KERNEL > >@@ -144,6 +143,28 @@ static MALLOC_DEFINE(M_SWAP, "SWAP", "Swap space"); > >#endif > >/* > >+ * For a subtree that can represent the state of up to 'radix' > blocks, the > >+ * number of leaf nodes of the subtree is L=radix/BLIST_BMAP_RADIX. > If 'm' > >+ * is short for BLIST_META_RADIX, then for a tree of height h with > L=m**h > >+ * leaf nodes, the total number of tree nodes is 1 + m + m**2 + ... > + m**h, > >+ * or, equivalently, (m**(h+1)-1)/(m-1). This quantity is called 'skip' > >+ * in the 'meta' functions that process subtrees. Since integer > division > >+ * discards remainders, we can express this computation as > >+ * skip = (m * m**h) / (m - 1) > >+ * skip = (m * radix / BLIST_BMAP_RADIX) / (m - 1) > >+ * and if m divides BLIST_BMAP_RADIX, we can simplify further to > >+ * skip = radix / (BLIST_BMAP_RADIX / m * (m - 1)) > >+ * so that a simple integer division is enough for the calculation. > >+ */ > >+static inline daddr_t > >+radix_to_skip(daddr_t radix) > >+{ > >+ > >+ return (radix / > >+ (BLIST_BMAP_RADIX / BLIST_META_RADIX * (BLIST_META_RADIX - 1))); > > I don't think this matches the comment. It is missing parens,no? > > Substitute BLIST_META_RADIX for 'm' in the comment and they match. (The second line of the comment defines 'm' to be BLIST_META_RADIX.) > >+} > >+ > >+/* > > * blist_create() - create a blist capable of handling up to the > specified > > * number of blocks > > * > >@@ -157,18 +178,16 @@ blist_t > >blist_create(daddr_t blocks, int flags) > >{ > >blist_t bl; > >- daddr_t nodes, radix, skip; > >+ daddr_t nodes, radix; > >/* > >- * Calculate radix and skip field used for scanning. > >+ * Calculate the radix field used for scanning. > >*/ > >radix = BLIST_BMAP_RADIX; > >- skip = 0; > >while (radix < blocks) { > >radix *= BLIST_META_RADIX; > >- skip = (skip + 1) * BLIST_META_RADIX; > >} > >- nodes = 1 + blst_radix_init(NULL, radix, skip, blocks); > >+ nodes = 1 + blst_radix_init(NULL, radix, blocks); > >bl = malloc(sizeof(struct blist), M_SWAP, flags); > >if (bl == NULL) > >@@ -176,14 +195,13 @@ blist_create(daddr_t blocks, int flags) > >bl->bl_blocks = blocks; > >bl->bl_radix = radix; > >- bl->bl_skip = skip; > >bl->bl_cursor = 0; > >bl->bl_root = malloc(nodes * sizeof(blmeta_t), M_SWAP, flags); > >if (bl->bl_root == NULL) { > >free(bl, M_SWAP); > >return (NULL); > >} > >- blst_radix_init(bl->bl_root, radix, skip, blocks); > >+ blst_radix_init(bl->bl_root, radix, blocks); > >#if defined(BLIST_DEBUG) > >printf( > >@@ -225,7 +243,7 @@ blist_alloc(blist_t bl, daddr_t count) > >*/ > >while (count <= bl->bl_root->bm_bighint) { > >blk = blst_meta_alloc(bl->bl_root, 0, count, bl->bl_radix, > >- bl->bl_skip, bl->bl_cursor); > >+ bl->bl_cursor); > >if (blk != SWAPBLK_NONE) { > >bl->bl_cursor = blk + count; > >return (blk); > >@@ -257,7 +275,7 @@ void > >blist_free(blist_t bl, daddr_t blkno, daddr_t count) > >{ > >- blst_meta_free(bl->bl_root, blkno, count, bl->bl_radix, > bl->bl_skip, 0); > >+ blst_meta_free(bl->bl_root, blkno, count, bl->bl_radix, 0); > >} > >/* > >@@ -270,8 +288,7 @@ daddr_t > >blist_fill(blist_t bl, daddr_t blkno, daddr_t count) > >{ > >- return (blst_meta_fill(bl->bl_root, blkno, count, bl->bl_radix, > >- bl->bl_skip, 0)); > >+ return (blst_meta_fill(bl->bl_root, blkno, count, bl->bl_radix, 0)); > >} > >/* > >@@ -290,7 +307,7 @@ blist_resize(blist_t *pbl, daddr_t count, int > freenew, > > *pbl = newbl; > > if (count > save->bl_blocks) > > count = save->bl_blocks; > >- blst_copy(save->bl_root, 0, save->bl_radix, save->bl_skip, > newbl, count); > >+ blst_copy(save->bl_root, 0, save->bl_radix, newbl, count); > > /* > > * If resizing upwards, should we free the new space or not? > >@@ -309,8 +326,8 @@ blist_resize(blist_t *pbl, daddr_t count, int > freenew, > >void > >blist_print(blist_t bl) > >{ > >- printf("BLIST {\n"); > >- blst_radix_print(bl->bl_root, 0, bl->bl_radix, bl->bl_skip, 4); > >+ printf("BLIST cursor = %08jx {\n", (uintmax_t)bl->bl_cursor); > >+ blst_radix_print(bl->bl_root, 0, bl->bl_radix, 4); > >printf("}\n"); > >} > >@@ -426,9 +443,9 @@ blst_leaf_alloc(blmeta_t *scan, daddr_t blk, int > count > > */ > >static daddr_t > >blst_meta_alloc(blmeta_t *scan, daddr_t blk, daddr_t count, daddr_t > radix, > >- daddr_t skip, daddr_t cursor) > >+ daddr_t cursor) > >{ > >- daddr_t i, next_skip, r; > >+ daddr_t i, next_skip, r, skip; > >int child; > >bool scan_from_start; > >@@ -443,6 +460,7 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, > daddr_t c > >scan->bm_bighint = scan->u.bmu_avail; > >return (SWAPBLK_NONE); > >} > >+ skip = radix_to_skip(radix); > >next_skip = skip / BLIST_META_RADIX; > >/* > >@@ -456,7 +474,7 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, > daddr_t c > >* Reinitialize each of the meta node's children. An ALL-FREE > >* meta node cannot have a terminator in any subtree. > >*/ > >- for (i = 1; i <= skip; i += next_skip) { > >+ for (i = 1; i < skip; i += next_skip) { > >if (next_skip == 1) > >scan[i].u.bmu_bitmap = (u_daddr_t)-1; > >else > >@@ -477,13 +495,13 @@ blst_meta_alloc(blmeta_t *scan, daddr_t blk, > daddr_t c > >scan_from_start = cursor == blk; > >child = (cursor - blk) / radix; > >blk += child * radix; > >- for (i = 1 + child * next_skip; i <= skip; i += next_skip) { > >+ for (i = 1 + child * next_skip; i < skip; i += next_skip) { > >if (count <= scan[i].bm_bighint) { > >/* > >* The allocation might fit in the i'th subtree. > >*/ > >r = blst_meta_alloc(&scan[i], blk, count, radix, > >- next_skip - 1, cursor > blk ? cursor : blk); > >+ cursor > blk ? cursor : blk); > >if (r != SWAPBLK_NONE) { > >scan->u.bmu_avail -= count; > >return (r); > >@@ -552,15 +570,16 @@ blst_leaf_free(blmeta_t *scan, daddr_t blk, int > count) > > */ > >static void > >blst_meta_free(blmeta_t *scan, daddr_t freeBlk, daddr_t count, > daddr_t radix, > >- daddr_t skip, daddr_t blk) > >+ daddr_t blk) > >{ > >- daddr_t i, next_skip, v; > >+ daddr_t i, next_skip, skip, v; > >int child; > >if (scan->bm_bighint == (daddr_t)-1) > >panic("freeing invalid range"); > >if (radix == BLIST_BMAP_RADIX) > >return (blst_leaf_free(scan, freeBlk, count)); > >+ skip = radix_to_skip(radix); > >next_skip = skip / BLIST_META_RADIX; > >if (scan->u.bmu_avail == 0) { > >@@ -572,7 +591,7 @@ blst_meta_free(blmeta_t *scan, daddr_t freeBlk, > daddr_ > >scan->bm_bighint = count; > >if (count != radix) { > >- for (i = 1; i <= skip; i += next_skip) { > >+ for (i = 1; i < skip; i += next_skip) { > >if (scan[i].bm_bighint == (daddr_t)-1) > >break; > >scan[i].bm_bighint = 0; > >@@ -609,11 +628,11 @@ blst_meta_free(blmeta_t *scan, daddr_t freeBlk, > daddr_ > >child = (freeBlk - blk) / radix; > >blk += child * radix; > >i = 1 + child * next_skip; > >- while (i <= skip && blk < freeBlk + count) { > >+ while (i < skip && blk < freeBlk + count) { > >v = blk + radix - freeBlk; > >if (v > count) > >v = count; > >- blst_meta_free(&scan[i], freeBlk, v, radix, next_skip - 1, blk); > >+ blst_meta_free(&scan[i], freeBlk, v, radix, blk); > >if (scan->bm_bighint < scan[i].bm_bighint) > >scan->bm_bighint = scan[i].bm_bighint; > >count -= v; > >@@ -630,10 +649,10 @@ blst_meta_free(blmeta_t *scan, daddr_t freeBlk, > daddr_ > > * tree. The space may not already be free in the destination. > > */ > >static void > >-blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, daddr_t skip, > >- blist_t dest, daddr_t count) > >+blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix, blist_t dest, > >+ daddr_t count) > >{ > >- daddr_t i, next_skip; > >+ daddr_t i, next_skip, skip; > >/* > >* Leaf node > >@@ -677,21 +696,20 @@ blst_copy(blmeta_t *scan, daddr_t blk, daddr_t > radix, > >} > >- radix /= BLIST_META_RADIX; > >+ skip = radix_to_skip(radix); > >next_skip = skip / BLIST_META_RADIX; > >+ radix /= BLIST_META_RADIX; > >- for (i = 1; count && i <= skip; i += next_skip) { > >+ for (i = 1; count && i < skip; i += next_skip) { > >if (scan[i].bm_bighint == (daddr_t)-1) > >break; > >if (count >= radix) { > >- blst_copy(&scan[i], blk, radix, next_skip - 1, dest, > >- radix); > >+ blst_copy(&scan[i], blk, radix, dest, radix); > >count -= radix; > >} else { > >if (count) { > >- blst_copy(&scan[i], blk, radix, next_skip - 1, > >- dest, count); > >+ blst_copy(&scan[i], blk, radix, dest, count); > >} > >count = 0; > >} > >@@ -733,9 +751,9 @@ blst_leaf_fill(blmeta_t *scan, daddr_t blk, int > count) > > */ > >static daddr_t > >blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, daddr_t count, > daddr_t radix, > >- daddr_t skip, daddr_t blk) > >+ daddr_t blk) > >{ > >- daddr_t i, nblks, next_skip, v; > >+ daddr_t i, nblks, next_skip, skip, v; > >int child; > >if (scan->bm_bighint == (daddr_t)-1) > >@@ -758,6 +776,7 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, > daddr > >scan->bm_bighint = 0; > >return (nblks); > >} > >+ skip = radix_to_skip(radix); > >next_skip = skip / BLIST_META_RADIX; > >/* > >@@ -771,7 +790,7 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, > daddr > >* Reinitialize each of the meta node's children. An ALL-FREE > >* meta node cannot have a terminator in any subtree. > >*/ > >- for (i = 1; i <= skip; i += next_skip) { > >+ for (i = 1; i < skip; i += next_skip) { > >if (next_skip == 1) > >scan[i].u.bmu_bitmap = (u_daddr_t)-1; > >else > >@@ -786,12 +805,11 @@ blst_meta_fill(blmeta_t *scan, daddr_t > allocBlk, daddr > >child = (allocBlk - blk) / radix; > >blk += child * radix; > >i = 1 + child * next_skip; > >- while (i <= skip && blk < allocBlk + count) { > >+ while (i < skip && blk < allocBlk + count) { > >v = blk + radix - allocBlk; > >if (v > count) > >v = count; > >- nblks += blst_meta_fill(&scan[i], allocBlk, v, radix, > >- next_skip - 1, blk); > >+ nblks += blst_meta_fill(&scan[i], allocBlk, v, radix, blk); > >count -= v; > >allocBlk += v; > >blk += radix; > >@@ -810,9 +828,9 @@ blst_meta_fill(blmeta_t *scan, daddr_t allocBlk, > daddr > > * RADIX values we use. > > */ > >static daddr_t > >-blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t skip, daddr_t > count) > >+blst_radix_init(blmeta_t *scan, daddr_t radix, daddr_t count) > >{ > >- daddr_t i, memindex, next_skip; > >+ daddr_t i, memindex, next_skip, skip; > >memindex = 0; > >@@ -839,17 +857,18 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, > daddr_t > >scan->u.bmu_avail = 0; > >} > >- radix /= BLIST_META_RADIX; > >+ skip = radix_to_skip(radix); > >next_skip = skip / BLIST_META_RADIX; > >+ radix /= BLIST_META_RADIX; > >- for (i = 1; i <= skip; i += next_skip) { > >+ for (i = 1; i < skip; i += next_skip) { > >if (count >= radix) { > >/* > >* Allocate the entire object > >*/ > >memindex = i + > > blst_radix_init(((scan) ? &scan[i] : NULL), radix, > >- next_skip - 1, radix); > >+ radix); > >count -= radix; > >} else if (count > 0) { > >/* > >@@ -857,7 +876,7 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, > daddr_t > >*/ > >memindex = i + > > blst_radix_init(((scan) ? &scan[i] : NULL), radix, > >- next_skip - 1, count); > >+ count); > >count = 0; > >} else { > >/* > >@@ -876,10 +895,9 @@ blst_radix_init(blmeta_t *scan, daddr_t radix, > daddr_t > >#ifdef BLIST_DEBUG > >static void > >-blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, daddr_t > skip, > >- int tab) > >+blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, int tab) > >{ > >- daddr_t i, next_skip; > >+ daddr_t i, next_skip, skip; > >if (radix == BLIST_BMAP_RADIX) { > >printf( > >@@ -920,11 +938,12 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, > daddr_t > > (long long)scan->bm_bighint > >); > >- radix /= BLIST_META_RADIX; > >+ skip = radix_to_skip(radix); > >next_skip = skip / BLIST_META_RADIX; > >+ radix /= BLIST_META_RADIX; > >tab += 4; > >- for (i = 1; i <= skip; i += next_skip) { > >+ for (i = 1; i < skip; i += next_skip) { > >if (scan[i].bm_bighint == (daddr_t)-1) { > >printf( > > "%*.*s(%08llx,%lld): Terminator\n", > >@@ -933,7 +952,7 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, > daddr_t > >); > >break; > >} > >- blst_radix_print(&scan[i], blk, radix, next_skip - 1, tab); > >+ blst_radix_print(&scan[i], blk, radix, tab); > >blk += radix; > >} > >tab -= 4; > >Modified: head/sys/sys/blist.h > >============================================================================== > >--- head/sys/sys/blist.h Tue Aug 1 03:40:19 2017 (r321839) > >+++ head/sys/sys/blist.h Tue Aug 1 03:51:26 2017 (r321840) > >@@ -81,7 +81,6 @@ typedef struct blmeta { > >typedef struct blist { > >daddr_t bl_blocks; /* area of coverage */ > >daddr_t bl_radix; /* coverage radix */ > >- daddr_t bl_skip; /* starting skip */ > >daddr_t bl_cursor; /* next-fit search starts at */ > >blmeta_t *bl_root; /* root of radix tree */ > >} *blist_t; > From owner-svn-src-head@freebsd.org Tue Aug 1 04:52:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BB8ADCA4F0; Tue, 1 Aug 2017 04:52:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 457917C7A6; Tue, 1 Aug 2017 04:52:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v714q3fL033820; Tue, 1 Aug 2017 04:52:03 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v714q37t033819; Tue, 1 Aug 2017 04:52:03 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201708010452.v714q37t033819@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 1 Aug 2017 04:52:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321843 - head/cddl/contrib/opensolaris/cmd/lockstat X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/cmd/lockstat X-SVN-Commit-Revision: 321843 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 04:52:04 -0000 Author: markj Date: Tue Aug 1 04:52:03 2017 New Revision: 321843 URL: https://svnweb.freebsd.org/changeset/base/321843 Log: Remove local variables missed in r321842. X-MFC with: r321842 Modified: head/cddl/contrib/opensolaris/cmd/lockstat/sym.c Modified: head/cddl/contrib/opensolaris/cmd/lockstat/sym.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/lockstat/sym.c Tue Aug 1 04:49:54 2017 (r321842) +++ head/cddl/contrib/opensolaris/cmd/lockstat/sym.c Tue Aug 1 04:52:03 2017 (r321843) @@ -175,10 +175,6 @@ symtab_init(void) int fd; int i; int strindex = -1; -#ifndef illumos - void *ksyms; - size_t sz; -#endif #ifndef illumos if ((fd = open("/dev/ksyms", O_RDONLY)) == -1) { From owner-svn-src-head@freebsd.org Tue Aug 1 05:16:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38B39DCB2FE; Tue, 1 Aug 2017 05:16:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F266C386C; Tue, 1 Aug 2017 05:16:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v715GFpL043070; Tue, 1 Aug 2017 05:16:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v715GFtQ043069; Tue, 1 Aug 2017 05:16:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708010516.v715GFtQ043069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 1 Aug 2017 05:16:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321844 - head/sys/boot/zfs X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/sys/boot/zfs X-SVN-Commit-Revision: 321844 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 05:16:16 -0000 Author: ngie Date: Tue Aug 1 05:16:14 2017 New Revision: 321844 URL: https://svnweb.freebsd.org/changeset/base/321844 Log: Clean up style in print_state(..) and pager_printf(..) No functional change intended. MFC after: 3 days Modified: head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Tue Aug 1 04:52:03 2017 (r321843) +++ head/sys/boot/zfs/zfsimpl.c Tue Aug 1 05:16:14 2017 (r321844) @@ -794,6 +794,7 @@ pager_printf(const char *fmt, ...) va_start(args, fmt); vsprintf(line, fmt, args); va_end(args); + return (pager_output(line)); } @@ -804,15 +805,15 @@ pager_printf(const char *fmt, ...) static int print_state(int indent, const char *name, vdev_state_t state) { - int i; char buf[512]; + int i; buf[0] = 0; for (i = 0; i < indent; i++) strcat(buf, " "); strcat(buf, name); + return (pager_printf(STATUS_FORMAT, buf, state_name(state))); - } static int From owner-svn-src-head@freebsd.org Tue Aug 1 05:26:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC386DADC8E; Tue, 1 Aug 2017 05:26:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 812C06452A; Tue, 1 Aug 2017 05:26:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v715QjHn047241; Tue, 1 Aug 2017 05:26:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v715Qje9047240; Tue, 1 Aug 2017 05:26:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708010526.v715Qje9047240@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 1 Aug 2017 05:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321848 - head/tools/tools/bootparttest X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tools/tools/bootparttest X-SVN-Commit-Revision: 321848 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 05:26:46 -0000 Author: ngie Date: Tue Aug 1 05:26:45 2017 New Revision: 321848 URL: https://svnweb.freebsd.org/changeset/base/321848 Log: Chase r315408 with the fourth parameter being removed from disk_open(..) This fixes one part of the build. Modified: head/tools/tools/bootparttest/bootparttest.c Modified: head/tools/tools/bootparttest/bootparttest.c ============================================================================== --- head/tools/tools/bootparttest/bootparttest.c Tue Aug 1 05:26:30 2017 (r321847) +++ head/tools/tools/bootparttest/bootparttest.c Tue Aug 1 05:26:45 2017 (r321848) @@ -124,7 +124,7 @@ main(int argc, char **argv) printf("Mediasize: %ju Bytes (%ju sectors)\nSectorsize: %u Bytes\n", disk.mediasize, disk.mediasize / disk.sectorsize, disk.sectorsize); - if (disk_open(&dev, disk.mediasize, disk.sectorsize, 0) != 0) + if (disk_open(&dev, disk.mediasize, disk.sectorsize) != 0) errx(1, "disk_open failed"); printf("\tdisk0:\n"); disk_print(&dev, "\tdisk0", 1); From owner-svn-src-head@freebsd.org Tue Aug 1 05:26:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CD2FDADC3B; Tue, 1 Aug 2017 05:26:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 284B764473; Tue, 1 Aug 2017 05:26:32 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v715QVRg047187; Tue, 1 Aug 2017 05:26:31 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v715QUDD047185; Tue, 1 Aug 2017 05:26:30 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201708010526.v715QUDD047185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 1 Aug 2017 05:26:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321847 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 X-SVN-Commit-Revision: 321847 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 05:26:32 -0000 Author: markj Date: Tue Aug 1 05:26:30 2017 New Revision: 321847 URL: https://svnweb.freebsd.org/changeset/base/321847 Log: Batch updates to v_wire_count when freeing page table pages on x86. The removed release stores are not needed since stores are totally ordered on i386 and amd64. Reviewed by: alc, kib (previous revision) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11790 Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Aug 1 05:26:20 2017 (r321846) +++ head/sys/amd64/amd64/pmap.c Tue Aug 1 05:26:30 2017 (r321847) @@ -2209,12 +2209,14 @@ static __inline void pmap_free_zero_pages(struct spglist *free) { vm_page_t m; + int count; - while ((m = SLIST_FIRST(free)) != NULL) { + for (count = 0; (m = SLIST_FIRST(free)) != NULL; count++) { SLIST_REMOVE_HEAD(free, plinks.s.ss); /* Preserve the page's PG_ZERO setting. */ vm_page_free_toq(m); } + atomic_subtract_int(&vm_cnt.v_wire_count, count); } /* @@ -2320,13 +2322,6 @@ _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_ pmap_unwire_ptp(pmap, va, pdppg, free); } - /* - * This is a release store so that the ordinary store unmapping - * the page table page is globally performed before TLB shoot- - * down is begun. - */ - atomic_subtract_rel_int(&vm_cnt.v_wire_count, 1); - /* * Put page on a list so that it is released after * *ALL* TLB shootdown is done @@ -3010,7 +3005,6 @@ reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **l SLIST_REMOVE_HEAD(&free, plinks.s.ss); /* Recycle a freed page table page. */ m_pc->wire_count = 1; - atomic_add_int(&vm_cnt.v_wire_count, 1); } pmap_free_zero_pages(&free); return (m_pc); @@ -3678,7 +3672,6 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offse ("pmap_remove_pde: pte page wire count error")); mpte->wire_count = 0; pmap_add_delayed_free_list(mpte, free, FALSE); - atomic_subtract_int(&vm_cnt.v_wire_count, 1); } } return (pmap_unuse_pt(pmap, sva, *pmap_pdpe(pmap, sva), free)); @@ -5622,7 +5615,6 @@ pmap_remove_pages(pmap_t pmap) ("pmap_remove_pages: pte page wire count error")); mpte->wire_count = 0; pmap_add_delayed_free_list(mpte, &free, FALSE); - atomic_subtract_int(&vm_cnt.v_wire_count, 1); } } else { pmap_resident_count_dec(pmap, 1); Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Tue Aug 1 05:26:20 2017 (r321846) +++ head/sys/i386/i386/pmap.c Tue Aug 1 05:26:30 2017 (r321847) @@ -1709,12 +1709,14 @@ static __inline void pmap_free_zero_pages(struct spglist *free) { vm_page_t m; + int count; - while ((m = SLIST_FIRST(free)) != NULL) { + for (count = 0; (m = SLIST_FIRST(free)) != NULL; count++) { SLIST_REMOVE_HEAD(free, plinks.s.ss); /* Preserve the page's PG_ZERO setting. */ vm_page_free_toq(m); } + atomic_subtract_int(&vm_cnt.v_wire_count, count); } /* @@ -1792,13 +1794,6 @@ _pmap_unwire_ptp(pmap_t pmap, vm_page_t m, struct spgl --pmap->pm_stats.resident_count; /* - * This is a release store so that the ordinary store unmapping - * the page table page is globally performed before TLB shoot- - * down is begun. - */ - atomic_subtract_rel_int(&vm_cnt.v_wire_count, 1); - - /* * Do an invltlb to make the invalidated mapping * take effect immediately. */ @@ -2061,11 +2056,11 @@ pmap_release(pmap_t pmap) ("pmap_release: got wrong ptd page")); #endif m->wire_count--; - atomic_subtract_int(&vm_cnt.v_wire_count, 1); vm_page_free_zero(m); } + atomic_subtract_int(&vm_cnt.v_wire_count, NPGPTD); } - + static int kvm_size(SYSCTL_HANDLER_ARGS) { @@ -2324,7 +2319,6 @@ out: SLIST_REMOVE_HEAD(&free, plinks.s.ss); /* Recycle a freed page table page. */ m_pc->wire_count = 1; - atomic_add_int(&vm_cnt.v_wire_count, 1); } pmap_free_zero_pages(&free); return (m_pc); @@ -2873,7 +2867,6 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offse ("pmap_remove_pde: pte page wire count error")); mpte->wire_count = 0; pmap_add_delayed_free_list(mpte, free, FALSE); - atomic_subtract_int(&vm_cnt.v_wire_count, 1); } } } @@ -4593,7 +4586,6 @@ pmap_remove_pages(pmap_t pmap) ("pmap_remove_pages: pte page wire count error")); mpte->wire_count = 0; pmap_add_delayed_free_list(mpte, &free, FALSE); - atomic_subtract_int(&vm_cnt.v_wire_count, 1); } } else { pmap->pm_stats.resident_count--; From owner-svn-src-head@freebsd.org Tue Aug 1 05:29:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAA6EDAE093; Tue, 1 Aug 2017 05:29:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A409C64730; Tue, 1 Aug 2017 05:29:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v715Taur047373; Tue, 1 Aug 2017 05:29:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v715Ta2p047371; Tue, 1 Aug 2017 05:29:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708010529.v715Ta2p047371@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 1 Aug 2017 05:29:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321849 - in head/tools/tools: bootparttest zfsboottest X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in head/tools/tools: bootparttest zfsboottest X-SVN-Commit-Revision: 321849 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 05:29:38 -0000 Author: ngie Date: Tue Aug 1 05:29:36 2017 New Revision: 321849 URL: https://svnweb.freebsd.org/changeset/base/321849 Log: Fix the return type for pager_output(..) in bootparttest and zfsboottest pager_output(..) has always returned int. For some reason (probably the clang 5.0 update), this mismatch now results in an error with CC=clang. MFC after: 1 week Modified: head/tools/tools/bootparttest/stub.c head/tools/tools/zfsboottest/zfsboottest.c Modified: head/tools/tools/bootparttest/stub.c ============================================================================== --- head/tools/tools/bootparttest/stub.c Tue Aug 1 05:26:45 2017 (r321848) +++ head/tools/tools/bootparttest/stub.c Tue Aug 1 05:29:36 2017 (r321849) @@ -44,9 +44,9 @@ Free(void *ptr, const char *file, int line) return (free(ptr)); } -void +int pager_output(const char *s) { - printf("%s", s); + return (printf("%s", s)); } Modified: head/tools/tools/zfsboottest/zfsboottest.c ============================================================================== --- head/tools/tools/zfsboottest/zfsboottest.c Tue Aug 1 05:26:45 2017 (r321848) +++ head/tools/tools/zfsboottest/zfsboottest.c Tue Aug 1 05:29:36 2017 (r321849) @@ -43,11 +43,11 @@ #define NBBY 8 -void +int pager_output(const char *line) { - fprintf(stderr, "%s", line); + return (fprintf(stderr, "%s", line)); } #define ZFS_TEST From owner-svn-src-head@freebsd.org Tue Aug 1 05:34:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2AEDDAEC45; Tue, 1 Aug 2017 05:34:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FEB364F61; Tue, 1 Aug 2017 05:34:05 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v715Y4WU051402; Tue, 1 Aug 2017 05:34:04 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v715Y4js051401; Tue, 1 Aug 2017 05:34:04 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708010534.v715Y4js051401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 1 Aug 2017 05:34:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321850 - head/tools/tools/bootparttest X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tools/tools/bootparttest X-SVN-Commit-Revision: 321850 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 05:34:05 -0000 Author: ngie Date: Tue Aug 1 05:34:04 2017 New Revision: 321850 URL: https://svnweb.freebsd.org/changeset/base/321850 Log: Makefile cleanup - Standardize on SRCTOP instead of .CURDIR-relative paths - Use LIBADD instead of a mix of specifying -lgeom via DPADD/LDADD/LDFLAGS. Specifying -lgeom via LDFLAGS is an especially unnecessary and odd pattern. MFC after: 1 week Modified: head/tools/tools/bootparttest/Makefile Modified: head/tools/tools/bootparttest/Makefile ============================================================================== --- head/tools/tools/bootparttest/Makefile Tue Aug 1 05:29:36 2017 (r321849) +++ head/tools/tools/bootparttest/Makefile Tue Aug 1 05:34:04 2017 (r321850) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../sys/boot/common +.PATH: ${SRCTOP}/sys/boot/common BINDIR?= /usr/bin @@ -9,12 +9,10 @@ MAN= SRCS= bootparttest.c crc32.c stub.c part.c disk.c -CFLAGS= -I${.CURDIR}/../../../sys/boot/common \ +CFLAGS= -I${SRCTOP}/sys/boot/common \ -DLOADER_GPT_SUPPORT -DLOADER_MBR_SUPPORT -DPART_DEBUG \ -DDISK_DEBUG -DPADD+= ${LIBGEOM} -LDADD+= ${LIBGEOM} -LDFLAGS+= -lgeom +LIBADD+= geom .include From owner-svn-src-head@freebsd.org Tue Aug 1 05:23:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0587ADAD617; Tue, 1 Aug 2017 05:23:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C55BB64270; Tue, 1 Aug 2017 05:23:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v715NnjL046997; Tue, 1 Aug 2017 05:23:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v715Nn61046996; Tue, 1 Aug 2017 05:23:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708010523.v715Nn61046996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 1 Aug 2017 05:23:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321845 - head/tools/tools/zfsboottest X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tools/tools/zfsboottest X-SVN-Commit-Revision: 321845 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 05:23:51 -0000 Author: ngie Date: Tue Aug 1 05:23:49 2017 New Revision: 321845 URL: https://svnweb.freebsd.org/changeset/base/321845 Log: Standardize on SRCTOP instead of .CURDIR-relative paths MFC after: 3 days Modified: head/tools/tools/zfsboottest/Makefile Modified: head/tools/tools/zfsboottest/Makefile ============================================================================== --- head/tools/tools/zfsboottest/Makefile Tue Aug 1 05:16:14 2017 (r321844) +++ head/tools/tools/zfsboottest/Makefile Tue Aug 1 05:23:49 2017 (r321845) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../../sys/boot/zfs ${.CURDIR}/../../../sys/cddl/boot/zfs +.PATH: ${SRCTOP}/sys/boot/zfs ${SRCTOP}/sys/cddl/boot/zfs BINDIR?= /usr/bin SCRIPTSDIR?= /usr/bin @@ -11,8 +11,8 @@ SCRIPTSNAME= zfsboottest.sh MAN= CFLAGS= -O1 \ - -I${.CURDIR}/../../../sys/boot/zfs \ - -I${.CURDIR}/../../../sys/cddl/boot/zfs \ + -I${SRCTOP}/sys/boot/zfs \ + -I${SRCTOP}/sys/cddl/boot/zfs \ -I. \ -fdiagnostics-show-option \ -W -Wextra -Wno-sign-compare -Wno-unused-parameter @@ -23,7 +23,7 @@ LIBADD+= md beforedepend zfsboottest.o: machine CLEANFILES+= machine machine: - ln -sf ${.CURDIR}/../../../sys/i386/include machine + ln -sf ${SRCTOP}/sys/i386/include machine .endif .include From owner-svn-src-head@freebsd.org Tue Aug 1 05:26:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29FC0DADBD7; Tue, 1 Aug 2017 05:26:22 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E008764426; Tue, 1 Aug 2017 05:26:21 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v715QKIm047134; Tue, 1 Aug 2017 05:26:20 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v715QK1Z047133; Tue, 1 Aug 2017 05:26:20 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201708010526.v715QK1Z047133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Tue, 1 Aug 2017 05:26:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321846 - head/usr.sbin/ypldap X-SVN-Group: head X-SVN-Commit-Author: araujo X-SVN-Commit-Paths: head/usr.sbin/ypldap X-SVN-Commit-Revision: 321846 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 05:26:22 -0000 Author: araujo Date: Tue Aug 1 05:26:20 2017 New Revision: 321846 URL: https://svnweb.freebsd.org/changeset/base/321846 Log: Log when we have finished pushing users and groups. Obtained from: OpenBSD (rev 1.4) MFC after: 3 weeks. Modified: head/usr.sbin/ypldap/entries.c Modified: head/usr.sbin/ypldap/entries.c ============================================================================== --- head/usr.sbin/ypldap/entries.c Tue Aug 1 05:23:49 2017 (r321845) +++ head/usr.sbin/ypldap/entries.c Tue Aug 1 05:26:20 2017 (r321846) @@ -92,6 +92,7 @@ flatten_entries(struct env *env) free(tmp); } env->sc_user_lines = linep; + log_debug("done pushing users"); wrlen = env->sc_group_line_len; if ((linep = calloc(1, env->sc_group_line_len + 1)) == NULL) { @@ -117,6 +118,7 @@ flatten_entries(struct env *env) wrlen -= len; } env->sc_group_lines = linep; + log_debug("done pushing groups"); } int From owner-svn-src-head@freebsd.org Tue Aug 1 05:39:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64055DAF9EE; Tue, 1 Aug 2017 05:39:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 330A765242; Tue, 1 Aug 2017 05:39:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v715derb051623; Tue, 1 Aug 2017 05:39:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v715depQ051622; Tue, 1 Aug 2017 05:39:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708010539.v715depQ051622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 1 Aug 2017 05:39:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321851 - head/sys/boot/geli X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/sys/boot/geli X-SVN-Commit-Revision: 321851 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 05:39:41 -0000 Author: ngie Date: Tue Aug 1 05:39:40 2017 New Revision: 321851 URL: https://svnweb.freebsd.org/changeset/base/321851 Log: Standardize paths on SRCTOP instead of .CURDIR-relative paths MFC after: 1 week Modified: head/sys/boot/geli/Makefile Modified: head/sys/boot/geli/Makefile ============================================================================== --- head/sys/boot/geli/Makefile Tue Aug 1 05:34:04 2017 (r321850) +++ head/sys/boot/geli/Makefile Tue Aug 1 05:39:40 2017 (r321851) @@ -28,16 +28,16 @@ SRCS+= bcmp.c bcopy.c bzero.c SRCS+= pwgets.c # sha256 and sha512 from sys/crypto -.PATH: ${.CURDIR}/../../crypto/sha2 +.PATH: ${SRCTOP}/sys/crypto/sha2 CFLAGS+= -DWEAK_REFS SRCS+= sha256c.c sha512c.c # md5 from libmd -.PATH: ${.CURDIR}/../../../lib/libmd +.PATH: ${SRCTOP}/lib/libmd SRCS+= md5c.c # AES implementation from sys/crypto -.PATH: ${.CURDIR}/../../crypto/rijndael +.PATH: ${SRCTOP}/sys/crypto/rijndael CFLAGS+= -I${.CURDIR}/../../ CFLAGS+= -I${.CURDIR}/../common/ # Remove asserts @@ -45,7 +45,7 @@ CFLAGS+= -DNDEBUG SRCS+= rijndael-alg-fst.c rijndael-api-fst.c rijndael-api.c # local GELI Implementation -.PATH: ${.CURDIR}/../../geom/eli +.PATH: ${SRCTOP}/sys/geom/eli CFLAGS+= -D_STAND SRCS+= geliboot_crypto.c g_eli_hmac.c g_eli_key.c g_eli_key_cache.c pkcs5v2.c From owner-svn-src-head@freebsd.org Tue Aug 1 06:39:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88F58DB64EE; Tue, 1 Aug 2017 06:39:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 4FFB266B99; Tue, 1 Aug 2017 06:39:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id JAA17505; Tue, 01 Aug 2017 09:39:44 +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 1dcQqG-000OhV-HI; Tue, 01 Aug 2017 09:39:44 +0300 Subject: Re: svn commit: r321849 - in head/tools/tools: bootparttest zfsboottest To: Ngie Cooper , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201708010529.v715Ta2p047371@repo.freebsd.org> From: Andriy Gapon Message-ID: Date: Tue, 1 Aug 2017 09:39:08 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <201708010529.v715Ta2p047371@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 06:39:54 -0000 On 01/08/2017 08:29, Ngie Cooper wrote: > Author: ngie > Date: Tue Aug 1 05:29:36 2017 > New Revision: 321849 > URL: https://svnweb.freebsd.org/changeset/base/321849 > > Log: > Fix the return type for pager_output(..) in bootparttest and zfsboottest > > pager_output(..) has always returned int. For some reason (probably the > clang 5.0 update), this mismatch now results in an error with CC=clang. > > MFC after: 1 week I am not sure if this a correct fix... Return value of pager_output() signifies whether to continue printing, return value of printf is a number of characters printed. > head/tools/tools/bootparttest/stub.c > head/tools/tools/zfsboottest/zfsboottest.c > > Modified: head/tools/tools/bootparttest/stub.c > ============================================================================== > --- head/tools/tools/bootparttest/stub.c Tue Aug 1 05:26:45 2017 (r321848) > +++ head/tools/tools/bootparttest/stub.c Tue Aug 1 05:29:36 2017 (r321849) > @@ -44,9 +44,9 @@ Free(void *ptr, const char *file, int line) > return (free(ptr)); > } > > -void > +int > pager_output(const char *s) > { > > - printf("%s", s); > + return (printf("%s", s)); > } > > Modified: head/tools/tools/zfsboottest/zfsboottest.c > ============================================================================== > --- head/tools/tools/zfsboottest/zfsboottest.c Tue Aug 1 05:26:45 2017 (r321848) > +++ head/tools/tools/zfsboottest/zfsboottest.c Tue Aug 1 05:29:36 2017 (r321849) > @@ -43,11 +43,11 @@ > > #define NBBY 8 > > -void > +int > pager_output(const char *line) > { > > - fprintf(stderr, "%s", line); > + return (fprintf(stderr, "%s", line)); > } > > #define ZFS_TEST > -- Andriy Gapon From owner-svn-src-head@freebsd.org Tue Aug 1 06:51:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92AB5DB7756; Tue, 1 Aug 2017 06:51:30 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x22b.google.com (mail-pg0-x22b.google.com [IPv6:2607:f8b0:400e:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 60261671C6; Tue, 1 Aug 2017 06:51:30 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x22b.google.com with SMTP id 125so4251802pgi.3; Mon, 31 Jul 2017 23:51:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=R6TOO8i+1pyGyximchJxkJVokE4ssxcJPQ+5PQuZGRk=; b=iKk5ERn9EH+g5peg2zaG1XtzN4JbMz4/dZrUwOvTNOV5g98HjKxX2k6rcLMyjf976c 7yQXIaXMIufWjZ/RpoRR7PUznj9tDR9lRjmlMjn1OGbgtepGSVTTaoh6mzQMHuXVQRBY EqizgpsRXzKWSJYpi9RlW9nZbQK5kmw0veNEzIi4uiKTQwicMyfWkirbpRst88qJtYtJ iaQdwL3F42/pcrSdcs9THrwBUWi2QegyAnVv1v6DyzSUXLf4hVhtvinDUOV4iNARGT+B Cj3nMKQ1VKMdCGpa5DHz5mZWU8Lk+FAbfnIDguR596UwV8dv/RtpNUFhB3EVEmt5SmiT ejnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=R6TOO8i+1pyGyximchJxkJVokE4ssxcJPQ+5PQuZGRk=; b=pmAZelmqGvK9FXyQGzqaqb10Oze3ZrwLvWVQ1nfeVxZnDSyTxXXethGDnewubrJDJw /d9LqfIihqeUO8tekDhzrCq379I8t33ePa8lyRTu8wh9z8m+/3awE9HFhi7YYj+MMKl3 emMTRru/fPMyHYVArckOhJMAiisIBokYaxoJOQa2noKN3uwqnGsnKzfbAJTMyh/fOAhK asIJLAyvM1cD6t10P/YdkoW82JQup0NioCDi7xLtKIFCNU60Yn4H3LjmfL4xQYy857Sb bwXk2L2kPvkskdcVWV6U7lLt7NaHEmkcHmORIEayDzlgm6MrTyGKlaz8SLvt5hINY1g6 p3rw== X-Gm-Message-State: AIVw110mF5SHJzql4lPAihQwyiyZ6nPFZsRmEp0Xqiz8c4tu7IFx4y8N X3sAQ4on9hAO4z3psKM= X-Received: by 10.84.241.207 with SMTP id t15mr19747900plm.338.1501570289428; Mon, 31 Jul 2017 23:51:29 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id q80sm42051040pfj.187.2017.07.31.23.51.28 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 31 Jul 2017 23:51:28 -0700 (PDT) Subject: Re: svn commit: r321849 - in head/tools/tools: bootparttest zfsboottest Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_F8D108D6-504F-4974-B02F-C6F859EDE526"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Mon, 31 Jul 2017 23:51:27 -0700 Cc: Ngie Cooper , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Message-Id: References: <201708010529.v715Ta2p047371@repo.freebsd.org> To: Andriy Gapon X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 06:51:30 -0000 --Apple-Mail=_F8D108D6-504F-4974-B02F-C6F859EDE526 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jul 31, 2017, at 23:39, Andriy Gapon wrote: >=20 > On 01/08/2017 08:29, Ngie Cooper wrote: >> Author: ngie >> Date: Tue Aug 1 05:29:36 2017 >> New Revision: 321849 >> URL: https://svnweb.freebsd.org/changeset/base/321849 >>=20 >> Log: >> Fix the return type for pager_output(..) in bootparttest and = zfsboottest >>=20 >> pager_output(..) has always returned int. For some reason (probably = the >> clang 5.0 update), this mismatch now results in an error with = CC=3Dclang. >>=20 >> MFC after: 1 week >=20 > I am not sure if this a correct fix... > Return value of pager_output() signifies whether to continue printing, = return > value of printf is a number of characters printed. You=E2=80=99re right =E2=80=94 it was wrong. Fixed in r321852. Thanks, -Ngie --Apple-Mail=_F8D108D6-504F-4974-B02F-C6F859EDE526 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZgCTvAAoJEPWDqSZpMIYVsDUP/0KWwpRIrElxGwHZfKJlWdwF kD64DnKZgz7uyWxyAJO8/FdD+SKAqyN9sVZsQPnSaP/JU2Yji6j9OMTwzmfy84Fo SayNGrIFBqn7aipeJSbgXt+0C5Q+3uA64fZ4gDCNrnHZlMbPojYziFOy5cpTsdkg mShZJihWYNrA/mS/F06h3RSmEj+ZWBigmXloRceKOiZyhM4Kw55kEMgbQp8cD8nq ZhrXyZnNurIrULOgQaS8I518xhRO5iIpVkNdOo5aGAa7WeK6qiquQbQ4/EXo/T4Y z4KI2sZx0/8TqJaHlN22eoWoIQkN5mQFjCBT9xJzB9yoZSmuxYcPjEYUwdxNmF+f R6p4RdbOFbbRO7lPVC9CoBLwShT9MaW5EMON/K0POTS2akeV/8SLFA5qp8VKjB8x WY0vok2T3WCH4mwJrdzD7+6tpgbZ+kCk4tJOnSrGvHbZqIKH3MXzDVBS4o4wAIQv 2TyXDfUNNwPC2BQL/5hzWzSsQ8UmpSnjS0blFbpe5p6nwsjkyGTiSv7bBiTiQkgn ynt/oCSbdIOd4cpJSfW6/4WMnuAFC46IAWXlJ3BcKRQZEpsCUPd6v0+xNaLG22uw wFNtk/Jpey1JEbWHUH4ZdYxZji8UmPR7Gd0Fp7EayuPNqSI8lDTUHj1f2OLt1+9J 7RH6Sx4Pxoml/YOujSWV =9USm -----END PGP SIGNATURE----- --Apple-Mail=_F8D108D6-504F-4974-B02F-C6F859EDE526-- From owner-svn-src-head@freebsd.org Tue Aug 1 07:05:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8567DBD14A; Tue, 1 Aug 2017 07:05:30 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7587667A26; Tue, 1 Aug 2017 07:05:30 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7175TUS087714; Tue, 1 Aug 2017 07:05:29 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7175TKp087713; Tue, 1 Aug 2017 07:05:29 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201708010705.v7175TKp087713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Tue, 1 Aug 2017 07:05:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321853 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321853 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 07:05:30 -0000 Author: wulf Date: Tue Aug 1 07:05:29 2017 New Revision: 321853 URL: https://svnweb.freebsd.org/changeset/base/321853 Log: Add myself to the calendar Reminded by: mckusick Approved by: gonzo (mentor) Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 06:51:03 2017 (r321852) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 07:05:29 2017 (r321853) @@ -352,6 +352,7 @@ 10/16 Remko Lodder born in Rotterdam, the Netherlands, 1983 10/17 Maho NAKATA born in Osaka, Japan, 1974 10/18 Sheldon Hearn born in Cape Town, Western Cape, South Africa, 1974 +10/18 Vladimir Kondratyev born in Ryazan, USSR, 1975 10/19 Nicholas Souchu born in Suresnes, Hauts-de-Seine, France, 1972 10/19 Nick Barkas born in Longview, Washington, United States, 1981 10/19 Pedro Giffuni born in Bogotá, Colombia, 1968 From owner-svn-src-head@freebsd.org Tue Aug 1 06:51:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AC7FDB76E9; Tue, 1 Aug 2017 06:51:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A2EB670A0; Tue, 1 Aug 2017 06:51:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v716p3I2082581; Tue, 1 Aug 2017 06:51:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v716p3MW082483; Tue, 1 Aug 2017 06:51:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708010651.v716p3MW082483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 1 Aug 2017 06:51:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321852 - in head/tools/tools: bootparttest zfsboottest X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in head/tools/tools: bootparttest zfsboottest X-SVN-Commit-Revision: 321852 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 06:51:04 -0000 Author: ngie Date: Tue Aug 1 06:51:03 2017 New Revision: 321852 URL: https://svnweb.freebsd.org/changeset/base/321852 Log: Fix up r321849 pager_output should return 0 if no more output needs to be paged; non-zero otherwise. MFC after: 1 week MFC with: r321849 Reported by: avg Modified: head/tools/tools/bootparttest/stub.c head/tools/tools/zfsboottest/zfsboottest.c Modified: head/tools/tools/bootparttest/stub.c ============================================================================== --- head/tools/tools/bootparttest/stub.c Tue Aug 1 05:39:40 2017 (r321851) +++ head/tools/tools/bootparttest/stub.c Tue Aug 1 06:51:03 2017 (r321852) @@ -48,5 +48,6 @@ int pager_output(const char *s) { - return (printf("%s", s)); + printf("%s", s); + return (0); } Modified: head/tools/tools/zfsboottest/zfsboottest.c ============================================================================== --- head/tools/tools/zfsboottest/zfsboottest.c Tue Aug 1 05:39:40 2017 (r321851) +++ head/tools/tools/zfsboottest/zfsboottest.c Tue Aug 1 06:51:03 2017 (r321852) @@ -47,7 +47,8 @@ int pager_output(const char *line) { - return (fprintf(stderr, "%s", line)); + fprintf(stderr, "%s", line); + return (0); } #define ZFS_TEST From owner-svn-src-head@freebsd.org Tue Aug 1 08:26:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABFC6DC47CF; Tue, 1 Aug 2017 08:26:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x22f.google.com (mail-pg0-x22f.google.com [IPv6:2607:f8b0:400e:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 760156A3EB; Tue, 1 Aug 2017 08:26:22 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x22f.google.com with SMTP id c14so5220206pgn.0; Tue, 01 Aug 2017 01:26:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=L8GBMqncdF+Nt+3+Yaoju/ipqkahSscAMSdzlQ144M4=; b=JsejKkvBiUDHzwCKLmJzt9oQmMsFNAe7AD+5XqQmfCbNigPIKPZrjnH3uUefkVkAxx wRX1n676fZE68wvOwakXpGjeOMsnL2SxvDhiowLv32Gm+3qwGkg699/us9y7SkgC1vxb yjRlEpthNFSQDQHTzS0GVRkk/Y/UVLgnMRs7UP1SIpORlpu6CXWfuUd7Q+MhP9N7w6Jk 6lldaYay0vjNuUURWQWd3xv/kxKMUw567iXSw4fYH+GcUZMIwutWp/O4iTlDJqdn4J0v lLzOaE2mYmpo62negZ9db6ZQCDnyweSQZuUd4MP5lltEQ5U7C6k94VTA2OPpPjEq42p6 6b8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=L8GBMqncdF+Nt+3+Yaoju/ipqkahSscAMSdzlQ144M4=; b=YhhqircGOP7lhj8FtW7Sh64JhX9dCLOoR9Aw793gggjCq5snGj4OHJnqcxS+zlNLyU rEPEnh4hZnnv96NWEv9ZCYB1/9FjTsvCCY/k3EocfUVpfh0/FFlOLZYeh0hNfaA+78su pNH4e0U8h4uMqGPrwk/ekL07ko3bmITE79d85RIYwrd51dWttkIldiJaSMs8WfosVWGn VnMi4l9m54Wgeg9/mSTb/SW0OO09nrUTJ+0kUxaIohehFGSJctH6eTh1qBxZBFvuk87v Q/FwrR4nuymJeBX0N5LcF157kjApXQ0QSc9pfZ8V5raVUeFsnAN/YLRmqaRCn1rChQSB +b5A== X-Gm-Message-State: AIVw113Vy1xMZ8/JtP5/IBgPm6DLs1tLhPjJzQxlzQsz4wZ3IAnDtk35 rYdGc1AgOdgaCSCyy2M= X-Received: by 10.99.137.194 with SMTP id v185mr18796705pgd.279.1501575981838; Tue, 01 Aug 2017 01:26:21 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id b6sm48733430pgn.67.2017.08.01.01.26.20 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 01 Aug 2017 01:26:21 -0700 (PDT) Subject: Re: svn commit: r321849 - in head/tools/tools: bootparttest zfsboottest Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_8FAFA912-AD0C-4732-A63A-1D85179A117D"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <96cee950-35c2-3971-defa-be4b5493cfd3@FreeBSD.org> Date: Tue, 1 Aug 2017 01:26:19 -0700 Cc: Ngie Cooper , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Message-Id: <21962A53-0DA3-4C10-8075-923948AB83E6@gmail.com> References: <201708010529.v715Ta2p047371@repo.freebsd.org> <96cee950-35c2-3971-defa-be4b5493cfd3@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 08:26:22 -0000 --Apple-Mail=_8FAFA912-AD0C-4732-A63A-1D85179A117D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Aug 1, 2017, at 00:13, Andriy Gapon wrote: =E2=80=A6 > Thank you! > The next problem you are going to encounter would be missing = ldi_get_size(). > I have some WIP for that if you are interested. That=E2=80=99d be great =E2=80=94 please feel free to pass it along :)! -Ngie --Apple-Mail=_8FAFA912-AD0C-4732-A63A-1D85179A117D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZgDssAAoJEPWDqSZpMIYV7/sQAMwRGHc9TWj4AwDFt8bDElpH RxoOV01e4hFITBq+T4eFWDrymcqYrEYCFotW0mzE1u81lj5VgbWvAC2wEXdMjVSN m4ObT0LUBvd1dB7bDbLipzHOhY36xp3HoRsmsRuMjIGRjBbvC+z4k6hOBaplzleG McUXikYr9Y4LntUDadYqtEZr9tNnotLb0BXUm0QLQKTjttgbypqwJrYoec8Rlkfh LgI1H1A1urbbU2oFwZdPO3TXl9dfiHfziic4OtvRfBAevDmsaF8tr+yAm25JdrMd 9z0mm8nV8hJfoGAcH8wvTmvSf2xKxBC4yYPkmZ/qomi2gYwbzG0rdF8wUMkbfO9L PiG7fo6zJ5OOg8L3dgKtAUMDX8ppWzAqUsGfKEzttn93y7CVyGO3zdhhXY5u+CHk LpiPDYEy55R2v+6kb/pHvdDJkLCG9HVsnKURKu/9jdTPRT3p9vcgUWUP5k6ixVcx FEhWrNUgiyplZfFZbAOijE904FuScTqZQkfqMYLpqPtlv7t53fHVEcmEcNweZpMo CnGBo508rMB2EzghU3bRpZt39DFEtGlWsqqhwgxA3jLmx6OKpETeBcRfVWimQUdY L5GFpul+G9GebfTfsZpSfmi1uQZewZN2cVZNBWvOkWXRTaPX1nkWgK3g/ReOt3fB R3kF3BpoIePOv0dhQj+3 =8TSI -----END PGP SIGNATURE----- --Apple-Mail=_8FAFA912-AD0C-4732-A63A-1D85179A117D-- From owner-svn-src-head@freebsd.org Tue Aug 1 07:14:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE60ADBDB7B; Tue, 1 Aug 2017 07:14:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 87BFF67E47; Tue, 1 Aug 2017 07:14:03 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA17592; Tue, 01 Aug 2017 10:14:01 +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 1dcRNR-000Ojb-Eh; Tue, 01 Aug 2017 10:14:01 +0300 Subject: Re: svn commit: r321849 - in head/tools/tools: bootparttest zfsboottest To: "Ngie Cooper (yaneurabeya)" Cc: Ngie Cooper , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201708010529.v715Ta2p047371@repo.freebsd.org> From: Andriy Gapon Message-ID: <96cee950-35c2-3971-defa-be4b5493cfd3@FreeBSD.org> Date: Tue, 1 Aug 2017 10:13:25 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 07:14:04 -0000 On 01/08/2017 09:51, Ngie Cooper (yaneurabeya) wrote: > >> On Jul 31, 2017, at 23:39, Andriy Gapon wrote: >> >> On 01/08/2017 08:29, Ngie Cooper wrote: >>> Author: ngie >>> Date: Tue Aug 1 05:29:36 2017 >>> New Revision: 321849 >>> URL: https://svnweb.freebsd.org/changeset/base/321849 >>> >>> Log: >>> Fix the return type for pager_output(..) in bootparttest and zfsboottest >>> >>> pager_output(..) has always returned int. For some reason (probably the >>> clang 5.0 update), this mismatch now results in an error with CC=clang. >>> >>> MFC after: 1 week >> >> I am not sure if this a correct fix... >> Return value of pager_output() signifies whether to continue printing, return >> value of printf is a number of characters printed. > > You’re right — it was wrong. Fixed in r321852. Thank you! The next problem you are going to encounter would be missing ldi_get_size(). I have some WIP for that if you are interested. -- Andriy Gapon From owner-svn-src-head@freebsd.org Tue Aug 1 09:34:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF3CCDC9B2A; Tue, 1 Aug 2017 09:34:16 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CA5E6D044; Tue, 1 Aug 2017 09:34:16 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v719YFce049134; Tue, 1 Aug 2017 09:34:15 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v719YFvb049133; Tue, 1 Aug 2017 09:34:15 GMT (envelope-from se@FreeBSD.org) Message-Id: <201708010934.v719YFvb049133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Tue, 1 Aug 2017 09:34:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321859 - head/share/vt/keymaps X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/share/vt/keymaps X-SVN-Commit-Revision: 321859 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 09:34:16 -0000 Author: se Date: Tue Aug 1 09:34:15 2017 New Revision: 321859 URL: https://svnweb.freebsd.org/changeset/base/321859 Log: Adjust path to X11 locale files (/usr/X11 has been changed to /usr/local a long ago) in comment. No functional change. Modified: head/share/vt/keymaps/INDEX.keymaps Modified: head/share/vt/keymaps/INDEX.keymaps ============================================================================== --- head/share/vt/keymaps/INDEX.keymaps Tue Aug 1 09:30:21 2017 (r321858) +++ head/share/vt/keymaps/INDEX.keymaps Tue Aug 1 09:34:15 2017 (r321859) @@ -15,7 +15,7 @@ # german.iso.kbd:en:german # # See also setlocal -# /usr/share/locale, /usr/X11/lib/X11/locale/locale.alias +# /usr/share/locale, /usr/local/lib/X11/locale/locale.alias # # # Language support: MENU, FONT @@ -510,9 +510,9 @@ uk.kbd:es:Británico uk.capsctrl.kbd:en:United Kingdom (Caps Lock acts as Left Ctrl) uk.capsctrl.kbd:de:Vereinigtes Königreich (Caps Lock als linke Strg) -#uk.iso-ctrl.kbd:fr:Royaume Uni (caps lock acts as Left Ctrl) -#uk.iso-ctrl.kbd:pt:Reino Unido (caps lock acts as Left Ctrl) -#uk.iso-ctrl.kbd:es:Británico (caps lock acts as Left Ctrl) +#uk.capsctrl.kbd:fr:Royaume Uni (caps lock acts as Left Ctrl) +#uk.capsctrl.kbd:pt:Reino Unido (caps lock acts as Left Ctrl) +#uk.capsctrl.kbd:es:Británico (caps lock acts as Left Ctrl) uk.dvorak.kbd:en:United Kingdom Dvorak uk.dvorak.kbd:de:Vereinigtes Königreich Dvorak From owner-svn-src-head@freebsd.org Tue Aug 1 10:11:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B0A7DCC5E9; Tue, 1 Aug 2017 10:11:21 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AEBC6E5A2; Tue, 1 Aug 2017 10:11:21 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71ABKTg063109; Tue, 1 Aug 2017 10:11:20 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71ABKTL063108; Tue, 1 Aug 2017 10:11:20 GMT (envelope-from mw@FreeBSD.org) Message-Id: <201708011011.v71ABKTL063108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Tue, 1 Aug 2017 10:11:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321860 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321860 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 10:11:21 -0000 Author: mw Date: Tue Aug 1 10:11:20 2017 New Revision: 321860 URL: https://svnweb.freebsd.org/changeset/base/321860 Log: Add myself to calendar Approved by: cognet (mentor) Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 09:34:15 2017 (r321859) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 10:11:20 2017 (r321860) @@ -167,6 +167,7 @@ 05/10 Markus Brueffer born in Gronau, Nordrhein-Westfalen, Germany, 1977 05/11 Kurt Lidl born in Rockville, Maryland, United States, 1968 05/11 Jesus Rodriguez born in Barcelona, Spain, 1972 +05/11 Marcin Wojtas born in Krakow, Poland, 1986 05/11 Roman Kurakin born in Moscow, USSR, 1979 05/11 Ulrich Spoerlein born in Schesslitz, Bayern, Germany, 1981 05/13 Pete Fritchman born in Lansdale, Pennsylvania, United States, 1983 From owner-svn-src-head@freebsd.org Tue Aug 1 09:26:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80130DC9282; Tue, 1 Aug 2017 09:26:23 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C6EB6CABC; Tue, 1 Aug 2017 09:26:23 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v719QMmo044952; Tue, 1 Aug 2017 09:26:22 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v719QM7d044951; Tue, 1 Aug 2017 09:26:22 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201708010926.v719QM7d044951@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 1 Aug 2017 09:26:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321857 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321857 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 09:26:23 -0000 Author: tuexen Date: Tue Aug 1 09:26:22 2017 New Revision: 321857 URL: https://svnweb.freebsd.org/changeset/base/321857 Log: Add myself to calendar. Reminded by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 09:22:10 2017 (r321856) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 09:26:22 2017 (r321857) @@ -401,6 +401,7 @@ 12/04 Mariusz Zaborski born in Skierniewice, Poland, 1990 12/05 Ivan Voras born in Slavonski Brod, Croatia, 1981 12/06 Stefan Farfeleder born in Wien, Austria, 1980 +12/08 Michael Tuexen born in Oldenburg, Germany, 1966 12/11 Ganael Laplanche born in Reims, France, 1980 12/15 James FitzGibbon born in Amersham, Buckinghamshire, United Kingdom, 1974 12/15 Timur I. Bakeyev born in Kazan, Republic of Tatarstan, USSR, 1974 From owner-svn-src-head@freebsd.org Tue Aug 1 09:30:22 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3CBADC962C; Tue, 1 Aug 2017 09:30:22 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 807F56CC00; Tue, 1 Aug 2017 09:30:22 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v719ULXO045151; Tue, 1 Aug 2017 09:30:21 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v719ULnj045148; Tue, 1 Aug 2017 09:30:21 GMT (envelope-from se@FreeBSD.org) Message-Id: <201708010930.v719ULnj045148@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Tue, 1 Aug 2017 09:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321858 - head/share/vt/keymaps X-SVN-Group: head X-SVN-Commit-Author: se X-SVN-Commit-Paths: head/share/vt/keymaps X-SVN-Commit-Revision: 321858 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 09:30:22 -0000 Author: se Date: Tue Aug 1 09:30:21 2017 New Revision: 321858 URL: https://svnweb.freebsd.org/changeset/base/321858 Log: Add alternate Turkish keyboard layout F. The layout and menu texts have been provided by Ufuk Güler, with minor changes for consistency by me. Submitted by: Ufuk Güler MFC after: 1 week Added: head/share/vt/keymaps/tr.f.kbd (contents, props changed) Modified: head/share/vt/keymaps/INDEX.keymaps head/share/vt/keymaps/Makefile Modified: head/share/vt/keymaps/INDEX.keymaps ============================================================================== --- head/share/vt/keymaps/INDEX.keymaps Tue Aug 1 09:26:22 2017 (r321857) +++ head/share/vt/keymaps/INDEX.keymaps Tue Aug 1 09:30:21 2017 (r321858) @@ -31,6 +31,7 @@ MENU:he:ךלש תדלקמה תפש ×ª× ×¨×—×‘ MENU:uk:ОберiÑ‚ÑŒ розкладку клавіатури MENU:el:Επιλέξτε το πληκτÏολόγιο της κονσόλας MENU:hy:Ô¸Õ¶Õ¿Ö€Õ¥Ö„ Õ½Õ¿Õ¥Õ²Õ¶Õ¡Õ·Õ¡Ö€Õ« Õ¤Õ¡Õ½Õ¡Õ¾Õ¸Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¨ +MENU:tr:Klavye düzeninizi seçiniz # # The font definition for "en" is the fall-back font for @@ -210,6 +211,7 @@ de.kbd:de:Deutsch de.kbd:fr:Allemand de.kbd:pt:Alemão de.kbd:es:Alemán +de.kbd:tr:Almanca de.kbd:uk:Ðімецька de.acc.kbd:en:German (accent keys) @@ -488,10 +490,17 @@ ch.macbook.acc.kbd:fr:Suisse-Allemand Macbook/Macbook ch.macbook.acc.kbd:pt:Suiço-Alemão Macbook/Macbook Pro (com acentos) ch.macbook.acc.kbd:es:Germanosuizo Macbook/Macbook Pro (con acentos) -tr.kbd:en:Turkish -tr.kbd:de:Türkisch -tr.kbd:fr:Turc -tr.kbd:uk:Турецька +tr.kbd:en:Turkish (Q) +tr.kbd:de:Türkisch (Q) +tr.kbd:fr:Turc (Q) +tr.kbd:uk:Турецька (Q) +tr.kbd:tr:Türkçe (Q) + +tr.f.kbd:en:Turkish (F) +tr.f.kbd:de:Türkisch (F) +tr.f.kbd:fr:Turc (F) +tr.f.kbd:uk:Турецька (F) +tr.f.kbd:tr:Türkçe (F) uk.kbd:en:United Kingdom uk.kbd:de:Vereinigtes Königreich Modified: head/share/vt/keymaps/Makefile ============================================================================== --- head/share/vt/keymaps/Makefile Tue Aug 1 09:26:22 2017 (r321857) +++ head/share/vt/keymaps/Makefile Tue Aug 1 09:30:21 2017 (r321858) @@ -67,6 +67,7 @@ FILES= INDEX.keymaps \ se.kbd \ si.kbd \ sk.kbd \ + tr.f.kbd \ tr.kbd \ ua.kbd \ ua.shift.alt.kbd \ Added: head/share/vt/keymaps/tr.f.kbd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/vt/keymaps/tr.f.kbd Tue Aug 1 09:30:21 2017 (r321858) @@ -0,0 +1,121 @@ +# Turkish F Keyboard (01-08-2017) +# +# $FreeBSD$ +# +# Ufuk Guler +# ufukguler@yahoo.com +# +# Mobile : +(90) 544 848 39 09 +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '!' '1' '!' 0xB9 0xA1 '1' '!' O + 003 '2' '"' nul '"' 0xB2 nop '2' nul O + 004 '3' '^' nop nop '#' 0xB3 '#' '#' O + 005 '4' '$' nop '$' 0xBC nop '4' '$' O + 006 '5' '%' nop '%' 0xBD nop '5' '%' O + 007 '6' '&' nop '&' 0xBE nop '6' nop O + 008 '7' ''' nop ''' '{' nop nop '&' O + 009 '8' '(' nop '(' '[' nop nop '*' O + 010 '9' ')' '9' ')' ']' 0xB1 gs '(' O + 011 '0' '=' nop '=' '}' 0xB0 nop ')' O + 012 '/' '?' nop nop '\' 0xBF fs nop O + 013 '-' '_' nop nop '|' nop nop '+' O + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 'f' 'F' ack ack '@' nop ack ack C + 017 'g' 'G' bel bel bel bel bel bel C + 018 0x011F 0x011E nop nop nop nop nop nop C + 019 0x0131 'I' ht ht 0xB6 ht ht ht C + 020 'o' 'O' si si 0xF4 0xD4 si si C + 021 'd' 'D' eot eot 0xA5 eot eot eot C + 022 'r' 'R' dc2 dc2 0xAE dc2 dc2 dc2 C + 023 'n' 'N' so so so so so so C + 024 'h' 'H' bs bs 0xB0 bs bs bs C + 025 'p' 'P' dle dle 0xA3 dle dle dle C + 026 'q' 'Q' dc1 dc1 0xA8 dc1 dc1 dc1 C + 027 'w' 'W' etb etb 0x7E nop nop nop C + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'u' 'U' nak nak 0xFB 0xDB nak nak C + 031 'i' 0x0130 nop nop 0xEE 0x0130 nop nop C + 032 'e' 'E' enq enq 0x20AC enq enq enq C + 033 'a' 'A' soh soh 0xE2 0xC2 soh soh C + 034 0xFC 0xDC nop nop 0xFB 0xDB nop nop C + 035 't' 'T' dc4 dc4 0x2122 dc4 dc4 dc4 C + 036 'k' 'K' vt vt vt vt vt vt C + 037 'm' 'M' cr cr 0xB5 cr cr cr C + 038 'l' 'L' ff ff ff ff ff ff C + 039 'y' 'Y' em em 0xB4 em ';' ':' C + 040 0x015F 0x015E ''' '"' '#' 0x02C7 '#' '"' C + 041 '+' '*' nop '*' 0xAC 0xB1 nop nop C + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 'x' 'X' can can 0x60 0x60 can can C + 044 'j' 'J' nl nl 0xAB 'J' nl nl C + 045 0xF6 0xD6 nop nop 0xBB nop nop nop C + 046 'v' 'V' syn 0x60 0x201C syn syn syn C + 047 'c' 'C' etx etx 0xA2 0xA9 etx etx C + 048 0xE7 0xC7 nop nop 0x201D nop nop nop C + 049 'z' 'Z' sub sub sub sub sub sub C + 050 's' 'S' dc3 dc3 0xA7 dc3 dc3 dc3 C + 051 'b' 'B' stx stx 0xD7 stx ',' '<' C + 052 '.' ':' '.' ':' 0xF7 0x2022 '.' '>' C + 053 ',' ';' ',' ';' 0x2022 nop '/' '?' O + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del ',' ',' ',' ',' ',' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '<' '>' '<' '>' '|' 0xA6 nop 0xA6 O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' N + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O From owner-svn-src-head@freebsd.org Tue Aug 1 09:22:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64912DC8D76; Tue, 1 Aug 2017 09:22:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34A0B6C7DB; Tue, 1 Aug 2017 09:22:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v719MAFn044780; Tue, 1 Aug 2017 09:22:10 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v719MAFl044779; Tue, 1 Aug 2017 09:22:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201708010922.v719MAFl044779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 1 Aug 2017 09:22:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321856 - head/sys/dev/ichwd X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/ichwd X-SVN-Commit-Revision: 321856 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 09:22:11 -0000 Author: mav Date: Tue Aug 1 09:22:10 2017 New Revision: 321856 URL: https://svnweb.freebsd.org/changeset/base/321856 Log: Add explicit check for PCI bus to r321720. Reported by: jhb MFC after: 6 days Modified: head/sys/dev/ichwd/ichwd.c Modified: head/sys/dev/ichwd/ichwd.c ============================================================================== --- head/sys/dev/ichwd/ichwd.c Tue Aug 1 09:07:26 2017 (r321855) +++ head/sys/dev/ichwd/ichwd.c Tue Aug 1 09:22:10 2017 (r321856) @@ -536,11 +536,14 @@ static device_t ichwd_find_ich_lpc_bridge(device_t isa, struct ichwd_device **id_p) { struct ichwd_device *id; - device_t isab; + device_t isab, pci; uint16_t devid; /* Check whether parent ISA bridge looks familiar. */ isab = device_get_parent(isa); + pci = device_get_parent(isab); + if (pci == NULL || device_get_devclass(pci) != devclass_find("pci")) + return (NULL); if (pci_get_vendor(isab) != VENDORID_INTEL) return (NULL); devid = pci_get_device(isab); From owner-svn-src-head@freebsd.org Tue Aug 1 10:47:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77E36DCFEDD; Tue, 1 Aug 2017 10:47:45 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4731E70DDB; Tue, 1 Aug 2017 10:47:45 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71Alisw077749; Tue, 1 Aug 2017 10:47:44 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71AliG9077748; Tue, 1 Aug 2017 10:47:44 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201708011047.v71AliG9077748@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Tue, 1 Aug 2017 10:47:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321863 - head/sys/dev/pci X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/dev/pci X-SVN-Commit-Revision: 321863 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 10:47:45 -0000 Author: royger Date: Tue Aug 1 10:47:44 2017 New Revision: 321863 URL: https://svnweb.freebsd.org/changeset/base/321863 Log: pci: fix write order when sizing BARs According to the PCI Local Specification rev. 3.0 in case of a 64-bit BAR both the low and the high parts of the register should be set to ~0 before attempting to read back the size. So far I have found no single device that has problems with the previous approach, but I think it's better to stay on the safe size. This commit should not introduce any functional change. MFC after: 3 weeks Sponsored by: Citrix Systems R&D Reviewed by: jhb Differential revision: https://reviews.freebsd.org/D11750 Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Tue Aug 1 10:46:47 2017 (r321862) +++ head/sys/dev/pci/pci.c Tue Aug 1 10:47:44 2017 (r321863) @@ -2902,13 +2902,21 @@ pci_read_bar(device_t dev, int reg, pci_addr_t *mapp, * Determine the BAR's length by writing all 1's. The bottom * log_2(size) bits of the BAR will stick as 0 when we read * the value back. + * + * NB: according to the PCI Local Bus Specification, rev. 3.0: + * "Software writes 0FFFFFFFFh to both registers, reads them back, + * and combines the result into a 64-bit value." (section 6.2.5.1) + * + * Writes to both registers must be performed before attempting to + * read back the size value. */ + testval = 0; pci_write_config(dev, reg, 0xffffffff, 4); - testval = pci_read_config(dev, reg, 4); if (ln2range == 64) { pci_write_config(dev, reg + 4, 0xffffffff, 4); testval |= (pci_addr_t)pci_read_config(dev, reg + 4, 4) << 32; } + testval |= pci_read_config(dev, reg, 4); /* * Restore the original value of the BAR. We may have reprogrammed From owner-svn-src-head@freebsd.org Tue Aug 1 11:00:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F3B0DD0447; Tue, 1 Aug 2017 11:00:06 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D146B71777; Tue, 1 Aug 2017 11:00:05 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71B0511081997; Tue, 1 Aug 2017 11:00:05 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71B05Aw081996; Tue, 1 Aug 2017 11:00:05 GMT (envelope-from mw@FreeBSD.org) Message-Id: <201708011100.v71B05Aw081996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Tue, 1 Aug 2017 11:00:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321864 - head/sys/contrib/ena-com X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: head/sys/contrib/ena-com X-SVN-Commit-Revision: 321864 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 11:00:06 -0000 Author: mw Date: Tue Aug 1 11:00:04 2017 New Revision: 321864 URL: https://svnweb.freebsd.org/changeset/base/321864 Log: Merge ena-com 1.1.4.2 Update ENA HAL after fixing gcc build in r321861. Submitted by: rlibby Reviewed by: cognet (mentor) Approved by: cognet (mentor) Differential Revision: https://reviews.freebsd.org/D11480 Modified: head/sys/contrib/ena-com/ena_plat.h Directory Properties: head/sys/contrib/ena-com/ (props changed) Modified: head/sys/contrib/ena-com/ena_plat.h ============================================================================== --- head/sys/contrib/ena-com/ena_plat.h Tue Aug 1 10:47:44 2017 (r321863) +++ head/sys/contrib/ena-com/ena_plat.h Tue Aug 1 11:00:04 2017 (r321864) @@ -139,21 +139,12 @@ extern struct ena_bus_space ebs; #define MAX_ERRNO 4095 #define IS_ERR_VALUE(x) unlikely((x) <= (unsigned long)MAX_ERRNO) -#define WARN_ON(condition) \ - do { \ - int __ret_warn_on = !!(condition); \ - if (unlikely(__ret_warn_on)) \ - printf("%s %s", __FUNCTION__, __FILE__); \ - unlikely(__ret_warn_on); \ - } while (0) - #define ENA_ASSERT(cond, format, arg...) \ do { \ if (unlikely(!(cond))) { \ ena_trc_err( \ "Assert failed on %s:%s:%d:" format, \ __FILE__, __func__, __LINE__, ##arg); \ - WARN_ON(cond); \ } \ } while (0) From owner-svn-src-head@freebsd.org Tue Aug 1 11:09:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DB8BDD0735; Tue, 1 Aug 2017 11:09:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B77671C7B; Tue, 1 Aug 2017 11:09:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71B9I1m086113; Tue, 1 Aug 2017 11:09:18 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71B9IN1086112; Tue, 1 Aug 2017 11:09:18 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201708011109.v71B9IN1086112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 1 Aug 2017 11:09:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321865 - head/tools/tools/zfsboottest X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/tools/tools/zfsboottest X-SVN-Commit-Revision: 321865 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 11:09:19 -0000 Author: avg Date: Tue Aug 1 11:09:18 2017 New Revision: 321865 URL: https://svnweb.freebsd.org/changeset/base/321865 Log: zfsboottest: catch up with r316585 and provide ldi_get_size method This method is required for querying file / disk sizes which is needed at least for finding all copies of ZFS VDEV labels. Reported by: ngie MFC after: 1 week Modified: head/tools/tools/zfsboottest/zfsboottest.c Modified: head/tools/tools/zfsboottest/zfsboottest.c ============================================================================== --- head/tools/tools/zfsboottest/zfsboottest.c Tue Aug 1 11:00:04 2017 (r321864) +++ head/tools/tools/zfsboottest/zfsboottest.c Tue Aug 1 11:09:18 2017 (r321865) @@ -28,7 +28,9 @@ /* $FreeBSD$ */ #include +#include #include +#include #include #include #include @@ -49,6 +51,20 @@ pager_output(const char *line) fprintf(stderr, "%s", line); return (0); +} + +uint64_t +ldi_get_size(void *priv) +{ + struct stat sb; + int fd; + + fd = *(int *)priv; + if (fstat(fd, &sb) != 0) + return (0); + if (S_ISCHR(sb.st_mode) && ioctl(fd, DIOCGMEDIASIZE, &sb.st_size) != 0) + return (0); + return (sb.st_size); } #define ZFS_TEST From owner-svn-src-head@freebsd.org Tue Aug 1 11:09:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6705CDD0779; Tue, 1 Aug 2017 11:09:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 1071C71D5C; Tue, 1 Aug 2017 11:09:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA18237; Tue, 01 Aug 2017 14:09:26 +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 1dcV3G-000Ov8-MK; Tue, 01 Aug 2017 14:09:26 +0300 Subject: Re: svn commit: r321849 - in head/tools/tools: bootparttest zfsboottest To: "Ngie Cooper (yaneurabeya)" Cc: Ngie Cooper , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201708010529.v715Ta2p047371@repo.freebsd.org> <96cee950-35c2-3971-defa-be4b5493cfd3@FreeBSD.org> <21962A53-0DA3-4C10-8075-923948AB83E6@gmail.com> From: Andriy Gapon Message-ID: Date: Tue, 1 Aug 2017 14:08:30 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <21962A53-0DA3-4C10-8075-923948AB83E6@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 11:09:30 -0000 On 01/08/2017 11:26, Ngie Cooper (yaneurabeya) wrote: > >> On Aug 1, 2017, at 00:13, Andriy Gapon wrote: > > … > >> Thank you! >> The next problem you are going to encounter would be missing ldi_get_size(). >> I have some WIP for that if you are interested. > > That’d be great — please feel free to pass it along :)! I am going to just go ahead and commit it to make the life easier for all :) -- Andriy Gapon From owner-svn-src-head@freebsd.org Tue Aug 1 11:51:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52BD6DD18D3; Tue, 1 Aug 2017 11:51:36 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1782F733BF; Tue, 1 Aug 2017 11:51:36 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71BpZbR005425; Tue, 1 Aug 2017 11:51:35 GMT (envelope-from mizhka@FreeBSD.org) Received: (from mizhka@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71BpZTE005424; Tue, 1 Aug 2017 11:51:35 GMT (envelope-from mizhka@FreeBSD.org) Message-Id: <201708011151.v71BpZTE005424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mizhka set sender to mizhka@FreeBSD.org using -f From: Michael Zhilin Date: Tue, 1 Aug 2017 11:51:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321866 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: mizhka X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321866 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 11:51:36 -0000 Author: mizhka Date: Tue Aug 1 11:51:35 2017 New Revision: 321866 URL: https://svnweb.freebsd.org/changeset/base/321866 Log: [calendar.freebsd] Add myselft into freebsd.calendar Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 11:09:18 2017 (r321865) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 11:51:35 2017 (r321866) @@ -371,6 +371,7 @@ 10/26 Philip M. Gollucci born in Silver Spring, Maryland, United States, 1979 10/27 Takanori Watanabe born in Numazu, Shizuoka, Japan, 1972 11/05 M. Warner Losh born in Kansas City, Kansas, United States, 1966 +11/06 Michael Zhilin born in Stary Oskol, USSR, 1985 11/08 Joseph R. Mingrone born in Charlottetown, Prince Edward Island, Canada, 1976 11/09 Coleman Kane born in Cincinnati, Ohio, United States, 1980 11/09 Antoine Brodin born in Bagnolet, France, 1981 From owner-svn-src-head@freebsd.org Tue Aug 1 12:53:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96C2BDAB8CD for ; Tue, 1 Aug 2017 12:53:50 +0000 (UTC) (envelope-from gallatin@netflix.com) Received: from mail-qt0-x233.google.com (mail-qt0-x233.google.com [IPv6:2607:f8b0:400d:c0d::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E85075FCA for ; Tue, 1 Aug 2017 12:53:50 +0000 (UTC) (envelope-from gallatin@netflix.com) Received: by mail-qt0-x233.google.com with SMTP id v29so8251358qtv.3 for ; Tue, 01 Aug 2017 05:53:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netflix.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=jBWRATGDZ5jUs5MVQ/lpm+onmF8HCFmpJ5GgOyvTk1w=; b=LLLRkvF6ZtH2dHhgcWFRflzmR3iAxZvWQGcJ52/ZAhIlBS8ojd4LLnbnL16WLtGxTR 2td3P625bK6Ad7ZIB2hANqhl1Z4enrvgUzk2SEOylPeKjhJMXRWr1VYvDEKpHhDgx1Jo pjHnbaDHGCP1/lvKoAlrnEUbZYdaM8+PPrLpw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jBWRATGDZ5jUs5MVQ/lpm+onmF8HCFmpJ5GgOyvTk1w=; b=edmv3gAKgqx5zlQNMMlJcrCW5+DoO5ttMrF3PAq+PqH1GUkgMzEVE+hQJCJQ64AItz 45bx8fya+hrPv6mPiDI+KsNPLUynODYMM8oW71uhm0oSMFBkGvk2sVZVr7SFR7M1RPlE XqgUff0nl6ld1Huc4OXpmgpFtfgxQuBMOLTpyBzgYW+i7J8vF92MWrt2l2zU5d1++GoV fdDc4eoIeFAXVKa9+5yX2lulAMCpDBsAiMFg1KLbBz/lZZPeT3kJP+QhN8W8WfsMMXMZ C1YzxC9laiZUN+Z8NZRyz99u4LRga6nTrWi5DPXmmbhZGUo/bKtzKxckfHJ9KNuGtq3C 5/tA== X-Gm-Message-State: AIVw111+7iqFgab6IFnSVGHN/rSb7AH485AMEFysy4BNedkewl0/ZbKo S+2wBh3o1G1IYqQ81oXHxg== X-Received: by 10.237.35.179 with SMTP id j48mr25711901qtc.59.1501592029179; Tue, 01 Aug 2017 05:53:49 -0700 (PDT) Received: from ?IPv6:2601:5ca:c302:a71:ec4:7aff:fe71:9cc0? ([2601:5ca:c302:a71:ec4:7aff:fe71:9cc0]) by smtp.gmail.com with ESMTPSA id c5sm21282893qkd.27.2017.08.01.05.53.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Aug 2017 05:53:48 -0700 (PDT) Subject: Re: svn commit: r321790 - head/sbin/sysctl To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201707311456.v6VEuZvT083622@repo.freebsd.org> <2175723.Ple0o0TTz8@ralph.baldwin.cx> From: Andrew Gallatin Message-ID: <0519c48d-c6e0-4dd3-9b37-56b0f211e408@netflix.com> Date: Tue, 1 Aug 2017 08:53:47 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <2175723.Ple0o0TTz8@ralph.baldwin.cx> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 12:53:50 -0000 On 07/31/17 13:20, John Baldwin wrote: > On Monday, July 31, 2017 02:56:35 PM Andrew Gallatin wrote: >> Author: gallatin >> Date: Mon Jul 31 14:56:35 2017 >> New Revision: 321790 >> URL: https://urldefense.proofpoint.com/v2/url?u=https-3A__svnweb.freebsd.org_changeset_base_321790&d=DwICAg&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=Ed-falealxPeqc22ehgAUCLh8zlZbibZLSMWJeZro4A&m=6pTZhALOHVMuNxvC0RsuEoG4j_dKwjmuXgxC_aZLwj4&s=iX60l0OLjrKSEAZM1J0IrtmCEX_ZvHr2sMgDd4SdHxg&e= >> >> Log: >> Don't request CTLTYPE_OPAQUE if we can't print them. >> >> The intent is to skip expensive opaque sysctls like tcp_pcblist unless >> they are explicitly requested. Sysctl nodes like this don't show up in >> sysctl -a, but they do generate output that winds up being dropped, >> unless the user specifically requested binary/hex output or opaques. >> >> This reduces the runtime of sysctl in many circumstances on a loaded >> system. It also reduces the likelihood that simply gathering >> diagnostics on a sick machine (stuck lock, etc) via sysctl -a might >> push it over the edge into a total lockup. >> >> Reviewed by: jtl >> Sponsored by: Netflix >> Differential Revision: https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.freebsd.org_D11461&d=DwICAg&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=Ed-falealxPeqc22ehgAUCLh8zlZbibZLSMWJeZro4A&m=6pTZhALOHVMuNxvC0RsuEoG4j_dKwjmuXgxC_aZLwj4&s=b-hXEv1EHJwVhKxSsmgugUz3RBcGHN7oxcMcI3Dbp_c&e= >> >> Modified: >> head/sbin/sysctl/sysctl.c >> >> Modified: head/sbin/sysctl/sysctl.c >> ============================================================================== >> --- head/sbin/sysctl/sysctl.c Mon Jul 31 14:53:03 2017 (r321789) >> +++ head/sbin/sysctl/sysctl.c Mon Jul 31 14:56:35 2017 (r321790) >> @@ -925,6 +925,32 @@ show_var(int *oid, int nlen) >> printf("%s", buf); >> return (0); >> } >> + >> + /* don't fetch opaques that we don't know how to print */ >> + if (ctltype == CTLTYPE_OPAQUE) { >> + if (strcmp(fmt, "S,clockinfo") == 0) >> + func = S_clockinfo; >> + else if (strcmp(fmt, "S,timeval") == 0) >> + func = S_timeval; >> + else if (strcmp(fmt, "S,loadavg") == 0) >> + func = S_loadavg; >> + else if (strcmp(fmt, "S,vmtotal") == 0) >> + func = S_vmtotal; >> +#ifdef __amd64__ >> + else if (strcmp(fmt, "S,efi_map_header") == 0) >> + func = S_efi_map; >> +#endif >> +#if defined(__amd64__) || defined(__i386__) >> + else if (strcmp(fmt, "S,bios_smap_xattr") == 0) >> + func = S_bios_smap_xattr; >> +#endif >> + else { >> + func = NULL; >> + if (!bflag && !oflag && !xflag) >> + return (1); >> + } >> + } >> + >> /* find an estimate of how much we need for this var */ >> if (Bflag) >> j = Bflag; >> @@ -1045,24 +1071,6 @@ show_var(int *oid, int nlen) >> >> case CTLTYPE_OPAQUE: >> i = 0; >> - if (strcmp(fmt, "S,clockinfo") == 0) >> - func = S_clockinfo; >> - else if (strcmp(fmt, "S,timeval") == 0) >> - func = S_timeval; >> - else if (strcmp(fmt, "S,loadavg") == 0) >> - func = S_loadavg; >> - else if (strcmp(fmt, "S,vmtotal") == 0) >> - func = S_vmtotal; >> -#ifdef __amd64__ >> - else if (strcmp(fmt, "S,efi_map_header") == 0) >> - func = S_efi_map; >> -#endif >> -#if defined(__amd64__) || defined(__i386__) >> - else if (strcmp(fmt, "S,bios_smap_xattr") == 0) >> - func = S_bios_smap_xattr; >> -#endif >> - else >> - func = NULL; >> if (func) { > > func should always be true now? > Not if you've set one of the flags to dump raw data. Eg, try sysctl -o net.inet.tcp.pcblist Drew From owner-svn-src-head@freebsd.org Tue Aug 1 14:46:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60EEADAF6D0; Tue, 1 Aug 2017 14:46:25 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2FEBF7E061; Tue, 1 Aug 2017 14:46:25 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id 72so2769738pfl.4; Tue, 01 Aug 2017 07:46:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=fBTCVJycCwuxi6clpLlDH/bOaNs0DtdaQUkazbuVgDk=; b=EgBHl63cdWkroBeDxQ/qAjMLN80zNoWrnKlDFy2VenOwnduPQ4f5z86/nn61HGb21e jGm1FM9sQXkEA9MLvJpzPNthyLAxs3W9oofRr93alrZV009P1LcAqyU3LfNiwE+7wMmv 7Fc0f4zYM7N+3IqNxD8/3XYRE+agxY+yDbAHvVN7vL0OKRy9VeUKOESr2a/E0JvC2pwH 86Qo/8u0R5O2zwpmMlZW8jBGzLs7iGBIVuTA37qreC3iEhusDp+6DHlX8j68Np760LzZ JjbpDzO1iph8xAQiKzddA9mMRblCmtCk/xFd+ehZwyraEcwZYt24KZEaGD87k1OILPzf oFRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=fBTCVJycCwuxi6clpLlDH/bOaNs0DtdaQUkazbuVgDk=; b=ECQbmBD5G+0K35/kAnVCyv9OH5TMLmfkoOMb82PW5oz/13tVSis5hGjfyEOO1+PfFS K17W2MaxV1Rf1BkR0TUSiQ0/bLP/qB9MkaLL2L9TrZGW1BOKxaUV2EJVPDgFaNGCMA3v RHi4ldHsxPiV43FqfgJDXmcYTt1cT79v5cIyEUwCe2s7AoNTmR6+4I2HPoZuqn5+2QJy jI9QmB+0iQQ0ij9+M2D6uuD67xMsjlhh1wTulk85N809z7RtARFTtra8b5yxpYBiDTi0 x8MX+EmZ3OdqUYl8/lySHUgcPuFjZWlci/eG6NK45D1Mz1mh2sOfe77SLWqk1OLe7glr VhJw== X-Gm-Message-State: AIVw113BK+ty3lAZjJkc72mQTI/OUlsrL+6eUUXqk9OmpKWTkCcwOK8o 0dVF7mNImNVkqBhPgXM= X-Received: by 10.98.108.7 with SMTP id h7mr7752920pfc.61.1501598784130; Tue, 01 Aug 2017 07:46:24 -0700 (PDT) Received: from [192.168.20.13] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id a87sm10167383pfg.18.2017.08.01.07.46.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Aug 2017 07:46:22 -0700 (PDT) Content-Type: text/plain; charset=cp932 Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r321849 - in head/tools/tools: bootparttest zfsboottest From: Ngie Cooper X-Mailer: iPhone Mail (14G60) In-Reply-To: Date: Tue, 1 Aug 2017 07:46:21 -0700 Cc: Ngie Cooper , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Content-Transfer-Encoding: quoted-printable Message-Id: <56CA537A-D555-4188-9DDA-B368B23B4099@gmail.com> References: <201708010529.v715Ta2p047371@repo.freebsd.org> <96cee950-35c2-3971-defa-be4b5493cfd3@FreeBSD.org> <21962A53-0DA3-4C10-8075-923948AB83E6@gmail.com> To: Andriy Gapon X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 14:46:25 -0000 > On Aug 1, 2017, at 04:08, Andriy Gapon wrote: >=20 >> On 01/08/2017 11:26, Ngie Cooper (yaneurabeya) wrote: >>=20 >>> On Aug 1, 2017, at 00:13, Andriy Gapon wrote: >>=20 >> =81c >>=20 >>> Thank you! >>> The next problem you are going to encounter would be missing ldi_get_siz= e(). >>> I have some WIP for that if you are interested. >>=20 >> That=81fd be great =81\ please feel free to pass it along :)! >=20 > I am going to just go ahead and commit it to make the life easier for all := ) That works -- please be my guest! Thanks! -Ngie= From owner-svn-src-head@freebsd.org Tue Aug 1 14:54:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5044DAFB0A; Tue, 1 Aug 2017 14:54:26 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94C687E55A; Tue, 1 Aug 2017 14:54:26 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71EsPZE080064; Tue, 1 Aug 2017 14:54:25 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71EsPxt080063; Tue, 1 Aug 2017 14:54:25 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201708011454.v71EsPxt080063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 1 Aug 2017 14:54:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321876 - head X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 321876 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 14:54:26 -0000 Author: ian Date: Tue Aug 1 14:54:25 2017 New Revision: 321876 URL: https://svnweb.freebsd.org/changeset/base/321876 Log: In xdev-links, when installing symlinks to the cross-compiler pieces that includes the OS version (armv6-freebsd12.0-cc, etc), use the OS version of the compiler/world source code, not the version of the build host machine. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Aug 1 14:25:27 2017 (r321875) +++ head/Makefile.inc1 Tue Aug 1 14:54:25 2017 (r321876) @@ -2759,9 +2759,6 @@ CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDDESTDIR}/u CD2MAKE+= BUILD_TOOLS_META=.NOMETA .endif XDDESTDIR=${DESTDIR}/${XDTP} -.if !defined(OSREL) -OSREL!= uname -r | sed -e 's/[-(].*//' -.endif .ORDER: xdev-build xdev-install xdev-links xdev: xdev-build xdev-install .PHONY @@ -2855,7 +2852,7 @@ xdev-links: .PHONY ln -sf ../../${XDTP}/usr/bin/$$i \ ../../../../usr/bin/${XDDIR}-$$i; \ ln -sf ../../${XDTP}/usr/bin/$$i \ - ../../../../usr/bin/${XDDIR}${OSREL}-$$i; \ + ../../../../usr/bin/${XDDIR}${_REVISION}-$$i; \ done .else xdev xdev-build xdev-install xdev-links: .PHONY From owner-svn-src-head@freebsd.org Tue Aug 1 16:05:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96D3EDB1D01; Tue, 1 Aug 2017 16:05:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 704C481360; Tue, 1 Aug 2017 16:05:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71G5NnN009048; Tue, 1 Aug 2017 16:05:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71G5N0k009047; Tue, 1 Aug 2017 16:05:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201708011605.v71G5N0k009047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 1 Aug 2017 16:05:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321879 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 321879 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 16:05:24 -0000 Author: gjb Date: Tue Aug 1 16:05:23 2017 New Revision: 321879 URL: https://svnweb.freebsd.org/changeset/base/321879 Log: Update doceng, re, security-officer, clusteradm, webmaster and donations entries. Requested by: sevan Sponsored by: The FreeBSD Foundation Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Tue Aug 1 16:00:21 2017 (r321878) +++ head/share/misc/organization.dot Tue Aug 1 16:05:23 2017 (r321879) @@ -28,15 +28,15 @@ _misc [label="Miscellaneous Hats"] core [label="Core Team\ncore@FreeBSD.org\nallanjude, bapt, bcr,\nbenno, emaste, gnn,\nhrs, jhb, kmoore"] coresecretary [label="Core Team Secretary\ncore-secretary@FreeBSD.org\nmatthew"] doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"] -doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor, hrs"] +doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor, hrs,\nwblock"] portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] portmgr [label="Port Management Team\nportmgr@FreeBSD.org\nadamw, antoine, bapt, bdrewery\nfeld, mat, rene, swills"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\nrene"] -re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith"] +re [label="Primary Release Engineering Team\nre@FreeBSD.org\ngjb, kib,\nbdrewery, blackend,\nrgrimes, delphij,\nhrs, glebius,\nmarius, rwatson"] secteam [label="Security Team\nsecteam@FreeBSD.org\ndelphij,\ndes, gavin, gjb,\nglebius, remko"] portssecteam [label="Ports Security Team\nports-secteam@FreeBSD.org\ndelphij, amdmi3, eadler, feld, jgh, junovitch, rea, sbz, simon, swills, zi"] secteamsecretary [label="Security Team Secretary\nsecteam-secretary@FreeBSD.org\nremko"] -securityofficer [label="Security Officer Team\nsecurity-officer@FreeBSD.org\ncperciva, simon, nectar"] +securityofficer [label="Security Officer Team\nsecurity-officer@FreeBSD.org\ndelphij, des,\ngavin, gjb,\nglebius, remko"] srccommitters [label="Src Committers\nsrc-committers@FreeBSD.org"] # Admin teams go here alphabetically sorted @@ -44,7 +44,7 @@ srccommitters [label="Src Committers\nsrc-committers@F accounts [label="Accounts Team\naccounts@FreeBSD.org\nmarkm, simon, kensmith,\ndhw"] backups [label="Backup Administrators\nbackups@FreeBSD.org\nsimon, kensmith,\ndhw"] bugmeister [label="Bugmeister Team\nbugmeister@FreeBSD.org\neadler, gavin, gonzo"] -clusteradm [label="Cluster Administrators\nclusteradm@FreeBSD.org\nbrd, simon, ps,\nkensmith, peter"] +clusteradm [label="Cluster Administrators\nclusteradm@FreeBSD.org\nallanjude, brd,\ndhw, gavin,\ngjb, peter,\nsbruno, simon,\nzi"] cvsupmaster [label="CVSup Mirror Site Coordinators\ncvsup-master@FreeBSD.org\nkuriyama, jdp,\nkensmith"] dnsadm [label="DNS Administrators\ndnsadm@FreeBSD.org\nbillf, dg, ps,\nkensmith, peter"] mirroradmin [label="FTP/WWW Mirror Site Coordinators\nmirror-admin@FreeBSD.org\nkuriyama, kensmith"] @@ -52,11 +52,11 @@ ncvs [label="CVS src Repository Managers\nncvs@FreeBSD perforceadmin [label="Perforce Repository Administrators\nperforce-admin@FreeBSD.org\nscottl, kensmith, gordon,\nrwatson, peter, dhw"] postmaster [label="Postmaster Team\npostmaster@FreeBSD.org\njmb, brd, sahil, dhw"] refadm [label="Reference Systems Administrators\nrefadm@FreeBSD.org\njake, billf, markm, simon,\nobrien, ps, kensmith,\npeter, dhw"] -webmaster [label="Webmaster Team\nwebmaster@FreeBSD.org\nnik, kuriyama, simon,\njesusr, wosch"] +webmaster [label="Webmaster Team\nwebmaster@FreeBSD.org\ngjb, wblock, blackend,\ngabor, hrs, wosch"] # Misc hats go here alphabetically sorted -donations [label="Donations Team\ndonations@FreeBSD.org\ngjb, wilko, gahr, pgolluci,\nobrien, trhodes, ds,\nrwatson"] +donations [label="Donations Team\ndonations@FreeBSD.org\nwilko, gahr, pgolluci,\nobrien, trhodes, ds,\nrwatson"] marketing [label="Marketing Team\nmarketing@FreeBSD.org\nSteven Beedle, Denise Ebery, deb,\njkoshy, Dru Lavigne, mwlucas, imp,\nKris Moore, murray, mattt,\nJeremy C. Reed, rwatson"] vendorrelations [label="Vendor Relations\nvendor-relations@FreeBSD.org\ncore, FreeBSD Foundation"] From owner-svn-src-head@freebsd.org Tue Aug 1 16:15:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0372DB1FB7; Tue, 1 Aug 2017 16:15:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D7C68194E; Tue, 1 Aug 2017 16:15:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71GF8Fo013176; Tue, 1 Aug 2017 16:15:08 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71GF8Yg013175; Tue, 1 Aug 2017 16:15:08 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201708011615.v71GF8Yg013175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Aug 2017 16:15:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321880 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 321880 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 16:15:09 -0000 Author: bdrewery Date: Tue Aug 1 16:15:08 2017 New Revision: 321880 URL: https://svnweb.freebsd.org/changeset/base/321880 Log: CCACHE_BUILD: Allow setting CCACHE_BUILD_TYPE=wrapper. This uses the /usr/local/libexec/ccache/ wrappers rather than modifying CC to be '/usr/local/bin/ccache cc'. Some forms of compilation do not support the 'command' type. Sponsored by: Dell EMC Isilon Modified: head/share/mk/bsd.compiler.mk Modified: head/share/mk/bsd.compiler.mk ============================================================================== --- head/share/mk/bsd.compiler.mk Tue Aug 1 16:05:23 2017 (r321879) +++ head/share/mk/bsd.compiler.mk Tue Aug 1 16:15:08 2017 (r321880) @@ -31,6 +31,9 @@ ____: .include +# command = /usr/local/bin/ccache cc ... +# wrapper = /usr/local/libexec/ccache/cc ... +CCACHE_BUILD_TYPE?= command # Handle ccache after CC is determined, but not if CC/CXX are already # overridden with a manual setup. .if ${MK_CCACHE_BUILD:Uno} == "yes" && \ @@ -65,19 +68,23 @@ CCACHE_COMPILERCHECK?= content CCACHE_COMPILERCHECK?= mtime .endif .export CCACHE_COMPILERCHECK -# Remove ccache from the PATH to prevent double calls and wasted CPP/LD time. -PATH:= ${PATH:C,:?${CCACHE_WRAPPER_PATH}(/world)?(:$)?,,g} # Ensure no bogus CCACHE_PATH leaks in which might avoid the in-tree compiler. .if !empty(CCACHE_PATH) CCACHE_PATH= .export CCACHE_PATH .endif +.if ${CCACHE_BUILD_TYPE} == "command" +# Remove ccache from the PATH to prevent double calls and wasted CPP/LD time. +PATH:= ${PATH:C,:?${CCACHE_WRAPPER_PATH}(/world)?(:$)?,,g} # Override various toolchain vars. .for var in CC CXX HOST_CC HOST_CXX .if defined(${var}) && ${${var}:M${CCACHE_BIN}} == "" ${var}:= ${CCACHE_BIN} ${${var}} .endif .endfor +.elif empty(PATH:M*${CCACHE_WRAPPER_PATH}*) +PATH:= ${CCACHE_WRAPPER_PATH}:${PATH} +.endif # ${CCACHE_BUILD_TYPE} == "command" # GCC does not need the CCACHE_CPP2 hack enabled by default in devel/ccache. # The port enables it due to ccache passing preprocessed C to clang # which fails with -Wparentheses-equality, -Wtautological-compare, and From owner-svn-src-head@freebsd.org Tue Aug 1 16:20:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91D41DB2124; Tue, 1 Aug 2017 16:20:34 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AD0581C39; Tue, 1 Aug 2017 16:20:34 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71GKXBM013409; Tue, 1 Aug 2017 16:20:33 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71GKX35013408; Tue, 1 Aug 2017 16:20:33 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201708011620.v71GKX35013408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Tue, 1 Aug 2017 16:20:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321881 - head/share/examples/ppp X-SVN-Group: head X-SVN-Commit-Author: sevan X-SVN-Commit-Paths: head/share/examples/ppp X-SVN-Commit-Revision: 321881 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 16:20:34 -0000 Author: sevan (doc committer) Date: Tue Aug 1 16:20:33 2017 New Revision: 321881 URL: https://svnweb.freebsd.org/changeset/base/321881 Log: For the udp-client example, instruct user to add an entry for a udp based service. For tcp-client & udp-client, use the same port in configuration snippet as used in the comment prior to remove any ambiguity on the port number which needs to be specified. Reviewed by: bcr (mentor) wblock (mentor) Approved by: gavin MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D9830 Modified: head/share/examples/ppp/ppp.conf.sample Modified: head/share/examples/ppp/ppp.conf.sample ============================================================================== --- head/share/examples/ppp/ppp.conf.sample Tue Aug 1 16:15:08 2017 (r321880) +++ head/share/examples/ppp/ppp.conf.sample Tue Aug 1 16:20:33 2017 (r321881) @@ -523,7 +523,7 @@ compuserve: # such as `rlogin' is involved, you may need to ``set escape 0xff'' # tcp-client: - set device tcpsrv.mynet:1234 + set device tcpsrv.mynet:6671 set dial set login set ifaddr 10.0.5.1 10.0.4.1 255.255.255.0 @@ -538,10 +538,10 @@ tcp-server: # # and this in /etc/services: # -# ppp 6671/tcp +# ppp 6671/udp # udp-client: - set device udpsrv.mynet:1234/udp + set device udpsrv.mynet:6671/udp set dial set login set ifaddr 10.0.5.1 10.0.4.1 255.255.255.0 From owner-svn-src-head@freebsd.org Tue Aug 1 16:41:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51637DB2C57; Tue, 1 Aug 2017 16:41:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F3FE827FA; Tue, 1 Aug 2017 16:41:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71GfH7T025402; Tue, 1 Aug 2017 16:41:17 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71GfHKq025401; Tue, 1 Aug 2017 16:41:17 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201708011641.v71GfHKq025401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Aug 2017 16:41:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321882 - head X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 321882 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 16:41:18 -0000 Author: bdrewery Date: Tue Aug 1 16:41:17 2017 New Revision: 321882 URL: https://svnweb.freebsd.org/changeset/base/321882 Log: NO_CLEAN: No need to run delete-old if the directories don't exist. X-MFC-With: r321443 MFC after: 1 month Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Aug 1 16:20:33 2017 (r321881) +++ head/Makefile.inc1 Tue Aug 1 16:41:17 2017 (r321882) @@ -760,10 +760,12 @@ _worldtmp: .PHONY rm -rf ${LIBCOMPATTMP} .endif .else +.if exists(${WORLDTMP}) @echo ">>> Deleting stale files in build tree..." ${_+_}cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \ delete-old delete-old-libs >/dev/null -.if defined(LIBCOMPAT) +.endif +.if defined(LIBCOMPAT) && exists(${LIBCOMPATTMP}) ${_+_}cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \ DESTDIR=${LIBCOMPATTMP} \ delete-old delete-old-libs >/dev/null From owner-svn-src-head@freebsd.org Tue Aug 1 17:50:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B570DB5404; Tue, 1 Aug 2017 17:50:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5277F313D; Tue, 1 Aug 2017 17:50:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71HoSeW055272; Tue, 1 Aug 2017 17:50:28 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71HoSn6055271; Tue, 1 Aug 2017 17:50:28 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201708011750.v71HoSn6055271@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 1 Aug 2017 17:50:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321884 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 321884 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 17:50:29 -0000 Author: markj Date: Tue Aug 1 17:50:28 2017 New Revision: 321884 URL: https://svnweb.freebsd.org/changeset/base/321884 Log: Fix a witness assertion that fires when a lock type's class changes. When all instances of a lock type are destroyed (for example, after a module unload), the corresponding witness entry remains associated with that lock type. In this case, we shouldn't panic if a new instance of the lock type is created and its lock class does not match that recorded in the witness entry. Reviewed by: jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11788 Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Tue Aug 1 16:48:33 2017 (r321883) +++ head/sys/kern/subr_witness.c Tue Aug 1 17:50:28 2017 (r321884) @@ -1850,11 +1850,13 @@ enroll(const char *description, struct lock_class *loc found: w->w_refcount++; mtx_unlock_spin(&w_mtx); - if (lock_class != w->w_class) + if (w->w_refcount == 1) + w->w_class = lock_class; + else if (lock_class != w->w_class) kassert_panic( - "lock (%s) %s does not match earlier (%s) lock", - description, lock_class->lc_name, - w->w_class->lc_name); + "lock (%s) %s does not match earlier (%s) lock", + description, lock_class->lc_name, + w->w_class->lc_name); return (w); } From owner-svn-src-head@freebsd.org Tue Aug 1 18:05:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA00EDB59A4; Tue, 1 Aug 2017 18:05:20 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A96873CA9; Tue, 1 Aug 2017 18:05:20 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71I5J2o064017; Tue, 1 Aug 2017 18:05:19 GMT (envelope-from lev@FreeBSD.org) Received: (from lev@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71I5JDd064016; Tue, 1 Aug 2017 18:05:19 GMT (envelope-from lev@FreeBSD.org) Message-Id: <201708011805.v71I5JDd064016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lev set sender to lev@FreeBSD.org using -f From: "Lev A. Serebryakov" Date: Tue, 1 Aug 2017 18:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321885 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: lev X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321885 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 18:05:21 -0000 Author: lev (ports committer) Date: Tue Aug 1 18:05:19 2017 New Revision: 321885 URL: https://svnweb.freebsd.org/changeset/base/321885 Log: Add myself to the calendar.freebsd Reported by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 17:50:28 2017 (r321884) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 18:05:19 2017 (r321885) @@ -8,6 +8,7 @@ #define _calendar_freebsd_ 01/01 Dimitry Andric born in Utrecht, the Netherlands, 1969 +01/01 Lev Serebryakov born in Leningrad, USSR, 1979 01/01 Alexander Langer born in Duesseldorf, Nordrhein-Westfalen, Germany, 1981 01/02 Ion-Mihai "IOnut" Tetcu born in Bucharest, Romania, 1980 01/02 Patrick Li born in Beijing, People's Republic of China, 1985 From owner-svn-src-head@freebsd.org Tue Aug 1 18:25:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09A43DB643D; Tue, 1 Aug 2017 18:25:06 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3D9F63C88; Tue, 1 Aug 2017 18:25:05 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71IP4OR072122; Tue, 1 Aug 2017 18:25:04 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71IP4j8072121; Tue, 1 Aug 2017 18:25:04 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201708011825.v71IP4j8072121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Tue, 1 Aug 2017 18:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321886 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321886 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 18:25:06 -0000 Author: mckusick Date: Tue Aug 1 18:25:04 2017 New Revision: 321886 URL: https://svnweb.freebsd.org/changeset/base/321886 Log: Add Anne Dickison. Requested by: Anne Dickison Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 18:05:19 2017 (r321885) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 18:25:04 2017 (r321886) @@ -22,6 +22,7 @@ 01/12 Kristof Provost born in Aalst, Belgium, 1983 01/13 Ruslan Bukin born in Dudinka, Russian Federation, 1985 01/14 Yi-Jheng Lin born in Taichung, Taiwan, Republic of China, 1985 +01/15 Anne Dickison born in Madison, Indiana, United States, 1976 01/16 Ariff Abdullah born in Kuala Lumpur, Malaysia, 1978 01/16 Dmitry Sivachenko born in Moscow, USSR, 1978 01/16 Vanilla I. Shu born in Taipei, Taiwan, Republic of China, 1978 @@ -357,7 +358,7 @@ 10/18 Vladimir Kondratyev born in Ryazan, USSR, 1975 10/19 Nicholas Souchu born in Suresnes, Hauts-de-Seine, France, 1972 10/19 Nick Barkas born in Longview, Washington, United States, 1981 -10/19 Pedro Giffuni born in Bogotá, Colombia, 1968 +10/19 Pedro Giffuni born in Bogoto, Colombia, 1968 10/20 Joel Dahl born in Bitterna, Skaraborg, Sweden, 1983 10/20 Dmitry Marakasov born in Moscow, Russian Federation, 1984 10/21 Ben Smithurst born in Sheffield, South Yorkshire, United Kingdom, 1981 @@ -372,7 +373,7 @@ 10/26 Philip M. Gollucci born in Silver Spring, Maryland, United States, 1979 10/27 Takanori Watanabe born in Numazu, Shizuoka, Japan, 1972 11/05 M. Warner Losh born in Kansas City, Kansas, United States, 1966 -11/06 Michael Zhilin born in Stary Oskol, USSR, 1985 +11/06 Michael Zhilin born in Stary Oskol, USSR, 1985 11/08 Joseph R. Mingrone born in Charlottetown, Prince Edward Island, Canada, 1976 11/09 Coleman Kane born in Cincinnati, Ohio, United States, 1980 11/09 Antoine Brodin born in Bagnolet, France, 1981 From owner-svn-src-head@freebsd.org Tue Aug 1 18:26:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9394DB64C1; Tue, 1 Aug 2017 18:26:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B67CF63DD6; Tue, 1 Aug 2017 18:26:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71IQK84072220; Tue, 1 Aug 2017 18:26:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71IQK5j072218; Tue, 1 Aug 2017 18:26:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201708011826.v71IQK5j072218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Aug 2017 18:26:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321887 - in head: . share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in head: . share/mk X-SVN-Commit-Revision: 321887 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 18:26:22 -0000 Author: bdrewery Date: Tue Aug 1 18:26:20 2017 New Revision: 321887 URL: https://svnweb.freebsd.org/changeset/base/321887 Log: CCACHE_BUILD: Follow-up r321880: Fix some PATH issues with buildworld. - bsd.compiler.mk: Must ensure that the CCACHE_WRAPPER_PATH comes first in PATH. - Makefile.inc1: Must prepend the CCACHE_WRAPPER_PATH into BPATH as it overrides the PATH set in bsd.compiler.mk in sub-makes. The PATH set in bsd.compiler.mk is not exported and doing so would cause it to then override the BPATH set from environment. The only sane solution is to prepend into BPATH as needed. CCACHE_PATH could possibly be used for some of this as well. Sponsored by: Dell EMC Isilon Modified: head/Makefile.inc1 head/share/mk/bsd.compiler.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Aug 1 18:25:04 2017 (r321886) +++ head/Makefile.inc1 Tue Aug 1 18:26:20 2017 (r321887) @@ -444,7 +444,7 @@ BUILD_ARCH!= uname -p .endif .endif WORLDTMP= ${OBJTREE}${.CURDIR}/tmp -BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin +BPATH= ${CCACHE_WRAPPER_PATH_PFX}${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin STRICTTMPPATH= ${BPATH}:${XPATH} TMPPATH= ${STRICTTMPPATH}:${PATH} Modified: head/share/mk/bsd.compiler.mk ============================================================================== --- head/share/mk/bsd.compiler.mk Tue Aug 1 18:25:04 2017 (r321886) +++ head/share/mk/bsd.compiler.mk Tue Aug 1 18:26:20 2017 (r321887) @@ -82,8 +82,11 @@ PATH:= ${PATH:C,:?${CCACHE_WRAPPER_PATH}(/world)?(:$)? ${var}:= ${CCACHE_BIN} ${${var}} .endif .endfor -.elif empty(PATH:M*${CCACHE_WRAPPER_PATH}*) +.else +# Need to ensure CCACHE_WRAPPER_PATH is the first in ${PATH} +PATH:= ${PATH:C,:?${CCACHE_WRAPPER_PATH}(/world)?(:$)?,,g} PATH:= ${CCACHE_WRAPPER_PATH}:${PATH} +CCACHE_WRAPPER_PATH_PFX= ${CCACHE_WRAPPER_PATH}: .endif # ${CCACHE_BUILD_TYPE} == "command" # GCC does not need the CCACHE_CPP2 hack enabled by default in devel/ccache. # The port enables it due to ccache passing preprocessed C to clang From owner-svn-src-head@freebsd.org Tue Aug 1 18:33:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39A28DB6709; Tue, 1 Aug 2017 18:33:29 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08DC164228; Tue, 1 Aug 2017 18:33:28 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71IXSXc076315; Tue, 1 Aug 2017 18:33:28 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71IXSTT076314; Tue, 1 Aug 2017 18:33:28 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201708011833.v71IXSTT076314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 1 Aug 2017 18:33:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321888 - head/sys/modules/dtb/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/modules/dtb/allwinner X-SVN-Commit-Revision: 321888 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 18:33:29 -0000 Author: manu Date: Tue Aug 1 18:33:27 2017 New Revision: 321888 URL: https://svnweb.freebsd.org/changeset/base/321888 Log: Allwinner dtb: add link for NanoPi Neo Reported by: Richard Puga Tested by: Richard Puga , myself Modified: head/sys/modules/dtb/allwinner/Makefile Modified: head/sys/modules/dtb/allwinner/Makefile ============================================================================== --- head/sys/modules/dtb/allwinner/Makefile Tue Aug 1 18:26:20 2017 (r321887) +++ head/sys/modules/dtb/allwinner/Makefile Tue Aug 1 18:33:27 2017 (r321888) @@ -23,6 +23,7 @@ LINKS= \ ${DTBDIR}/sun7i-a20-bananapi.dtb ${DTBDIR}/bananapi.dtb \ ${DTBDIR}/sun7i-a20-cubieboard2.dtb ${DTBDIR}/cubieboard2.dtb \ ${DTBDIR}/sun7i-a20-olimex-som-evb.dtb ${DTBDIR}/olimex-a20-som-evb.dtb \ - ${DTBDIR}/sun7i-a20-pcduino3.dtb ${DTBDIR}/pcduino3.dtb + ${DTBDIR}/sun7i-a20-pcduino3.dtb ${DTBDIR}/pcduino3.dtb \ + ${DTBDIR}/nanopi-neo.dtb ${DTBDIR}/sun8i-h3-nanopi-neo.dtb .include From owner-svn-src-head@freebsd.org Tue Aug 1 18:46:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 397CCDB6A42; Tue, 1 Aug 2017 18:46:26 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 067E3649A6; Tue, 1 Aug 2017 18:46:25 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71IkPLc081012; Tue, 1 Aug 2017 18:46:25 GMT (envelope-from emax@FreeBSD.org) Received: (from emax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71IkP8X081011; Tue, 1 Aug 2017 18:46:25 GMT (envelope-from emax@FreeBSD.org) Message-Id: <201708011846.v71IkP8X081011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emax set sender to emax@FreeBSD.org using -f From: Maksim Yevmenkin Date: Tue, 1 Aug 2017 18:46:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321889 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: emax X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321889 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 18:46:26 -0000 Author: emax Date: Tue Aug 1 18:46:24 2017 New Revision: 321889 URL: https://svnweb.freebsd.org/changeset/base/321889 Log: add myself Requested by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 18:33:27 2017 (r321888) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 18:46:24 2017 (r321889) @@ -326,6 +326,7 @@ 09/12 Benedict Christopher Reuschling born in Darmstadt, Germany, 1981 09/12 William C. Fumerola II born in Detroit, Michigan, United States, 1981 09/14 Matthew Seaman born in Bristol, United Kingdom, 1965 +09/16 Maksim Yevmenkin born in Taganrog, USSR, 1974 09/15 Aleksandr Rybalko born in Odessa, Ukraine, 1977 09/15 Dima Panov born in Khabarovsk, Russian Federation, 1978 09/17 Maxim Bolotin born in Rostov-on-Don, Russian Federation, 1976 From owner-svn-src-head@freebsd.org Tue Aug 1 18:48:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8302CDB6AE8; Tue, 1 Aug 2017 18:48:10 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D2EB64B3C; Tue, 1 Aug 2017 18:48:10 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71Im9s9081109; Tue, 1 Aug 2017 18:48:09 GMT (envelope-from emax@FreeBSD.org) Received: (from emax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71Im91T081108; Tue, 1 Aug 2017 18:48:09 GMT (envelope-from emax@FreeBSD.org) Message-Id: <201708011848.v71Im91T081108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emax set sender to emax@FreeBSD.org using -f From: Maksim Yevmenkin Date: Tue, 1 Aug 2017 18:48:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321890 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: emax X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321890 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 18:48:10 -0000 Author: emax Date: Tue Aug 1 18:48:09 2017 New Revision: 321890 URL: https://svnweb.freebsd.org/changeset/base/321890 Log: fix sort order Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 18:46:24 2017 (r321889) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 18:48:09 2017 (r321890) @@ -326,9 +326,9 @@ 09/12 Benedict Christopher Reuschling born in Darmstadt, Germany, 1981 09/12 William C. Fumerola II born in Detroit, Michigan, United States, 1981 09/14 Matthew Seaman born in Bristol, United Kingdom, 1965 -09/16 Maksim Yevmenkin born in Taganrog, USSR, 1974 09/15 Aleksandr Rybalko born in Odessa, Ukraine, 1977 09/15 Dima Panov born in Khabarovsk, Russian Federation, 1978 +09/16 Maksim Yevmenkin born in Taganrog, USSR, 1974 09/17 Maxim Bolotin born in Rostov-on-Don, Russian Federation, 1976 09/18 Matthew Fleming born in Cleveland, Ohio, United States, 1975 09/20 Kevin Lo born in Taipei, Taiwan, Republic of China, 1972 From owner-svn-src-head@freebsd.org Tue Aug 1 19:22:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91E96DB7441; Tue, 1 Aug 2017 19:22:01 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F39C65CB4; Tue, 1 Aug 2017 19:22:01 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71JM0GQ097470; Tue, 1 Aug 2017 19:22:00 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71JM0fn097469; Tue, 1 Aug 2017 19:22:00 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201708011922.v71JM0fn097469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 1 Aug 2017 19:22:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321891 - head/sys/boot/fdt/dts/arm X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/boot/fdt/dts/arm X-SVN-Commit-Revision: 321891 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 19:22:01 -0000 Author: manu Date: Tue Aug 1 19:22:00 2017 New Revision: 321891 URL: https://svnweb.freebsd.org/changeset/base/321891 Log: Alwinner: nanopi-neo: Remove r_i2c node from DTS as it isn't used on the board Modified: head/sys/boot/fdt/dts/arm/nanopi-neo.dts Modified: head/sys/boot/fdt/dts/arm/nanopi-neo.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/nanopi-neo.dts Tue Aug 1 18:48:09 2017 (r321890) +++ head/sys/boot/fdt/dts/arm/nanopi-neo.dts Tue Aug 1 19:22:00 2017 (r321891) @@ -46,10 +46,6 @@ }; }; -&r_i2c { - status = "okay"; -}; - &emac { phy = <&phy1>; phy-mode = "mii"; From owner-svn-src-head@freebsd.org Tue Aug 1 19:29:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4042DB77CF; Tue, 1 Aug 2017 19:29:17 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DCD1660CF; Tue, 1 Aug 2017 19:29:17 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71JTGAh097881; Tue, 1 Aug 2017 19:29:16 GMT (envelope-from tcberner@FreeBSD.org) Received: (from tcberner@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71JTGZt097880; Tue, 1 Aug 2017 19:29:16 GMT (envelope-from tcberner@FreeBSD.org) Message-Id: <201708011929.v71JTGZt097880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tcberner set sender to tcberner@FreeBSD.org using -f From: "Tobias C. Berner" Date: Tue, 1 Aug 2017 19:29:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321892 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: tcberner X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321892 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 19:29:17 -0000 Author: tcberner (ports committer) Date: Tue Aug 1 19:29:16 2017 New Revision: 321892 URL: https://svnweb.freebsd.org/changeset/base/321892 Log: Add joneum to the calendar.freebsd Reported by: mckusick Submitted by: joneum Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 19:22:00 2017 (r321891) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 19:29:16 2017 (r321892) @@ -420,6 +420,7 @@ 12/22 Maxim Sobolev born in Dnepropetrovsk, Ukraine, 1976 12/23 Sean Chittenden born in Seattle, Washington, United States, 1979 12/23 Alejandro Pulver born in Buenos Aires, Argentina, 1989 +12/24 Jochen Neumeister born in Heidenheim, Germany, 1975 12/24 Guido Falsi born in Firenze, Italy, 1978 12/25 Niclas Zeising born in Stockholm, Sweden, 1986 12/28 Soren Schmidt born in Maribo, Denmark, 1960 From owner-svn-src-head@freebsd.org Tue Aug 1 20:16:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9243DBC484; Tue, 1 Aug 2017 20:16:01 +0000 (UTC) (envelope-from taras@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 760F167502; Tue, 1 Aug 2017 20:16:01 +0000 (UTC) (envelope-from taras@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71KG0LU018020; Tue, 1 Aug 2017 20:16:00 GMT (envelope-from taras@FreeBSD.org) Received: (from taras@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71KG0dY018019; Tue, 1 Aug 2017 20:16:00 GMT (envelope-from taras@FreeBSD.org) Message-Id: <201708012016.v71KG0dY018019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: taras set sender to taras@FreeBSD.org using -f From: Taras Korenko Date: Tue, 1 Aug 2017 20:16:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321893 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: taras X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321893 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 20:16:01 -0000 Author: taras (doc committer) Date: Tue Aug 1 20:16:00 2017 New Revision: 321893 URL: https://svnweb.freebsd.org/changeset/base/321893 Log: + Add myself to calendar.freebsd. Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 19:29:16 2017 (r321892) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 20:16:00 2017 (r321893) @@ -373,6 +373,7 @@ 10/26 Matthew Ahrens born in United States, 1979 10/26 Philip M. Gollucci born in Silver Spring, Maryland, United States, 1979 10/27 Takanori Watanabe born in Numazu, Shizuoka, Japan, 1972 +10/31 Taras Korenko born in Cherkasy region, Ukraine, 1980 11/05 M. Warner Losh born in Kansas City, Kansas, United States, 1966 11/06 Michael Zhilin born in Stary Oskol, USSR, 1985 11/08 Joseph R. Mingrone born in Charlottetown, Prince Edward Island, Canada, 1976 From owner-svn-src-head@freebsd.org Tue Aug 1 20:28:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84F13DBC6FE; Tue, 1 Aug 2017 20:28:12 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5275A67985; Tue, 1 Aug 2017 20:28:12 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71KSB3j022507; Tue, 1 Aug 2017 20:28:11 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71KSBeC022506; Tue, 1 Aug 2017 20:28:11 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201708012028.v71KSBeC022506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 1 Aug 2017 20:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321894 - head/sys/modules/dtb/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/modules/dtb/allwinner X-SVN-Commit-Revision: 321894 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 20:28:12 -0000 Author: manu Date: Tue Aug 1 20:28:11 2017 New Revision: 321894 URL: https://svnweb.freebsd.org/changeset/base/321894 Log: Allwinner dtb: Add NanoPi M1 to the build It was tested on NanoPi M1 Plus. Modified: head/sys/modules/dtb/allwinner/Makefile Modified: head/sys/modules/dtb/allwinner/Makefile ============================================================================== --- head/sys/modules/dtb/allwinner/Makefile Tue Aug 1 20:16:00 2017 (r321893) +++ head/sys/modules/dtb/allwinner/Makefile Tue Aug 1 20:28:11 2017 (r321894) @@ -14,6 +14,7 @@ DTS= \ sun7i-a20-olimex-som-evb.dts \ sun7i-a20-pcduino3.dts \ sun8i-h2-plus-orangepi-zero.dts \ + sun8i-h3-nanopi-m1.dts \ sun8i-h3-orangepi-one.dts LINKS= \ From owner-svn-src-head@freebsd.org Tue Aug 1 23:14:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7D22DBFAF7; Tue, 1 Aug 2017 23:14:39 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 366036CCCD; Tue, 1 Aug 2017 23:14:39 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v71NEcQm091617; Tue, 1 Aug 2017 23:14:38 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v71NEcUj091616; Tue, 1 Aug 2017 23:14:38 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201708012314.v71NEcUj091616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 1 Aug 2017 23:14:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321896 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 321896 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 23:14:39 -0000 Author: markj Date: Tue Aug 1 23:14:38 2017 New Revision: 321896 URL: https://svnweb.freebsd.org/changeset/base/321896 Log: Amend r321884 to check the refcount and update the class with w_mtx held. Reviewed by: jhb X-MFC with: r321884 Modified: head/sys/kern/subr_witness.c Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Tue Aug 1 21:41:14 2017 (r321895) +++ head/sys/kern/subr_witness.c Tue Aug 1 23:14:38 2017 (r321896) @@ -1849,10 +1849,10 @@ enroll(const char *description, struct lock_class *loc return (w); found: w->w_refcount++; - mtx_unlock_spin(&w_mtx); if (w->w_refcount == 1) w->w_class = lock_class; - else if (lock_class != w->w_class) + mtx_unlock_spin(&w_mtx); + if (lock_class != w->w_class) kassert_panic( "lock (%s) %s does not match earlier (%s) lock", description, lock_class->lc_name, From owner-svn-src-head@freebsd.org Wed Aug 2 00:51:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCE6ADC15CB; Wed, 2 Aug 2017 00:51:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA4276F256; Wed, 2 Aug 2017 00:51:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v720puuP030901; Wed, 2 Aug 2017 00:51:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v720puu3030900; Wed, 2 Aug 2017 00:51:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708020051.v720puu3030900@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 2 Aug 2017 00:51:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321897 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321897 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 00:51:58 -0000 Author: ngie Date: Wed Aug 2 00:51:56 2017 New Revision: 321897 URL: https://svnweb.freebsd.org/changeset/base/321897 Log: Revert accidental character conversion for pfg's entry, done in r321886 Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Aug 1 23:14:38 2017 (r321896) +++ head/usr.bin/calendar/calendars/calendar.freebsd Wed Aug 2 00:51:56 2017 (r321897) @@ -359,7 +359,7 @@ 10/18 Vladimir Kondratyev born in Ryazan, USSR, 1975 10/19 Nicholas Souchu born in Suresnes, Hauts-de-Seine, France, 1972 10/19 Nick Barkas born in Longview, Washington, United States, 1981 -10/19 Pedro Giffuni born in Bogoto, Colombia, 1968 +10/19 Pedro Giffuni born in Bogotá, Colombia, 1968 10/20 Joel Dahl born in Bitterna, Skaraborg, Sweden, 1983 10/20 Dmitry Marakasov born in Moscow, Russian Federation, 1984 10/21 Ben Smithurst born in Sheffield, South Yorkshire, United Kingdom, 1981 From owner-svn-src-head@freebsd.org Wed Aug 2 01:43:37 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 569E3DC26EE; Wed, 2 Aug 2017 01:43:37 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 335F17090F; Wed, 2 Aug 2017 01:43:37 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v721haaD051973; Wed, 2 Aug 2017 01:43:36 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v721hZsr051968; Wed, 2 Aug 2017 01:43:35 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201708020143.v721hZsr051968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Wed, 2 Aug 2017 01:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321899 - in head/sys/amd64: amd64 include linux X-SVN-Group: head X-SVN-Commit-Author: truckman X-SVN-Commit-Paths: in head/sys/amd64: amd64 include linux X-SVN-Commit-Revision: 321899 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 01:43:37 -0000 Author: truckman Date: Wed Aug 2 01:43:35 2017 New Revision: 321899 URL: https://svnweb.freebsd.org/changeset/base/321899 Log: Lower the amd64 shared page, which contains the signal trampoline, from the top of user memory to one page lower on machines with the Ryzen (AMD Family 17h) CPU. This pushes ps_strings and the stack down by one page as well. On Ryzen there is some sort of interaction between code running at the top of user memory address space and interrupts that can cause FreeBSD to either hang or silently reset. This sounds similar to the problem found with DragonFly BSD that was fixed with this commit: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b48dd28447fc8ef62fbc963accd301557fd9ac20 but our signal trampoline location was already lower than the address that DragonFly moved their signal trampoline to. It also does not appear to be related to SMT as described here: https://www.phoronix.com/forums/forum/hardware/processors-memory/955368-some-ryzen-linux-users-are-facing-issues-with-heavy-compilation-loads?p=955498#post955498 "Hi, Matt Dillon here. Yes, I did find what I believe to be a hardware issue with Ryzen related to concurrent operations. In a nutshell, for any given hyperthread pair, if one hyperthread is in a cpu-bound loop of any kind (can be in user mode), and the other hyperthread is returning from an interrupt via IRETQ, the hyperthread issuing the IRETQ can stall indefinitely until the other hyperthread with the cpu-bound loop pauses (aka HLT until next interrupt). After this situation occurs, the system appears to destabilize. The situation does not occur if the cpu-bound loop is on a different core than the core doing the IRETQ. The %rip the IRETQ returns to (e.g. userland %rip address) matters a *LOT*. The problem occurs more often with high %rip addresses such as near the top of the user stack, which is where DragonFly's signal trampoline traditionally resides. So a user program taking a signal on one thread while another thread is cpu-bound can cause this behavior. Changing the location of the signal trampoline makes it more difficult to reproduce the problem. I have not been because the able to completely mitigate it. When a cpu-thread stalls in this manner it appears to stall INSIDE the microcode for IRETQ. It doesn't make it to the return pc, and the cpu thread cannot take any IPIs or other hardware interrupts while in this state." since the system instability has been observed on FreeBSD with SMT disabled. Interrupts to appear to play a factor since running a signal-intensive process on the first CPU core, which handles most of the interrupts on my machine, is far more likely to trigger the problem than running such a process on any other core. Also lower sv_maxuser to prevent a malicious user from using mmap() to load and execute code in the top page of user memory that was made available when the shared page was moved down. Make the same changes to the 64-bit Linux emulator. PR: 219399 Reported by: nbe@renzel.net Reviewed by: kib Reviewed by: dchagin (previous version) Tested by: nbe@renzel.net (earlier version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D11780 Modified: head/sys/amd64/amd64/elf_machdep.c head/sys/amd64/amd64/initcpu.c head/sys/amd64/include/md_var.h head/sys/amd64/linux/linux_sysvec.c Modified: head/sys/amd64/amd64/elf_machdep.c ============================================================================== --- head/sys/amd64/amd64/elf_machdep.c Wed Aug 2 01:23:17 2017 (r321898) +++ head/sys/amd64/amd64/elf_machdep.c Wed Aug 2 01:43:35 2017 (r321899) @@ -84,6 +84,25 @@ struct sysentvec elf64_freebsd_sysvec = { }; INIT_SYSENTVEC(elf64_sysvec, &elf64_freebsd_sysvec); +void +amd64_lower_shared_page(struct sysentvec *sv) +{ + if (hw_lower_amd64_sharedpage != 0) { + sv->sv_maxuser -= PAGE_SIZE; + sv->sv_shared_page_base -= PAGE_SIZE; + sv->sv_usrstack -= PAGE_SIZE; + sv->sv_psstrings -= PAGE_SIZE; + } +} + +/* + * Do this fixup before INIT_SYSENTVEC (SI_ORDER_ANY) because the latter + * uses the value of sv_shared_page_base. + */ +SYSINIT(elf64_sysvec_fixup, SI_SUB_EXEC, SI_ORDER_FIRST, + (sysinit_cfunc_t) amd64_lower_shared_page, + &elf64_freebsd_sysvec); + static Elf64_Brandinfo freebsd_brand_info = { .brand = ELFOSABI_FREEBSD, .machine = EM_X86_64, Modified: head/sys/amd64/amd64/initcpu.c ============================================================================== --- head/sys/amd64/amd64/initcpu.c Wed Aug 2 01:23:17 2017 (r321898) +++ head/sys/amd64/amd64/initcpu.c Wed Aug 2 01:43:35 2017 (r321899) @@ -48,6 +48,11 @@ __FBSDID("$FreeBSD$"); static int hw_instruction_sse; SYSCTL_INT(_hw, OID_AUTO, instruction_sse, CTLFLAG_RD, &hw_instruction_sse, 0, "SIMD/MMX2 instructions available in CPU"); +static int lower_sharedpage_init; +int hw_lower_amd64_sharedpage; +SYSCTL_INT(_hw, OID_AUTO, lower_amd64_sharedpage, CTLFLAG_RDTUN, + &hw_lower_amd64_sharedpage, 0, + "Lower sharedpage to work around Ryzen issue with executing code near the top of user memory"); /* * -1: automatic (default) * 0: keep enable CLFLUSH @@ -120,6 +125,28 @@ init_amd(void) msr = rdmsr(0xc0011020); msr |= (uint64_t)1 << 15; wrmsr(0xc0011020, msr); + } + } + + /* + * Work around a problem on Ryzen that is triggered by executing + * code near the top of user memory, in our case the signal + * trampoline code in the shared page on amd64. + * + * This function is executed once for the BSP before tunables take + * effect so the value determined here can be overridden by the + * tunable. This function is then executed again for each AP and + * also on resume. Set a flag the first time so that value set by + * the tunable is not overwritten. + * + * The stepping and/or microcode versions should be checked after + * this issue is fixed by AMD so that we don't use this mode if not + * needed. + */ + if (lower_sharedpage_init == 0) { + lower_sharedpage_init = 1; + if (CPUID_TO_FAMILY(cpu_id) == 0x17) { + hw_lower_amd64_sharedpage = 1; } } } Modified: head/sys/amd64/include/md_var.h ============================================================================== --- head/sys/amd64/include/md_var.h Wed Aug 2 01:23:17 2017 (r321898) +++ head/sys/amd64/include/md_var.h Wed Aug 2 01:43:35 2017 (r321899) @@ -34,11 +34,14 @@ #include -extern uint64_t *vm_page_dump; +extern uint64_t *vm_page_dump; +extern int hw_lower_amd64_sharedpage; struct savefpu; +struct sysentvec; void amd64_db_resume_dbreg(void); +void amd64_lower_shared_page(struct sysentvec *); void amd64_syscall(struct thread *td, int traced); void doreti_iret(void) __asm(__STRING(doreti_iret)); void doreti_iret_fault(void) __asm(__STRING(doreti_iret_fault)); Modified: head/sys/amd64/linux/linux_sysvec.c ============================================================================== --- head/sys/amd64/linux/linux_sysvec.c Wed Aug 2 01:23:17 2017 (r321898) +++ head/sys/amd64/linux/linux_sysvec.c Wed Aug 2 01:43:35 2017 (r321899) @@ -833,6 +833,8 @@ static void linux_vdso_install(void *param) { + amd64_lower_shared_page(&elf_linux_sysvec); + linux_szsigcode = (&_binary_linux_locore_o_end - &_binary_linux_locore_o_start); From owner-svn-src-head@freebsd.org Wed Aug 2 08:36:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35796DC9F30; Wed, 2 Aug 2017 08:36:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E08337FBC6; Wed, 2 Aug 2017 08:36:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v728a0Cx018681; Wed, 2 Aug 2017 08:36:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v728ZqGh018596; Wed, 2 Aug 2017 08:35:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708020835.v728ZqGh018596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 2 Aug 2017 08:35:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321912 - in head: bin/cat bin/date bin/dd bin/echo bin/expr bin/ln bin/ls bin/mv bin/pax bin/pkill bin/sh bin/sleep bin/test cddl cddl/lib cddl/sbin cddl/usr.bin cddl/usr.sbin contrib/... X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in head: bin/cat bin/date bin/dd bin/echo bin/expr bin/ln bin/ls bin/mv bin/pax bin/pkill bin/sh bin/sleep bin/test cddl cddl/lib cddl/sbin cddl/usr.bin cddl/usr.sbin contrib/ofed/usr.bin gnu lib/atf ... X-SVN-Commit-Revision: 321912 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 08:36:01 -0000 Author: ngie Date: Wed Aug 2 08:35:51 2017 New Revision: 321912 URL: https://svnweb.freebsd.org/changeset/base/321912 Log: Convert traditional ${MK_TESTS} conditional idiom for including test directories to SUBDIR.${MK_TESTS} idiom This is being done to pave the way for future work (and homogenity) in ^/projects/make-check-sandbox . No functional change intended. MFC after: 1 weeks Modified: head/bin/cat/Makefile head/bin/date/Makefile head/bin/dd/Makefile head/bin/echo/Makefile head/bin/expr/Makefile head/bin/ln/Makefile head/bin/ls/Makefile head/bin/mv/Makefile head/bin/pax/Makefile head/bin/pkill/Makefile head/bin/sh/Makefile head/bin/sleep/Makefile head/bin/test/Makefile head/cddl/Makefile head/cddl/lib/Makefile head/cddl/sbin/Makefile head/cddl/usr.bin/Makefile head/cddl/usr.sbin/Makefile head/contrib/ofed/usr.bin/Makefile head/gnu/Makefile head/lib/atf/Makefile head/lib/atf/libatf-c++/Makefile head/lib/atf/libatf-c/Makefile head/lib/libarchive/Makefile head/lib/libc/Makefile head/lib/libcasper/services/cap_dns/Makefile head/lib/libcasper/services/cap_grp/Makefile head/lib/libcasper/services/cap_pwd/Makefile head/lib/libcasper/services/cap_sysctl/Makefile head/lib/libcrypt/Makefile head/lib/libmp/Makefile head/lib/libnv/Makefile head/lib/libpathconv/Makefile head/lib/libproc/Makefile head/lib/librt/Makefile head/lib/libthr/Makefile head/lib/libutil/Makefile head/lib/libxo/Makefile head/lib/msun/Makefile head/libexec/atf/atf-check/Makefile head/libexec/atf/atf-sh/Makefile head/libexec/rtld-elf/Makefile head/sbin/devd/Makefile head/sbin/dhclient/Makefile head/sbin/growfs/Makefile head/sbin/ifconfig/Makefile head/sbin/mdconfig/Makefile head/sbin/pfctl/Makefile head/secure/Makefile head/secure/lib/Makefile head/secure/libexec/Makefile head/secure/usr.bin/Makefile head/secure/usr.sbin/Makefile head/share/Makefile head/share/examples/Makefile head/share/zoneinfo/Makefile head/usr.bin/apply/Makefile head/usr.bin/basename/Makefile head/usr.bin/bsdcat/Makefile head/usr.bin/calendar/Makefile head/usr.bin/cmp/Makefile head/usr.bin/col/Makefile head/usr.bin/comm/Makefile head/usr.bin/compress/Makefile head/usr.bin/cpio/Makefile head/usr.bin/csplit/Makefile head/usr.bin/cut/Makefile head/usr.bin/diff/Makefile head/usr.bin/diff3/Makefile head/usr.bin/dirname/Makefile head/usr.bin/file2c/Makefile head/usr.bin/getconf/Makefile head/usr.bin/grep/Makefile head/usr.bin/gzip/Makefile head/usr.bin/hexdump/Makefile head/usr.bin/ident/Makefile head/usr.bin/indent/Makefile head/usr.bin/join/Makefile head/usr.bin/jot/Makefile head/usr.bin/lastcomm/Makefile head/usr.bin/limits/Makefile head/usr.bin/m4/Makefile head/usr.bin/mkimg/Makefile head/usr.bin/ncal/Makefile head/usr.bin/pr/Makefile head/usr.bin/printf/Makefile head/usr.bin/procstat/Makefile head/usr.bin/sdiff/Makefile head/usr.bin/sed/Makefile head/usr.bin/soelim/Makefile head/usr.bin/tail/Makefile head/usr.bin/tar/Makefile head/usr.bin/timeout/Makefile head/usr.bin/tr/Makefile head/usr.bin/truncate/Makefile head/usr.bin/uniq/Makefile head/usr.bin/units/Makefile head/usr.bin/uudecode/Makefile head/usr.bin/uuencode/Makefile head/usr.bin/xargs/Makefile head/usr.bin/xinstall/Makefile head/usr.bin/xo/Makefile head/usr.bin/yacc/Makefile head/usr.sbin/chown/Makefile head/usr.sbin/etcupdate/Makefile head/usr.sbin/extattr/Makefile head/usr.sbin/fstyp/Makefile head/usr.sbin/makefs/Makefile head/usr.sbin/newsyslog/Makefile head/usr.sbin/nmtree/Makefile head/usr.sbin/pw/Makefile head/usr.sbin/rpcbind/Makefile head/usr.sbin/sa/Makefile Modified: head/bin/cat/Makefile ============================================================================== --- head/bin/cat/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/bin/cat/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -6,8 +6,6 @@ PACKAGE=runtime PROG= cat -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/bin/date/Makefile ============================================================================== --- head/bin/date/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/bin/date/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -7,8 +7,6 @@ PACKAGE=runtime PROG= date SRCS= date.c netdate.c vary.c -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/bin/dd/Makefile ============================================================================== --- head/bin/dd/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/bin/dd/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -38,8 +38,6 @@ test: ${PROG} gen @rm -f gen 1M_zeroes* obs_zeroes -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/bin/echo/Makefile ============================================================================== --- head/bin/echo/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/bin/echo/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -6,8 +6,6 @@ PACKAGE=runtime PROG= echo -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/bin/expr/Makefile ============================================================================== --- head/bin/expr/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/bin/expr/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -12,8 +12,6 @@ CFLAGS+= -fwrapv NO_WMISSING_VARIABLE_DECLARATIONS= -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/bin/ln/Makefile ============================================================================== --- head/bin/ln/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/bin/ln/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -10,8 +10,6 @@ MAN= ln.1 symlink.7 LINKS= ${BINDIR}/ln ${BINDIR}/link MLINKS= ln.1 link.1 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/bin/ls/Makefile ============================================================================== --- head/bin/ls/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/bin/ls/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -14,8 +14,6 @@ CFLAGS+= -DCOLORLS LIBADD+= termcapw .endif -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/bin/mv/Makefile ============================================================================== --- head/bin/mv/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/bin/mv/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -6,8 +6,6 @@ PACKAGE=runtime PROG= mv -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/bin/pax/Makefile ============================================================================== --- head/bin/pax/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/bin/pax/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -33,8 +33,6 @@ SRCS= ar_io.c ar_subs.c buf_subs.c cache.c cpio.c file gen_subs.c getoldopt.c options.c pat_rep.c pax.c sel_subs.c \ tables.c tar.c tty_subs.c -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/bin/pkill/Makefile ============================================================================== --- head/bin/pkill/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/bin/pkill/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -19,8 +19,6 @@ MLINKS= pkill.1 pgrep.1 SYMLINKS= ../..${BINDIR}/pkill /usr/bin/pkill SYMLINKS+= ../..${BINDIR}/pgrep /usr/bin/pgrep -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/bin/sh/Makefile ============================================================================== --- head/bin/sh/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/bin/sh/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -64,8 +64,6 @@ syntax.c syntax.h: mksyntax token.h: mktokens sh ${.CURDIR}/mktokens -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/bin/sleep/Makefile ============================================================================== --- head/bin/sleep/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/bin/sleep/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -6,8 +6,6 @@ PACKAGE=runtime PROG= sleep -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/bin/test/Makefile ============================================================================== --- head/bin/test/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/bin/test/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -8,8 +8,6 @@ PROG= test LINKS= ${BINDIR}/test ${BINDIR}/[ MLINKS= test.1 [.1 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/cddl/Makefile ============================================================================== --- head/cddl/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/cddl/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -5,9 +5,7 @@ SUBDIR= lib .WAIT \ sbin usr.bin usr.sbin -.if ${MK_TESTS} != "no" -SUBDIR+=tests -.endif +SUBDIR.${MK_TESTS}+= tests SUBDIR_PARALLEL= Modified: head/cddl/lib/Makefile ============================================================================== --- head/cddl/lib/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/cddl/lib/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -12,11 +12,8 @@ SUBDIR= ${_drti} \ ${_libzfs_core} \ ${_libzfs} \ ${_libzpool} \ - ${_tests} -.if ${MK_TESTS} != "no" -_tests= tests -.endif +SUBDIR.${MK_TESTS}+= tests .if ${MK_ZFS} != "no" _libzfs_core= libzfs_core Modified: head/cddl/sbin/Makefile ============================================================================== --- head/cddl/sbin/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/cddl/sbin/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -2,11 +2,9 @@ .include -SUBDIR= ${_tests} ${_zfs} ${_zpool} +SUBDIR= ${_zfs} ${_zpool} -.if ${MK_TESTS} != "no" -_tests= tests -.endif +SUBDIR.${MK_TESTS}+= tests .if ${MK_ZFS} != "no" _zfs= zfs Modified: head/cddl/usr.bin/Makefile ============================================================================== --- head/cddl/usr.bin/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/cddl/usr.bin/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -6,15 +6,12 @@ SUBDIR= \ ctfconvert \ ctfdump \ ctfmerge \ - ${_tests} \ ${_zinject} \ ${_zlook} \ ${_zstreamdump} \ ${_ztest} -.if ${MK_TESTS} != "no" -_tests= tests -.endif +SUBDIR.${MK_TESTS}+= tests .if ${MK_ZFS} != "no" _zinject= zinject Modified: head/cddl/usr.sbin/Makefile ============================================================================== --- head/cddl/usr.sbin/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/cddl/usr.sbin/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -5,14 +5,11 @@ SUBDIR= ${_dtrace} \ ${_lockstat} \ ${_plockstat} \ - ${_tests} \ ${_zdb} \ ${_zfsd} \ ${_zhack} -.if ${MK_TESTS} != "no" -_tests= tests -.endif +SUBDIR.${MK_TESTS}+= tests .if ${MK_ZFS} != "no" .if ${MK_LIBTHR} != "no" Modified: head/contrib/ofed/usr.bin/Makefile ============================================================================== --- head/contrib/ofed/usr.bin/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/contrib/ofed/usr.bin/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -4,9 +4,7 @@ SUBDIR= ibaddr ibnetdiscover ibping ibportstate ibrout ibsysstat ibtracert opensm perfquery saquery \ sminfo smpdump smpquery vendstat -.if ${MK_TESTS} != "no" -SUBDIR+= osmtest -.endif +SUBDIR.${MK_TESTS}+= tests SUBDIR_PARALLEL= Modified: head/gnu/Makefile ============================================================================== --- head/gnu/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/gnu/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -4,11 +4,9 @@ .include SUBDIR= lib .WAIT \ - ${_tests} usr.bin + usr.bin -.if ${MK_TESTS} != "no" -_tests= tests -.endif +SUBDIR.${MK_TESTS}+= tests SUBDIR_PARALLEL= Modified: head/lib/atf/Makefile ============================================================================== --- head/lib/atf/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/lib/atf/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -29,10 +29,7 @@ SUBDIR= libatf-c \ libatf-c++ \ - ${_tests} -.if ${MK_TESTS} != "no" -_tests= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/lib/atf/libatf-c++/Makefile ============================================================================== --- head/lib/atf/libatf-c++/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/lib/atf/libatf-c++/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -72,9 +72,7 @@ INCSDIR_atf-c++.hpp= ${INCLUDEDIR} MAN= atf-c++.3 MLINKS+= atf-c++.3 atf-c-api++.3 # Backwards compatibility. -.if ${MK_TESTS} != "no" -SUBDIR= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include "../common.mk" .include Modified: head/lib/atf/libatf-c/Makefile ============================================================================== --- head/lib/atf/libatf-c/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/lib/atf/libatf-c/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -97,9 +97,7 @@ INCSDIR_atf-c.h= ${INCLUDEDIR} MAN= atf-c.3 MLINKS+= atf-c.3 atf-c-api.3 # Backwards compatibility. -.if ${MK_TESTS} != "no" -SUBDIR= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include "../common.mk" .include Modified: head/lib/libarchive/Makefile ============================================================================== --- head/lib/libarchive/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/lib/libarchive/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -413,8 +413,6 @@ MLINKS+= archive_write_set_options.3 archive_write_set MLINKS+= archive_write_set_options.3 archive_write_set_option.3 MLINKS+= libarchive.3 archive.3 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/lib/libc/Makefile ============================================================================== --- head/lib/libc/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/lib/libc/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -173,9 +173,7 @@ libkern.${LIBC_ARCH}:: ${KMSRCS} ${CP} ${.ALLSRC} ${DESTDIR}/sys/libkern/${LIBC_ARCH} .endif -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/lib/libcasper/services/cap_dns/Makefile ============================================================================== --- head/lib/libcasper/services/cap_dns/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/lib/libcasper/services/cap_dns/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -18,8 +18,6 @@ LIBADD= nv CFLAGS+=-I${.CURDIR} -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/lib/libcasper/services/cap_grp/Makefile ============================================================================== --- head/lib/libcasper/services/cap_grp/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/lib/libcasper/services/cap_grp/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -18,8 +18,6 @@ LIBADD= nv CFLAGS+=-I${.CURDIR} -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/lib/libcasper/services/cap_pwd/Makefile ============================================================================== --- head/lib/libcasper/services/cap_pwd/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/lib/libcasper/services/cap_pwd/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -18,8 +18,6 @@ LIBADD= nv CFLAGS+=-I${.CURDIR} -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/lib/libcasper/services/cap_sysctl/Makefile ============================================================================== --- head/lib/libcasper/services/cap_sysctl/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/lib/libcasper/services/cap_sysctl/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -18,8 +18,6 @@ LIBADD= nv CFLAGS+=-I${.CURDIR} -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/lib/libcrypt/Makefile ============================================================================== --- head/lib/libcrypt/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/lib/libcrypt/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -43,9 +43,7 @@ WARNS?= 2 PRECIOUSLIB= -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include .include Modified: head/lib/libmp/Makefile ============================================================================== --- head/lib/libmp/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/lib/libmp/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -15,8 +15,6 @@ CFLAGS+= -I${SRCTOP}/crypto VERSION_DEF= ${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/lib/libnv/Makefile ============================================================================== --- head/lib/libnv/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/lib/libnv/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -17,8 +17,6 @@ SRCS+= msgio.c SRCS+= nvlist.c SRCS+= nvpair.c -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/lib/libpathconv/Makefile ============================================================================== --- head/lib/libpathconv/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/lib/libpathconv/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -13,8 +13,6 @@ SRCS= abs2rel.c rel2abs.c #VERSION_DEF= ${SRCTOP/lib/libc/Versions.def #SYMBOL_MAPS= ${.CURDIR}/Symbol.map -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/lib/libproc/Makefile ============================================================================== --- head/lib/libproc/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/lib/libproc/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -41,8 +41,6 @@ SHLIB_MAJOR= 4 MAN= -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/lib/librt/Makefile ============================================================================== --- head/lib/librt/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/lib/librt/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -21,8 +21,6 @@ PRECIOUSLIB= VERSION_DEF=${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS=${.CURDIR}/Symbol.map -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/lib/libthr/Makefile ============================================================================== --- head/lib/libthr/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/lib/libthr/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -69,8 +69,6 @@ SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a .endif -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/lib/libutil/Makefile ============================================================================== --- head/lib/libutil/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/lib/libutil/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -84,8 +84,6 @@ MLINKS+=pw_util.3 pw_copy.3 \ pw_util.3 pw_tempname.3 \ pw_util.3 pw_tmp.3 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/lib/libxo/Makefile ============================================================================== --- head/lib/libxo/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/lib/libxo/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -110,8 +110,6 @@ MLINKS= xo_attr.3 xo_attr_h.3 \ xo_syslog.3 xo_set_logmask.3 \ xo_syslog.3 xo_vsyslog.3 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/lib/msun/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -228,8 +228,6 @@ MLINKS+=trunc.3 truncf.3 trunc.3 truncl.3 .include -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/libexec/atf/atf-check/Makefile ============================================================================== --- head/libexec/atf/atf-check/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/libexec/atf/atf-check/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -40,8 +40,6 @@ CFLAGS+= -DATF_SHELL='"/bin/sh"' LIBADD= atf_cxx -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/libexec/atf/atf-sh/Makefile ============================================================================== --- head/libexec/atf/atf-sh/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/libexec/atf/atf-sh/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -72,9 +72,7 @@ FILESGROUPS= SUBR SUBRDIR= ${SHAREDIR}/atf SUBR= libatf-sh.subr -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include "../../../lib/atf/common.mk" .include Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/libexec/rtld-elf/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -85,9 +85,7 @@ beforeinstall: .PATH: ${.CURDIR}/${RTLD_ARCH} -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include ${PROG_FULL}: ${VERSION_MAP} Modified: head/sbin/devd/Makefile ============================================================================== --- head/sbin/devd/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/sbin/devd/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -18,8 +18,6 @@ CFLAGS+=-I. -I${.CURDIR} CLEANFILES= y.output -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/sbin/dhclient/Makefile ============================================================================== --- head/sbin/dhclient/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/sbin/dhclient/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -46,8 +46,6 @@ LIBADD= util WARNS?= 2 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/sbin/growfs/Makefile ============================================================================== --- head/sbin/growfs/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/sbin/growfs/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -22,8 +22,6 @@ NO_WCAST_ALIGN= yes LIBADD= util -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/sbin/ifconfig/Makefile ============================================================================== --- head/sbin/ifconfig/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/sbin/ifconfig/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -67,8 +67,6 @@ MAN= ifconfig.8 CFLAGS+= -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs WARNS?= 2 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/sbin/mdconfig/Makefile ============================================================================== --- head/sbin/mdconfig/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/sbin/mdconfig/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -8,8 +8,6 @@ MAN= mdconfig.8 LIBADD= util geom -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/sbin/pfctl/Makefile ============================================================================== --- head/sbin/pfctl/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/sbin/pfctl/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -31,8 +31,6 @@ YFLAGS= LIBADD= m md -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/secure/Makefile ============================================================================== --- head/secure/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/secure/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -3,12 +3,10 @@ .include SUBDIR= lib .WAIT \ - libexec ${_tests} usr.bin usr.sbin + libexec usr.bin usr.sbin SUBDIR_PARALLEL= -.if ${MK_TESTS} != "no" -_tests= tests -.endif +SUBDIR.${MK_TESTS}+= tests # These are the programs which depend on crypto, but not Kerberos. SPROGS= lib/libfetch lib/libpam lib/libradius lib/libtelnet \ Modified: head/secure/lib/Makefile ============================================================================== --- head/secure/lib/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/secure/lib/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -10,8 +10,6 @@ SUBDIR+=libssh .endif .endif -.if ${MK_TESTS} != "no" -SUBDIR+=tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/secure/libexec/Makefile ============================================================================== --- head/secure/libexec/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/secure/libexec/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -7,9 +7,7 @@ SUBDIR= SUBDIR+=sftp-server ssh-keysign ssh-pkcs11-helper .endif -.if ${MK_TESTS} != "no" -SUBDIR+=tests -.endif +SUBDIR.${MK_TESTS}+= tests SUBDIR_PARALLEL= Modified: head/secure/usr.bin/Makefile ============================================================================== --- head/secure/usr.bin/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/secure/usr.bin/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -10,9 +10,7 @@ SUBDIR+=scp sftp ssh ssh-add ssh-agent ssh-keygen ssh- .endif .endif -.if ${MK_TESTS} != "no" -SUBDIR+=tests -.endif +SUBDIR.${MK_TESTS}+= tests SUBDIR_PARALLEL= Modified: head/secure/usr.sbin/Makefile ============================================================================== --- head/secure/usr.sbin/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/secure/usr.sbin/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -7,9 +7,7 @@ SUBDIR= SUBDIR+=sshd .endif -.if ${MK_TESTS} != "no" -SUBDIR+=tests -.endif +SUBDIR.${MK_TESTS}+= tests SUBDIR_PARALLEL= Modified: head/share/Makefile ============================================================================== --- head/share/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/share/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -26,7 +26,6 @@ SUBDIR= ${_colldef} \ ${_syscons} \ tabset \ termcap \ - ${_tests} \ ${_timedef} \ ${_vt} \ ${_zoneinfo} @@ -82,9 +81,7 @@ _doc= doc _syscons= syscons .endif -.if ${MK_TESTS} != "no" -_tests= tests -.endif +SUBDIR.${MK_TESTS}+= tests .if ${MK_VT} != "no" _vt= vt Modified: head/share/examples/Makefile ============================================================================== --- head/share/examples/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/share/examples/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -266,9 +266,7 @@ SUBDIR+=pf .endif .endif -.if ${MK_TESTS} != "no" -SUBDIR+=tests -.endif +SUBDIR.${MK_TESTS}+= tests SUBDIR_PARALLEL= Modified: head/share/zoneinfo/Makefile ============================================================================== --- head/share/zoneinfo/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/share/zoneinfo/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -131,8 +131,6 @@ afterinstall: echo "Run tzsetup(8) manually to update /etc/localtime."; \ fi -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/apply/Makefile ============================================================================== --- head/usr.bin/apply/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/apply/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -7,8 +7,6 @@ PROG= apply LIBADD= sbuf -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/basename/Makefile ============================================================================== --- head/usr.bin/basename/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/basename/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -6,8 +6,6 @@ PROG= basename MLINKS= basename.1 dirname.1 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/bsdcat/Makefile ============================================================================== --- head/usr.bin/bsdcat/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/bsdcat/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -24,8 +24,6 @@ LIBADD= archive CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST=const .endif -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/calendar/Makefile ============================================================================== --- head/usr.bin/calendar/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/calendar/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -33,8 +33,6 @@ beforeinstall: ${DESTDIR}${SHAREDIR}/calendar/${link} .endfor -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/cmp/Makefile ============================================================================== --- head/usr.bin/cmp/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/cmp/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -6,8 +6,6 @@ PROG= cmp SRCS= cmp.c link.c misc.c regular.c special.c -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/col/Makefile ============================================================================== --- head/usr.bin/col/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/col/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -5,8 +5,6 @@ PROG= col -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/comm/Makefile ============================================================================== --- head/usr.bin/comm/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/comm/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -5,8 +5,6 @@ PROG= comm -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/compress/Makefile ============================================================================== --- head/usr.bin/compress/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/compress/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -11,8 +11,6 @@ MLINKS= compress.1 uncompress.1 # XXX zopen is not part of libc # MAN=zopen.3 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/cpio/Makefile ============================================================================== --- head/usr.bin/cpio/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/cpio/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -32,8 +32,6 @@ CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST SYMLINKS=bsdcpio ${BINDIR}/cpio MLINKS= bsdcpio.1 cpio.1 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/csplit/Makefile ============================================================================== --- head/usr.bin/csplit/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/csplit/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -4,8 +4,6 @@ PROG= csplit -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/cut/Makefile ============================================================================== --- head/usr.bin/cut/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/cut/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -5,8 +5,6 @@ PROG= cut -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/diff/Makefile ============================================================================== --- head/usr.bin/diff/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/diff/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -5,8 +5,6 @@ PROG= diff SRCS= diff.c diffdir.c diffreg.c xmalloc.c -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/diff3/Makefile ============================================================================== --- head/usr.bin/diff3/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/diff3/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -4,8 +4,6 @@ PROG= diff3 -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/dirname/Makefile ============================================================================== --- head/usr.bin/dirname/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/dirname/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -6,8 +6,6 @@ PROG= dirname MAN= -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/file2c/Makefile ============================================================================== --- head/usr.bin/file2c/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/file2c/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -4,8 +4,6 @@ PROG= file2c -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/getconf/Makefile ============================================================================== --- head/usr.bin/getconf/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/getconf/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -37,8 +37,6 @@ conflicting.names: confstr.names limits.names sysconf. unique.names: conflicting.names LC_ALL=C sort -u ${.ALLSRC} >${.TARGET} -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/grep/Makefile ============================================================================== --- head/usr.bin/grep/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/grep/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -92,8 +92,6 @@ LIBADD+= gnuregex CFLAGS+= -DWITHOUT_NLS .endif -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/gzip/Makefile ============================================================================== --- head/usr.bin/gzip/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/gzip/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -27,8 +27,6 @@ LINKS+= ${BINDIR}/gzip ${BINDIR}/gunzip \ ${BINDIR}/gzip ${BINDIR}/zcat \ ${BINDIR}/zdiff ${BINDIR}/zcmp -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/hexdump/Makefile ============================================================================== --- head/usr.bin/hexdump/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/hexdump/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -10,8 +10,6 @@ MLINKS= hexdump.1 hd.1 LINKS= ${BINDIR}/hexdump ${BINDIR}/od LINKS+= ${BINDIR}/hexdump ${BINDIR}/hd -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/ident/Makefile ============================================================================== --- head/usr.bin/ident/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/ident/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -6,8 +6,6 @@ PROG= ident LIBADD= sbuf -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/indent/Makefile ============================================================================== --- head/usr.bin/indent/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/indent/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -8,8 +8,6 @@ SRCS= indent.c io.c lexi.c parse.c pr_comment.c args.c NO_WMISSING_VARIABLE_DECLARATIONS= -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/join/Makefile ============================================================================== --- head/usr.bin/join/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/join/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -5,8 +5,6 @@ PROG= join -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include Modified: head/usr.bin/jot/Makefile ============================================================================== --- head/usr.bin/jot/Makefile Wed Aug 2 08:14:06 2017 (r321911) +++ head/usr.bin/jot/Makefile Wed Aug 2 08:35:51 2017 (r321912) @@ -5,8 +5,6 @@ PROG= jot -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif +SUBDIR.${MK_TESTS}+= tests .include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Aug 2 08:54:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABE6EDCA7F6; Wed, 2 Aug 2017 08:54:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EABD80A60; Wed, 2 Aug 2017 08:54:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v728sITL026980; Wed, 2 Aug 2017 08:54:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v728sIJ6026979; Wed, 2 Aug 2017 08:54:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708020854.v728sIJ6026979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 2 Aug 2017 08:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321915 - head/lib/libcrypt X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/lib/libcrypt X-SVN-Commit-Revision: 321915 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 08:54:19 -0000 Author: ngie Date: Wed Aug 2 08:54:18 2017 New Revision: 321915 URL: https://svnweb.freebsd.org/changeset/base/321915 Log: Remove bogus bsd.subdir.mk .include bsd.subdir.mk is included from bsd.obj.mk, which is included via bsd.lib.mk. MFC after: 3 days Modified: head/lib/libcrypt/Makefile Modified: head/lib/libcrypt/Makefile ============================================================================== --- head/lib/libcrypt/Makefile Wed Aug 2 08:50:42 2017 (r321914) +++ head/lib/libcrypt/Makefile Wed Aug 2 08:54:18 2017 (r321915) @@ -46,4 +46,3 @@ PRECIOUSLIB= SUBDIR.${MK_TESTS}+= tests .include -.include From owner-svn-src-head@freebsd.org Wed Aug 2 09:00:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF837DCAB51; Wed, 2 Aug 2017 09:00:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EB6780E92; Wed, 2 Aug 2017 09:00:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7290IIB027501; Wed, 2 Aug 2017 09:00:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7290Ix6027500; Wed, 2 Aug 2017 09:00:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708020900.v7290Ix6027500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 2 Aug 2017 09:00:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321916 - head/contrib/ofed/usr.bin X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/contrib/ofed/usr.bin X-SVN-Commit-Revision: 321916 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 09:00:19 -0000 Author: ngie Date: Wed Aug 2 09:00:18 2017 New Revision: 321916 URL: https://svnweb.freebsd.org/changeset/base/321916 Log: Fix accidental misconversion done in r321912 SUBDIR.${MK_TESTS} should append osmtest, not tests MFC after: 1 week MFC with: r321912 Modified: head/contrib/ofed/usr.bin/Makefile Modified: head/contrib/ofed/usr.bin/Makefile ============================================================================== --- head/contrib/ofed/usr.bin/Makefile Wed Aug 2 08:54:18 2017 (r321915) +++ head/contrib/ofed/usr.bin/Makefile Wed Aug 2 09:00:18 2017 (r321916) @@ -4,7 +4,7 @@ SUBDIR= ibaddr ibnetdiscover ibping ibportstate ibrout ibsysstat ibtracert opensm perfquery saquery \ sminfo smpdump smpquery vendstat -SUBDIR.${MK_TESTS}+= tests +SUBDIR.${MK_TESTS}+= osmtest SUBDIR_PARALLEL= From owner-svn-src-head@freebsd.org Wed Aug 2 09:49:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76169DCB6A8; Wed, 2 Aug 2017 09:49:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 439FA8266F; Wed, 2 Aug 2017 09:49:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v729nf1h048704; Wed, 2 Aug 2017 09:49:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v729nf26048703; Wed, 2 Aug 2017 09:49:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708020949.v729nf26048703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 2 Aug 2017 09:49:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321918 - head/tests/sys/aio X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tests/sys/aio X-SVN-Commit-Revision: 321918 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 09:49:42 -0000 Author: ngie Date: Wed Aug 2 09:49:41 2017 New Revision: 321918 URL: https://svnweb.freebsd.org/changeset/base/321918 Log: Fix cosmetic issue with error message Add missing space in error message related to PR noted. MFC after: 2 weeks PR: 220398 Modified: head/tests/sys/aio/lio_test.c Modified: head/tests/sys/aio/lio_test.c ============================================================================== --- head/tests/sys/aio/lio_test.c Wed Aug 2 09:00:59 2017 (r321917) +++ head/tests/sys/aio/lio_test.c Wed Aug 2 09:49:41 2017 (r321918) @@ -99,7 +99,7 @@ ATF_TC_BODY(lio_listio_empty_nowait_signal, tc) struct sigevent sev; atf_tc_expect_timeout("Bug 220398 - lio_listio(2) never sends" - "asynchronous notification if nent==0"); + " asynchronous notification if nent==0"); ATF_REQUIRE_EQ(0, sem_init(&completions, false, 0)); sev.sigev_notify = SIGEV_SIGNAL; sev.sigev_signo = SIGUSR1; @@ -120,7 +120,7 @@ ATF_TC_BODY(lio_listio_empty_nowait_thread, tc) struct sigevent sev; atf_tc_expect_timeout("Bug 220398 - lio_listio(2) never sends" - "asynchronous notification if nent==0"); + " asynchronous notification if nent==0"); ATF_REQUIRE_EQ(0, sem_init(&completions, false, 0)); bzero(&sev, sizeof(sev)); sev.sigev_notify = SIGEV_THREAD; From owner-svn-src-head@freebsd.org Wed Aug 2 10:12:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01FD1DCBF10; Wed, 2 Aug 2017 10:12:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3F4183458; Wed, 2 Aug 2017 10:12:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72ACASF060914; Wed, 2 Aug 2017 10:12:10 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72ACAZX060912; Wed, 2 Aug 2017 10:12:10 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201708021012.v72ACAZX060912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 2 Aug 2017 10:12:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321919 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 X-SVN-Commit-Revision: 321919 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 10:12:12 -0000 Author: kib Date: Wed Aug 2 10:12:10 2017 New Revision: 321919 URL: https://svnweb.freebsd.org/changeset/base/321919 Log: Do not call trapsignal() after handling usermode fault or interrupt, when a signal is not intended to be sent. The variable holding the signal number to send is left uninitialized, which sometimes triggers invalid signal checks. For NMI, a return to usermode without ast processing is done. On the other hand, for spurious dtrace probe interrupt it is usermode which triggered the interrupt, so handle it through userret() as any other fault. Reported by: Nils Beyer PR: 221151 Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/trap.c head/sys/i386/i386/trap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Wed Aug 2 09:49:41 2017 (r321918) +++ head/sys/amd64/amd64/trap.c Wed Aug 2 10:12:10 2017 (r321919) @@ -370,7 +370,7 @@ trap(struct trapframe *frame) #ifdef DEV_ISA case T_NMI: nmi_handle_intr(type, frame); - break; + goto out; #endif /* DEV_ISA */ case T_OFLOW: /* integer overflow fault */ @@ -408,7 +408,7 @@ trap(struct trapframe *frame) if (dtrace_return_probe_ptr != NULL && dtrace_return_probe_ptr(®s) == 0) goto out; - break; + goto userout; #endif } } else { Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Wed Aug 2 09:49:41 2017 (r321918) +++ head/sys/i386/i386/trap.c Wed Aug 2 10:12:10 2017 (r321919) @@ -455,7 +455,7 @@ user_trctrap_out: goto userout; #else /* !POWERFAIL_NMI */ nmi_handle_intr(type, frame); - break; + goto out; #endif /* POWERFAIL_NMI */ #endif /* DEV_ISA */ @@ -499,7 +499,7 @@ user_trctrap_out: if (dtrace_return_probe_ptr != NULL && dtrace_return_probe_ptr(®s) == 0) goto out; - break; + goto userout; #endif } } else { From owner-svn-src-head@freebsd.org Wed Aug 2 10:14:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 222CDDCC038; Wed, 2 Aug 2017 10:14:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAE2A83708; Wed, 2 Aug 2017 10:14:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72AEH9F061038; Wed, 2 Aug 2017 10:14:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72AEHEk061037; Wed, 2 Aug 2017 10:14:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201708021014.v72AEHEk061037@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 2 Aug 2017 10:14:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321920 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 321920 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 10:14:19 -0000 Author: kib Date: Wed Aug 2 10:14:17 2017 New Revision: 321920 URL: https://svnweb.freebsd.org/changeset/base/321920 Log: Change major()/minor() to work with 64bit dev_t. Since traditional types for the macros values are int, remove the cookie trick and just split the dev_t at the word boundary. Reported by: Victor Stinner PR: 221048 Sponsored by: The FreeBSD Foundation Modified: head/sys/sys/types.h Modified: head/sys/sys/types.h ============================================================================== --- head/sys/sys/types.h Wed Aug 2 10:12:10 2017 (r321919) +++ head/sys/sys/types.h Wed Aug 2 10:14:17 2017 (r321920) @@ -364,14 +364,9 @@ __bitcount64(__uint64_t _x) #include -/* - * minor() gives a cookie instead of an index since we don't want to - * change the meanings of bits 0-15 or waste time and space shifting - * bits 16-31 for devices that don't use them. - */ -#define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */ -#define minor(x) ((int)((x)&0xffff00ff)) /* minor number */ -#define makedev(x,y) ((dev_t)(((x) << 8) | (y))) /* create dev_t */ +#define major(x) ((int)((dev_t)(x) >> 32)) /* major number */ +#define minor(x) ((int)((x) & 0xffffffff)) /* minor number */ +#define makedev(x, y) (((dev_t)(x) << 32) | (y)) /* create dev_t */ /* * These declarations belong elsewhere, but are repeated here and in From owner-svn-src-head@freebsd.org Wed Aug 2 10:25:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9904FDCC492; Wed, 2 Aug 2017 10:25:36 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60DD883D75; Wed, 2 Aug 2017 10:25:35 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 6BADA260179; Wed, 2 Aug 2017 12:25:33 +0200 (CEST) Subject: Re: svn commit: r321920 - head/sys/sys To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201708021014.v72AEHEk061037@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <50d380b1-806a-6114-7324-e4cd3d6a2b2f@selasky.org> Date: Wed, 2 Aug 2017 12:23:22 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <201708021014.v72AEHEk061037@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 10:25:36 -0000 On 08/02/17 12:14, Konstantin Belousov wrote: > Author: kib > Date: Wed Aug 2 10:14:17 2017 > New Revision: 321920 > URL: https://svnweb.freebsd.org/changeset/base/321920 > > Log: > Change major()/minor() to work with 64bit dev_t. > > Since traditional types for the macros values are int, remove the > cookie trick and just split the dev_t at the word boundary. > > Reported by: Victor Stinner > PR: 221048 > Sponsored by: The FreeBSD Foundation > > Modified: > head/sys/sys/types.h > > Modified: head/sys/sys/types.h > ============================================================================== > --- head/sys/sys/types.h Wed Aug 2 10:12:10 2017 (r321919) > +++ head/sys/sys/types.h Wed Aug 2 10:14:17 2017 (r321920) > @@ -364,14 +364,9 @@ __bitcount64(__uint64_t _x) > > #include > > -/* > - * minor() gives a cookie instead of an index since we don't want to > - * change the meanings of bits 0-15 or waste time and space shifting > - * bits 16-31 for devices that don't use them. > - */ > -#define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */ > -#define minor(x) ((int)((x)&0xffff00ff)) /* minor number */ > -#define makedev(x,y) ((dev_t)(((x) << 8) | (y))) /* create dev_t */ > +#define major(x) ((int)((dev_t)(x) >> 32)) /* major number */ > +#define minor(x) ((int)((x) & 0xffffffff)) /* minor number */ > +#define makedev(x, y) (((dev_t)(x) << 32) | (y)) /* create dev_t */ > > /* > * These declarations belong elsewhere, but are repeated here and in Hi, This change looks like it affects user-space applications? Why is not the FreeBSD version number bumped? --HPS From owner-svn-src-head@freebsd.org Wed Aug 2 10:33:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2DE5DCC787; Wed, 2 Aug 2017 10:33:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EBC984310; Wed, 2 Aug 2017 10:33:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72AXlQU068916; Wed, 2 Aug 2017 10:33:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72AXlbj068915; Wed, 2 Aug 2017 10:33:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201708021033.v72AXlbj068915@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 2 Aug 2017 10:33:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321921 - head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Commit-Revision: 321921 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 10:33:48 -0000 Author: mav Date: Wed Aug 2 10:33:47 2017 New Revision: 321921 URL: https://svnweb.freebsd.org/changeset/base/321921 Log: Add compat shim part missed at r305197. This fixes compatibility between old kernel and new ZFS tools. It seems to be tradition to forget it. :( PR: 221112 MFC after: 3 days Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c Wed Aug 2 10:14:17 2017 (r321920) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c Wed Aug 2 10:33:47 2017 (r321921) @@ -74,6 +74,9 @@ zcmd_ioctl(int fd, int request, zfs_cmd_t *zc) if (zfs_ioctl_version >= ZFS_IOCVER_DEADMAN) { switch (zfs_ioctl_version) { + case ZFS_IOCVER_INLANES: + cflag = ZFS_CMD_COMPAT_INLANES; + break; case ZFS_IOCVER_RESUME: cflag = ZFS_CMD_COMPAT_RESUME; break; From owner-svn-src-head@freebsd.org Wed Aug 2 10:38:01 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE9F9DCC8F4; Wed, 2 Aug 2017 10:38:01 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6416F845EF; Wed, 2 Aug 2017 10:38:00 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id AF9F5260179; Wed, 2 Aug 2017 12:37:58 +0200 (CEST) Subject: Re: svn commit: r321920 - head/sys/sys To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201708021014.v72AEHEk061037@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <7b1d274f-a531-f788-742a-a8375fe76763@selasky.org> Date: Wed, 2 Aug 2017 12:35:47 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <201708021014.v72AEHEk061037@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 10:38:01 -0000 On 08/02/17 12:14, Konstantin Belousov wrote: > Author: kib > Date: Wed Aug 2 10:14:17 2017 > New Revision: 321920 > URL: https://svnweb.freebsd.org/changeset/base/321920 > > Log: > Change major()/minor() to work with 64bit dev_t. > > Since traditional types for the macros values are int, remove the > cookie trick and just split the dev_t at the word boundary. > > Reported by: Victor Stinner > PR: 221048 > Sponsored by: The FreeBSD Foundation > > Modified: > head/sys/sys/types.h > > Modified: head/sys/sys/types.h > ============================================================================== > --- head/sys/sys/types.h Wed Aug 2 10:12:10 2017 (r321919) > +++ head/sys/sys/types.h Wed Aug 2 10:14:17 2017 (r321920) > @@ -364,14 +364,9 @@ __bitcount64(__uint64_t _x) > > #include > > -/* > - * minor() gives a cookie instead of an index since we don't want to > - * change the meanings of bits 0-15 or waste time and space shifting > - * bits 16-31 for devices that don't use them. > - */ > -#define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */ > -#define minor(x) ((int)((x)&0xffff00ff)) /* minor number */ > -#define makedev(x,y) ((dev_t)(((x) << 8) | (y))) /* create dev_t */ > +#define major(x) ((int)((dev_t)(x) >> 32)) /* major number */ > +#define minor(x) ((int)((x) & 0xffffffff)) /* minor number */ > +#define makedev(x, y) (((dev_t)(x) << 32) | (y)) /* create dev_t */ > > /* > * These declarations belong elsewhere, but are repeated here and in > Hi, This change breaks the LinuxKPI: > struct linux_cdev * > linux_find_cdev(const char *name, unsigned major, unsigned minor) > { > int unit = MKDEV(major, minor); > struct cdev *cdev; > > dev_lock(); > LIST_FOREACH(cdev, &linuxcdevsw.d_devs, si_list) { > struct linux_cdev *ldev = cdev->si_drv1; > if (dev2unit(cdev) == unit && > strcmp(kobject_name(&ldev->kobj), name) == 0) { > break; > } > } > dev_unlock(); > > return (cdev != NULL ? cdev->si_drv1 : NULL); > } You will also need to change cdev->si_drv0 to dev_t and fix the make_dev() functions too. > struct cdev { > void *si_spare0; > u_int si_flags; > #define SI_ETERNAL 0x0001 /* never destroyed */ > #define SI_ALIAS 0x0002 /* carrier of alias name */ > #define SI_NAMED 0x0004 /* make_dev{_alias} has been called */ > #define SI_CHEAPCLONE 0x0008 /* can be removed_dev'ed when vnode reclaims */ > #define SI_CHILD 0x0010 /* child of another struct cdev **/ > #define SI_DUMPDEV 0x0080 /* is kernel dumpdev */ > #define SI_CLONELIST 0x0200 /* on a clone list */ > #define SI_UNMAPPED 0x0400 /* can handle unmapped I/O */ > #define SI_NOSPLIT 0x0800 /* I/O should not be split up */ > struct timespec si_atime; > struct timespec si_ctime; > struct timespec si_mtime; > uid_t si_uid; > gid_t si_gid; > mode_t si_mode; > struct ucred *si_cred; /* cached clone-time credential */ > int si_drv0; Further this update assigns a 64-bit value to tfsid.val[0], which is 32-bit ?? > sys/sys/mount.h:typedef struct fsid { int32_t val[2]; } fsid_t; /* filesystem id type */ sys/kern/vfs_subr.c: tfsid.val[0] = makedev(255, And there are more places like this! Did you properly check all uses of makedev() in the kernel before making this change? --HPS From owner-svn-src-head@freebsd.org Wed Aug 2 10:55:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5A9DDCD028; Wed, 2 Aug 2017 10:55:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D587141; Wed, 2 Aug 2017 10:55:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v72AtjsH013497 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 2 Aug 2017 13:55:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v72AtjsH013497 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v72AtjC2013491; Wed, 2 Aug 2017 13:55:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 2 Aug 2017 13:55:45 +0300 From: Konstantin Belousov To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321920 - head/sys/sys Message-ID: <20170802105545.GB1700@kib.kiev.ua> References: <201708021014.v72AEHEk061037@repo.freebsd.org> <50d380b1-806a-6114-7324-e4cd3d6a2b2f@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50d380b1-806a-6114-7324-e4cd3d6a2b2f@selasky.org> User-Agent: Mutt/1.8.3 (2017-05-23) 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 autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 10:55:52 -0000 On Wed, Aug 02, 2017 at 12:23:22PM +0200, Hans Petter Selasky wrote: > On 08/02/17 12:14, Konstantin Belousov wrote: > > Author: kib > > Date: Wed Aug 2 10:14:17 2017 > > New Revision: 321920 > > URL: https://svnweb.freebsd.org/changeset/base/321920 > > > > Log: > > Change major()/minor() to work with 64bit dev_t. > > > > Since traditional types for the macros values are int, remove the > > cookie trick and just split the dev_t at the word boundary. > > > > Reported by: Victor Stinner > > PR: 221048 > > Sponsored by: The FreeBSD Foundation > > > > Modified: > > head/sys/sys/types.h > > > > Modified: head/sys/sys/types.h > > ============================================================================== > > --- head/sys/sys/types.h Wed Aug 2 10:12:10 2017 (r321919) > > +++ head/sys/sys/types.h Wed Aug 2 10:14:17 2017 (r321920) > > @@ -364,14 +364,9 @@ __bitcount64(__uint64_t _x) > > > > #include > > > > -/* > > - * minor() gives a cookie instead of an index since we don't want to > > - * change the meanings of bits 0-15 or waste time and space shifting > > - * bits 16-31 for devices that don't use them. > > - */ > > -#define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */ > > -#define minor(x) ((int)((x)&0xffff00ff)) /* minor number */ > > -#define makedev(x,y) ((dev_t)(((x) << 8) | (y))) /* create dev_t */ > > +#define major(x) ((int)((dev_t)(x) >> 32)) /* major number */ > > +#define minor(x) ((int)((x) & 0xffffffff)) /* minor number */ > > +#define makedev(x, y) (((dev_t)(x) << 32) | (y)) /* create dev_t */ > > > > /* > > * These declarations belong elsewhere, but are repeated here and in > > Hi, > > This change looks like it affects user-space applications? Why is not > the FreeBSD version number bumped? This change is the trailing fix for the ino64 commit. More details are following: main feature of major/minor is the deconstruction of the dev_t into components which can be used to reconstruct original dev_t with makedev(). In other words, if makedev(major(x), minor(x)) != x then the major/minor API is useless. And it was useless right after ino64 commit r318736 and up to the commit you replied to. The fact that nobody complained until the referenced PR, indicates that the API is not actively used (finally). I do not see a need to bump the __FreeBSD_version for this, we do not support older HEADs in any way. This means that we assume that HEAD users always use the latest HEAD. So no bump for such minor fix. From owner-svn-src-head@freebsd.org Wed Aug 2 11:06:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F4FEDCD3CA; Wed, 2 Aug 2017 11:06:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47A64925; Wed, 2 Aug 2017 11:06:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v72B67Ap015859 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 2 Aug 2017 14:06:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v72B67Ap015859 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v72B67KD015858; Wed, 2 Aug 2017 14:06:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 2 Aug 2017 14:06:07 +0300 From: Konstantin Belousov To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321920 - head/sys/sys Message-ID: <20170802110607.GC1700@kib.kiev.ua> References: <201708021014.v72AEHEk061037@repo.freebsd.org> <7b1d274f-a531-f788-742a-a8375fe76763@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7b1d274f-a531-f788-742a-a8375fe76763@selasky.org> User-Agent: Mutt/1.8.3 (2017-05-23) 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 autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 11:06:17 -0000 On Wed, Aug 02, 2017 at 12:35:47PM +0200, Hans Petter Selasky wrote: > On 08/02/17 12:14, Konstantin Belousov wrote: > > Author: kib > > Date: Wed Aug 2 10:14:17 2017 > > New Revision: 321920 > > URL: https://svnweb.freebsd.org/changeset/base/321920 > > > > Log: > > Change major()/minor() to work with 64bit dev_t. > > > > Since traditional types for the macros values are int, remove the > > cookie trick and just split the dev_t at the word boundary. > > > > Reported by: Victor Stinner > > PR: 221048 > > Sponsored by: The FreeBSD Foundation > > > > Modified: > > head/sys/sys/types.h > > > > Modified: head/sys/sys/types.h > > ============================================================================== > > --- head/sys/sys/types.h Wed Aug 2 10:12:10 2017 (r321919) > > +++ head/sys/sys/types.h Wed Aug 2 10:14:17 2017 (r321920) > > @@ -364,14 +364,9 @@ __bitcount64(__uint64_t _x) > > > > #include > > > > -/* > > - * minor() gives a cookie instead of an index since we don't want to > > - * change the meanings of bits 0-15 or waste time and space shifting > > - * bits 16-31 for devices that don't use them. > > - */ > > -#define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */ > > -#define minor(x) ((int)((x)&0xffff00ff)) /* minor number */ > > -#define makedev(x,y) ((dev_t)(((x) << 8) | (y))) /* create dev_t */ > > +#define major(x) ((int)((dev_t)(x) >> 32)) /* major number */ > > +#define minor(x) ((int)((x) & 0xffffffff)) /* minor number */ > > +#define makedev(x, y) (((dev_t)(x) << 32) | (y)) /* create dev_t */ > > > > /* > > * These declarations belong elsewhere, but are repeated here and in > > > > Hi, > > This change breaks the LinuxKPI: > > > struct linux_cdev * > > linux_find_cdev(const char *name, unsigned major, unsigned minor) > > { > > int unit = MKDEV(major, minor); > > struct cdev *cdev; > > > > dev_lock(); > > LIST_FOREACH(cdev, &linuxcdevsw.d_devs, si_list) { > > struct linux_cdev *ldev = cdev->si_drv1; > > if (dev2unit(cdev) == unit && > > strcmp(kobject_name(&ldev->kobj), name) == 0) { > > break; > > } > > } > > dev_unlock(); > > > > return (cdev != NULL ? cdev->si_drv1 : NULL); > > } So linuxkpi was broken before this commit as well, as I noted in my other reply ? > > You will also need to change cdev->si_drv0 to dev_t and fix the > make_dev() functions too. Why do you think that si_drv0 needs to be changes ? > > > struct cdev { > > void *si_spare0; > > u_int si_flags; > > #define SI_ETERNAL 0x0001 /* never destroyed */ > > #define SI_ALIAS 0x0002 /* carrier of alias name */ > > #define SI_NAMED 0x0004 /* make_dev{_alias} has been called */ > > #define SI_CHEAPCLONE 0x0008 /* can be removed_dev'ed when vnode reclaims */ > > #define SI_CHILD 0x0010 /* child of another struct cdev **/ > > #define SI_DUMPDEV 0x0080 /* is kernel dumpdev */ > > #define SI_CLONELIST 0x0200 /* on a clone list */ > > #define SI_UNMAPPED 0x0400 /* can handle unmapped I/O */ > > #define SI_NOSPLIT 0x0800 /* I/O should not be split up */ > > struct timespec si_atime; > > struct timespec si_ctime; > > struct timespec si_mtime; > > uid_t si_uid; > > gid_t si_gid; > > mode_t si_mode; > > struct ucred *si_cred; /* cached clone-time credential */ > > int si_drv0; > > > Further this update assigns a 64-bit value to tfsid.val[0], which is > 32-bit ?? > > > sys/sys/mount.h:typedef struct fsid { int32_t val[2]; } fsid_t; /* > filesystem id type */ > > sys/kern/vfs_subr.c: tfsid.val[0] = makedev(255, >From my reading if the vfs_getnewfsid() code, it is fine. It ignores the 255-major value, which does not add much sense to the returned value, just that byte 1 is not zero and not 0xff. > > And there are more places like this! I see the use of makedev() in nfsserver, where the change seemingly improve the situation by initializing na_rdev to the full 64 bit value, and in fdescfs, which does not care. > > Did you properly check all uses of makedev() in the kernel before making > this change? > > --HPS From owner-svn-src-head@freebsd.org Wed Aug 2 11:14:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 089D2DCD8BB; Wed, 2 Aug 2017 11:14:02 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7225EAF; Wed, 2 Aug 2017 11:14:01 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id D9837260179; Wed, 2 Aug 2017 13:13:58 +0200 (CEST) Subject: Re: svn commit: r321920 - head/sys/sys To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201708021014.v72AEHEk061037@repo.freebsd.org> <7b1d274f-a531-f788-742a-a8375fe76763@selasky.org> <20170802110607.GC1700@kib.kiev.ua> From: Hans Petter Selasky Message-ID: <760e0077-499e-fffb-a86b-979e410b35e1@selasky.org> Date: Wed, 2 Aug 2017 13:11:48 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170802110607.GC1700@kib.kiev.ua> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 11:14:02 -0000 On 08/02/17 13:06, Konstantin Belousov wrote: > So linuxkpi was broken before this commit as well, as I noted in my > other reply ? Hi, The LinuxKPI uses minor/major/makedev internally. y = makedev(z,t) Then the LinuxKPI assumes z and t can be retrieved through minor and major: minor(y) == z and major(y) == t If "y" is an "int" and it is assigned a 64-bit value, it is obvious that this code no longer holds true. Same might be in userspace/ports. So yes, this change breaks the LinuxKPI, at least some parts of it. --HPS From owner-svn-src-head@freebsd.org Wed Aug 2 11:17:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEA4BDCDA13; Wed, 2 Aug 2017 11:17:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64DD61061; Wed, 2 Aug 2017 11:17:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v72BHqng018098 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 2 Aug 2017 14:17:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v72BHqng018098 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v72BHq53018097; Wed, 2 Aug 2017 14:17:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 2 Aug 2017 14:17:52 +0300 From: Konstantin Belousov To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321920 - head/sys/sys Message-ID: <20170802111752.GD1700@kib.kiev.ua> References: <201708021014.v72AEHEk061037@repo.freebsd.org> <7b1d274f-a531-f788-742a-a8375fe76763@selasky.org> <20170802110607.GC1700@kib.kiev.ua> <760e0077-499e-fffb-a86b-979e410b35e1@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <760e0077-499e-fffb-a86b-979e410b35e1@selasky.org> User-Agent: Mutt/1.8.3 (2017-05-23) 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 autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 11:17:57 -0000 On Wed, Aug 02, 2017 at 01:11:48PM +0200, Hans Petter Selasky wrote: > On 08/02/17 13:06, Konstantin Belousov wrote: > > So linuxkpi was broken before this commit as well, as I noted in my > > other reply ? > > Hi, > > The LinuxKPI uses minor/major/makedev internally. > > y = makedev(z,t) > > Then the LinuxKPI assumes z and t can be retrieved through minor and > major: minor(y) == z and major(y) == t > > If "y" is an "int" and it is assigned a 64-bit value, it is obvious that > this code no longer holds true. Same might be in userspace/ports. But y must be dev_t. > > So yes, this change breaks the LinuxKPI, at least some parts of it. > > --HPS From owner-svn-src-head@freebsd.org Wed Aug 2 11:25:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4695EDCDCC8; Wed, 2 Aug 2017 11:25:39 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12C4A1588; Wed, 2 Aug 2017 11:25:39 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72BPcF0089543; Wed, 2 Aug 2017 11:25:38 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72BPcB0089542; Wed, 2 Aug 2017 11:25:38 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201708021125.v72BPcB0089542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 2 Aug 2017 11:25:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321922 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 321922 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 11:25:39 -0000 Author: mjg Date: Wed Aug 2 11:25:38 2017 New Revision: 321922 URL: https://svnweb.freebsd.org/changeset/base/321922 Log: amd64: annotate the syscall return address check with __predict_false before: 0xffffffff80b03ebb <+2059>: mov 0x460(%r14),%rax 0xffffffff80b03ec2 <+2066>: mov 0x98(%rax),%rax 0xffffffff80b03ec9 <+2073>: shr $0x2f,%rax 0xffffffff80b03ecd <+2077>: je 0xffffffff80b03edd 0xffffffff80b03ecf <+2079>: mov 0x3f8(%r14),%rax 0xffffffff80b03ed6 <+2086>: orl $0x1,0xc8(%rax) 0xffffffff80b03edd <+2093>: add $0xf8,%rsp after: 0xffffffff80b03ebb <+2059>: mov 0x460(%r14),%rax 0xffffffff80b03ec2 <+2066>: mov 0x98(%rax),%rax 0xffffffff80b03ec9 <+2073>: shr $0x2f,%rax 0xffffffff80b03ecd <+2077>: jne 0xffffffff80b03eef 0xffffffff80b03ecf <+2079>: add $0xf8,%rsp Reviewed by: kib MFC after: 1 week Modified: head/sys/amd64/amd64/trap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Wed Aug 2 10:33:47 2017 (r321921) +++ head/sys/amd64/amd64/trap.c Wed Aug 2 11:25:38 2017 (r321922) @@ -935,6 +935,6 @@ amd64_syscall(struct thread *td, int traced) * not be safe. Instead, use the full return path which * catches the problem safely. */ - if (td->td_frame->tf_rip >= VM_MAXUSER_ADDRESS) + if (__predict_false(td->td_frame->tf_rip >= VM_MAXUSER_ADDRESS)) set_pcb_flags(td->td_pcb, PCB_FULL_IRET); } From owner-svn-src-head@freebsd.org Wed Aug 2 11:30:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18818DCDD9A; Wed, 2 Aug 2017 11:30:03 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6369173B; Wed, 2 Aug 2017 11:30:02 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 2F9A8260179; Wed, 2 Aug 2017 13:30:01 +0200 (CEST) Subject: Re: svn commit: r321920 - head/sys/sys To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201708021014.v72AEHEk061037@repo.freebsd.org> <7b1d274f-a531-f788-742a-a8375fe76763@selasky.org> <20170802110607.GC1700@kib.kiev.ua> <760e0077-499e-fffb-a86b-979e410b35e1@selasky.org> <20170802111752.GD1700@kib.kiev.ua> From: Hans Petter Selasky Message-ID: <912d42d0-ea07-82ec-e754-f6b6d2b4cc94@selasky.org> Date: Wed, 2 Aug 2017 13:27:50 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170802111752.GD1700@kib.kiev.ua> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 11:30:03 -0000 On 08/02/17 13:17, Konstantin Belousov wrote: > But y must be dev_t. Sure, but "struct cdev" 's si_drv0 is only "int" . How can it contain dev_t ? --HPS From owner-svn-src-head@freebsd.org Wed Aug 2 11:43:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EBC8DCE273; Wed, 2 Aug 2017 11:43:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A337C2065; Wed, 2 Aug 2017 11:43:07 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v72Bh3u6023624 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 2 Aug 2017 14:43:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v72Bh3u6023624 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v72Bh3L4023623; Wed, 2 Aug 2017 14:43:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 2 Aug 2017 14:43:03 +0300 From: Konstantin Belousov To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321920 - head/sys/sys Message-ID: <20170802114303.GE1700@kib.kiev.ua> References: <201708021014.v72AEHEk061037@repo.freebsd.org> <7b1d274f-a531-f788-742a-a8375fe76763@selasky.org> <20170802110607.GC1700@kib.kiev.ua> <760e0077-499e-fffb-a86b-979e410b35e1@selasky.org> <20170802111752.GD1700@kib.kiev.ua> <912d42d0-ea07-82ec-e754-f6b6d2b4cc94@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <912d42d0-ea07-82ec-e754-f6b6d2b4cc94@selasky.org> User-Agent: Mutt/1.8.3 (2017-05-23) 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 autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 11:43:08 -0000 On Wed, Aug 02, 2017 at 01:27:50PM +0200, Hans Petter Selasky wrote: > On 08/02/17 13:17, Konstantin Belousov wrote: > > But y must be dev_t. > > Sure, but "struct cdev" 's si_drv0 is only "int" . How can it contain > dev_t ? Why should it contain dev_t ? Linux KPI abused that field it seems. Lets change the focus of the discussion. You cited the struct linux_cdev * linux_find_cdev(const char *name, unsigned major, unsigned minor) function which finds cdev (or some mockup of the native cdev) by major/minor. Where does these major/minor numbers come from ? I mean that if they are contructed as major(struct stat.st_rdev) and minor(struct stat.st_rdev), then even the original code looks wrong without the ino64 addition. Since devfs reports the internal inode number into st_rdev, which formally is not accessible outside the devfs filesystem. So should the code for linux_find_cdev() changed to match cdevs against inode number ? cdp_inode is serially generated so on real machine it is really a small number for any /dev node. You can watch that by ls -l /dev. From owner-svn-src-head@freebsd.org Wed Aug 2 12:29:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65BB1DCFA76; Wed, 2 Aug 2017 12:29:00 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AA8E365A; Wed, 2 Aug 2017 12:28:59 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 43164260179; Wed, 2 Aug 2017 14:28:57 +0200 (CEST) Subject: Re: svn commit: r321920 - head/sys/sys To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201708021014.v72AEHEk061037@repo.freebsd.org> <7b1d274f-a531-f788-742a-a8375fe76763@selasky.org> <20170802110607.GC1700@kib.kiev.ua> <760e0077-499e-fffb-a86b-979e410b35e1@selasky.org> <20170802111752.GD1700@kib.kiev.ua> <912d42d0-ea07-82ec-e754-f6b6d2b4cc94@selasky.org> <20170802114303.GE1700@kib.kiev.ua> From: Hans Petter Selasky Message-ID: Date: Wed, 2 Aug 2017 14:26:46 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170802114303.GE1700@kib.kiev.ua> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 12:29:00 -0000 On 08/02/17 13:43, Konstantin Belousov wrote: > On Wed, Aug 02, 2017 at 01:27:50PM +0200, Hans Petter Selasky wrote: >> On 08/02/17 13:17, Konstantin Belousov wrote: >>> But y must be dev_t. >> >> Sure, but "struct cdev" 's si_drv0 is only "int" . How can it contain >> dev_t ? > > Why should it contain dev_t ? > Linux KPI abused that field it seems. > Hi, The LinuxKPI uses si_drv0 to contain the output from mkdev(). Before the mkdev() function would fit into 32-bits. Now it is 64-bits. I can fix the LinuxKPI bits this time. We can store this information in si_drv1->xxx instead of using si_drv0 and dev2unit(). > Lets change the focus of the discussion. > You cited the > struct linux_cdev * > linux_find_cdev(const char *name, unsigned major, unsigned minor) > function which finds cdev (or some mockup of the native cdev) by major/minor. > Where does these major/minor numbers come from ? The major number is in the range 0..255 and decides the type of device. The minor number is in the range 0..255 aswell typically and defines a unique number for each LinuxKPI created character device. > I mean that if they are contructed as major(struct stat.st_rdev) and > minor(struct stat.st_rdev), then even the original code looks wrong > without the ino64 addition. Since devfs reports the internal inode > number into st_rdev, which formally is not accessible outside the devfs > filesystem. So should the code for linux_find_cdev() changed to match > cdevs against inode number ? These numbers do not come from any user-visible files. They are just used internally in the kernel to pass around information. > cdp_inode is serially generated so on real machine it is really a small > number for any /dev node. You can watch that by ls -l /dev. Sure. > While at it, I found that contrib/mknod/pack_dev.c, still has hardcoded references to the old makedev(): > contrib/mknod/pack_dev.c:#define makedev_freebsd(x,y) ((portdev_t)((((x) << 8) & 0x0000ff00) | \ > contrib/mknod/pack_dev.c: dev = makedev_freebsd(numbers[0], numbers[1]); Same goes for: contrib/libarchive/libarchive/archive_pack_dev.c And if you "grep -r makedev /usr/src" you'll find more. --HPS From owner-svn-src-head@freebsd.org Wed Aug 2 12:31:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F2D3DCFB02; Wed, 2 Aug 2017 12:31:05 +0000 (UTC) (envelope-from dru@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E33C83811; Wed, 2 Aug 2017 12:31:04 +0000 (UTC) (envelope-from dru@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72CV42x014555; Wed, 2 Aug 2017 12:31:04 GMT (envelope-from dru@FreeBSD.org) Received: (from dru@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72CV4jG014554; Wed, 2 Aug 2017 12:31:04 GMT (envelope-from dru@FreeBSD.org) Message-Id: <201708021231.v72CV4jG014554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dru set sender to dru@FreeBSD.org using -f From: Dru Lavigne Date: Wed, 2 Aug 2017 12:31:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321923 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: dru X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 321923 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 12:31:05 -0000 Author: dru (doc committer) Date: Wed Aug 2 12:31:03 2017 New Revision: 321923 URL: https://svnweb.freebsd.org/changeset/base/321923 Log: Update my entry in marketing. Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Wed Aug 2 11:25:38 2017 (r321922) +++ head/share/misc/organization.dot Wed Aug 2 12:31:03 2017 (r321923) @@ -57,7 +57,7 @@ webmaster [label="Webmaster Team\nwebmaster@FreeBSD.or # Misc hats go here alphabetically sorted donations [label="Donations Team\ndonations@FreeBSD.org\nwilko, gahr, pgolluci,\nobrien, trhodes, ds,\nrwatson"] -marketing [label="Marketing Team\nmarketing@FreeBSD.org\nSteven Beedle, Denise Ebery, deb,\njkoshy, Dru Lavigne, mwlucas, imp,\nKris Moore, murray, mattt,\nJeremy C. Reed, rwatson"] +marketing [label="Marketing Team\nmarketing@FreeBSD.org\nSteven Beedle, Denise Ebery, deb,\njkoshy, dru, mwlucas, imp,\nKris Moore, murray, mattt,\nJeremy C. Reed, rwatson"] vendorrelations [label="Vendor Relations\nvendor-relations@FreeBSD.org\ncore, FreeBSD Foundation"] # Here are the team relationships. From owner-svn-src-head@freebsd.org Wed Aug 2 12:37:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30BA4DCFFAF; Wed, 2 Aug 2017 12:37:43 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B462A3FD7; Wed, 2 Aug 2017 12:37:42 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v72CbXtE035837 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 2 Aug 2017 15:37:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v72CbXtE035837 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v72CbX4G035836; Wed, 2 Aug 2017 15:37:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 2 Aug 2017 15:37:33 +0300 From: Konstantin Belousov To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321920 - head/sys/sys Message-ID: <20170802123733.GF1700@kib.kiev.ua> References: <201708021014.v72AEHEk061037@repo.freebsd.org> <7b1d274f-a531-f788-742a-a8375fe76763@selasky.org> <20170802110607.GC1700@kib.kiev.ua> <760e0077-499e-fffb-a86b-979e410b35e1@selasky.org> <20170802111752.GD1700@kib.kiev.ua> <912d42d0-ea07-82ec-e754-f6b6d2b4cc94@selasky.org> <20170802114303.GE1700@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) 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 autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 12:37:43 -0000 On Wed, Aug 02, 2017 at 02:26:46PM +0200, Hans Petter Selasky wrote: > On 08/02/17 13:43, Konstantin Belousov wrote: > > On Wed, Aug 02, 2017 at 01:27:50PM +0200, Hans Petter Selasky wrote: > >> On 08/02/17 13:17, Konstantin Belousov wrote: > >>> But y must be dev_t. > >> > >> Sure, but "struct cdev" 's si_drv0 is only "int" . How can it contain > >> dev_t ? > > > > Why should it contain dev_t ? > > Linux KPI abused that field it seems. > > > > Hi, > > The LinuxKPI uses si_drv0 to contain the output from mkdev(). Before the > mkdev() function would fit into 32-bits. Now it is 64-bits. > > I can fix the LinuxKPI bits this time. We can store this information in > si_drv1->xxx instead of using si_drv0 and dev2unit(). si_drv1 is 32bit on 32bit platforms. > > > Lets change the focus of the discussion. > > You cited the > > struct linux_cdev * > > linux_find_cdev(const char *name, unsigned major, unsigned minor) > > function which finds cdev (or some mockup of the native cdev) by major/minor. > > Where does these major/minor numbers come from ? > > The major number is in the range 0..255 and decides the type of device. > The minor number is in the range 0..255 aswell typically and defines a > unique number for each LinuxKPI created character device. > > > I mean that if they are contructed as major(struct stat.st_rdev) and > > minor(struct stat.st_rdev), then even the original code looks wrong > > without the ino64 addition. Since devfs reports the internal inode > > number into st_rdev, which formally is not accessible outside the devfs > > filesystem. So should the code for linux_find_cdev() changed to match > > cdevs against inode number ? > > These numbers do not come from any user-visible files. They are just > used internally in the kernel to pass around information. > > > cdp_inode is serially generated so on real machine it is really a small > > number for any /dev node. You can watch that by ls -l /dev. > > Sure. > > > > > While at it, I found that contrib/mknod/pack_dev.c, still has hardcoded > references to the old makedev(): > > > contrib/mknod/pack_dev.c:#define makedev_freebsd(x,y) ((portdev_t)((((x) << 8) & 0x0000ff00) | \ > > contrib/mknod/pack_dev.c: dev = makedev_freebsd(numbers[0], numbers[1]); > > Same goes for: contrib/libarchive/libarchive/archive_pack_dev.c I do not see how pack_dev.c can be used for anything non-broken on FreeBSD, at least in connection with devfs. For non-devfs filesystems it can be streamlined, of course. I will look at this later. > > And if you "grep -r makedev /usr/src" you'll find more. > > --HPS From owner-svn-src-head@freebsd.org Wed Aug 2 12:38:27 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4E62DD0018; Wed, 2 Aug 2017 12:38:27 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C8CC633D1; Wed, 2 Aug 2017 12:38:26 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 0A098260179; Wed, 2 Aug 2017 14:38:24 +0200 (CEST) Subject: Re: svn commit: r321920 - head/sys/sys To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201708021014.v72AEHEk061037@repo.freebsd.org> From: Hans Petter Selasky Message-ID: Date: Wed, 2 Aug 2017 14:36:14 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <201708021014.v72AEHEk061037@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 12:38:27 -0000 On 08/02/17 12:14, Konstantin Belousov wrote: > +#define major(x) ((int)((dev_t)(x) >> 32)) /* major number */ > +#define minor(x) ((int)((x) & 0xffffffff)) /* minor number */ > +#define makedev(x, y) (((dev_t)(x) << 32) | (y)) /* create dev_t */ One more comment on this issue: I think makedev(x, y) should be declared like this, to avoid issues when "y" is negative: #define makedev(x, y) (((dev_t)(x) << 32) | (unsigned int)(y)) /* create dev_t */ ??? --HPS From owner-svn-src-head@freebsd.org Wed Aug 2 12:39:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9235DD0115; Wed, 2 Aug 2017 12:39:46 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B1C2635EA; Wed, 2 Aug 2017 12:39:46 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id AE912260179; Wed, 2 Aug 2017 14:39:43 +0200 (CEST) Subject: Re: svn commit: r321920 - head/sys/sys To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201708021014.v72AEHEk061037@repo.freebsd.org> <7b1d274f-a531-f788-742a-a8375fe76763@selasky.org> <20170802110607.GC1700@kib.kiev.ua> <760e0077-499e-fffb-a86b-979e410b35e1@selasky.org> <20170802111752.GD1700@kib.kiev.ua> <912d42d0-ea07-82ec-e754-f6b6d2b4cc94@selasky.org> <20170802114303.GE1700@kib.kiev.ua> <20170802123733.GF1700@kib.kiev.ua> From: Hans Petter Selasky Message-ID: Date: Wed, 2 Aug 2017 14:37:32 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170802123733.GF1700@kib.kiev.ua> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 12:39:46 -0000 On 08/02/17 14:37, Konstantin Belousov wrote: >> si_drv1->xxx instead of using si_drv0 and dev2unit(). > si_drv1 is 32bit on 32bit platforms. > I mean the LinuxKPI structure pointed to by si_drv1, not si_drv1 itself. --HPS From owner-svn-src-head@freebsd.org Wed Aug 2 12:41:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22E62DD01B5; Wed, 2 Aug 2017 12:41:04 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEB506379C; Wed, 2 Aug 2017 12:41:03 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id D1A81260179; Wed, 2 Aug 2017 14:41:01 +0200 (CEST) Subject: Re: svn commit: r321920 - head/sys/sys From: Hans Petter Selasky To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201708021014.v72AEHEk061037@repo.freebsd.org> Message-ID: <37abc595-c80e-a8da-04a8-815f42c634de@selasky.org> Date: Wed, 2 Aug 2017 14:38:50 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 12:41:04 -0000 On 08/02/17 14:36, Hans Petter Selasky wrote: > On 08/02/17 12:14, Konstantin Belousov wrote: >> +#define major(x) ((int)((dev_t)(x) >> 32)) /* major number */ >> +#define minor(x) ((int)((x) & 0xffffffff)) /* minor number */ >> +#define makedev(x, y) (((dev_t)(x) << 32) | (y)) /* create >> dev_t */ > > One more comment on this issue: > > I think makedev(x, y) should be declared like this, to avoid issues when > "y" is negative: > > #define makedev(x, y) (((dev_t)(x) << 32) | (unsigned int)(y)) > /* create dev_t */ > > ??? > > --HPS > > And you'll probably want a final wrapping dev_t cast aswell. 128-bit numbers are not yet there. #define makedev(x, y) ((dev_t)(((dev_t)(x) << 32) | (unsigned int)(y))) > /* create dev_t */ --HPS From owner-svn-src-head@freebsd.org Wed Aug 2 13:08:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6E65DD09C5; Wed, 2 Aug 2017 13:08:11 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 811DD64546; Wed, 2 Aug 2017 13:08:11 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72D8At6030521; Wed, 2 Aug 2017 13:08:10 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72D8ApT030520; Wed, 2 Aug 2017 13:08:10 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201708021308.v72D8ApT030520@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Wed, 2 Aug 2017 13:08:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321924 - head/sys/amd64/cloudabi64 X-SVN-Group: head X-SVN-Commit-Author: ed X-SVN-Commit-Paths: head/sys/amd64/cloudabi64 X-SVN-Commit-Revision: 321924 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 13:08:11 -0000 Author: ed Date: Wed Aug 2 13:08:10 2017 New Revision: 321924 URL: https://svnweb.freebsd.org/changeset/base/321924 Log: Keep top page on CloudABI to work around AMD Ryzen stability issues. Similar to r321899, reduce sv_maxuser by one page inside of CloudABI. This ensures that the stack, the vDSO and any allocations cannot touch the top page of user virtual memory. Considering that CloudABI userspace is completely oblivious to virtual memory layout, don't bother making this conditional based on the CPU of the running system. Reviewed by: kib, truckman Differential Revision: https://reviews.freebsd.org/D11808 Modified: head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Modified: head/sys/amd64/cloudabi64/cloudabi64_sysvec.c ============================================================================== --- head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Wed Aug 2 12:31:03 2017 (r321923) +++ head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Wed Aug 2 13:08:10 2017 (r321924) @@ -199,7 +199,8 @@ static struct sysentvec cloudabi64_elf_sysvec = { .sv_coredump = elf64_coredump, .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, - .sv_maxuser = VM_MAXUSER_ADDRESS, + /* Keep top page reserved to work around AMD Ryzen stability issues. */ + .sv_maxuser = VM_MAXUSER_ADDRESS - PAGE_SIZE, .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, .sv_copyout_strings = cloudabi64_copyout_strings, .sv_setregs = cloudabi64_proc_setregs, From owner-svn-src-head@freebsd.org Wed Aug 2 13:55:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 210B4DD15D1; Wed, 2 Aug 2017 13:55:02 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB593658AF; Wed, 2 Aug 2017 13:55:01 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v72Dstw4052414 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 2 Aug 2017 16:54:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v72Dstw4052414 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v72DstPa052413; Wed, 2 Aug 2017 16:54:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 2 Aug 2017 16:54:55 +0300 From: Konstantin Belousov To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321920 - head/sys/sys Message-ID: <20170802135455.GG1700@kib.kiev.ua> References: <201708021014.v72AEHEk061037@repo.freebsd.org> <37abc595-c80e-a8da-04a8-815f42c634de@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37abc595-c80e-a8da-04a8-815f42c634de@selasky.org> User-Agent: Mutt/1.8.3 (2017-05-23) 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 autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 13:55:02 -0000 On Wed, Aug 02, 2017 at 02:38:50PM +0200, Hans Petter Selasky wrote: > On 08/02/17 14:36, Hans Petter Selasky wrote: > > On 08/02/17 12:14, Konstantin Belousov wrote: > >> +#define major(x) ((int)((dev_t)(x) >> 32)) /* major number */ > >> +#define minor(x) ((int)((x) & 0xffffffff)) /* minor number */ > >> +#define makedev(x, y) (((dev_t)(x) << 32) | (y)) /* create > >> dev_t */ > > > > One more comment on this issue: > > > > I think makedev(x, y) should be declared like this, to avoid issues when > > "y" is negative: > > > > #define makedev(x, y) (((dev_t)(x) << 32) | (unsigned int)(y)) > > /* create dev_t */ > > > > ??? > > > > --HPS > > > > > > And you'll probably want a final wrapping dev_t cast aswell. 128-bit > numbers are not yet there. > > #define makedev(x, y) ((dev_t)(((dev_t)(x) << 32) | (unsigned > int)(y))) > > /* create dev_t */ I agree with the usefulness of the y cast to unsigned type, but I am not sure what is the use of final dev_t cast. By the usual arithmetic conversion rules, the final type of the '|' is the highest rank type of the operands. Something unusual can only happen if int is wider than dev_t. So I am going to commit the following update. diff --git a/sys/sys/types.h b/sys/sys/types.h index fce57e412ed..30a08724443 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -366,7 +366,7 @@ __bitcount64(__uint64_t _x) #define major(x) ((int)((dev_t)(x) >> 32)) /* major number */ #define minor(x) ((int)((x) & 0xffffffff)) /* minor number */ -#define makedev(x, y) (((dev_t)(x) << 32) | (y)) /* create dev_t */ +#define makedev(x, y) (((dev_t)(x) << 32) | (unsigned)(y)) /* create dev_t */ /* * These declarations belong elsewhere, but are repeated here and in From owner-svn-src-head@freebsd.org Wed Aug 2 14:10:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D890FDD19A8; Wed, 2 Aug 2017 14:10:39 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A364D6616C; Wed, 2 Aug 2017 14:10:39 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id A475F260179; Wed, 2 Aug 2017 16:10:37 +0200 (CEST) Subject: Re: svn commit: r321920 - head/sys/sys To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201708021014.v72AEHEk061037@repo.freebsd.org> <37abc595-c80e-a8da-04a8-815f42c634de@selasky.org> <20170802135455.GG1700@kib.kiev.ua> From: Hans Petter Selasky Message-ID: Date: Wed, 2 Aug 2017 16:08:26 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170802135455.GG1700@kib.kiev.ua> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 14:10:40 -0000 On 08/02/17 15:54, Konstantin Belousov wrote: > I agree with the usefulness of the y cast to unsigned type, but I am not sure > what is the use of final dev_t cast. By the usual arithmetic conversion > rules, the final type of the '|' is the highest rank type of the operands. > Something unusual can only happen if int is wider than dev_t. > > So I am going to commit the following update. OK, Looks good! --HPS From owner-svn-src-head@freebsd.org Wed Aug 2 14:12:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEE43DD1B44; Wed, 2 Aug 2017 14:12:48 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5ABC366503; Wed, 2 Aug 2017 14:12:48 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72EClI7058842; Wed, 2 Aug 2017 14:12:47 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72EClpq058841; Wed, 2 Aug 2017 14:12:47 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201708021412.v72EClpq058841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 2 Aug 2017 14:12:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321925 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 321925 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 14:12:49 -0000 Author: andrew Date: Wed Aug 2 14:12:47 2017 New Revision: 321925 URL: https://svnweb.freebsd.org/changeset/base/321925 Log: Fix the return type for get_cntxc(). The register is 64-bit on both arm and arm64 so move any truncation to the caller. Submitted by: Mihai Carabas X-Differential Revision: https://reviews.freebsd.org/D10213 Modified: head/sys/arm/arm/generic_timer.c Modified: head/sys/arm/arm/generic_timer.c ============================================================================== --- head/sys/arm/arm/generic_timer.c Wed Aug 2 13:08:10 2017 (r321924) +++ head/sys/arm/arm/generic_timer.c Wed Aug 2 14:12:47 2017 (r321925) @@ -138,7 +138,7 @@ get_freq(void) return (get_el0(cntfrq)); } -static long +static uint64_t get_cntxct(bool physical) { uint64_t val; From owner-svn-src-head@freebsd.org Wed Aug 2 14:27:29 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FD1ADD1E3E; Wed, 2 Aug 2017 14:27:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BBCE66C13; Wed, 2 Aug 2017 14:27:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72ERSeT063146; Wed, 2 Aug 2017 14:27:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72ERR18063142; Wed, 2 Aug 2017 14:27:27 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201708021427.v72ERR18063142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 2 Aug 2017 14:27:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321926 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 321926 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 14:27:29 -0000 Author: hselasky Date: Wed Aug 2 14:27:27 2017 New Revision: 321926 URL: https://svnweb.freebsd.org/changeset/base/321926 Log: Fix LinuxKPI regression after r321920. The mda_unit and si_drv0 fields are not wide enough to hold the full 64-bit dev_t. Instead use the "dev" field in the "linux_cdev" structure to store and lookup this value. While at it remove superfluous use of parenthesis inside the MAJOR(), MINOR() and MKDEV() macros in the LinuxKPI. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/cdev.h head/sys/compat/linuxkpi/common/include/linux/fs.h head/sys/compat/linuxkpi/common/include/linux/kdev_t.h head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/include/linux/cdev.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/cdev.h Wed Aug 2 14:12:47 2017 (r321925) +++ head/sys/compat/linuxkpi/common/include/linux/cdev.h Wed Aug 2 14:27:27 2017 (r321926) @@ -95,7 +95,6 @@ cdev_add(struct linux_cdev *cdev, dev_t dev, unsigned args.mda_gid = 0; args.mda_mode = 0700; args.mda_si_drv1 = cdev; - args.mda_unit = dev; error = make_dev_s(&args, &cdev->cdev, "%s", kobject_name(&cdev->kobj)); @@ -121,7 +120,6 @@ cdev_add_ext(struct linux_cdev *cdev, dev_t dev, uid_t args.mda_gid = gid; args.mda_mode = mode; args.mda_si_drv1 = cdev; - args.mda_unit = dev; error = make_dev_s(&args, &cdev->cdev, "%s/%d", kobject_name(&cdev->kobj), MINOR(dev)); Modified: head/sys/compat/linuxkpi/common/include/linux/fs.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/fs.h Wed Aug 2 14:12:47 2017 (r321925) +++ head/sys/compat/linuxkpi/common/include/linux/fs.h Wed Aug 2 14:27:27 2017 (r321926) @@ -229,12 +229,8 @@ nonseekable_open(struct inode *inode, struct file *fil return 0; } -static inline dev_t -iminor(struct inode *inode) -{ - - return (minor(dev2unit(inode->v_rdev))); -} +extern unsigned int linux_iminor(struct inode *); +#define iminor(...) linux_iminor(__VA_ARGS__) static inline struct linux_file * get_file(struct linux_file *f) Modified: head/sys/compat/linuxkpi/common/include/linux/kdev_t.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kdev_t.h Wed Aug 2 14:12:47 2017 (r321925) +++ head/sys/compat/linuxkpi/common/include/linux/kdev_t.h Wed Aug 2 14:27:27 2017 (r321926) @@ -33,9 +33,9 @@ #include -#define MAJOR(dev) major((dev)) -#define MINOR(dev) minor((dev)) -#define MKDEV(ma, mi) makedev((ma), (mi)) +#define MAJOR(dev) major(dev) +#define MINOR(dev) minor(dev) +#define MKDEV(ma, mi) makedev(ma, mi) static inline uint16_t old_encode_dev(dev_t dev) Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Wed Aug 2 14:12:47 2017 (r321925) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Wed Aug 2 14:27:27 2017 (r321926) @@ -1417,6 +1417,21 @@ linux_file_fill_kinfo(struct file *fp, struct kinfo_fi return (0); } +unsigned int +linux_iminor(struct inode *inode) +{ + struct linux_cdev *ldev; + + if (inode == NULL || inode->v_rdev == NULL || + inode->v_rdev->si_devsw != &linuxcdevsw) + return (-1U); + ldev = inode->v_rdev->si_drv1; + if (ldev == NULL) + return (-1U); + + return (minor(ldev->dev)); +} + struct fileops linuxfileops = { .fo_read = linux_file_read, .fo_write = invfo_rdwr, @@ -1975,13 +1990,13 @@ linux_in_atomic(void) struct linux_cdev * linux_find_cdev(const char *name, unsigned major, unsigned minor) { - int unit = MKDEV(major, minor); + dev_t dev = MKDEV(major, minor); struct cdev *cdev; dev_lock(); LIST_FOREACH(cdev, &linuxcdevsw.d_devs, si_list) { struct linux_cdev *ldev = cdev->si_drv1; - if (dev2unit(cdev) == unit && + if (ldev->dev == dev && strcmp(kobject_name(&ldev->kobj), name) == 0) { break; } From owner-svn-src-head@freebsd.org Wed Aug 2 14:54:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37F5BDD2995; Wed, 2 Aug 2017 14:54:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0776A67DE9; Wed, 2 Aug 2017 14:54:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72Estrr075495; Wed, 2 Aug 2017 14:54:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72EstOB075494; Wed, 2 Aug 2017 14:54:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201708021454.v72EstOB075494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 2 Aug 2017 14:54:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321930 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 321930 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 14:54:56 -0000 Author: kib Date: Wed Aug 2 14:54:54 2017 New Revision: 321930 URL: https://svnweb.freebsd.org/changeset/base/321930 Log: For makedev(), cast the minor argument to unsigned type explicitely, avoiding possible sign propagation. Submitted by: hselasky Modified: head/sys/sys/types.h Modified: head/sys/sys/types.h ============================================================================== --- head/sys/sys/types.h Wed Aug 2 14:45:58 2017 (r321929) +++ head/sys/sys/types.h Wed Aug 2 14:54:54 2017 (r321930) @@ -366,7 +366,7 @@ __bitcount64(__uint64_t _x) #define major(x) ((int)((dev_t)(x) >> 32)) /* major number */ #define minor(x) ((int)((x) & 0xffffffff)) /* minor number */ -#define makedev(x, y) (((dev_t)(x) << 32) | (y)) /* create dev_t */ +#define makedev(x, y) (((dev_t)(x) << 32) | (unsigned)(y)) /* create dev_t */ /* * These declarations belong elsewhere, but are repeated here and in From owner-svn-src-head@freebsd.org Wed Aug 2 15:15:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6425FDD2FA8; Wed, 2 Aug 2017 15:15:19 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3294A68B52; Wed, 2 Aug 2017 15:15:19 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72FFIkP084089; Wed, 2 Aug 2017 15:15:18 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72FFIAD084086; Wed, 2 Aug 2017 15:15:18 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201708021515.v72FFIAD084086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 2 Aug 2017 15:15:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321933 - head/sys/arm/freescale/imx X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/freescale/imx X-SVN-Commit-Revision: 321933 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 15:15:19 -0000 Author: ian Date: Wed Aug 2 15:15:18 2017 New Revision: 321933 URL: https://svnweb.freebsd.org/changeset/base/321933 Log: The imx6_snvs driver is not strictly required for the system to run, so change it from standard to optional and add a device statement for it so that it's included unless someone uses nodevice to eliminate it. Modified: head/sys/arm/freescale/imx/files.imx6 head/sys/arm/freescale/imx/std.imx6 Modified: head/sys/arm/freescale/imx/files.imx6 ============================================================================== --- head/sys/arm/freescale/imx/files.imx6 Wed Aug 2 15:13:13 2017 (r321932) +++ head/sys/arm/freescale/imx/files.imx6 Wed Aug 2 15:15:18 2017 (r321933) @@ -14,7 +14,7 @@ arm/freescale/imx/imx6_ccm.c standard arm/freescale/imx/imx6_machdep.c standard arm/freescale/imx/imx6_mp.c optional smp arm/freescale/imx/imx6_pl310.c standard -arm/freescale/imx/imx6_snvs.c standard +arm/freescale/imx/imx6_snvs.c optional imx6_snvs arm/freescale/imx/imx6_src.c standard arm/freescale/imx/imx_epit.c standard arm/freescale/imx/imx_iomux.c standard Modified: head/sys/arm/freescale/imx/std.imx6 ============================================================================== --- head/sys/arm/freescale/imx/std.imx6 Wed Aug 2 15:13:13 2017 (r321932) +++ head/sys/arm/freescale/imx/std.imx6 Wed Aug 2 15:15:18 2017 (r321933) @@ -9,7 +9,8 @@ makeoptions KERNVIRTADDR = 0xc2000000 options IPI_IRQ_START=0 options IPI_IRQ_END=15 -device fdt_pinctrl +device fdt_pinctrl +device imx6_snvs files "../freescale/imx/files.imx6" From owner-svn-src-head@freebsd.org Wed Aug 2 15:16:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AFA7DD3039; Wed, 2 Aug 2017 15:16:42 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E99CC68CCA; Wed, 2 Aug 2017 15:16:41 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72FGe5X084178; Wed, 2 Aug 2017 15:16:40 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72FGeYH084175; Wed, 2 Aug 2017 15:16:40 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201708021516.v72FGeYH084175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 2 Aug 2017 15:16:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321934 - in head/sys/modules/i2c: ds1307 ds3231 isl12xx X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys/modules/i2c: ds1307 ds3231 isl12xx X-SVN-Commit-Revision: 321934 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 15:16:42 -0000 Author: ian Date: Wed Aug 2 15:16:40 2017 New Revision: 321934 URL: https://svnweb.freebsd.org/changeset/base/321934 Log: Add missing ofw_bus_if.h src file. Modified: head/sys/modules/i2c/ds1307/Makefile head/sys/modules/i2c/ds3231/Makefile head/sys/modules/i2c/isl12xx/Makefile Modified: head/sys/modules/i2c/ds1307/Makefile ============================================================================== --- head/sys/modules/i2c/ds1307/Makefile Wed Aug 2 15:15:18 2017 (r321933) +++ head/sys/modules/i2c/ds1307/Makefile Wed Aug 2 15:16:40 2017 (r321934) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = ds1307 -SRCS = ds1307.c bus_if.h clock_if.h device_if.h iicbus_if.h +SRCS = ds1307.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h .include Modified: head/sys/modules/i2c/ds3231/Makefile ============================================================================== --- head/sys/modules/i2c/ds3231/Makefile Wed Aug 2 15:15:18 2017 (r321933) +++ head/sys/modules/i2c/ds3231/Makefile Wed Aug 2 15:16:40 2017 (r321934) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = ds3231 -SRCS = ds3231.c bus_if.h clock_if.h device_if.h iicbus_if.h +SRCS = ds3231.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h .include Modified: head/sys/modules/i2c/isl12xx/Makefile ============================================================================== --- head/sys/modules/i2c/isl12xx/Makefile Wed Aug 2 15:15:18 2017 (r321933) +++ head/sys/modules/i2c/isl12xx/Makefile Wed Aug 2 15:16:40 2017 (r321934) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = isl12xx -SRCS = isl12xx.c bus_if.h clock_if.h device_if.h iicbus_if.h +SRCS = isl12xx.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h .include From owner-svn-src-head@freebsd.org Wed Aug 2 18:28:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B065DB02E3; Wed, 2 Aug 2017 18:28:07 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 568C670BDB; Wed, 2 Aug 2017 18:28:07 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72IS61Q065081; Wed, 2 Aug 2017 18:28:06 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72IS6gT065079; Wed, 2 Aug 2017 18:28:06 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201708021828.v72IS6gT065079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 2 Aug 2017 18:28:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321938 - head/sys/arm/freescale/imx X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/freescale/imx X-SVN-Commit-Revision: 321938 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 18:28:07 -0000 Author: ian Date: Wed Aug 2 18:28:06 2017 New Revision: 321938 URL: https://svnweb.freebsd.org/changeset/base/321938 Log: Fix the interface to imx_iomux_gpr_get/set(). The functions were defined as taking a register number, and that would get multiplied by 4 to make a register address. But the header file that consumers have to reference this stuff publishes register addresses, not numbers. So now everything works in terms of register addresses. Note that the HDMI init code was writing into the wrong register before this change. Apparently whatever it wrote to was harmless, and apparently HDMI was working because uboot had set up the right bits. Modified: head/sys/arm/freescale/imx/imx_iomux.c head/sys/arm/freescale/imx/imx_iomuxvar.h Modified: head/sys/arm/freescale/imx/imx_iomux.c ============================================================================== --- head/sys/arm/freescale/imx/imx_iomux.c Wed Aug 2 16:01:52 2017 (r321937) +++ head/sys/arm/freescale/imx/imx_iomux.c Wed Aug 2 18:28:06 2017 (r321938) @@ -70,7 +70,7 @@ struct iomux_softc { device_t dev; struct resource *mem_res; - u_int last_gpreg; + u_int last_gpregaddr; }; static struct iomux_softc *iomux_sc; @@ -213,19 +213,19 @@ iomux_attach(device_t dev) switch (imx_soc_type()) { case IMXSOC_51: - sc->last_gpreg = 1; + sc->last_gpregaddr = 1 * sizeof(uint32_t); break; case IMXSOC_53: - sc->last_gpreg = 2; + sc->last_gpregaddr = 2 * sizeof(uint32_t); break; case IMXSOC_6DL: case IMXSOC_6S: case IMXSOC_6SL: case IMXSOC_6Q: - sc->last_gpreg = 13; + sc->last_gpregaddr = 13 * sizeof(uint32_t); break; case IMXSOC_6UL: - sc->last_gpreg = 14; + sc->last_gpregaddr = 14 * sizeof(uint32_t); break; default: device_printf(dev, "Unknown SoC type\n"); @@ -261,45 +261,48 @@ iomux_attach(device_t dev) } uint32_t -imx_iomux_gpr_get(u_int regnum) +imx_iomux_gpr_get(u_int regaddr) { struct iomux_softc * sc; sc = iomux_sc; KASSERT(sc != NULL, ("%s called before attach", __FUNCTION__)); - KASSERT(regnum >= 0 && regnum <= sc->last_gpreg, - ("%s bad regnum %u, max %u", __FUNCTION__, regnum, sc->last_gpreg)); + KASSERT(regaddr >= 0 && regaddr <= sc->last_gpregaddr, + ("%s bad regaddr %u, max %u", __FUNCTION__, regaddr, + sc->last_gpregaddr)); - return (RD4(iomux_sc, regnum * 4)); + return (RD4(iomux_sc, regaddr)); } void -imx_iomux_gpr_set(u_int regnum, uint32_t val) +imx_iomux_gpr_set(u_int regaddr, uint32_t val) { struct iomux_softc * sc; sc = iomux_sc; KASSERT(sc != NULL, ("%s called before attach", __FUNCTION__)); - KASSERT(regnum >= 0 && regnum <= sc->last_gpreg, - ("%s bad regnum %u, max %u", __FUNCTION__, regnum, sc->last_gpreg)); + KASSERT(regaddr >= 0 && regaddr <= sc->last_gpregaddr, + ("%s bad regaddr %u, max %u", __FUNCTION__, regaddr, + sc->last_gpregaddr)); - WR4(iomux_sc, regnum * 4, val); + WR4(iomux_sc, regaddr, val); } void -imx_iomux_gpr_set_masked(u_int regnum, uint32_t clrbits, uint32_t setbits) +imx_iomux_gpr_set_masked(u_int regaddr, uint32_t clrbits, uint32_t setbits) { struct iomux_softc * sc; uint32_t val; sc = iomux_sc; KASSERT(sc != NULL, ("%s called before attach", __FUNCTION__)); - KASSERT(regnum >= 0 && regnum <= sc->last_gpreg, - ("%s bad regnum %u, max %u", __FUNCTION__, regnum, sc->last_gpreg)); + KASSERT(regaddr >= 0 && regaddr <= sc->last_gpregaddr, + ("%s bad regaddr %u, max %u", __FUNCTION__, regaddr, + sc->last_gpregaddr)); - val = RD4(iomux_sc, regnum * 4); + val = RD4(iomux_sc, regaddr * 4); val = (val & ~clrbits) | setbits; - WR4(iomux_sc, regnum * 4, val); + WR4(iomux_sc, regaddr, val); } static device_method_t imx_iomux_methods[] = { Modified: head/sys/arm/freescale/imx/imx_iomuxvar.h ============================================================================== --- head/sys/arm/freescale/imx/imx_iomuxvar.h Wed Aug 2 16:01:52 2017 (r321937) +++ head/sys/arm/freescale/imx/imx_iomuxvar.h Wed Aug 2 18:28:06 2017 (r321938) @@ -42,8 +42,8 @@ u_int iomux_get_pad_config(u_int pin); * with IO pin assignments or pad control. These functions let other soc level * code manipulate these values. */ -uint32_t imx_iomux_gpr_get(u_int regnum); -void imx_iomux_gpr_set(u_int regnum, uint32_t val); -void imx_iomux_gpr_set_masked(u_int regnum, uint32_t clrbits, uint32_t setbits); +uint32_t imx_iomux_gpr_get(u_int regaddr); +void imx_iomux_gpr_set(u_int regaddr, uint32_t val); +void imx_iomux_gpr_set_masked(u_int regaddr, uint32_t clrbits, uint32_t setbits); #endif From owner-svn-src-head@freebsd.org Wed Aug 2 19:45:10 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F4ACDB2AFC; Wed, 2 Aug 2017 19:45:10 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DA5674F7A; Wed, 2 Aug 2017 19:45:10 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72Jj9MA002770; Wed, 2 Aug 2017 19:45:09 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72Jj98V002769; Wed, 2 Aug 2017 19:45:09 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201708021945.v72Jj98V002769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Wed, 2 Aug 2017 19:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321939 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: rstone X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321939 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 19:45:10 -0000 Author: rstone Date: Wed Aug 2 19:45:09 2017 New Revision: 321939 URL: https://svnweb.freebsd.org/changeset/base/321939 Log: Add my birthdate to the calendar Requested by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Wed Aug 2 18:28:06 2017 (r321938) +++ head/usr.bin/calendar/calendars/calendar.freebsd Wed Aug 2 19:45:09 2017 (r321939) @@ -374,6 +374,7 @@ 10/26 Philip M. Gollucci born in Silver Spring, Maryland, United States, 1979 10/27 Takanori Watanabe born in Numazu, Shizuoka, Japan, 1972 10/31 Taras Korenko born in Cherkasy region, Ukraine, 1980 +11/03 Ryan Stone born in Ottawa, Ontario, Canada, 1985 11/05 M. Warner Losh born in Kansas City, Kansas, United States, 1966 11/06 Michael Zhilin born in Stary Oskol, USSR, 1985 11/08 Joseph R. Mingrone born in Charlottetown, Prince Edward Island, Canada, 1976 From owner-svn-src-head@freebsd.org Wed Aug 2 20:17:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEE13DB3749; Wed, 2 Aug 2017 20:17:05 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCD5E75F00; Wed, 2 Aug 2017 20:17:05 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72KH4uO014899; Wed, 2 Aug 2017 20:17:04 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72KH4dH014898; Wed, 2 Aug 2017 20:17:04 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201708022017.v72KH4dH014898@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 2 Aug 2017 20:17:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321941 - head/sys/arm/allwinner/clk X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner/clk X-SVN-Commit-Revision: 321941 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 20:17:06 -0000 Author: manu Date: Wed Aug 2 20:17:04 2017 New Revision: 321941 URL: https://svnweb.freebsd.org/changeset/base/321941 Log: allwiner: modclk: Do not try to enable parent clock if it doesn't exist Modified: head/sys/arm/allwinner/clk/aw_modclk.c Modified: head/sys/arm/allwinner/clk/aw_modclk.c ============================================================================== --- head/sys/arm/allwinner/clk/aw_modclk.c Wed Aug 2 19:53:43 2017 (r321940) +++ head/sys/arm/allwinner/clk/aw_modclk.c Wed Aug 2 20:17:04 2017 (r321941) @@ -89,7 +89,10 @@ aw_modclk_init(struct clknode *clk, device_t dev) index = (val & CLK_SRC_SEL) >> CLK_SRC_SEL_SHIFT; - clknode_init_parent_idx(clk, index); + if (index <= clknode_get_parents_num(clk)) + clknode_init_parent_idx(clk, index); + else + clknode_init_parent_idx(clk, 0); return (0); } From owner-svn-src-head@freebsd.org Wed Aug 2 20:19:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 201B7DB37EE; Wed, 2 Aug 2017 20:19:21 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE8777608F; Wed, 2 Aug 2017 20:19:20 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72KJKwO015023; Wed, 2 Aug 2017 20:19:20 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72KJJHl015017; Wed, 2 Aug 2017 20:19:19 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201708022019.v72KJJHl015017@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 2 Aug 2017 20:19:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321942 - in head/sys: arm/allwinner arm/allwinner/clkng arm64/conf conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: arm/allwinner arm/allwinner/clkng arm64/conf conf X-SVN-Commit-Revision: 321942 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 20:19:21 -0000 Author: manu Date: Wed Aug 2 20:19:19 2017 New Revision: 321942 URL: https://svnweb.freebsd.org/changeset/base/321942 Log: arm64: Add Allwinner H5 SoC Allwinner H5 is an H3 (arm32) with Cortex A53 cores. Add support for it and enable it in GENERIC kernel config Tested on: OrangePi PC2 Modified: head/sys/arm/allwinner/aw_ccu.c head/sys/arm/allwinner/clkng/aw_ccung.c head/sys/arm64/conf/GENERIC head/sys/conf/files.arm64 head/sys/conf/options.arm64 Modified: head/sys/arm/allwinner/aw_ccu.c ============================================================================== --- head/sys/arm/allwinner/aw_ccu.c Wed Aug 2 20:17:04 2017 (r321941) +++ head/sys/arm/allwinner/aw_ccu.c Wed Aug 2 20:19:19 2017 (r321942) @@ -80,6 +80,7 @@ static struct ofw_compat_data compat_data[] = { { "allwinner,sun6i-a31", CLOCK_CCU }, { "allwinner,sun6i-a31s", CLOCK_CCU }, { "allwinner,sun50i-a64", CLOCK_CCU }, + { "allwinner,sun50i-h5", CLOCK_CCU }, { "allwinner,sun8i-a33", CLOCK_CCU }, { "allwinner,sun8i-a83t", CLOCK_CCU|CLOCK_PRCM|CLOCK_SYSCTRL }, { "allwinner,sun8i-h2-plus", CLOCK_CCU|CLOCK_PRCM }, Modified: head/sys/arm/allwinner/clkng/aw_ccung.c ============================================================================== --- head/sys/arm/allwinner/clkng/aw_ccung.c Wed Aug 2 20:17:04 2017 (r321941) +++ head/sys/arm/allwinner/clkng/aw_ccung.c Wed Aug 2 20:19:19 2017 (r321942) @@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$"); #include #endif -#if defined(SOC_ALLWINNER_H3) +#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H5) #include #endif @@ -78,7 +78,7 @@ static struct resource_spec aw_ccung_spec[] = { { -1, 0 } }; -#if defined(SOC_ALLWINNER_H3) +#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H5) #define H3_CCU 1 #endif @@ -91,7 +91,7 @@ static struct resource_spec aw_ccung_spec[] = { #endif static struct ofw_compat_data compat_data[] = { -#if defined(SOC_ALLWINNER_H3) +#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H5) { "allwinner,sun8i-h3-ccu", H3_CCU }, #endif #if defined(SOC_ALLWINNER_A31) @@ -316,7 +316,7 @@ aw_ccung_attach(device_t dev) panic("Cannot create clkdom\n"); switch (sc->type) { -#if defined(SOC_ALLWINNER_H3) +#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H5) case H3_CCU: ccu_h3_register_clocks(sc); break; Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Wed Aug 2 20:17:04 2017 (r321941) +++ head/sys/arm64/conf/GENERIC Wed Aug 2 20:19:19 2017 (r321942) @@ -89,6 +89,7 @@ options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) # SoC support options SOC_ALLWINNER_A64 +options SOC_ALLWINNER_H5 options SOC_CAVM_THUNDERX options SOC_HISI_HI6220 options SOC_BRCM_BCM2837 Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Wed Aug 2 20:17:04 2017 (r321941) +++ head/sys/conf/files.arm64 Wed Aug 2 20:19:19 2017 (r321942) @@ -42,6 +42,7 @@ arm/allwinner/clkng/aw_clk_nkmp.c optional aw_ccu fdt arm/allwinner/clkng/aw_clk_nm.c optional aw_ccu fdt arm/allwinner/clkng/aw_clk_prediv_mux.c optional aw_ccu fdt arm/allwinner/clkng/ccu_a64.c optional aw_ccu fdt +arm/allwinner/clkng/ccu_h3.c optional aw_ccu fdt arm/allwinner/if_awg.c optional awg fdt arm/annapurna/alpine/alpine_ccu.c optional al_ccu fdt Modified: head/sys/conf/options.arm64 ============================================================================== --- head/sys/conf/options.arm64 Wed Aug 2 20:17:04 2017 (r321941) +++ head/sys/conf/options.arm64 Wed Aug 2 20:19:19 2017 (r321942) @@ -11,6 +11,7 @@ DEV_PSCI opt_platform.h # SoC Support SOC_ALLWINNER_A64 opt_soc.h +SOC_ALLWINNER_H5 opt_soc.h SOC_BRCM_BCM2837 opt_soc.h SOC_CAVM_THUNDERX opt_soc.h SOC_HISI_HI6220 opt_soc.h From owner-svn-src-head@freebsd.org Wed Aug 2 20:42:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30882DB45E2; Wed, 2 Aug 2017 20:42:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F05507724E; Wed, 2 Aug 2017 20:42:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72KgeSB027128; Wed, 2 Aug 2017 20:42:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72KgeNj027127; Wed, 2 Aug 2017 20:42:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708022042.v72KgeNj027127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 2 Aug 2017 20:42:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321947 - head/usr.sbin/makefs/tests X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/usr.sbin/makefs/tests X-SVN-Commit-Revision: 321947 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 20:42:41 -0000 Author: ngie Date: Wed Aug 2 20:42:39 2017 New Revision: 321947 URL: https://svnweb.freebsd.org/changeset/base/321947 Log: Require strings(1) with :o_flag_preparer and :o_flag_publisher strings(1) might not be installed on the system, e.g., if MK_TOOLCHAIN == no MFC after: 1 week Modified: head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Modified: head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh ============================================================================== --- head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Wed Aug 2 20:27:30 2017 (r321946) +++ head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh Wed Aug 2 20:42:39 2017 (r321947) @@ -277,6 +277,10 @@ o_flag_isolevel_3_cleanup() } atf_test_case o_flag_preparer +o_flag_preparer_head() +{ + atf_set "require.progs" "strings" +} o_flag_preparer_body() { create_test_dirs @@ -292,6 +296,10 @@ o_flag_preparer_body() } atf_test_case o_flag_publisher +o_flag_publisher_head() +{ + atf_set "require.progs" "strings" +} o_flag_publisher_body() { create_test_dirs From owner-svn-src-head@freebsd.org Wed Aug 2 21:11:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 328B1DB4FA8; Wed, 2 Aug 2017 21:11:53 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F41417C2B5; Wed, 2 Aug 2017 21:11:52 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72LBqsc039460; Wed, 2 Aug 2017 21:11:52 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72LBpRE039454; Wed, 2 Aug 2017 21:11:51 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201708022111.v72LBpRE039454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 2 Aug 2017 21:11:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321948 - head/sys/dev/mmc X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/sys/dev/mmc X-SVN-Commit-Revision: 321948 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 21:11:53 -0000 Author: marius Date: Wed Aug 2 21:11:51 2017 New Revision: 321948 URL: https://svnweb.freebsd.org/changeset/base/321948 Log: - Correct the remainder of confusing and error prone mix-ups between "br" or "bridge" where - according to the terminology outlined in comments of bridge.h and mmcbr_if.m around since their addition in r163516 - the bus is meant and used instead. Some of these instances are also rather old, while those in e. g. mmc_subr.c are as new as r315430 and were caused by choosing mmc_wait_for_request(), i. e. the one pre-r315430 outliner existing in mmc.c, as template for function parameters in mmc_subr.c inadvertently. This correction translates to renaming "brdev" to "busdev" and "mmcbr" to "mmcbus" respectively as appropriate. While at it, also rename "reqdev" to just "dev" in mmc_subr.[c,h] for consistency with was already used in mmm.c pre-r315430, again modulo mmc_wait_for_request() that is. - Remove comment lines from bridge.h incorrectly suggesting that there would be a MMC bridge base class driver. - Update comments in bridge.h regarding the star topology of SD and SDIO; since version 3.00 of the SDHCI specification, for eSD and eSDIO bus topologies are actually possible in form of so called "shared buses" (in some subcontext later on renamed to "embedded" buses). Modified: head/sys/dev/mmc/bridge.h head/sys/dev/mmc/mmc_subr.c head/sys/dev/mmc/mmc_subr.h head/sys/dev/mmc/mmcbus_if.m head/sys/dev/mmc/mmcsd.c Modified: head/sys/dev/mmc/bridge.h ============================================================================== --- head/sys/dev/mmc/bridge.h Wed Aug 2 20:42:39 2017 (r321947) +++ head/sys/dev/mmc/bridge.h Wed Aug 2 21:11:51 2017 (r321948) @@ -65,12 +65,10 @@ * linux/mmc/host.h file. * * A mmc bridge is a chipset that can have one or more mmc and/or sd - * cards attached to it. mmc cards are attached on a bus topology, - * while sd and sdio cards are attached using a star topology (meaning - * in practice each sd card has its own, independent slot). Each - * mmcbr is assumed to be derived from the mmcbr. This is done to - * allow for easier addition of bridges (as each bridge does not need - * to be added to the mmcbus file). + * cards attached to it. mmc devices are attached on a bus topology, + * while sd and sdio cards usually are attached using a star topology + * (meaning in practice each sd card has its own, independent slot). + * Since SDHCI v3.00, buses for esd and esdio are possible, though. * * Attached to the mmc bridge is an mmcbus. The mmcbus is described * in dev/mmc/mmcbus_if.m. Modified: head/sys/dev/mmc/mmc_subr.c ============================================================================== --- head/sys/dev/mmc/mmc_subr.c Wed Aug 2 20:42:39 2017 (r321947) +++ head/sys/dev/mmc/mmc_subr.c Wed Aug 2 21:11:51 2017 (r321948) @@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$"); #define LOG_PPS 5 /* Log no more than 5 errors per second. */ int -mmc_wait_for_cmd(device_t brdev, device_t reqdev, struct mmc_command *cmd, +mmc_wait_for_cmd(device_t busdev, device_t dev, struct mmc_command *cmd, int retries) { struct mmc_request mreq; @@ -87,14 +87,14 @@ mmc_wait_for_cmd(device_t brdev, device_t reqdev, stru if (cmd->data != NULL) cmd->data->mrq = &mreq; mreq.cmd = cmd; - if (MMCBUS_WAIT_FOR_REQUEST(brdev, reqdev, &mreq) != 0) + if (MMCBUS_WAIT_FOR_REQUEST(busdev, dev, &mreq) != 0) err = MMC_ERR_FAILED; else err = cmd->error; } while (err != MMC_ERR_NONE && retries-- > 0); - if (err != MMC_ERR_NONE && brdev == reqdev) { - sc = device_get_softc(brdev); + if (err != MMC_ERR_NONE && busdev == dev) { + sc = device_get_softc(busdev); if (sc->squelched == 0 && ppsratecheck(&sc->log_time, &sc->log_count, LOG_PPS)) { device_printf(sc->dev, "CMD%d failed, RESULT: %d\n", @@ -106,14 +106,14 @@ mmc_wait_for_cmd(device_t brdev, device_t reqdev, stru } int -mmc_wait_for_app_cmd(device_t brdev, device_t reqdev, uint16_t rca, +mmc_wait_for_app_cmd(device_t busdev, device_t dev, uint16_t rca, struct mmc_command *cmd, int retries) { struct mmc_command appcmd; struct mmc_softc *sc; int err; - sc = device_get_softc(brdev); + sc = device_get_softc(busdev); /* Squelch error reporting at lower levels, we report below. */ sc->squelched++; @@ -122,14 +122,14 @@ mmc_wait_for_app_cmd(device_t brdev, device_t reqdev, appcmd.opcode = MMC_APP_CMD; appcmd.arg = (uint32_t)rca << 16; appcmd.flags = MMC_RSP_R1 | MMC_CMD_AC; - if (mmc_wait_for_cmd(brdev, reqdev, &appcmd, 0) != 0) + if (mmc_wait_for_cmd(busdev, dev, &appcmd, 0) != 0) err = MMC_ERR_FAILED; else err = appcmd.error; if (err == MMC_ERR_NONE) { if (!(appcmd.resp[0] & R1_APP_CMD)) err = MMC_ERR_FAILED; - else if (mmc_wait_for_cmd(brdev, reqdev, cmd, 0) != 0) + else if (mmc_wait_for_cmd(busdev, dev, cmd, 0) != 0) err = MMC_ERR_FAILED; else err = cmd->error; @@ -137,7 +137,7 @@ mmc_wait_for_app_cmd(device_t brdev, device_t reqdev, } while (err != MMC_ERR_NONE && retries-- > 0); sc->squelched--; - if (err != MMC_ERR_NONE && brdev == reqdev) { + if (err != MMC_ERR_NONE && busdev == dev) { if (sc->squelched == 0 && ppsratecheck(&sc->log_time, &sc->log_count, LOG_PPS)) { device_printf(sc->dev, "ACMD%d failed, RESULT: %d\n", @@ -149,7 +149,7 @@ mmc_wait_for_app_cmd(device_t brdev, device_t reqdev, } int -mmc_switch(device_t brdev, device_t reqdev, uint16_t rca, uint8_t set, +mmc_switch(device_t busdev, device_t dev, uint16_t rca, uint8_t set, uint8_t index, uint8_t value, u_int timeout, bool status) { struct mmc_command cmd; @@ -158,7 +158,7 @@ mmc_switch(device_t brdev, device_t reqdev, uint16_t r KASSERT(timeout != 0, ("%s: no timeout", __func__)); - sc = device_get_softc(brdev); + sc = device_get_softc(busdev); memset(&cmd, 0, sizeof(cmd)); cmd.opcode = MMC_SWITCH_FUNC; @@ -169,8 +169,8 @@ mmc_switch(device_t brdev, device_t reqdev, uint16_t r * exceeds the maximum host timeout, use a R1 instead of a R1B * response in order to keep the hardware from timing out. */ - if (mmcbr_get_caps(brdev) & MMC_CAP_WAIT_WHILE_BUSY && - timeout > mmcbr_get_max_busy_timeout(brdev)) + if (mmcbr_get_caps(busdev) & MMC_CAP_WAIT_WHILE_BUSY && + timeout > mmcbr_get_max_busy_timeout(busdev)) cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; else cmd.flags = MMC_RSP_R1B | MMC_CMD_AC; @@ -180,17 +180,17 @@ mmc_switch(device_t brdev, device_t reqdev, uint16_t r * than to a tuning command that may have snuck in between. */ sc->retune_paused++; - err = mmc_wait_for_cmd(brdev, reqdev, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(busdev, dev, &cmd, CMD_RETRIES); if (err != MMC_ERR_NONE || status == false) goto out; - err = mmc_switch_status(brdev, reqdev, rca, timeout); + err = mmc_switch_status(busdev, dev, rca, timeout); out: sc->retune_paused--; return (err); } int -mmc_switch_status(device_t brdev, device_t reqdev, uint16_t rca, u_int timeout) +mmc_switch_status(device_t busdev, device_t dev, uint16_t rca, u_int timeout) { struct timeval cur, end; int err; @@ -205,7 +205,7 @@ mmc_switch_status(device_t brdev, device_t reqdev, uin */ end.tv_sec = end.tv_usec = 0; for (;;) { - err = mmc_send_status(brdev, reqdev, rca, &status); + err = mmc_send_status(busdev, dev, rca, &status); if (err != MMC_ERR_NONE) break; if (R1_CURRENT_STATE(status) == R1_STATE_TRAN) @@ -226,7 +226,7 @@ mmc_switch_status(device_t brdev, device_t reqdev, uin } int -mmc_send_ext_csd(device_t brdev, device_t reqdev, uint8_t *rawextcsd) +mmc_send_ext_csd(device_t busdev, device_t dev, uint8_t *rawextcsd) { struct mmc_command cmd; struct mmc_data data; @@ -244,12 +244,12 @@ mmc_send_ext_csd(device_t brdev, device_t reqdev, uint data.len = MMC_EXTCSD_SIZE; data.flags = MMC_DATA_READ; - err = mmc_wait_for_cmd(brdev, reqdev, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(busdev, dev, &cmd, CMD_RETRIES); return (err); } int -mmc_send_status(device_t brdev, device_t reqdev, uint16_t rca, uint32_t *status) +mmc_send_status(device_t busdev, device_t dev, uint16_t rca, uint32_t *status) { struct mmc_command cmd; int err; @@ -258,7 +258,7 @@ mmc_send_status(device_t brdev, device_t reqdev, uint1 cmd.opcode = MMC_SEND_STATUS; cmd.arg = (uint32_t)rca << 16; cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; - err = mmc_wait_for_cmd(brdev, reqdev, &cmd, CMD_RETRIES); + err = mmc_wait_for_cmd(busdev, dev, &cmd, CMD_RETRIES); *status = cmd.resp[0]; return (err); } Modified: head/sys/dev/mmc/mmc_subr.h ============================================================================== --- head/sys/dev/mmc/mmc_subr.h Wed Aug 2 20:42:39 2017 (r321947) +++ head/sys/dev/mmc/mmc_subr.h Wed Aug 2 21:11:51 2017 (r321948) @@ -57,16 +57,16 @@ struct mmc_command; -int mmc_send_ext_csd(device_t brdev, device_t reqdev, uint8_t *rawextcsd); -int mmc_send_status(device_t brdev, device_t reqdev, uint16_t rca, +int mmc_send_ext_csd(device_t busdev, device_t dev, uint8_t *rawextcsd); +int mmc_send_status(device_t busdev, device_t dev, uint16_t rca, uint32_t *status); -int mmc_switch(device_t brdev, device_t reqdev, uint16_t rca, uint8_t set, +int mmc_switch(device_t busdev, device_t dev, uint16_t rca, uint8_t set, uint8_t index, uint8_t value, u_int timeout, bool send_status); -int mmc_switch_status(device_t brdev, device_t reqdev, uint16_t rca, +int mmc_switch_status(device_t busdev, device_t dev, uint16_t rca, u_int timeout); -int mmc_wait_for_app_cmd(device_t brdev, device_t reqdev, uint16_t rca, +int mmc_wait_for_app_cmd(device_t busdev, device_t dev, uint16_t rca, struct mmc_command *cmd, int retries); -int mmc_wait_for_cmd(device_t brdev, device_t reqdev, struct mmc_command *cmd, +int mmc_wait_for_cmd(device_t busdev, device_t dev, struct mmc_command *cmd, int retries); #endif /* DEV_MMC_SUBR_H */ Modified: head/sys/dev/mmc/mmcbus_if.m ============================================================================== --- head/sys/dev/mmc/mmcbus_if.m Wed Aug 2 20:42:39 2017 (r321947) +++ head/sys/dev/mmc/mmcbus_if.m Wed Aug 2 21:11:51 2017 (r321948) @@ -68,7 +68,7 @@ INTERFACE mmcbus; # the bus to be claimed. # METHOD void retune_pause { - device_t brdev; + device_t busdev; device_t reqdev; bool retune; }; @@ -77,7 +77,7 @@ METHOD void retune_pause { # Unpause re-tuning. Requires the bus to be claimed. # METHOD void retune_unpause { - device_t brdev; + device_t busdev; device_t reqdev; }; @@ -85,7 +85,7 @@ METHOD void retune_unpause { # Queue and wait for a request. Requires the bus to be claimed. # METHOD int wait_for_request { - device_t brdev; + device_t busdev; device_t reqdev; struct mmc_request *req; }; @@ -95,7 +95,7 @@ METHOD int wait_for_request { # longer busy. # METHOD int acquire_bus { - device_t brdev; + device_t busdev; device_t reqdev; }; @@ -103,6 +103,6 @@ METHOD int acquire_bus { # Release the current bus. # METHOD int release_bus { - device_t brdev; + device_t busdev; device_t reqdev; }; Modified: head/sys/dev/mmc/mmcsd.c ============================================================================== --- head/sys/dev/mmc/mmcsd.c Wed Aug 2 20:42:39 2017 (r321947) +++ head/sys/dev/mmc/mmcsd.c Wed Aug 2 21:11:51 2017 (r321948) @@ -117,7 +117,7 @@ struct mmcsd_part { struct mmcsd_softc { device_t dev; - device_t mmcbr; + device_t mmcbus; struct mmcsd_part *part[MMC_PART_MAX]; enum mmc_card_mode mode; u_int max_data; /* Maximum data size [blocks] */ @@ -215,7 +215,7 @@ mmcsd_probe(device_t dev) static int mmcsd_attach(device_t dev) { - device_t mmcbr; + device_t mmcbus; struct mmcsd_softc *sc; const uint8_t *ext_csd; off_t erase_size, sector_size, size, wp_size; @@ -227,8 +227,8 @@ mmcsd_attach(device_t dev) sc = device_get_softc(dev); sc->dev = dev; - sc->mmcbr = mmcbr = device_get_parent(dev); - sc->mode = mmcbr_get_mode(mmcbr); + sc->mmcbus = mmcbus = device_get_parent(dev); + sc->mode = mmcbr_get_mode(mmcbus); /* * Note that in principle with an SDHCI-like re-tuning implementation, * the maximum data size can change at runtime due to a device removal/ @@ -245,9 +245,9 @@ mmcsd_attach(device_t dev) /* Only MMC >= 4.x devices support EXT_CSD. */ if (mmc_get_spec_vers(dev) >= 4) { - MMCBUS_ACQUIRE_BUS(mmcbr, dev); - err = mmc_send_ext_csd(mmcbr, dev, sc->ext_csd); - MMCBUS_RELEASE_BUS(mmcbr, dev); + MMCBUS_ACQUIRE_BUS(mmcbus, dev); + err = mmc_send_ext_csd(mmcbus, dev, sc->ext_csd); + MMCBUS_RELEASE_BUS(mmcbus, dev); if (err != MMC_ERR_NONE) bzero(sc->ext_csd, sizeof(sc->ext_csd)); } @@ -330,7 +330,7 @@ mmcsd_attach(device_t dev) /* Add boot partitions, which are of a fixed multiple of 128 KB. */ size = ext_csd[EXT_CSD_BOOT_SIZE_MULT] * MMC_BOOT_RPMB_BLOCK_SIZE; - if (size > 0 && (mmcbr_get_caps(mmcbr) & MMC_CAP_BOOT_NOACC) == 0) { + if (size > 0 && (mmcbr_get_caps(mmcbus) & MMC_CAP_BOOT_NOACC) == 0) { mmcsd_add_part(sc, EXT_CSD_PART_CONFIG_ACC_BOOT0, MMCSD_FMT_BOOT, 0, size, MMC_BOOT_RPMB_BLOCK_SIZE, ro | ((ext_csd[EXT_CSD_BOOT_WP_STATUS] & @@ -422,7 +422,7 @@ mmcsd_add_part(struct mmcsd_softc *sc, u_int type, con off_t media_size, off_t erase_size, bool ro) { struct make_dev_args args; - device_t dev, mmcbr; + device_t dev, mmcbus; const char *ext; const uint8_t *ext_csd; struct mmcsd_part *part; @@ -435,7 +435,7 @@ mmcsd_add_part(struct mmcsd_softc *sc, u_int type, con char unit[2]; dev = sc->dev; - mmcbr = sc->mmcbr; + mmcbus = sc->mmcbus; part = sc->part[type] = malloc(sizeof(*part), M_DEVBUF, M_WAITOK | M_ZERO); part->sc = sc; @@ -502,10 +502,10 @@ mmcsd_add_part(struct mmcsd_softc *sc, u_int type, con bytes = mmcsd_pretty_size(media_size, unit); if (type == EXT_CSD_PART_CONFIG_ACC_DEFAULT) { - speed = mmcbr_get_clock(mmcbr); + speed = mmcbr_get_clock(mmcbus); printf("%s%d: %ju%sB <%s>%s at %s %d.%01dMHz/%dbit/%d-block\n", part->name, cnt, bytes, unit, mmc_get_card_id_string(dev), - ro ? " (read-only)" : "", device_get_nameunit(mmcbr), + ro ? " (read-only)" : "", device_get_nameunit(mmcbus), speed / 1000000, (speed / 100000) % 10, mmcsd_bus_bit_width(dev), sc->max_data); } else if (type == EXT_CSD_PART_CONFIG_ACC_RPMB) { @@ -802,7 +802,7 @@ mmcsd_ioctl_cmd(struct mmcsd_part *part, struct mmc_io struct mmc_command cmd; struct mmc_data data; struct mmcsd_softc *sc; - device_t dev, mmcbr; + device_t dev, mmcbus; void *dp; u_long len; int err, retries; @@ -885,9 +885,9 @@ mmcsd_ioctl_cmd(struct mmcsd_part *part, struct mmc_io } } dev = sc->dev; - mmcbr = sc->mmcbr; - MMCBUS_ACQUIRE_BUS(mmcbr, dev); - err = mmcsd_switch_part(mmcbr, dev, rca, part->type); + mmcbus = sc->mmcbus; + MMCBUS_ACQUIRE_BUS(mmcbus, dev); + err = mmcsd_switch_part(mmcbus, dev, rca, part->type); if (err != MMC_ERR_NONE) goto release; if (part->type == EXT_CSD_PART_CONFIG_ACC_RPMB) { @@ -897,9 +897,9 @@ mmcsd_ioctl_cmd(struct mmcsd_part *part, struct mmc_io goto switch_back; } if (mic->is_acmd != 0) - (void)mmc_wait_for_app_cmd(mmcbr, dev, rca, &cmd, 0); + (void)mmc_wait_for_app_cmd(mmcbus, dev, rca, &cmd, 0); else - (void)mmc_wait_for_cmd(mmcbr, dev, &cmd, 0); + (void)mmc_wait_for_cmd(mmcbus, dev, &cmd, 0); if (part->type == EXT_CSD_PART_CONFIG_ACC_RPMB) { /* * If the request went to the RPMB partition, try to ensure @@ -907,7 +907,7 @@ mmcsd_ioctl_cmd(struct mmcsd_part *part, struct mmc_io */ retries = MMCSD_CMD_RETRIES; do { - err = mmc_send_status(mmcbr, dev, rca, &status); + err = mmc_send_status(mmcbus, dev, rca, &status); if (err != MMC_ERR_NONE) break; if (R1_STATUS(status) == 0 && @@ -918,7 +918,7 @@ mmcsd_ioctl_cmd(struct mmcsd_part *part, struct mmc_io switch_back: /* ... and always switch back to the default partition. */ - err = mmcsd_switch_part(mmcbr, dev, rca, + err = mmcsd_switch_part(mmcbus, dev, rca, EXT_CSD_PART_CONFIG_ACC_DEFAULT); if (err != MMC_ERR_NONE) goto release; @@ -929,11 +929,11 @@ switch_back: * so retrieve EXT_CSD again. */ if (cmd.opcode == MMC_SWITCH_FUNC) { - err = mmc_send_ext_csd(mmcbr, dev, sc->ext_csd); + err = mmc_send_ext_csd(mmcbus, dev, sc->ext_csd); if (err != MMC_ERR_NONE) goto release; } - MMCBUS_RELEASE_BUS(mmcbr, dev); + MMCBUS_RELEASE_BUS(mmcbus, dev); if (cmd.error != MMC_ERR_NONE) { switch (cmd.error) { case MMC_ERR_TIMEOUT: @@ -963,7 +963,7 @@ switch_back: goto out; release: - MMCBUS_RELEASE_BUS(mmcbr, dev); + MMCBUS_RELEASE_BUS(mmcbus, dev); err = EIO; out: @@ -1009,7 +1009,7 @@ mmcsd_set_blockcount(struct mmcsd_softc *sc, u_int cou if (reliable) cmd.arg |= 1 << 31; cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; - MMCBUS_WAIT_FOR_REQUEST(sc->mmcbr, sc->dev, &req); + MMCBUS_WAIT_FOR_REQUEST(sc->mmcbus, sc->dev, &req); return (cmd.error); } @@ -1036,7 +1036,7 @@ mmcsd_switch_part(device_t bus, device_t dev, uint16_t * anew. */ if (part == EXT_CSD_PART_CONFIG_ACC_RPMB) - MMCBUS_RETUNE_PAUSE(sc->mmcbr, sc->dev, true); + MMCBUS_RETUNE_PAUSE(sc->mmcbus, sc->dev, true); if (sc->part_curr == part) return (MMC_ERR_NONE); @@ -1048,13 +1048,13 @@ mmcsd_switch_part(device_t bus, device_t dev, uint16_t EXT_CSD_PART_CONFIG, value, sc->part_time, true); if (err != MMC_ERR_NONE) { if (part == EXT_CSD_PART_CONFIG_ACC_RPMB) - MMCBUS_RETUNE_UNPAUSE(sc->mmcbr, sc->dev); + MMCBUS_RETUNE_UNPAUSE(sc->mmcbus, sc->dev); return (err); } sc->ext_csd[EXT_CSD_PART_CONFIG] = value; if (sc->part_curr == EXT_CSD_PART_CONFIG_ACC_RPMB) - MMCBUS_RETUNE_UNPAUSE(sc->mmcbr, sc->dev); + MMCBUS_RETUNE_UNPAUSE(sc->mmcbus, sc->dev); sc->part_curr = part; return (MMC_ERR_NONE); } @@ -1077,13 +1077,13 @@ mmcsd_rw(struct mmcsd_part *part, struct bio *bp) struct mmc_request req; struct mmc_data data; struct mmcsd_softc *sc; - device_t dev, mmcbr; + device_t dev, mmcbus; u_int numblocks, sz; char *vaddr; sc = part->sc; dev = sc->dev; - mmcbr = sc->mmcbr; + mmcbus = sc->mmcbus; block = bp->bio_pblkno; sz = part->disk->d_sectorsize; @@ -1128,7 +1128,7 @@ mmcsd_rw(struct mmcsd_part *part, struct bio *bp) stop.mrq = &req; req.stop = &stop; } - MMCBUS_WAIT_FOR_REQUEST(mmcbr, dev, &req); + MMCBUS_WAIT_FOR_REQUEST(mmcbus, dev, &req); if (req.cmd->error != MMC_ERR_NONE) { if (ppsratecheck(&sc->log_time, &sc->log_count, LOG_PPS)) @@ -1149,12 +1149,12 @@ mmcsd_delete(struct mmcsd_part *part, struct bio *bp) struct mmc_command cmd; struct mmc_request req; struct mmcsd_softc *sc; - device_t dev, mmcbr; + device_t dev, mmcbus; u_int erase_sector, sz; sc = part->sc; dev = sc->dev; - mmcbr = sc->mmcbr; + mmcbus = sc->mmcbus; block = bp->bio_pblkno; sz = part->disk->d_sectorsize; @@ -1182,7 +1182,7 @@ mmcsd_delete(struct mmcsd_part *part, struct bio *bp) * commands. Note that these latter don't use the data lines, so * re-tuning shouldn't actually become necessary during erase. */ - MMCBUS_RETUNE_PAUSE(mmcbr, dev, false); + MMCBUS_RETUNE_PAUSE(mmcbus, dev, false); /* Set erase start position. */ memset(&req, 0, sizeof(req)); memset(&cmd, 0, sizeof(cmd)); @@ -1196,7 +1196,7 @@ mmcsd_delete(struct mmcsd_part *part, struct bio *bp) if (sc->high_cap == 0) cmd.arg <<= 9; cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; - MMCBUS_WAIT_FOR_REQUEST(mmcbr, dev, &req); + MMCBUS_WAIT_FOR_REQUEST(mmcbus, dev, &req); if (req.cmd->error != MMC_ERR_NONE) { device_printf(dev, "Setting erase start position failed %d\n", req.cmd->error); @@ -1216,7 +1216,7 @@ mmcsd_delete(struct mmcsd_part *part, struct bio *bp) cmd.arg <<= 9; cmd.arg--; cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; - MMCBUS_WAIT_FOR_REQUEST(mmcbr, dev, &req); + MMCBUS_WAIT_FOR_REQUEST(mmcbus, dev, &req); if (req.cmd->error != MMC_ERR_NONE) { device_printf(dev, "Setting erase stop position failed %d\n", req.cmd->error); @@ -1230,7 +1230,7 @@ mmcsd_delete(struct mmcsd_part *part, struct bio *bp) cmd.opcode = MMC_ERASE; cmd.arg = 0; cmd.flags = MMC_RSP_R1B | MMC_CMD_AC; - MMCBUS_WAIT_FOR_REQUEST(mmcbr, dev, &req); + MMCBUS_WAIT_FOR_REQUEST(mmcbus, dev, &req); if (req.cmd->error != MMC_ERR_NONE) { device_printf(dev, "erase err3: %d\n", req.cmd->error); device_printf(dev, "Issuing erase command failed %d\n", @@ -1248,7 +1248,7 @@ mmcsd_delete(struct mmcsd_part *part, struct bio *bp) } block = end; unpause: - MMCBUS_RETUNE_UNPAUSE(mmcbr, dev); + MMCBUS_RETUNE_UNPAUSE(mmcbus, dev); return (block); } @@ -1261,7 +1261,7 @@ mmcsd_dump(void *arg, void *virtual, vm_offset_t physi struct disk *disk; struct mmcsd_softc *sc; struct mmcsd_part *part; - device_t dev, mmcbr; + device_t dev, mmcbus; int err; /* length zero is special and really means flush buffers to media */ @@ -1272,7 +1272,7 @@ mmcsd_dump(void *arg, void *virtual, vm_offset_t physi part = disk->d_drv1; sc = part->sc; dev = sc->dev; - mmcbr = sc->mmcbr; + mmcbus = sc->mmcbus; g_reset_bio(&bp); bp.bio_disk = disk; @@ -1281,16 +1281,16 @@ mmcsd_dump(void *arg, void *virtual, vm_offset_t physi bp.bio_data = virtual; bp.bio_cmd = BIO_WRITE; end = bp.bio_pblkno + bp.bio_bcount / disk->d_sectorsize; - MMCBUS_ACQUIRE_BUS(mmcbr, dev); - err = mmcsd_switch_part(mmcbr, dev, sc->rca, part->type); + MMCBUS_ACQUIRE_BUS(mmcbus, dev); + err = mmcsd_switch_part(mmcbus, dev, sc->rca, part->type); if (err != MMC_ERR_NONE) { if (ppsratecheck(&sc->log_time, &sc->log_count, LOG_PPS)) device_printf(dev, "Partition switch error\n"); - MMCBUS_RELEASE_BUS(mmcbr, dev); + MMCBUS_RELEASE_BUS(mmcbus, dev); return (EIO); } block = mmcsd_rw(part, &bp); - MMCBUS_RELEASE_BUS(mmcbr, dev); + MMCBUS_RELEASE_BUS(mmcbus, dev); return ((end < block) ? EIO : 0); } @@ -1301,13 +1301,13 @@ mmcsd_task(void *arg) struct mmcsd_part *part; struct mmcsd_softc *sc; struct bio *bp; - device_t dev, mmcbr; + device_t dev, mmcbus; int err, sz; part = arg; sc = part->sc; dev = sc->dev; - mmcbr = sc->mmcbr; + mmcbus = sc->mmcbus; while (1) { MMCSD_DISK_LOCK(part); @@ -1327,11 +1327,11 @@ mmcsd_task(void *arg) biodone(bp); continue; } - MMCBUS_ACQUIRE_BUS(mmcbr, dev); + MMCBUS_ACQUIRE_BUS(mmcbus, dev); sz = part->disk->d_sectorsize; block = bp->bio_pblkno; end = bp->bio_pblkno + (bp->bio_bcount / sz); - err = mmcsd_switch_part(mmcbr, dev, sc->rca, part->type); + err = mmcsd_switch_part(mmcbus, dev, sc->rca, part->type); if (err != MMC_ERR_NONE) { if (ppsratecheck(&sc->log_time, &sc->log_count, LOG_PPS)) @@ -1347,7 +1347,7 @@ mmcsd_task(void *arg) block = mmcsd_delete(part, bp); } release: - MMCBUS_RELEASE_BUS(mmcbr, dev); + MMCBUS_RELEASE_BUS(mmcbus, dev); if (block < end) { bp->bio_error = EIO; bp->bio_resid = (end - block) * sz; From owner-svn-src-head@freebsd.org Wed Aug 2 21:18:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C0FBDB5089; Wed, 2 Aug 2017 21:18:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 146567C4F8; Wed, 2 Aug 2017 21:18:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72LItLT039721; Wed, 2 Aug 2017 21:18:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72LIt94039720; Wed, 2 Aug 2017 21:18:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708022118.v72LIt94039720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 2 Aug 2017 21:18:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321949 - head/bin/chmod/tests X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/bin/chmod/tests X-SVN-Commit-Revision: 321949 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 21:18:56 -0000 Author: ngie Date: Wed Aug 2 21:18:54 2017 New Revision: 321949 URL: https://svnweb.freebsd.org/changeset/base/321949 Log: Add expected failures for ZFS - :f_flag fails on ZFS because UF_IMMUTABLE isn't supported [1]. - :v_flag fails on ZFS because the mode for foo is [always] updated unnecessarily. get_filesystem(..) (supporting function that was added to the test script) is based on equivalent logic in usr.bin/extattr/tests/extattr_test.sh . MFC after: 1 week PR: 221189 [1], 221188 [2] Modified: head/bin/chmod/tests/chmod_test.sh Modified: head/bin/chmod/tests/chmod_test.sh ============================================================================== --- head/bin/chmod/tests/chmod_test.sh Wed Aug 2 21:11:51 2017 (r321948) +++ head/bin/chmod/tests/chmod_test.sh Wed Aug 2 21:18:54 2017 (r321949) @@ -25,6 +25,11 @@ # # $FreeBSD$ +get_filesystem() +{ + df -T . | tail -n 1 | cut -wf 2 +} + atf_test_case RH_flag RH_flag_head() { @@ -94,6 +99,11 @@ f_flag_body() { atf_check truncate -s 0 foo bar atf_check chmod 0750 foo bar + case "$(get_filesystem .)" in + zfs) + atf_expect_fail "ZFS doesn't support UF_IMMUTABLE; returns EPERM - bug 221189" + ;; + esac atf_check chflags uchg foo atf_check -e not-empty -s not-exit:0 chmod 0700 foo bar atf_check -o inline:'100750\n100700\n' stat -f '%p' foo bar @@ -140,6 +150,11 @@ v_flag_body() atf_check truncate -s 0 foo bar atf_check chmod 0600 foo atf_check chmod 0750 bar + case "$(get_filesystem .)" in + zfs) + atf_expect_fail "ZFS updates mode for foo unnecessarily - bug 221188" + ;; + esac atf_check -o 'inline:bar\n' chmod -v 0600 foo bar atf_check chmod -v 0600 foo bar for f in foo bar; do From owner-svn-src-head@freebsd.org Wed Aug 2 21:20:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D7BDDB5207; Wed, 2 Aug 2017 21:20:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F12607C79F; Wed, 2 Aug 2017 21:20:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72LKohu040602; Wed, 2 Aug 2017 21:20:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72LKolK040601; Wed, 2 Aug 2017 21:20:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708022120.v72LKolK040601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 2 Aug 2017 21:20:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321950 - head/bin/chmod/tests X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/bin/chmod/tests X-SVN-Commit-Revision: 321950 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 21:20:51 -0000 Author: ngie Date: Wed Aug 2 21:20:49 2017 New Revision: 321950 URL: https://svnweb.freebsd.org/changeset/base/321950 Log: Always use first parameter passed to get_filesystem(..) instead of discarding it and using `.` instead. MFC after: 1 week MFC with: r321949 PR: 221189 [1], 221188 [2] Modified: head/bin/chmod/tests/chmod_test.sh Modified: head/bin/chmod/tests/chmod_test.sh ============================================================================== --- head/bin/chmod/tests/chmod_test.sh Wed Aug 2 21:18:54 2017 (r321949) +++ head/bin/chmod/tests/chmod_test.sh Wed Aug 2 21:20:49 2017 (r321950) @@ -27,7 +27,9 @@ get_filesystem() { - df -T . | tail -n 1 | cut -wf 2 + local mountpoint=$1 + + df -T $mountpoint | tail -n 1 | cut -wf 2 } atf_test_case RH_flag From owner-svn-src-head@freebsd.org Wed Aug 2 21:31:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2762DB5670; Wed, 2 Aug 2017 21:31:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91AA47CF31; Wed, 2 Aug 2017 21:31:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72LVk4E046558; Wed, 2 Aug 2017 21:31:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72LVkeV046536; Wed, 2 Aug 2017 21:31:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708022131.v72LVkeV046536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 2 Aug 2017 21:31:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321951 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 321951 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 21:31:47 -0000 Author: ngie Date: Wed Aug 2 21:31:46 2017 New Revision: 321951 URL: https://svnweb.freebsd.org/changeset/base/321951 Log: Some minor doc fixups - Tweak a sentence by placing the modifier before an adjective to make it flow better. - Fix a typo. MFC after: 3 days Modified: head/share/mk/bsd.opts.mk Modified: head/share/mk/bsd.opts.mk ============================================================================== --- head/share/mk/bsd.opts.mk Wed Aug 2 21:20:49 2017 (r321950) +++ head/share/mk/bsd.opts.mk Wed Aug 2 21:31:46 2017 (r321951) @@ -4,7 +4,7 @@ # # Users define WITH_FOO and WITHOUT_FOO on the command line or in /etc/src.conf # and /etc/make.conf files. These translate in the build system to MK_FOO={yes,no} -# with sensible (usually) defaults. +# with (usually) sensible defaults. # # Makefiles must include bsd.opts.mk after defining specific MK_FOO options that # are applicable for that Makefile (typically there are none, but sometimes there @@ -41,7 +41,7 @@ ____: # # Only these options are used by bsd.*.mk. KERBEROS and OPENSSH are -# unforutnately needed to support statically linking the entire +# unfortunately needed to support statically linking the entire # tree. su(1) wouldn't link since it depends on PAM which depends on # ssh libraries when building with OPENSSH, and likewise for KERBEROS. From owner-svn-src-head@freebsd.org Wed Aug 2 21:38:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCDBDDB5778; Wed, 2 Aug 2017 21:38:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8783D7D1A7; Wed, 2 Aug 2017 21:38:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72LcFiN048041; Wed, 2 Aug 2017 21:38:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72LcF97048040; Wed, 2 Aug 2017 21:38:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708022138.v72LcF97048040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 2 Aug 2017 21:38:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321952 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 321952 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 21:38:16 -0000 Author: ngie Date: Wed Aug 2 21:38:15 2017 New Revision: 321952 URL: https://svnweb.freebsd.org/changeset/base/321952 Log: Allowing MK_NLS_CATALOGS to be enabled if MK_NLS == no doesn't make a whole lot of sense. Anchor MK_NLS_CATALOGS being enabled off of MK_NLS. MFC after: 1 month Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Wed Aug 2 21:31:46 2017 (r321951) +++ head/share/mk/src.opts.mk Wed Aug 2 21:38:15 2017 (r321952) @@ -376,6 +376,10 @@ MK_ATM:= no MK_BLUETOOTH:= no .endif +.if ${MK_NLS} == "no" +MK_NLS_CATALOGS:= no +.endif + .if ${MK_OPENSSL} == "no" MK_OPENSSH:= no MK_KERBEROS:= no From owner-svn-src-head@freebsd.org Wed Aug 2 21:40:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8021DB599D; Wed, 2 Aug 2017 21:40:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 952457D3C1; Wed, 2 Aug 2017 21:40:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72LepMc048747; Wed, 2 Aug 2017 21:40:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72LepSt048727; Wed, 2 Aug 2017 21:40:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708022140.v72LepSt048727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 2 Aug 2017 21:40:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321953 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 321953 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 21:40:52 -0000 Author: ngie Date: Wed Aug 2 21:40:51 2017 New Revision: 321953 URL: https://svnweb.freebsd.org/changeset/base/321953 Log: Regenerate src.conf(5) per change made in r321952 Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Wed Aug 2 21:38:15 2017 (r321952) +++ head/share/man/man5/src.conf.5 Wed Aug 2 21:40:51 2017 (r321953) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd July 5, 2017 +.Dd August 2, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1156,6 +1156,12 @@ and remove entries. .It Va WITHOUT_NLS Set to not build NLS catalogs. +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_NLS_CATALOGS +.El .It Va WITHOUT_NLS_CATALOGS Set to not build NLS catalog support for .Xr csh 1 . From owner-svn-src-head@freebsd.org Wed Aug 2 21:49:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CCBADB5FCD; Wed, 2 Aug 2017 21:49:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AEC77D923; Wed, 2 Aug 2017 21:49:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72Lnb7F052233; Wed, 2 Aug 2017 21:49:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72LnbGD052232; Wed, 2 Aug 2017 21:49:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708022149.v72LnbGD052232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 2 Aug 2017 21:49:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321954 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 321954 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 21:49:38 -0000 Author: ngie Date: Wed Aug 2 21:49:37 2017 New Revision: 321954 URL: https://svnweb.freebsd.org/changeset/base/321954 Log: Delete comment above "__DEFAULT_DEPENDENT_OPTIONS" related to "meta mode options" src.conf(5) should document which knobs are which and the dependency between each; remove the comment so the variable can apply to non-"meta mode options". MFC after: 2 weeks Modified: head/share/mk/bsd.opts.mk Modified: head/share/mk/bsd.opts.mk ============================================================================== --- head/share/mk/bsd.opts.mk Wed Aug 2 21:40:51 2017 (r321953) +++ head/share/mk/bsd.opts.mk Wed Aug 2 21:49:37 2017 (r321954) @@ -72,7 +72,6 @@ __DEFAULT_NO_OPTIONS = \ INSTALL_AS_USER \ STALE_STAGED -# meta mode related __DEFAULT_DEPENDENT_OPTIONS = \ STAGING_MAN/STAGING \ STAGING_PROG/STAGING \ From owner-svn-src-head@freebsd.org Wed Aug 2 22:19:46 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABCECDB675F; Wed, 2 Aug 2017 22:19:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7972C7E861; Wed, 2 Aug 2017 22:19:46 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v72MJjYj064708; Wed, 2 Aug 2017 22:19:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v72MJjHe064707; Wed, 2 Aug 2017 22:19:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708022219.v72MJjHe064707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 2 Aug 2017 22:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321959 - head/tests/sys/kern X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tests/sys/kern X-SVN-Commit-Revision: 321959 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2017 22:19:46 -0000 Author: ngie Date: Wed Aug 2 22:19:45 2017 New Revision: 321959 URL: https://svnweb.freebsd.org/changeset/base/321959 Log: Annotate tests that require root privileges appropriately This unbreaks running the tests with unprivileged users. MFC after: 1 week Modified: head/tests/sys/kern/ptrace_test.c Modified: head/tests/sys/kern/ptrace_test.c ============================================================================== --- head/tests/sys/kern/ptrace_test.c Wed Aug 2 22:08:49 2017 (r321958) +++ head/tests/sys/kern/ptrace_test.c Wed Aug 2 22:19:45 2017 (r321959) @@ -1868,7 +1868,12 @@ mask_usr1_thread(void *arg) * Verify that the SIGKILL from PT_KILL takes priority over other signals * and prevents spurious stops due to those other signals. */ -ATF_TC_WITHOUT_HEAD(ptrace__PT_KILL_competing_signal); +ATF_TC(ptrace__PT_KILL_competing_signal); +ATF_TC_HEAD(ptrace__PT_KILL_competing_signal, tc) +{ + + atf_tc_set_md_var(tc, "require.user", "root"); +} ATF_TC_BODY(ptrace__PT_KILL_competing_signal, tc) { pid_t fpid, wpid; @@ -1962,7 +1967,12 @@ ATF_TC_BODY(ptrace__PT_KILL_competing_signal, tc) * Verify that the SIGKILL from PT_KILL takes priority over other stop events * and prevents spurious stops caused by those events. */ -ATF_TC_WITHOUT_HEAD(ptrace__PT_KILL_competing_stop); +ATF_TC(ptrace__PT_KILL_competing_stop); +ATF_TC_HEAD(ptrace__PT_KILL_competing_stop, tc) +{ + + atf_tc_set_md_var(tc, "require.user", "root"); +} ATF_TC_BODY(ptrace__PT_KILL_competing_stop, tc) { pid_t fpid, wpid; @@ -2940,13 +2950,24 @@ terminate_with_pending_sigstop(bool sigstop_from_main_ * to the older thread (the second test). This behavior has changed in the * past, so make no assumption. */ -ATF_TC_WITHOUT_HEAD(ptrace__parent_terminate_with_pending_sigstop1); +ATF_TC(ptrace__parent_terminate_with_pending_sigstop1); +ATF_TC_HEAD(ptrace__parent_terminate_with_pending_sigstop1, tc) +{ + + atf_tc_set_md_var(tc, "require.user", "root"); +} ATF_TC_BODY(ptrace__parent_terminate_with_pending_sigstop1, tc) { terminate_with_pending_sigstop(true); } -ATF_TC_WITHOUT_HEAD(ptrace__parent_terminate_with_pending_sigstop2); + +ATF_TC(ptrace__parent_terminate_with_pending_sigstop2); +ATF_TC_HEAD(ptrace__parent_terminate_with_pending_sigstop2, tc) +{ + + atf_tc_set_md_var(tc, "require.user", "root"); +} ATF_TC_BODY(ptrace__parent_terminate_with_pending_sigstop2, tc) { From owner-svn-src-head@freebsd.org Thu Aug 3 00:38:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7DFFDBCAA1; Thu, 3 Aug 2017 00:38:14 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92FAA81D5A; Thu, 3 Aug 2017 00:38:14 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v730cDQO021865; Thu, 3 Aug 2017 00:38:13 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v730cD76021861; Thu, 3 Aug 2017 00:38:13 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201708030038.v730cD76021861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 3 Aug 2017 00:38:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321963 - in head: . cddl/contrib/opensolaris/cmd/lockstat share/man/man4 sys/dev/ksyms sys/sys X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head: . cddl/contrib/opensolaris/cmd/lockstat share/man/man4 sys/dev/ksyms sys/sys X-SVN-Commit-Revision: 321963 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 00:38:14 -0000 Author: markj Date: Thu Aug 3 00:38:13 2017 New Revision: 321963 URL: https://svnweb.freebsd.org/changeset/base/321963 Log: Rework and simplify the ksyms(4) implementation. - Store the symbol table contents in an anonymous swap-backed object. Have mmap(/dev/ksyms) map that object, and stop mapping the symbol table into the calling process in ksyms_open(). Previously we would cache a pointer to the pmap of the opening process, and mmap(/dev/ksyms) would create a mapping using the physical address found by a pmap lookup at the initial mapping address. However, this assumes that the cached pmap is valid, which may not be the case. [1] - Remove the ksyms ioctl interface. It appears to have been added to work around a limitation in libelf that no longer exists; see r321842. Moreover, the interface is difficult to support and isn't present in illumos. Since ksyms was added specifically to support lockstat(1), it is expected that this removal won't have any real impact. - Simplify ksyms_read() to avoid unnecessary copying. - Don't call the device handle destructor if we fail to capture a snapshot of the kernel's symbol table. devfs will do that for us. Reported by: Ilja van Sprundel [1] Reviewed by: kib (previous revision) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11789 Deleted: head/sys/sys/ksyms.h Modified: head/ObsoleteFiles.inc head/cddl/contrib/opensolaris/cmd/lockstat/sym.c head/share/man/man4/ksyms.4 head/sys/dev/ksyms/ksyms.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Aug 3 00:35:35 2017 (r321962) +++ head/ObsoleteFiles.inc Thu Aug 3 00:38:13 2017 (r321963) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20170802: ksyms(4) ioctl interface was removed +OLD_FILES+=usr/include/sys/ksyms.h + # 20170722: new clang import which bumps version from 4.0.0 to 5.0.0. OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/allocator_interface.h OLD_FILES+=usr/lib/clang/4.0.0/include/sanitizer/asan_interface.h Modified: head/cddl/contrib/opensolaris/cmd/lockstat/sym.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/lockstat/sym.c Thu Aug 3 00:35:35 2017 (r321962) +++ head/cddl/contrib/opensolaris/cmd/lockstat/sym.c Thu Aug 3 00:38:13 2017 (r321963) @@ -48,7 +48,6 @@ #include #else #include -#include #include #include #include Modified: head/share/man/man4/ksyms.4 ============================================================================== --- head/share/man/man4/ksyms.4 Thu Aug 3 00:35:35 2017 (r321962) +++ head/share/man/man4/ksyms.4 Thu Aug 3 00:38:13 2017 (r321963) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 5, 2009 +.Dd August 2, 2017 .Dt KSYMS 4 .Os .Sh NAME @@ -69,24 +69,6 @@ driver does not block the loading or unloading of modu while the .Pa /dev/ksyms file is open but may contain stale data. -.Sh IOCTLS -The -.Xr ioctl 2 -command codes below are defined in -.Aq Pa sys/ksyms.h . -.Pp -The (third) argument to the -.Xr ioctl 2 -should be a pointer to the type indicated. -.Bl -tag -width indent -offset indent -.It Dv KIOCGSIZE (size_t) -Returns the total size of the current symbol table. -This can be used when allocating a buffer to make a copy of -the kernel symbol table. -.It Dv KIOCGADDR (void *) -Returns the address of the kernel symbol table mapped in -the process memory. -.El .Sh FILES .Bl -tag -width /dev/ksymsX .It Pa /dev/ksyms @@ -112,7 +94,6 @@ This may occur if the kernel was in the process of loa unloading a module. .El .Sh SEE ALSO -.Xr ioctl 2 , .Xr nlist 3 , .Xr elf 5 , .Xr kldload 8 @@ -152,12 +133,3 @@ file once at a time. The process must close the .Pa /dev/ksyms before it is allowed to open it again. -.Pp -The -.Nm -driver uses the calling process' memory address space to store the snapshot. -.Xr ioctl 2 -can be used to get the memory address where the symbol table is stored to -save kernel memory. -.Xr mmap 2 -may also be used but it will map it to another address. Modified: head/sys/dev/ksyms/ksyms.c ============================================================================== --- head/sys/dev/ksyms/ksyms.c Thu Aug 3 00:35:35 2017 (r321962) +++ head/sys/dev/ksyms/ksyms.c Thu Aug 3 00:38:13 2017 (r321963) @@ -32,16 +32,15 @@ #include #include -#include #include #include #include #include -#include #include #include #include #include +#include #include #include @@ -49,7 +48,7 @@ #include #include #include -#include +#include #include "linker_if.h" @@ -68,18 +67,14 @@ static d_open_t ksyms_open; static d_read_t ksyms_read; -static d_close_t ksyms_close; -static d_ioctl_t ksyms_ioctl; -static d_mmap_t ksyms_mmap; +static d_mmap_single_t ksyms_mmap_single; static struct cdevsw ksyms_cdevsw = { .d_version = D_VERSION, .d_flags = D_TRACKCLOSE, .d_open = ksyms_open, - .d_close = ksyms_close, .d_read = ksyms_read, - .d_ioctl = ksyms_ioctl, - .d_mmap = ksyms_mmap, + .d_mmap_single = ksyms_mmap_single, .d_name = KSYMS_DNAME }; @@ -87,11 +82,12 @@ struct ksyms_softc { LIST_ENTRY(ksyms_softc) sc_list; vm_offset_t sc_uaddr; size_t sc_usize; - pmap_t sc_pmap; + vm_object_t sc_obj; + vm_size_t sc_objsz; struct proc *sc_proc; }; -static struct mtx ksyms_mtx; +static struct sx ksyms_mtx; static struct cdev *ksyms_dev; static LIST_HEAD(, ksyms_softc) ksyms_list = LIST_HEAD_INITIALIZER(ksyms_list); @@ -112,6 +108,7 @@ struct tsizes { }; struct toffsets { + struct ksyms_softc *to_sc; vm_offset_t to_symoff; vm_offset_t to_stroff; unsigned to_stridx; @@ -155,11 +152,25 @@ ksyms_size_calc(struct tsizes *ts) (void)linker_file_foreach(ksyms_size_permod, ts); } -#define KSYMS_EMIT(src, des, sz) do { \ - copyout(src, (void *)des, sz); \ - des += sz; \ -} while (0) +static int +ksyms_emit(struct ksyms_softc *sc, void *buf, off_t off, size_t sz) +{ + struct iovec iov; + struct uio uio; + iov.iov_base = buf; + iov.iov_len = sz; + uio.uio_iov = &iov; + uio.uio_iovcnt = 1; + uio.uio_offset = off; + uio.uio_resid = (ssize_t)sz; + uio.uio_segflg = UIO_SYSSPACE; + uio.uio_rw = UIO_WRITE; + uio.uio_td = curthread; + + return (uiomove_object(sc->sc_obj, sc->sc_objsz, &uio)); +} + #define SYMBLKSZ (256 * sizeof(Elf_Sym)) /* @@ -170,24 +181,24 @@ static int ksyms_add(linker_file_t lf, void *arg) { char *buf; + struct ksyms_softc *sc; struct toffsets *to; const Elf_Sym *symtab; Elf_Sym *symp; caddr_t strtab; - long symsz; - size_t strsz, numsyms; + size_t len, numsyms, strsz, symsz; linker_symval_t symval; - int i, nsyms, len; + int error, i, nsyms; + buf = malloc(SYMBLKSZ, M_KSYMS, M_WAITOK); to = arg; + sc = to->to_sc; MOD_SLOCK; numsyms = LINKER_SYMTAB_GET(lf, &symtab); strsz = LINKER_STRTAB_GET(lf, &strtab); symsz = numsyms * sizeof(Elf_Sym); - buf = malloc(SYMBLKSZ, M_KSYMS, M_WAITOK); - while (symsz > 0) { len = min(SYMBLKSZ, symsz); bcopy(symtab, buf, len); @@ -213,7 +224,13 @@ ksyms_add(linker_file_t lf, void *arg) return (ENXIO); } to->to_resid -= len; - KSYMS_EMIT(buf, to->to_symoff, len); + error = ksyms_emit(sc, buf, to->to_symoff, len); + to->to_symoff += len; + if (error != 0) { + MOD_SUNLOCK; + free(buf, M_KSYMS); + return (error); + } symtab += nsyms; symsz -= len; @@ -224,10 +241,11 @@ ksyms_add(linker_file_t lf, void *arg) if (strsz > to->to_resid) return (ENXIO); to->to_resid -= strsz; - KSYMS_EMIT(strtab, to->to_stroff, strsz); + error = ksyms_emit(sc, strtab, to->to_stroff, strsz); + to->to_stroff += strsz; to->to_stridx += strsz; - return (0); + return (error); } /* @@ -236,11 +254,11 @@ ksyms_add(linker_file_t lf, void *arg) * 0 on success, otherwise error. */ static int -ksyms_snapshot(struct tsizes *ts, vm_offset_t uaddr, size_t resid) +ksyms_snapshot(struct ksyms_softc *sc, struct tsizes *ts) { - struct ksyms_hdr *hdr; struct toffsets to; - int error = 0; + struct ksyms_hdr *hdr; + int error; hdr = malloc(sizeof(*hdr), M_KSYMS, M_WAITOK | M_ZERO); @@ -334,39 +352,41 @@ ksyms_snapshot(struct tsizes *ts, vm_offset_t uaddr, s /* Copy shstrtab into the header. */ bcopy(ksyms_shstrtab, hdr->kh_shstrtab, sizeof(ksyms_shstrtab)); - to.to_symoff = uaddr + hdr->kh_shdr[SHDR_SYMTAB].sh_offset; - to.to_stroff = uaddr + hdr->kh_shdr[SHDR_STRTAB].sh_offset; + to.to_sc = sc; + to.to_symoff = hdr->kh_shdr[SHDR_SYMTAB].sh_offset; + to.to_stroff = hdr->kh_shdr[SHDR_STRTAB].sh_offset; to.to_stridx = 0; - if (sizeof(struct ksyms_hdr) > resid) { - free(hdr, M_KSYMS); - return (ENXIO); - } - to.to_resid = resid - sizeof(struct ksyms_hdr); + to.to_resid = sc->sc_objsz - sizeof(struct ksyms_hdr); /* emit header */ - copyout(hdr, (void *)uaddr, sizeof(struct ksyms_hdr)); - + error = ksyms_emit(sc, hdr, 0, sizeof(*hdr)); free(hdr, M_KSYMS); + if (error != 0) + return (error); /* Add symbol and string tables for each kernel module. */ error = linker_file_foreach(ksyms_add, &to); - + if (error != 0) + return (error); if (to.to_resid != 0) return (ENXIO); - - return (error); + return (0); } static void ksyms_cdevpriv_dtr(void *data) { struct ksyms_softc *sc; + vm_object_t obj; sc = (struct ksyms_softc *)data; - mtx_lock(&ksyms_mtx); + sx_xlock(&ksyms_mtx); LIST_REMOVE(sc, sc_list); - mtx_unlock(&ksyms_mtx); + sx_xunlock(&ksyms_mtx); + obj = sc->sc_obj; + if (obj != NULL) + vm_object_deallocate(obj); free(sc, M_KSYMS); } @@ -375,34 +395,31 @@ ksyms_open(struct cdev *dev, int flags, int fmt __unus { struct tsizes ts; struct ksyms_softc *sc; - size_t total_elf_sz; + vm_size_t elfsz; int error, try; /* * Limit one open() per process. The process must close() * before open()'ing again. */ - mtx_lock(&ksyms_mtx); + sx_xlock(&ksyms_mtx); LIST_FOREACH(sc, &ksyms_list, sc_list) { if (sc->sc_proc == td->td_proc) { - mtx_unlock(&ksyms_mtx); + sx_xunlock(&ksyms_mtx); return (EBUSY); } } - sc = malloc(sizeof(*sc), M_KSYMS, M_NOWAIT | M_ZERO); - if (sc == NULL) { - mtx_unlock(&ksyms_mtx); - return (ENOMEM); - } + sc = malloc(sizeof(*sc), M_KSYMS, M_WAITOK | M_ZERO); sc->sc_proc = td->td_proc; - sc->sc_pmap = &td->td_proc->p_vmspace->vm_pmap; LIST_INSERT_HEAD(&ksyms_list, sc, sc_list); - mtx_unlock(&ksyms_mtx); + sx_xunlock(&ksyms_mtx); error = devfs_set_cdevpriv(sc, ksyms_cdevpriv_dtr); - if (error != 0) - goto failed; + if (error != 0) { + ksyms_cdevpriv_dtr(sc); + return (error); + } /* * MOD_SLOCK doesn't work here (because of a lock reversal with @@ -412,32 +429,20 @@ ksyms_open(struct cdev *dev, int flags, int fmt __unus * time. */ for (try = 0; try < 3; try++) { - /* - * Map a buffer in the calling process memory space and - * create a snapshot of the kernel symbol table in it. - */ - - /* Compute the size of buffer needed. */ ksyms_size_calc(&ts); - total_elf_sz = sizeof(struct ksyms_hdr) + ts.ts_symsz + - ts.ts_strsz; + elfsz = sizeof(struct ksyms_hdr) + ts.ts_symsz + ts.ts_strsz; - error = copyout_map(td, &sc->sc_uaddr, (vm_size_t)total_elf_sz); - if (error != 0) - break; - sc->sc_usize = total_elf_sz; + sc->sc_obj = vm_object_allocate(OBJT_DEFAULT, + OFF_TO_IDX(round_page(elfsz))); + sc->sc_objsz = elfsz; - error = ksyms_snapshot(&ts, sc->sc_uaddr, total_elf_sz); + error = ksyms_snapshot(sc, &ts); if (error == 0) - /* successful snapshot */ - return (0); + break; - /* Snapshot failed, unmap the memory and try again. */ - (void)copyout_unmap(td, sc->sc_uaddr, sc->sc_usize); + vm_object_deallocate(sc->sc_obj); + sc->sc_obj = NULL; } - -failed: - ksyms_cdevpriv_dtr(sc); return (error); } @@ -445,125 +450,38 @@ static int ksyms_read(struct cdev *dev, struct uio *uio, int flags __unused) { struct ksyms_softc *sc; - char *buf; - off_t off; - size_t len, sz; - vm_size_t ubase; int error; error = devfs_get_cdevpriv((void **)&sc); if (error != 0) return (error); - - off = uio->uio_offset; - len = uio->uio_resid; - - if (off < 0 || off > sc->sc_usize) - return (EFAULT); - - if (len > sc->sc_usize - off) - len = sc->sc_usize - off; - if (len == 0) - return (0); - - /* - * Since the snapshot buffer is in the user space we have to copy it - * in to the kernel and then back out. The extra copy saves valuable - * kernel memory. - */ - buf = malloc(PAGE_SIZE, M_KSYMS, M_WAITOK); - ubase = sc->sc_uaddr + off; - - while (len) { - sz = min(PAGE_SIZE, len); - if (copyin((void *)ubase, buf, sz) != 0) - error = EFAULT; - else - error = uiomove(buf, sz, uio); - if (error != 0) - break; - - len -= sz; - ubase += sz; - } - free(buf, M_KSYMS); - - return (error); + return (uiomove_object(sc->sc_obj, sc->sc_objsz, uio)); } static int -ksyms_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int32_t flag __unused, - struct thread *td __unused) +ksyms_mmap_single(struct cdev *dev, vm_ooffset_t *offset, vm_size_t size, + vm_object_t *objp, int nprot) { struct ksyms_softc *sc; + vm_object_t obj; int error; error = devfs_get_cdevpriv((void **)&sc); if (error != 0) return (error); - switch (cmd) { - case KIOCGSIZE: - /* - * Return the size (in bytes) of the symbol table - * snapshot. - */ - *(size_t *)data = sc->sc_usize; - break; - case KIOCGADDR: - /* - * Return the address of the symbol table snapshot. - * XXX - compat32 version of this? - */ - *(void **)data = (void *)sc->sc_uaddr; - break; - default: - error = ENOTTY; - break; - } + if (*offset < 0 || *offset >= round_page(sc->sc_objsz) || + size > round_page(sc->sc_objsz) - *offset || + (nprot & ~PROT_READ) != 0) + return (EINVAL); - return (error); -} - -static int -ksyms_mmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, - int prot __unused, vm_memattr_t *memattr __unused) -{ - struct ksyms_softc *sc; - int error; - - error = devfs_get_cdevpriv((void **)&sc); - if (error != 0) - return (error); - - /* - * XXX mmap() will actually map the symbol table into the process - * address space again. - */ - if (offset > round_page(sc->sc_usize) || - (*paddr = pmap_extract(sc->sc_pmap, - (vm_offset_t)sc->sc_uaddr + offset)) == 0) - return (-1); - + obj = sc->sc_obj; + vm_object_reference(obj); + *objp = obj; return (0); } static int -ksyms_close(struct cdev *dev, int flags __unused, int fmt __unused, - struct thread *td) -{ - struct ksyms_softc *sc; - int error; - - error = devfs_get_cdevpriv((void **)&sc); - if (error != 0) - return (error); - - /* Unmap the buffer from the process address space. */ - return (copyout_unmap(td, sc->sc_uaddr, sc->sc_usize)); -} - -static int ksyms_modevent(module_t mod __unused, int type, void *data __unused) { int error; @@ -571,7 +489,7 @@ ksyms_modevent(module_t mod __unused, int type, void * error = 0; switch (type) { case MOD_LOAD: - mtx_init(&ksyms_mtx, "KSyms mtx", NULL, MTX_DEF); + sx_init(&ksyms_mtx, "KSyms mtx"); ksyms_dev = make_dev(&ksyms_cdevsw, 0, UID_ROOT, GID_WHEEL, 0400, KSYMS_DNAME); break; @@ -579,7 +497,7 @@ ksyms_modevent(module_t mod __unused, int type, void * if (!LIST_EMPTY(&ksyms_list)) return (EBUSY); destroy_dev(ksyms_dev); - mtx_destroy(&ksyms_mtx); + sx_destroy(&ksyms_mtx); break; case MOD_SHUTDOWN: break; From owner-svn-src-head@freebsd.org Thu Aug 3 01:44:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEDCCDBF2FB; Thu, 3 Aug 2017 01:44:42 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99155990; Thu, 3 Aug 2017 01:44:42 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v731ifts051306; Thu, 3 Aug 2017 01:44:41 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v731if3E051305; Thu, 3 Aug 2017 01:44:41 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201708030144.v731if3E051305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 3 Aug 2017 01:44:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321965 - head/sys/dev/hyperv/utilities X-SVN-Group: head X-SVN-Commit-Author: sephe X-SVN-Commit-Paths: head/sys/dev/hyperv/utilities X-SVN-Commit-Revision: 321965 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 01:44:42 -0000 Author: sephe Date: Thu Aug 3 01:44:40 2017 New Revision: 321965 URL: https://svnweb.freebsd.org/changeset/base/321965 Log: hyperv/kvp: Use proper size macro for adapter id. Submitted by: Christopher Ertl MFC after: 3 days Sponsored by: Microsoft Modified: head/sys/dev/hyperv/utilities/hv_kvp.c Modified: head/sys/dev/hyperv/utilities/hv_kvp.c ============================================================================== --- head/sys/dev/hyperv/utilities/hv_kvp.c Thu Aug 3 01:40:05 2017 (r321964) +++ head/sys/dev/hyperv/utilities/hv_kvp.c Thu Aug 3 01:44:40 2017 (r321965) @@ -253,7 +253,7 @@ hv_kvp_convert_utf8_ipinfo_to_utf16(struct hv_kvp_msg UNUSED_FLAG, &err_dns); utf8_to_utf16((uint16_t *)host_ip_msg->kvp_ip_val.adapter_id, - MAX_IP_ADDR_SIZE, + MAX_ADAPTER_ID_SIZE, (char *)umsg->body.kvp_ip_val.adapter_id, strlen((char *)umsg->body.kvp_ip_val.adapter_id), UNUSED_FLAG, From owner-svn-src-head@freebsd.org Thu Aug 3 02:08:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B45ADC0BD0; Thu, 3 Aug 2017 02:08:02 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 487E21C20; Thu, 3 Aug 2017 02:08:02 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v73281IB059464; Thu, 3 Aug 2017 02:08:01 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v73281mf059463; Thu, 3 Aug 2017 02:08:01 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201708030208.v73281mf059463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 3 Aug 2017 02:08:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321966 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321966 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 02:08:02 -0000 Author: rmacklem Date: Thu Aug 3 02:08:01 2017 New Revision: 321966 URL: https://svnweb.freebsd.org/changeset/base/321966 Log: Added entry as requested by Kirk. Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Thu Aug 3 01:44:40 2017 (r321965) +++ head/usr.bin/calendar/calendars/calendar.freebsd Thu Aug 3 02:08:01 2017 (r321966) @@ -350,6 +350,7 @@ 10/05 Hiroki Sato born in Yamagata, Japan, 1977 10/05 Chris Costello born in Houston, Texas, United States, 1985 10/09 Stefan Walter born in Werne, Nordrhein-Westfalen, Germany, 1978 +10/11 Rick Macklem born in Ontario, Canada, 1955 10/12 Pawel Jakub Dawidek born in Radzyn Podlaski, Poland, 1980 10/15 Maxim Konovalov born in Khabarovsk, USSR, 1973 10/15 Eugene Grosbein born in Novokuznetsk, Russian Republic, USSR, 1976 From owner-svn-src-head@freebsd.org Thu Aug 3 03:43:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3756DC69A2; Thu, 3 Aug 2017 03:43:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B156464ACC; Thu, 3 Aug 2017 03:43:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v733hfLP000492; Thu, 3 Aug 2017 03:43:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v733hfvg000491; Thu, 3 Aug 2017 03:43:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708030343.v733hfvg000491@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 3 Aug 2017 03:43:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321967 - head/tests/sys/fs/tmpfs X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/tests/sys/fs/tmpfs X-SVN-Commit-Revision: 321967 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 03:43:43 -0000 Author: ngie Date: Thu Aug 3 03:43:41 2017 New Revision: 321967 URL: https://svnweb.freebsd.org/changeset/base/321967 Log: Chase r321920 and r321930 (dev_t being widened) The layout of st_rdev has changed after this commit, and assumptions made in the NetBSD tests are no longer valid. Change the hardcoded assumed values to account for the fact that major/minor are now represented by 64 bits as opposed to the less precise legacy precision of 16 bits. PR: 221048 Relnotes: st_rdev layout changed; warning about impact of r321920 to downstream consumers Modified: head/tests/sys/fs/tmpfs/Makefile Modified: head/tests/sys/fs/tmpfs/Makefile ============================================================================== --- head/tests/sys/fs/tmpfs/Makefile Thu Aug 3 02:08:01 2017 (r321966) +++ head/tests/sys/fs/tmpfs/Makefile Thu Aug 3 03:43:41 2017 (r321967) @@ -41,7 +41,13 @@ ${PACKAGE}FILESDIR= ${TESTSDIR} PROGS+= h_tools BINDIR.h_tools= ${TESTSDIR} +# NOTE: dev_t is represented by 64-bits after r321920 (it was 16-bits +# previously). +# +# The old hardcoded values assume the 16-bit layout for .st_rdev . ATF_TESTS_SH_SED_mknod_test= \ + -e '/$${st_rdev} -eq 512/s/512/8589934592/g' \ + -e '/$${st_rdev} -eq 514/s/514/8589934594/g' \ -e 's,mknod pipe p,mkfifo pipe,g' \ -e 's,mknod dir/pipe p,mkfifo dir/pipe,g' From owner-svn-src-head@freebsd.org Thu Aug 3 03:53:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AED64DC6FDC; Thu, 3 Aug 2017 03:53:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 4421A650AA; Thu, 3 Aug 2017 03:53:19 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 2CEFD107834; Thu, 3 Aug 2017 13:21:57 +1000 (AEST) Date: Thu, 3 Aug 2017 13:21:56 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321920 - head/sys/sys In-Reply-To: <20170802135455.GG1700@kib.kiev.ua> Message-ID: <20170803122015.Q1093@besplex.bde.org> References: <201708021014.v72AEHEk061037@repo.freebsd.org> <37abc595-c80e-a8da-04a8-815f42c634de@selasky.org> <20170802135455.GG1700@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=DIZZVqnLoRRTIwBj3f8A:9 a=JUE4OAOBgtXzTOa8:21 a=zo0XxFwiP1CiXz7P:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 03:53:20 -0000 On Wed, 2 Aug 2017, Konstantin Belousov wrote: > On Wed, Aug 02, 2017 at 02:38:50PM +0200, Hans Petter Selasky wrote: >> On 08/02/17 14:36, Hans Petter Selasky wrote: >>> On 08/02/17 12:14, Konstantin Belousov wrote: >>>> +#define major(x) ((int)((dev_t)(x) >> 32)) /* major number */ >>>> +#define minor(x) ((int)((x) & 0xffffffff)) /* minor number */ >>>> +#define makedev(x, y) (((dev_t)(x) << 32) | (y)) /* create >>>> dev_t */ >>> >>> One more comment on this issue: >>> >>> I think makedev(x, y) should be declared like this, to avoid issues when >>> "y" is negative: >>> >>> #define makedev(x, y) (((dev_t)(x) << 32) | (unsigned int)(y)) >>> /* create dev_t */ I think this has a lot of style bugs: - long line constructed by blind expansion - verbose spelling of 'unsigned' in the expansion to make the long line longer - banal comment to make the long line. The comment on this line is not quite as banal as the ones on the preceding 2 line -- those do less than echo the code. >> And you'll probably want a final wrapping dev_t cast aswell. 128-bit >> numbers are not yet there. >> >> #define makedev(x, y) ((dev_t)(((dev_t)(x) << 32) | (unsigned >> int)(y))) >> > /* create dev_t */ You mean 128-bit ints. > I agree with the usefulness of the y cast to unsigned type, but I am not sure > what is the use of final dev_t cast. By the usual arithmetic conversion > rules, the final type of the '|' is the highest rank type of the operands. > Something unusual can only happen if int is wider than dev_t. So it happens with 128 ints (or 65-bit ints) if dev_t remains 64 bits. > So I am going to commit the following update. Almost OK. The necessary casts and parentheses are already ugly enough. This is the implementation, so it can assume that int is 32 bits and dev_t is 64 bits and not have the complexity to support the general case. Ints are probably assumed to be 32 bits in a few thousand similar definitions and a few million lines of code just in FreeBSD sources. > diff --git a/sys/sys/types.h b/sys/sys/types.h > index fce57e412ed..30a08724443 100644 > --- a/sys/sys/types.h > +++ b/sys/sys/types.h > @@ -366,7 +366,7 @@ __bitcount64(__uint64_t _x) > > #define major(x) ((int)((dev_t)(x) >> 32)) /* major number */ > #define minor(x) ((int)((x) & 0xffffffff)) /* minor number */ > -#define makedev(x, y) (((dev_t)(x) << 32) | (y)) /* create dev_t */ > +#define makedev(x, y) (((dev_t)(x) << 32) | (unsigned)(y)) /* create dev_t */ > > /* > * These declarations belong elsewhere, but are repeated here and in You fixed the long line by not spelling 'unsigned' verbosely and not aligning the comments uniformly. It would be better to remove the comments. makedev() actually has a man page (a FreeBSD addition makedev(3)). This could have been better, and is now out of date. The largest error is that major() is still documented to return a value between 0 and 255. This reduction prevented makedev() being the inverse of major()+minor() on arbitrary args. The man page doesn't claim that it is, and barely gives a hint that makedev() can be used to synthesize a dev_t from (x, y) provided 0 <= x <= 255. Bruce From owner-svn-src-head@freebsd.org Thu Aug 3 05:27:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2C89DCAD3C; Thu, 3 Aug 2017 05:27:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC65F675DD; Thu, 3 Aug 2017 05:27:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v735R5Lw041049; Thu, 3 Aug 2017 05:27:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v735R5dg041043; Thu, 3 Aug 2017 05:27:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708030527.v735R5dg041043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 3 Aug 2017 05:27:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321969 - in head/sys/boot: arm/at91/libat91 arm/ixp425/boot2 i386/boot2 X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in head/sys/boot: arm/at91/libat91 arm/ixp425/boot2 i386/boot2 X-SVN-Commit-Revision: 321969 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 05:27:07 -0000 Author: ngie Date: Thu Aug 3 05:27:05 2017 New Revision: 321969 URL: https://svnweb.freebsd.org/changeset/base/321969 Log: Fix the return types for printf and putchar to match their libc and POSIX equivalents Both printf and putchar return int, not void. This will allow code that leverages the libcalls and checks/rely on the return type to interchangeably between loader code and non-loader code. MFC after: 1 month Modified: head/sys/boot/arm/at91/libat91/lib.h head/sys/boot/arm/at91/libat91/printf.c head/sys/boot/arm/at91/libat91/putchar.c head/sys/boot/arm/ixp425/boot2/ixp425_board.c head/sys/boot/arm/ixp425/boot2/lib.h head/sys/boot/i386/boot2/boot2.c Modified: head/sys/boot/arm/at91/libat91/lib.h ============================================================================== --- head/sys/boot/arm/at91/libat91/lib.h Thu Aug 3 03:45:48 2017 (r321968) +++ head/sys/boot/arm/at91/libat91/lib.h Thu Aug 3 05:27:05 2017 (r321969) @@ -28,9 +28,9 @@ #define ARM_BOOT_LIB_H int getc(int); -void putchar(int); -void xputchar(int); -void printf(const char *fmt,...); +int putchar(int); +int xputchar(int); +int printf(const char *fmt,...); /* The following function write eeprom at ee_addr using data */ /* from data_add for size bytes. */ Modified: head/sys/boot/arm/at91/libat91/printf.c ============================================================================== --- head/sys/boot/arm/at91/libat91/printf.c Thu Aug 3 03:45:48 2017 (r321968) +++ head/sys/boot/arm/at91/libat91/printf.c Thu Aug 3 05:27:05 2017 (r321969) @@ -20,12 +20,13 @@ #include #include "lib.h" -void +int printf(const char *fmt,...) { va_list ap; const char *hex = "0123456789abcdef"; char buf[10]; + const char *fmt_orig = fmt; char *s; unsigned u; int c; @@ -66,5 +67,5 @@ printf(const char *fmt,...) } va_end(ap); - return; + return (int)(fmt - fmt_orig); } Modified: head/sys/boot/arm/at91/libat91/putchar.c ============================================================================== --- head/sys/boot/arm/at91/libat91/putchar.c Thu Aug 3 03:45:48 2017 (r321968) +++ head/sys/boot/arm/at91/libat91/putchar.c Thu Aug 3 05:27:05 2017 (r321969) @@ -39,11 +39,11 @@ #include "lib.h" /* - * void putchar(int ch) + * int putchar(int ch) * Writes a character to the DBGU port. It assumes that DBGU has * already been initialized. */ -void +int putchar(int ch) { AT91PS_USART pUSART = (AT91PS_USART)AT91C_BASE_DBGU; @@ -51,12 +51,14 @@ putchar(int ch) while (!(pUSART->US_CSR & AT91C_US_TXRDY)) continue; pUSART->US_THR = (ch & 0xFF); + return (1); } -void +int xputchar(int ch) { - if (ch == '\n') - putchar('\r'); - putchar(ch); + if (ch == '\n') + putchar('\r'); + putchar(ch); + return (ch == '\n' ? 2 : 1); } Modified: head/sys/boot/arm/ixp425/boot2/ixp425_board.c ============================================================================== --- head/sys/boot/arm/ixp425/boot2/ixp425_board.c Thu Aug 3 03:45:48 2017 (r321968) +++ head/sys/boot/arm/ixp425/boot2/ixp425_board.c Thu Aug 3 05:27:05 2017 (r321969) @@ -165,7 +165,7 @@ getc(int seconds) return c; } -void +int putchar(int ch) { int delay, limit; @@ -179,14 +179,16 @@ putchar(int ch) limit = 40; while ((uart_getreg(ubase, REG_LSR) & LSR_TEMT) == 0 && --limit) DELAY(delay); + return (1); } -void +int xputchar(int ch) { if (ch == '\n') putchar('\r'); putchar(ch); + return (ch == '\n' ? 2 : 1); } void Modified: head/sys/boot/arm/ixp425/boot2/lib.h ============================================================================== --- head/sys/boot/arm/ixp425/boot2/lib.h Thu Aug 3 03:45:48 2017 (r321968) +++ head/sys/boot/arm/ixp425/boot2/lib.h Thu Aug 3 05:27:05 2017 (r321969) @@ -35,12 +35,12 @@ int main(void); void DELAY(int); int getc(int); -void putchar(int); -void xputchar(int); +int putchar(int); +int xputchar(int); void putstr(const char *); void puthex8(u_int8_t); void puthexlist(const u_int8_t *, int); -void printf(const char *fmt,...); +int printf(const char *fmt,...); void bzero(void *, size_t); char *strcpy(char *to, const char *from); Modified: head/sys/boot/i386/boot2/boot2.c ============================================================================== --- head/sys/boot/i386/boot2/boot2.c Thu Aug 3 03:45:48 2017 (r321968) +++ head/sys/boot/i386/boot2/boot2.c Thu Aug 3 05:27:05 2017 (r321969) @@ -114,8 +114,8 @@ void exit(int); static void load(void); static int parse(void); static int dskread(void *, unsigned, unsigned); -static void printf(const char *,...); -static void putchar(int); +static int printf(const char *,...); +static int putchar(int); static int drvread(void *, unsigned, unsigned); static int keyhit(unsigned); static int xputc(int); @@ -521,11 +521,12 @@ error: return -1; } -static void +static int printf(const char *fmt,...) { va_list ap; static char buf[10]; + const char *fmt_orig = fmt; char *s; unsigned u; int c; @@ -556,15 +557,16 @@ printf(const char *fmt,...) putchar(c); } va_end(ap); - return; + return (int)(fmt - fmt_orig); } -static void +static int putchar(int c) { if (c == '\n') xputc('\r'); xputc(c); + return (c == '\n' ? 2 : 1); } static int From owner-svn-src-head@freebsd.org Thu Aug 3 05:55:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89582DCB911; Thu, 3 Aug 2017 05:55:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 538A66856C; Thu, 3 Aug 2017 05:55:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v735t1w5053160; Thu, 3 Aug 2017 05:55:01 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v735t1hC053159; Thu, 3 Aug 2017 05:55:01 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201708030555.v735t1hC053159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 3 Aug 2017 05:55:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321973 - head/sys/dev/ksyms X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/dev/ksyms X-SVN-Commit-Revision: 321973 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 05:55:02 -0000 Author: markj Date: Thu Aug 3 05:55:01 2017 New Revision: 321973 URL: https://svnweb.freebsd.org/changeset/base/321973 Log: Remove D_TRACKCLOSE now that ksyms no longer has a close method. Reported by: jhb X-MFC with: r321963 Modified: head/sys/dev/ksyms/ksyms.c Modified: head/sys/dev/ksyms/ksyms.c ============================================================================== --- head/sys/dev/ksyms/ksyms.c Thu Aug 3 05:32:27 2017 (r321972) +++ head/sys/dev/ksyms/ksyms.c Thu Aug 3 05:55:01 2017 (r321973) @@ -71,7 +71,7 @@ static d_mmap_single_t ksyms_mmap_single; static struct cdevsw ksyms_cdevsw = { .d_version = D_VERSION, - .d_flags = D_TRACKCLOSE, + .d_flags = 0, .d_open = ksyms_open, .d_read = ksyms_read, .d_mmap_single = ksyms_mmap_single, From owner-svn-src-head@freebsd.org Thu Aug 3 07:00:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E698DCD9A3; Thu, 3 Aug 2017 07:00:56 +0000 (UTC) (envelope-from ak@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C0216A044; Thu, 3 Aug 2017 07:00:56 +0000 (UTC) (envelope-from ak@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7370tQj077818; Thu, 3 Aug 2017 07:00:55 GMT (envelope-from ak@FreeBSD.org) Received: (from ak@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7370tJl077817; Thu, 3 Aug 2017 07:00:55 GMT (envelope-from ak@FreeBSD.org) Message-Id: <201708030700.v7370tJl077817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ak set sender to ak@FreeBSD.org using -f From: Alex Kozlov Date: Thu, 3 Aug 2017 07:00:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321974 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: ak X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321974 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 07:00:56 -0000 Author: ak (ports committer) Date: Thu Aug 3 07:00:55 2017 New Revision: 321974 URL: https://svnweb.freebsd.org/changeset/base/321974 Log: Add entry to the calendar Requested by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Thu Aug 3 05:55:01 2017 (r321973) +++ head/usr.bin/calendar/calendars/calendar.freebsd Thu Aug 3 07:00:55 2017 (r321974) @@ -332,6 +332,7 @@ 09/17 Maxim Bolotin born in Rostov-on-Don, Russian Federation, 1976 09/18 Matthew Fleming born in Cleveland, Ohio, United States, 1975 09/20 Kevin Lo born in Taipei, Taiwan, Republic of China, 1972 +09/21 Alex Kozlov born in Bila Tserkva, Ukraine, 1970 09/21 Gleb Kurtsou born in Minsk, Belarus, 1984 09/22 Alan Somers born in San Antonio, Texas, United States, 1982 09/22 Bryan Drewery born in San Diego, California, United States, 1984 From owner-svn-src-head@freebsd.org Thu Aug 3 07:42:09 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 491D9DCED1D; Thu, 3 Aug 2017 07:42:09 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18A5E6B5A3; Thu, 3 Aug 2017 07:42:09 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v737g8sf095836; Thu, 3 Aug 2017 07:42:08 GMT (envelope-from remko@FreeBSD.org) Received: (from remko@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v737g8KJ095835; Thu, 3 Aug 2017 07:42:08 GMT (envelope-from remko@FreeBSD.org) Message-Id: <201708030742.v737g8KJ095835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: remko set sender to remko@FreeBSD.org using -f From: Remko Lodder Date: Thu, 3 Aug 2017 07:42:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321979 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: remko X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 321979 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 07:42:09 -0000 Author: remko Date: Thu Aug 3 07:42:08 2017 New Revision: 321979 URL: https://svnweb.freebsd.org/changeset/base/321979 Log: Update the entry for postmaster@ Reviewed by: dhw Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Thu Aug 3 07:30:35 2017 (r321978) +++ head/share/misc/organization.dot Thu Aug 3 07:42:08 2017 (r321979) @@ -50,7 +50,7 @@ dnsadm [label="DNS Administrators\ndnsadm@FreeBSD.org\ mirroradmin [label="FTP/WWW Mirror Site Coordinators\nmirror-admin@FreeBSD.org\nkuriyama, kensmith"] ncvs [label="CVS src Repository Managers\nncvs@FreeBSD.org\njoe, kuriyama, markm,\nsimon, peter"] perforceadmin [label="Perforce Repository Administrators\nperforce-admin@FreeBSD.org\nscottl, kensmith, gordon,\nrwatson, peter, dhw"] -postmaster [label="Postmaster Team\npostmaster@FreeBSD.org\njmb, brd, sahil, dhw"] +postmaster [label="Postmaster Team\npostmaster@FreeBSD.org\ndhw, ler, pi, rea, remko, zi"] refadm [label="Reference Systems Administrators\nrefadm@FreeBSD.org\njake, billf, markm, simon,\nobrien, ps, kensmith,\npeter, dhw"] webmaster [label="Webmaster Team\nwebmaster@FreeBSD.org\ngjb, wblock, blackend,\ngabor, hrs, wosch"] From owner-svn-src-head@freebsd.org Thu Aug 3 07:57:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 802CEDCF6A7; Thu, 3 Aug 2017 07:57:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23F896C01C; Thu, 3 Aug 2017 07:57:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v737vmOh094754 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 3 Aug 2017 10:57:48 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v737vmOh094754 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v737vlGd094752; Thu, 3 Aug 2017 10:57:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 3 Aug 2017 10:57:47 +0300 From: Konstantin Belousov To: Bruce Evans Cc: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321920 - head/sys/sys Message-ID: <20170803075747.GJ1700@kib.kiev.ua> References: <201708021014.v72AEHEk061037@repo.freebsd.org> <37abc595-c80e-a8da-04a8-815f42c634de@selasky.org> <20170802135455.GG1700@kib.kiev.ua> <20170803122015.Q1093@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170803122015.Q1093@besplex.bde.org> User-Agent: Mutt/1.8.3 (2017-05-23) 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 autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 07:57:54 -0000 On Thu, Aug 03, 2017 at 01:21:56PM +1000, Bruce Evans wrote: > It would be better to remove the comments. > > makedev() actually has a man page (a FreeBSD addition makedev(3)). > This could have been better, and is now out of date. The largest error > is that major() is still documented to return a value between 0 and > 255. This reduction prevented makedev() being the inverse of > major()+minor() on arbitrary args. The man page doesn't claim that > it is, and barely gives a hint that makedev() can be used to synthesize > a dev_t from (x, y) provided 0 <= x <= 255. See below. diff --git a/share/man/man3/makedev.3 b/share/man/man3/makedev.3 index 87ca953dc79..a54d0590bc5 100644 --- a/share/man/man3/makedev.3 +++ b/share/man/man3/makedev.3 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 28, 2008 +.Dd August 3, 2017 .Dt MAKEDEV 3 .Os .Sh NAME @@ -54,11 +54,18 @@ and .Fn minor macros can be used to obtain the original numbers from the device number .Fa dev . +In other words, for a value +.Va dev +of the type +.Vt dev_t , +the assertion +.Dl dev == makedev(major(dev), minor(dev)) +is valid. .Pp In previous implementations of .Fx all block and character devices were uniquely identified by a pair of -major and minor numbers. +stable major and minor numbers. The major number referred to a certain device class (e.g. disks, TTYs) while the minor number identified an instance within the device class. Later versions of @@ -66,7 +73,8 @@ Later versions of automatically generate a unique device number for each character device visible in .Pa /dev/ . -These numbers are not divided in device classes. +These numbers are not divided in device classes and are not guaranteed +to be stable upon reboot or driver reload. .Pp On .Fx @@ -78,11 +86,9 @@ conventional way. .Sh RETURN VALUES The .Fn major -macro returns a device major number that has a value between 0 and 255. -The +and .Fn minor -macro returns a device minor number whose value can span the complete -range of an +macros return numbers whose value can span the complete range of an .Vt int . .Sh SEE ALSO .Xr mknod 2 , diff --git a/sys/sys/types.h b/sys/sys/types.h index 30a08724443..8ea6e146e08 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -364,9 +364,9 @@ __bitcount64(__uint64_t _x) #include -#define major(x) ((int)((dev_t)(x) >> 32)) /* major number */ -#define minor(x) ((int)((x) & 0xffffffff)) /* minor number */ -#define makedev(x, y) (((dev_t)(x) << 32) | (unsigned)(y)) /* create dev_t */ +#define major(x) ((int)((dev_t)(x) >> 32)) +#define minor(x) ((int)((x) & 0xffffffff)) +#define makedev(x, y) (((dev_t)(x) << 32) | (unsigned)(y)) /* * These declarations belong elsewhere, but are repeated here and in From owner-svn-src-head@freebsd.org Thu Aug 3 08:03:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF16ADCFCDC; Thu, 3 Aug 2017 08:03:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DBD66C5AC; Thu, 3 Aug 2017 08:03:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7383M6g006505; Thu, 3 Aug 2017 08:03:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7383M5g006504; Thu, 3 Aug 2017 08:03:22 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201708030803.v7383M5g006504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 3 Aug 2017 08:03:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321982 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321982 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 08:03:23 -0000 Author: hselasky Date: Thu Aug 3 08:03:22 2017 New Revision: 321982 URL: https://svnweb.freebsd.org/changeset/base/321982 Log: Add myself to the calendar. Requested by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Thu Aug 3 07:56:39 2017 (r321981) +++ head/usr.bin/calendar/calendars/calendar.freebsd Thu Aug 3 08:03:22 2017 (r321982) @@ -176,6 +176,7 @@ 05/14 Tatsumi Hosokawa born in Tokyo, Japan, 1968 05/14 Shigeyuku Fukushima born in Osaka, Japan, 1974 05/14 Bruce Cran born in Cambridge, United Kingdom, 1981 +05/15 Hans Petter Selasky born in Flekkefjord, Norway, 1982 05/16 Johann Kois born in Wolfsberg, Austria, 1975 05/16 Marcus Alves Grando born in Florianopolis, Santa Catarina, Brazil, 1979 05/17 Thomas Abthorpe born in Port Arthur, Ontario, Canada, 1968 From owner-svn-src-head@freebsd.org Thu Aug 3 08:05:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79839DCFE27; Thu, 3 Aug 2017 08:05:02 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EDCE6C71C; Thu, 3 Aug 2017 08:05:01 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 40543260616; Thu, 3 Aug 2017 10:04:59 +0200 (CEST) Subject: Re: svn commit: r321920 - head/sys/sys To: Konstantin Belousov , Bruce Evans Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201708021014.v72AEHEk061037@repo.freebsd.org> <37abc595-c80e-a8da-04a8-815f42c634de@selasky.org> <20170802135455.GG1700@kib.kiev.ua> <20170803122015.Q1093@besplex.bde.org> <20170803075747.GJ1700@kib.kiev.ua> From: Hans Petter Selasky Message-ID: Date: Thu, 3 Aug 2017 10:02:48 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170803075747.GJ1700@kib.kiev.ua> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 08:05:02 -0000 On 08/03/17 09:57, Konstantin Belousov wrote: > .Xr mknod 2 , Should mknod be removed from base or stubbed in light of the more recent devfs ? --HPS From owner-svn-src-head@freebsd.org Thu Aug 3 08:13:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39DADDD0253; Thu, 3 Aug 2017 08:13:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1FB76CB66; Thu, 3 Aug 2017 08:13:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v738DS1R098118 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 3 Aug 2017 11:13:28 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v738DS1R098118 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v738DSEZ098117; Thu, 3 Aug 2017 11:13:28 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 3 Aug 2017 11:13:28 +0300 From: Konstantin Belousov To: Hans Petter Selasky Cc: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321920 - head/sys/sys Message-ID: <20170803081328.GL1700@kib.kiev.ua> References: <201708021014.v72AEHEk061037@repo.freebsd.org> <37abc595-c80e-a8da-04a8-815f42c634de@selasky.org> <20170802135455.GG1700@kib.kiev.ua> <20170803122015.Q1093@besplex.bde.org> <20170803075747.GJ1700@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) 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 autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 08:13:33 -0000 On Thu, Aug 03, 2017 at 10:02:48AM +0200, Hans Petter Selasky wrote: > On 08/03/17 09:57, Konstantin Belousov wrote: > > .Xr mknod 2 , > > Should mknod be removed from base or stubbed in light of the more recent > devfs ? mknod is used on devfs as a way to 'undelete' devfs node. You may do rm /dev/node and then mknod /dev/node ... would restore it. Also, for UFS or other filesystems which are exported by NFS, mknod is useful to provide device nodes for non-FreeBSD clients. From owner-svn-src-head@freebsd.org Thu Aug 3 08:24:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BC24DD08D7; Thu, 3 Aug 2017 08:24:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 63FB86D099; Thu, 3 Aug 2017 08:24:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 3DE7842A7FA; Thu, 3 Aug 2017 17:53:45 +1000 (AEST) Date: Thu, 3 Aug 2017 17:53:43 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ngie Cooper cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321969 - in head/sys/boot: arm/at91/libat91 arm/ixp425/boot2 i386/boot2 In-Reply-To: <201708030527.v735R5dg041043@repo.freebsd.org> Message-ID: <20170803173421.C2203@besplex.bde.org> References: <201708030527.v735R5dg041043@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=WiSNjSlbGeYnkCD5ExAA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 08:24:44 -0000 On Thu, 3 Aug 2017, Ngie Cooper wrote: > Log: > Fix the return types for printf and putchar to match their libc and > POSIX equivalents > > Both printf and putchar return int, not void. > > This will allow code that leverages the libcalls and checks/rely on the > return type to interchangeably between loader code and non-loader > code. > > MFC after: 1 month > > Modified: > head/sys/boot/arm/at91/libat91/lib.h > head/sys/boot/arm/at91/libat91/printf.c > head/sys/boot/arm/at91/libat91/putchar.c > head/sys/boot/arm/ixp425/boot2/ixp425_board.c > head/sys/boot/arm/ixp425/boot2/lib.h > head/sys/boot/i386/boot2/boot2.c This is wrong for at least i386/boot2. It isn't part of the loader, and saves space by not returning unused values. > Modified: head/sys/boot/i386/boot2/boot2.c > ============================================================================== > --- head/sys/boot/i386/boot2/boot2.c Thu Aug 3 03:45:48 2017 (r321968) > +++ head/sys/boot/i386/boot2/boot2.c Thu Aug 3 05:27:05 2017 (r321969) > @@ -114,8 +114,8 @@ void exit(int); > static void load(void); > static int parse(void); > static int dskread(void *, unsigned, unsigned); > -static void printf(const char *,...); > -static void putchar(int); > +static int printf(const char *,...); > +static int putchar(int); These are freestanding static functions, so they have nothing to do with library functions except their name is a hint that they are similar. Since they are static, -funit-at-a-time might allow the unused return values to be optimized away. Then returning unused values would be just an obfuscation. This file still has a static memcpy() which is quite different from the libc version. It doesn't return an unused value, and its arg types are all different (no newfangled size_t or newerfangled restrict). Freestanding versions (static and otherwise) cause problems with builtins. -ffreestanding turns off all builtins. The static memcpy used to be ifdefed so as to use __builtin_memcpy instead of the static one if the compiler is gcc. That apparently broke with gcc-4.2, since the builtin will call libc memcpy() in some cases, although memcpy() is unavailable in the freestanding case. Bruce From owner-svn-src-head@freebsd.org Thu Aug 3 09:11:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38794DD28EA; Thu, 3 Aug 2017 09:11:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F352E6E9C6; Thu, 3 Aug 2017 09:11:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v739Bqpf033839; Thu, 3 Aug 2017 09:11:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v739Bqhk033838; Thu, 3 Aug 2017 09:11:52 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201708030911.v739Bqhk033838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 3 Aug 2017 09:11:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321983 - head/sys/dev/mlx5/mlx5_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 321983 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 09:11:53 -0000 Author: hselasky Date: Thu Aug 3 09:11:51 2017 New Revision: 321983 URL: https://svnweb.freebsd.org/changeset/base/321983 Log: Using GFP_ATOMIC with firmware commands is not supported after busdma was introduced in the mlx5core, because busdma might sleep when loading memory into DMA. MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Modified: head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Thu Aug 3 08:03:22 2017 (r321982) +++ head/sys/dev/mlx5/mlx5_core/mlx5_cmd.c Thu Aug 3 09:11:51 2017 (r321983) @@ -1434,12 +1434,11 @@ static int cmd_exec_helper(struct mlx5_core_dev *dev, struct mlx5_cmd_msg *inb; struct mlx5_cmd_msg *outb; int pages_queue; - gfp_t gfp; + const gfp_t gfp = GFP_KERNEL; int err; u8 status = 0; pages_queue = is_manage_pages(in); - gfp = callback ? GFP_ATOMIC : GFP_KERNEL; inb = alloc_msg(dev, in_size, gfp); if (IS_ERR(inb)) { From owner-svn-src-head@freebsd.org Thu Aug 3 09:14:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A944CDD2AAD; Thu, 3 Aug 2017 09:14:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75EED6EC13; Thu, 3 Aug 2017 09:14:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v739Ehm6034699; Thu, 3 Aug 2017 09:14:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v739Ehds034698; Thu, 3 Aug 2017 09:14:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201708030914.v739Ehds034698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 3 Aug 2017 09:14:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321984 - head/sys/dev/mlx5/mlx5_core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 321984 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 09:14:44 -0000 Author: hselasky Date: Thu Aug 3 09:14:43 2017 New Revision: 321984 URL: https://svnweb.freebsd.org/changeset/base/321984 Log: Resolve locking issue for non-sleepable context in the mlx5core. Code inspection reveals the busdma unload and free functions do not write to the belonging dma tag and does not need to be serialized. This allows mlx5_fwp_free() to be called from software interrupt context. MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c Modified: head/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c Thu Aug 3 09:11:51 2017 (r321983) +++ head/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c Thu Aug 3 09:14:43 2017 (r321984) @@ -190,13 +190,10 @@ mlx5_fwp_free(struct mlx5_fw_page *fwp) num = fwp->numpages; dev = fwp->dev; - /* serialize unloading the DMA maps */ - sx_xlock(&dev->cmd.dma_sx); while (num--) { bus_dmamap_unload(dev->cmd.dma_tag, fwp[num].dma_map); bus_dmamem_free(dev->cmd.dma_tag, fwp[num].virt_addr, fwp[num].dma_map); } - sx_xunlock(&dev->cmd.dma_sx); kfree(fwp); } From owner-svn-src-head@freebsd.org Thu Aug 3 09:18:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6689BDD2D14; Thu, 3 Aug 2017 09:18:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C61A6EE17; Thu, 3 Aug 2017 09:18:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v739IPbo034867; Thu, 3 Aug 2017 09:18:25 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v739IPVY034866; Thu, 3 Aug 2017 09:18:25 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201708030918.v739IPVY034866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 3 Aug 2017 09:18:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321985 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 321985 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 09:18:26 -0000 Author: hselasky Date: Thu Aug 3 09:18:25 2017 New Revision: 321985 URL: https://svnweb.freebsd.org/changeset/base/321985 Log: Ticks are 32-bit in FreeBSD. MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/addr.c Modified: head/sys/ofed/drivers/infiniband/core/addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/addr.c Thu Aug 3 09:14:43 2017 (r321984) +++ head/sys/ofed/drivers/infiniband/core/addr.c Thu Aug 3 09:18:25 2017 (r321985) @@ -187,10 +187,10 @@ EXPORT_SYMBOL(rdma_translate_ip); static void set_timeout(unsigned long time) { - unsigned long delay; + int delay; /* under FreeBSD ticks are 32-bit */ delay = time - jiffies; - if ((long)delay <= 0) + if (delay <= 0) delay = 1; mod_delayed_work(addr_wq, &work, delay); From owner-svn-src-head@freebsd.org Thu Aug 3 09:31:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08C09DD36E4; Thu, 3 Aug 2017 09:31:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C88EC6F82E; Thu, 3 Aug 2017 09:31:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v739VAvX042290; Thu, 3 Aug 2017 09:31:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v739VAfg042289; Thu, 3 Aug 2017 09:31:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201708030931.v739VAfg042289@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 3 Aug 2017 09:31:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321986 - head/sys/ofed/drivers/infiniband/core X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/core X-SVN-Commit-Revision: 321986 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 09:31:12 -0000 Author: hselasky Date: Thu Aug 3 09:31:10 2017 New Revision: 321986 URL: https://svnweb.freebsd.org/changeset/base/321986 Log: Change reject message type when destroying cm_id in ibore. This patch fixes an interopability issue between FreeBSD and non-FreeBSD systems when the connection establishment is aborted. Refer to the initial commit in Linux, drivers/infiniband/core/cm.c, for a more detailed description. Obtained from: Linux MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/core/cm.c Modified: head/sys/ofed/drivers/infiniband/core/cm.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/cm.c Thu Aug 3 09:18:25 2017 (r321985) +++ head/sys/ofed/drivers/infiniband/core/cm.c Thu Aug 3 09:31:10 2017 (r321986) @@ -889,6 +889,7 @@ retest: cm_reject_sidr_req(cm_id_priv, IB_SIDR_REJECT); break; case IB_CM_REQ_SENT: + case IB_CM_MRA_REQ_RCVD: ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg); spin_unlock_irq(&cm_id_priv->lock); ib_send_cm_rej(cm_id, IB_CM_REJ_TIMEOUT, @@ -907,7 +908,6 @@ retest: NULL, 0, NULL, 0); } break; - case IB_CM_MRA_REQ_RCVD: case IB_CM_REP_SENT: case IB_CM_MRA_REP_RCVD: ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg); From owner-svn-src-head@freebsd.org Thu Aug 3 09:35:00 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A59ADD3A71; Thu, 3 Aug 2017 09:35:00 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 054FC6FABC; Thu, 3 Aug 2017 09:34:59 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 409F24283EE; Thu, 3 Aug 2017 19:34:57 +1000 (AEST) Date: Thu, 3 Aug 2017 19:34:56 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: Bruce Evans , Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321920 - head/sys/sys In-Reply-To: <20170803075747.GJ1700@kib.kiev.ua> Message-ID: <20170803180419.R2314@besplex.bde.org> References: <201708021014.v72AEHEk061037@repo.freebsd.org> <37abc595-c80e-a8da-04a8-815f42c634de@selasky.org> <20170802135455.GG1700@kib.kiev.ua> <20170803122015.Q1093@besplex.bde.org> <20170803075747.GJ1700@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=VbSHBBh9 c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=Ny7lnamD2apBV3MTSKcA:9 a=McBudY7oVUTvH_Sq:21 a=J-jyvF9bBr_6Nz8R:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 09:35:00 -0000 On Thu, 3 Aug 2017, Konstantin Belousov wrote: > On Thu, Aug 03, 2017 at 01:21:56PM +1000, Bruce Evans wrote: >> It would be better to remove the comments. >> >> makedev() actually has a man page (a FreeBSD addition makedev(3)). >> This could have been better, and is now out of date. The largest error >> is that major() is still documented to return a value between 0 and >> 255. This reduction prevented makedev() being the inverse of >> major()+minor() on arbitrary args. The man page doesn't claim that >> it is, and barely gives a hint that makedev() can be used to synthesize >> a dev_t from (x, y) provided 0 <= x <= 255. > > See below. > > diff --git a/share/man/man3/makedev.3 b/share/man/man3/makedev.3 > index 87ca953dc79..a54d0590bc5 100644 > --- a/share/man/man3/makedev.3 > +++ b/share/man/man3/makedev.3 > ... > @@ -54,11 +54,18 @@ and > .Fn minor > macros can be used to obtain the original numbers from the device number Problems with old wording: - "can be used" is too informal. Before this, makedev() is described as "allows" something. "allow" is almost never used in share/man3/*, even in the sense of giving permission. Only pthread man pages have many instances of this bug. - "original" is an anachronism. The major and minor used to be the original numbers, but now it is the dev_t that is original except when the dev_t is synthesized. "original" might also mean "original representation". Fixes: "can be used to obtain" is just a verbose spelling of "return". "allows" can be improved using "returns" too, and it would be good to shorten "a unique device number to be generated based on" to something that says less about the one to one correspondence. "generation" is just a special case of applying the correspondence to get an alternative representation. "original" is also related to the correspondence. Perhaps describe the correspondence first and then only say that the functions are the ones that implement it. > .Fa dev . > +In other words, for a value > +.Va dev > +of the type > +.Vt dev_t , > +the assertion > +.Dl dev == makedev(major(dev), minor(dev)) > +is valid. This describes the correspondence in another way. Pehaps delete all details about what the functions do in ther previous description and say that they are defined by this property. I think the inverse property also needs to be spelled out. It is that for (int ma, int mi) .Dl ma = major(makedev(ma, mi)) .Dl mi = minor(makedev(ma, mi)) > .Pp > In previous implementations of > .Fx > all block and character devices were uniquely identified by a pair of > -major and minor numbers. > +stable major and minor numbers. "stable" is clarified later, but is hard to understand in context. > The major number referred to a certain device class (e.g. disks, TTYs) > while the minor number identified an instance within the device class. > Later versions of > @@ -66,7 +73,8 @@ Later versions of > automatically generate a unique device number for each character device > visible in > .Pa /dev/ . > -These numbers are not divided in device classes. > +These numbers are not divided in device classes and are not guaranteed > +to be stable upon reboot or driver reload. They used to be stable across even more than reboot. They were kept in file systems, and that required them to be stable across OS versions in practice. > .Pp > On > .Fx > @@ -78,11 +86,9 @@ conventional way. > .Sh RETURN VALUES > The > .Fn major > -macro returns a device major number that has a value between 0 and 255. > -The > +and > .Fn minor > -macro returns a device minor number whose value can span the complete > -range of an > +macros return numbers whose value can span the complete range of an > .Vt int . > .Sh SEE ALSO > .Xr mknod 2 , > diff --git a/sys/sys/types.h b/sys/sys/types.h > index 30a08724443..8ea6e146e08 100644 > --- a/sys/sys/types.h > +++ b/sys/sys/types.h > @@ -364,9 +364,9 @@ __bitcount64(__uint64_t _x) > > #include > > -#define major(x) ((int)((dev_t)(x) >> 32)) /* major number */ > -#define minor(x) ((int)((x) & 0xffffffff)) /* minor number */ > -#define makedev(x, y) (((dev_t)(x) << 32) | (unsigned)(y)) /* create dev_t */ > +#define major(x) ((int)((dev_t)(x) >> 32)) > +#define minor(x) ((int)((x) & 0xffffffff)) > +#define makedev(x, y) (((dev_t)(x) << 32) | (unsigned)(y)) I see another problem. Masking with 0xfffffffff and casting to unsigned are gratuitously different spellings for extracting the low 32 bits. I prefer the cast. It only works if ints have 32 bits, but we assume that for other reasons. The mask is especially hard to understand for the 1's complement case. We avoid complications with dodgy args for major() by casting the arg to dev_t. For minor(), the behaviour is only clear if x is unsigned (it should be dev_t), or int or lower rank unsigned and typeof(0xffffffff) == unsigned (true with 32-bit ints). In the second case, the default promotions convert x to unsigned. -0 becomes 0U which probably breaks it on 1's complement systems, but -0L doesn't change, which is hard to understand. To avoid complications, we could cast to dev_t, but that is verbose, or to unsigned, but then the mask is redundant if ints are 32 bits. For makedev() we, do just cast to unsigned and assume 32 bits. > > /* > * These declarations belong elsewhere, but are repeated here and in > Bruce From owner-svn-src-head@freebsd.org Thu Aug 3 11:49:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A4F8DB2E1E for ; Thu, 3 Aug 2017 11:49:13 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x232.google.com (mail-yw0-x232.google.com [IPv6:2607:f8b0:4002:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E5CE73D75 for ; Thu, 3 Aug 2017 11:49:12 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x232.google.com with SMTP id l82so6652662ywc.2 for ; Thu, 03 Aug 2017 04:49:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=aOyJ+/Xe93y+3+PpIBZv+iBe4n9nStyjkLkGNLTMHNA=; b=M95h/LqZDOj02WcXaZ/4t97N8uOcp5K9coRx9P1VNej3q1qyf4BVR7rxRG39kLKwuf bIsV7l6581MYK+5+sNJTFiWGwroB8S5z5tA/2Mo3dLQnGYqwlhmvtNgrrqCc9Jy8RYP4 mONbbFF9i5IkvSXE3m+lSb8DplZVydQ34iiUtft21iOmv4J+oj2CWtfM8XrkkcZ0OIiq 5Vy1x0ltm08VTUp6VVm1rhWqeqjrA4OsCWYIuKgu4j7oMLLRDLWSrXFI7yhlbRRe64Ma lSs9NPO2GoYLU6yYzuAtjX7E1RvRMOBX5ipzC9GFkrsTBitHHiSBQLganghHK7UAJRwJ EM0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=aOyJ+/Xe93y+3+PpIBZv+iBe4n9nStyjkLkGNLTMHNA=; b=X40JjWKtWbdBXWcyh5XRAMICo4RmKhNmcyBsyOk/m0x5yiRNqDVP3Tf9NiAsrBGTxX zRtLHz0nDNgraMmJvOCsrcgCX267kdzitJW3mT+aXRV76m40JhcOr7Ru6S3vBNaldoTt PnsPyXx5CbCYV66r4PTFnYqvAtLEjz3VmntatxIuPA3Ka871tFwIVxueIhDUE2tTUAuY ep4pyiIuSJth4f73zs+hOk05kYVbWFUidJyvM9wXiVaBcIbpc25/V84X80oBGM7kO9hS GVFcx3RKZA+pUZ/gDqk/fs7TBLGZkm9rlfmijeWIzJaBLqe3VV7+f2wMWteu2UnGtb/8 1cjA== X-Gm-Message-State: AIVw113RLCFX5zgCh6TtmNF0ha3jTGy9U7mRHQDIRJHKb5+c+Bc4++3e b1KEWzvIZW3N53nrYHc9BPzIs4rUQcc6 X-Received: by 10.129.226.5 with SMTP id p5mr947560ywl.0.1501760951987; Thu, 03 Aug 2017 04:49:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.218.69 with HTTP; Thu, 3 Aug 2017 04:48:41 -0700 (PDT) In-Reply-To: <201708030527.v735R5dg041043@repo.freebsd.org> References: <201708030527.v735R5dg041043@repo.freebsd.org> From: Ed Schouten Date: Thu, 3 Aug 2017 13:48:41 +0200 Message-ID: Subject: Re: svn commit: r321969 - in head/sys/boot: arm/at91/libat91 arm/ixp425/boot2 i386/boot2 To: Ngie Cooper Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 11:49:13 -0000 2017-08-03 7:27 GMT+02:00 Ngie Cooper : > Modified: head/sys/boot/arm/at91/libat91/printf.c > ============================================================================== > --- head/sys/boot/arm/at91/libat91/printf.c Thu Aug 3 03:45:48 2017 (r321968) > +++ head/sys/boot/arm/at91/libat91/printf.c Thu Aug 3 05:27:05 2017 (r321969) > @@ -20,12 +20,13 @@ > #include > #include "lib.h" > > -void > +int > printf(const char *fmt,...) > { > va_list ap; > const char *hex = "0123456789abcdef"; > char buf[10]; > + const char *fmt_orig = fmt; > char *s; > unsigned u; > int c; > @@ -66,5 +67,5 @@ printf(const char *fmt,...) > } > va_end(ap); > > - return; > + return (int)(fmt - fmt_orig); > } This makes printf() return the number of characters from the format processed, right? This is different from libc's printf(), which returns the number of characters printed. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-head@freebsd.org Thu Aug 3 12:07:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CD95DB48F2; Thu, 3 Aug 2017 12:07:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D942874CBD; Thu, 3 Aug 2017 12:07:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v73C7Up9050902 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 3 Aug 2017 15:07:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v73C7Up9050902 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v73C7THF050900; Thu, 3 Aug 2017 15:07:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 3 Aug 2017 15:07:29 +0300 From: Konstantin Belousov To: Bruce Evans Cc: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321920 - head/sys/sys Message-ID: <20170803120729.GO1700@kib.kiev.ua> References: <201708021014.v72AEHEk061037@repo.freebsd.org> <37abc595-c80e-a8da-04a8-815f42c634de@selasky.org> <20170802135455.GG1700@kib.kiev.ua> <20170803122015.Q1093@besplex.bde.org> <20170803075747.GJ1700@kib.kiev.ua> <20170803180419.R2314@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170803180419.R2314@besplex.bde.org> User-Agent: Mutt/1.8.3 (2017-05-23) 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 autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 12:07:36 -0000 On Thu, Aug 03, 2017 at 07:34:56PM +1000, Bruce Evans wrote: > I see another problem. Masking with 0xfffffffff and casting to unsigned > are gratuitously different spellings for extracting the low 32 bits. > I prefer the cast. Below is one more update. I reformulated the man page text, but not too deep. Also I replaced masking with the cast. diff --git a/share/man/man3/makedev.3 b/share/man/man3/makedev.3 index 87ca953dc79..8ce9c554a09 100644 --- a/share/man/man3/makedev.3 +++ b/share/man/man3/makedev.3 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 28, 2008 +.Dd August 3, 2017 .Dt MAKEDEV 3 .Os .Sh NAME @@ -43,7 +43,7 @@ .Sh DESCRIPTION The .Fn makedev -macro allows a unique device number to be generated based on its +macro returns a device number created from the provided .Fa major and .Fa minor @@ -52,13 +52,26 @@ The .Fn major and .Fn minor -macros can be used to obtain the original numbers from the device number +macros return the original numbers from the device number .Fa dev . +In other words, for a value +.Va dev +of the type +.Vt dev_t , +and values +.Va ma , mi +of the type +.Vt int , +the assertions +.Dl dev == makedev(major(dev), minor(dev)) +.Dl ma == major(makedev(ma, mi)) +.Dl mi == minor(makedev(ma, mi)) +are valid. .Pp In previous implementations of .Fx all block and character devices were uniquely identified by a pair of -major and minor numbers. +stable major and minor numbers. The major number referred to a certain device class (e.g. disks, TTYs) while the minor number identified an instance within the device class. Later versions of @@ -66,7 +79,8 @@ Later versions of automatically generate a unique device number for each character device visible in .Pa /dev/ . -These numbers are not divided in device classes. +These numbers are not divided in device classes and are not guaranteed +to be stable upon reboot or driver reload. .Pp On .Fx @@ -78,11 +92,9 @@ conventional way. .Sh RETURN VALUES The .Fn major -macro returns a device major number that has a value between 0 and 255. -The +and .Fn minor -macro returns a device minor number whose value can span the complete -range of an +macros return numbers whose value can span the complete range of an .Vt int . .Sh SEE ALSO .Xr mknod 2 , diff --git a/sys/sys/types.h b/sys/sys/types.h index 30a08724443..eacbc1ba0c4 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -364,9 +364,9 @@ __bitcount64(__uint64_t _x) #include -#define major(x) ((int)((dev_t)(x) >> 32)) /* major number */ -#define minor(x) ((int)((x) & 0xffffffff)) /* minor number */ -#define makedev(x, y) (((dev_t)(x) << 32) | (unsigned)(y)) /* create dev_t */ +#define major(x) ((int)((dev_t)(x) >> 32)) +#define minor(x) ((int)(x)) +#define makedev(x, y) (((dev_t)(x) << 32) | (unsigned)(y)) /* * These declarations belong elsewhere, but are repeated here and in From owner-svn-src-head@freebsd.org Thu Aug 3 12:45:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A176DB65B4; Thu, 3 Aug 2017 12:45:17 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x231.google.com (mail-pf0-x231.google.com [IPv6:2607:f8b0:400e:c00::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F0C8875F60; Thu, 3 Aug 2017 12:45:16 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x231.google.com with SMTP id d67so5963612pfc.0; Thu, 03 Aug 2017 05:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=ZZkInlk8nbjw6Hzm1zXUDrCfN2+xI1v9lRIe0iROnOw=; b=LCJlIhKyvU7LFr9P+GGMbA/kCwnspjqqtIiU+N2CokGxjiqqxHmAHPMzKpLzp8m0A9 GbnTHOfyycILDIHVE/wpvbVyefyAGuLtO42ws32jG9Tzig4yngJbd0nh5Q0IxvZKHp2t I9HbZmyFvCMeAiHHxZ3DnhAvC+LrXpNqRbrKdJJz4/OoDVDeuQi7bjMGgxAoYcxCi3mX CvHAJDcT3yXlxewQcPSOHccuR0trlV3Hij0yqVSRN1izwqd4Ct+ZHHIO5YDtgsjaPjhN lo0gIbCZtFVLdG0V6MjcQVwbgJPYtucbPjhR+RPeiD0X6qxErDLcZpBZLhO6LPRbf2Ed kZTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=ZZkInlk8nbjw6Hzm1zXUDrCfN2+xI1v9lRIe0iROnOw=; b=F0mJar7PKIx3A1+ZUFlu16eFZVkPzoSE437XDrBBofbULRDi5vuP5Rm9he3ukUDTTd eaAiLRoOcJ/WUKKiO58JvlGtZHbZvVqFFmdYBFZJURk4ZBRHoYsM+zboKCBqmPWU0BMx n0YOgn0EvPKi6FvESI7IJJggL3k/PlEcT7dnFZeAgqAsiGxV49I3GXfYmGVK/5TKkhx0 VLJkgeINR87s+009lAuDqzUDcACTMIG2LAeJBgknmfa9aSB6/I2sN2GzNQMmMVXP9Fm6 NtbHp5YaBmsW7Py0DgkMzE/NZqEnByPsaCnv+08pfr3Wsc2NBkGM/y/WS97Ln6YQNH+g FyFQ== X-Gm-Message-State: AIVw113Dj1HT/fenMT59YD5Xz0QmwDxgLXdpxrMpfY7PObawT+UitJUg xrJsKK/7VsTU0g== X-Received: by 10.98.33.9 with SMTP id h9mr1503690pfh.185.1501764316268; Thu, 03 Aug 2017 05:45:16 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id q24sm30356206pgc.61.2017.08.03.05.45.14 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Aug 2017 05:45:15 -0700 (PDT) Subject: Re: svn commit: r321969 - in head/sys/boot: arm/at91/libat91 arm/ixp425/boot2 i386/boot2 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_08D14944-C06A-484C-A555-04B8B077EACF"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Thu, 3 Aug 2017 05:45:13 -0700 Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <18B68C5B-DFB6-4871-9E56-AFACD0D3CBCE@gmail.com> References: <201708030527.v735R5dg041043@repo.freebsd.org> To: Ed Schouten X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 12:45:17 -0000 --Apple-Mail=_08D14944-C06A-484C-A555-04B8B077EACF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Aug 3, 2017, at 04:48, Ed Schouten wrote: >=20 > 2017-08-03 7:27 GMT+02:00 Ngie Cooper : >> Modified: head/sys/boot/arm/at91/libat91/printf.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/boot/arm/at91/libat91/printf.c Thu Aug 3 03:45:48 = 2017 (r321968) >> +++ head/sys/boot/arm/at91/libat91/printf.c Thu Aug 3 05:27:05 = 2017 (r321969) >> @@ -20,12 +20,13 @@ >> #include >> #include "lib.h" >>=20 >> -void >> +int >> printf(const char *fmt,...) >> { >> va_list ap; >> const char *hex =3D "0123456789abcdef"; >> char buf[10]; >> + const char *fmt_orig =3D fmt; >> char *s; >> unsigned u; >> int c; >> @@ -66,5 +67,5 @@ printf(const char *fmt,...) >> } >> va_end(ap); >>=20 >> - return; >> + return (int)(fmt - fmt_orig); >> } >=20 > This makes printf() return the number of characters from the format > processed, right? This is different from libc's printf(), which > returns the number of characters printed. Yes. markj identified flaws with my approach that need to be = addressed in another commit (unfortunately I didn=E2=80=99t pay close = enough attention to the details when I implemented the change). Thanks, -Ngie --Apple-Mail=_08D14944-C06A-484C-A555-04B8B077EACF Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZgxrZAAoJEPWDqSZpMIYVQFMQAIQ0UKMtX8Q6Wkc06aqqb7ky kbm3ofOiuxjJ/BtAzaWF3l9wZptLhc7B+8ZrM4XO4781g9oHVw0Z0oY/ncPv86AA OgnK7ASMgb/8hby2KIMhdADRB8v8ciUhsNoIv8hX5pMjU+FwyPNoLI86JvLwZNS4 Zn5F51HDKRm09Kz0djepBVkQgFcpWnsyHF4V7LRvgX2n/3E/X5qyayxvAa63naPA YF7tO4wV4UuVU3LSKF5yQgNDx98u9dmmxn20IyWAGjSD127Uf302NmZazhQqAd93 wFxBpOgeRVgKcRsBMzYmCaynIncz+xPwHDeAchu9MjVP3I7vh0wmEbpo5Ht7YC1c bH21uy+9OaSc4sYm1oZlRzUcs8owKMdSuKXoXmdOSZWwtlAxE+4gkSxkqUQIIi+O T5WVXENQjWR9FOpVPZZLMjvwb5XbeTdMcV4FtCZRUE/R6WhLkDTr8PJHYFGmDoxC FL13wrz/XtvfC66hqtuvJhKNJwOqhJjJSbeKRnwX2IuXAIUaQHCJkGEBddEfSuZH PimJM4p7XUbStdjyboSeECPnlX4JE+QDbJPaC1M6hLcazvPm5WIS6Roy2ovBBV/2 bIEqgo/PWDrZiOlBDMambe8MRId5bSVzIfQpz6o2IKZ2tyQNOjNzBY8R8+KcDQIM tinvf2OijcLFGh2abbhf =WCIN -----END PGP SIGNATURE----- --Apple-Mail=_08D14944-C06A-484C-A555-04B8B077EACF-- From owner-svn-src-head@freebsd.org Thu Aug 3 12:46:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69BD5DB6708; Thu, 3 Aug 2017 12:46:49 +0000 (UTC) (envelope-from joerg@bec.de) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [IPv6:2001:4b98:c:538::194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 35DA5760CB; Thu, 3 Aug 2017 12:46:49 +0000 (UTC) (envelope-from joerg@bec.de) Received: from britannica.bec.de (p200300D2ABC21B104639C4FFFE599710.dip0.t-ipconnect.de [IPv6:2003:d2:abc2:1b10:4639:c4ff:fe59:9710]) (Authenticated sender: joerg@bec.de) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 27F5CC5A51; Thu, 3 Aug 2017 14:46:45 +0200 (CEST) Date: Thu, 3 Aug 2017 14:46:27 +0200 From: Joerg Sonnenberger To: Bruce Evans Cc: Ngie Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r321969 - in head/sys/boot: arm/at91/libat91 arm/ixp425/boot2 i386/boot2 Message-ID: <20170803124627.GB2734@britannica.bec.de> References: <201708030527.v735R5dg041043@repo.freebsd.org> <20170803173421.C2203@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170803173421.C2203@besplex.bde.org> User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 12:46:49 -0000 On Thu, Aug 03, 2017 at 05:53:43PM +1000, Bruce Evans wrote: > Freestanding versions (static and otherwise) cause problems with builtins. > -ffreestanding turns off all builtins. The static memcpy used to be > ifdefed so as to use __builtin_memcpy instead of the static one if the > compiler is gcc. That apparently broke with gcc-4.2, since the builtin > will call libc memcpy() in some cases, although memcpy() is unavailable > in the freestanding case. GCC always had a requirement that freestanding environment must provide certain functions (memcpy, memmove, memset, memcmp). At least memcpy and memset are regulary used for certain code constructs. While most calls will be inlined, it is not required. Joerg From owner-svn-src-head@freebsd.org Thu Aug 3 12:51:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80DD3DB6BFB; Thu, 3 Aug 2017 12:51:45 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x229.google.com (mail-pf0-x229.google.com [IPv6:2607:f8b0:400e:c00::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4A4D476445; Thu, 3 Aug 2017 12:51:45 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x229.google.com with SMTP id d67so6027592pfc.0; Thu, 03 Aug 2017 05:51:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=NWlqcWaCGlX2NOEdQ5SeuLPmtlsPOth5X8/aaoz8SIg=; b=kYk3b9OpaWvlub6NULKWerEHPdxWxTJ0K5zmqmHC6nfor4Vd4JMY+WnrGTRRkhEmGm s2MOyzPID6vkpckmzMXQUf6Vb1MexZhw6U9WJh2Wp9gOIpeiCikOMZpJLeso2ETj3Y9v +UYacX6rtvW3U+WdGaGYEImui4s66g4oiYRfY3+JgjCz5eP+p85S/IGAM/O6wuqRxZbr xe7X4axar2lpxLC9rIJdpoU8Es+N6pJm2B4y+6t8hYjqKAvbw7CnrakhGqT8CDbzgb5v XhSl8gQIVcVrHyQJzVJ3SqDyzZDZ/TY7Wbs3ZjygrXt47Kft2gtrgGgaB2u1q+4IWDDQ Qzqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=NWlqcWaCGlX2NOEdQ5SeuLPmtlsPOth5X8/aaoz8SIg=; b=T7UjS6n+f/GPwj8RWJtaAzSbhacE3UQrummF3J4/CFbI9/9Ks+MlUr+2uQvPNz+mOK 04h6gzI+A0errv0p9qpCxgvqFB3B+MIxES00w4Eo0YgKcqWjGn9e6fdBPSfvnMsAdNRY sCkshzQti5yzk/ALvnhOhdhRQCk0P4MW8hUKX+lvY4okcWmiEmwoVCwl8Q7HARRwOA2M KXj1HrYCdO0UqwqdbOZezPbyN4HspDXblGCOVtvmuAL9U3cM479goyuH2doowYlWRI+G 4argwB5CjaWAi4so+GO1BNRC8z79nuoDwq88L/F0sOnQEiOfck9st+NU1hiTPELPgvcx 215w== X-Gm-Message-State: AIVw110HSMAYTS0DlVuoSPXpwHouQbJ+sajYXcTWwxu5H8YXrdQ/Wvib Uso1QNzAhB+9IRL4+bY= X-Received: by 10.84.228.215 with SMTP id y23mr1778115pli.358.1501764704596; Thu, 03 Aug 2017 05:51:44 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id i67sm12875393pgd.25.2017.08.03.05.51.43 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Aug 2017 05:51:43 -0700 (PDT) Subject: Re: svn commit: r321969 - in head/sys/boot: arm/at91/libat91 arm/ixp425/boot2 i386/boot2 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_00D0BBC5-84C1-4464-844F-7D7F64E274A1"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <20170803173421.C2203@besplex.bde.org> Date: Thu, 3 Aug 2017 05:51:42 -0700 Cc: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201708030527.v735R5dg041043@repo.freebsd.org> <20170803173421.C2203@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 12:51:45 -0000 --Apple-Mail=_00D0BBC5-84C1-4464-844F-7D7F64E274A1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Aug 3, 2017, at 00:53, Bruce Evans wrote: >=20 > On Thu, 3 Aug 2017, Ngie Cooper wrote: >=20 >> Log: >> Fix the return types for printf and putchar to match their libc and >> POSIX equivalents >>=20 >> Both printf and putchar return int, not void. >>=20 >> This will allow code that leverages the libcalls and checks/rely on = the >> return type to interchangeably between loader code and non-loader >> code. >>=20 >> MFC after: 1 month >>=20 >> Modified: >> head/sys/boot/arm/at91/libat91/lib.h >> head/sys/boot/arm/at91/libat91/printf.c >> head/sys/boot/arm/at91/libat91/putchar.c >> head/sys/boot/arm/ixp425/boot2/ixp425_board.c >> head/sys/boot/arm/ixp425/boot2/lib.h >> head/sys/boot/i386/boot2/boot2.c >=20 > This is wrong for at least i386/boot2. It isn't part of the loader, = and > saves space by not returning unused values. >=20 >> Modified: head/sys/boot/i386/boot2/boot2.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/boot/i386/boot2/boot2.c Thu Aug 3 03:45:48 2017 = (r321968) >> +++ head/sys/boot/i386/boot2/boot2.c Thu Aug 3 05:27:05 2017 = (r321969) >> @@ -114,8 +114,8 @@ void exit(int); >> static void load(void); >> static int parse(void); >> static int dskread(void *, unsigned, unsigned); >> -static void printf(const char *,...); >> -static void putchar(int); >> +static int printf(const char *,...); >> +static int putchar(int); >=20 > These are freestanding static functions, so they have nothing to do > with library functions except their name is a hint that they are > similar. >=20 > Since they are static, -funit-at-a-time might allow the unused return = values > to be optimized away. Then returning unused values would be just an > obfuscation. >=20 > This file still has a static memcpy() which is quite different from = the > libc version. It doesn't return an unused value, and its arg types = are > all different (no newfangled size_t or newerfangled restrict). >=20 > Freestanding versions (static and otherwise) cause problems with = builtins. > -ffreestanding turns off all builtins. The static memcpy used to be > ifdefed so as to use __builtin_memcpy instead of the static one if the > compiler is gcc. That apparently broke with gcc-4.2, since the = builtin > will call libc memcpy() in some cases, although memcpy() is = unavailable > in the freestanding case. I get the point about them being freestanding functions, but if the = functions aren=E2=80=99t meant to be compatible they should be named = differently. Part of the issue some code that bridged loader and = non-loader users (bootdevtest and zfsboottest for example) relied on = feature parity (in part because the ZFS code required it and because of = how things are compiled/linked together). If compilers get pedantic = enough, then they=E2=80=99ll flag these issues as errors and we=E2=80=99ll= have to address these compatibilities at that point. My intent was ok (I think), but the implementation I did is wrong, so = I=E2=80=99ll revert the change completely and leave it for someone else = to deal with the incompatibilities (I=E2=80=99ll just integrate = bootdevtest and zfsboottest into buildworld under sys/boot so they = won=E2=80=99t remain broken for weeks on end, like they were recently). Thanks, -Ngie --Apple-Mail=_00D0BBC5-84C1-4464-844F-7D7F64E274A1 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZgxxeAAoJEPWDqSZpMIYV9cwQALEbGxM4T5iX8c8dSM8SnRXR ZIU7so3LCYyB90eUAejhAmf9DD0VKkPq/Jt4btMpht8Y5zqZuskvcweuAxTZlZ+y EDHVVrvz0afYO9iwjV3UVjVCE7Kh7aZ0PfH44Nu1SqseTxqd5mueG6Gi/oAXv0nu +n35vZnbNcyl1ZpPrxp+UQ01TcyOJkjUHwW+Bzb4EXtE+7DRzIkO2popNWvJf12a ht6iapBUWuTLj/zfPb2cSa2R+bWUeXBFVbGmP4ugIws/Nv2cgGbLpZw/EoAviYvq vh/7r/pzQDQPqg/Zz0QOlprZ1TtwsnJ+XaLPHmjXYanFplCZ6NRtIp2AWnRX++AT /7IQ0oaCUtos2oakqHgH9Xiw7vESpfSJxR8yZsYtYSH0xSG9gbR1gBBWCd0B1x6F 2Dvr5zzc2pOs9mDsPjiRsyU5lecKH1ULn81jIK/FSxmI34o0O/KjarYu4jDtabqE NkxfvQBYAl3XALM1iSfNuo640/gPJoHGI5lpuLhz4Pl/a6pMTNXUBk+dE1EX9lOK LkjtzqjAAvVly2tl4dLJWLPUeAoyjJNbOo2NbHzcp1zXwxqXEGFGwscY6ZIukCWy 6BGusj35HqWEQdhhgeRC2zXuLiQPnb/hkBSaVWTxisCL06rOgmnbBokkwgzVOXtp WdQ5xacFWGHgp0l1iGGq =TrgD -----END PGP SIGNATURE----- --Apple-Mail=_00D0BBC5-84C1-4464-844F-7D7F64E274A1-- From owner-svn-src-head@freebsd.org Thu Aug 3 13:26:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B4CFDBC730; Thu, 3 Aug 2017 13:26:52 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 153F877721; Thu, 3 Aug 2017 13:26:52 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v73DQpkP036981; Thu, 3 Aug 2017 13:26:51 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v73DQpf1036980; Thu, 3 Aug 2017 13:26:51 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201708031326.v73DQpf1036980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 3 Aug 2017 13:26:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321989 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: loos X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 321989 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 13:26:52 -0000 Author: loos Date: Thu Aug 3 13:26:51 2017 New Revision: 321989 URL: https://svnweb.freebsd.org/changeset/base/321989 Log: Add myself to the calendar.freebsd. Reported by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Thu Aug 3 10:11:06 2017 (r321988) +++ head/usr.bin/calendar/calendars/calendar.freebsd Thu Aug 3 13:26:51 2017 (r321989) @@ -99,6 +99,7 @@ 03/07 Michael P. Pritchard born in Los Angeles, California, United States, 1964 03/07 Giorgos Keramidas born in Athens, Greece, 1976 03/10 Andreas Klemm born in Duesseldorf, Nordrhein-Westfalen, Germany, 1963 +03/10 Luiz Otavio O Souza born in Bauru, Sao Paulo, Brazil, 1978 03/10 Nikolai Lifanov born in Moscow, Russian Federation, 1989 03/11 Soeren Straarup born in Andst, Denmark, 1978 03/12 Greg Lewis born in Adelaide, South Australia, Australia, 1969 From owner-svn-src-head@freebsd.org Thu Aug 3 13:50:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2FBDDBDC68; Thu, 3 Aug 2017 13:50:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7ED427C91A; Thu, 3 Aug 2017 13:50:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v73DokNK045972; Thu, 3 Aug 2017 13:50:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v73DokLX045966; Thu, 3 Aug 2017 13:50:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708031350.v73DokLX045966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 3 Aug 2017 13:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321991 - in head/sys/boot: arm/at91/libat91 arm/ixp425/boot2 i386/boot2 X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in head/sys/boot: arm/at91/libat91 arm/ixp425/boot2 i386/boot2 X-SVN-Commit-Revision: 321991 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 13:50:47 -0000 Author: ngie Date: Thu Aug 3 13:50:46 2017 New Revision: 321991 URL: https://svnweb.freebsd.org/changeset/base/321991 Log: Revert r321969 My change had good intentions, but the implementation was incorrect: - printf was returning the number of characters in the format string plus the NUL, but failed in two regards implementation wise: -- the pathological case, printf(""), wasn't being handled properly since the pointer is always incremented, so the value returned would be off-by-one. -- printf(3) reports the number of characters printed post-conversion via vfprintf, etc. - putchar(3) should return the character printed or EOF, not the number of characters output to the screen. My goal in making the change (again) was to increase parity, but as bde pointed out these are freestanding functions, so they don't have to conform to libc/POSIX. I argued that the functions should be named differently since the implementation is different enough to warrant it and to allow boot2 code to be usable when linked against sys/boot and libstand and other libraries in base. I have no interest in pushing this change forward more though, as the original concern I had behind the change with zfsboottest was resolved in r321849 and r321852. The next person that updates the toolchain gets to deal with the inconsistency if it's flagged by a newer compiler. MFC after: 1 month Reported by: ed, markj Modified: head/sys/boot/arm/at91/libat91/lib.h head/sys/boot/arm/at91/libat91/printf.c head/sys/boot/arm/at91/libat91/putchar.c head/sys/boot/arm/ixp425/boot2/ixp425_board.c head/sys/boot/arm/ixp425/boot2/lib.h head/sys/boot/i386/boot2/boot2.c Modified: head/sys/boot/arm/at91/libat91/lib.h ============================================================================== --- head/sys/boot/arm/at91/libat91/lib.h Thu Aug 3 13:45:26 2017 (r321990) +++ head/sys/boot/arm/at91/libat91/lib.h Thu Aug 3 13:50:46 2017 (r321991) @@ -28,9 +28,9 @@ #define ARM_BOOT_LIB_H int getc(int); -int putchar(int); -int xputchar(int); -int printf(const char *fmt,...); +void putchar(int); +void xputchar(int); +void printf(const char *fmt,...); /* The following function write eeprom at ee_addr using data */ /* from data_add for size bytes. */ Modified: head/sys/boot/arm/at91/libat91/printf.c ============================================================================== --- head/sys/boot/arm/at91/libat91/printf.c Thu Aug 3 13:45:26 2017 (r321990) +++ head/sys/boot/arm/at91/libat91/printf.c Thu Aug 3 13:50:46 2017 (r321991) @@ -20,13 +20,12 @@ #include #include "lib.h" -int +void printf(const char *fmt,...) { va_list ap; const char *hex = "0123456789abcdef"; char buf[10]; - const char *fmt_orig = fmt; char *s; unsigned u; int c; @@ -67,5 +66,5 @@ printf(const char *fmt,...) } va_end(ap); - return (int)(fmt - fmt_orig); + return; } Modified: head/sys/boot/arm/at91/libat91/putchar.c ============================================================================== --- head/sys/boot/arm/at91/libat91/putchar.c Thu Aug 3 13:45:26 2017 (r321990) +++ head/sys/boot/arm/at91/libat91/putchar.c Thu Aug 3 13:50:46 2017 (r321991) @@ -39,11 +39,11 @@ #include "lib.h" /* - * int putchar(int ch) + * void putchar(int ch) * Writes a character to the DBGU port. It assumes that DBGU has * already been initialized. */ -int +void putchar(int ch) { AT91PS_USART pUSART = (AT91PS_USART)AT91C_BASE_DBGU; @@ -51,14 +51,12 @@ putchar(int ch) while (!(pUSART->US_CSR & AT91C_US_TXRDY)) continue; pUSART->US_THR = (ch & 0xFF); - return (1); } -int +void xputchar(int ch) { - if (ch == '\n') - putchar('\r'); - putchar(ch); - return (ch == '\n' ? 2 : 1); + if (ch == '\n') + putchar('\r'); + putchar(ch); } Modified: head/sys/boot/arm/ixp425/boot2/ixp425_board.c ============================================================================== --- head/sys/boot/arm/ixp425/boot2/ixp425_board.c Thu Aug 3 13:45:26 2017 (r321990) +++ head/sys/boot/arm/ixp425/boot2/ixp425_board.c Thu Aug 3 13:50:46 2017 (r321991) @@ -165,7 +165,7 @@ getc(int seconds) return c; } -int +void putchar(int ch) { int delay, limit; @@ -179,16 +179,14 @@ putchar(int ch) limit = 40; while ((uart_getreg(ubase, REG_LSR) & LSR_TEMT) == 0 && --limit) DELAY(delay); - return (1); } -int +void xputchar(int ch) { if (ch == '\n') putchar('\r'); putchar(ch); - return (ch == '\n' ? 2 : 1); } void Modified: head/sys/boot/arm/ixp425/boot2/lib.h ============================================================================== --- head/sys/boot/arm/ixp425/boot2/lib.h Thu Aug 3 13:45:26 2017 (r321990) +++ head/sys/boot/arm/ixp425/boot2/lib.h Thu Aug 3 13:50:46 2017 (r321991) @@ -35,12 +35,12 @@ int main(void); void DELAY(int); int getc(int); -int putchar(int); -int xputchar(int); +void putchar(int); +void xputchar(int); void putstr(const char *); void puthex8(u_int8_t); void puthexlist(const u_int8_t *, int); -int printf(const char *fmt,...); +void printf(const char *fmt,...); void bzero(void *, size_t); char *strcpy(char *to, const char *from); Modified: head/sys/boot/i386/boot2/boot2.c ============================================================================== --- head/sys/boot/i386/boot2/boot2.c Thu Aug 3 13:45:26 2017 (r321990) +++ head/sys/boot/i386/boot2/boot2.c Thu Aug 3 13:50:46 2017 (r321991) @@ -114,8 +114,8 @@ void exit(int); static void load(void); static int parse(void); static int dskread(void *, unsigned, unsigned); -static int printf(const char *,...); -static int putchar(int); +static void printf(const char *,...); +static void putchar(int); static int drvread(void *, unsigned, unsigned); static int keyhit(unsigned); static int xputc(int); @@ -521,12 +521,11 @@ error: return -1; } -static int +static void printf(const char *fmt,...) { va_list ap; static char buf[10]; - const char *fmt_orig = fmt; char *s; unsigned u; int c; @@ -557,16 +556,15 @@ printf(const char *fmt,...) putchar(c); } va_end(ap); - return (int)(fmt - fmt_orig); + return; } -static int +static void putchar(int c) { if (c == '\n') xputc('\r'); xputc(c); - return (c == '\n' ? 2 : 1); } static int From owner-svn-src-head@freebsd.org Thu Aug 3 14:35:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23349DC07E0; Thu, 3 Aug 2017 14:35:04 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E624A7F979; Thu, 3 Aug 2017 14:35:03 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v73EZ3sj067388; Thu, 3 Aug 2017 14:35:03 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v73EZ3v5067387; Thu, 3 Aug 2017 14:35:03 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201708031435.v73EZ3v5067387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Thu, 3 Aug 2017 14:35:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322013 - head/usr.bin/cut X-SVN-Group: head X-SVN-Commit-Author: sevan X-SVN-Commit-Paths: head/usr.bin/cut X-SVN-Commit-Revision: 322013 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 14:35:04 -0000 Author: sevan (doc committer) Date: Thu Aug 3 14:35:02 2017 New Revision: 322013 URL: https://svnweb.freebsd.org/changeset/base/322013 Log: Document -w flag is an extension to POSIX. PR: 201937 Submitted by: Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D11842 Modified: head/usr.bin/cut/cut.1 Modified: head/usr.bin/cut/cut.1 ============================================================================== --- head/usr.bin/cut/cut.1 Thu Aug 3 14:22:48 2017 (r322012) +++ head/usr.bin/cut/cut.1 Thu Aug 3 14:35:02 2017 (r322013) @@ -31,7 +31,7 @@ .\" @(#)cut.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd August 8, 2012 +.Dd August 3, 2017 .Dt CUT 1 .Os .Sh NAME @@ -154,6 +154,10 @@ The .Nm utility conforms to .St -p1003.2-92 . +.Pp +The +.Fl w +flag is an extension to the specification. .Sh HISTORY A .Nm From owner-svn-src-head@freebsd.org Thu Aug 3 14:43:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B458DC0D9F; Thu, 3 Aug 2017 14:43:32 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38B967FE34; Thu, 3 Aug 2017 14:43:32 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v73EhVo9071403; Thu, 3 Aug 2017 14:43:31 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v73EhVdf071397; Thu, 3 Aug 2017 14:43:31 GMT (envelope-from np@FreeBSD.org) Message-Id: <201708031443.v73EhVdf071397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 3 Aug 2017 14:43:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322014 - in head: sys/conf sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/cudbg sys/modules/cxgbe/if_cxgbe usr.sbin/cxgbetool X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: in head: sys/conf sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/cudbg sys/modules/cxgbe/if_cxgbe usr.sbin/cxgbetool X-SVN-Commit-Revision: 322014 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 14:43:32 -0000 Author: np Date: Thu Aug 3 14:43:30 2017 New Revision: 322014 URL: https://svnweb.freebsd.org/changeset/base/322014 Log: cxgbe(4): Initial import of the "collect" component of Chelsio unified debug (cudbg) code, hooked up to the main driver via an ioctl. The ioctl can be used to collect the chip's internal state in a compressed dump file. These dumps can be decoded with the "view" component of cudbg. Obtained from: Chelsio Communications MFC after: 2 months Sponsored by: Chelsio Communications Added: head/sys/dev/cxgbe/cudbg/ head/sys/dev/cxgbe/cudbg/cudbg.h (contents, props changed) head/sys/dev/cxgbe/cudbg/cudbg_common.c (contents, props changed) head/sys/dev/cxgbe/cudbg/cudbg_entity.h (contents, props changed) head/sys/dev/cxgbe/cudbg/cudbg_flash_utils.c (contents, props changed) head/sys/dev/cxgbe/cudbg/cudbg_lib.c (contents, props changed) head/sys/dev/cxgbe/cudbg/cudbg_lib.h (contents, props changed) head/sys/dev/cxgbe/cudbg/cudbg_lib_common.h (contents, props changed) head/sys/dev/cxgbe/cudbg/cudbg_wtp.c (contents, props changed) head/sys/dev/cxgbe/cudbg/fastlz.c (contents, props changed) head/sys/dev/cxgbe/cudbg/fastlz.h (contents, props changed) head/sys/dev/cxgbe/cudbg/fastlz_api.c (contents, props changed) Modified: head/sys/conf/files head/sys/dev/cxgbe/common/t4_hw.h head/sys/dev/cxgbe/t4_ioctl.h head/sys/dev/cxgbe/t4_main.c head/sys/modules/cxgbe/if_cxgbe/Makefile head/usr.sbin/cxgbetool/cxgbetool.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Aug 3 14:35:02 2017 (r322013) +++ head/sys/conf/files Thu Aug 3 14:43:30 2017 (r322014) @@ -1352,6 +1352,18 @@ dev/cxgbe/common/t4_hw.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/common/t4vf_hw.c optional cxgbev pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" +dev/cxgbe/cudbg/cudbg_common.c optional cxgbe \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" +dev/cxgbe/cudbg/cudbg_flash_utils.c optional cxgbe \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" +dev/cxgbe/cudbg/cudbg_lib.c optional cxgbe \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" +dev/cxgbe/cudbg/cudbg_wtp.c optional cxgbe \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" +dev/cxgbe/cudbg/fastlz.c optional cxgbe \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" +dev/cxgbe/cudbg/fastlz_api.c optional cxgbe \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" t4fw_cfg.c optional cxgbe \ compile-with "${AWK} -f $S/tools/fw_stub.awk t4fw_cfg.fw:t4fw_cfg t4fw_cfg_uwire.fw:t4fw_cfg_uwire t4fw.fw:t4fw -mt4fw_cfg -c${.TARGET}" \ no-implicit-rule before-depend local \ Modified: head/sys/dev/cxgbe/common/t4_hw.h ============================================================================== --- head/sys/dev/cxgbe/common/t4_hw.h Thu Aug 3 14:35:02 2017 (r322013) +++ head/sys/dev/cxgbe/common/t4_hw.h Thu Aug 3 14:43:30 2017 (r322014) @@ -276,8 +276,17 @@ enum { FLASH_MIN_SIZE = FLASH_CFG_START + FLASH_CFG_MAX_SIZE, /* - * Sectors 32-63 are reserved for FLASH failover. + * Sectors 32-63 for CUDBG. */ + FLASH_CUDBG_START_SEC = 32, + FLASH_CUDBG_NSECS = 32, + FLASH_CUDBG_START = FLASH_START(FLASH_CUDBG_START_SEC), + FLASH_CUDBG_MAX_SIZE = FLASH_MAX_SIZE(FLASH_CUDBG_NSECS), + + /* + * Size of defined FLASH regions. + */ + FLASH_END_SEC = 64, }; #undef FLASH_START Added: head/sys/dev/cxgbe/cudbg/cudbg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/cxgbe/cudbg/cudbg.h Thu Aug 3 14:43:30 2017 (r322014) @@ -0,0 +1,474 @@ +/*- + * Copyright (c) 2017 Chelsio Communications, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE 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$ + * + */ + +/* + * Chelsio Unified Debug Interface header file. + * Version 1.1 + */ +#ifndef _CUDBG_IF_H_ +#define _CUDBG_IF_H_ + +#ifdef __GNUC__ +#define ATTRIBUTE_UNUSED __attribute__ ((unused)) +#else +#define ATTRIBUTE_UNUSED +#endif + +#if defined(CONFIG_CUDBG_DEBUG) +#define cudbg_debug(pdbg_init, format, ...) do {\ + pdbg_init->print(format, ##__VA_ARGS__); \ +} while (0) +#else +#define cudbg_debug(pdbg_init, format, ...) do { } while (0) +#endif + +#define OUT +#define IN +#define INOUT + +/* Error codes */ + +#define CUDBG_STATUS_SUCCESS 0 +#define CUDBG_STATUS_NOSPACE -2 +#define CUDBG_STATUS_FLASH_WRITE_FAIL -3 +#define CUDBG_STATUS_FLASH_READ_FAIL -4 +#define CUDBG_STATUS_UNDEFINED_OUT_BUF -5 +#define CUDBG_STATUS_UNDEFINED_CBFN -6 +#define CUDBG_STATUS_UNDEFINED_PRINTF_CBFN -7 +#define CUDBG_STATUS_ADAP_INVALID -8 +#define CUDBG_STATUS_FLASH_EMPTY -9 +#define CUDBG_STATUS_NO_ADAPTER -10 +#define CUDBG_STATUS_NO_SIGNATURE -11 +#define CUDBG_STATUS_MULTIPLE_REG -12 +#define CUDBG_STATUS_UNREGISTERED -13 +#define CUDBG_STATUS_UNDEFINED_ENTITY -14 +#define CUDBG_STATUS_REG_FAIlED -15 +#define CUDBG_STATUS_DEVLOG_FAILED -16 +#define CUDBG_STATUS_SMALL_BUFF -17 +#define CUDBG_STATUS_CHKSUM_MISSMATCH -18 +#define CUDBG_STATUS_NO_SCRATCH_MEM -19 +#define CUDBG_STATUS_OUTBUFF_OVERFLOW -20 +#define CUDBG_STATUS_INVALID_BUFF -21 /* Invalid magic */ +#define CUDBG_STATUS_FILE_OPEN_FAIL -22 +#define CUDBG_STATUS_DEVLOG_INT_FAIL -23 +#define CUDBG_STATUS_ENTITY_NOT_FOUND -24 +#define CUDBG_STATUS_DECOMPRESS_FAIL -25 +#define CUDBG_STATUS_BUFFER_SHORT -26 +#define CUDBG_METADATA_VERSION_MISMATCH -27 +#define CUDBG_STATUS_NOT_IMPLEMENTED -28 +#define CUDBG_SYSTEM_ERROR -29 +#define CUDBG_STATUS_MMAP_FAILED -30 +#define CUDBG_STATUS_FILE_WRITE_FAILED -31 +#define CUDBG_STATUS_CCLK_NOT_DEFINED -32 +#define CUDBG_STATUS_FLASH_FULL -33 +#define CUDBG_STATUS_SECTOR_EMPTY -34 +#define CUDBG_STATUS_ENTITY_NOT_REQUESTED -35 +#define CUDBG_STATUS_NOT_SUPPORTED -36 +#define CUDBG_STATUS_FILE_READ_FAILED -37 +#define CUDBG_STATUS_CORRUPTED -38 +#define CUDBG_STATUS_INVALID_INDEX -39 + +#define CUDBG_MAJOR_VERSION 1 +#define CUDBG_MINOR_VERSION 14 +#define CUDBG_BUILD_VERSION 0 + +#define CUDBG_FILE_NAME_LEN 256 +#define CUDBG_DIR_NAME_LEN 256 +#define CUDBG_MAX_BITMAP_LEN 16 + +static char ATTRIBUTE_UNUSED * err_msg[] = { + "Success", + "Unknown", + "No space", + "Flash write fail", + "Flash read fail", + "Undefined out buf", + "Callback function undefined", + "Print callback function undefined", + "ADAP invalid", + "Flash empty", + "No adapter", + "No signature", + "Multiple registration", + "Unregistered", + "Undefined entity", + "Reg failed", + "Devlog failed", + "Small buff", + "Checksum mismatch", + "No scratch memory", + "Outbuff overflow", + "Invalid buffer", + "File open fail", + "Devlog int fail", + "Entity not found", + "Decompress fail", + "Buffer short", + "Version mismatch", + "Not implemented", + "System error", + "Mmap failed", + "File write failed", + "cclk not defined", + "Flash full", + "Sector empty", + "Entity not requested", + "Not supported", + "File read fail", + "Corrupted", + "Invalid Index" +}; + +enum CUDBG_DBG_ENTITY_TYPE { + CUDBG_ALL = 0, + CUDBG_REG_DUMP = 1, + CUDBG_DEV_LOG = 2, + CUDBG_CIM_LA = 3, + CUDBG_CIM_MA_LA = 4, + CUDBG_CIM_QCFG = 5, + CUDBG_CIM_IBQ_TP0 = 6, + CUDBG_CIM_IBQ_TP1 = 7, + CUDBG_CIM_IBQ_ULP = 8, + CUDBG_CIM_IBQ_SGE0 = 9, + CUDBG_CIM_IBQ_SGE1 = 10, + CUDBG_CIM_IBQ_NCSI = 11, + CUDBG_CIM_OBQ_ULP0 = 12, + CUDBG_CIM_OBQ_ULP1 = 13, + CUDBG_CIM_OBQ_ULP2 = 14, + CUDBG_CIM_OBQ_ULP3 = 15, + CUDBG_CIM_OBQ_SGE = 16, + CUDBG_CIM_OBQ_NCSI = 17, + CUDBG_EDC0 = 18, + CUDBG_EDC1 = 19, + CUDBG_MC0 = 20, + CUDBG_MC1 = 21, + CUDBG_RSS = 22, + CUDBG_RSS_PF_CONF = 23, + CUDBG_RSS_KEY = 24, + CUDBG_RSS_VF_CONF = 25, + CUDBG_RSS_CONF = 26, + CUDBG_PATH_MTU = 27, + CUDBG_SW_STATE = 28, + CUDBG_WTP = 29, + CUDBG_PM_STATS = 30, + CUDBG_HW_SCHED = 31, + CUDBG_TCP_STATS = 32, + CUDBG_TP_ERR_STATS = 33, + CUDBG_FCOE_STATS = 34, + CUDBG_RDMA_STATS = 35, + CUDBG_TP_INDIRECT = 36, + CUDBG_SGE_INDIRECT = 37, + CUDBG_CPL_STATS = 38, + CUDBG_DDP_STATS = 39, + CUDBG_WC_STATS = 40, + CUDBG_ULPRX_LA = 41, + CUDBG_LB_STATS = 42, + CUDBG_TP_LA = 43, + CUDBG_MEMINFO = 44, + CUDBG_CIM_PIF_LA = 45, + CUDBG_CLK = 46, + CUDBG_CIM_OBQ_RXQ0 = 47, + CUDBG_CIM_OBQ_RXQ1 = 48, + CUDBG_MAC_STATS = 49, + CUDBG_PCIE_INDIRECT = 50, + CUDBG_PM_INDIRECT = 51, + CUDBG_FULL = 52, + CUDBG_TX_RATE = 53, + CUDBG_TID_INFO = 54, + CUDBG_PCIE_CONFIG = 55, + CUDBG_DUMP_CONTEXT = 56, + CUDBG_MPS_TCAM = 57, + CUDBG_VPD_DATA = 58, + CUDBG_LE_TCAM = 59, + CUDBG_CCTRL = 60, + CUDBG_MA_INDIRECT = 61, + CUDBG_ULPTX_LA = 62, + CUDBG_EXT_ENTITY = 63, + CUDBG_UP_CIM_INDIRECT = 64, + CUDBG_PBT_TABLE = 65, + CUDBG_MBOX_LOG = 66, + CUDBG_HMA_INDIRECT = 67, + CUDBG_MAX_ENTITY = 68, +}; + +#define ENTITY_FLAG_NULL 0 +#define ENTITY_FLAG_REGISTER 1 +#define ENTITY_FLAG_BINARY 2 +#define ENTITY_FLAG_FW_NO_ATTACH 3 + +/* file_name matches Linux cxgb4 debugfs entry names. */ +struct el {char *name; char *file_name; int bit; u32 flag; }; +static struct el ATTRIBUTE_UNUSED entity_list[] = { + {"all", "all", CUDBG_ALL, ENTITY_FLAG_NULL}, + {"regdump", "regdump", CUDBG_REG_DUMP, 1 << ENTITY_FLAG_REGISTER}, + /* {"reg", CUDBG_REG_DUMP},*/ + {"devlog", "devlog", CUDBG_DEV_LOG, ENTITY_FLAG_NULL}, + {"cimla", "cim_la", CUDBG_CIM_LA, ENTITY_FLAG_NULL}, + {"cimmala", "cim_ma_la", CUDBG_CIM_MA_LA, ENTITY_FLAG_NULL}, + {"cimqcfg", "cim_qcfg", CUDBG_CIM_QCFG, ENTITY_FLAG_NULL}, + {"ibqtp0", "ibq_tp0", CUDBG_CIM_IBQ_TP0, ENTITY_FLAG_NULL}, + {"ibqtp1", "ibq_tp1", CUDBG_CIM_IBQ_TP1, ENTITY_FLAG_NULL}, + {"ibqulp", "ibq_ulp", CUDBG_CIM_IBQ_ULP, ENTITY_FLAG_NULL}, + {"ibqsge0", "ibq_sge0", CUDBG_CIM_IBQ_SGE0, ENTITY_FLAG_NULL}, + {"ibqsge1", "ibq_sge1", CUDBG_CIM_IBQ_SGE1, ENTITY_FLAG_NULL}, + {"ibqncsi", "ibq_ncsi", CUDBG_CIM_IBQ_NCSI, ENTITY_FLAG_NULL}, + {"obqulp0", "obq_ulp0", CUDBG_CIM_OBQ_ULP0, ENTITY_FLAG_NULL}, + /* {"cimobqulp1", CUDBG_CIM_OBQ_ULP1},*/ + {"obqulp1", "obq_ulp1", CUDBG_CIM_OBQ_ULP1, ENTITY_FLAG_NULL}, + {"obqulp2", "obq_ulp2", CUDBG_CIM_OBQ_ULP2, ENTITY_FLAG_NULL}, + {"obqulp3", "obq_ulp3", CUDBG_CIM_OBQ_ULP3, ENTITY_FLAG_NULL}, + {"obqsge", "obq_sge", CUDBG_CIM_OBQ_SGE, ENTITY_FLAG_NULL}, + {"obqncsi", "obq_ncsi", CUDBG_CIM_OBQ_NCSI, ENTITY_FLAG_NULL}, + {"edc0", "edc0", CUDBG_EDC0, (1 << ENTITY_FLAG_BINARY)}, + {"edc1", "edc1", CUDBG_EDC1, (1 << ENTITY_FLAG_BINARY)}, + {"mc0", "mc0", CUDBG_MC0, (1 << ENTITY_FLAG_BINARY)}, + {"mc1", "mc1", CUDBG_MC1, (1 << ENTITY_FLAG_BINARY)}, + {"rss", "rss", CUDBG_RSS, ENTITY_FLAG_NULL}, + {"rss_pf_config", "rss_pf_config", CUDBG_RSS_PF_CONF, ENTITY_FLAG_NULL}, + {"rss_key", "rss_key", CUDBG_RSS_KEY, ENTITY_FLAG_NULL}, + {"rss_vf_config", "rss_vf_config", CUDBG_RSS_VF_CONF, ENTITY_FLAG_NULL}, + {"rss_config", "rss_config", CUDBG_RSS_CONF, ENTITY_FLAG_NULL}, + {"pathmtu", "path_mtus", CUDBG_PATH_MTU, ENTITY_FLAG_NULL}, + {"swstate", "sw_state", CUDBG_SW_STATE, ENTITY_FLAG_NULL}, + {"wtp", "wtp", CUDBG_WTP, ENTITY_FLAG_NULL}, + {"pmstats", "pm_stats", CUDBG_PM_STATS, ENTITY_FLAG_NULL}, + {"hwsched", "hw_sched", CUDBG_HW_SCHED, ENTITY_FLAG_NULL}, + {"tcpstats", "tcp_stats", CUDBG_TCP_STATS, ENTITY_FLAG_NULL}, + {"tperrstats", "tp_err_stats", CUDBG_TP_ERR_STATS, ENTITY_FLAG_NULL}, + {"fcoestats", "fcoe_stats", CUDBG_FCOE_STATS, ENTITY_FLAG_NULL}, + {"rdmastats", "rdma_stats", CUDBG_RDMA_STATS, ENTITY_FLAG_NULL}, + {"tpindirect", "tp_indirect", CUDBG_TP_INDIRECT, + 1 << ENTITY_FLAG_REGISTER}, + {"sgeindirect", "sge_indirect", CUDBG_SGE_INDIRECT, + 1 << ENTITY_FLAG_REGISTER}, + {"cplstats", "cpl_stats", CUDBG_CPL_STATS, ENTITY_FLAG_NULL}, + {"ddpstats", "ddp_stats", CUDBG_DDP_STATS, ENTITY_FLAG_NULL}, + {"wcstats", "wc_stats", CUDBG_WC_STATS, ENTITY_FLAG_NULL}, + {"ulprxla", "ulprx_la", CUDBG_ULPRX_LA, ENTITY_FLAG_NULL}, + {"lbstats", "lb_stats", CUDBG_LB_STATS, ENTITY_FLAG_NULL}, + {"tpla", "tp_la", CUDBG_TP_LA, ENTITY_FLAG_NULL}, + {"meminfo", "meminfo", CUDBG_MEMINFO, ENTITY_FLAG_NULL}, + {"cimpifla", "cim_pif_la", CUDBG_CIM_PIF_LA, ENTITY_FLAG_NULL}, + {"clk", "clk", CUDBG_CLK, ENTITY_FLAG_NULL}, + {"obq_sge_rx_q0", "obq_sge_rx_q0", CUDBG_CIM_OBQ_RXQ0, + ENTITY_FLAG_NULL}, + {"obq_sge_rx_q1", "obq_sge_rx_q1", CUDBG_CIM_OBQ_RXQ1, + ENTITY_FLAG_NULL}, + {"macstats", "mac_stats", CUDBG_MAC_STATS, ENTITY_FLAG_NULL}, + {"pcieindirect", "pcie_indirect", CUDBG_PCIE_INDIRECT, + 1 << ENTITY_FLAG_REGISTER}, + {"pmindirect", "pm_indirect", CUDBG_PM_INDIRECT, + 1 << ENTITY_FLAG_REGISTER}, + {"full", "full", CUDBG_FULL, ENTITY_FLAG_NULL}, + {"txrate", "tx_rate", CUDBG_TX_RATE, ENTITY_FLAG_NULL}, + {"tidinfo", "tids", CUDBG_TID_INFO, ENTITY_FLAG_NULL | + (1 << ENTITY_FLAG_FW_NO_ATTACH)}, + {"pcieconfig", "pcie_config", CUDBG_PCIE_CONFIG, ENTITY_FLAG_NULL}, + {"dumpcontext", "dump_context", CUDBG_DUMP_CONTEXT, ENTITY_FLAG_NULL}, + {"mpstcam", "mps_tcam", CUDBG_MPS_TCAM, ENTITY_FLAG_NULL}, + {"vpddata", "vpd_data", CUDBG_VPD_DATA, ENTITY_FLAG_NULL}, + {"letcam", "le_tcam", CUDBG_LE_TCAM, ENTITY_FLAG_NULL}, + {"cctrl", "cctrl", CUDBG_CCTRL, ENTITY_FLAG_NULL}, + {"maindirect", "ma_indirect", CUDBG_MA_INDIRECT, + 1 << ENTITY_FLAG_REGISTER}, + {"ulptxla", "ulptx_la", CUDBG_ULPTX_LA, ENTITY_FLAG_NULL}, + {"extentity", "ext_entity", CUDBG_EXT_ENTITY, ENTITY_FLAG_NULL}, + {"upcimindirect", "up_cim_indirect", CUDBG_UP_CIM_INDIRECT, + 1 << ENTITY_FLAG_REGISTER}, + {"pbttables", "pbt_tables", CUDBG_PBT_TABLE, ENTITY_FLAG_NULL}, + {"mboxlog", "mboxlog", CUDBG_MBOX_LOG, ENTITY_FLAG_NULL}, + {"hmaindirect", "hma_indirect", CUDBG_HMA_INDIRECT, + 1 << ENTITY_FLAG_REGISTER}, +}; + +typedef int (*cudbg_print_cb) (char *str, ...); + +struct cudbg_init_hdr { + u8 major_ver; + u8 minor_ver; + u8 build_ver; + u8 res; + u16 init_struct_size; +}; + +struct cudbg_flash_hdr { + u32 signature; + u8 major_ver; + u8 minor_ver; + u8 build_ver; + u8 res; + u64 timestamp; + u64 time_res; + u32 hdr_len; + u32 data_len; + u32 hdr_flags; + u32 sec_seq_no; + u32 reserved[22]; +}; + +struct cudbg_param { + u16 param_type; + u16 reserved; + union { + struct { + u32 memtype; /* which memory (EDC0, EDC1, MC) */ + u32 start; /* start of log in firmware memory */ + u32 size; /* size of log */ + } devlog_param; + struct { + struct mbox_cmd_log *log; + u16 mbox_cmds; + } mboxlog_param; + struct { + u8 caller_string[100]; + u8 os_type; + } sw_state_param; + u64 time; + u8 tcb_bit_param; + void *adap; + void *access_lock; + } u; +}; + +/* params for tcb_bit_param */ +#define CUDBG_TCB_BRIEF_PARAM 0x1 +#define CUDBG_TCB_FROM_CARD_PARAM 0x2 +#define CUDBG_TCB_AS_SCB_PARAM 0x4 + +/* + * * What is OFFLINE_VIEW_ONLY mode? + * + * cudbg frame work will be used only to interpret previously collected + * data store in a file (i.e NOT hw flash) + */ + +struct cudbg_init { + struct cudbg_init_hdr header; + struct adapter *adap; /* Pointer to adapter structure + with filled fields */ + cudbg_print_cb print; /* Platform dependent print + function */ + u32 verbose:1; /* Turn on verbose print */ + u32 use_flash:1; /* Use flash to collect or view + debug */ + u32 full_mode:1; /* If set, cudbg will pull in + common code */ + u32 no_compress:1; /* Dont compress will storing + the collected debug */ + u32 info:1; /* Show just the info, Dont + interpret */ + u32 reserved:27; + u8 dbg_bitmap[CUDBG_MAX_BITMAP_LEN]; + /* Bit map to select the dbg + data type to be collected + or viewed */ +}; + + +/********************************* Helper functions *************************/ +static inline void set_dbg_bitmap(u8 *bitmap, enum CUDBG_DBG_ENTITY_TYPE type) +{ + int index = type / 8; + int bit = type % 8; + + bitmap[index] |= (1 << bit); +} + +static inline void reset_dbg_bitmap(u8 *bitmap, enum CUDBG_DBG_ENTITY_TYPE type) +{ + int index = type / 8; + int bit = type % 8; + + bitmap[index] &= ~(1 << bit); +} + +/********************************* End of Helper functions + * *************************/ + +/* API Prototypes */ + +/** + * cudbg_alloc_handle - Allocates and initializes a handle that represents + * cudbg state. Needs to called first before calling any other function. + * + * returns a pointer to memory that has a cudbg_init structure at the begining + * and enough space after that for internal book keeping. + */ + +void *cudbg_alloc_handle(void); +static inline struct cudbg_init *cudbg_get_init(void *handle) +{ + return (handle); +} + +/** + * cudbg_collect - Collect and store debug information. + * ## Parameters ## + * @handle : A pointer returned by cudbg_alloc_handle. + * @outbuf : pointer to output buffer, to store the collected information + * or to use it as a scratch buffer in case HW flash is used to + * store the debug information. + * @outbuf_size : Size of output buffer. + * ## Return ## + * If the function succeeds, the return value will be size of debug information + * collected and stored. + * -ve value represent error. + */ +int cudbg_collect(void *handle, void *outbuf, u32 *outbuf_size); + +/** + * cudbg_free_handle - Release cudbg resources. + * ## Parameters ## + * @handle : A pointer returned by cudbg_alloc_handle. + */ + +void cudbg_free_handle(IN void *handle); + +/** + * cudbg_read_flash_data - Read cudbg “flash†header from adapter flash. + * This will be used by the consumer mainly to + * know the size of the data in flash. + * ## Parameters ## + * @handle : A pointer returned by cudbg_hello. + * @data : A pointer to data/header buffer + */ + +int cudbg_read_flash_details(void *handle, struct cudbg_flash_hdr *data); + +/** + * cudbg_read_flash_data - Read cudbg dump contents stored in flash. + * ## Parameters ## + * @handle : A pointer returned by cudbg_hello. + * @data_buf : A pointer to data buffer. + * @data_buf_size : Data buffer size. + */ + +int cudbg_read_flash_data(void *handle, void *data_buf, u32 data_buf_size); + +#endif /* _CUDBG_IF_H_ */ Added: head/sys/dev/cxgbe/cudbg/cudbg_common.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/cxgbe/cudbg/cudbg_common.c Thu Aug 3 14:43:30 2017 (r322014) @@ -0,0 +1,96 @@ +/*- + * Copyright (c) 2017 Chelsio Communications, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include "common/common.h" +#include "cudbg.h" +#include "cudbg_lib_common.h" + +int get_scratch_buff(struct cudbg_buffer *pdbg_buff, u32 size, + struct cudbg_buffer *pscratch_buff) +{ + u32 scratch_offset; + int rc = 0; + + scratch_offset = pdbg_buff->size - size; + + if (pdbg_buff->offset > (int)scratch_offset || pdbg_buff->size < size) { + rc = CUDBG_STATUS_NO_SCRATCH_MEM; + goto err; + } else { + pscratch_buff->data = (char *)pdbg_buff->data + scratch_offset; + pscratch_buff->offset = 0; + pscratch_buff->size = size; + pdbg_buff->size -= size; + } + +err: + return rc; +} + +void release_scratch_buff(struct cudbg_buffer *pscratch_buff, + struct cudbg_buffer *pdbg_buff) +{ + pdbg_buff->size += pscratch_buff->size; + /* Reset the used buffer to zero. + * If we dont do this, then it will effect the ext entity logic. + */ + memset(pscratch_buff->data, 0, pscratch_buff->size); + pscratch_buff->data = NULL; + pscratch_buff->offset = 0; + pscratch_buff->size = 0; +} + +static inline void init_cudbg_hdr(struct cudbg_init_hdr *hdr) +{ + hdr->major_ver = CUDBG_MAJOR_VERSION; + hdr->minor_ver = CUDBG_MINOR_VERSION; + hdr->build_ver = CUDBG_BUILD_VERSION; + hdr->init_struct_size = sizeof(struct cudbg_init); +} + +void * +cudbg_alloc_handle(void) +{ + struct cudbg_private *handle; + + handle = malloc(sizeof(*handle), M_CXGBE, M_ZERO | M_WAITOK); + init_cudbg_hdr(&handle->dbg_init.header); + + return (handle); +} + +void +cudbg_free_handle(void *handle) +{ + + free(handle, M_CXGBE); +} Added: head/sys/dev/cxgbe/cudbg/cudbg_entity.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/cxgbe/cudbg/cudbg_entity.h Thu Aug 3 14:43:30 2017 (r322014) @@ -0,0 +1,909 @@ +/*- + * Copyright (c) 2017 Chelsio Communications, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE 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 __CUDBG_ENTITY_H__ +#define __CUDBG_ENTITY_H__ + +#ifdef __GNUC__ +#define ATTRIBUTE_UNUSED __attribute__ ((unused)) +#else +#define ATTRIBUTE_UNUSED +#endif + +#define MC0_FLAG 1 +#define MC1_FLAG 2 +#define EDC0_FLAG 3 +#define EDC1_FLAG 4 + +#define NUM_PCIE_CONFIG_REGS 0x61 +#define CUDBG_CTXT_SIZE_BYTES 24 +#define CUDBG_MAX_INGRESS_QIDS 65536 +#define CUDBG_MAX_FL_QIDS 2048 +#define CUDBG_MAX_CNM_QIDS 1024 +#define CUDBG_LOWMEM_MAX_CTXT_QIDS 256 +#define ETH_ALEN 6 +#define CUDBG_MAX_RPLC_SIZE 128 +#define CUDBG_NUM_REQ_REGS 17 +#define CUDBG_MAX_TCAM_TID 0x800 +#define CUDBG_NUM_ULPTX 11 +#define CUDBG_NUM_ULPTX_READ 512 + +#define SN_REG_ADDR 0x183f +#define BN_REG_ADDR 0x1819 +#define NA_REG_ADDR 0x185a +#define MN_REG_ADDR 0x1803 + +#define A_MPS_VF_RPLCT_MAP0 0x1111c +#define A_MPS_VF_RPLCT_MAP1 0x11120 +#define A_MPS_VF_RPLCT_MAP2 0x11124 +#define A_MPS_VF_RPLCT_MAP3 0x11128 +#define A_MPS_VF_RPLCT_MAP4 0x11300 +#define A_MPS_VF_RPLCT_MAP5 0x11304 +#define A_MPS_VF_RPLCT_MAP6 0x11308 +#define A_MPS_VF_RPLCT_MAP7 0x1130c + +#define PORT_TYPE_ADDR 0x1869 +#define PORT_TYPE_LEN 8 + +/* For T6 */ +#define SN_T6_ADDR 0x83f +#define BN_T6_ADDR 0x819 +#define NA_T6_ADDR 0x85a +#define MN_T6_ADDR 0x803 + +#define SN_MAX_LEN 24 +#define BN_MAX_LEN 16 +#define NA_MAX_LEN 12 +#define MN_MAX_LEN 16 +#define MAX_VPD_DATA_LEN 32 + +#define VPD_VER_ADDR 0x18c7 +#define VPD_VER_LEN 2 +#define SCFG_VER_ADDR 0x06 +#define SCFG_VER_LEN 4 + +#define CUDBG_CIM_BUSY_BIT (1 << 17) + +#define CUDBG_CHAC_PBT_ADDR 0x2800 +#define CUDBG_CHAC_PBT_LRF 0x3000 +#define CUDBG_CHAC_PBT_DATA 0x3800 +#define CUDBG_PBT_DYNAMIC_ENTRIES 8 +#define CUDBG_PBT_STATIC_ENTRIES 16 +#define CUDBG_LRF_ENTRIES 8 +#define CUDBG_PBT_DATA_ENTRIES 512 + +#define CUDBG_ENTITY_SIGNATURE 0xCCEDB001 +#define CUDBG_TID_INFO_REV 1 +#define CUDBG_MAC_STATS_REV 1 + +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(_a) (sizeof((_a)) / sizeof((_a)[0])) +#endif + +struct cudbg_pbt_tables { + u32 pbt_dynamic[CUDBG_PBT_DYNAMIC_ENTRIES]; + u32 pbt_static[CUDBG_PBT_STATIC_ENTRIES]; + u32 lrf_table[CUDBG_LRF_ENTRIES]; + u32 pbt_data[CUDBG_PBT_DATA_ENTRIES]; +}; + +struct card_mem { + u16 size_mc0; + u16 size_mc1; + u16 size_edc0; + u16 size_edc1; + u16 mem_flag; + u16 res; +}; + +struct rss_pf_conf { + u32 rss_pf_map; + u32 rss_pf_mask; + u32 rss_pf_config; +}; + +struct cudbg_ch_cntxt { + uint32_t cntxt_type; + uint32_t cntxt_id; + uint32_t data[SGE_CTXT_SIZE / 4]; +}; + +struct cudbg_tcam { + u32 filter_start; + u32 server_start; + u32 clip_start; + u32 routing_start; + u32 tid_hash_base; + u32 max_tid; +}; + +#if 0 +struct cudbg_mbox_log { + struct mbox_cmd entry; + u32 hi[MBOX_LEN / 8]; + u32 lo[MBOX_LEN / 8]; +}; +#endif + +struct cudbg_tid_data { + u32 tid; + u32 dbig_cmd; + u32 dbig_conf; + u32 dbig_rsp_stat; + u32 data[CUDBG_NUM_REQ_REGS]; +}; + +struct cudbg_cntxt_field { + char *name; + u32 start_bit; + u32 end_bit; + u32 shift; + u32 islog2; +}; + +struct cudbg_mps_tcam { + u64 mask; + u32 rplc[8]; + u32 idx; + u32 cls_lo; + u32 cls_hi; + u32 rplc_size; + u32 vniy; + u32 vnix; + u32 dip_hit; + u32 vlan_vld; + u32 repli; + u16 ivlan; + u8 addr[ETH_ALEN]; + u8 lookup_type; + u8 port_num; + u8 reserved[2]; +}; + +struct rss_vf_conf { + u32 rss_vf_vfl; + u32 rss_vf_vfh; +}; + +struct rss_config { + u32 tp_rssconf; /* A_TP_RSS_CONFIG */ + u32 tp_rssconf_tnl; /* A_TP_RSS_CONFIG_TNL */ + u32 tp_rssconf_ofd; /* A_TP_RSS_CONFIG_OFD */ + u32 tp_rssconf_syn; /* A_TP_RSS_CONFIG_SYN */ + u32 tp_rssconf_vrt; /* A_TP_RSS_CONFIG_VRT */ + u32 tp_rssconf_cng; /* A_TP_RSS_CONFIG_CNG */ + u32 chip; +}; + +struct struct_pm_stats { + u32 tx_cnt[T6_PM_NSTATS]; + u32 rx_cnt[T6_PM_NSTATS]; + u64 tx_cyc[T6_PM_NSTATS]; + u64 rx_cyc[T6_PM_NSTATS]; +}; + +struct struct_hw_sched { + u32 kbps[NTX_SCHED]; + u32 ipg[NTX_SCHED]; + u32 pace_tab[NTX_SCHED]; + u32 mode; + u32 map; +}; + +struct struct_tcp_stats { + struct tp_tcp_stats v4, v6; +}; + +struct struct_tp_err_stats { + struct tp_err_stats stats; + u32 nchan; +}; + +struct struct_tp_fcoe_stats { + struct tp_fcoe_stats stats[4]; + u32 nchan; +}; + +struct struct_mac_stats { + u32 port_count; + struct port_stats stats[4]; +}; + +struct struct_mac_stats_rev1 { + struct cudbg_ver_hdr ver_hdr; + u32 port_count; + u32 reserved; + struct port_stats stats[4]; +}; + +struct struct_tp_cpl_stats { + struct tp_cpl_stats stats; + u32 nchan; +}; + +struct struct_wc_stats { + u32 wr_cl_success; + u32 wr_cl_fail; +}; + +struct struct_ulptx_la { + u32 rdptr[CUDBG_NUM_ULPTX]; + u32 wrptr[CUDBG_NUM_ULPTX]; + u32 rddata[CUDBG_NUM_ULPTX]; + u32 rd_data[CUDBG_NUM_ULPTX][CUDBG_NUM_ULPTX_READ]; +}; + +struct struct_ulprx_la { + u32 data[ULPRX_LA_SIZE * 8]; + u32 size; +}; + +struct struct_cim_qcfg { + u8 chip; + u16 base[CIM_NUM_IBQ + CIM_NUM_OBQ_T5]; + u16 size[CIM_NUM_IBQ + CIM_NUM_OBQ_T5]; + u16 thres[CIM_NUM_IBQ]; + u32 obq_wr[2 * CIM_NUM_OBQ_T5]; + u32 stat[4 * (CIM_NUM_IBQ + CIM_NUM_OBQ_T5)]; +}; + +enum region_index { + REGN_DBQ_CONTEXS_IDX, + REGN_IMSG_CONTEXTS_IDX, + REGN_FLM_CACHE_IDX, + REGN_TCBS_IDX, + REGN_PSTRUCT_IDX, + REGN_TIMERS_IDX, + REGN_RX_FL_IDX, + REGN_TX_FL_IDX, + REGN_PSTRUCT_FL_IDX, + REGN_TX_PAYLOAD_IDX, + REGN_RX_PAYLOAD_IDX, + REGN_LE_HASH_IDX, + REGN_ISCSI_IDX, + REGN_TDDP_IDX, + REGN_TPT_IDX, + REGN_STAG_IDX, + REGN_RQ_IDX, + REGN_RQUDP_IDX, + REGN_PBL_IDX, + REGN_TXPBL_IDX, + REGN_DBVFIFO_IDX, + REGN_ULPRX_STATE_IDX, + REGN_ULPTX_STATE_IDX, +#ifndef __NO_DRIVER_OCQ_SUPPORT__ + REGN_ON_CHIP_Q_IDX, +#endif +}; + +static const char * const region[] = { + "DBQ contexts:", "IMSG contexts:", "FLM cache:", "TCBs:", + "Pstructs:", "Timers:", "Rx FL:", "Tx FL:", "Pstruct FL:", + "Tx payload:", "Rx payload:", "LE hash:", "iSCSI region:", + "TDDP region:", "TPT region:", "STAG region:", "RQ region:", + "RQUDP region:", "PBL region:", "TXPBL region:", + "DBVFIFO region:", "ULPRX state:", "ULPTX state:", +#ifndef __NO_DRIVER_OCQ_SUPPORT__ + "On-chip queues:" +#endif +}; + +/* Info relative to memory region (i.e. wrt 0). */ +struct struct_region_info { + bool exist; /* Does region exists in current memory region? */ + u32 start; /* Start wrt 0 */ + u32 end; /* End wrt 0 */ +}; + +struct struct_port_usage { + u32 id; + u32 used; + u32 alloc; +}; + +struct struct_lpbk_usage { + u32 id; + u32 used; + u32 alloc; +}; + +struct struct_mem_desc { + u32 base; + u32 limit; + u32 idx; +}; + +enum string_size_units { + STRING_UNITS_10, /* use powers of 10^3 (standard SI) */ + STRING_UNITS_2, /* use binary powers of 2^10 */ +}; + +struct struct_meminfo { + struct struct_mem_desc avail[4]; + struct struct_mem_desc mem[ARRAY_SIZE(region) + 3]; + u32 avail_c; + u32 mem_c; + u32 up_ram_lo; + u32 up_ram_hi; + u32 up_extmem2_lo; + u32 up_extmem2_hi; + u32 rx_pages_data[3]; + u32 tx_pages_data[4]; + u32 p_structs; + struct struct_port_usage port_data[4]; + u32 port_used[4]; + u32 port_alloc[4]; + u32 loopback_used[NCHAN]; + u32 loopback_alloc[NCHAN]; +}; + +#ifndef __GNUC__ +#pragma warning(disable : 4200) +#endif + +struct struct_lb_stats { + int nchan; + struct lb_port_stats s[0]; +}; + +struct struct_clk_info { + u64 retransmit_min; + u64 retransmit_max; + u64 persist_timer_min; + u64 persist_timer_max; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Aug 3 14:43:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A8F9DC0DF3; Thu, 3 Aug 2017 14:43:43 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51FAB7FECD; Thu, 3 Aug 2017 14:43:43 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v73EhgpU071462; Thu, 3 Aug 2017 14:43:42 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v73Ehfd5071454; Thu, 3 Aug 2017 14:43:41 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201708031443.v73Ehfd5071454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 3 Aug 2017 14:43:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322015 - in head/sys/arm: conf freescale/imx X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/sys/arm: conf freescale/imx X-SVN-Commit-Revision: 322015 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 14:43:43 -0000 Author: ian Date: Thu Aug 3 14:43:41 2017 New Revision: 322015 URL: https://svnweb.freebsd.org/changeset/base/322015 Log: Add an ahci driver for imx6. This was submitted by Rogiel Sulzbach (thank you!) but has a few last-minute changes by me, mostly where the code interfaces to my still-utterly-deficient imx6_ccm clocks implementation. So blame me for any mistakes. Submitted by: Rogiel Sulzbach Differential Revision: https://reviews.freebsd.org/D11177 Added: head/sys/arm/freescale/imx/imx6_ahci.c (contents, props changed) Modified: head/sys/arm/conf/IMX6 head/sys/arm/freescale/imx/files.imx6 head/sys/arm/freescale/imx/imx6_ccm.c head/sys/arm/freescale/imx/imx6_ccmreg.h head/sys/arm/freescale/imx/imx_ccmvar.h head/sys/arm/freescale/imx/imx_iomuxreg.h Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Thu Aug 3 14:43:30 2017 (r322014) +++ head/sys/arm/conf/IMX6 Thu Aug 3 14:43:41 2017 (r322015) @@ -78,6 +78,9 @@ device da # Direct Access (disks) device cd # CD device pass # Passthrough device (direct ATA/SCSI access) +# ATA controllers +device ahci # AHCI-compatible SATA controllers + # USB support device ehci # OHCI USB interface device usb # USB Bus (required) Modified: head/sys/arm/freescale/imx/files.imx6 ============================================================================== --- head/sys/arm/freescale/imx/files.imx6 Thu Aug 3 14:43:30 2017 (r322014) +++ head/sys/arm/freescale/imx/files.imx6 Thu Aug 3 14:43:41 2017 (r322015) @@ -25,6 +25,7 @@ arm/freescale/imx/imx_i2c.c optional fsliic arm/freescale/imx/imx6_sdma.c optional sdma arm/freescale/imx/imx6_audmux.c optional sound arm/freescale/imx/imx6_ssi.c optional sound +arm/freescale/imx/imx6_ahci.c optional ahci dev/hdmi/hdmi_if.m optional hdmi dev/hdmi/dwc_hdmi.c optional hdmi Added: head/sys/arm/freescale/imx/imx6_ahci.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/imx6_ahci.c Thu Aug 3 14:43:41 2017 (r322015) @@ -0,0 +1,358 @@ +/*- + * Copyright (c) 2017 Rogiel Sulzbach + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#define SATA_TIMER1MS 0x000000e0 + +#define SATA_P0PHYCR 0x00000178 +#define SATA_P0PHYCR_CR_READ (1 << 19) +#define SATA_P0PHYCR_CR_WRITE (1 << 18) +#define SATA_P0PHYCR_CR_CAP_DATA (1 << 17) +#define SATA_P0PHYCR_CR_CAP_ADDR (1 << 16) +#define SATA_P0PHYCR_CR_DATA_IN(v) ((v) & 0xffff) + +#define SATA_P0PHYSR 0x0000017c +#define SATA_P0PHYSR_CR_ACK (1 << 18) +#define SATA_P0PHYSR_CR_DATA_OUT(v) ((v) & 0xffff) + +/* phy registers */ +#define SATA_PHY_CLOCK_RESET 0x7f3f +#define SATA_PHY_CLOCK_RESET_RST (1 << 0) + +#define SATA_PHY_LANE0_OUT_STAT 0x2003 +#define SATA_PHY_LANE0_OUT_STAT_RX_PLL_STATE (1 << 1) + +static int +imx6_ahci_phy_ctrl(struct ahci_controller* sc, uint32_t bitmask, bool on) +{ + uint32_t v; + int timeout; + bool state; + + v = ATA_INL(sc->r_mem, SATA_P0PHYCR); + if (on) { + v |= bitmask; + } else { + v &= ~bitmask; + } + ATA_OUTL(sc->r_mem, SATA_P0PHYCR, v); + + for (timeout = 5000; timeout > 0; --timeout) { + v = ATA_INL(sc->r_mem, SATA_P0PHYSR); + state = (v & SATA_P0PHYSR_CR_ACK) == SATA_P0PHYSR_CR_ACK; + if(state == on) { + break; + } + DELAY(100); + } + + if (timeout > 0) { + return (0); + } + + return (ETIMEDOUT); +} + +static int +imx6_ahci_phy_addr(struct ahci_controller* sc, uint32_t addr) +{ + int error; + + DELAY(100); + + ATA_OUTL(sc->r_mem, SATA_P0PHYCR, addr); + + error = imx6_ahci_phy_ctrl(sc, SATA_P0PHYCR_CR_CAP_ADDR, true); + if (error != 0) { + device_printf(sc->dev, + "%s: timeout on SATA_P0PHYCR_CR_CAP_ADDR=1\n", + __FUNCTION__); + return (error); + } + + error = imx6_ahci_phy_ctrl(sc, SATA_P0PHYCR_CR_CAP_ADDR, false); + if (error != 0) { + device_printf(sc->dev, + "%s: timeout on SATA_P0PHYCR_CR_CAP_ADDR=0\n", + __FUNCTION__); + return (error); + } + + return (0); +} + +static int +imx6_ahci_phy_write(struct ahci_controller* sc, uint32_t addr, + uint16_t data) +{ + int error; + + error = imx6_ahci_phy_addr(sc, addr); + if (error != 0) { + device_printf(sc->dev, "%s: error on imx6_ahci_phy_addr\n", + __FUNCTION__); + return (error); + } + + ATA_OUTL(sc->r_mem, SATA_P0PHYCR, data); + + error = imx6_ahci_phy_ctrl(sc, SATA_P0PHYCR_CR_CAP_DATA, true); + if (error != 0) { + device_printf(sc->dev, + "%s: error on SATA_P0PHYCR_CR_CAP_DATA=1\n", __FUNCTION__); + return (error); + } + if (imx6_ahci_phy_ctrl(sc, SATA_P0PHYCR_CR_CAP_DATA, false) != 0) { + device_printf(sc->dev, + "%s: error on SATA_P0PHYCR_CR_CAP_DATA=0\n", __FUNCTION__); + return (error); + } + + if ((addr == SATA_PHY_CLOCK_RESET) && data) { + /* we can't check ACK after RESET */ + ATA_OUTL(sc->r_mem, SATA_P0PHYCR, + SATA_P0PHYCR_CR_DATA_IN(data) | SATA_P0PHYCR_CR_WRITE); + return (0); + } + + error = imx6_ahci_phy_ctrl(sc, SATA_P0PHYCR_CR_WRITE, true); + if (error != 0) { + device_printf(sc->dev, "%s: error on SATA_P0PHYCR_CR_WRITE=1\n", + __FUNCTION__); + return (error); + } + + error = imx6_ahci_phy_ctrl(sc, SATA_P0PHYCR_CR_WRITE, false); + if (error != 0) { + device_printf(sc->dev, "%s: error on SATA_P0PHYCR_CR_WRITE=0\n", + __FUNCTION__); + return (error); + } + + return (0); +} + +static int +imx6_ahci_phy_read(struct ahci_controller* sc, uint32_t addr, uint16_t* val) +{ + int error; + uint32_t v; + + error = imx6_ahci_phy_addr(sc, addr); + if (error != 0) { + device_printf(sc->dev, "%s: error on imx6_ahci_phy_addr\n", + __FUNCTION__); + return (error); + } + + error = imx6_ahci_phy_ctrl(sc, SATA_P0PHYCR_CR_READ, true); + if (error != 0) { + device_printf(sc->dev, "%s: error on SATA_P0PHYCR_CR_READ=1\n", + __FUNCTION__); + return (error); + } + + v = ATA_INL(sc->r_mem, SATA_P0PHYSR); + + error = imx6_ahci_phy_ctrl(sc, SATA_P0PHYCR_CR_READ, false); + if (error != 0) { + device_printf(sc->dev, "%s: error on SATA_P0PHYCR_CR_READ=0\n", + __FUNCTION__); + return (error); + } + + *val = SATA_P0PHYSR_CR_DATA_OUT(v); + return (0); +} + +static int +imx6_ahci_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) { + return (ENXIO); + } + + if (!ofw_bus_is_compatible(dev, "fsl,imx6q-ahci")) { + return (ENXIO); + } + device_set_desc(dev, "i.MX6 Integrated AHCI controller"); + + return (BUS_PROBE_DEFAULT); +} + +static int +imx6_ahci_attach(device_t dev) +{ + struct ahci_controller* ctlr; + uint16_t pllstat; + uint32_t v; + int error, timeout; + + ctlr = device_get_softc(dev); + + /* Power up the controller and phy. */ + error = imx6_ccm_sata_enable(); + if (error != 0) { + device_printf(dev, "error enabling controller and phy\n"); + return (error); + } + + ctlr->vendorid = 0; + ctlr->deviceid = 0; + ctlr->subvendorid = 0; + ctlr->subdeviceid = 0; + ctlr->numirqs = 1; + ctlr->r_rid = 0; + if ((ctlr->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &ctlr->r_rid, RF_ACTIVE)) == NULL) { + return (ENXIO); + } + + v = imx_iomux_gpr_get(IOMUX_GPR13); + /* Clear out existing values; these numbers are bitmasks. */ + v &= ~(IOMUX_GPR13_SATA_PHY_8(7) | + IOMUX_GPR13_SATA_PHY_7(0x1f) | + IOMUX_GPR13_SATA_PHY_6(7) | + IOMUX_GPR13_SATA_SPEED(1) | + IOMUX_GPR13_SATA_PHY_5(1) | + IOMUX_GPR13_SATA_PHY_4(7) | + IOMUX_GPR13_SATA_PHY_3(0xf) | + IOMUX_GPR13_SATA_PHY_2(0x1f) | + IOMUX_GPR13_SATA_PHY_1(1) | + IOMUX_GPR13_SATA_PHY_0(1)); + /* setting */ + v |= IOMUX_GPR13_SATA_PHY_8(5) | /* Rx 3.0db */ + IOMUX_GPR13_SATA_PHY_7(0x12) | /* Rx SATA2m */ + IOMUX_GPR13_SATA_PHY_6(3) | /* Rx DPLL mode */ + IOMUX_GPR13_SATA_SPEED(1) | /* 3.0GHz */ + IOMUX_GPR13_SATA_PHY_5(0) | /* SpreadSpectram */ + IOMUX_GPR13_SATA_PHY_4(4) | /* Tx Attenuation 9/16 */ + IOMUX_GPR13_SATA_PHY_3(0) | /* Tx Boost 0db */ + IOMUX_GPR13_SATA_PHY_2(0x11) | /* Tx Level 1.104V */ + IOMUX_GPR13_SATA_PHY_1(1); /* PLL clock enable */ + imx_iomux_gpr_set(IOMUX_GPR13, v); + + /* phy reset */ + error = imx6_ahci_phy_write(ctlr, SATA_PHY_CLOCK_RESET, + SATA_PHY_CLOCK_RESET_RST); + if (error != 0) { + device_printf(dev, "cannot reset PHY\n"); + goto fail; + } + + for (timeout = 50; timeout > 0; --timeout) { + DELAY(100); + error = imx6_ahci_phy_read(ctlr, SATA_PHY_LANE0_OUT_STAT, + &pllstat); + if (error != 0) { + device_printf(dev, "cannot read LANE0 status\n"); + goto fail; + } + if (pllstat & SATA_PHY_LANE0_OUT_STAT_RX_PLL_STATE) { + break; + } + } + if (timeout <= 0) { + device_printf(dev, "time out reading LANE0 status\n"); + error = ETIMEDOUT; + goto fail; + } + + /* Support Staggered Spin-up */ + v = ATA_INL(ctlr->r_mem, AHCI_CAP); + ATA_OUTL(ctlr->r_mem, AHCI_CAP, v | AHCI_CAP_SSS); + + /* Ports Implemented. must set 1 */ + v = ATA_INL(ctlr->r_mem, AHCI_PI); + ATA_OUTL(ctlr->r_mem, AHCI_PI, v | (1 << 0)); + + /* set 1ms-timer = AHB clock / 1000 */ + ATA_OUTL(ctlr->r_mem, SATA_TIMER1MS, + imx_ccm_ahb_hz() / 1000); + + /* + * Note: ahci_attach will release ctlr->r_mem on errors automatically + */ + return (ahci_attach(dev)); + +fail: + bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem); + return (error); +} + +static int +imx6_ahci_detach(device_t dev) +{ + + return (ahci_detach(dev)); +} + +devclass_t ahci_devclass; + +static device_method_t imx6_ahci_ata_methods[] = { + /* device probe, attach and detach methods */ + DEVMETHOD(device_probe, imx6_ahci_probe), + DEVMETHOD(device_attach, imx6_ahci_attach), + DEVMETHOD(device_detach, imx6_ahci_detach), + + /* ahci bus methods */ + DEVMETHOD(bus_print_child, ahci_print_child), + DEVMETHOD(bus_alloc_resource, ahci_alloc_resource), + DEVMETHOD(bus_release_resource, ahci_release_resource), + DEVMETHOD(bus_setup_intr, ahci_setup_intr), + DEVMETHOD(bus_teardown_intr, ahci_teardown_intr), + DEVMETHOD(bus_child_location_str, ahci_child_location_str), + + DEVMETHOD_END +}; + +static driver_t ahci_ata_driver = { + "ahci", + imx6_ahci_ata_methods, + sizeof(struct ahci_controller) +}; + +DRIVER_MODULE(ahci, simplebus, ahci_ata_driver, ahci_devclass, 0, 0); Modified: head/sys/arm/freescale/imx/imx6_ccm.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_ccm.c Thu Aug 3 14:43:30 2017 (r322014) +++ head/sys/arm/freescale/imx/imx6_ccm.c Thu Aug 3 14:43:41 2017 (r322015) @@ -314,6 +314,41 @@ imx_ccm_usbphy_enable(device_t _phydev) #endif } +int +imx6_ccm_sata_enable(void) +{ + uint32_t v; + int timeout; + + /* Un-gate the sata controller. */ + WR4(ccm_sc, CCM_CCGR5, RD4(ccm_sc, CCM_CCGR5) | CCGR5_SATA); + + /* Power up the PLL that feeds ENET/SATA/PCI phys, wait for lock. */ + v = RD4(ccm_sc, CCM_ANALOG_PLL_ENET); + v &= ~CCM_ANALOG_PLL_ENET_POWERDOWN; + WR4(ccm_sc, CCM_ANALOG_PLL_ENET, v); + + for (timeout = 100000; timeout > 0; timeout--) { + if (RD4(ccm_sc, CCM_ANALOG_PLL_ENET) & + CCM_ANALOG_PLL_ENET_LOCK) { + break; + } + } + if (timeout <= 0) { + return ETIMEDOUT; + } + + /* Enable the PLL, and enable its 100mhz output. */ + v |= CCM_ANALOG_PLL_ENET_ENABLE; + v &= ~CCM_ANALOG_PLL_ENET_BYPASS; + WR4(ccm_sc, CCM_ANALOG_PLL_ENET, v); + + v |= CCM_ANALOG_PLL_ENET_ENABLE_100M; + WR4(ccm_sc, CCM_ANALOG_PLL_ENET, v); + + return 0; +} + uint32_t imx_ccm_ipg_hz(void) { Modified: head/sys/arm/freescale/imx/imx6_ccmreg.h ============================================================================== --- head/sys/arm/freescale/imx/imx6_ccmreg.h Thu Aug 3 14:43:30 2017 (r322014) +++ head/sys/arm/freescale/imx/imx6_ccmreg.h Thu Aug 3 14:43:41 2017 (r322015) @@ -116,6 +116,7 @@ #define CCGR4_PL301_MX6QPER1_BCH (0x3 << 12) #define CCGR4_PL301_MX6QPER2_MAIN (0x3 << 14) #define CCM_CCGR5 0x07C +#define CCGR5_SATA (0x3 << 4) #define CCGR5_SDMA (0x3 << 6) #define CCGR5_SSI1 (0x3 << 18) #define CCGR5_SSI2 (0x3 << 20) @@ -129,5 +130,12 @@ #define CCGR6_USDHC3 (0x3 << 6) #define CCGR6_USDHC4 (0x3 << 8) #define CCM_CMEOR 0x088 + +#define CCM_ANALOG_PLL_ENET 0x000040e0 +#define CCM_ANALOG_PLL_ENET_LOCK (1u << 31) +#define CCM_ANALOG_PLL_ENET_ENABLE_100M (1u << 20) /* SATA */ +#define CCM_ANALOG_PLL_ENET_BYPASS (1u << 16) +#define CCM_ANALOG_PLL_ENET_ENABLE (1u << 13) /* Ether */ +#define CCM_ANALOG_PLL_ENET_POWERDOWN (1u << 12) #endif Modified: head/sys/arm/freescale/imx/imx_ccmvar.h ============================================================================== --- head/sys/arm/freescale/imx/imx_ccmvar.h Thu Aug 3 14:43:30 2017 (r322014) +++ head/sys/arm/freescale/imx/imx_ccmvar.h Thu Aug 3 14:43:41 2017 (r322015) @@ -54,6 +54,7 @@ void imx_ccm_usbphy_enable(device_t _phydev); void imx_ccm_ssi_configure(device_t _ssidev); void imx_ccm_hdmi_enable(void); void imx_ccm_ipu_enable(int ipu); +int imx6_ccm_sata_enable(void); /* Routines to get and set the arm clock root divisor register. */ uint32_t imx_ccm_get_cacrr(void); Modified: head/sys/arm/freescale/imx/imx_iomuxreg.h ============================================================================== --- head/sys/arm/freescale/imx/imx_iomuxreg.h Thu Aug 3 14:43:30 2017 (r322014) +++ head/sys/arm/freescale/imx/imx_iomuxreg.h Thu Aug 3 14:43:41 2017 (r322015) @@ -29,14 +29,33 @@ #ifndef IMX_IOMUXREG_H #define IMX_IOMUXREG_H -#define IOMUXC_GPR0 0x00 -#define IOMUXC_GPR1 0x04 -#define IOMUXC_GPR2 0x08 -#define IOMUXC_GPR3 0x0C -#define IOMUXC_GPR3_HDMI_MASK (3 << 2) -#define IOMUXC_GPR3_HDMI_IPU1_DI0 (0 << 2) -#define IOMUXC_GPR3_HDMI_IPU1_DI1 (1 << 2) -#define IOMUXC_GPR3_HDMI_IPU2_DI0 (2 << 2) -#define IOMUXC_GPR3_HDMI_IPU2_DI1 (3 << 2) +#define IMX_IOMUXREG_LOWEST_SET_BIT(__mask) ((((__mask) - 1) & (__mask)) ^ (__mask)) +#define IMX_IOMUXREG_SHIFTIN(__x, __mask) ((__x) * IMX_IOMUXREG_LOWEST_SET_BIT(__mask)) + +#define IMX_IOMUXREG_BIT(n) (1 << (n)) +#define IMX_IOMUXREG_BITS(__m, __n) \ + ((IMX_IOMUXREG_BIT(MAX((__m), (__n)) + 1) - 1) ^ (IMX_IOMUXREG_BIT(MIN((__m), (__n))) - 1)) + +#define IOMUXC_GPR0 0x00 +#define IOMUXC_GPR1 0x04 +#define IOMUXC_GPR2 0x08 +#define IOMUXC_GPR3 0x0C +#define IOMUXC_GPR3_HDMI_MASK (3 << 2) +#define IOMUXC_GPR3_HDMI_IPU1_DI0 (0 << 2) +#define IOMUXC_GPR3_HDMI_IPU1_DI1 (1 << 2) +#define IOMUXC_GPR3_HDMI_IPU2_DI0 (2 << 2) +#define IOMUXC_GPR3_HDMI_IPU2_DI1 (3 << 2) + +#define IOMUX_GPR13 0x34 +#define IOMUX_GPR13_SATA_PHY_8(n) IMX_IOMUXREG_SHIFTIN(n, IMX_IOMUXREG_BITS(26, 24)) +#define IOMUX_GPR13_SATA_PHY_7(n) IMX_IOMUXREG_SHIFTIN(n, IMX_IOMUXREG_BITS(23, 19)) +#define IOMUX_GPR13_SATA_PHY_6(n) IMX_IOMUXREG_SHIFTIN(n, IMX_IOMUXREG_BITS(18, 16)) +#define IOMUX_GPR13_SATA_SPEED(n) IMX_IOMUXREG_SHIFTIN(n, (1 << 15)) +#define IOMUX_GPR13_SATA_PHY_5(n) IMX_IOMUXREG_SHIFTIN(n, (1 << 14)) +#define IOMUX_GPR13_SATA_PHY_4(n) IMX_IOMUXREG_SHIFTIN(n, IMX_IOMUXREG_BITS(13, 11)) +#define IOMUX_GPR13_SATA_PHY_3(n) IMX_IOMUXREG_SHIFTIN(n, IMX_IOMUXREG_BITS(10, 7)) +#define IOMUX_GPR13_SATA_PHY_2(n) IMX_IOMUXREG_SHIFTIN(n, IMX_IOMUXREG_BITS(6, 2)) +#define IOMUX_GPR13_SATA_PHY_1(n) IMX_IOMUXREG_SHIFTIN(n, (1 << 1)) +#define IOMUX_GPR13_SATA_PHY_0(n) IMX_IOMUXREG_SHIFTIN(n, (1 << 0)) #endif From owner-svn-src-head@freebsd.org Thu Aug 3 15:04:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1FAFDC227F; Thu, 3 Aug 2017 15:04:19 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-pf0-f169.google.com (mail-pf0-f169.google.com [209.85.192.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BAED181415; Thu, 3 Aug 2017 15:04:19 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-pf0-f169.google.com with SMTP id d67so7439061pfc.0; Thu, 03 Aug 2017 08:04:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=pxeGlPlQ7nm8ePiDzas1N9zkAgZ7AjcDg25p7fAnMGo=; b=oUAMHPTElmjh4PVI8m8/o76lDMhZC63XPsQEg500CZuJ9Lw8I9r5MmTx5sZKJIwE1l sUex65ufvjIIddL442tIpoLGiPx2ffm7BhibAkK1Ld4Yj3+W2hcq3rKFYh+y/JDETIxj iYJoGSvKuucVetyeKqsITfBruUwtfFulq6zGckbhebOmjHqJ3mBc/BW+yic5wZ2F52NK j0btlbIcSMDehbZcsQr/hYIUL0VezLbbXeuZ8d9GtU52UM5sikrKCLhRNAgO9nZqa7BJ AdRYMnT7jcU3ckdjJsjcrtwnSHi5reLqwXtPmscA2VWuhpcurVa64S89iDrBd7SFIz3S k2fA== X-Gm-Message-State: AIVw1119VD05HtEyU4kDGyozViANUPFcfd09kWReYn8LCSU3Ar6UkleV LLzfQH6nV5h+xxdPWP4= X-Received: by 10.84.211.108 with SMTP id b99mr2212530pli.473.1501771067294; Thu, 03 Aug 2017 07:37:47 -0700 (PDT) Received: from mail-pg0-f52.google.com (mail-pg0-f52.google.com. [74.125.83.52]) by smtp.gmail.com with ESMTPSA id n19sm31159217pfi.35.2017.08.03.07.37.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Aug 2017 07:37:47 -0700 (PDT) Received: by mail-pg0-f52.google.com with SMTP id l64so6963708pge.5; Thu, 03 Aug 2017 07:37:47 -0700 (PDT) X-Received: by 10.84.198.129 with SMTP id p1mr2181847pld.120.1501771067016; Thu, 03 Aug 2017 07:37:47 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.100.169.8 with HTTP; Thu, 3 Aug 2017 07:37:46 -0700 (PDT) In-Reply-To: <201708030918.v739IPVY034866@repo.freebsd.org> References: <201708030918.v739IPVY034866@repo.freebsd.org> From: Conrad Meyer Date: Thu, 3 Aug 2017 07:37:46 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r321985 - head/sys/ofed/drivers/infiniband/core To: Hans Petter Selasky Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 15:04:20 -0000 Hey Hans, Is it not important that the subtraction and result are evaluated without truncation? Thanks, Conrad On Thu, Aug 3, 2017 at 2:18 AM, Hans Petter Selasky wrote: > Author: hselasky > Date: Thu Aug 3 09:18:25 2017 > New Revision: 321985 > URL: https://svnweb.freebsd.org/changeset/base/321985 > > Log: > Ticks are 32-bit in FreeBSD. > > MFC after: 3 days > Sponsored by: Mellanox Technologies > > Modified: > head/sys/ofed/drivers/infiniband/core/addr.c > > Modified: head/sys/ofed/drivers/infiniband/core/addr.c > ============================================================================== > --- head/sys/ofed/drivers/infiniband/core/addr.c Thu Aug 3 09:14:43 2017 (r321984) > +++ head/sys/ofed/drivers/infiniband/core/addr.c Thu Aug 3 09:18:25 2017 (r321985) > @@ -187,10 +187,10 @@ EXPORT_SYMBOL(rdma_translate_ip); > > static void set_timeout(unsigned long time) > { > - unsigned long delay; > + int delay; /* under FreeBSD ticks are 32-bit */ > > delay = time - jiffies; > - if ((long)delay <= 0) > + if (delay <= 0) > delay = 1; > > mod_delayed_work(addr_wq, &work, delay); > From owner-svn-src-head@freebsd.org Thu Aug 3 15:04:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABF85DC2317; Thu, 3 Aug 2017 15:04:55 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7710D81556; Thu, 3 Aug 2017 15:04:55 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v73F4s64081282; Thu, 3 Aug 2017 15:04:54 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v73F4snb081281; Thu, 3 Aug 2017 15:04:54 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201708031504.v73F4snb081281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Thu, 3 Aug 2017 15:04:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322016 - head/usr.bin/mt X-SVN-Group: head X-SVN-Commit-Author: ken X-SVN-Commit-Paths: head/usr.bin/mt X-SVN-Commit-Revision: 322016 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 15:04:55 -0000 Author: ken Date: Thu Aug 3 15:04:54 2017 New Revision: 322016 URL: https://svnweb.freebsd.org/changeset/base/322016 Log: Oracle T10000 tape drives use PRML encoding. Source: Oracle T10000 SCSI reference guide. MFC after: 3 days Sponsored by: Spectra Logic Modified: head/usr.bin/mt/mt.1 Modified: head/usr.bin/mt/mt.1 ============================================================================== --- head/usr.bin/mt/mt.1 Thu Aug 3 14:43:41 2017 (r322015) +++ head/usr.bin/mt/mt.1 Thu Aug 3 15:04:54 2017 (r322016) @@ -29,7 +29,7 @@ .\" @(#)mt.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd July 14, 2017 +.Dd August 3, 2017 .Dt MT 1 .Os .Sh NAME @@ -509,10 +509,10 @@ Value Width Tracks Density Code Typ 0x47 3.81 (0.25) ? 6,417 (163,000) CS DAT-72 0x48 12.7 (0.5) 448 5,236 (133,000) PRML C SDLTapeI(110) 6,8,13 0x49 12.7 (0.5) 448 7,598 (193,000) PRML C SDLTapeI(160) 6,8 -0x4A 12.7 (0.5) 768 ? C T10000A 10 -0x4B 12.7 (0.5) 1152 ? C T10000B 10 -0x4C 12.7 (0.5) 3584 ? C T10000C 10 -0x4D 12.7 (0.5) 4608 ? C T10000D 10 +0x4A 12.7 (0.5) 768 ? PRML C T10000A 10 +0x4B 12.7 (0.5) 1152 ? PRML C T10000B 10 +0x4C 12.7 (0.5) 3584 ? PRML C T10000C 10 +0x4D 12.7 (0.5) 4608 ? PRML C T10000D 10 0x51 12.7 (0.5) 512 11,800 (299,720) C 3592A1 (unencrypted) 0x52 12.7 (0.5) 896 11,800 (299,720) C 3592A2 (unencrypted) 0x53 12.7 (0.5) 1152 13,452 (341,681) C 3592A3 (unencrypted) From owner-svn-src-head@freebsd.org Thu Aug 3 15:47:50 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1868ADC4BE8; Thu, 3 Aug 2017 15:47:50 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E38A83B8B; Thu, 3 Aug 2017 15:47:49 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v73FlmsL099590; Thu, 3 Aug 2017 15:47:48 GMT (envelope-from phil@FreeBSD.org) Received: (from phil@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v73FlgBK099530; Thu, 3 Aug 2017 15:47:42 GMT (envelope-from phil@FreeBSD.org) Message-Id: <201708031547.v73FlgBK099530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phil set sender to phil@FreeBSD.org using -f From: Phil Shafer Date: Thu, 3 Aug 2017 15:47:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322019 - in head: contrib/libxo contrib/libxo/doc contrib/libxo/libxo contrib/libxo/tests/core contrib/libxo/tests/core/saved contrib/libxo/tests/xo contrib/libxo/tests/xo/saved contri... X-SVN-Group: head X-SVN-Commit-Author: phil X-SVN-Commit-Paths: in head: contrib/libxo contrib/libxo/doc contrib/libxo/libxo contrib/libxo/tests/core contrib/libxo/tests/core/saved contrib/libxo/tests/xo contrib/libxo/tests/xo/saved contrib/libxo/xo contrib/libxo/... X-SVN-Commit-Revision: 322019 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 15:47:50 -0000 Author: phil Date: Thu Aug 3 15:47:42 2017 New Revision: 322019 URL: https://svnweb.freebsd.org/changeset/base/322019 Log: Update from libxo-0.8.1 to 0.8.4: 0.8.4: - void anchor width optimization when we have a custom formatter (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221130) - make "{[:/18}" do the right thing (also allows "{[:/%s}", wide ? 40 : 10) - Can't skip anchor formatting in non-display styles - add test case for {[:/18} - add upload-xohtml-files to 'make upload' 0.8.3: - xohtml: Add "-w" option to pull support files from gh_pages - Add "upload-xohtml-files" target to publish support files in gh_pages/ - add HISTORY/AUTHORS section to man pages 0.8.2: - xohtml: Add div.units as standard CSS text - Don't treat values as format strings; they are not - add "-p" to "mkdir -p build" in setup.sh - add test case for {U:%%} (from df.c) - detect end-of-string in '%' and '' escaping - make xo_simple_field, for common simple cases - xohtml: nuke "n" in "echo" commands - rename "format" to "fmt" for consistency; same for "str" to "value" Submitted by: phil Modified: head/contrib/libxo/Makefile.am head/contrib/libxo/configure.ac head/contrib/libxo/doc/libxo-manual.html head/contrib/libxo/libxo/libxo.3 head/contrib/libxo/libxo/libxo.c head/contrib/libxo/libxo/xo_attr.3 head/contrib/libxo/libxo/xo_create.3 head/contrib/libxo/libxo/xo_emit.3 head/contrib/libxo/libxo/xo_emit_err.3 head/contrib/libxo/libxo/xo_emit_f.3 head/contrib/libxo/libxo/xo_err.3 head/contrib/libxo/libxo/xo_error.3 head/contrib/libxo/libxo/xo_finish.3 head/contrib/libxo/libxo/xo_flush.3 head/contrib/libxo/libxo/xo_format.5 head/contrib/libxo/libxo/xo_message.3 head/contrib/libxo/libxo/xo_no_setlocale.3 head/contrib/libxo/libxo/xo_open_container.3 head/contrib/libxo/libxo/xo_open_list.3 head/contrib/libxo/libxo/xo_open_marker.3 head/contrib/libxo/libxo/xo_options.7 head/contrib/libxo/libxo/xo_parse_args.3 head/contrib/libxo/libxo/xo_set_allocator.3 head/contrib/libxo/libxo/xo_set_flags.3 head/contrib/libxo/libxo/xo_set_info.3 head/contrib/libxo/libxo/xo_set_options.3 head/contrib/libxo/libxo/xo_set_style.3 head/contrib/libxo/libxo/xo_set_syslog_enterprise_id.3 head/contrib/libxo/libxo/xo_set_version.3 head/contrib/libxo/libxo/xo_set_writer.3 head/contrib/libxo/libxo/xo_syslog.3 head/contrib/libxo/tests/core/saved/test_01.E.out head/contrib/libxo/tests/core/saved/test_01.H.out head/contrib/libxo/tests/core/saved/test_01.HIPx.out head/contrib/libxo/tests/core/saved/test_01.HP.out head/contrib/libxo/tests/core/saved/test_01.J.out head/contrib/libxo/tests/core/saved/test_01.JP.out head/contrib/libxo/tests/core/saved/test_01.T.out head/contrib/libxo/tests/core/saved/test_01.X.out head/contrib/libxo/tests/core/saved/test_01.XP.out head/contrib/libxo/tests/core/saved/test_02.E.out head/contrib/libxo/tests/core/saved/test_02.J.out head/contrib/libxo/tests/core/saved/test_02.JP.out head/contrib/libxo/tests/core/saved/test_02.X.out head/contrib/libxo/tests/core/saved/test_02.XP.out head/contrib/libxo/tests/core/test_01.c head/contrib/libxo/tests/xo/saved/xo_01.H.out head/contrib/libxo/tests/xo/saved/xo_01.HIPx.out head/contrib/libxo/tests/xo/saved/xo_01.HP.out head/contrib/libxo/tests/xo/saved/xo_01.J.out head/contrib/libxo/tests/xo/saved/xo_01.JP.out head/contrib/libxo/tests/xo/saved/xo_01.T.out head/contrib/libxo/tests/xo/saved/xo_01.X.out head/contrib/libxo/tests/xo/saved/xo_01.XP.out head/contrib/libxo/tests/xo/xo_01.sh head/contrib/libxo/xo/xo.1 head/contrib/libxo/xohtml/xohtml.1 head/contrib/libxo/xohtml/xohtml.sh.in head/contrib/libxo/xolint/xolint.1 head/contrib/libxo/xopo/xopo.1 head/lib/libxo/add.man head/lib/libxo/xo_config.h head/usr.bin/xohtml/xohtml.sh Directory Properties: head/contrib/libxo/ (props changed) Modified: head/contrib/libxo/Makefile.am ============================================================================== --- head/contrib/libxo/Makefile.am Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/Makefile.am Thu Aug 3 15:47:42 2017 (r322019) @@ -38,7 +38,14 @@ GH_PAGES_DIR = gh-pages/ GH_PAGES_DIR_VER = gh-pages/${PACKAGE_VERSION} PACKAGE_FILE = ${PACKAGE_TARNAME}-${PACKAGE_VERSION}.tar.gz -upload: dist upload-docs +XOHTML_FILES = \ + ${top_srcdir}/xohtml/xohtml.css \ + ${top_srcdir}/xohtml/xohtml.js \ + ${top_srcdir}/xohtml/external/jquery.js \ + ${top_srcdir}/xohtml/external/jquery.qtip.css \ + ${top_srcdir}/xohtml/external/jquery.qtip.js + +upload: dist upload-docs upload-xohtml-files @echo "Remember to run:" @echo " gt tag ${PACKAGE_VERSION}" @@ -54,6 +61,18 @@ upload-docs: docs && git add libxo-manual.html \ && git commit -m 'new docs' \ libxo-manual.html ${PACKAGE_VERSION} \ + && git push origin gh-pages ) ; true + +upload-xohtml-files: + @echo "Uploading xohtml files ... " + @-[ -d ${GH_PAGES_DIR} ] \ + && echo "Updating xohtml files on gh-pages ..." \ + && mkdir -p ${GH_PAGES_DIR_VER}/xohtml \ + && cp ${XOHTML_FILES} ${GH_PAGES_DIR_VER}/xohtml \ + && (cd ${GH_PAGES_DIR} \ + && git add ${PACKAGE_VERSION}/xohtml \ + && git commit -m 'new xohtml files' \ + ${PACKAGE_VERSION}/xohtml \ && git push origin gh-pages ) ; true pkgconfigdir=$(libdir)/pkgconfig Modified: head/contrib/libxo/configure.ac ============================================================================== --- head/contrib/libxo/configure.ac Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/configure.ac Thu Aug 3 15:47:42 2017 (r322019) @@ -12,7 +12,7 @@ # AC_PREREQ(2.2) -AC_INIT([libxo], [0.8.1], [phil@juniper.net]) +AC_INIT([libxo], [0.8.4], [phil@juniper.net]) AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability]) # Support silent build rules. Requires at least automake-1.11. Modified: head/contrib/libxo/doc/libxo-manual.html ============================================================================== --- head/contrib/libxo/doc/libxo-manual.html Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/doc/libxo-manual.html Thu Aug 3 15:47:42 2017 (r322019) @@ -515,7 +515,7 @@ li.indline1 { } @top-right { - content: "June 2017"; + content: "August 2017"; } @top-center { @@ -22011,7 +22011,7 @@ jQuery(function ($) {
-June 14, 2017 +August 3, 2017

libxo: The Easy Way to Generate text, XML, JSON, and HTML output
libxo-manual

Modified: head/contrib/libxo/libxo/libxo.3 ============================================================================== --- head/contrib/libxo/libxo/libxo.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/libxo.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -311,3 +311,13 @@ to use an alternative set of low-level output function .Xr xo_set_style 3 , .Xr xo_set_writer 3 , .Xr xo_format 5 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/libxo.c ============================================================================== --- head/contrib/libxo/libxo/libxo.c Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/libxo.c Thu Aug 3 15:47:42 2017 (r322019) @@ -137,7 +137,7 @@ static const char xo_default_format[] = "%s"; #define XO_INDENT_BY 2 /* Amount to indent when pretty printing */ #define XO_DEPTH 128 /* Default stack depth */ -#define XO_MAX_ANCHOR_WIDTH (8*1024) /* Anything wider is just sillyb */ +#define XO_MAX_ANCHOR_WIDTH (8*1024) /* Anything wider is just silly */ #define XO_FAILURE_NAME "failure" @@ -5071,16 +5071,60 @@ xo_find_width (xo_handle_t *xop, xo_field_info_t *xfip bp[vlen] = '\0'; width = strtol(bp, &cp, 0); - if (width == LONG_MIN || width == LONG_MAX - || bp == cp || *cp != '\0' ) { + if (width == LONG_MIN || width == LONG_MAX || bp == cp || *cp != '\0') { width = 0; xo_failure(xop, "invalid width for anchor: '%s'", bp); } } else if (flen) { - if (flen != 2 || strncmp("%d", fmt, flen) != 0) - xo_failure(xop, "invalid width format: '%*.*s'", flen, flen, fmt); - if (!XOF_ISSET(xop, XOF_NO_VA_ARG)) - width = va_arg(xop->xo_vap, int); + /* + * We really expect the format for width to be "{:/%d}" or + * "{:/%u}", so if that's the case, we just grab our width off + * the argument list. But we need to avoid optimized logic if + * there's a custom formatter. + */ + if (xop->xo_formatter == NULL && flen == 2 + && strncmp("%d", fmt, flen) == 0) { + if (!XOF_ISSET(xop, XOF_NO_VA_ARG)) + width = va_arg(xop->xo_vap, int); + } else if (xop->xo_formatter == NULL && flen == 2 + && strncmp("%u", fmt, flen) == 0) { + if (!XOF_ISSET(xop, XOF_NO_VA_ARG)) + width = va_arg(xop->xo_vap, unsigned); + } else { + /* + * So we have a format and it's not a simple one like + * "{:/%d}". That means we need to format the field, + * extract the value from the formatted output, and then + * discard that output. + */ + int anchor_was_set = FALSE; + xo_buffer_t *xbp = &xop->xo_data; + ssize_t start_offset = xo_buf_offset(xbp); + bp = xo_buf_cur(xbp); /* Save start of the string */ + cp = NULL; + + if (XOIF_ISSET(xop, XOIF_ANCHOR)) { + XOIF_CLEAR(xop, XOIF_ANCHOR); + anchor_was_set = TRUE; + } + + ssize_t rc = xo_do_format_field(xop, xbp, fmt, flen, 0); + if (rc >= 0) { + xo_buf_append(xbp, "", 1); /* Append a NUL */ + + width = strtol(bp, &cp, 0); + if (width == LONG_MIN || width == LONG_MAX + || bp == cp || *cp != '\0') { + width = 0; + xo_failure(xop, "invalid width for anchor: '%s'", bp); + } + } + + /* Reset the cur pointer to where we found it */ + xbp->xb_curp = xbp->xb_bufp + start_offset; + if (anchor_was_set) + XOIF_SET(xop, XOIF_ANCHOR); + } } return width; @@ -5107,9 +5151,6 @@ static void xo_anchor_start (xo_handle_t *xop, xo_field_info_t *xfip, const char *value, ssize_t vlen) { - if (xo_style(xop) != XO_STYLE_TEXT && xo_style(xop) != XO_STYLE_HTML) - return; - if (XOIF_ISSET(xop, XOIF_ANCHOR)) xo_failure(xop, "the anchor already recording is discarded"); @@ -5129,9 +5170,6 @@ static void xo_anchor_stop (xo_handle_t *xop, xo_field_info_t *xfip, const char *value, ssize_t vlen) { - if (xo_style(xop) != XO_STYLE_TEXT && xo_style(xop) != XO_STYLE_HTML) - return; - if (!XOIF_ISSET(xop, XOIF_ANCHOR)) { xo_failure(xop, "no start anchor"); return; Modified: head/contrib/libxo/libxo/xo_attr.3 ============================================================================== --- head/contrib/libxo/libxo/xo_attr.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_attr.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -58,3 +58,13 @@ already emitted in other form. .Sh SEE ALSO .Xr xo_emit 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_create.3 ============================================================================== --- head/contrib/libxo/libxo/xo_create.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_create.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -65,3 +65,13 @@ resources associated with the default handle. .Xr xo_emit 3 , .Xr xo_set_options 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_emit.3 ============================================================================== --- head/contrib/libxo/libxo/xo_emit.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_emit.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -102,3 +102,13 @@ then the number of display columns consumed by the out .Xr xo_open_list 3 , .Xr xo_format 5 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_emit_err.3 ============================================================================== --- head/contrib/libxo/libxo/xo_emit_err.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_emit_err.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -70,3 +70,13 @@ parameter. .Xr xo_format 5 , .Xr xo_err 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_emit_f.3 ============================================================================== --- head/contrib/libxo/libxo/xo_emit_f.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_emit_f.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -109,3 +109,13 @@ for details. .Xr xo_open_list 3 , .Xr xo_format 5 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_err.3 ============================================================================== --- head/contrib/libxo/libxo/xo_err.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_err.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -72,3 +72,13 @@ parameter. .Xr xo_emit 3 , .Xr xo_emit_err 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_error.3 ============================================================================== --- head/contrib/libxo/libxo/xo_error.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_error.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -39,3 +39,13 @@ calls. .Xr printf 3 , .Xr xo_emit 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_finish.3 ============================================================================== --- head/contrib/libxo/libxo/xo_finish.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_finish.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -37,3 +37,13 @@ especially for the non-TEXT output styles. .Sh SEE ALSO .Xr xo_emit 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_flush.3 ============================================================================== --- head/contrib/libxo/libxo/xo_flush.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_flush.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -33,3 +33,13 @@ function is used for this. .Sh SEE ALSO .Xr xo_emit 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_format.5 ============================================================================== --- head/contrib/libxo/libxo/xo_format.5 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_format.5 Thu Aug 3 15:47:42 2017 (r322019) @@ -965,3 +965,13 @@ names to make that difference more obvious. .Xr libxo 3 , .Xr xolint 1 , .Xr xo_emit 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_message.3 ============================================================================== --- head/contrib/libxo/libxo/xo_message.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_message.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -66,3 +66,13 @@ and .Sh SEE ALSO .Xr xo_emit 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_no_setlocale.3 ============================================================================== --- head/contrib/libxo/libxo/xo_no_setlocale.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_no_setlocale.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -41,3 +41,13 @@ function. .Xr xo_open_list 3 , .Xr xo_format 5 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_open_container.3 ============================================================================== --- head/contrib/libxo/libxo/xo_open_container.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_open_container.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -186,3 +186,13 @@ and the name recorded do not match. .Sh SEE ALSO .Xr xo_emit 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_open_list.3 ============================================================================== --- head/contrib/libxo/libxo/xo_open_list.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_open_list.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -156,3 +156,13 @@ are rendered as multiple leaf elements. .Sh SEE ALSO .Xr xo_emit 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_open_marker.3 ============================================================================== --- head/contrib/libxo/libxo/xo_open_marker.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_open_marker.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -103,3 +103,13 @@ properly. .Sh SEE ALSO .Xr xo_emit 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_options.7 ============================================================================== --- head/contrib/libxo/libxo/xo_options.7 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_options.7 Thu Aug 3 15:47:42 2017 (r322019) @@ -145,3 +145,12 @@ The following are three example invocations of .Sh SEE ALSO .Xr libxo 3 , .Xr xo_format 5 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . Modified: head/contrib/libxo/libxo/xo_parse_args.3 ============================================================================== --- head/contrib/libxo/libxo/xo_parse_args.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_parse_args.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -150,3 +150,13 @@ must be maintained by the caller. .Sh SEE ALSO .Xr xo_emit 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_set_allocator.3 ============================================================================== --- head/contrib/libxo/libxo/xo_set_allocator.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_set_allocator.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -52,3 +52,13 @@ functions are used. .Sh SEE ALSO .Xr xo_emit 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_set_flags.3 ============================================================================== --- head/contrib/libxo/libxo/xo_set_flags.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_set_flags.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -137,3 +137,13 @@ handle. .Sh SEE ALSO .Xr xo_emit 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_set_info.3 ============================================================================== --- head/contrib/libxo/libxo/xo_set_info.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_set_info.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -100,3 +100,13 @@ and "data-help" attributes: .Sh SEE ALSO .Xr xo_emit 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_set_options.3 ============================================================================== --- head/contrib/libxo/libxo/xo_set_options.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_set_options.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -29,3 +29,13 @@ The options are identical to those listed in .Sh SEE ALSO .Xr xo_emit 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_set_style.3 ============================================================================== --- head/contrib/libxo/libxo/xo_set_style.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_set_style.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -51,3 +51,13 @@ The name can be any of the styles: "text", "xml", "jso .Sh SEE ALSO .Xr xo_emit 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_set_syslog_enterprise_id.3 ============================================================================== --- head/contrib/libxo/libxo/xo_set_syslog_enterprise_id.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_set_syslog_enterprise_id.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -34,3 +34,13 @@ https://www.iana.org/assignments/enterprise-numbers/en .Sh SEE ALSO .Xr xo_syslog 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_set_version.3 ============================================================================== --- head/contrib/libxo/libxo/xo_set_version.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_set_version.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -32,3 +32,13 @@ is in use. .Sh SEE ALSO .Xr xo_emit 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_set_writer.3 ============================================================================== --- head/contrib/libxo/libxo/xo_set_writer.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_set_writer.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -54,3 +54,13 @@ flush any pending data associated with the opaque poin .Sh SEE ALSO .Xr xo_emit 3 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/libxo/xo_syslog.3 ============================================================================== --- head/contrib/libxo/libxo/xo_syslog.3 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/libxo/xo_syslog.3 Thu Aug 3 15:47:42 2017 (r322019) @@ -77,3 +77,13 @@ function names. .Xr xo_set_syslog_enterprise_id 3 , .Xr xo_format 5 , .Xr libxo 3 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/tests/core/saved/test_01.E.out ============================================================================== --- head/contrib/libxo/tests/core/saved/test_01.E.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/core/saved/test_01.E.out Thu Aug 3 15:47:42 2017 (r322019) @@ -1,5 +1,11 @@ op create: [] [] [0] op open_container: [top] [] [0x810] +op content: [address] [0x0] [0] +op content: [port] [1] [0] +op content: [address] [0x0] [0] +op content: [port] [1] [0] +op content: [address] [0x0] [0] +op content: [port] [1] [0] op content: [used-percent] [12] [0] op content: [kve_start] [0xdeadbeef] [0x8] op content: [kve_end] [0xcabb1e] [0x8] Modified: head/contrib/libxo/tests/core/saved/test_01.H.out ============================================================================== --- head/contrib/libxo/tests/core/saved/test_01.H.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/core/saved/test_01.H.out Thu Aug 3 15:47:42 2017 (r322019) @@ -1,2 +1,2 @@ -
df
12
%
testing argument modifier
my-box
.
example.com
...
testing argument modifier with encoding to
.
example.com
...
Label text
value
very
42
42 +
anchor
0x0
..
1
anchor
0x0
..
1
anchor
0x0
..
1
df
12
%
testing argument modifier
my-box
.
example.com
...
testing argument modifier with encoding to
.
example.com
...
Label text
value
very
42
42
Connecting to
my-box
.
example.com
...
Item
Total Sold
In Stock
On Order
SKU
gum
1412
54
10
GRO-000-415
rope
85
4
2
HRD-000-212
ladder
0
2
1
HRD-000-517
bolt
4123
144
42
HRD-000-632
water
17
14
2
GRO-000-2331
Item
'
gum
':
Total sold
:
1412.0
In stock
:
54
On order
:
10
SKU
:
GRO-000-415
Item
'
rope
':
Total sold
:
85.0
In stock
:
4
On order
:
2
SKU
:
HRD-000-212
Item
'
ladder
':
Total sold
! :
0
In stock
:
2
On order
:
1
SKU
:
HRD-000-517
Item
'
bolt
':
Total sold
:
4123.0
In s tock
:
144
On order
:
42
SKU
:
HRD-000-632
Item
'
water
':
Total sold
:
17.0
In stock
:
14
On order
:
2
SKU
:
GRO-000-2331
Item
'
fish
':
Total sold
:
1321.0
In stock
:
45
On order
:
1
SKU
:
GRO-000-533
Item
:
gum
Item
:
rope
Item
:
ladder
Item
:
bolt
Item
:
water
X
X
X
X
X
X
X
X
X
X
Cost
:
425
X
X
Cost
:
455
links
user
group
3
this
/some/file
1
user
group
\ No newline at end of file Modified: head/contrib/libxo/tests/core/saved/test_01.HIPx.out ============================================================================== --- head/contrib/libxo/tests/core/saved/test_01.HIPx.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/core/saved/test_01.HIPx.out Thu Aug 3 15:47:42 2017 (r322019) @@ -1,4 +1,25 @@
+
anchor
+
+
0x0
+
..
+
1
+
+
+
anchor
+
+
0x0
+
..
+
1
+
+
+
anchor
+
+
0x0
+
..
+
1
+
+
df
12
%
Modified: head/contrib/libxo/tests/core/saved/test_01.HP.out ============================================================================== --- head/contrib/libxo/tests/core/saved/test_01.HP.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/core/saved/test_01.HP.out Thu Aug 3 15:47:42 2017 (r322019) @@ -1,4 +1,25 @@
+
anchor
+
+
0x0
+
..
+
1
+
+
+
anchor
+
+
0x0
+
..
+
1
+
+
+
anchor
+
+
0x0
+
..
+
1
+
+
df
12
%
Modified: head/contrib/libxo/tests/core/saved/test_01.J.out ============================================================================== --- head/contrib/libxo/tests/core/saved/test_01.J.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/core/saved/test_01.J.out Thu Aug 3 15:47:42 2017 (r322019) @@ -1,2 +1,2 @@ -{"top": {"used-percent":12,"kve_start":"0xdeadbeef","kve_end":"0xcabb1e","host":"my-box","domain":"example.com","host":"my-box","domain":"example.com","label":"value","max-chaos":"very","min-chaos":42,"some-chaos":"[42]","host":"my-box","domain":"example.com", "data": {"item": [{"sku":"GRO-000-415","name":"gum","sold":1412,"in-stock":54,"on-order":10}, {"sku":"HRD-000-212","name":"rope","sold":85,"in-stock":4,"on-order":2}, {"sku":"HRD-000-517","name":"ladder","sold":0,"in-stock":2,"on-order":1}, {"sku":"HRD-000-632","name":"bolt","sold":4123,"in-stock":144,"on-order":42}, {"sku":"GRO-000-2331","name":"water","sold":17,"in-stock":14,"on-order":2}]}, "data2": {"item": [{"sku":"GRO-000-415","name":"gum","sold":1412.0,"in-stock":54,"on-order":10}, {"sku":"HRD-000-212","name":"rope","sold":85.0,"in-stock":4,"on-order":2}, {"sku":"HRD-000-517","name":"ladder","sold":0,"in-stock":2,"on-order":1}, {"sku":"HRD-000-632","name":"bolt","sold":4123.0,"in-stock":144,"on-order":42}, {"sku":"GRO-0 00-2331","name":"water","sold":17.0,"in-stock":14,"on-order":2}]}, "data3": {"item": [{"sku":"GRO-000-533","name":"fish","sold":1321.0,"in-stock":45,"on-order":1}]}, "data4": {"item": ["gum","rope","ladder","bolt","water"]},"cost":425,"cost":455,"mode":"mode","mode_octal":"octal","links":"links","user":"user","group":"group","pre":"that","links":3,"post":"this","mode":"/some/file","mode_octal":640,"links":1,"user":"user","group":"group"} +{"top": {"address":"0x0","port":1,"address":"0x0","port":1,"address":"0x0","port":1,"used-percent":12,"kve_start":"0xdeadbeef","kve_end":"0xcabb1e","host":"my-box","domain":"example.com","host":"my-box","domain":"example.com","label":"value","max-chaos":"very","min-chaos":42,"some-chaos":"[42]","host":"my-box","domain":"example.com", "data": {"item": [{"sku":"GRO-000-415","name":"gum","sold":1412,"in-stock":54,"on-order":10}, {"sku":"HRD-000-212","name":"rope","sold":85,"in-stock":4,"on-order":2}, {"sku":"HRD-000-517","name":"ladder","sold":0,"in-stock":2,"on-order":1}, {"sku":"HRD-000-632","name":"bolt","sold":4123,"in-stock":144,"on-order":42}, {"sku":"GRO-000-2331","name":"water","sold":17,"in-stock":14,"on-order":2}]}, "data2": {"item": [{"sku":"GRO-000-415","name":"gum","sold":1412.0,"in-stock":54,"on-order":10}, {"sku":"HRD-000-212","name":"rope","sold":85.0,"in-stock":4,"on-order":2}, {"sku":"HRD-000-517","name":"ladder","sold":0,"in-stock":2,"on-order":1}, {"sku":"HRD-000-63 2","name":"bolt","sold":4123.0,"in-stock":144,"on-order":42}, {"sku":"GRO-000-2331","name":"water","sold":17.0,"in-stock":14,"on-order":2}]}, "data3": {"item": [{"sku":"GRO-000-533","name":"fish","sold":1321.0,"in-stock":45,"on-order":1}]}, "data4": {"item": ["gum","rope","ladder","bolt","water"]},"cost":425,"cost":455,"mode":"mode","mode_octal":"octal","links":"links","user":"user","group":"group","pre":"that","links":3,"post":"this","mode":"/some/file","mode_octal":640,"links":1,"user":"user","group":"group"} } Modified: head/contrib/libxo/tests/core/saved/test_01.JP.out ============================================================================== --- head/contrib/libxo/tests/core/saved/test_01.JP.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/core/saved/test_01.JP.out Thu Aug 3 15:47:42 2017 (r322019) @@ -1,5 +1,11 @@ { "top": { + "address": "0x0", + "port": 1, + "address": "0x0", + "port": 1, + "address": "0x0", + "port": 1, "used-percent": 12, "kve_start": "0xdeadbeef", "kve_end": "0xcabb1e", Modified: head/contrib/libxo/tests/core/saved/test_01.T.out ============================================================================== --- head/contrib/libxo/tests/core/saved/test_01.T.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/core/saved/test_01.T.out Thu Aug 3 15:47:42 2017 (r322019) @@ -1,3 +1,6 @@ +anchor 0x0..1 +anchor 0x0..1 +anchor 0x0..1 df 12% testing argument modifier my-box.example.com... testing argument modifier with encoding to .example.com... Modified: head/contrib/libxo/tests/core/saved/test_01.X.out ============================================================================== --- head/contrib/libxo/tests/core/saved/test_01.X.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/core/saved/test_01.X.out Thu Aug 3 15:47:42 2017 (r322019) @@ -1 +1 @@ -120xdeadbeef0xcabb1emy-boxexample.commy-boxexample.comvery42[42]my-boxexample.comGRO-000-415gum14125410HRD-000-212rope8542HRD-000-517ladder021HRD-000-632bolt412314442GRO-000-2331water17142GRO-000-415gum1412.05410HRD-000-212rope85.042HRD-000-517ladder021HRD-000-632bolt4123.014442GRO-000-2331water17.0142GRO-000-533fish1321.0451gum< /item>ropeladderboltwater425455modeoctallinksusergroup
that
3this/some/file6401usergroup
\ No newline at end of file +
0x0
1
0x0
1
0x0
1120xdeadbeef0xcabb1emy-boxexample.commy-boxexample.comvery42[42]my-boxexample.comGRO-000-415gum14125410HRD-000-212rope8542HRD-000-517ladder021HRD-000-632bolt412314442GRO-000-2331water17142GRO-000-415gum1412.05410HRD-000-212rope85.042HRD-000-517ladder021HRD-000-632bolt4123.014442GRO-000-2331water17.0142GRO-000-533fish1321.0451gumropeladderboltwater425455modeoctallinksusergroup
that
3this/some/file6401usergroup
\ No newline at end of file Modified: head/contrib/libxo/tests/core/saved/test_01.XP.out ============================================================================== --- head/contrib/libxo/tests/core/saved/test_01.XP.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/core/saved/test_01.XP.out Thu Aug 3 15:47:42 2017 (r322019) @@ -1,4 +1,10 @@ +
0x0
+ 1 +
0x0
+ 1 +
0x0
+ 1 12 0xdeadbeef 0xcabb1e Modified: head/contrib/libxo/tests/core/saved/test_02.E.out ============================================================================== --- head/contrib/libxo/tests/core/saved/test_02.E.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/core/saved/test_02.E.out Thu Aug 3 15:47:42 2017 (r322019) @@ -34,7 +34,7 @@ op content: [unknown] [1010] [0] op content: [unknown] [1010] [0] op content: [min] [15] [0x20] op content: [cur] [20] [0x20] -op content: [max] [30] [0] +op content: [max] [125] [0] op content: [min] [15] [0] op content: [cur] [20] [0] op content: [max] [125] [0] Modified: head/contrib/libxo/tests/core/saved/test_02.J.out ============================================================================== --- head/contrib/libxo/tests/core/saved/test_02.J.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/core/saved/test_02.J.out Thu Aug 3 15:47:42 2017 (r322019) @@ -1,2 +1,2 @@ -{"top": {"data": {"what":"braces","length":"abcdef","fd":-1,"error":"Bad file descriptor","test":"good","fd":-1,"error":"Bad fi","test":"good","lines":20,"words":30,"characters":40, "bytes": [0,1,2,3,4],"mbuf-current":10,"mbuf-cache":20,"mbuf-total":30,"distance":50,"location":"Boston","memory":64,"total":640,"memory":64,"total":640,"ten":10,"eleven":11,"unknown":1010,"unknown":1010,"min":15,"cur":20,"max":30,"min":15,"cur":20,"max":125,"min":15,"cur":20,"max":125,"min":15,"cur":20,"max":125,"val1":21,"val2":58368,"val3":100663296,"val4":44470272,"val5":1342172800, "flag": ["one","two","three"],"works":null,"empty-tag":true,"t1":"1000","t2":"test5000","t3":"ten-longx","t4":"xtest", "__error": {"message":"this is an error"}, "__error": {"message":"two more errors"}, "__warning": {"message":"this is an warning"}, "__warning": {"message":"two more warnings"},"count":10,"test":4, "error": {"message":"Shut 'er down, Clancey! She's a-pumpin' mud! <>!,\"!<>\n"}}} +{"top": {"data": {"what":"braces","length":"abcdef","fd":-1,"error":"Bad file descriptor","test":"good","fd":-1,"error":"Bad fi","test":"good","lines":20,"words":30,"characters":40, "bytes": [0,1,2,3,4],"mbuf-current":10,"mbuf-cache":20,"mbuf-total":30,"distance":50,"location":"Boston","memory":64,"total":640,"memory":64,"total":640,"ten":10,"eleven":11,"unknown":1010,"unknown":1010,"min":15,"cur":20,"max":125,"min":15,"cur":20,"max":125,"min":15,"cur":20,"max":125,"min":15,"cur":20,"max":125,"val1":21,"val2":58368,"val3":100663296,"val4":44470272,"val5":1342172800, "flag": ["one","two","three"],"works":null,"empty-tag":true,"t1":"1000","t2":"test5000","t3":"ten-longx","t4":"xtest", "__error": {"message":"this is an error"}, "__error": {"message":"two more errors"}, "__warning": {"message":"this is an warning"}, "__warning": {"message":"two more warnings"},"count":10,"test":4, "error": {"message":"Shut 'er down, Clancey! She's a-pumpin' mud! <>!,\"!<>\n"}}} } Modified: head/contrib/libxo/tests/core/saved/test_02.JP.out ============================================================================== --- head/contrib/libxo/tests/core/saved/test_02.JP.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/core/saved/test_02.JP.out Thu Aug 3 15:47:42 2017 (r322019) @@ -34,7 +34,7 @@ "unknown": 1010, "min": 15, "cur": 20, - "max": 30, + "max": 125, "min": 15, "cur": 20, "max": 125, Modified: head/contrib/libxo/tests/core/saved/test_02.X.out ============================================================================== --- head/contrib/libxo/tests/core/saved/test_02.X.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/core/saved/test_02.X.out Thu Aug 3 15:47:42 2017 (r322019) @@ -2,6 +2,6 @@ abcdef: Bad file descriptor improper use of profanity; ten yard penalty; first down abcdef-1Bad file descriptorgood-1Bad figoodimproper use of profanity; ten yard penalty; first down -2030400123410203050Boston64640646401011101010101520301520125152012515201252158368100663296444702721342172800onetwothreenull1000test5000ten-longxxtest<__error>this is an error<__error>two more err ors<__warning>this is an warning<__warning>two more warnings104improper use of profanity; ten yard penalty; first down +2030400123410203050Boston646406464010111010101015201251520125152012515201252158368100663296444702721342172800onetwothreenull1000test5000ten-longxxtest<__error>this is an error<__error>two more er rors<__warning>this is an warning<__warning>two more warnings104improper use of profanity; ten yard penalty; first down Shut 'er down, Clancey! She's a-pumpin' mud! <>!,"!<>
\ No newline at end of file Modified: head/contrib/libxo/tests/core/saved/test_02.XP.out ============================================================================== --- head/contrib/libxo/tests/core/saved/test_02.XP.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/core/saved/test_02.XP.out Thu Aug 3 15:47:42 2017 (r322019) @@ -39,7 +39,7 @@ 1010 15 20 - 30 + 125 15 20 125 Modified: head/contrib/libxo/tests/core/test_01.c ============================================================================== --- head/contrib/libxo/tests/core/test_01.c Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/core/test_01.c Thu Aug 3 15:47:42 2017 (r322019) @@ -80,6 +80,10 @@ main (int argc, char **argv) xo_open_container_h(NULL, "top"); + xo_emit("anchor {[:/%d}{:address/%p}..{:port/%u}{]:}\n", 18, NULL, 1); + xo_emit("anchor {[:18}{:address/%p}..{:port/%u}{]:}\n", NULL, 1); + xo_emit("anchor {[:/18}{:address/%p}..{:port/%u}{]:}\n", NULL, 1); + xo_emit("df {:used-percent/%5.0f}{U:%%}\n", (double) 12); xo_emit("{e:kve_start/%#jx}", (uintmax_t) 0xdeadbeef); Modified: head/contrib/libxo/tests/xo/saved/xo_01.H.out ============================================================================== --- head/contrib/libxo/tests/xo/saved/xo_01.H.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/xo/saved/xo_01.H.out Thu Aug 3 15:47:42 2017 (r322019) @@ -1 +1 @@ -
Item
one
is
number
001
,
color
:
red
Item
two
is
number
002
,
color
:
blue
Item
three
is
number
003
< div class="text">,
color
:
green
Item
four
is
number
004
,
color
:
yellow
\ No newline at end of file +
Item
one
is
number
001
,
color
:
red
Item
two
is
number
002
,
color
:
blue
Item
three
is
number
003
< div class="text">,
color
:
green
Item
four
is
number
004
,
color
:
yellow
0xdeadbeef
..
1
0xdeadbeef
..
1
0xde adbeef
..
1
0xdeadbeef
..
1
\ No newline at end of file Modified: head/contrib/libxo/tests/xo/saved/xo_01.HIPx.out ============================================================================== --- head/contrib/libxo/tests/xo/saved/xo_01.HIPx.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/xo/saved/xo_01.HIPx.out Thu Aug 3 15:47:42 2017 (r322019) @@ -50,3 +50,27 @@
yellow
+
+
+
0xdeadbeef
+
..
+
1
+
+
+
+
0xdeadbeef
+
..
+
1
+
+
+
+
0xdeadbeef
+
..
+
1
+
+
+
+
0xdeadbeef
+
..
+
1
+
Modified: head/contrib/libxo/tests/xo/saved/xo_01.HP.out ============================================================================== --- head/contrib/libxo/tests/xo/saved/xo_01.HP.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/xo/saved/xo_01.HP.out Thu Aug 3 15:47:42 2017 (r322019) @@ -50,3 +50,27 @@
yellow
+
+
+
0xdeadbeef
+
..
+
1
+
+
+
+
0xdeadbeef
+
..
+
1
+
+
+
+
0xdeadbeef
+
..
+
1
+
+
+
+
0xdeadbeef
+
..
+
1
+
Modified: head/contrib/libxo/tests/xo/saved/xo_01.J.out ============================================================================== --- head/contrib/libxo/tests/xo/saved/xo_01.J.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/xo/saved/xo_01.J.out Thu Aug 3 15:47:42 2017 (r322019) @@ -1 +1 @@ -"top": {"item": {"name":"one","value":1,"color":"red"}, "item": {"name":"two","value":2,"color":"blue"}, "item": {"name":"three","value":3,"color":"green"}, "item": {"name":"four","value":4,"color":"yellow"}} +"top": {"item": {"name":"one","value":1,"color":"red"}, "item": {"name":"two","value":2,"color":"blue"}, "item": {"name":"three","value":3,"color":"green"}, "item": {"name":"four","value":4,"color":"yellow"}, "anchor": {"address":"0xdeadbeef","foo":1}, "anchor": {"address":"0xdeadbeef","foo":1}, "anchor": {"address":"0xdeadbeef","foo":1}, "anchor": {"address":"0xdeadbeef","foo":1}} Modified: head/contrib/libxo/tests/xo/saved/xo_01.JP.out ============================================================================== --- head/contrib/libxo/tests/xo/saved/xo_01.JP.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/xo/saved/xo_01.JP.out Thu Aug 3 15:47:42 2017 (r322019) @@ -18,5 +18,21 @@ "name": "four", "value": 4, "color": "yellow" + }, + "anchor": { + "address": "0xdeadbeef", + "foo": 1 + }, + "anchor": { + "address": "0xdeadbeef", + "foo": 1 + }, + "anchor": { + "address": "0xdeadbeef", + "foo": 1 + }, + "anchor": { + "address": "0xdeadbeef", + "foo": 1 } } Modified: head/contrib/libxo/tests/xo/saved/xo_01.T.out ============================================================================== --- head/contrib/libxo/tests/xo/saved/xo_01.T.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/xo/saved/xo_01.T.out Thu Aug 3 15:47:42 2017 (r322019) @@ -2,3 +2,7 @@ Item one is number 001, color: red Item two is number 002, color: blue Item three is number 003, color: green Item four is number 004, color: yellow + 0xdeadbeef..1 + 0xdeadbeef..1 + 0xdeadbeef..1 + 0xdeadbeef..1 Modified: head/contrib/libxo/tests/xo/saved/xo_01.X.out ============================================================================== --- head/contrib/libxo/tests/xo/saved/xo_01.X.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/xo/saved/xo_01.X.out Thu Aug 3 15:47:42 2017 (r322019) @@ -1 +1 @@ -one1redtwo2bluethree3greenfour4yellow \ No newline at end of file +one1redtwo2bluethree3greenfour4yellow
0xdeadbeef
1
0xdeadbeef
1
0xdeadbeef
1
0xdeadbeef
1
\ No newline at end of file Modified: head/contrib/libxo/tests/xo/saved/xo_01.XP.out ============================================================================== --- head/contrib/libxo/tests/xo/saved/xo_01.XP.out Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/xo/saved/xo_01.XP.out Thu Aug 3 15:47:42 2017 (r322019) @@ -19,4 +19,20 @@ 4 yellow + +
0xdeadbeef
+ 1 +
+ +
0xdeadbeef
+ 1 +
+ +
0xdeadbeef
+ 1 +
+ +
0xdeadbeef
+ 1 +
Modified: head/contrib/libxo/tests/xo/xo_01.sh ============================================================================== --- head/contrib/libxo/tests/xo/xo_01.sh Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/tests/xo/xo_01.sh Thu Aug 3 15:47:42 2017 (r322019) @@ -24,4 +24,10 @@ for i in one:1:red two:2:blue three:3:green four:4:yel NF=--not-first done -${XO} --close top \ No newline at end of file +XOAN="${XO} --wrap anchor --not-first --warn --depth 1" +${XOAN} "{[:18}{:address/%p}..{:foo/%u}{]:}\n" 0xdeadbeef 1 +${XOAN} "{[:/18}{:address/%p}..{:foo/%u}{]:}\n" 0xdeadbeef 1 +${XOAN} "{[:/%d}{:address/%p}..{:foo/%u}{]:}\n" 18 0xdeadbeef 1 +${XOAN} "{[:/%s}{:address/%p}..{:foo/%u}{]:}\n" 18 0xdeadbeef 1 + +${XO} --close top Modified: head/contrib/libxo/xo/xo.1 ============================================================================== --- head/contrib/libxo/xo/xo.1 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/xo/xo.1 Thu Aug 3 15:47:42 2017 (r322019) @@ -188,3 +188,13 @@ prepend data to the XPath values used for HTML output .Xr libxo 3 , .Xr xo_emit 3 , .Xr xo_options 7 +.Sh HISTORY +The +.Nm libxo +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.Nm libxo +was written by +.An Phil Shafer Aq Mt phil@freebsd.org . + Modified: head/contrib/libxo/xohtml/xohtml.1 ============================================================================== --- head/contrib/libxo/xohtml/xohtml.1 Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/xohtml/xohtml.1 Thu Aug 3 15:47:42 2017 (r322019) @@ -19,7 +19,8 @@ .Op Fl "b " .Op Fl "c" " .Op Fl "f" -.Op Ar command argument... +.Op Fl "w" +.Op Ar command [argument ...] .Sh DESCRIPTION .Nm is a tool for preparing @@ -69,6 +70,12 @@ command is used directly. .It Ic -f Ar file | Ic --file Ar file Output is saved to the given file, rather than to the standard output descriptor. +.It Ic -w | --web +Uses the official +.Nm libxo +website URL as the source path for the CSS and Javascript files +referenced in the output of +.Nm xohtml . .El .Pp .Sh EXAMPLES Modified: head/contrib/libxo/xohtml/xohtml.sh.in ============================================================================== --- head/contrib/libxo/xohtml/xohtml.sh.in Thu Aug 3 15:43:29 2017 (r322018) +++ head/contrib/libxo/xohtml/xohtml.sh.in Thu Aug 3 15:47:42 2017 (r322019) @@ -10,8 +10,10 @@ # BASE=@XO_SHAREDIR@ +VERSION=@LIBXO_VERSION@ CMD=cat DONE= +WEB=http://juniper.github.io/libxo/${VERSION}/xohtml do_help () { echo "xohtml: wrap libxo-enabled output in HTML" @@ -41,6 +43,11 @@ while [ -z "$DONE" -a ! -z "$1" ]; do shift; exec > "$FILE"; ;; + -w|--web) + shift; + BASE="${WEB}"; + ;; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Thu Aug 3 17:53:15 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F3C2DCAE14; Thu, 3 Aug 2017 17:53:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D6BF64985; Thu, 3 Aug 2017 17:53:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v73HrEwt058857; Thu, 3 Aug 2017 17:53:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v73HrEKJ058856; Thu, 3 Aug 2017 17:53:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708031753.v73HrEKJ058856@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 3 Aug 2017 17:53:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322023 - head/lib/libxo/tests X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/lib/libxo/tests X-SVN-Commit-Revision: 322023 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 17:53:15 -0000 Author: ngie Date: Thu Aug 3 17:53:14 2017 New Revision: 322023 URL: https://svnweb.freebsd.org/changeset/base/322023 Log: Remove special-case logic for running tests on host machines I'm not sure what process sjg@ was using, but using CHECKDIR=${.OBJDIR} with "make check" on ^/head is the correct thing to do. This unbreaks "make check" for me (unsandboxed, not using CHECKDIR=${.OBJDIR}). While here, fix a whitespace nit with LIBADD. MFC after: 1 week Modified: head/lib/libxo/tests/Makefile Modified: head/lib/libxo/tests/Makefile ============================================================================== --- head/lib/libxo/tests/Makefile Thu Aug 3 17:43:26 2017 (r322022) +++ head/lib/libxo/tests/Makefile Thu Aug 3 17:53:14 2017 (r322023) @@ -242,13 +242,8 @@ PROGS+= test_11 CFLAGS+= -I${LIBXOSRC}/libxo -I${.CURDIR:H} -LIBADD= xo util +LIBADD= xo util SUBDIR+= encoder - -.if ${MACHINE} == "host" -# make it easy to test without install -TESTSDIR= ${.OBJDIR} -.endif .include From owner-svn-src-head@freebsd.org Thu Aug 3 18:43:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE4ABDCD270; Thu, 3 Aug 2017 18:43:55 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 996DA6651C; Thu, 3 Aug 2017 18:43:55 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v73IhsrU079447; Thu, 3 Aug 2017 18:43:54 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v73Ihsc0079446; Thu, 3 Aug 2017 18:43:54 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201708031843.v73Ihsc0079446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 3 Aug 2017 18:43:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322025 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 322025 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 18:43:55 -0000 Author: ian Date: Thu Aug 3 18:43:54 2017 New Revision: 322025 URL: https://svnweb.freebsd.org/changeset/base/322025 Log: Switch to iicdev_readfrom/writeto() to do xfers with proper bus ownership. Tested by: manu@ Modified: head/sys/arm/allwinner/axp209.c Modified: head/sys/arm/allwinner/axp209.c ============================================================================== --- head/sys/arm/allwinner/axp209.c Thu Aug 3 18:07:01 2017 (r322024) +++ head/sys/arm/allwinner/axp209.c Thu Aug 3 18:43:54 2017 (r322025) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -59,7 +58,6 @@ __FBSDID("$FreeBSD$"); #include -#include "iicbus_if.h" #include "gpio_if.h" #include "regdev_if.h" @@ -602,7 +600,6 @@ enum AXP2XX_TYPE { struct axp2xx_softc { device_t dev; - uint32_t addr; struct resource * res[1]; void * intrcookie; struct intr_config_hook intr_hook; @@ -641,57 +638,15 @@ static struct resource_spec axp_res_spec[] = { static int axp2xx_read(device_t dev, uint8_t reg, uint8_t *data, uint8_t size) { - struct axp2xx_softc *sc = device_get_softc(dev); - struct iic_msg msg[2]; - msg[0].slave = sc->addr; - msg[0].flags = IIC_M_WR; - msg[0].len = 1; - msg[0].buf = ® - - msg[1].slave = sc->addr; - msg[1].flags = IIC_M_RD; - msg[1].len = size; - msg[1].buf = data; - - return (iicbus_transfer(dev, msg, 2)); + return (iicdev_readfrom(dev, reg, data, size, IIC_INTRWAIT)); } static int axp2xx_write(device_t dev, uint8_t reg, uint8_t data) { - uint8_t buffer[2]; - struct axp2xx_softc *sc = device_get_softc(dev); - struct iic_msg msg[2]; - int nmsgs = 0; - if (sc->type == AXP209) { - buffer[0] = reg; - buffer[1] = data; - - msg[0].slave = sc->addr; - msg[0].flags = IIC_M_WR; - msg[0].len = 2; - msg[0].buf = buffer; - - nmsgs = 1; - } - else if (sc->type == AXP221) { - msg[0].slave = sc->addr; - msg[0].flags = IIC_M_WR; - msg[0].len = 1; - msg[0].buf = ® - - msg[1].slave = sc->addr; - msg[1].flags = IIC_M_WR; - msg[1].len = 1; - msg[1].buf = &data; - nmsgs = 2; - } - else - return (EINVAL); - - return (iicbus_transfer(dev, msg, nmsgs)); + return (iicdev_writeto(dev, reg, &data, sizeof(data), IIC_INTRWAIT)); } static int @@ -1239,7 +1194,6 @@ axp2xx_start(void *pdev) dev = pdev; sc = device_get_softc(dev); - sc->addr = iicbus_get_addr(dev); sc->dev = dev; if (bootverbose) { @@ -1451,4 +1405,4 @@ EARLY_DRIVER_MODULE(ofw_gpiobus, axp2xx_pmu, ofw_gpiob DRIVER_MODULE(gpioc, axp2xx_pmu, gpioc_driver, gpioc_devclass, 0, 0); MODULE_VERSION(axp2xx, 1); -MODULE_DEPEND(axp2xx, iicbus, 1, 1, 1); +MODULE_DEPEND(axp2xx, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER); From owner-svn-src-head@freebsd.org Thu Aug 3 18:49:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69D41DCD863; Thu, 3 Aug 2017 18:49:16 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38C1C669E0; Thu, 3 Aug 2017 18:49:16 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v73InF3g079677; Thu, 3 Aug 2017 18:49:15 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v73InFc9079676; Thu, 3 Aug 2017 18:49:15 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201708031849.v73InFc9079676@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 3 Aug 2017 18:49:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322026 - head/sys/modules/i2c/nxprtc X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/modules/i2c/nxprtc X-SVN-Commit-Revision: 322026 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 18:49:16 -0000 Author: ian Date: Thu Aug 3 18:49:15 2017 New Revision: 322026 URL: https://svnweb.freebsd.org/changeset/base/322026 Log: Add missing header file to SRCS. Reported by: manu@ Modified: head/sys/modules/i2c/nxprtc/Makefile Modified: head/sys/modules/i2c/nxprtc/Makefile ============================================================================== --- head/sys/modules/i2c/nxprtc/Makefile Thu Aug 3 18:43:54 2017 (r322025) +++ head/sys/modules/i2c/nxprtc/Makefile Thu Aug 3 18:49:15 2017 (r322026) @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/iicbus KMOD = nxprtc -SRCS = nxprtc.c bus_if.h clock_if.h device_if.h iicbus_if.h +SRCS = nxprtc.c bus_if.h clock_if.h device_if.h iicbus_if.h ofw_bus_if.h .include From owner-svn-src-head@freebsd.org Thu Aug 3 19:01:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DF9DDCE311; Thu, 3 Aug 2017 19:01:47 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D264672EB; Thu, 3 Aug 2017 19:01:47 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v73J1k6K087530; Thu, 3 Aug 2017 19:01:46 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v73J1ke9087529; Thu, 3 Aug 2017 19:01:46 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201708031901.v73J1ke9087529@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 3 Aug 2017 19:01:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322027 - head/sys/arm/conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/conf X-SVN-Commit-Revision: 322027 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 19:01:47 -0000 Author: manu Date: Thu Aug 3 19:01:46 2017 New Revision: 322027 URL: https://svnweb.freebsd.org/changeset/base/322027 Log: arm: Add a GENERIC-NODEBUG kernel config Like amd64 or arm64 provide a GENERIC-NODEBUG configuration file that remove WITNESS and INVARIANTS etc ... Added: head/sys/arm/conf/GENERIC-NODEBUG (contents, props changed) Added: head/sys/arm/conf/GENERIC-NODEBUG ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/GENERIC-NODEBUG Thu Aug 3 19:01:46 2017 (r322027) @@ -0,0 +1,40 @@ +# +# GENERIC-NODEBUG -- WITNESS and INVARIANTS free kernel configuration file +# for FreeBSD/arm +# +# This configuration file removes several debugging options, including +# WITNESS and INVARIANTS checking, which are known to have significant +# performance impact on running systems. When benchmarking new features +# this kernel should be used instead of the standard GENERIC. +# This kernel configuration should never appear outside of the HEAD +# of the FreeBSD tree. +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +include GENERIC + +ident GENERIC-NODEBUG + +nooptions INVARIANTS +nooptions INVARIANT_SUPPORT +nooptions WITNESS +nooptions WITNESS_SKIPSPIN +nooptions BUF_TRACKING +nooptions DEADLKRES +nooptions FULL_BUF_TRACKING + From owner-svn-src-head@freebsd.org Thu Aug 3 21:14:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E181FDD3A59; Thu, 3 Aug 2017 21:14:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A23606B5BF; Thu, 3 Aug 2017 21:14:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v73LEkib041275; Thu, 3 Aug 2017 21:14:46 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v73LEkr8041273; Thu, 3 Aug 2017 21:14:46 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201708032114.v73LEkr8041273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 3 Aug 2017 21:14:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322028 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 322028 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 21:14:48 -0000 Author: markj Date: Thu Aug 3 21:14:46 2017 New Revision: 322028 URL: https://svnweb.freebsd.org/changeset/base/322028 Log: Add subsystem vendor and device ID fields to struct pci_dev. MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h head/sys/compat/linuxkpi/common/src/linux_pci.c Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/pci.h Thu Aug 3 19:01:46 2017 (r322027) +++ head/sys/compat/linuxkpi/common/include/linux/pci.h Thu Aug 3 21:14:46 2017 (r322028) @@ -202,6 +202,8 @@ struct pci_dev { uint64_t dma_mask; uint16_t device; uint16_t vendor; + uint16_t subsystem_vendor; + uint16_t subsystem_device; unsigned int irq; unsigned int devfn; uint32_t class; Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_pci.c Thu Aug 3 19:01:46 2017 (r322027) +++ head/sys/compat/linuxkpi/common/src/linux_pci.c Thu Aug 3 21:14:46 2017 (r322028) @@ -119,10 +119,13 @@ linux_pci_attach(device_t dev) { struct resource_list_entry *rle; struct pci_dev *pdev; + struct pci_devinfo *dinfo; struct pci_driver *pdrv; const struct pci_device_id *id; int error; + dinfo = device_get_ivars(dev); + linux_set_current(curthread); pdrv = linux_pci_find(dev, &id); pdev = device_get_softc(dev); @@ -132,6 +135,8 @@ linux_pci_attach(device_t dev) pdev->devfn = PCI_DEVFN(pci_get_slot(dev), pci_get_function(dev)); pdev->device = id->device; pdev->vendor = id->vendor; + pdev->subsystem_vendor = dinfo->cfg.subvendor; + pdev->subsystem_device = dinfo->cfg.subdevice; pdev->class = pci_get_class(dev); pdev->revision = pci_get_revid(dev); pdev->dev.dma_mask = &pdev->dma_mask; From owner-svn-src-head@freebsd.org Thu Aug 3 21:30:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2875DD4334; Thu, 3 Aug 2017 21:30:13 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8011A6BC27; Thu, 3 Aug 2017 21:30:13 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v73LUCfx045640; Thu, 3 Aug 2017 21:30:12 GMT (envelope-from jlh@FreeBSD.org) Received: (from jlh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v73LUC2H045637; Thu, 3 Aug 2017 21:30:12 GMT (envelope-from jlh@FreeBSD.org) Message-Id: <201708032130.v73LUC2H045637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jlh set sender to jlh@FreeBSD.org using -f From: Jeremie Le Hen Date: Thu, 3 Aug 2017 21:30:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322029 - in head: usr.bin usr.sbin X-SVN-Group: head X-SVN-Commit-Author: jlh X-SVN-Commit-Paths: in head: usr.bin usr.sbin X-SVN-Commit-Revision: 322029 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 21:30:13 -0000 Author: jlh Date: Thu Aug 3 21:30:12 2017 New Revision: 322029 URL: https://svnweb.freebsd.org/changeset/base/322029 Log: rwho/ruptime/rwhod shouldn't be gated by RCMDS. PR: 220953 Reported by: peter@ Differential Revision: https://reviews.freebsd.org/D11743 Modified: head/usr.bin/Makefile head/usr.sbin/Makefile Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Thu Aug 3 21:14:46 2017 (r322028) +++ head/usr.bin/Makefile Thu Aug 3 21:30:12 2017 (r322029) @@ -133,8 +133,10 @@ SUBDIR= alias \ rpcinfo \ rs \ rup \ + ruptime \ rusers \ rwall \ + rwho \ script \ sdiff \ sed \ @@ -251,8 +253,6 @@ SUBDIR.${MK_OPENSSL}+= newkey SUBDIR.${MK_QUOTAS}+= quota SUBDIR.${MK_RCMDS}+= rlogin SUBDIR.${MK_RCMDS}+= rsh -SUBDIR.${MK_RCMDS}+= ruptime -SUBDIR.${MK_RCMDS}+= rwho SUBDIR.${MK_SENDMAIL}+= vacation SUBDIR.${MK_TALK}+= talk SUBDIR.${MK_TELNET}+= telnet Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Thu Aug 3 21:14:46 2017 (r322028) +++ head/usr.sbin/Makefile Thu Aug 3 21:30:12 2017 (r322029) @@ -74,6 +74,7 @@ SUBDIR= adduser \ rpc.statd \ rpc.umntall \ rtprio \ + rwhod \ service \ services_mkdb \ sesutil \ @@ -191,7 +192,6 @@ SUBDIR.${MK_PPP}+= ppp SUBDIR.${MK_QUOTAS}+= edquota SUBDIR.${MK_QUOTAS}+= quotaon SUBDIR.${MK_QUOTAS}+= repquota -SUBDIR.${MK_RCMDS}+= rwhod SUBDIR.${MK_SENDMAIL}+= editmap SUBDIR.${MK_SENDMAIL}+= mailstats SUBDIR.${MK_SENDMAIL}+= makemap From owner-svn-src-head@freebsd.org Thu Aug 3 21:35:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEE69DD4749; Thu, 3 Aug 2017 21:35:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 894616C056; Thu, 3 Aug 2017 21:35:54 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v73LZrmC049614; Thu, 3 Aug 2017 21:35:53 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v73LZr8I049613; Thu, 3 Aug 2017 21:35:53 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201708032135.v73LZr8I049613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 3 Aug 2017 21:35:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322030 - head/sys/fs/pseudofs X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/fs/pseudofs X-SVN-Commit-Revision: 322030 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 21:35:54 -0000 Author: markj Date: Thu Aug 3 21:35:53 2017 New Revision: 322030 URL: https://svnweb.freebsd.org/changeset/base/322030 Log: Bump the maximum file name length in pseudofs filesystems to 48. The previous limit of 24 was somewhat restrictive, and with this change ceil(log2(sizeof(struct pfs_node))) is the same as before in both the ILP32 and LP64 models, so the malloc zone used for allocations of struct pfs_node is the same as before. Approved by: des Modified: head/sys/fs/pseudofs/pseudofs.h Modified: head/sys/fs/pseudofs/pseudofs.h ============================================================================== --- head/sys/fs/pseudofs/pseudofs.h Thu Aug 3 21:30:12 2017 (r322029) +++ head/sys/fs/pseudofs/pseudofs.h Thu Aug 3 21:35:53 2017 (r322030) @@ -50,7 +50,7 @@ struct vnode; /* * Limits and constants */ -#define PFS_NAMELEN 24 +#define PFS_NAMELEN 48 #define PFS_FSNAMELEN 16 /* equal to MFSNAMELEN */ #define PFS_DELEN (offsetof(struct dirent, d_name) + PFS_NAMELEN) From owner-svn-src-head@freebsd.org Thu Aug 3 21:37:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FD80DD4894; Thu, 3 Aug 2017 21:37:58 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CC7D6C1F3; Thu, 3 Aug 2017 21:37:58 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v73LbvJe049729; Thu, 3 Aug 2017 21:37:57 GMT (envelope-from jlh@FreeBSD.org) Received: (from jlh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v73LbvKZ049725; Thu, 3 Aug 2017 21:37:57 GMT (envelope-from jlh@FreeBSD.org) Message-Id: <201708032137.v73LbvKZ049725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jlh set sender to jlh@FreeBSD.org using -f From: Jeremie Le Hen Date: Thu, 3 Aug 2017 21:37:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322031 - in head: usr.bin/ruptime usr.bin/rwho usr.sbin/rwhod X-SVN-Group: head X-SVN-Commit-Author: jlh X-SVN-Commit-Paths: in head: usr.bin/ruptime usr.bin/rwho usr.sbin/rwhod X-SVN-Commit-Revision: 322031 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 21:37:58 -0000 Author: jlh Date: Thu Aug 3 21:37:57 2017 New Revision: 322031 URL: https://svnweb.freebsd.org/changeset/base/322031 Log: Remove deprecation notice for ruptime/rwho/rwhod. PR: 220953 Reported by: peter Modified: head/usr.bin/ruptime/ruptime.1 head/usr.bin/rwho/rwho.1 head/usr.sbin/rwhod/rwhod.8 Modified: head/usr.bin/ruptime/ruptime.1 ============================================================================== --- head/usr.bin/ruptime/ruptime.1 Thu Aug 3 21:35:53 2017 (r322030) +++ head/usr.bin/ruptime/ruptime.1 Thu Aug 3 21:37:57 2017 (r322031) @@ -38,15 +38,6 @@ .Nm .Op Fl alrtu .Op Ar host ... -.Sh DEPRECATION NOTICE -.Nm -is deprecated and will be removed from future versions of the -.Fx -base system. -If -.Nm -is still required, it can be installed from ports or packages -(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: head/usr.bin/rwho/rwho.1 ============================================================================== --- head/usr.bin/rwho/rwho.1 Thu Aug 3 21:35:53 2017 (r322030) +++ head/usr.bin/rwho/rwho.1 Thu Aug 3 21:37:57 2017 (r322031) @@ -37,15 +37,6 @@ .Sh SYNOPSIS .Nm .Op Fl a -.Sh DEPRECATION NOTICE -.Nm -is deprecated and will be removed from future versions of the -.Fx -base system. -If -.Nm -is still required, it can be installed from ports or packages -(net/bsdrcmds). .Sh DESCRIPTION The .Nm Modified: head/usr.sbin/rwhod/rwhod.8 ============================================================================== --- head/usr.sbin/rwhod/rwhod.8 Thu Aug 3 21:35:53 2017 (r322030) +++ head/usr.sbin/rwhod/rwhod.8 Thu Aug 3 21:37:57 2017 (r322031) @@ -40,15 +40,6 @@ .Op Fl p .Op Fl l .Op Fl m Op Ar ttl -.Sh DEPRECATION NOTICE -.Nm -is deprecated and will be removed from future versions of the -.Fx -base system. -If -.Nm -is still required, it can be installed from ports or packages -(net/bsdrcmds). .Sh DESCRIPTION The .Nm From owner-svn-src-head@freebsd.org Thu Aug 3 21:57:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02B01DD5643; Thu, 3 Aug 2017 21:57:44 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D5B176CD13; Thu, 3 Aug 2017 21:57:43 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id 2A66CFBBA; Thu, 3 Aug 2017 21:57:43 +0000 (UTC) From: Jan Beich To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r318780 - in head: include sys/sys References: <201705240925.v4O9PDsZ026682@repo.freebsd.org> Date: Thu, 03 Aug 2017 23:57:39 +0200 In-Reply-To: <201705240925.v4O9PDsZ026682@repo.freebsd.org> (Konstantin Belousov's message of "Wed, 24 May 2017 09:25:13 +0000 (UTC)") Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 21:57:44 -0000 Konstantin Belousov writes: > -#ifndef _POSIX_SOURCE > +#if __BSD_VISIBLE > #define ONLCR 0x00000002 /* map NL to CR-NL (ala CRMOD) */ This caused a regression for apps building with _XOPEN_SOURCE e.g., https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220843 DragonFly uses __XSI_VISIBLE for ONLCR and other XSI extensions. https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/e08b3836c962 http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/termios.h.html From owner-svn-src-head@freebsd.org Thu Aug 3 22:28:32 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 075E5DD6808; Thu, 3 Aug 2017 22:28:32 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D62D76E05E; Thu, 3 Aug 2017 22:28:31 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v73MSUOi070877; Thu, 3 Aug 2017 22:28:30 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v73MSU4L070875; Thu, 3 Aug 2017 22:28:30 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201708032228.v73MSU4L070875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 3 Aug 2017 22:28:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322032 - in head/sys: amd64/include i386/include X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys: amd64/include i386/include X-SVN-Commit-Revision: 322032 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 22:28:32 -0000 Author: cem Date: Thu Aug 3 22:28:30 2017 New Revision: 322032 URL: https://svnweb.freebsd.org/changeset/base/322032 Log: x86: Tag some intrinsics with __pure2 Some C wrappers for x86 instructions do not touch global memory and only act on their arguments; they can be marked __pure2, aka __const__. Without this annotation, Clang 3.9.1 is not intelligent enough on its own to grok that these functions are __const__. Submitted by: Anton Rang Sponsored by: Dell EMC Isilon Modified: head/sys/amd64/include/cpufunc.h head/sys/i386/include/cpufunc.h Modified: head/sys/amd64/include/cpufunc.h ============================================================================== --- head/sys/amd64/include/cpufunc.h Thu Aug 3 21:37:57 2017 (r322031) +++ head/sys/amd64/include/cpufunc.h Thu Aug 3 22:28:30 2017 (r322032) @@ -63,7 +63,7 @@ breakpoint(void) __asm __volatile("int $3"); } -static __inline u_int +static __inline __pure2 u_int bsfl(u_int mask) { u_int result; @@ -72,7 +72,7 @@ bsfl(u_int mask) return (result); } -static __inline u_long +static __inline __pure2 u_long bsfq(u_long mask) { u_long result; @@ -81,7 +81,7 @@ bsfq(u_long mask) return (result); } -static __inline u_int +static __inline __pure2 u_int bsrl(u_int mask) { u_int result; @@ -90,7 +90,7 @@ bsrl(u_int mask) return (result); } -static __inline u_long +static __inline __pure2 u_long bsrq(u_long mask) { u_long result; @@ -155,7 +155,7 @@ enable_intr(void) #define HAVE_INLINE_FFSL -static __inline int +static __inline __pure2 int ffsl(long mask) { return (mask == 0 ? mask : (int)bsfq((u_long)mask) + 1); @@ -163,7 +163,7 @@ ffsl(long mask) #define HAVE_INLINE_FFSLL -static __inline int +static __inline __pure2 int ffsll(long long mask) { return (ffsl((long)mask)); @@ -171,7 +171,7 @@ ffsll(long long mask) #define HAVE_INLINE_FLS -static __inline int +static __inline __pure2 int fls(int mask) { return (mask == 0 ? mask : (int)bsrl((u_int)mask) + 1); @@ -179,7 +179,7 @@ fls(int mask) #define HAVE_INLINE_FLSL -static __inline int +static __inline __pure2 int flsl(long mask) { return (mask == 0 ? mask : (int)bsrq((u_long)mask) + 1); @@ -187,7 +187,7 @@ flsl(long mask) #define HAVE_INLINE_FLSLL -static __inline int +static __inline __pure2 int flsll(long long mask) { return (flsl((long)mask)); Modified: head/sys/i386/include/cpufunc.h ============================================================================== --- head/sys/i386/include/cpufunc.h Thu Aug 3 21:37:57 2017 (r322031) +++ head/sys/i386/include/cpufunc.h Thu Aug 3 22:28:30 2017 (r322032) @@ -60,7 +60,7 @@ breakpoint(void) __asm __volatile("int $3"); } -static __inline u_int +static __inline __pure2 u_int bsfl(u_int mask) { u_int result; @@ -69,7 +69,7 @@ bsfl(u_int mask) return (result); } -static __inline u_int +static __inline __pure2 u_int bsrl(u_int mask) { u_int result; @@ -169,7 +169,7 @@ sfence(void) #define HAVE_INLINE_FFS -static __inline int +static __inline __pure2 int ffs(int mask) { /* @@ -183,7 +183,7 @@ ffs(int mask) #define HAVE_INLINE_FFSL -static __inline int +static __inline __pure2 int ffsl(long mask) { return (ffs((int)mask)); @@ -191,7 +191,7 @@ ffsl(long mask) #define HAVE_INLINE_FLS -static __inline int +static __inline __pure2 int fls(int mask) { return (mask == 0 ? mask : (int)bsrl((u_int)mask) + 1); @@ -199,7 +199,7 @@ fls(int mask) #define HAVE_INLINE_FLSL -static __inline int +static __inline __pure2 int flsl(long mask) { return (fls((int)mask)); From owner-svn-src-head@freebsd.org Thu Aug 3 22:41:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25A3EDAB163; Thu, 3 Aug 2017 22:41:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4B866EB05; Thu, 3 Aug 2017 22:41:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v73MfYAk079945; Thu, 3 Aug 2017 22:41:34 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v73MfY2o079944; Thu, 3 Aug 2017 22:41:34 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201708032241.v73MfY2o079944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 3 Aug 2017 22:41:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322033 - head/usr.bin/procstat X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/usr.bin/procstat X-SVN-Commit-Revision: 322033 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 22:41:36 -0000 Author: markj Date: Thu Aug 3 22:41:34 2017 New Revision: 322033 URL: https://svnweb.freebsd.org/changeset/base/322033 Log: Fix procstat --libxo -L. - Use the title role for column headers. - Fix a typo in a field name (lpwid -> lwpid). - Place the fields of different threads in separate containers. Modified: head/usr.bin/procstat/procstat_ptlwpinfo.c Modified: head/usr.bin/procstat/procstat_ptlwpinfo.c ============================================================================== --- head/usr.bin/procstat/procstat_ptlwpinfo.c Thu Aug 3 22:28:30 2017 (r322032) +++ head/usr.bin/procstat/procstat_ptlwpinfo.c Thu Aug 3 22:41:34 2017 (r322033) @@ -46,13 +46,15 @@ procstat_ptlwpinfo(struct procstat *prstat) return; if (!hflag) - xo_emit("{:/%6s %7s %5s %5s %5s %6s %5s} {[:/%d}{:/%s}{]:}" - " {:/%s}\n", + xo_emit( + "{T:/%6s %7s %5s %5s %5s %6s %5s} {[:/%d}{T:/%s}{]:} {T:/%s}\n", "LWPID", "EVENT", "SIGNO", "CODE", "ERRNO", "PID", "UID", 2 * sizeof(void *) + 2, "ADDR", "TDNAME"); + xo_open_container("threads"); for (i = 0; i < count; i++) { - xo_emit("{:lpwid/%6d} ", pl[i].pl_lwpid); + xo_open_container("thread"); + xo_emit("{:lwpid/%6d} ", pl[i].pl_lwpid); switch (pl[i].pl_event) { case PL_EVENT_NONE: xo_emit("{eq:event/none}{d:event/%7s} ", "none"); @@ -85,7 +87,9 @@ procstat_ptlwpinfo(struct procstat *prstat) 2 * sizeof(void *) + 2, "-"); } xo_emit("{:tdname/%s}\n", pl[i].pl_tdname); + xo_close_container("thread"); } + xo_close_container("threads"); procstat_freeptlwpinfo(prstat, pl); } From owner-svn-src-head@freebsd.org Thu Aug 3 22:42:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B1C4DAB2A9; Thu, 3 Aug 2017 22:42:43 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x230.google.com (mail-pg0-x230.google.com [IPv6:2607:f8b0:400e:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A37E6EDF0; Thu, 3 Aug 2017 22:42:43 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x230.google.com with SMTP id v77so324597pgb.3; Thu, 03 Aug 2017 15:42:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=a/1Jfk+xdTlSIwvTo27xAX1nOEWrsBm9HSwwvYvh/hg=; b=iDv0t4AfCM5DnsmiViw2xh15fovUaDnDMeCVDTuwAV9vfxMoPmgPnP/0hiusK+OJF2 PDUbkVJOH7pjpYKK8OPUB1iRrk4oSj/xesVXYs8DBfYHVMjNztw69UqRCHW2MhU/9LXi C0Egl5n4O7sz2TzFZRdH/jqd3hVQNQVfqPMmLE1CcrUdXfTtrraKs+Lo/dAP1otlU808 RLBAX2/Nf3S3w01tW4NyfnMSF8j/qsZw+BupWqvpLqKKmxreF+xmxZqiHM4j6c0rt2Qa wowBeYj2vQqa2lqMqwTXM3ScwrjclPdQmR8GSpXXslNSJSUkFyBh1y/Sh9tPJ9Mc8HWg MYIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=a/1Jfk+xdTlSIwvTo27xAX1nOEWrsBm9HSwwvYvh/hg=; b=SD1E9i7j5u0/Wi3Hn+Tj6tkHYjexInhxQWc64YQ0aPFPFu3qeyVC5a1XOiTrTLWgmA t9KNN0LhpS84NleBWXIPpVyyQb7JJHgwYLmLayz0zRgrkxKURJykOG4k7VyNJGSu3Fbo qlTkF3kGYSGsG/jBn1aowX9OIpdi8/6zvL1xzvT7UzmOr+V6u+xnGBwUIvM2WN6M800D Sc+l/hZq5B3uPcH2Vhzu0qxndi/UmXktfOkc90Ym/asnTBE1YB6IFZNw+82tNczbBz+b Lfk53g27/TOCRATfTicfA1ateMN7tvUYQrdnI1LlOOaFoICVyNKWN4ObwIhAZqdCKf7e qDlg== X-Gm-Message-State: AIVw113opR5RDrERhN2F9NuB3FQWgVNS4xGEENKws5qF/PHATNVVfc5n IAvYrnHxGLumxkW3ZYo= X-Received: by 10.101.72.207 with SMTP id o15mr317806pgs.73.1501800162367; Thu, 03 Aug 2017 15:42:42 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id q88sm75430pfk.8.2017.08.03.15.42.41 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Aug 2017 15:42:41 -0700 (PDT) Subject: Re: svn commit: r322029 - in head: usr.bin usr.sbin Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_27B38D4D-79EB-4BF3-9D1B-04B2842A9A4F"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201708032130.v73LUC2H045637@repo.freebsd.org> Date: Thu, 3 Aug 2017 15:42:40 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201708032130.v73LUC2H045637@repo.freebsd.org> To: Jeremie Le Hen X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 22:42:43 -0000 --Apple-Mail=_27B38D4D-79EB-4BF3-9D1B-04B2842A9A4F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Aug 3, 2017, at 14:30, Jeremie Le Hen wrote: >=20 > Author: jlh > Date: Thu Aug 3 21:30:12 2017 > New Revision: 322029 > URL: https://svnweb.freebsd.org/changeset/base/322029 >=20 > Log: > rwho/ruptime/rwhod shouldn't be gated by RCMDS. The why in this commit and the next you made (r322031) would = have been incredibly helpful. If bugzilla disappears I only have the = commit history tracking the what. Cheers, -Ngie --Apple-Mail=_27B38D4D-79EB-4BF3-9D1B-04B2842A9A4F Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZg6bgAAoJEPWDqSZpMIYVcogP/18DY/FM8KPLSjUk5jexWFoT AZIjd2pgGVQTeL/0EvyL38RSjjCpmcpc6Cud8iMUvXWS9FlEoG+laQCIDcHpLekO 6O+0KSR8qK9LT0md3eUywSJ3h+mpu4jpsjh63LCsrbp/RwiMRQR8iqX/CroF3uA1 VTOBv+Gw43ZGtaq6caAdsosYoC3bgIPwIOKXhsM2se5dQi/6CspwuzvxSwYroaXp solgFpOmRhf0OKRudoM+d1C6qLwyRZCvgfeRNRA+NrfFjQUkAJP6dJx7gacjgzmk QAYCvRG9E4TkmTuGYIh1NoS13K78Oip44qk8bItUEFPnoqkkaQyWgYt47ySwQq6d nwrAxx8CzEI4sxxyh/MXGfPPH4dyYlSeOiI/nyQx0wKlImPBkfOdmdJbyC9EufW9 Tcc9zRXZ090agjfPsjJ6YaI+qacT5abgmxWMQrfrECklPkS48Ic5H7NxY7IdGaAI TdSk2ggzhwvixgGO15NgOQWGApxeohFffg/IsChxaeAeVUZwej3y7RuDWqvTrn+b JLEL0QTPaknzK+LsQ2fwthlgU5Or18yhsArGf9P8cTmjOj6O0XcONtfUHDNPG73h rffwxVCciDEmZiTqwdj2E0kK7mo61AA+QG4zQ5vAGha5oA+pca9STI1pnKCvXWSB xPKxlVicTd0bNXQGQ83y =2/Wt -----END PGP SIGNATURE----- --Apple-Mail=_27B38D4D-79EB-4BF3-9D1B-04B2842A9A4F-- From owner-svn-src-head@freebsd.org Fri Aug 4 01:28:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EACF4DBCC37; Fri, 4 Aug 2017 01:28:07 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B79DE73AC3; Fri, 4 Aug 2017 01:28:07 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v741S6DM049410; Fri, 4 Aug 2017 01:28:06 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v741S6jd049409; Fri, 4 Aug 2017 01:28:06 GMT (envelope-from np@FreeBSD.org) Message-Id: <201708040128.v741S6jd049409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 4 Aug 2017 01:28:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322034 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 322034 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 01:28:08 -0000 Author: np Date: Fri Aug 4 01:28:06 2017 New Revision: 322034 URL: https://svnweb.freebsd.org/changeset/base/322034 Log: cxgbe(4): Always use the first and not the last virtual interface associated with a port in begin_synchronized_op. MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Aug 3 22:41:34 2017 (r322033) +++ head/sys/dev/cxgbe/t4_main.c Fri Aug 4 01:28:06 2017 (r322034) @@ -9236,12 +9236,13 @@ t4_os_portmod_changed(struct port_info *pi, int old_pt build_medialist(pi, &vi->media); } PORT_UNLOCK(pi); + vi = &pi->vi[0]; if (begin_synchronized_op(pi->adapter, vi, HOLD_LOCK, "t4mod") == 0) { init_l1cfg(pi); end_synchronized_op(pi->adapter, LOCK_HELD); } - ifp = pi->vi[0].ifp; + ifp = vi->ifp; if (pi->mod_type == FW_PORT_MOD_TYPE_NONE) if_printf(ifp, "transceiver unplugged.\n"); else if (pi->mod_type == FW_PORT_MOD_TYPE_UNKNOWN) From owner-svn-src-head@freebsd.org Fri Aug 4 01:52:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4B59DBDF5F; Fri, 4 Aug 2017 01:52:13 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7A699747CE; Fri, 4 Aug 2017 01:52:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id E77823C2246; Fri, 4 Aug 2017 11:35:16 +1000 (AEST) Date: Fri, 4 Aug 2017 11:35:16 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Joerg Sonnenberger cc: Bruce Evans , Ngie Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r321969 - in head/sys/boot: arm/at91/libat91 arm/ixp425/boot2 i386/boot2 In-Reply-To: <20170803124627.GB2734@britannica.bec.de> Message-ID: <20170804111543.V1186@besplex.bde.org> References: <201708030527.v735R5dg041043@repo.freebsd.org> <20170803173421.C2203@besplex.bde.org> <20170803124627.GB2734@britannica.bec.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=VbSHBBh9 c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=nW5l7S2qks2DyJoO6NEA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 01:52:13 -0000 On Thu, 3 Aug 2017, Joerg Sonnenberger wrote: > On Thu, Aug 03, 2017 at 05:53:43PM +1000, Bruce Evans wrote: >> Freestanding versions (static and otherwise) cause problems with builtins. >> -ffreestanding turns off all builtins. The static memcpy used to be >> ifdefed so as to use __builtin_memcpy instead of the static one if the >> compiler is gcc. That apparently broke with gcc-4.2, since the builtin >> will call libc memcpy() in some cases, although memcpy() is unavailable >> in the freestanding case. > > GCC always had a requirement that freestanding environment must provide > certain functions (memcpy, memmove, memset, memcmp). At least memcpy and > memset are regulary used for certain code constructs. While most calls > will be inlined, it is not required. I had forgotten about that bug. boot2 doesn't have many fancy code constructs, but it might have struct copying and gcc uses memcpy for copying large structs. clang-4.0 has the same bug. Testing showed 1 bug nearby: for newer CPUs, it generates large code with several movups's for small struct copies. The bug is that -Os doesn't turn this off. But boot2 uses -march=i386 which does turn this off. For not so new CPUs like core2 where movups is slower than movaps but movaps is unusable because the structs might not be aligned, it normally generates large code with moves through integer registers, but -Os works to turn this off. The change for gcc-4.2 was apparently to support this. The static memcpy is not quite compatible, but is close enough and you can check this in the generated code. The problem is that it should be re-checked for every change in the source code and compiler. Bruce From owner-svn-src-head@freebsd.org Fri Aug 4 03:20:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8AAADC1AB9; Fri, 4 Aug 2017 03:20:02 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A62CE76BBC; Fri, 4 Aug 2017 03:20:02 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v743K1Z1094702; Fri, 4 Aug 2017 03:20:01 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v743K1WG094701; Fri, 4 Aug 2017 03:20:01 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201708040320.v743K1WG094701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 4 Aug 2017 03:20:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322035 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 322035 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 03:20:03 -0000 Author: alc Date: Fri Aug 4 03:20:01 2017 New Revision: 322035 URL: https://svnweb.freebsd.org/changeset/base/322035 Log: Add myself. Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Fri Aug 4 01:28:06 2017 (r322034) +++ head/usr.bin/calendar/calendars/calendar.freebsd Fri Aug 4 03:20:01 2017 (r322035) @@ -423,6 +423,7 @@ 12/19 Stephen Hurd born in Estevan, Saskatchewan, Canada, 1975 12/19 Emmanuel Vadot born in Decines-Charpieu, France, 1983 12/21 Rong-En Fan born in Taipei, Taiwan, Republic of China, 1982 +12/22 Alan L. Cox born in Warren, Ohio, United States, 1964 12/22 Maxim Sobolev born in Dnepropetrovsk, Ukraine, 1976 12/23 Sean Chittenden born in Seattle, Washington, United States, 1979 12/23 Alejandro Pulver born in Buenos Aires, Argentina, 1989 From owner-svn-src-head@freebsd.org Fri Aug 4 03:40:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 767FCDC2885; Fri, 4 Aug 2017 03:40:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44D0677512; Fri, 4 Aug 2017 03:40:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v743e2JY002588; Fri, 4 Aug 2017 03:40:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v743e1h5002582; Fri, 4 Aug 2017 03:40:01 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201708040340.v743e1h5002582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 4 Aug 2017 03:40:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322036 - in head/sys: conf dev/nvd dev/nvme X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: conf dev/nvd dev/nvme X-SVN-Commit-Revision: 322036 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 03:40:03 -0000 Author: imp Date: Fri Aug 4 03:40:01 2017 New Revision: 322036 URL: https://svnweb.freebsd.org/changeset/base/322036 Log: Make nvd vs nda choice boot-time rather than build-time Introduce hw.nvme.use_nvd tunable. This tunable allows both nvd and nda to be installed in the kernel, while allowing only one of them to create devices. This is an all-or-nothing setting, and you can't change it after boot-time. However, it will allow easier A/B testing. Differential Revision: https://reviews.freebsd.org/D11825 Modified: head/sys/conf/files head/sys/conf/files.amd64 head/sys/dev/nvd/nvd.c head/sys/dev/nvme/nvme.h head/sys/dev/nvme/nvme_sim.c head/sys/dev/nvme/nvme_sysctl.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Aug 4 03:20:01 2017 (r322035) +++ head/sys/conf/files Fri Aug 4 03:40:01 2017 (r322036) @@ -86,9 +86,9 @@ cam/cam_xpt.c optional scbus cam/ata/ata_all.c optional scbus cam/ata/ata_xpt.c optional scbus cam/ata/ata_pmp.c optional scbus -cam/nvme/nvme_all.c optional scbus nvme !nvd -cam/nvme/nvme_da.c optional scbus nvme da !nvd -cam/nvme/nvme_xpt.c optional scbus nvme !nvd +cam/nvme/nvme_all.c optional scbus nvme +cam/nvme/nvme_da.c optional scbus nvme da +cam/nvme/nvme_xpt.c optional scbus nvme cam/scsi/scsi_xpt.c optional scbus cam/scsi/scsi_all.c optional scbus cam/scsi/scsi_cd.c optional cd Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Fri Aug 4 03:20:01 2017 (r322035) +++ head/sys/conf/files.amd64 Fri Aug 4 03:40:01 2017 (r322036) @@ -341,7 +341,7 @@ dev/nvme/nvme_ctrlr_cmd.c optional nvme dev/nvme/nvme_ns.c optional nvme dev/nvme/nvme_ns_cmd.c optional nvme dev/nvme/nvme_qpair.c optional nvme -dev/nvme/nvme_sim.c optional nvme scbus !nvd +dev/nvme/nvme_sim.c optional nvme scbus dev/nvme/nvme_sysctl.c optional nvme dev/nvme/nvme_test.c optional nvme dev/nvme/nvme_util.c optional nvme Modified: head/sys/dev/nvd/nvd.c ============================================================================== --- head/sys/dev/nvd/nvd.c Fri Aug 4 03:20:01 2017 (r322035) +++ head/sys/dev/nvd/nvd.c Fri Aug 4 03:40:01 2017 (r322036) @@ -134,6 +134,8 @@ MODULE_DEPEND(nvd, nvme, 1, 1, 1); static int nvd_load() { + if (!nvme_use_nvd) + return 0; TAILQ_INIT(&ctrlr_head); TAILQ_INIT(&disk_head); @@ -149,6 +151,9 @@ nvd_unload() { struct nvd_controller *ctrlr; struct nvd_disk *disk; + + if (!nvme_use_nvd) + return; while (!TAILQ_EMPTY(&ctrlr_head)) { ctrlr = TAILQ_FIRST(&ctrlr_head); Modified: head/sys/dev/nvme/nvme.h ============================================================================== --- head/sys/dev/nvme/nvme.h Fri Aug 4 03:20:01 2017 (r322035) +++ head/sys/dev/nvme/nvme.h Fri Aug 4 03:40:01 2017 (r322036) @@ -1003,6 +1003,8 @@ void nvme_ns_trim_cmd(struct nvme_command *cmd, uint16 cmd->cdw11 = NVME_DSM_ATTR_DEALLOCATE; } +extern int nvme_use_nvd; + #endif /* _KERNEL */ #endif /* __NVME_H__ */ Modified: head/sys/dev/nvme/nvme_sim.c ============================================================================== --- head/sys/dev/nvme/nvme_sim.c Fri Aug 4 03:20:01 2017 (r322035) +++ head/sys/dev/nvme/nvme_sim.c Fri Aug 4 03:40:01 2017 (r322036) @@ -371,6 +371,8 @@ struct nvme_consumer *consumer_cookie; static void nvme_sim_init(void) { + if (nvme_use_nvd) + return; consumer_cookie = nvme_register_consumer(nvme_sim_new_ns, nvme_sim_new_controller, NULL, nvme_sim_controller_fail); @@ -382,6 +384,8 @@ SYSINIT(nvme_sim_register, SI_SUB_DRIVERS, SI_ORDER_AN static void nvme_sim_uninit(void) { + if (nvme_use_nvd) + return; /* XXX Cleanup */ nvme_unregister_consumer(consumer_cookie); Modified: head/sys/dev/nvme/nvme_sysctl.c ============================================================================== --- head/sys/dev/nvme/nvme_sysctl.c Fri Aug 4 03:20:01 2017 (r322035) +++ head/sys/dev/nvme/nvme_sysctl.c Fri Aug 4 03:40:01 2017 (r322036) @@ -33,6 +33,12 @@ __FBSDID("$FreeBSD$"); #include "nvme_private.h" +int nvme_use_nvd = 1; + +SYSCTL_NODE(_hw, OID_AUTO, nvme, CTLFLAG_RD, 0, "NVMe sysctl tunables"); +SYSCTL_INT(_hw_nvme, OID_AUTO, use_nvd, CTLFLAG_RDTUN, + &nvme_use_nvd, 1, "1 = Create NVD devices, 0 = Create NDA devices"); + /* * CTLTYPE_S64 and sysctl_handle_64 were added in r217616. Define these * explicitly here for older kernels that don't include the r217616 From owner-svn-src-head@freebsd.org Fri Aug 4 03:48:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53D28DC2E77; Fri, 4 Aug 2017 03:48:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15D19779C9; Fri, 4 Aug 2017 03:48:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v743mHOQ006543; Fri, 4 Aug 2017 03:48:17 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v743mHaR006542; Fri, 4 Aug 2017 03:48:17 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201708040348.v743mHaR006542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 4 Aug 2017 03:48:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322037 - head/lib/libstand X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/lib/libstand X-SVN-Commit-Revision: 322037 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 03:48:18 -0000 Author: imp Date: Fri Aug 4 03:48:17 2017 New Revision: 322037 URL: https://svnweb.freebsd.org/changeset/base/322037 Log: Add stpcpy and stpncpy to libstand This adds the stpcpy and stpncpy functions to libstand. Differential Revision: https://reviews.freebsd.org/D11844 Modified: head/lib/libstand/Makefile Modified: head/lib/libstand/Makefile ============================================================================== --- head/lib/libstand/Makefile Fri Aug 4 03:40:01 2017 (r322036) +++ head/lib/libstand/Makefile Fri Aug 4 03:48:17 2017 (r322037) @@ -41,7 +41,7 @@ SRCS+= ntoh.c .PATH: ${LIBC_SRC}/string SRCS+= bcmp.c bcopy.c bzero.c ffs.c fls.c \ memccpy.c memchr.c memcmp.c memcpy.c memmove.c memset.c \ - qdivrem.c strcat.c strchr.c strcmp.c strcpy.c \ + qdivrem.c strcat.c strchr.c strcmp.c strcpy.c stpcpy.c stpncpy.c \ strcspn.c strlcat.c strlcpy.c strlen.c strncat.c strncmp.c strncpy.c \ strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c .if ${MACHINE_CPUARCH} == "arm" From owner-svn-src-head@freebsd.org Fri Aug 4 04:16:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B4E7DC439C; Fri, 4 Aug 2017 04:16:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 660A07C9D2; Fri, 4 Aug 2017 04:16:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v744Ggl9018792; Fri, 4 Aug 2017 04:16:42 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v744GgFO018787; Fri, 4 Aug 2017 04:16:42 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201708040416.v744GgFO018787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 4 Aug 2017 04:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322038 - in head/sys/boot/efi: include libefi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/boot/efi: include libefi X-SVN-Commit-Revision: 322038 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 04:16:43 -0000 Author: imp Date: Fri Aug 4 04:16:41 2017 New Revision: 322038 URL: https://svnweb.freebsd.org/changeset/base/322038 Log: Add definitions and utilities for EFI drivers This patch adds definitions and utility code for creating EFI drivers using the EFI_DRIVER_BINDING_PROTOCOL. Submitted by: Eric McCorkle Differential Revision: https://reviews.freebsd.org/D11852 Added: head/sys/boot/efi/include/efi_driver_utils.h (contents, props changed) head/sys/boot/efi/include/efi_drivers.h (contents, props changed) head/sys/boot/efi/libefi/efi_driver_utils.c (contents, props changed) Modified: head/sys/boot/efi/include/efiprot.h head/sys/boot/efi/libefi/Makefile Added: head/sys/boot/efi/include/efi_driver_utils.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/include/efi_driver_utils.h Fri Aug 4 04:16:41 2017 (r322038) @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2017 Eric McCorkle + * 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 _EFI_DRIVER_UTILS_H_ +#define _EFI_DRIVER_UTILS_H_ + +#include +#include + +extern EFI_STATUS install_driver(EFI_DRIVER_BINDING *driver); +extern EFI_STATUS connect_controllers(EFI_GUID *filter); + +#endif Added: head/sys/boot/efi/include/efi_drivers.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/include/efi_drivers.h Fri Aug 4 04:16:41 2017 (r322038) @@ -0,0 +1,45 @@ +/*- + * Copyright (c) 2016 Eric McCorkle + * 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 _EFI_DRIVERS_H_ +#define _EFI_DRIVERS_H_ + +#include + +typedef struct efi_driver_t { + const char *name; + void (*init)(void); +} efi_driver_t; + +extern struct devsw efipart_dev; +extern int efipart_getdesc(struct devdesc *dev, char **out); + +/* EFI drivers. */ +extern const efi_driver_t fs_driver; + +#endif Modified: head/sys/boot/efi/include/efiprot.h ============================================================================== --- head/sys/boot/efi/include/efiprot.h Fri Aug 4 03:48:17 2017 (r322037) +++ head/sys/boot/efi/include/efiprot.h Fri Aug 4 04:16:41 2017 (r322038) @@ -27,6 +27,8 @@ Revision History --*/ +#include + // // Device Path protocol // @@ -554,5 +556,81 @@ typedef struct _EFI_UNICODE_COLLATION_INTERFACE { CHAR8 *SupportedLanguages; } EFI_UNICODE_COLLATION_INTERFACE; + +// +// Driver Binding protocol +// + +#define DRIVER_BINDING_PROTOCOL \ + { 0x18a031ab, 0xb443, 0x4d1a, {0xa5, 0xc0, 0x0c, 0x09, 0x26, 0x1e, 0x9f, 0x71} } + +INTERFACE_DECL(_EFI_DRIVER_BINDING); + +typedef +EFI_STATUS +(EFIAPI *EFI_DRIVER_BINDING_SUPPORTED) ( + IN struct _EFI_DRIVER_BINDING *This, + IN EFI_HANDLE ControllerHandle, + IN EFI_DEVICE_PATH *RemainingPath + ); + +typedef +EFI_STATUS +(EFIAPI *EFI_DRIVER_BINDING_START) ( + IN struct _EFI_DRIVER_BINDING *This, + IN EFI_HANDLE ControllerHandle, + IN EFI_DEVICE_PATH *RemainingPath + ); + +typedef +EFI_STATUS +(EFIAPI *EFI_DRIVER_BINDING_STOP) ( + IN struct _EFI_DRIVER_BINDING *This, + IN EFI_HANDLE ControllerHandle, + IN UINTN NumberOfChildren, + IN EFI_HANDLE *ChildHandleBuffer + ); + +typedef struct _EFI_DRIVER_BINDING { + EFI_DRIVER_BINDING_SUPPORTED Supported; + EFI_DRIVER_BINDING_START Start; + EFI_DRIVER_BINDING_STOP Stop; + UINT32 Version; + EFI_HANDLE ImageHandle; + EFI_HANDLE DriverBindingHandle; +} EFI_DRIVER_BINDING; + +// +// Component Name Protocol 2 +// + +#define COMPONENT_NAME2_PROTOCOL \ + { 0x6a7a5cff, 0xe8d9, 0x4f70, {0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14 } } + +INTERFACE_DECL(_EFI_COMPONENT_NAME2); + +typedef +EFI_STATUS +(EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME) ( + IN struct _EFI_COMPONENT_NAME2 *This, + IN CHAR8 * Language, + OUT CHAR16 **DriverName + ); + +typedef +EFI_STATUS +(EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME) ( + IN struct _EFI_COMPONENT_NAME2 *This, + IN EFI_HANDLE ControllerHandle, + IN EFI_HANDLE ChildHandle OPTIONAL, + IN CHAR8 *Language, + OUT CHAR16 **ControllerName + ); + +typedef struct _EFI_COMPONENT_NAME2 { + EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName; + EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName; + CHAR8 **SupportedLanguages; +} EFI_COMPONENT_NAME2; #endif Modified: head/sys/boot/efi/libefi/Makefile ============================================================================== --- head/sys/boot/efi/libefi/Makefile Fri Aug 4 03:48:17 2017 (r322037) +++ head/sys/boot/efi/libefi/Makefile Fri Aug 4 04:16:41 2017 (r322038) @@ -12,7 +12,7 @@ INTERNALLIB= WARNS?= 2 SRCS= delay.c devpath.c efi_console.c efinet.c efipart.c env.c errno.c \ - handles.c wchar.c libefi.c + handles.c wchar.c libefi.c efi_driver_utils.c .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" SRCS+= time.c Added: head/sys/boot/efi/libefi/efi_driver_utils.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/libefi/efi_driver_utils.c Fri Aug 4 04:16:41 2017 (r322038) @@ -0,0 +1,91 @@ +/*- + * Copyright (c) 2017 Eric McCorkle + * 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 "efi_driver_utils.h" + +static EFI_GUID DriverBindingProtocolGUID = DRIVER_BINDING_PROTOCOL; + +EFI_STATUS +connect_controllers(EFI_GUID *filter) +{ + EFI_STATUS status; + EFI_HANDLE *handles; + UINTN nhandles, i, hsize; + + nhandles = 0; + hsize = 0; + status = BS->LocateHandle(ByProtocol, filter, NULL, + &hsize, NULL); + + if(status != EFI_BUFFER_TOO_SMALL) { + return (status); + } + + handles = malloc(hsize); + nhandles = hsize / sizeof(EFI_HANDLE); + + status = BS->LocateHandle(ByProtocol, filter, NULL, + &hsize, handles); + + if(EFI_ERROR(status)) { + return (status); + } + + for(i = 0; i < nhandles; i++) { + BS->ConnectController(handles[i], NULL, NULL, true); + } + + free(handles); + + return (status); +} + +EFI_STATUS +install_driver(EFI_DRIVER_BINDING *driver) +{ + EFI_STATUS status; + + driver->ImageHandle = IH; + driver->DriverBindingHandle = NULL; + status = BS->InstallMultipleProtocolInterfaces( + &(driver->DriverBindingHandle), + &DriverBindingProtocolGUID, driver, + NULL); + + if (EFI_ERROR(status)) { + printf("Failed to install driver (%ld)!\n", + EFI_ERROR_CODE(status)); + } + + return (status); +} From owner-svn-src-head@freebsd.org Fri Aug 4 04:20:08 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E7F8DC4712; Fri, 4 Aug 2017 04:20:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7D0B7CBC5; Fri, 4 Aug 2017 04:20:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v744K7tA018986; Fri, 4 Aug 2017 04:20:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v744K60R018982; Fri, 4 Aug 2017 04:20:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201708040420.v744K60R018982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 4 Aug 2017 04:20:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322039 - in head/sys/boot/efi: include libefi loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/boot/efi: include libefi loader X-SVN-Commit-Revision: 322039 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 04:20:08 -0000 Author: imp Date: Fri Aug 4 04:20:06 2017 New Revision: 322039 URL: https://svnweb.freebsd.org/changeset/base/322039 Log: Move EFI ZFS functions to libefi This patch moves some EFI ZFS functions from loader to libefi, allowing them to be used by anything that links against libefi. Submitted by: Eric McCorkle Differential Revision: https://reviews.freebsd.org/D11855 Added: head/sys/boot/efi/include/efizfs.h (contents, props changed) head/sys/boot/efi/libefi/efizfs.c (contents, props changed) Modified: head/sys/boot/efi/libefi/Makefile head/sys/boot/efi/loader/main.c Added: head/sys/boot/efi/include/efizfs.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/include/efizfs.h Fri Aug 4 04:20:06 2017 (r322039) @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2016 Eric McCorkle + * 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 + +#ifndef _EFIZFS_H_ +#define _EFIZFS_H_ + +#ifdef EFI_ZFS_BOOT +typedef STAILQ_HEAD(zfsinfo_list, zfsinfo) zfsinfo_list_t; + +typedef struct zfsinfo +{ + STAILQ_ENTRY(zfsinfo) zi_link; + EFI_HANDLE zi_handle; + uint64_t zi_pool_guid; +} zfsinfo_t; + +extern uint64_t pool_guid; + +extern void efi_zfs_probe(void); +extern zfsinfo_list_t *efizfs_get_zfsinfo_list(void); + +#endif + +#endif Modified: head/sys/boot/efi/libefi/Makefile ============================================================================== --- head/sys/boot/efi/libefi/Makefile Fri Aug 4 04:16:41 2017 (r322038) +++ head/sys/boot/efi/libefi/Makefile Fri Aug 4 04:20:06 2017 (r322039) @@ -12,7 +12,7 @@ INTERNALLIB= WARNS?= 2 SRCS= delay.c devpath.c efi_console.c efinet.c efipart.c env.c errno.c \ - handles.c wchar.c libefi.c efi_driver_utils.c + handles.c wchar.c libefi.c efi_driver_utils.c efizfs.c .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" SRCS+= time.c @@ -38,6 +38,12 @@ CFLAGS+= -fPIC -mno-red-zone CFLAGS+= -I${.CURDIR}/../include CFLAGS+= -I${.CURDIR}/../include/${MACHINE} CFLAGS+= -I${.CURDIR}/../../../../lib/libstand +.if ${MK_ZFS} != "no" +CFLAGS+= -I${.CURDIR}/../../zfs +CFLAGS+= -I${.CURDIR}/../../../cddl/boot/zfs +CFLAGS+= -I${.CURDIR}/../../../crypto/skein +CFLAGS+= -DEFI_ZFS_BOOT +.endif # Pick up the bootstrap header for some interface items CFLAGS+= -I${.CURDIR}/../../common Added: head/sys/boot/efi/libefi/efizfs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/libefi/efizfs.c Fri Aug 4 04:20:06 2017 (r322039) @@ -0,0 +1,112 @@ +/*- + * Copyright (c) 2008-2010 Rui Paulo + * Copyright (c) 2006 Marcel Moolenaar + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#ifdef EFI_ZFS_BOOT +#include +#endif + +#include +#include + +#include "efizfs.h" + +#ifdef EFI_ZFS_BOOT +static zfsinfo_list_t zfsinfo; + +uint64_t pool_guid; + +zfsinfo_list_t * +efizfs_get_zfsinfo_list(void) +{ + return (&zfsinfo); +} + +static void +insert_zfs(EFI_HANDLE handle, uint64_t guid) +{ + zfsinfo_t *zi; + + zi = malloc(sizeof(zfsinfo_t)); + zi->zi_handle = handle; + zi->zi_pool_guid = guid; + STAILQ_INSERT_TAIL(&zfsinfo, zi, zi_link); +} + +void +efi_zfs_probe(void) +{ + pdinfo_list_t *hdi; + pdinfo_t *hd, *pd = NULL; + EFI_GUID imgid = LOADED_IMAGE_PROTOCOL; + EFI_LOADED_IMAGE *img; + char devname[SPECNAMELEN + 1]; + uint64_t guid; + + BS->HandleProtocol(IH, &imgid, (VOID**)&img); + hdi = efiblk_get_pdinfo_list(&efipart_hddev); + STAILQ_INIT(&zfsinfo); + + /* + * Find the handle for the boot device. The boot1 did find the + * device with loader binary, now we need to search for the + * same device and if it is part of the zfs pool, we record the + * pool GUID for currdev setup. + */ + STAILQ_FOREACH(hd, hdi, pd_link) { + STAILQ_FOREACH(pd, &hd->pd_part, pd_link) { + + snprintf(devname, sizeof(devname), "%s%dp%d:", + efipart_hddev.dv_name, hd->pd_unit, pd->pd_unit); + + if (zfs_probe_dev(devname, &guid) == 0) { + insert_zfs(pd->pd_handle, guid); + + if (pd->pd_handle == img->DeviceHandle) + pool_guid = guid; + } + + } + } +} + +uint64_t +ldi_get_size(void *priv) +{ + int fd = (uintptr_t) priv; + uint64_t size; + + ioctl(fd, DIOCGMEDIASIZE, &size); + return (size); +} +#endif Modified: head/sys/boot/efi/loader/main.c ============================================================================== --- head/sys/boot/efi/loader/main.c Fri Aug 4 04:16:41 2017 (r322038) +++ head/sys/boot/efi/loader/main.c Fri Aug 4 04:20:06 2017 (r322039) @@ -48,6 +48,8 @@ __FBSDID("$FreeBSD$"); #ifdef EFI_ZFS_BOOT #include + +#include "efizfs.h" #endif #include "loader_efi.h" @@ -70,11 +72,6 @@ EFI_GUID debugimg = DEBUG_IMAGE_INFO_TABLE_GUID; EFI_GUID fdtdtb = FDT_TABLE_GUID; EFI_GUID inputid = SIMPLE_TEXT_INPUT_PROTOCOL; -#ifdef EFI_ZFS_BOOT -static void efi_zfs_probe(void); -static uint64_t pool_guid; -#endif - static int has_keyboard(void) { @@ -83,7 +80,7 @@ has_keyboard(void) EFI_HANDLE *hin, *hin_end, *walker; UINTN sz; int retval = 0; - + /* * Find all the handles that support the SIMPLE_TEXT_INPUT_PROTOCOL and * do the typical dance to get the right sized buffer. @@ -140,7 +137,7 @@ has_keyboard(void) } else if (DevicePathType(path) == MESSAGING_DEVICE_PATH && DevicePathSubType(path) == MSG_USB_CLASS_DP) { USB_CLASS_DEVICE_PATH *usb; - + usb = (USB_CLASS_DEVICE_PATH *)(void *)path; if (usb->DeviceClass == 3 && /* HID */ usb->DeviceSubClass == 1 && /* Boot devices */ @@ -892,46 +889,3 @@ command_chain(int argc, char *argv[]) } COMMAND_SET(chain, "chain", "chain load file", command_chain); - -#ifdef EFI_ZFS_BOOT -static void -efi_zfs_probe(void) -{ - pdinfo_list_t *hdi; - pdinfo_t *hd, *pd = NULL; - EFI_GUID imgid = LOADED_IMAGE_PROTOCOL; - EFI_LOADED_IMAGE *img; - char devname[SPECNAMELEN + 1]; - - BS->HandleProtocol(IH, &imgid, (VOID**)&img); - hdi = efiblk_get_pdinfo_list(&efipart_hddev); - - /* - * Find the handle for the boot device. The boot1 did find the - * device with loader binary, now we need to search for the - * same device and if it is part of the zfs pool, we record the - * pool GUID for currdev setup. - */ - STAILQ_FOREACH(hd, hdi, pd_link) { - STAILQ_FOREACH(pd, &hd->pd_part, pd_link) { - - snprintf(devname, sizeof(devname), "%s%dp%d:", - efipart_hddev.dv_name, hd->pd_unit, pd->pd_unit); - if (pd->pd_handle == img->DeviceHandle) - (void) zfs_probe_dev(devname, &pool_guid); - else - (void) zfs_probe_dev(devname, NULL); - } - } -} - -uint64_t -ldi_get_size(void *priv) -{ - int fd = (uintptr_t) priv; - uint64_t size; - - ioctl(fd, DIOCGMEDIASIZE, &size); - return (size); -} -#endif From owner-svn-src-head@freebsd.org Fri Aug 4 04:20:13 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57418DC473C; Fri, 4 Aug 2017 04:20:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FB727CBD9; Fri, 4 Aug 2017 04:20:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v744KCjr019039; Fri, 4 Aug 2017 04:20:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v744KCJL019036; Fri, 4 Aug 2017 04:20:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201708040420.v744KCJL019036@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 4 Aug 2017 04:20:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322040 - in head/sys/boot/efi: include libefi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/boot/efi: include libefi X-SVN-Commit-Revision: 322040 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 04:20:13 -0000 Author: imp Date: Fri Aug 4 04:20:11 2017 New Revision: 322040 URL: https://svnweb.freebsd.org/changeset/base/322040 Log: Add EFI utility functions to libefi This patch adds additional EFI utility functions to convert errno values to EFI_STATUS errors, as well as EFI times to UNIX times. Submitted by: Eric McCorkle Differential Revision: https://reviews.freebsd.org/D11858 Modified: head/sys/boot/efi/include/efilib.h head/sys/boot/efi/libefi/errno.c head/sys/boot/efi/libefi/time.c Modified: head/sys/boot/efi/include/efilib.h ============================================================================== --- head/sys/boot/efi/include/efilib.h Fri Aug 4 04:20:06 2017 (r322039) +++ head/sys/boot/efi/include/efilib.h Fri Aug 4 04:20:11 2017 (r322040) @@ -79,6 +79,7 @@ CHAR16 *efi_devpath_name(EFI_DEVICE_PATH *); void efi_free_devpath_name(CHAR16 *); int efi_status_to_errno(EFI_STATUS); +EFI_STATUS errno_to_efi_status(int errno); void efi_time_init(void); void efi_time_fini(void); Modified: head/sys/boot/efi/libefi/errno.c ============================================================================== --- head/sys/boot/efi/libefi/errno.c Fri Aug 4 04:20:06 2017 (r322039) +++ head/sys/boot/efi/libefi/errno.c Fri Aug 4 04:20:11 2017 (r322040) @@ -30,6 +30,69 @@ __FBSDID("$FreeBSD$"); #include #include +EFI_STATUS +errno_to_efi_status(int errno) +{ + EFI_STATUS status; + + switch (errno) { + case EPERM: + status = EFI_ACCESS_DENIED; + break; + + case EOVERFLOW: + status = EFI_BUFFER_TOO_SMALL; + break; + + case EIO: + status = EFI_DEVICE_ERROR; + break; + + case EINVAL: + status = EFI_INVALID_PARAMETER; + break; + + case ESTALE: + status = EFI_MEDIA_CHANGED; + break; + + case ENXIO: + status = EFI_NO_MEDIA; + break; + + case ENOENT: + status = EFI_NOT_FOUND; + break; + + case ENOMEM: + status = EFI_OUT_OF_RESOURCES; + break; + + case ENOTSUP: + case ENODEV: + status = EFI_UNSUPPORTED; + break; + + case ENOSPC: + status = EFI_VOLUME_FULL; + break; + + case EACCES: + status = EFI_WRITE_PROTECTED; + break; + + case 0: + status = EFI_SUCCESS; + break; + + default: + status = EFI_DEVICE_ERROR; + break; + } + + return (status); +} + int efi_status_to_errno(EFI_STATUS status) { Modified: head/sys/boot/efi/libefi/time.c ============================================================================== --- head/sys/boot/efi/libefi/time.c Fri Aug 4 04:20:06 2017 (r322039) +++ head/sys/boot/efi/libefi/time.c Fri Aug 4 04:20:11 2017 (r322040) @@ -58,6 +58,41 @@ __FBSDID("$FreeBSD$"); #define SECSPERHOUR ( 60*60 ) #define SECSPERDAY (24 * SECSPERHOUR) +/* +// These arrays give the cumulative number of days up to the first of the +// month number used as the index (1 -> 12) for regular and leap years. +// The value at index 13 is for the whole year. +*/ +static const time_t CumulativeDays[2][14] = { + {0, + 0, + 31, + 31 + 28, + 31 + 28 + 31, + 31 + 28 + 31 + 30, + 31 + 28 + 31 + 30 + 31, + 31 + 28 + 31 + 30 + 31 + 30, + 31 + 28 + 31 + 30 + 31 + 30 + 31, + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31, + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30, + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31, + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30, + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31 }, + {0, + 0, + 31, + 31 + 29, + 31 + 29 + 31, + 31 + 29 + 31 + 30, + 31 + 29 + 31 + 30 + 31, + 31 + 29 + 31 + 30 + 31 + 30, + 31 + 29 + 31 + 30 + 31 + 30 + 31, + 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31, + 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30, + 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31, + 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30, + 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31 }}; + void efi_time_init(void) { @@ -68,45 +103,46 @@ efi_time_fini(void) { } -static time_t -efi_time(EFI_TIME *ETime) +void +to_efi_time(EFI_TIME *efi_time, time_t time) { - /* - // These arrays give the cumulative number of days up to the first of the - // month number used as the index (1 -> 12) for regular and leap years. - // The value at index 13 is for the whole year. - */ - static time_t CumulativeDays[2][14] = { - {0, - 0, - 31, - 31 + 28, - 31 + 28 + 31, - 31 + 28 + 31 + 30, - 31 + 28 + 31 + 30 + 31, - 31 + 28 + 31 + 30 + 31 + 30, - 31 + 28 + 31 + 30 + 31 + 30 + 31, - 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31, - 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30, - 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31, - 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30, - 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31 }, - {0, - 0, - 31, - 31 + 29, - 31 + 29 + 31, - 31 + 29 + 31 + 30, - 31 + 29 + 31 + 30 + 31, - 31 + 29 + 31 + 30 + 31 + 30, - 31 + 29 + 31 + 30 + 31 + 30 + 31, - 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31, - 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30, - 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31, - 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30, - 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31 }}; + if (time >= 0) { + for (efi_time->Year = 1970; + time > CumulativeDays[isleap(efi_time->Year)][13] * SECSPERDAY; + time -= CumulativeDays[isleap(efi_time->Year)][13] * SECSPERDAY, + efi_time->Year++); - time_t UTime; + for (efi_time->Month = 0; + time > CumulativeDays[isleap(efi_time->Year)][efi_time->Month] * + SECSPERDAY; + efi_time->Month++); + + time -= CumulativeDays[isleap(efi_time->Year)][efi_time->Month - 1] * + SECSPERDAY; + + for (efi_time->Day = 0; time > SECSPERDAY; + time -= SECSPERDAY, efi_time->Day++); + + for (efi_time->Hour = 0; time > SECSPERHOUR; + time -= SECSPERHOUR, efi_time->Hour++); + + for (efi_time->Minute = 0; time > 60; + time -= 60, efi_time->Minute++); + + efi_time->Second = time; + efi_time->Nanosecond = 0; + efi_time->TimeZone = 0; + efi_time->Daylight = 0; + } else { + memset(efi_time, 0, sizeof(EFI_TIME)); + } +} + +time_t +from_efi_time(EFI_TIME *ETime) +{ + + time_t UTime; int Year; /* @@ -196,7 +232,7 @@ EFI_GetTimeOfDay( // Convert to UNIX time (ie seconds since the epoch */ - tp->tv_sec = efi_time( &EfiTime ); + tp->tv_sec = from_efi_time( &EfiTime ); tp->tv_usec = 0; /* EfiTime.Nanosecond * 1000; */ /* From owner-svn-src-head@freebsd.org Fri Aug 4 04:23:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E321DC4ACD; Fri, 4 Aug 2017 04:23:25 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE2937D0D5; Fri, 4 Aug 2017 04:23:24 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v744NOn8023000; Fri, 4 Aug 2017 04:23:24 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v744NOix022999; Fri, 4 Aug 2017 04:23:24 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201708040423.v744NOix022999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 4 Aug 2017 04:23:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322041 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 322041 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 04:23:25 -0000 Author: alc Date: Fri Aug 4 04:23:23 2017 New Revision: 322041 URL: https://svnweb.freebsd.org/changeset/base/322041 Log: In case readers are misled by expressions that combine multiplication and division, add parentheses to make the precedence explicit. Submitted by: Doug Moore Requested by: imp Reviewed by: imp MFC after: 1 week X-MFC after: r321840 Differential Revision: https://reviews.freebsd.org/D11815 Modified: head/sys/kern/subr_blist.c Modified: head/sys/kern/subr_blist.c ============================================================================== --- head/sys/kern/subr_blist.c Fri Aug 4 04:20:11 2017 (r322040) +++ head/sys/kern/subr_blist.c Fri Aug 4 04:23:23 2017 (r322041) @@ -110,6 +110,7 @@ __FBSDID("$FreeBSD$"); #define bitcount64(x) __bitcount64((uint64_t)(x)) #define malloc(a,b,c) calloc(a, 1) #define free(a,b) free(a) +#define CTASSERT(expr) #include @@ -142,6 +143,8 @@ static void blst_radix_print(blmeta_t *scan, daddr_t b static MALLOC_DEFINE(M_SWAP, "SWAP", "Swap space"); #endif +CTASSERT(BLIST_BMAP_RADIX % BLIST_META_RADIX == 0); + /* * For a subtree that can represent the state of up to 'radix' blocks, the * number of leaf nodes of the subtree is L=radix/BLIST_BMAP_RADIX. If 'm' @@ -151,17 +154,19 @@ static MALLOC_DEFINE(M_SWAP, "SWAP", "Swap space"); * in the 'meta' functions that process subtrees. Since integer division * discards remainders, we can express this computation as * skip = (m * m**h) / (m - 1) - * skip = (m * radix / BLIST_BMAP_RADIX) / (m - 1) - * and if m divides BLIST_BMAP_RADIX, we can simplify further to - * skip = radix / (BLIST_BMAP_RADIX / m * (m - 1)) - * so that a simple integer division is enough for the calculation. + * skip = (m * (radix / BLIST_BMAP_RADIX)) / (m - 1) + * and since m divides BLIST_BMAP_RADIX, we can simplify further to + * skip = (radix / (BLIST_BMAP_RADIX / m)) / (m - 1) + * skip = radix / ((BLIST_BMAP_RADIX / m) * (m - 1)) + * so that simple integer division by a constant can safely be used for the + * calculation. */ static inline daddr_t radix_to_skip(daddr_t radix) { return (radix / - (BLIST_BMAP_RADIX / BLIST_META_RADIX * (BLIST_META_RADIX - 1))); + ((BLIST_BMAP_RADIX / BLIST_META_RADIX) * (BLIST_META_RADIX - 1))); } /* From owner-svn-src-head@freebsd.org Fri Aug 4 06:30:54 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D67DBDC91C9; Fri, 4 Aug 2017 06:30:54 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EFD980112; Fri, 4 Aug 2017 06:30:54 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 65E0826015A; Fri, 4 Aug 2017 08:30:52 +0200 (CEST) Subject: Re: svn commit: r321985 - head/sys/ofed/drivers/infiniband/core To: cem@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201708030918.v739IPVY034866@repo.freebsd.org> From: Hans Petter Selasky Message-ID: Date: Fri, 4 Aug 2017 08:28:41 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 06:30:54 -0000 On 08/03/17 16:37, Conrad Meyer wrote: > Hey Hans, > > Is it not important that the subtraction and result are evaluated > without truncation? Hi, ticks is a circular counter. Assuming time = 0 and jiffies = -1U, then "delay" becomes a very large negative value, because long is used, and the delay <= 0 check, is no longer working like expected. Casting to "int" or truncating is the right thing to do in this case. --HPS > > Thanks, > Conrad > > On Thu, Aug 3, 2017 at 2:18 AM, Hans Petter Selasky > wrote: >> Author: hselasky >> Date: Thu Aug 3 09:18:25 2017 >> New Revision: 321985 >> URL: https://svnweb.freebsd.org/changeset/base/321985 >> >> Log: >> Ticks are 32-bit in FreeBSD. >> >> MFC after: 3 days >> Sponsored by: Mellanox Technologies >> >> Modified: >> head/sys/ofed/drivers/infiniband/core/addr.c >> >> Modified: head/sys/ofed/drivers/infiniband/core/addr.c >> ============================================================================== >> --- head/sys/ofed/drivers/infiniband/core/addr.c Thu Aug 3 09:14:43 2017 (r321984) >> +++ head/sys/ofed/drivers/infiniband/core/addr.c Thu Aug 3 09:18:25 2017 (r321985) >> @@ -187,10 +187,10 @@ EXPORT_SYMBOL(rdma_translate_ip); >> >> static void set_timeout(unsigned long time) >> { >> - unsigned long delay; >> + int delay; /* under FreeBSD ticks are 32-bit */ >> >> delay = time - jiffies; >> - if ((long)delay <= 0) >> + if (delay <= 0) >> delay = 1; >> >> mod_delayed_work(addr_wq, &work, delay); >> > > From owner-svn-src-head@freebsd.org Fri Aug 4 06:40:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09824DC9550 for ; Fri, 4 Aug 2017 06:40:44 +0000 (UTC) (envelope-from 0100015dabf98040-76cfbcc7-5de4-4e35-9a90-60fa54d31563-000000@amazonses.com) Received: from a8-237.smtp-out.amazonses.com (a8-237.smtp-out.amazonses.com [54.240.8.237]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C26A38057B for ; Fri, 4 Aug 2017 06:40:43 +0000 (UTC) (envelope-from 0100015dabf98040-76cfbcc7-5de4-4e35-9a90-60fa54d31563-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ae7m2yrxjw65l2cqdpjxuucyrvy564tn; d=tarsnap.com; t=1501828841; h=Subject:To:References:Cc:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=J8uQtE9lnLLaxxKHLhZHcnoZXRb134blpCUNBAfuQ/s=; b=ITH3jgb7QtFa9u/p8B/MxfR/LqXz53Fk7VsUsUPQW1X6vfwOkD06EZgIxd9I1v38 qQnYR/gNvkPC1RvA1/Pj2b8pHhI8yKZwbCXJNc1BIbA0wK0sz1dP7HaIeHIAqJRqNof tN0/08umh3m/uP970GaRC7iu0nB8tkRB0PVQHDLg= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1501828841; h=Subject:To:References:Cc:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=J8uQtE9lnLLaxxKHLhZHcnoZXRb134blpCUNBAfuQ/s=; b=MrxqMh+oZB8p+HHZPCLXEgDwrRu68dUtkONcfZj4TFN2GLcWGHQjWr/DBODlQnfa YOY0WfFRdp+z3vrTlevhWatxCaP8MRG+2HWj3uMgPV7c+uewvYfiy0KH1ZeeQt+Wwdb +JdT3X3Q27TIJYvKY2HO6fqHf5C0iMWfjE/MqSkI= Subject: Re: svn commit: r321985 - head/sys/ofed/drivers/infiniband/core To: Hans Petter Selasky , cem@freebsd.org References: <201708030918.v739IPVY034866@repo.freebsd.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Colin Percival Message-ID: <0100015dabf98040-76cfbcc7-5de4-4e35-9a90-60fa54d31563-000000@email.amazonses.com> Date: Fri, 4 Aug 2017 06:40:41 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SES-Outgoing: 2017.08.04-54.240.8.237 Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 06:40:44 -0000 On 08/03/17 23:28, Hans Petter Selasky wrote: > On 08/03/17 16:37, Conrad Meyer wrote: >> Is it not important that the subtraction and result are evaluated >> without truncation? > > ticks is a circular counter. Assuming time = 0 and jiffies = -1U, then "delay" > becomes a very large negative value, because long is used, and the delay <= 0 > check, is no longer working like expected. > > Casting to "int" or truncating is the right thing to do in this case. Signed integer overflow is undefined. Using 'int' is liable to cause problems after 2^32 ticks. Colin Percival >>> Log: >>> Ticks are 32-bit in FreeBSD. >>> >>> MFC after: 3 days >>> Sponsored by: Mellanox Technologies >>> >>> Modified: >>> head/sys/ofed/drivers/infiniband/core/addr.c >>> >>> Modified: head/sys/ofed/drivers/infiniband/core/addr.c >>> ============================================================================== >>> --- head/sys/ofed/drivers/infiniband/core/addr.c Thu Aug 3 09:14:43 >>> 2017 (r321984) >>> +++ head/sys/ofed/drivers/infiniband/core/addr.c Thu Aug 3 09:18:25 >>> 2017 (r321985) >>> @@ -187,10 +187,10 @@ EXPORT_SYMBOL(rdma_translate_ip); >>> >>> static void set_timeout(unsigned long time) >>> { >>> - unsigned long delay; >>> + int delay; /* under FreeBSD ticks are 32-bit */ >>> >>> delay = time - jiffies; >>> - if ((long)delay <= 0) >>> + if (delay <= 0) >>> delay = 1; >>> >>> mod_delayed_work(addr_wq, &work, delay); -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-head@freebsd.org Fri Aug 4 06:47:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A968DC9B2F; Fri, 4 Aug 2017 06:47:36 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13CD280C3D; Fri, 4 Aug 2017 06:47:36 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 72E3026015A; Fri, 4 Aug 2017 08:47:34 +0200 (CEST) Subject: Re: svn commit: r321985 - head/sys/ofed/drivers/infiniband/core To: Colin Percival , cem@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201708030918.v739IPVY034866@repo.freebsd.org> <0100015dabf99670-4b6c3f74-5f86-49a2-a3d5-85dee9e16f91-000000@email.amazonses.com> From: Hans Petter Selasky Message-ID: Date: Fri, 4 Aug 2017 08:45:23 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <0100015dabf99670-4b6c3f74-5f86-49a2-a3d5-85dee9e16f91-000000@email.amazonses.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 06:47:36 -0000 On 08/04/17 08:40, Colin Percival wrote: >> Casting to "int" or truncating is the right thing to do in this case. > Signed integer overflow is undefined. Using 'int' is liable to cause problems > after 2^32 ticks. > Hi, If you check the code how this function is used, you'll see that the argument passed is computed from: jiffies + n, where "n" is a relatively small value. The <= 0 check is basically there to catch cases where the jiffies value has changed between the point where it was set and the point where the relative ticks timeout value "n" was extracted. Basically the code is doing like this, reading the value of "jiffies" twice. delay = (jiffies0 + n) - jiffies1; if (delay <= 0) delay = 1; And then "delay" should be "int", because we are usually not dealing with timeouts greater than a few hundred seconds or so. --HPS From owner-svn-src-head@freebsd.org Fri Aug 4 07:57:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E354DCB88D for ; Fri, 4 Aug 2017 07:57:14 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-vk0-x233.google.com (mail-vk0-x233.google.com [IPv6:2607:f8b0:400c:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B8F78260B for ; Fri, 4 Aug 2017 07:57:14 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-vk0-x233.google.com with SMTP id x10so3322997vkd.0 for ; Fri, 04 Aug 2017 00:57:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=3cDoNpd7MRlqrHmgXoSEqI2O5G3XxwKv12EtIjFMHi0=; b=jtXIy3Psvq3b2kEfi0GhLwJOhhX50rF+weoH1xWV0orgGBYVK5U0RWEqhDLHX5Bneu CaLnfAbovWvSMLkIv7KjmXmGA+1kjggCQvWbanVlc3u9oLDZ6qHLzfu6fDlMm9Tc4lTX Hui8pCBrxVaiyguZ8sQVmxYZMtgMLvxccmEjO0ngklExJN5NU8Y6EJShGy73BNOf/l6x eWJ5q7zoXNooXPFsW3Vv0qC1zpCu37QoS2dFHBCc0L56174Lai4TCi7M5kvst1jZWjBT aWh/Nh5V/sZFK+SpXEKMxVTzdffL5Fpi2nqeT9lRtaRbE3QfzO1D8tDK7utMtVtxp438 vYtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3cDoNpd7MRlqrHmgXoSEqI2O5G3XxwKv12EtIjFMHi0=; b=Vajyh9NkGZCINas68lWx66OkxsGDex2EulKOzkbbHIYod+BQ0DxX21O+SqfkW0pi2B l+h9WL3PnaVwaTw5w60ngj5g6yNBKCe19eN9QN8PxBXNK1HlCYB+YuJK04kQTa0kICVo CsgiYnXqOTdS3JTo6eSW0qoY+k0qRC9D0dTXzTHugEqKUOXKfHr4spkXswBlqRLg+ZoW vOTr0QwGEhQM1I3H0xkHdPJxSRt7vsglLSlF7lq+bhflMO1u0ivZ98SioQGm47Sch5qZ q5xOcYcAUiy+7Uv8QoTXwn+vZcvrVuNX0Jeww6zLMzoPw/1kMl8ZU0RTh21c6b5RMpqe oVfA== X-Gm-Message-State: AHYfb5ho3+D05Mgtn6CEye09efzUdQoHxC+Gy2HJMVA26ySjJJKhbmPC 1v7ym471afiY6o2MgXZTEK/NdJV6ZEEa X-Received: by 10.31.106.129 with SMTP id f123mr930880vkc.74.1501833433203; Fri, 04 Aug 2017 00:57:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.8.70 with HTTP; Fri, 4 Aug 2017 00:57:12 -0700 (PDT) In-Reply-To: <201708040423.v744NOix022999@repo.freebsd.org> References: <201708040423.v744NOix022999@repo.freebsd.org> From: Oliver Pinter Date: Fri, 4 Aug 2017 09:57:12 +0200 Message-ID: Subject: Re: svn commit: r322041 - head/sys/kern To: Alan Cox Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 07:57:14 -0000 On Friday, August 4, 2017, Alan Cox wrote: > Author: alc > Date: Fri Aug 4 04:23:23 2017 > New Revision: 322041 > URL: https://svnweb.freebsd.org/changeset/base/322041 > > Log: > In case readers are misled by expressions that combine multiplication and > division, add parentheses to make the precedence explicit. > > Submitted by: Doug Moore > > Requested by: imp > Reviewed by: imp > MFC after: 1 week > X-MFC after: r321840 > Differential Revision: https://reviews.freebsd.org/D11815 > > Modified: > head/sys/kern/subr_blist.c > > Modified: head/sys/kern/subr_blist.c > ============================================================ > ================== > --- head/sys/kern/subr_blist.c Fri Aug 4 04:20:11 2017 (r322040) > +++ head/sys/kern/subr_blist.c Fri Aug 4 04:23:23 2017 (r322041) > @@ -110,6 +110,7 @@ __FBSDID("$FreeBSD$"); > #define bitcount64(x) __bitcount64((uint64_t)(x)) > #define malloc(a,b,c) calloc(a, 1) > #define free(a,b) free(a) > +#define CTASSERT(expr) Is this dummy define intended? > > #include > > @@ -142,6 +143,8 @@ static void blst_radix_print(blmeta_t *scan, daddr_t b > static MALLOC_DEFINE(M_SWAP, "SWAP", "Swap space"); > #endif > > +CTASSERT(BLIST_BMAP_RADIX % BLIST_META_RADIX == 0); > + > /* > * For a subtree that can represent the state of up to 'radix' blocks, the > * number of leaf nodes of the subtree is L=radix/BLIST_BMAP_RADIX. If > 'm' > @@ -151,17 +154,19 @@ static MALLOC_DEFINE(M_SWAP, "SWAP", "Swap space"); > * in the 'meta' functions that process subtrees. Since integer division > * discards remainders, we can express this computation as > * skip = (m * m**h) / (m - 1) > - * skip = (m * radix / BLIST_BMAP_RADIX) / (m - 1) > - * and if m divides BLIST_BMAP_RADIX, we can simplify further to > - * skip = radix / (BLIST_BMAP_RADIX / m * (m - 1)) > - * so that a simple integer division is enough for the calculation. > + * skip = (m * (radix / BLIST_BMAP_RADIX)) / (m - 1) > + * and since m divides BLIST_BMAP_RADIX, we can simplify further to > + * skip = (radix / (BLIST_BMAP_RADIX / m)) / (m - 1) > + * skip = radix / ((BLIST_BMAP_RADIX / m) * (m - 1)) > + * so that simple integer division by a constant can safely be used for > the > + * calculation. > */ > static inline daddr_t > radix_to_skip(daddr_t radix) > { > > return (radix / > - (BLIST_BMAP_RADIX / BLIST_META_RADIX * (BLIST_META_RADIX - > 1))); > + ((BLIST_BMAP_RADIX / BLIST_META_RADIX) * (BLIST_META_RADIX - > 1))); > } > > /* > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org > " > From owner-svn-src-head@freebsd.org Fri Aug 4 08:56:33 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE12EDCE400; Fri, 4 Aug 2017 08:56:33 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5CC3A37; Fri, 4 Aug 2017 08:56:33 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v748uW2d032563; Fri, 4 Aug 2017 08:56:32 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v748uVss032550; Fri, 4 Aug 2017 08:56:31 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201708040856.v748uVss032550@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Fri, 4 Aug 2017 08:56:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322049 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 322049 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 08:56:33 -0000 Author: brd (doc,ports committer) Date: Fri Aug 4 08:56:31 2017 New Revision: 322049 URL: https://svnweb.freebsd.org/changeset/base/322049 Log: Document usb verbosity levels Submitted by: Tom Jones Approved by: hselasky MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D11850 Modified: head/share/man/man4/ehci.4 head/share/man/man4/ohci.4 head/share/man/man4/ucom.4 head/share/man/man4/ugen.4 head/share/man/man4/uhci.4 head/share/man/man4/uhid.4 head/share/man/man4/ukbd.4 head/share/man/man4/ums.4 head/share/man/man4/uplcom.4 head/share/man/man4/usb.4 head/share/man/man4/xhci.4 Modified: head/share/man/man4/ehci.4 ============================================================================== --- head/share/man/man4/ehci.4 Fri Aug 4 08:27:34 2017 (r322048) +++ head/share/man/man4/ehci.4 Fri Aug 4 08:56:31 2017 (r322049) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 15, 2017 +.Dd August 3, 2017 .Dt EHCI 4 .Os .Sh NAME @@ -69,16 +69,6 @@ but can be noticed since .Tn USB 2.0 devices plugged in to the same connector appear to connect to different USB buses. -.Sh SEE ALSO -.Xr ohci 4 , -.Xr uhci 4 , -.Xr usb 4 , -.Xr xhci 4 -.Sh HISTORY -The -.Nm -device driver first appeared in -.Fx 5.1 . .Sh LOADER TUNABLES When the kernel has been compiled with .Cd options USB_DEBUG , @@ -98,4 +88,27 @@ The default value is 0 (off). .It Va hw.usb.ehci.no_hs This tunable disables USB devices to attach like HIGH-speed ones and will force all attached devices to attach to the FULL- or LOW-speed companion controller. The default value is 0 (off). +.Sh MIB Variables +The +.Nm +driver exposes the following variables in the +.Va hw.usb.ehci +branch of the +.Xr sysctl 3 +MIB: +.Bl -tag -width ".Va debug" +.It Va debug +Debug output level, where 0 is debugging disabled and larger values increase +debug message verbosity. +Default is 0. .El +.Sh SEE ALSO +.Xr ohci 4 , +.Xr uhci 4 , +.Xr usb 4 , +.Xr xhci 4 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 5.1 . Modified: head/share/man/man4/ohci.4 ============================================================================== --- head/share/man/man4/ohci.4 Fri Aug 4 08:27:34 2017 (r322048) +++ head/share/man/man4/ohci.4 Fri Aug 4 08:56:31 2017 (r322049) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 23, 2005 +.Dd August 3, 2017 .Dt OHCI 4 .Os .Sh NAME @@ -59,6 +59,19 @@ NVIDIA nForce3 .It Sun PCIO-2 (RIO USB) .El +.Sh MIB Variables +The +.Nm +driver exposes the following variables in the +.Va hw.usb.ohci +branch of the +.Xr sysctl 3 +MIB: +.Bl -tag -width ".Va debug" +.It Va debug +Debug output level, where 0 is debugging disabled and larger values increase +debug message verbosity. +Default is 0. .Sh SEE ALSO .Xr ehci 4 , .Xr uhci 4 , Modified: head/share/man/man4/ucom.4 ============================================================================== --- head/share/man/man4/ucom.4 Fri Aug 4 08:27:34 2017 (r322048) +++ head/share/man/man4/ucom.4 Fri Aug 4 08:56:31 2017 (r322049) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 26, 2017 +.Dd August 3, 2017 .Dt UCOM 4 .Os .Sh NAME @@ -63,6 +63,21 @@ This means that normal programs such as or .Xr ppp 8 can be used to access the device. +.Sh MIB Variables +The +.Nm +driver exposes the following variables in the +.Va hw.usb.ucom +branch of the +.Xr sysctl 3 +MIB: +.Bl -tag -width ".Va pps_mode" +.It Va debug +Debug output level, where 0 is debugging disabled and larger values increase +debug message verbosity. +Default is 0. +.It Va pps_mode +Enables and configure PPS capture mode as described below. .Sh Pulse Per Second (PPS) Timing Interface The .Nm Modified: head/share/man/man4/ugen.4 ============================================================================== --- head/share/man/man4/ugen.4 Fri Aug 4 08:27:34 2017 (r322048) +++ head/share/man/man4/ugen.4 Fri Aug 4 08:56:31 2017 (r322049) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 16, 2014 +.Dd August 3, 2017 .Dt UGEN 4 .Os .Sh NAME @@ -291,6 +291,19 @@ and .Va alt_index should be set to .Dv USB_CURRENT_ALT_INDEX . +.Sh MIB Variables +The +.Nm +driver exposes the following variables in the +.Va hw.usb.ugen +branch of the +.Xr sysctl 3 +MIB: +.Bl -tag -width ".Va debug" +.It Va debug +Debug output level, where 0 is debugging disabled and larger values increase +debug message verbosity. +Default is 0. .Sh FILES .Bl -tag -width ".Pa /dev/ugen Ns Ar N Ns Pa \&. Ns Ar E" -compact .It Pa /dev/ugen Ns Ar N Ns Pa \&. Ns Ar E Modified: head/share/man/man4/uhci.4 ============================================================================== --- head/share/man/man4/uhci.4 Fri Aug 4 08:27:34 2017 (r322048) +++ head/share/man/man4/uhci.4 Fri Aug 4 08:56:31 2017 (r322049) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 20, 2005 +.Dd August 3, 2017 .Dt UHCI 4 .Os .Sh NAME @@ -49,6 +49,19 @@ Intel 82371SB (PIIX3) .It VIA 83C572 .El +.Sh MIB Variables +The +.Nm +driver exposes the following variables in the +.Va hw.usb.uhci +branch of the +.Xr sysctl 3 +MIB: +.Bl -tag -width ".Va debug" +.It Va debug +Debug output level, where 0 is debugging disabled and larger values increase +debug message verbosity. +Default is 0. .Sh SEE ALSO .Xr ehci 4 , .Xr ohci 4 , Modified: head/share/man/man4/uhid.4 ============================================================================== --- head/share/man/man4/uhid.4 Fri Aug 4 08:27:34 2017 (r322048) +++ head/share/man/man4/uhid.4 Fri Aug 4 08:56:31 2017 (r322049) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2006 +.Dd August 3, 2017 .Dt UHID 4 .Os .Sh NAME @@ -127,6 +127,19 @@ Use to send data to the device. Data should be written in chunks of the size prescribed by the report descriptor. +.Sh MIB Variables +The +.Nm +driver exposes the following variables in the +.Va hw.usb.uhid +branch of the +.Xr sysctl 3 +MIB: +.Bl -tag -width ".Va debug" +.It Va debug +Debug output level, where 0 is debugging disabled and larger values increase +debug message verbosity. +Default is 0. .Sh FILES .Bl -tag -width ".Pa /dev/uhid?" .It Pa /dev/uhid? Modified: head/share/man/man4/ukbd.4 ============================================================================== --- head/share/man/man4/ukbd.4 Fri Aug 4 08:27:34 2017 (r322048) +++ head/share/man/man4/ukbd.4 Fri Aug 4 08:56:31 2017 (r322049) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2006 +.Dd August 3, 2017 .Dt UKBD 4 .Os .Sh NAME @@ -136,6 +136,19 @@ or Do not allow the user to change the keymap. Note that these options also affect the AT keyboard driver, .Xr atkbd 4 . +.Sh MIB Variables +The +.Nm +driver exposes the following variables in the +.Va hw.usb.ukbd +branch of the +.Xr sysctl 3 +MIB: +.Bl -tag -width ".Va debug" +.It Va debug +Debug output level, where 0 is debugging disabled and larger values increase +debug message verbosity. +Default is 0. .Sh FILES .Bl -tag -width ".Pa /dev/kbd*" -compact .It Pa /dev/kbd* Modified: head/share/man/man4/ums.4 ============================================================================== --- head/share/man/man4/ums.4 Fri Aug 4 08:27:34 2017 (r322048) +++ head/share/man/man4/ums.4 Fri Aug 4 08:56:31 2017 (r322049) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 27, 2006 +.Dd August 3, 2017 .Dt UMS 4 .Os .Sh NAME @@ -64,6 +64,19 @@ type device. See .Xr moused 8 for an explanation of these mouse types. +.Sh MIB Variables +The +.Nm +driver exposes the following variables in the +.Va hw.usb.ums +branch of the +.Xr sysctl 3 +MIB: +.Bl -tag -width ".Va debug" +.It Va debug +Debug output level, where 0 is debugging disabled and larger values increase +debug message verbosity. +Default is 0. .Sh FILES .Bl -tag -width /dev/ums0 -compact .It Pa /dev/ums0 Modified: head/share/man/man4/uplcom.4 ============================================================================== --- head/share/man/man4/uplcom.4 Fri Aug 4 08:27:34 2017 (r322048) +++ head/share/man/man4/uplcom.4 Fri Aug 4 08:56:31 2017 (r322049) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 26, 2017 +.Dd August 3, 2017 .Dt UPLCOM 4 .Os .Sh NAME @@ -180,6 +180,19 @@ YC-Cable USB-Serial Adapter .It Zeagle N2iTion3 Diving Computer .El +.Sh MIB Variables +The +.Nm +driver exposes the following variables in the +.Va hw.usb.uplcom +branch of the +.Xr sysctl 3 +MIB: +.Bl -tag -width ".Va debug" +.It Va debug +Debug output level, where 0 is debugging disabled and larger values increase +debug message verbosity. +Default is 0. .Sh FILES .Bl -tag -width "/dev/ttyU*.init" -compact .It Pa /dev/ttyU* Modified: head/share/man/man4/usb.4 ============================================================================== --- head/share/man/man4/usb.4 Fri Aug 4 08:27:34 2017 (r322048) +++ head/share/man/man4/usb.4 Fri Aug 4 08:56:31 2017 (r322049) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 29, 2017 +.Dd August 3, 2017 .Dt USB 4 .Os .Sh NAME @@ -131,6 +131,19 @@ Any interface specific driver can attach to the device .It If none is found, generic interface class drivers can attach. .El +.Sh MIB Variables +The +.Nm +driver exposes the following variables in the +.Va hw.usb +branch of the +.Xr sysctl 3 +MIB: +.Bl -tag -width ".Va debug" +.It Va debug +Debug output level, where 0 is debugging disabled and larger values increase +debug message verbosity. +Default is 0. .Sh SEE ALSO The .Tn USB Modified: head/share/man/man4/xhci.4 ============================================================================== --- head/share/man/man4/xhci.4 Fri Aug 4 08:27:34 2017 (r322048) +++ head/share/man/man4/xhci.4 Fri Aug 4 08:56:31 2017 (r322049) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 17, 2011 +.Dd August 3, 2017 .Dt XHCI 4 .Os .Sh NAME @@ -56,6 +56,19 @@ driver supports .Tn XHCI compatible controllers having PCI class 12 (serial bus), subclass 3 (USB) and programming interface 48 (XHCI). +.Sh MIB Variables +The +.Nm +driver exposes the following variables in the +.Va hw.usb.xhci +branch of the +.Xr sysctl 3 +MIB: +.Bl -tag -width ".Va debug" +.It Va debug +Debug output level, where 0 is debugging disabled and larger values increase +debug message verbosity. +Default is 0. .Sh SEE ALSO .Xr ehci 4 , .Xr ohci 4 , From owner-svn-src-head@freebsd.org Fri Aug 4 09:45:41 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A2D2DD054C; Fri, 4 Aug 2017 09:45:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AC7920F3; Fri, 4 Aug 2017 09:45:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v749jebN052800; Fri, 4 Aug 2017 09:45:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v749jefW052799; Fri, 4 Aug 2017 09:45:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201708040945.v749jefW052799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 4 Aug 2017 09:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322050 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 322050 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 09:45:41 -0000 Author: kib Date: Fri Aug 4 09:45:40 2017 New Revision: 322050 URL: https://svnweb.freebsd.org/changeset/base/322050 Log: Relax visibility for some termios symbols. They are defined by XSI or newer SUS. This is a follow-up to r318780. Reported by: jbeich Obtained from: DragonflyBSD commit e08b3836c962 Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/sys/_termios.h Modified: head/sys/sys/_termios.h ============================================================================== --- head/sys/sys/_termios.h Fri Aug 4 08:56:31 2017 (r322049) +++ head/sys/sys/_termios.h Fri Aug 4 09:45:40 2017 (r322050) @@ -91,8 +91,10 @@ #define ICRNL 0x00000100 /* map CR to NL (ala CRMOD) */ #define IXON 0x00000200 /* enable output flow control */ #define IXOFF 0x00000400 /* enable input flow control */ -#if __BSD_VISIBLE +#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809 #define IXANY 0x00000800 /* any char will restart after stop */ +#endif +#if __BSD_VISIBLE #define IMAXBEL 0x00002000 /* ring bell on input queue full */ #endif @@ -100,12 +102,16 @@ * Output flags - software output processing */ #define OPOST 0x00000001 /* enable following output processing */ -#if __BSD_VISIBLE +#if __XSI_VISIBLE #define ONLCR 0x00000002 /* map NL to CR-NL (ala CRMOD) */ +#endif +#if __BSD_VISIBLE #define TABDLY 0x00000004 /* tab delay mask */ #define TAB0 0x00000000 /* no tab delay and expansion */ #define TAB3 0x00000004 /* expand tabs to spaces */ #define ONOEOT 0x00000008 /* discard EOT's (^D) on output) */ +#endif +#if __XSI_VISIBLE #define OCRNL 0x00000010 /* map CR to NL on output */ #define ONOCR 0x00000020 /* no CR output at column 0 */ #define ONLRET 0x00000040 /* NL performs CR function */ From owner-svn-src-head@freebsd.org Fri Aug 4 10:33:23 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E53D7DD226C; Fri, 4 Aug 2017 10:33:23 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4E683803; Fri, 4 Aug 2017 10:33:23 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v74AXMSQ073121; Fri, 4 Aug 2017 10:33:22 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v74AXMQf073120; Fri, 4 Aug 2017 10:33:22 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201708041033.v74AXMQf073120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 4 Aug 2017 10:33:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322051 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 322051 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 10:33:24 -0000 Author: andrew Date: Fri Aug 4 10:33:22 2017 New Revision: 322051 URL: https://svnweb.freebsd.org/changeset/base/322051 Log: Read the numa-node-id property from each CPU node. This will initially be used to support the dual package ThunderX where we need to send MSI/MSI-X interrupts to the same package as the device the interrupt came from. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/mp_machdep.c Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Fri Aug 4 09:45:40 2017 (r322050) +++ head/sys/arm64/arm64/mp_machdep.c Fri Aug 4 10:33:22 2017 (r322051) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #ifdef FDT #include +#include #include #endif @@ -196,6 +197,10 @@ arm64_cpu_attach(device_t dev) /* Set the device to start it later */ cpu_list[cpuid] = dev; + + /* Try to read the numa node of this cpu */ + OF_getencprop(ofw_bus_get_node(dev), "numa-node-id", + &__pcpu[cpuid].pc_domain, sizeof(__pcpu[cpuid].pc_domain)); return (0); } From owner-svn-src-head@freebsd.org Fri Aug 4 12:57:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53618DD8476; Fri, 4 Aug 2017 12:57:26 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B96B67173; Fri, 4 Aug 2017 12:57:26 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v74CvPgC030138; Fri, 4 Aug 2017 12:57:25 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v74CvPSb030136; Fri, 4 Aug 2017 12:57:25 GMT (envelope-from des@FreeBSD.org) Message-Id: <201708041257.v74CvPSb030136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 4 Aug 2017 12:57:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322052 - in head/crypto/openssh: . contrib/cygwin contrib/redhat contrib/suse openbsd-compat regress regress/unittests regress/unittests/conversion regress/unittests/match regress/unit... X-SVN-Group: head X-SVN-Commit-Author: des X-SVN-Commit-Paths: in head/crypto/openssh: . contrib/cygwin contrib/redhat contrib/suse openbsd-compat regress regress/unittests regress/unittests/conversion regress/unittests/match regress/unittests/test_helper regress... X-SVN-Commit-Revision: 322052 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 12:57:26 -0000 Author: des Date: Fri Aug 4 12:57:24 2017 New Revision: 322052 URL: https://svnweb.freebsd.org/changeset/base/322052 Log: Upgrade to OpenSSH 7.5p1. Added: head/crypto/openssh/regress/unittests/conversion/ - copied from r321987, vendor-crypto/openssh/dist/regress/unittests/conversion/ Deleted: head/crypto/openssh/auth1.c Modified: head/crypto/openssh/ChangeLog head/crypto/openssh/INSTALL head/crypto/openssh/Makefile.in head/crypto/openssh/README head/crypto/openssh/auth-pam.c head/crypto/openssh/auth2-pubkey.c head/crypto/openssh/auth2.c head/crypto/openssh/channels.c head/crypto/openssh/channels.h head/crypto/openssh/clientloop.c head/crypto/openssh/compat.c head/crypto/openssh/config.h head/crypto/openssh/configure.ac head/crypto/openssh/contrib/cygwin/ssh-host-config head/crypto/openssh/contrib/redhat/openssh.spec head/crypto/openssh/contrib/suse/openssh.spec head/crypto/openssh/digest-openssl.c head/crypto/openssh/freebsd-configure.sh head/crypto/openssh/hostfile.c head/crypto/openssh/kex.c head/crypto/openssh/krl.c head/crypto/openssh/log.c head/crypto/openssh/match.c head/crypto/openssh/match.h head/crypto/openssh/misc.c head/crypto/openssh/monitor.c head/crypto/openssh/mux.c head/crypto/openssh/openbsd-compat/bsd-misc.c head/crypto/openssh/openbsd-compat/bsd-misc.h head/crypto/openssh/openbsd-compat/fmt_scaled.c head/crypto/openssh/packet.c head/crypto/openssh/packet.h head/crypto/openssh/pathnames.h head/crypto/openssh/readconf.c head/crypto/openssh/regress/Makefile head/crypto/openssh/regress/agent-getpeereid.sh head/crypto/openssh/regress/allow-deny-users.sh head/crypto/openssh/regress/cert-file.sh head/crypto/openssh/regress/forwarding.sh head/crypto/openssh/regress/integrity.sh head/crypto/openssh/regress/test-exec.sh head/crypto/openssh/regress/unittests/Makefile head/crypto/openssh/regress/unittests/match/tests.c head/crypto/openssh/regress/unittests/test_helper/test_helper.c head/crypto/openssh/regress/unittests/test_helper/test_helper.h head/crypto/openssh/regress/unittests/utf8/tests.c head/crypto/openssh/sandbox-seccomp-filter.c head/crypto/openssh/servconf.c head/crypto/openssh/serverloop.c head/crypto/openssh/session.c head/crypto/openssh/sftp-client.c head/crypto/openssh/sftp.c head/crypto/openssh/ssh-agent.c head/crypto/openssh/ssh-keygen.c head/crypto/openssh/ssh-keyscan.c head/crypto/openssh/ssh.c head/crypto/openssh/ssh_config head/crypto/openssh/ssh_config.5 head/crypto/openssh/ssh_namespace.h head/crypto/openssh/sshconnect.c head/crypto/openssh/sshconnect1.c head/crypto/openssh/sshconnect2.c head/crypto/openssh/sshd.8 head/crypto/openssh/sshd.c head/crypto/openssh/sshd_config head/crypto/openssh/sshd_config.5 head/crypto/openssh/sshkey.c head/crypto/openssh/sshkey.h head/crypto/openssh/utf8.c head/crypto/openssh/version.h Directory Properties: head/crypto/openssh/ (props changed) Modified: head/crypto/openssh/ChangeLog ============================================================================== --- head/crypto/openssh/ChangeLog Fri Aug 4 10:33:22 2017 (r322051) +++ head/crypto/openssh/ChangeLog Fri Aug 4 12:57:24 2017 (r322052) @@ -1,3 +1,1174 @@ +commit d38f05dbdd291212bc95ea80648b72b7177e9f4e +Author: Darren Tucker +Date: Mon Mar 20 13:38:27 2017 +1100 + + Add llabs() implementation. + +commit 72536316a219b7394996a74691a5d4ec197480f7 +Author: Damien Miller +Date: Mon Mar 20 12:23:04 2017 +1100 + + crank version numbers + +commit 3be52bc36bdfd24ded7e0f46999e7db520fb4e3f +Author: djm@openbsd.org +Date: Mon Mar 20 01:18:59 2017 +0000 + + upstream commit + + openssh-7.5 + + Upstream-ID: b8b9a4a949427c393cd868215e1724ceb3467ee5 + +commit db84e52fe9cfad57f22e7e23c5fbf00092385129 +Author: Damien Miller +Date: Mon Mar 20 12:07:20 2017 +1100 + + I'm a doofus. + + Unbreak obvious syntax error. + +commit 89f04852db27643717c9c3a2b0dde97ae50099ee +Author: Damien Miller +Date: Mon Mar 20 11:53:34 2017 +1100 + + on Cygwin, check paths from server for backslashes + + Pointed out by Jann Horn of Google Project Zero + +commit 7ef1f9bafc2cc8d97ff2fbd4f280002b6e8ea5d9 +Author: Damien Miller +Date: Mon Mar 20 11:48:34 2017 +1100 + + Yet another synonym for ASCII: "646" + + Used by NetBSD; this unbreaks mprintf() and friends there for the C + locale (caught by dtucker@ and his menagerie of test systems). + +commit 9165abfea3f68a0c684a6ed2e575e59bc31a3a6b +Author: Damien Miller +Date: Mon Mar 20 09:58:34 2017 +1100 + + create test mux socket in /tmp + + Creating the socket in $OBJ could blow past the (quite limited) + path limit for Unix domain sockets. As a bandaid for bz#2660, + reported by Colin Watson; ok dtucker@ + +commit 2adbe1e63bc313d03e8e84e652cc623af8ebb163 +Author: markus@openbsd.org +Date: Wed Mar 15 07:07:39 2017 +0000 + + upstream commit + + disallow KEXINIT before NEWKEYS; ok djm; report by + vegard.nossum at oracle.com + + Upstream-ID: 3668852d1f145050e62f1da08917de34cb0c5234 + +commit 2fbf91684d76d38b9cf06550b69c9e41bca5a71c +Author: Darren Tucker +Date: Thu Mar 16 14:05:46 2017 +1100 + + Include includes.h for compat bits. + +commit b55f634e96b9c5b0cd991e23a9ca181bec4bdbad +Author: Darren Tucker +Date: Thu Mar 16 13:45:17 2017 +1100 + + Wrap stdint.h in #ifdef HAVE_STDINT_H + +commit 55a1117d7342a0bf8b793250cf314bab6b482b99 +Author: Damien Miller +Date: Thu Mar 16 11:22:42 2017 +1100 + + Adapt Cygwin config script to privsep knob removal + + Patch from Corinna Vinschen. + +commit 1a321bfdb91defe3c4d9cca5651724ae167e5436 +Author: deraadt@openbsd.org +Date: Wed Mar 15 03:52:30 2017 +0000 + + upstream commit + + accidents happen to the best of us; ok djm + + Upstream-ID: b7a9dbd71011ffde95e06f6945fe7197dedd1604 + +commit 25f837646be8c2017c914d34be71ca435dfc0e07 +Author: djm@openbsd.org +Date: Wed Mar 15 02:25:09 2017 +0000 + + upstream commit + + fix regression in 7.4: deletion of PKCS#11-hosted keys + would fail unless they were specified by full physical pathname. Report and + fix from Jakub Jelen via bz#2682; ok dtucker@ + + Upstream-ID: 5b5bc20ca11cacb5d5eb29c3f93fd18425552268 + +commit a8c5eeacf032a7d3408957e45dd7603cc1baf55f +Author: djm@openbsd.org +Date: Wed Mar 15 02:19:09 2017 +0000 + + upstream commit + + Fix segfault when sshd attempts to load RSA1 keys (can + only happen when protocol v.1 support is enabled for the client). Reported by + Jakub Jelen in bz#2686; ok dtucker + + Upstream-ID: 8fdaec2ba4b5f65db1d094f6714ce64b25d871d7 + +commit 66705948c0639a7061a0d0753266da7685badfec +Author: djm@openbsd.org +Date: Tue Mar 14 07:19:07 2017 +0000 + + upstream commit + + Mark the sshd_config UsePrivilegeSeparation option as + deprecated, effectively making privsep mandatory in sandboxing mode. ok + markus@ deraadt@ + + (note: this doesn't remove the !privsep code paths, though that will + happen eventually). + + Upstream-ID: b4c52666256c4dd865f8ce9431af5d6ce2d74a0a + +commit f86586b03fe6cd8f595289bde200a94bc2c191af +Author: Damien Miller +Date: Tue Mar 14 18:26:29 2017 +1100 + + Make seccomp-bpf sandbox work on Linux/X32 + + Allow clock_gettime syscall with X32 bit masked off. Apparently + this is required for at least some kernel versions. bz#2142 + Patch mostly by Colin Watson. ok dtucker@ + +commit 2429cf78dd2a9741ce27ba25ac41c535274a0af6 +Author: Damien Miller +Date: Tue Mar 14 18:01:52 2017 +1100 + + require OpenSSL >=1.0.1 + +commit e3ea335abeab731c68f2b2141bee85a4b0bf680f +Author: Damien Miller +Date: Tue Mar 14 17:48:43 2017 +1100 + + Remove macro trickery; no binary change + + This stops the SC_ALLOW(), SC_ALLOW_ARG() and SC_DENY() macros + prepending __NR_ to the syscall number parameter and just makes + them explicit in the macro invocations. + + No binary change in stripped object file before/after. + +commit 5f1596e11d55539678c41f68aed358628d33d86f +Author: Damien Miller +Date: Tue Mar 14 13:15:18 2017 +1100 + + support ioctls for ICA crypto card on Linux/s390 + + Based on patch from Eduardo Barretto; ok dtucker@ + +commit b1b22dd0df2668b322dda174e501dccba2cf5c44 +Author: Darren Tucker +Date: Tue Mar 14 14:19:36 2017 +1100 + + Plumb conversion test into makefile. + +commit f57783f1ddfb4cdfbd612c6beb5ec01cb5b9a6b9 +Author: dtucker@openbsd.org +Date: Tue Mar 14 01:20:29 2017 +0000 + + upstream commit + + Add unit test for convtime(). + + Upstream-Regress-ID: 8717bc0ca4c21120f6dd3a1d3b7a363f707c31e1 + +commit 8884b7247d094cd11ff9e39c325ba928c5bdbc6c +Author: dtucker@openbsd.org +Date: Tue Mar 14 01:10:07 2017 +0000 + + upstream commit + + Add ASSERT_LONG_* helpers. + + Upstream-Regress-ID: fe15beaea8f5063c7f21b0660c722648e3d76431 + +commit c6774d21185220c0ba11e8fd204bf0ad1a432071 +Author: dtucker@openbsd.org +Date: Tue Mar 14 00:55:37 2017 +0000 + + upstream commit + + Fix convtime() overflow test on boundary condition, + spotted by & ok djm. + + Upstream-ID: 51f14c507ea87a3022e63f574100613ab2ba5708 + +commit f5746b40cfe6d767c8e128fe50c43274b31cd594 +Author: dtucker@openbsd.org +Date: Tue Mar 14 00:25:03 2017 +0000 + + upstream commit + + Check for integer overflow when parsing times in + convtime(). Reported by nicolas.iooss at m4x.org, ok djm@ + + Upstream-ID: 35e6a4e98f6fa24df50bfb8ba1307cf70e966f13 + +commit f5907982f42a8d88a430b8a46752cbb7859ba979 +Author: Darren Tucker +Date: Tue Mar 14 13:38:15 2017 +1100 + + Add a "unit" target to run only unit tests. + +commit 9e96b41682aed793fadbea5ccd472f862179fb02 +Author: Damien Miller +Date: Tue Mar 14 12:24:47 2017 +1100 + + Fix weakness in seccomp-bpf sandbox arg inspection + + Syscall arguments are passed via an array of 64-bit values in struct + seccomp_data, but we were only inspecting the bottom 32 bits and not + even those correctly for BE systems. + + Fortunately, the only case argument inspection was used was in the + socketcall filtering so using this for sandbox escape seems + impossible. + + ok dtucker + +commit 8ff3fc3f2f7c13e8968717bc2b895ee32c441275 +Author: djm@openbsd.org +Date: Sat Mar 11 23:44:16 2017 +0000 + + upstream commit + + regress tests for loading certificates without public keys; + bz#2617 based on patch from Adam Eijdenberg; ok markus@ dtucker@ + + Upstream-Regress-ID: 0145d19328ed995b73fe2d9da33596b17429d0d0 + +commit 1e24552716194db8f2f620587b876158a9ef56ad +Author: djm@openbsd.org +Date: Sat Mar 11 23:40:26 2017 +0000 + + upstream commit + + allow ssh to use certificates accompanied by a private + key file but no corresponding plain *.pub public key. bz#2617 based on patch + from Adam Eijdenberg; ok dtucker@ markus@ + + Upstream-ID: 295668dca2c39505281577217583ddd2bd4b00b9 + +commit 0fb1a617a07b8df5de188dd5a0c8bf293d4bfc0e +Author: markus@openbsd.org +Date: Sat Mar 11 13:07:35 2017 +0000 + + upstream commit + + Don't count the initial block twice when computing how + many bytes to discard for the work around for the attacks against CBC-mode. + ok djm@; report from Jean Paul, Kenny, Martin and Torben @ RHUL + + Upstream-ID: f445f509a4e0a7ba3b9c0dae7311cb42458dc1e2 + +commit ef653dd5bd5777132d9f9ee356225f9ee3379504 +Author: dtucker@openbsd.org +Date: Fri Mar 10 07:18:32 2017 +0000 + + upstream commit + + krl.c + + Upstream-ID: fc5e695d5d107d730182e2da7b23f00b489e0ee1 + +commit d94c1dfef2ea30ca67b1204ada7c3b537c54f4d0 +Author: Damien Miller +Date: Sun Mar 12 10:48:14 2017 +1100 + + sync fmt_scaled.c with OpenBSD + + revision 1.13 + date: 2017/03/11 23:37:23; author: djm; state: Exp; lines: +14 -1; commitid: jnFKyHkB3CEiEZ2R; + fix signed integer overflow in scan_scaled. Found by Nicolas Iooss + using AFL against ssh_config. ok deraadt@ millert@ + ---------------------------- + revision 1.12 + date: 2013/11/29 19:00:51; author: deraadt; state: Exp; lines: +6 -5; + fairly simple unsigned char casts for ctype + ok krw + ---------------------------- + revision 1.11 + date: 2012/11/12 14:07:20; author: halex; state: Exp; lines: +4 -2; + make scan_scaled set errno to EINVAL rather than ERANGE if it encounters + an invalid multiplier, like the man page says it should + + "looks sensible" deraadt@, ok ian@ + ---------------------------- + revision 1.10 + date: 2009/06/20 15:00:04; author: martynas; state: Exp; lines: +4 -4; + use llabs instead of the home-grown version; and some comment changes + ok ian@, millert@ + ---------------------------- + +commit 894221a63fa061e52e414ca58d47edc5fe645968 +Author: djm@openbsd.org +Date: Fri Mar 10 05:01:13 2017 +0000 + + upstream commit + + When updating hostkeys, accept RSA keys if + HostkeyAlgorithms contains any RSA keytype. Previously, ssh could ignore RSA + keys when any of the ssh-rsa-sha2-* methods was enabled in HostkeyAlgorithms + nit ssh-rsa (SHA1 signatures) was not. bz#2650 reported by Luis Ressel; ok + dtucker@ + + Upstream-ID: c5e8cfee15c42f4a05d126158a0766ea06da79d2 + +commit dd3e2298663f4cc1a06bc69582d00dcfee27d73c +Author: djm@openbsd.org +Date: Fri Mar 10 04:24:55 2017 +0000 + + upstream commit + + make hostname matching really insensitive to case; + bz#2685, reported by Petr Cerny; ok dtucker@ + + Upstream-ID: e467622ff154269e36ba8b6c9e3d105e1c4a9253 + +commit 77a9be9446697fe8b5499fe651f4a82a71a4b51f +Author: djm@openbsd.org +Date: Fri Mar 10 03:52:48 2017 +0000 + + upstream commit + + reword a comment to make it fit 80 columns + + Upstream-ID: 4ef509a66b96c7314bbcc87027c2af71fa9d0ba4 + +commit 61b8ef6a66efaec07e023342cb94a10bdc2254dc +Author: djm@openbsd.org +Date: Fri Mar 10 04:27:32 2017 +0000 + + upstream commit + + better match sshd config parser behaviour: fatal() if + line is overlong, increase line buffer to match sshd's; bz#2651 reported by + Don Fong; ok dtucker@ + + Upstream-ID: b175ae7e0ba403833f1ee566edf10f67443ccd18 + +commit db2597207e69912f2592cd86a1de8e948a9d7ffb +Author: djm@openbsd.org +Date: Fri Mar 10 04:26:06 2017 +0000 + + upstream commit + + ensure hostname is lower-case before hashing it; + bz#2591 reported by Griff Miller II; ok dtucker@ + + Upstream-ID: c3b8b93804f376bd00d859b8bcd9fc0d86b4db17 + +commit df9936936c695f85c1038bd706d62edf752aca4b +Author: djm@openbsd.org +Date: Fri Mar 10 04:24:55 2017 +0000 + + upstream commit + + make hostname matching really insensitive to case; + bz#2685, reported by Petr Cerny; ok dtucker@ + + Upstream-ID: e632b7a9bf0d0558d5ff56dab98b7cca6c3db549 + +commit 67eed24bfa7645d88fa0b883745fccb22a0e527e +Author: dtucker@openbsd.org +Date: Fri Mar 10 04:11:00 2017 +0000 + + upstream commit + + Remove old null check from config dumper. Patch from + jjelen at redhat.com vi bz#2687, ok djm@ + + Upstream-ID: 824ab71467b78c4bab0dd1b3a38e8bc5f63dd528 + +commit 183ba55aaaecca0206184b854ad6155df237adbe +Author: djm@openbsd.org +Date: Fri Mar 10 04:07:20 2017 +0000 + + upstream commit + + fix regression in 7.4 server-sig-algs, where we were + accidentally excluding SHA2 RSA signature methods. bz#2680, patch from Nuno + Goncalves; ok dtucker@ + + Upstream-ID: 81ac8bfb30960447740b9b8f6a214dcf322f12e8 + +commit 66be4fe8c4435af5bbc82998501a142a831f1181 +Author: dtucker@openbsd.org +Date: Fri Mar 10 03:53:11 2017 +0000 + + upstream commit + + Check for NULL return value from key_new. Patch from + jjelen at redhat.com via bz#2687, ok djm@ + + Upstream-ID: 059e33cd43cba88dc8caf0b1936fd4dd88fd5b8e + +commit ec2892b5c7fea199914cb3a6afb3af38f84990bf +Author: djm@openbsd.org +Date: Fri Mar 10 03:52:48 2017 +0000 + + upstream commit + + reword a comment to make it fit 80 columns + + Upstream-ID: b4b48b4487c0821d16e812c40c9b09f03b28e349 + +commit 7fadbb6da3f4122de689165651eb39985e1cba85 +Author: dtucker@openbsd.org +Date: Fri Mar 10 03:48:57 2017 +0000 + + upstream commit + + Check for NULL argument to sshkey_read. Patch from + jjelen at redhat.com via bz#2687, ok djm@ + + Upstream-ID: c2d00c2ea50c4861d271d0a586f925cc64a87e0e + +commit 5a06b9e019e2b0b0f65a223422935b66f3749de3 +Author: dtucker@openbsd.org +Date: Fri Mar 10 03:45:40 2017 +0000 + + upstream commit + + Plug some mem leaks mostly on error paths. From jjelen + at redhat.com via bz#2687, ok djm@ + + Upstream-ID: 3fb030149598957a51b7c8beb32bf92cf30c96f2 + +commit f6edbe9febff8121f26835996b1229b5064d31b7 +Author: dtucker@openbsd.org +Date: Fri Mar 10 03:24:48 2017 +0000 + + upstream commit + + Plug mem leak on GLOB_NOMATCH case. From jjelen at + redhat.com via bz#2687, ok djm@ + + Upstream-ID: 8016a7ae97719d3aa55fb723fc2ad3200058340d + +commit 566b3a46e89a2fda2db46f04f2639e92da64a120 +Author: dtucker@openbsd.org +Date: Fri Mar 10 03:22:40 2017 +0000 + + upstream commit + + Plug descriptor leaks of auth_sock. From jjelen at + redhat.com via bz#2687, ok djm@ + + Upstream-ID: 248acb99a5ed2fdca37d1aa33c0fcee7be286d88 + +commit 8a2834454c73dfc1eb96453c0e97690595f3f4c2 +Author: djm@openbsd.org +Date: Fri Mar 10 03:18:24 2017 +0000 + + upstream commit + + correctly hash hosts with a port number. Reported by Josh + Powers in bz#2692; ok dtucker@ + + Upstream-ID: 468e357ff143e00acc05bdd2803a696b3d4b6442 + +commit 9747b9c742de409633d4753bf1a752cbd211e2d3 +Author: djm@openbsd.org +Date: Fri Mar 10 03:15:58 2017 +0000 + + upstream commit + + don't truncate off \r\n from long stderr lines; bz#2688, + reported by Brian Dyson; ok dtucker@ + + Upstream-ID: cdfdc4ba90639af807397ce996153c88af046ca4 + +commit 4a4b75adac862029a1064577eb5af299b1580cdd +Author: dtucker@openbsd.org +Date: Fri Mar 10 02:59:51 2017 +0000 + + upstream commit + + Validate digest arg in ssh_digest_final; from jjelen at + redhat.com via bz#2687, ok djm@ + + Upstream-ID: dbe5494dfddfe523fab341a3dab5a79e7338f878 + +commit bee0167be2340d8de4bdc1ab1064ec957c85a447 +Author: Darren Tucker +Date: Fri Mar 10 13:40:18 2017 +1100 + + Check for NULL from malloc. + + Part of bz#2687, from jjelen at redhat.com. + +commit da39b09d43b137a5a3d071b51589e3efb3701238 +Author: Darren Tucker +Date: Fri Mar 10 13:22:32 2017 +1100 + + If OSX is using launchd, remove screen no. + + Check for socket with and without screen number. From Apple and Jakob + Schlyter via bz#2341, with contributions from Ron Frederick, ok djm@ + +commit 8fb15311a011517eb2394bb95a467c209b8b336c +Author: djm@openbsd.org +Date: Wed Mar 8 12:07:47 2017 +0000 + + upstream commit + + quote [host]:port in generated ProxyJump commandline; the + [ / ] characters can confuse some shells (e.g. zsh). Reported by Lauri + Tirkkonen via bugs@ + + Upstream-ID: 65cdd161460e1351c3d778e974c1c2a4fa4bc182 + +commit 18501151cf272a15b5f2c5e777f2e0933633c513 +Author: dtucker@openbsd.org +Date: Mon Mar 6 02:03:20 2017 +0000 + + upstream commit + + Check l->hosts before dereferencing; fixes potential null + pointer deref. ok djm@ + + Upstream-ID: 81c0327c6ec361da794b5c680601195cc23d1301 + +commit d072370793f1a20f01ad827ba8fcd3b8f2c46165 +Author: dtucker@openbsd.org +Date: Mon Mar 6 00:44:51 2017 +0000 + + upstream commit + + linenum is unsigned long so use %lu in log formats. ok + deraadt@ + + Upstream-ID: 9dc582d9bb887ebe0164e030d619fc20b1a4ea08 + +commit 12d3767ba4c84c32150cbe6ff6494498780f12c9 +Author: djm@openbsd.org +Date: Fri Mar 3 06:13:11 2017 +0000 + + upstream commit + + fix ssh-keygen -H accidentally corrupting known_hosts that + contained already-hashed entries. HKF_MATCH_HOST_HASHED is only set by + hostkeys_foreach() when hostname matching is in use, so we need to look for + the hash marker explicitly. + + Upstream-ID: da82ad653b93e8a753580d3cf5cd448bc2520528 + +commit d7abb771bd5a941b26144ba400a34563a1afa589 +Author: djm@openbsd.org +Date: Tue Feb 28 06:10:08 2017 +0000 + + upstream commit + + small memleak: free fd_set on connection timeout (though + we are heading to exit anyway). From Tom Rix in bz#2683 + + Upstream-ID: 10e3dadbb8199845b66581473711642d9e6741c4 + +commit 78142e3ab3887e53a968d6e199bcb18daaf2436e +Author: jmc@openbsd.org +Date: Mon Feb 27 14:30:33 2017 +0000 + + upstream commit + + errant dot; from klemens nanni + + Upstream-ID: 83d93366a5acf47047298c5d3ebc5e7426f37921 + +commit 8071a6924c12bb51406a9a64a4b2892675112c87 +Author: djm@openbsd.org +Date: Fri Feb 24 03:16:34 2017 +0000 + + upstream commit + + might as well set the listener socket CLOEXEC + + Upstream-ID: 9c538433d6a0ca79f5f21decc5620e46fb68ab57 + +commit d5499190559ebe374bcdfa8805408646ceffad64 +Author: djm@openbsd.org +Date: Sun Feb 19 00:11:29 2017 +0000 + + upstream commit + + add test cases for C locale; ok schwarze@ + + Upstream-Regress-ID: 783d75de35fbc923d46e2a5e6cee30f8f381ba87 + +commit 011c8ffbb0275281a0cf330054cf21be10c43e37 +Author: djm@openbsd.org +Date: Sun Feb 19 00:10:57 2017 +0000 + + upstream commit + + Add a common nl_langinfo(CODESET) alias for US-ASCII + "ANSI_X3.4-1968" that is used by Linux. Fixes mprintf output truncation for + non-UTF-8 locales on Linux spotted by dtucker@; ok deraadt@ schwarze@ + + Upstream-ID: c6808956ebffd64066f9075d839f74ff0dd60719 + +commit 0c4430a19b73058a569573492f55e4c9eeaae67b +Author: dtucker@openbsd.org +Date: Tue Feb 7 23:03:11 2017 +0000 + + upstream commit + + Remove deprecated SSH1 options RSAAuthentication and + RhostsRSAAuthentication from regression test sshd_config. + + Upstream-Regress-ID: 8066b753d9dce7cf02ff87af5c727ff680d99491 + +commit 3baa4cdd197c95d972ec3d07f1c0d08f2d7d9199 +Author: dtucker@openbsd.org +Date: Fri Feb 17 02:32:05 2017 +0000 + + upstream commit + + Do not show rsa1 key type in usage when compiled without + SSH1 support. + + Upstream-ID: 068b5c41357a02f319957746fa4e84ea73960f57 + +commit ecc35893715f969e98fee118481f404772de4132 +Author: dtucker@openbsd.org +Date: Fri Feb 17 02:31:14 2017 +0000 + + upstream commit + + ifdef out "rsa1" from the list of supported keytypes when + compiled without SSH1 support. Found by kdunlop at guralp.com, ok djm@ + + Upstream-ID: cea93a26433d235bb1d64b1d990f19a9c160a70f + +commit 10577c6d96a55b877a960b2d0b75edef1b9945af +Author: djm@openbsd.org +Date: Fri Feb 17 02:04:15 2017 +0000 + + upstream commit + + For ProxyJump/-J, surround host name with brackets to + allow literal IPv6 addresses. From Dick Visser; ok dtucker@ + + Upstream-ID: 3a5d3b0171250daf6a5235e91bce09c1d5746bf1 + +commit b2afdaf1b52231aa23d2153f4a8c5a60a694dda4 +Author: jsg@openbsd.org +Date: Wed Feb 15 23:38:31 2017 +0000 + + upstream commit + + Fix memory leaks in match_filter_list() error paths. + + ok dtucker@ markus@ + + Upstream-ID: c7f96ac0877f6dc9188bbc908100a8d246cc7f0e + +commit 6d5a41b38b55258213ecfaae9df7a758caa752a1 +Author: djm@openbsd.org +Date: Wed Feb 15 01:46:47 2017 +0000 + + upstream commit + + fix division by zero crash in "df" output when server + returns zero total filesystem blocks/inodes. Spotted by Guido Vranken; ok + dtucker@ + + Upstream-ID: 6fb6c2ae6b289aa07b6232dbc0be54682ef5419f + +commit bd5d7d239525d595ecea92765334af33a45d9d63 +Author: Darren Tucker +Date: Sun Feb 12 15:45:15 2017 +1100 + + ifdef out EVP_R_PRIVATE_KEY_DECODE_ERROR + + EVP_R_PRIVATE_KEY_DECODE_ERROR was added in OpenSSL 1.0.0 so ifdef out + for the benefit of OpenSSL versions prior to that. + +commit 155d540d00ff55f063421ec182ec8ff2b7ab6cbe +Author: djm@openbsd.org +Date: Fri Feb 10 04:34:50 2017 +0000 + + upstream commit + + bring back r1.34 that was backed out for problems loading + public keys: + + translate OpenSSL error codes to something more + meaninful; bz#2522 reported by Jakub Jelen, ok dtucker@ + + with additional fix from Jakub Jelen to solve the backout. + bz#2525 bz#2523 re-ok dtucker@ + + Upstream-ID: a9d5bc0306f4473d9b4f4484f880e95f3c1cc031 + +commit a287c5ad1e0bf9811c7b9221979b969255076019 +Author: djm@openbsd.org +Date: Fri Feb 10 03:36:40 2017 +0000 + + upstream commit + + Sanitise escape sequences in key comments sent to printf + but preserve valid UTF-8 when the locale supports it; bz#2520 ok dtucker@ + + Upstream-ID: e8eed28712ba7b22d49be534237eed019875bd1e + +commit e40269be388972848aafcca7060111c70aab5b87 +Author: millert@openbsd.org +Date: Wed Feb 8 20:32:43 2017 +0000 + + upstream commit + + Avoid printf %s NULL. From semarie@, OK djm@ + + Upstream-ID: 06beef7344da0208efa9275d504d60d2a5b9266c + +commit 5b90709ab8704dafdb31e5651073b259d98352bc +Author: djm@openbsd.org +Date: Mon Feb 6 09:22:51 2017 +0000 + + upstream commit + + Restore \r\n newline sequence for server ident string. The CR + got lost in the flensing of SSHv1. Pointed out by Stef Bon + + Upstream-ID: 5333fd43ce5396bf5999496096fac5536e678fac + +commit 97c31c46ee2e6b46dfffdfc4f90bbbf188064cbc +Author: djm@openbsd.org +Date: Fri Feb 3 23:01:42 2017 +0000 + + upstream commit + + unit test for match_filter_list() function; still want a + better name for this... + + Upstream-Regress-ID: 840ad6118552c35111f0a897af9c8d93ab8de92a + +commit f1a193464a7b77646f0d0cedc929068e4a413ab4 +Author: djm@openbsd.org +Date: Fri Feb 3 23:05:57 2017 +0000 + + upstream commit + + use ssh_packet_set_log_preamble() to include connection + username in packet log messages, e.g. + + Connection closed by invalid user foo 10.1.1.1 port 44056 [preauth] + + ok markus@ bz#113 + + Upstream-ID: 3591b88bdb5416d6066fb3d49d8fff2375bf1a15 + +commit 07edd7e9537ab32aa52abb5fb2a915c350fcf441 +Author: djm@openbsd.org +Date: Fri Feb 3 23:03:33 2017 +0000 + + upstream commit + + add ssh_packet_set_log_preamble() to allow inclusion of a + preamble string in disconnect messages; ok markus@ + + Upstream-ID: 34cb41182cd76d414c214ccb01c01707849afead + +commit 68bc8cfa7642d3ccbf2cd64281c16b8b9205be59 +Author: djm@openbsd.org +Date: Fri Feb 3 23:01:19 2017 +0000 + + upstream commit + + support =- for removing methods from algorithms lists, + e.g. Ciphers=-*cbc; suggested by Cristian Ionescu-Idbohrn in bz#2671 "I like + it" markus@ + + Upstream-ID: c78c38f9f81a963b33d0eade559f6048add24a6d + +commit c924b2ef941028a1f31e6e94f54dfeeeef462a4e +Author: djm@openbsd.org +Date: Fri Feb 3 05:05:56 2017 +0000 + + upstream commit + + allow form-feed characters at EOL; bz#2431 ok dtucker@ + + Upstream-ID: 1f453afaba6da2ae69d6afdf1ae79a917552f1a2 + +commit 523db8540b720c4d21ab0ff6f928476c70c38aab +Author: Damien Miller +Date: Fri Feb 3 16:01:22 2017 +1100 + + prefer to use ldns-config to find libldns + + Should fix bz#2603 - "Build with ldns and without kerberos support + fails if ldns compiled with kerberos support" by including correct + cflags/libs + + ok dtucker@ + +commit c998bf0afa1a01257a53793eba57941182e9e0b7 +Author: dtucker@openbsd.org +Date: Fri Feb 3 02:56:00 2017 +0000 + + upstream commit + + Make ssh_packet_set_rekey_limits take u32 for the number of + seconds until rekeying (negative values are rejected at config parse time). + This allows the removal of some casts and a signed vs unsigned comparison + warning. + + rekey_time is cast to int64 for the comparison which is a no-op + on OpenBSD, but should also do the right thing in -portable on + anything still using 32bit time_t (until the system time actually + wraps, anyway). + + some early guidance deraadt@, ok djm@ + + Upstream-ID: c9f18613afb994a07e7622eb326f49de3d123b6c + +commit 3ec5fa4ba97d4c4853620daea26a33b9f1fe3422 +Author: jsg@openbsd.org +Date: Thu Feb 2 10:54:25 2017 +0000 + + upstream commit + + In vasnmprintf() return an error if malloc fails and + don't set a function argument to the address of free'd memory. + + ok djm@ + + Upstream-ID: 1efffffff2f51d53c9141f245b90ac23d33b9779 + +commit 858252fb1d451ebb0969cf9749116c8f0ee42753 +Author: dtucker@openbsd.org +Date: Wed Feb 1 02:59:09 2017 +0000 + + upstream commit + + Return true reason for port forwarding failures where + feasible rather than always "administratively prohibited". bz#2674, ok djm@ + + Upstream-ID: d901d9887951774e604ca970e1827afaaef9e419 + +commit 6ba9f893838489add6ec4213c7a997b425e4a9e0 +Author: dtucker@openbsd.org +Date: Mon Jan 30 23:27:39 2017 +0000 + + upstream commit + + Small correction to the known_hosts section on when it is + updated. Patch from lkppo at free.fr some time ago, pointed out by smallm at + sdf.org + + Upstream-ID: 1834d7af179dea1a12ad2137f84566664af225d5 + +commit c61d5ec3c11e7ff9779b6127421d9f166cf10915 +Author: Darren Tucker +Date: Fri Feb 3 14:10:34 2017 +1100 + + Remove _XOPEN_SOURCE from wide char detection. + + Having _XOPEN_SOURCE unconditionally causes problems on some platforms + and configurations, notably Solaris 64-bit binaries. It was there for + the benefit of Linux put the required bits in the *-*linux* section. + + Patch from yvoinov at gmail.com. + +commit f25ee13b3e81fd80efeb871dc150fe49d7fc8afd +Author: djm@openbsd.org +Date: Mon Jan 30 05:22:14 2017 +0000 + + upstream commit + + fully unbreak: some $SSH invocations did not have -F + specified and could pick up the ~/.ssh/config of the user running the tests + + Upstream-Regress-ID: f362d1892c0d3e66212d5d3fc02d915c58ef6b89 + +commit 6956e21fb26652887475fe77ea40d2efcf25908b +Author: djm@openbsd.org +Date: Mon Jan 30 04:54:07 2017 +0000 + + upstream commit + + partially unbreak: was not specifying hostname on some + $SSH invocations + + Upstream-Regress-ID: bc8a5e98e57bad0a92ef4f34ed91c1d18294e2cc + +commit 52763dd3fe0a4678dafdf7aeb32286e514130afc +Author: djm@openbsd.org +Date: Mon Jan 30 01:03:00 2017 +0000 + + upstream commit + + revise keys/principals command hang fix (bz#2655) to + consume entire output, avoiding sending SIGPIPE to subprocesses early; ok + dtucker@ + + Upstream-ID: 7cb04b31a61f8c78c4e48ceededcd2fd5c4ee1bc + +commit 381a2615a154a82c4c53b787f4a564ef894fe9ac +Author: djm@openbsd.org +Date: Mon Jan 30 00:38:50 2017 +0000 + + upstream commit + + small cleanup post SSHv1 removal: + + remove SSHv1-isms in commented examples + + reorder token table to group deprecated and compile-time conditional tokens + better + + fix config dumping code for some compile-time conditional options that + weren't being correctly skipped (SSHv1 and PKCS#11) + + Upstream-ID: f2e96b3cb3158d857c5a91ad2e15925df3060105 + +commit 4833d01591b7eb049489d9558b65f5553387ed43 +Author: djm@openbsd.org +Date: Mon Jan 30 00:34:01 2017 +0000 + + upstream commit + + some explicit NULL tests when dumping configured + forwardings; from Karsten Weiss + + Upstream-ID: 40957b8dea69672b0e50df6b4a91a94e3e37f72d + +commit 326e2fae9f2e3e067b5651365eba86b35ee5a6b2 +Author: djm@openbsd.org +Date: Mon Jan 30 00:32:28 2017 +0000 + + upstream commit + + misplaced braces in test; from Karsten Weiss + + Upstream-ID: f7b794074d3aae8e35b69a91d211c599c94afaae + +commit 3e032a95e46bfaea9f9e857678ac8fa5f63997fb +Author: djm@openbsd.org +Date: Mon Jan 30 00:32:03 2017 +0000 + + upstream commit + + don't dereference authctxt before testing != NULL, it + causes compilers to make assumptions; from Karsten Weiss + + Upstream-ID: 794243aad1e976ebc717885b7a97a25e00c031b2 + +commit 01cfaa2b1cfb84f3cdd32d1bf82b120a8d30e057 +Author: djm@openbsd.org +Date: Fri Jan 6 02:51:16 2017 +0000 + + upstream commit + + use correct ssh-add program; bz#2654, from Colin Watson + + Upstream-Regress-ID: 7042a36e1bdaec6562f6e57e9d047efe9c7a6030 + +commit e5c7ec67cdc42ae2584085e0fc5cc5ee91133cf5 +Author: dtucker@openbsd.org +Date: Fri Jan 6 02:26:10 2017 +0000 + + upstream commit + + Account for timeouts in the integrity tests as failures. + + If the first test in a series for a given MAC happens to modify the low + bytes of a packet length, then ssh will time out and this will be + interpreted as a test failure. Patch from cjwatson at debian.org via + bz#2658. + + Upstream-Regress-ID: e7467613b0badedaa300bc6fc7495ec2f44e2fb9 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Aug 4 13:08:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5CEADD8B97; Fri, 4 Aug 2017 13:08:47 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 744A467652; Fri, 4 Aug 2017 13:08:47 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v74D8k6I034334; Fri, 4 Aug 2017 13:08:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v74D8kDd034330; Fri, 4 Aug 2017 13:08:46 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201708041308.v74D8kDd034330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 4 Aug 2017 13:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322053 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 322053 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 13:08:47 -0000 Author: andrew Date: Fri Aug 4 13:08:45 2017 New Revision: 322053 URL: https://svnweb.freebsd.org/changeset/base/322053 Log: Start to teach the GICv3 driver about NUMA. On ThunderX we may have multiple ITS devices, however we only want a single ITS device to be configured on each CPU. To fix this only enable ITS when the node matches the CPUs node. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/gic_v3.c head/sys/arm64/arm64/gic_v3_fdt.c head/sys/arm64/arm64/gic_v3_var.h head/sys/arm64/arm64/gicv3_its.c Modified: head/sys/arm64/arm64/gic_v3.c ============================================================================== --- head/sys/arm64/arm64/gic_v3.c Fri Aug 4 12:57:24 2017 (r322052) +++ head/sys/arm64/arm64/gic_v3.c Fri Aug 4 13:08:45 2017 (r322053) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include "gic_v3_reg.h" #include "gic_v3_var.h" +static bus_get_domain_t gic_v3_get_domain; static bus_read_ivar_t gic_v3_read_ivar; static pic_disable_intr_t gic_v3_disable_intr; @@ -97,6 +98,7 @@ static device_method_t gic_v3_methods[] = { DEVMETHOD(device_detach, gic_v3_detach), /* Bus interface */ + DEVMETHOD(bus_get_domain, gic_v3_get_domain), DEVMETHOD(bus_read_ivar, gic_v3_read_ivar), /* Interrupt controller interface */ @@ -347,6 +349,19 @@ gic_v3_detach(device_t dev) free(sc->gic_res, M_GIC_V3); free(sc->gic_redists.regions, M_GIC_V3); + return (0); +} + +static int +gic_v3_get_domain(device_t dev, device_t child, int *domain) +{ + struct gic_v3_devinfo *di; + + di = device_get_ivars(child); + if (di->gic_domain < 0) + return (ENOENT); + + *domain = di->gic_domain; return (0); } Modified: head/sys/arm64/arm64/gic_v3_fdt.c ============================================================================== --- head/sys/arm64/arm64/gic_v3_fdt.c Fri Aug 4 12:57:24 2017 (r322052) +++ head/sys/arm64/arm64/gic_v3_fdt.c Fri Aug 4 13:08:45 2017 (r322053) @@ -186,6 +186,7 @@ error: /* OFW bus interface */ struct gic_v3_ofw_devinfo { + struct gic_v3_devinfo di_gic_dinfo; struct ofw_bus_devinfo di_dinfo; struct resource_list di_rl; }; @@ -281,6 +282,14 @@ gic_v3_ofw_bus_attach(device_t dev) for (node = OF_child(parent); node > 0; node = OF_peer(node)) { /* Allocate and populate devinfo. */ di = malloc(sizeof(*di), M_GIC_V3, M_WAITOK | M_ZERO); + + /* Read the numa node, or -1 if there is none */ + if (OF_getencprop(node, "numa-node-id", + &di->di_gic_dinfo.gic_domain, + sizeof(di->di_gic_dinfo.gic_domain)) <= 0) { + di->di_gic_dinfo.gic_domain = -1; + } + if (ofw_bus_gen_setup_devinfo(&di->di_dinfo, node)) { if (bootverbose) { device_printf(dev, Modified: head/sys/arm64/arm64/gic_v3_var.h ============================================================================== --- head/sys/arm64/arm64/gic_v3_var.h Fri Aug 4 12:57:24 2017 (r322052) +++ head/sys/arm64/arm64/gic_v3_var.h Fri Aug 4 13:08:45 2017 (r322053) @@ -82,6 +82,11 @@ struct gic_v3_softc { struct gic_v3_irqsrc *gic_irqs; }; + +struct gic_v3_devinfo { + int gic_domain; +}; + #define GIC_INTR_ISRC(sc, irq) (&sc->gic_irqs[irq].gi_isrc) MALLOC_DECLARE(M_GIC_V3); Modified: head/sys/arm64/arm64/gicv3_its.c ============================================================================== --- head/sys/arm64/arm64/gicv3_its.c Fri Aug 4 12:57:24 2017 (r322052) +++ head/sys/arm64/arm64/gicv3_its.c Fri Aug 4 13:08:45 2017 (r322053) @@ -576,6 +576,12 @@ its_init_cpu(device_t dev, struct gicv3_its_softc *sc) uint64_t xbaser, tmp; uint32_t ctlr; u_int cpuid; + int domain; + + if (bus_get_domain(dev, &domain) == 0) { + if (PCPU_GET(domain) != domain) + return (0); + } gicv3 = device_get_parent(dev); cpuid = PCPU_GET(cpuid); From owner-svn-src-head@freebsd.org Fri Aug 4 13:47:52 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35024DAB9EE; Fri, 4 Aug 2017 13:47:52 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 06E65690CF; Fri, 4 Aug 2017 13:47:51 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-pf0-f195.google.com with SMTP id h75so1936046pfh.5; Fri, 04 Aug 2017 06:47:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=+cUnZPtf8F5i7i1U3WidRZhzJa9Arua31+BW4wA4yDE=; b=Vyd70VTDDJspAOc/+CNO8uYvd9En9mvxFTstQ381ytjyQcNjKiJgsYTgaDTlkb3gmu VFQiY0ThdrVmBy/xYFD6JAAkXmGUIl/sUVWUPD5hmdQZDHCAB4yiqrWV8ymurDGPUMra mPZ1XSs5qiEsoNqOI6UuE3y3/XeZU4N9CvJ9ljdGnRC3jIN8423fBsF605wjW1Z306rY YhYuw3Gh+jm5BFZHhsXQRfeKbD+hLR0nGbhfqUr4ExGz59DpR5gmpyU/hBcadrgpcYpF YhSAye2XTIJP7r8I1jz9UdYkV/1d34g2cBQwUB2+rNk+q7ZrBNwR6vvQaBHOrgHRUZZX b9gw== X-Gm-Message-State: AIVw112nuBnHWQf9ltib+jzgtMHvkmR79ms0eObf2iFhcksv51KJvn1n HRGsFx9W4Gg0Sye8/8c= X-Received: by 10.84.167.2 with SMTP id c2mr2848681plb.366.1501854470648; Fri, 04 Aug 2017 06:47:50 -0700 (PDT) Received: from mail-pg0-f43.google.com (mail-pg0-f43.google.com. [74.125.83.43]) by smtp.gmail.com with ESMTPSA id 80sm3372081pfr.90.2017.08.04.06.47.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Aug 2017 06:47:50 -0700 (PDT) Received: by mail-pg0-f43.google.com with SMTP id l64so8236676pge.5; Fri, 04 Aug 2017 06:47:50 -0700 (PDT) X-Received: by 10.101.90.7 with SMTP id y7mr2363885pgs.29.1501854470200; Fri, 04 Aug 2017 06:47:50 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.100.169.8 with HTTP; Fri, 4 Aug 2017 06:47:49 -0700 (PDT) In-Reply-To: <0100015dabf99099-b39e4e26-cd45-4099-aa91-49820f55aacd-000000@email.amazonses.com> References: <201708030918.v739IPVY034866@repo.freebsd.org> <0100015dabf99099-b39e4e26-cd45-4099-aa91-49820f55aacd-000000@email.amazonses.com> From: Conrad Meyer Date: Fri, 4 Aug 2017 06:47:49 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r321985 - head/sys/ofed/drivers/infiniband/core To: Colin Percival Cc: Hans Petter Selasky , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 13:47:52 -0000 On Thu, Aug 3, 2017 at 11:40 PM, Colin Percival wrote: > On 08/03/17 23:28, Hans Petter Selasky wrote: >> On 08/03/17 16:37, Conrad Meyer wrote: >>> Is it not important that the subtraction and result are evaluated >>> without truncation? >> >> ticks is a circular counter. Assuming time = 0 and jiffies = -1U, then "delay" >> becomes a very large negative value, because long is used, and the delay <= 0 >> check, is no longer working like expected. >> >> Casting to "int" or truncating is the right thing to do in this case. > > Signed integer overflow is undefined. Using 'int' is liable to cause problems > after 2^32 ticks. It is undefined in C, but defined in practice with -fwrapv, which the kernel relies upon already. Best, Conrad From owner-svn-src-head@freebsd.org Fri Aug 4 14:24:26 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52389DB2AC6; Fri, 4 Aug 2017 14:24:26 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28DE56A5FF; Fri, 4 Aug 2017 14:24:26 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v74EOPq5067804; Fri, 4 Aug 2017 14:24:25 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v74EOOcm067800; Fri, 4 Aug 2017 14:24:24 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201708041424.v74EOOcm067800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Fri, 4 Aug 2017 14:24:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322054 - head/lib/libutil X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/lib/libutil X-SVN-Commit-Revision: 322054 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 14:24:26 -0000 Author: oshogbo Date: Fri Aug 4 14:24:24 2017 New Revision: 322054 URL: https://svnweb.freebsd.org/changeset/base/322054 Log: Introduce the flopenat(3) function. Reviewed by: des, emaste Differential Revision: https://reviews.freebsd.org/D11690 Modified: head/lib/libutil/Makefile head/lib/libutil/flopen.3 head/lib/libutil/flopen.c head/lib/libutil/libutil.h Modified: head/lib/libutil/Makefile ============================================================================== --- head/lib/libutil/Makefile Fri Aug 4 13:08:45 2017 (r322053) +++ head/lib/libutil/Makefile Fri Aug 4 14:24:24 2017 (r322054) @@ -35,6 +35,7 @@ MAN+= expand_number.3 flopen.3 fparseln.3 hexdump.3 \ property.3 pty.3 quotafile.3 realhostname.3 realhostname_sa.3 \ _secure_path.3 trimdomain.3 uucplock.3 pw_util.3 MAN+= login.conf.5 +MLINKS+=flopen.3 flopenat.3 MLINKS+=kld.3 kld_isloaded.3 kld.3 kld_load.3 MLINKS+=login_auth.3 auth_cat.3 login_auth.3 auth_checknologin.3 MLINKS+=login_cap.3 login_close.3 login_cap.3 login_getcapbool.3 \ Modified: head/lib/libutil/flopen.3 ============================================================================== --- head/lib/libutil/flopen.3 Fri Aug 4 13:08:45 2017 (r322053) +++ head/lib/libutil/flopen.3 Fri Aug 4 14:24:24 2017 (r322054) @@ -25,11 +25,12 @@ .\" .\" $FreeBSD$ .\" -.Dd June 6, 2009 +.Dd July 28, 2017 .Dt FLOPEN 3 .Os .Sh NAME -.Nm flopen +.Nm flopen , +.Nm flopenat .Nd "Reliably open and lock a file" .Sh LIBRARY .Lb libutil @@ -40,6 +41,10 @@ .Fn flopen "const char *path" "int flags" .Ft int .Fn flopen "const char *path" "int flags" "mode_t mode" +.Ft int +.Fn flopenat "int fd" "const char *path" "int flags" +.Ft int +.Fn flopenat "int fd" "const char *path" "int flags" "mode_t mode" .Sh DESCRIPTION The .Fn flopen @@ -79,6 +84,27 @@ argument is required if .Va flags includes .Dv O_CREAT . +.Pp +The +.Fn flopenat +function is equivalent to the +.Fn flopen +function except in the case where the +.Fa path +specifies a relative path. +In this case the file to be opened is determined relative to the directory +associated with the file descriptor +.Fa fd +instead of the current working directory. +If +.Fn flopenat +is passed the special value +.Dv AT_FDCWD +in the +.Fa fd +parameter, the current working directory is used +and the behavior is identical to a call to +.Fn flopen . .Sh RETURN VALUES If successful, .Fn flopen Modified: head/lib/libutil/flopen.c ============================================================================== --- head/lib/libutil/flopen.c Fri Aug 4 13:08:45 2017 (r322053) +++ head/lib/libutil/flopen.c Fri Aug 4 14:24:24 2017 (r322054) @@ -45,8 +45,8 @@ __FBSDID("$FreeBSD$"); * code's apparent simplicity; there would be no need for this function if it * was easy to get right. */ -int -flopen(const char *path, int flags, ...) +static int +vflopenat(int dirfd, const char *path, int flags, va_list ap) { int fd, operation, serrno, trunc; struct stat sb, fsb; @@ -58,11 +58,7 @@ flopen(const char *path, int flags, ...) mode = 0; if (flags & O_CREAT) { - va_list ap; - - va_start(ap, flags); mode = (mode_t)va_arg(ap, int); /* mode_t promoted to int */ - va_end(ap); } operation = LOCK_EX; @@ -73,7 +69,7 @@ flopen(const char *path, int flags, ...) flags &= ~O_TRUNC; for (;;) { - if ((fd = open(path, flags, mode)) == -1) + if ((fd = openat(dirfd, path, flags, mode)) == -1) /* non-existent or no access */ return (-1); if (flock(fd, operation) == -1) { @@ -83,7 +79,7 @@ flopen(const char *path, int flags, ...) errno = serrno; return (-1); } - if (stat(path, &sb) == -1) { + if (fstatat(dirfd, path, &sb, 0) == -1) { /* disappeared from under our feet */ (void)close(fd); continue; @@ -122,4 +118,28 @@ flopen(const char *path, int flags, ...) #endif return (fd); } +} + +int +flopen(const char *path, int flags, ...) +{ + va_list ap; + int ret; + + va_start(ap, flags); + ret = vflopenat(AT_FDCWD, path, flags, ap); + va_end(ap); + return (ret); +} + +int +flopenat(int dirfd, const char *path, int flags, ...) +{ + va_list ap; + int ret; + + va_start(ap, flags); + ret = vflopenat(dirfd, path, flags, ap); + va_end(ap); + return (ret); } Modified: head/lib/libutil/libutil.h ============================================================================== --- head/lib/libutil/libutil.h Fri Aug 4 13:08:45 2017 (r322053) +++ head/lib/libutil/libutil.h Fri Aug 4 14:24:24 2017 (r322054) @@ -93,6 +93,7 @@ int expand_number(const char *_buf, uint64_t *_num); int extattr_namespace_to_string(int _attrnamespace, char **_string); int extattr_string_to_namespace(const char *_string, int *_attrnamespace); int flopen(const char *_path, int _flags, ...); +int flopenat(int _dirfd, const char *_path, int _flags, ...); int forkpty(int *_amaster, char *_name, struct termios *_termp, struct winsize *_winp); void hexdump(const void *_ptr, int _length, const char *_hdr, int _flags); From owner-svn-src-head@freebsd.org Fri Aug 4 14:50:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E8D4DB4451; Fri, 4 Aug 2017 14:50:34 +0000 (UTC) (envelope-from jlehen@gmail.com) Received: from mail-qk0-x22c.google.com (mail-qk0-x22c.google.com [IPv6:2607:f8b0:400d:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD8726B804; Fri, 4 Aug 2017 14:50:33 +0000 (UTC) (envelope-from jlehen@gmail.com) Received: by mail-qk0-x22c.google.com with SMTP id a77so10267357qkb.0; Fri, 04 Aug 2017 07:50:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=D6CqvYbvyuxKXdJhOpWfpLQjEcmf+axEdk+NOihaap8=; b=jQ8GbLeqVAlKfJ4wXrUvQ186uacgYdod+8IBvHwj26bPv+9y3e7UBf0bMQ9588d19O h9w+MBon1PpWJ8JFszXPyS9W0m5CHlN6chiu5KPcGEgowdOOfRbzrewQRWM/Lq+DsL+6 n/2SyLSJqIh7scrFaPkD4znHu0/oLMiOTzImQ/MKOMC8wW2rYWcBotnOTxiw7xqEbSdy 0+OVgqntYV8Ytbzf1ZVEDaELigRCRRhwjPug2sjmUyB2ZlLTeZBjZSiA7NcIAlMKAAqN pVvTkqQwczomK/xp/iVHF+TkK4G0GwTwogtNtI7qE4ODOGahOWfBn4CNwjEHAI4of0VE HClA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=D6CqvYbvyuxKXdJhOpWfpLQjEcmf+axEdk+NOihaap8=; b=cF5iXqgxmifP8xIVIYOU6kdtXw7l+6fF37wh7SWb0ZgFMkhNA9RA11nysatjUaaQXN k1eAsgoZwesa2xG+vTemDQO6ncos40WevSPfQ3tc/b0ETsyeGIkXxp1x4Ie3PyqiebOb Xx+lNOc8YoFNZdr4lvuhNT7Yr1do+X9DvDcQ5sHFd1tkK7liQCJT3MqoNkCMlgzp4yMP M8/0ZgIlNmZBSmafvmVaT6xXw/l2rN1uJFG+BSf9ZhRtfIbgK4cy/m4qlFuXZB+mbC6Z FIxb3rposOrt8FUglwiBCllRHlR/pXxtR5fEawaxDvGTpZmd2F8bHZO1y/O+3KoZN/oM ktDg== X-Gm-Message-State: AHYfb5jodbAun3Pieo2vp4fKgsu0KlYclSkYVv6FvCB1c+/GHGRCczsv lsf7PLTO2cMpiVC8wCX5mPKG/knN2S13 X-Received: by 10.55.2.193 with SMTP id v62mr3077864qkg.231.1501858233057; Fri, 04 Aug 2017 07:50:33 -0700 (PDT) MIME-Version: 1.0 Sender: jlehen@gmail.com Received: by 10.12.180.155 with HTTP; Fri, 4 Aug 2017 07:50:32 -0700 (PDT) In-Reply-To: References: <201708032130.v73LUC2H045637@repo.freebsd.org> From: Jeremie Le Hen Date: Fri, 4 Aug 2017 16:50:32 +0200 X-Google-Sender-Auth: vr10i75qdgKD_i9LY9FU8nK8ito Message-ID: Subject: Re: svn commit: r322029 - in head: usr.bin usr.sbin To: "Ngie Cooper (yaneurabeya)" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 14:50:34 -0000 On Fri, Aug 4, 2017 at 12:42 AM, Ngie Cooper (yaneurabeya) wrote: > >> On Aug 3, 2017, at 14:30, Jeremie Le Hen wrote: >> >> Author: jlh >> Date: Thu Aug 3 21:30:12 2017 >> New Revision: 322029 >> URL: https://svnweb.freebsd.org/changeset/base/322029 >> >> Log: >> rwho/ruptime/rwhod shouldn't be gated by RCMDS. > > The why in this commit and the next you made (r322031) would have been incredibly helpful. If bugzilla disappears I only have the commit history tracking the what. I agree, I realized this only afterwards. I don't know how to fix this though. > Cheers, > -Ngie -- Jeremie Le Hen jlh@FreeBSD.org From owner-svn-src-head@freebsd.org Fri Aug 4 15:25:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC6C4DB611D; Fri, 4 Aug 2017 15:25:53 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B64BB6CC12; Fri, 4 Aug 2017 15:25:52 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.16.0.17/8.16.0.17) with SMTP id v74CpF4P006502; Fri, 4 Aug 2017 10:25:50 -0500 Received: from mh1.mail.rice.edu (mh1.mail.rice.edu [128.42.201.20]) by pp2.rice.edu with ESMTP id 2c486u8a7m-1; Fri, 04 Aug 2017 10:25:50 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh1.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh1.mail.rice.edu (Postfix) with ESMTPSA id 08C70460CF1; Fri, 4 Aug 2017 10:25:49 -0500 (CDT) Subject: Re: svn commit: r322041 - head/sys/kern To: Oliver Pinter , Alan Cox Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <201708040423.v744NOix022999@repo.freebsd.org> From: Alan Cox Message-ID: <773de469-dc2f-d335-2506-bdf0a4db848a@rice.edu> Date: Fri, 4 Aug 2017 10:25:49 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=35 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611190142 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 15:25:54 -0000 On 08/04/2017 02:57, Oliver Pinter wrote: > > > On Friday, August 4, 2017, Alan Cox > wrote: > > Author: alc > Date: Fri Aug 4 04:23:23 2017 > New Revision: 322041 > URL: https://svnweb.freebsd.org/changeset/base/322041 > > > Log: > In case readers are misled by expressions that combine > multiplication and > division, add parentheses to make the precedence explicit. > > Submitted by: Doug Moore > > Requested by: imp > Reviewed by: imp > MFC after: 1 week > X-MFC after: r321840 > Differential Revision: https://reviews.freebsd.org/D11815 > > > Modified: > head/sys/kern/subr_blist.c > > Modified: head/sys/kern/subr_blist.c > ============================================================================== > --- head/sys/kern/subr_blist.c Fri Aug 4 04:20:11 2017 > (r322040) > +++ head/sys/kern/subr_blist.c Fri Aug 4 04:23:23 2017 > (r322041) > @@ -110,6 +110,7 @@ __FBSDID("$FreeBSD$"); > #define bitcount64(x) __bitcount64((uint64_t)(x)) > #define malloc(a,b,c) calloc(a, 1) > #define free(a,b) free(a) > +#define CTASSERT(expr) > > > Is this dummy define intended? > Yes, it is for user-space, stand-alone compilation of this file. > > #include > > @@ -142,6 +143,8 @@ static void blst_radix_print(blmeta_t *scan, > daddr_t b > static MALLOC_DEFINE(M_SWAP, "SWAP", "Swap space"); > #endif > > +CTASSERT(BLIST_BMAP_RADIX % BLIST_META_RADIX == 0); > + > /* > * For a subtree that can represent the state of up to 'radix' > blocks, the > * number of leaf nodes of the subtree is > L=radix/BLIST_BMAP_RADIX. If 'm' > @@ -151,17 +154,19 @@ static MALLOC_DEFINE(M_SWAP, "SWAP", "Swap > space"); > * in the 'meta' functions that process subtrees. Since integer > division > * discards remainders, we can express this computation as > * skip = (m * m**h) / (m - 1) > - * skip = (m * radix / BLIST_BMAP_RADIX) / (m - 1) > - * and if m divides BLIST_BMAP_RADIX, we can simplify further to > - * skip = radix / (BLIST_BMAP_RADIX / m * (m - 1)) > - * so that a simple integer division is enough for the calculation. > + * skip = (m * (radix / BLIST_BMAP_RADIX)) / (m - 1) > + * and since m divides BLIST_BMAP_RADIX, we can simplify further to > + * skip = (radix / (BLIST_BMAP_RADIX / m)) / (m - 1) > + * skip = radix / ((BLIST_BMAP_RADIX / m) * (m - 1)) > + * so that simple integer division by a constant can safely be > used for the > + * calculation. > */ > static inline daddr_t > radix_to_skip(daddr_t radix) > { > > return (radix / > - (BLIST_BMAP_RADIX / BLIST_META_RADIX * > (BLIST_META_RADIX - 1))); > + ((BLIST_BMAP_RADIX / BLIST_META_RADIX) * > (BLIST_META_RADIX - 1))); > } > > /* > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > > To unsubscribe, send any mail to > "svn-src-head-unsubscribe@freebsd.org " > From owner-svn-src-head@freebsd.org Fri Aug 4 15:57:11 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B51F7DB7A2B; Fri, 4 Aug 2017 15:57:11 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91E316DA60; Fri, 4 Aug 2017 15:57:11 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v74FvA0Y005560; Fri, 4 Aug 2017 15:57:10 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v74FvAW8005558; Fri, 4 Aug 2017 15:57:10 GMT (envelope-from np@FreeBSD.org) Message-Id: <201708041557.v74FvAW8005558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 4 Aug 2017 15:57:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322055 - in head/sys/dev/cxgbe: . common X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: in head/sys/dev/cxgbe: . common X-SVN-Commit-Revision: 322055 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 15:57:11 -0000 Author: np Date: Fri Aug 4 15:57:10 2017 New Revision: 322055 URL: https://svnweb.freebsd.org/changeset/base/322055 Log: cxgbe(4): Allow the TOE timer tunables to be set with microsecond precision. These timers are already displayed in microseconds in the sysctl MIB. Add variables to track these tunables while here. MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/common/common.h head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/common/common.h ============================================================================== --- head/sys/dev/cxgbe/common/common.h Fri Aug 4 14:24:24 2017 (r322054) +++ head/sys/dev/cxgbe/common/common.h Fri Aug 4 15:57:10 2017 (r322055) @@ -501,13 +501,10 @@ static inline unsigned int dack_ticks_to_usec(const st return (ticks << adap->params.tp.dack_re) / core_ticks_per_usec(adap); } -static inline u_int ms_to_tcp_ticks(const struct adapter *adap, u_int ms) +static inline u_int us_to_tcp_ticks(const struct adapter *adap, u_long us) { - u_long l; - l = (u_long)ms * adap->params.vpd.cclk >> adap->params.tp.tre; - - return (l); + return (us * adap->params.vpd.cclk / 1000 >> adap->params.tp.tre); } void t4_set_reg_field(struct adapter *adap, unsigned int addr, u32 mask, u32 val); Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Aug 4 14:24:24 2017 (r322054) +++ head/sys/dev/cxgbe/t4_main.c Fri Aug 4 15:57:10 2017 (r322055) @@ -294,6 +294,51 @@ TUNABLE_INT("hw.cxgbe.nofldtxq_vi", &t4_nofldtxq_vi); #define NOFLDRXQ_VI 1 static int t4_nofldrxq_vi = -NOFLDRXQ_VI; TUNABLE_INT("hw.cxgbe.nofldrxq_vi", &t4_nofldrxq_vi); + +/* 0 means chip/fw default, non-zero number is value in microseconds */ +static u_long t4_toe_keepalive_idle = 0; +TUNABLE_ULONG("hw.cxgbe.toe.keepalive_idle", &t4_toe_keepalive_idle); + +/* 0 means chip/fw default, non-zero number is value in microseconds */ +static u_long t4_toe_keepalive_interval = 0; +TUNABLE_ULONG("hw.cxgbe.toe.keepalive_interval", &t4_toe_keepalive_interval); + +/* 0 means chip/fw default, non-zero number is # of keepalives before abort */ +static int t4_toe_keepalive_count = 0; +TUNABLE_INT("hw.cxgbe.toe.keepalive_count", &t4_toe_keepalive_count); + +/* 0 means chip/fw default, non-zero number is value in microseconds */ +static u_long t4_toe_rexmt_min = 0; +TUNABLE_ULONG("hw.cxgbe.toe.rexmt_min", &t4_toe_rexmt_min); + +/* 0 means chip/fw default, non-zero number is value in microseconds */ +static u_long t4_toe_rexmt_max = 0; +TUNABLE_ULONG("hw.cxgbe.toe.rexmt_max", &t4_toe_rexmt_max); + +/* 0 means chip/fw default, non-zero number is # of rexmt before abort */ +static int t4_toe_rexmt_count = 0; +TUNABLE_INT("hw.cxgbe.toe.rexmt_count", &t4_toe_rexmt_count); + +/* -1 means chip/fw default, other values are raw backoff values to use */ +static int t4_toe_rexmt_backoff[16] = { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 +}; +TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.0", &t4_toe_rexmt_backoff[0]); +TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.1", &t4_toe_rexmt_backoff[1]); +TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.2", &t4_toe_rexmt_backoff[2]); +TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.3", &t4_toe_rexmt_backoff[3]); +TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.4", &t4_toe_rexmt_backoff[4]); +TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.5", &t4_toe_rexmt_backoff[5]); +TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.6", &t4_toe_rexmt_backoff[6]); +TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.7", &t4_toe_rexmt_backoff[7]); +TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.8", &t4_toe_rexmt_backoff[8]); +TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.9", &t4_toe_rexmt_backoff[9]); +TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.10", &t4_toe_rexmt_backoff[10]); +TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.11", &t4_toe_rexmt_backoff[11]); +TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.12", &t4_toe_rexmt_backoff[12]); +TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.13", &t4_toe_rexmt_backoff[13]); +TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.14", &t4_toe_rexmt_backoff[14]); +TUNABLE_INT("hw.cxgbe.toe.rexmt_backoff.15", &t4_toe_rexmt_backoff[15]); #endif #ifdef DEV_NETMAP @@ -3611,62 +3656,70 @@ static int set_params__post_init(struct adapter *sc) { uint32_t param, val; +#ifdef TCP_OFFLOAD int i, v, shift; - char s[32]; +#endif /* ask for encapsulated CPLs */ param = FW_PARAM_PFVF(CPLFW4MSG_ENCAP); val = 1; (void)t4_set_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val); +#ifdef TCP_OFFLOAD /* * Override the TOE timers with user provided tunables. This is not the * recommended way to change the timers (the firmware config file is) so * these tunables are not documented. * - * All the timer tunables are in milliseconds. + * All the timer tunables are in microseconds. */ - if (TUNABLE_INT_FETCH("hw.cxgbe.toe.keepalive_idle", &v)) { + if (t4_toe_keepalive_idle != 0) { + v = us_to_tcp_ticks(sc, t4_toe_keepalive_idle); + v &= M_KEEPALIVEIDLE; t4_set_reg_field(sc, A_TP_KEEP_IDLE, - V_KEEPALIVEIDLE(M_KEEPALIVEIDLE), - V_KEEPALIVEIDLE(ms_to_tcp_ticks(sc, v))); + V_KEEPALIVEIDLE(M_KEEPALIVEIDLE), V_KEEPALIVEIDLE(v)); } - if (TUNABLE_INT_FETCH("hw.cxgbe.toe.keepalive_interval", &v)) { + if (t4_toe_keepalive_interval != 0) { + v = us_to_tcp_ticks(sc, t4_toe_keepalive_interval); + v &= M_KEEPALIVEINTVL; t4_set_reg_field(sc, A_TP_KEEP_INTVL, - V_KEEPALIVEINTVL(M_KEEPALIVEINTVL), - V_KEEPALIVEINTVL(ms_to_tcp_ticks(sc, v))); + V_KEEPALIVEINTVL(M_KEEPALIVEINTVL), V_KEEPALIVEINTVL(v)); } - if (TUNABLE_INT_FETCH("hw.cxgbe.toe.keepalive_count", &v)) { - v &= M_KEEPALIVEMAXR1; + if (t4_toe_keepalive_count != 0) { + v = t4_toe_keepalive_count & M_KEEPALIVEMAXR2; t4_set_reg_field(sc, A_TP_SHIFT_CNT, V_KEEPALIVEMAXR1(M_KEEPALIVEMAXR1) | V_KEEPALIVEMAXR2(M_KEEPALIVEMAXR2), V_KEEPALIVEMAXR1(1) | V_KEEPALIVEMAXR2(v)); } - if (TUNABLE_INT_FETCH("hw.cxgbe.toe.rexmt_min", &v)) { + if (t4_toe_rexmt_min != 0) { + v = us_to_tcp_ticks(sc, t4_toe_rexmt_min); + v &= M_RXTMIN; t4_set_reg_field(sc, A_TP_RXT_MIN, - V_RXTMIN(M_RXTMIN), V_RXTMIN(ms_to_tcp_ticks(sc, v))); + V_RXTMIN(M_RXTMIN), V_RXTMIN(v)); } - if (TUNABLE_INT_FETCH("hw.cxgbe.toe.rexmt_max", &v)) { + if (t4_toe_rexmt_max != 0) { + v = us_to_tcp_ticks(sc, t4_toe_rexmt_max); + v &= M_RXTMAX; t4_set_reg_field(sc, A_TP_RXT_MAX, - V_RXTMAX(M_RXTMAX), V_RXTMAX(ms_to_tcp_ticks(sc, v))); + V_RXTMAX(M_RXTMAX), V_RXTMAX(v)); } - if (TUNABLE_INT_FETCH("hw.cxgbe.toe.rexmt_count", &v)) { - v &= M_RXTSHIFTMAXR1; + if (t4_toe_rexmt_count != 0) { + v = t4_toe_rexmt_count & M_RXTSHIFTMAXR2; t4_set_reg_field(sc, A_TP_SHIFT_CNT, V_RXTSHIFTMAXR1(M_RXTSHIFTMAXR1) | V_RXTSHIFTMAXR2(M_RXTSHIFTMAXR2), V_RXTSHIFTMAXR1(1) | V_RXTSHIFTMAXR2(v)); } - for (i = 0; i < 16; i++) { - snprintf(s, sizeof(s), "hw.cxgbe.toe.rexmt_backoff.%d", i); - if (TUNABLE_INT_FETCH(s, &v)) { - v &= M_TIMERBACKOFFINDEX0; + for (i = 0; i < nitems(t4_toe_rexmt_backoff); i++) { + if (t4_toe_rexmt_backoff[i] != -1) { + v = t4_toe_rexmt_backoff[i] & M_TIMERBACKOFFINDEX0; shift = (i & 3) << 3; t4_set_reg_field(sc, A_TP_TCP_BACKOFF_REG0 + (i & ~3), M_TIMERBACKOFFINDEX0 << shift, v << shift); } } +#endif return (0); } From owner-svn-src-head@freebsd.org Fri Aug 4 16:33:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B693DBD68E; Fri, 4 Aug 2017 16:33:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54D966F078; Fri, 4 Aug 2017 16:33:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v74GXbLP021697; Fri, 4 Aug 2017 16:33:37 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v74GXb8T021692; Fri, 4 Aug 2017 16:33:37 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201708041633.v74GXb8T021692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 4 Aug 2017 16:33:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322056 - in head/sys/boot/efi: include libefi loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/boot/efi: include libefi loader X-SVN-Commit-Revision: 322056 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 16:33:38 -0000 Author: imp Date: Fri Aug 4 16:33:36 2017 New Revision: 322056 URL: https://svnweb.freebsd.org/changeset/base/322056 Log: Move EFI fmtdev functionality to libefi This patch moves code necessary for the fmtdev functionality from loader to libefi, allowing other applications to make use of it Submitted by: Eric McCorkle Differential Revision: https://reviews.freebsd.org/D11862 Added: head/sys/boot/efi/libefi/devicename.c (contents, props changed) - copied, changed from r322055, head/sys/boot/efi/loader/devicename.c Deleted: head/sys/boot/efi/loader/devicename.c Modified: head/sys/boot/efi/include/efilib.h head/sys/boot/efi/libefi/Makefile head/sys/boot/efi/loader/Makefile head/sys/boot/efi/loader/loader_efi.h Modified: head/sys/boot/efi/include/efilib.h ============================================================================== --- head/sys/boot/efi/include/efilib.h Fri Aug 4 15:57:10 2017 (r322055) +++ head/sys/boot/efi/include/efilib.h Fri Aug 4 16:33:36 2017 (r322056) @@ -64,6 +64,11 @@ pdinfo_list_t *efiblk_get_pdinfo_list(struct devsw *de void *efi_get_table(EFI_GUID *tbl); +int efi_getdev(void **vdev, const char *devspec, const char **path); +char *efi_fmtdev(void *vdev); +int efi_setcurrdev(struct env_var *ev, int flags, const void *value); + + int efi_register_handles(struct devsw *, EFI_HANDLE *, EFI_HANDLE *, int); EFI_HANDLE efi_find_handle(struct devsw *, int); int efi_handle_lookup(EFI_HANDLE, struct devsw **, int *, uint64_t *); Modified: head/sys/boot/efi/libefi/Makefile ============================================================================== --- head/sys/boot/efi/libefi/Makefile Fri Aug 4 15:57:10 2017 (r322055) +++ head/sys/boot/efi/libefi/Makefile Fri Aug 4 16:33:36 2017 (r322056) @@ -12,7 +12,7 @@ INTERNALLIB= WARNS?= 2 SRCS= delay.c devpath.c efi_console.c efinet.c efipart.c env.c errno.c \ - handles.c wchar.c libefi.c efi_driver_utils.c efizfs.c + handles.c wchar.c libefi.c efi_driver_utils.c efizfs.c devicename.c .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" SRCS+= time.c Copied and modified: head/sys/boot/efi/libefi/devicename.c (from r322055, head/sys/boot/efi/loader/devicename.c) ============================================================================== --- head/sys/boot/efi/loader/devicename.c Fri Aug 4 15:57:10 2017 (r322055, copy source) +++ head/sys/boot/efi/libefi/devicename.c Fri Aug 4 16:33:36 2017 (r322056) @@ -41,8 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include "loader_efi.h" - static int efi_parsedev(struct devdesc **, const char *, const char **); /* Modified: head/sys/boot/efi/loader/Makefile ============================================================================== --- head/sys/boot/efi/loader/Makefile Fri Aug 4 15:57:10 2017 (r322055) +++ head/sys/boot/efi/loader/Makefile Fri Aug 4 16:33:36 2017 (r322056) @@ -16,7 +16,6 @@ SRCS= autoload.c \ bootinfo.c \ conf.c \ copy.c \ - devicename.c \ main.c \ self_reloc.c \ smbios.c \ Modified: head/sys/boot/efi/loader/loader_efi.h ============================================================================== --- head/sys/boot/efi/loader/loader_efi.h Fri Aug 4 15:57:10 2017 (r322055) +++ head/sys/boot/efi/loader/loader_efi.h Fri Aug 4 16:33:36 2017 (r322056) @@ -35,10 +35,6 @@ int efi_autoload(void); -int efi_getdev(void **vdev, const char *devspec, const char **path); -char *efi_fmtdev(void *vdev); -int efi_setcurrdev(struct env_var *ev, int flags, const void *value); - int efi_copy_init(void); ssize_t efi_copyin(const void *src, vm_offset_t dest, const size_t len); From owner-svn-src-head@freebsd.org Fri Aug 4 17:46:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5C2EDC083E; Fri, 4 Aug 2017 17:46:18 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x234.google.com (mail-pg0-x234.google.com [IPv6:2607:f8b0:400e:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A962171211; Fri, 4 Aug 2017 17:46:18 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x234.google.com with SMTP id u185so10629772pgb.1; Fri, 04 Aug 2017 10:46:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=6qD/8itDQ2+UqhIbC6HshJgvrqkYL5rDdY7efey3yxU=; b=a9k0Tiqpr2306iCHlR9Er5OGa/1zDC3j9Sriie1Ofi19WmVCKbZ42SXW8EPb2Grs+0 FgIe+hwi27Yt61vhrUu5zutOMmnLJJapC4EEHEQHgi7q7xYxKp40shUbUarE5JZ5vn/R 1fO020d7/OSd/8HkcQLH5EFRieMfl9IuTQDd7F+medihrtdLD2+4iitXB58pVtNHtt6W +r77G0YxLabK35V2JRUpQsYt8e0wil0rdCxg9tN5kwxDlcgOTgeox7FiXAPdbgZ755xn Feuivq6MRkXwxqZRWPBMfuCcEnyjasT9vBus+F7dO77PgwDQ2BVigDMQvsUGoecvYvzq jr3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=6qD/8itDQ2+UqhIbC6HshJgvrqkYL5rDdY7efey3yxU=; b=d/z94J6jBQ5m7qBHY7tMUS7m/BgQ8y/rfl3v7rDOdRcQCNl7+hS3VFMGRlEM20PC9q GB8dKtH3cpD+X3nYIYl5teDoUdk3cfvVJpZs+u+PmW14hafHgjPTlJuS5uUaOQpb6mwX lZQHPhzZfJxekQNhvgPpSJ4Oj4B8VeDJP1jcgXotN0DmDM8WMgCy4lyCmhzkMfJhCv9R 36C6IwKbtw+sop+IdTTKIVSub+878rIrFZ5DpKc3qrqSmp8aPp4HZlDTmqnWQxNIz9JR eQ8DNZXLaZkrJEyCSv+pSwxB4+NRw78FVF0qEYtAN/oIf786tdUh/ltheh732ekmq/qb xqQQ== X-Gm-Message-State: AIVw11157cpAi4VH0EZtjYD2JiI6UDN/Wn8xVoHyisfYGFjdqvjWBOpa C8OXLe7j4h+I5e4/NEM= X-Received: by 10.99.54.201 with SMTP id d192mr3081282pga.310.1501868777421; Fri, 04 Aug 2017 10:46:17 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id s8sm3837560pfd.77.2017.08.04.10.46.16 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 04 Aug 2017 10:46:16 -0700 (PDT) Subject: Re: svn commit: r321369 - in head: . contrib/compiler-rt/include/sanitizer contrib/compiler-rt/include/xray contrib/compiler-rt/lib/asan contrib/compiler-rt/lib/builtins contrib/compiler-rt/lib/builtin... Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_3D808D7A-5A7C-460E-8991-621C5542CB37"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201707221108.v6MB8UWB068088@repo.freebsd.org> Date: Fri, 4 Aug 2017 10:46:15 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201707221108.v6MB8UWB068088@repo.freebsd.org> To: Dimitry Andric X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 17:46:19 -0000 --Apple-Mail=_3D808D7A-5A7C-460E-8991-621C5542CB37 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jul 22, 2017, at 04:08, Dimitry Andric wrote: >=20 > Author: dim > Date: Sat Jul 22 11:08:25 2017 > New Revision: 321369 > URL: https://svnweb.freebsd.org/changeset/base/321369 >=20 > Log: > Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ = to > 5.0.0 (trunk r308421). Upstream has branched for the 5.0.0 release, > which should be in about a month. Please report bugs and = regressions, > so we can get them into the release. >=20 > Please note that from 3.5.0 onwards, clang, llvm and lldb require = C++11 > support to build; see UPDATING for more information. >=20 > MFC after: 2 months Hi Dmitry, This commit changed a lot of mergeinfo under contrib/ and = sys/contrib unnecessarily =E2=80=94 could you please revert those = changes before merging back to ^/head next time? Thank you! -Ngie --Apple-Mail=_3D808D7A-5A7C-460E-8991-621C5542CB37 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZhLLnAAoJEPWDqSZpMIYVObYP/2wW12sPTmrOZT+xwQFiso6Q kE0JhotL0kfal9ByvW3D30MuSz/QySIiAx7z0yCeDRqhNN+jO5EFofq9T7hB+wAR qC0n79jxivQo1PWr/EuXAsb8Cd1NqB+dH2haU1YNyOpFvocYpkUkkiUC8wWfMb4l sdOigmU+Bsr49i2NUW0Ml3M9hFVXEgA4RbUYM6wAVob6UpTch5Xdbo7UI+kdz5/A XBSqwLCkUoYxqUYr8NNpDcwsotPcHZYnOXoiqfAddNCjifcW3FN8znA2HOktc5g9 kgaXd2M7SsW+gvs20kmG3r0WMpPzn4LSE9OLYtNM8J3v4QMVvXssWPkGWzqcby6M Io2qTtyToQ1BSEkqIqVMabOjrp1ax2XXJQH/In4W3x7g25IJQ1F+7qW+/t2gjZfZ Oa7xnl9EEhIo0WEoN0ftopp5IKhFno3EXnjRV1i2rBJR8Pf6fC4+GY0MiJ6Y9HaU wnO6c4YMoTvCVxAghf3zCTQWqAvWI+CM4KQ9HHFBHMZnFxH16a0xuRj8VJ0eJz+O Ny3PwgUFVAK3caiPl5yAglivQoX6BcoAvEyZxOgvsZ46tKxxLDW7rghrpKWtwXhY 7uy1WdLzVJYfKWBrde+U9MmkuvKkKbCAhXViXeWqIkBp7a9MBxdoXlV9stgCHO9b s33YityCOCtdidQpSdtX =dA8O -----END PGP SIGNATURE----- --Apple-Mail=_3D808D7A-5A7C-460E-8991-621C5542CB37-- From owner-svn-src-head@freebsd.org Fri Aug 4 18:02:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B7ADDC13D4; Fri, 4 Aug 2017 18:02:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1F8371B57; Fri, 4 Aug 2017 18:02:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v74I2sUQ057920; Fri, 4 Aug 2017 18:02:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v74I2suo057919; Fri, 4 Aug 2017 18:02:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201708041802.v74I2suo057919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 4 Aug 2017 18:02:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322059 - head/usr.sbin/pmcstat X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/usr.sbin/pmcstat X-SVN-Commit-Revision: 322059 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 18:02:56 -0000 Author: kib Date: Fri Aug 4 18:02:54 2017 New Revision: 322059 URL: https://svnweb.freebsd.org/changeset/base/322059 Log: Fix off by one in calculation of the number of buckets for the pc addresses. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D11864 Modified: head/usr.sbin/pmcstat/pmcpl_gprof.c Modified: head/usr.sbin/pmcstat/pmcpl_gprof.c ============================================================================== --- head/usr.sbin/pmcstat/pmcpl_gprof.c Fri Aug 4 17:41:49 2017 (r322058) +++ head/usr.sbin/pmcstat/pmcpl_gprof.c Fri Aug 4 18:02:54 2017 (r322059) @@ -468,8 +468,8 @@ pmcpl_gmon_process(struct pmcstat_process *pp, struct image, pmcid); pgf->pgf_pmcid = pmcid; assert(image->pi_end > image->pi_start); - pgf->pgf_nbuckets = (image->pi_end - image->pi_start) / - FUNCTION_ALIGNMENT; /* see */ + pgf->pgf_nbuckets = howmany(image->pi_end - image->pi_start, + FUNCTION_ALIGNMENT); /* see */ pgf->pgf_ndatabytes = sizeof(struct gmonhdr) + pgf->pgf_nbuckets * hc_sz; pgf->pgf_nsamples = 0; From owner-svn-src-head@freebsd.org Fri Aug 4 18:26:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7AAC1DC22FB; Fri, 4 Aug 2017 18:26:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 579EA7282E; Fri, 4 Aug 2017 18:26:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 5FBAF10AB01; Fri, 4 Aug 2017 14:26:07 -0400 (EDT) From: John Baldwin To: Jeremie Le Hen Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r322029 - in head: usr.bin usr.sbin Date: Fri, 04 Aug 2017 11:19:32 -0700 Message-ID: <9401348.cv7bYOMymL@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201708032130.v73LUC2H045637@repo.freebsd.org> References: <201708032130.v73LUC2H045637@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 04 Aug 2017 14:26:07 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 18:26:16 -0000 On Thursday, August 03, 2017 09:30:12 PM Jeremie Le Hen wrote: > Author: jlh > Date: Thu Aug 3 21:30:12 2017 > New Revision: 322029 > URL: https://svnweb.freebsd.org/changeset/base/322029 > > Log: > rwho/ruptime/rwhod shouldn't be gated by RCMDS. > > PR: 220953 > Reported by: peter@ > Differential Revision: https://reviews.freebsd.org/D11743 > > Modified: > head/usr.bin/Makefile > head/usr.sbin/Makefile Don't forget to update tools/build/mk/OptionalObsoleteFiles.inc so that 'make delete-old' doesn't incorrectly remove these. The /etc/rc.d/rwhod script is also curently conditional on rcmds (see etc/rc.d/Makefile) as is the 140.clean-rwho periodic script (see etc/periodic/daily/Makefile). -- John Baldwin From owner-svn-src-head@freebsd.org Fri Aug 4 18:38:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04D3FDC2A5B; Fri, 4 Aug 2017 18:38:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C08B872E17; Fri, 4 Aug 2017 18:38:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::5dcc:fb68:7f41:b95e] (unknown [IPv6:2001:470:7a58:0:5dcc:fb68:7f41:b95e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 877B02D708; Fri, 4 Aug 2017 20:38:06 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_CC560F7F-4ECA-44F4-A36C-E57F3BB99160"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r321369 - in head: . contrib/compiler-rt/include/sanitizer contrib/compiler-rt/include/xray contrib/compiler-rt/lib/asan contrib/compiler-rt/lib/builtins contrib/compiler-rt/lib/builtin... Date: Fri, 4 Aug 2017 20:38:03 +0200 In-Reply-To: Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: "Ngie Cooper (yaneurabeya)" References: <201707221108.v6MB8UWB068088@repo.freebsd.org> X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 18:38:17 -0000 --Apple-Mail=_CC560F7F-4ECA-44F4-A36C-E57F3BB99160 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 4 Aug 2017, at 19:46, Ngie Cooper (yaneurabeya) = wrote: >=20 >> On Jul 22, 2017, at 04:08, Dimitry Andric wrote: >>=20 >> Author: dim >> Date: Sat Jul 22 11:08:25 2017 >> New Revision: 321369 >> URL: https://svnweb.freebsd.org/changeset/base/321369 >>=20 >> Log: >> Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ = to >> 5.0.0 (trunk r308421). Upstream has branched for the 5.0.0 release, >> which should be in about a month. Please report bugs and = regressions, >> so we can get them into the release. >>=20 >> Please note that from 3.5.0 onwards, clang, llvm and lldb require = C++11 >> support to build; see UPDATING for more information. >>=20 >> MFC after: 2 months >=20 > Hi Dmitry, > This commit changed a lot of mergeinfo under contrib/ and = sys/contrib unnecessarily =E2=80=94 could you please revert those = changes before merging back to ^/head next time? I would probably have liked to, but every time I merge back stuff from a project branch, Subversion dies in interesting ways, because some sort of mergeinfo is missing. I would rather not mess with the mergeinfo properties it has automatically added, I have *very* bad experiences with that. Of course, mergeinfo can always be removed later on from head, if it is absolutely necessary. But I would rather not touch it at all. If the Subversion authors think some mergeinfo must be automatically added, they are probably right? -Dimitry --Apple-Mail=_CC560F7F-4ECA-44F4-A36C-E57F3BB99160 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.1 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWYS/CwAKCRCwXqMKLiCW o+YDAKDzk1H+qjfwHL+jJitomFIuGeeF2QCdHeKHc3Xw1yuN1BqBzgrC40PgIWU= =lS9A -----END PGP SIGNATURE----- --Apple-Mail=_CC560F7F-4ECA-44F4-A36C-E57F3BB99160-- From owner-svn-src-head@freebsd.org Fri Aug 4 21:06:48 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD31DDC8F4D; Fri, 4 Aug 2017 21:06:48 +0000 (UTC) (envelope-from mjoras@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AA587C326; Fri, 4 Aug 2017 21:06:48 +0000 (UTC) (envelope-from mjoras@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v74L6l5i034689; Fri, 4 Aug 2017 21:06:47 GMT (envelope-from mjoras@FreeBSD.org) Received: (from mjoras@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v74L6lwo034688; Fri, 4 Aug 2017 21:06:47 GMT (envelope-from mjoras@FreeBSD.org) Message-Id: <201708042106.v74L6lwo034688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjoras set sender to mjoras@FreeBSD.org using -f From: Matt Joras Date: Fri, 4 Aug 2017 21:06:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322062 - head/sbin/ifconfig X-SVN-Group: head X-SVN-Commit-Author: mjoras X-SVN-Commit-Paths: head/sbin/ifconfig X-SVN-Commit-Revision: 322062 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 21:06:48 -0000 Author: mjoras Date: Fri Aug 4 21:06:47 2017 New Revision: 322062 URL: https://svnweb.freebsd.org/changeset/base/322062 Log: Selectively print "hwaddr" from ifconfig(8). ifconfig(8) printing the hwaddr is only really useful if it differs from the link layer address. Reported by: jhb Reviewed by: rpokala Approved by: rstone (mentor) Differential Revision: https://reviews.freebsd.org/D11777 Modified: head/sbin/ifconfig/af_link.c Modified: head/sbin/ifconfig/af_link.c ============================================================================== --- head/sbin/ifconfig/af_link.c Fri Aug 4 20:24:23 2017 (r322061) +++ head/sbin/ifconfig/af_link.c Fri Aug 4 21:06:47 2017 (r322062) @@ -108,7 +108,15 @@ link_status(int s __unused, const struct ifaddrs *ifa) if (rc != 0) { return; } - if (memcmp(ifr.ifr_addr.sa_data, laggaddr, sdl->sdl_alen) == 0) { + + /* + * If this is definitely a lagg device or the hwaddr + * matches the link addr, don't bother. + */ + if (memcmp(ifr.ifr_addr.sa_data, laggaddr, + sdl->sdl_alen) == 0 || + memcmp(ifr.ifr_addr.sa_data, LLADDR(sdl), + sdl->sdl_alen) == 0) { return; } ether_format = ether_ntoa((const struct ether_addr *) From owner-svn-src-head@freebsd.org Sat Aug 5 00:28:43 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79EB4DD13F3; Sat, 5 Aug 2017 00:28:43 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4906981B72; Sat, 5 Aug 2017 00:28:43 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v750SgJi015801; Sat, 5 Aug 2017 00:28:42 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v750Sgsj015800; Sat, 5 Aug 2017 00:28:42 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201708050028.v750Sgsj015800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sat, 5 Aug 2017 00:28:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322073 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 322073 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2017 00:28:43 -0000 Author: cy Date: Sat Aug 5 00:28:42 2017 New Revision: 322073 URL: https://svnweb.freebsd.org/changeset/base/322073 Log: Fix matchcing of NATed ICMP queries (resolving NATed MTU discovery). MFC after: 1 month Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_nat.c Fri Aug 4 23:34:39 2017 (r322072) +++ head/sys/contrib/ipfilter/netinet/ip_nat.c Sat Aug 5 00:28:42 2017 (r322073) @@ -4100,13 +4100,8 @@ ipf_nat_inlookup(fin, flags, p, src, mapdst) dport = htons(fin->fin_data[1]); break; case IPPROTO_ICMP : - if (flags & IPN_ICMPERR) { - sport = fin->fin_data[1]; - dport = 0; - } else { - dport = fin->fin_data[1]; - sport = 0; - } + sport = 0; + dport = fin->fin_data[1]; break; default : sport = 0; @@ -4426,8 +4421,6 @@ ipf_nat_outlookup(fin, flags, p, src, dst) ifp = fin->fin_ifp; sflags = flags & IPN_TCPUDPICMP; - sport = 0; - dport = 0; switch (p) { @@ -4437,12 +4430,12 @@ ipf_nat_outlookup(fin, flags, p, src, dst) dport = htons(fin->fin_data[1]); break; case IPPROTO_ICMP : - if (flags & IPN_ICMPERR) - sport = fin->fin_data[1]; - else - dport = fin->fin_data[1]; + sport = 0; + dport = fin->fin_data[1]; break; default : + sport = 0; + dport = 0; break; } From owner-svn-src-head@freebsd.org Sat Aug 5 00:35:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7ED1BDD18BB; Sat, 5 Aug 2017 00:35:14 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2970181F72; Sat, 5 Aug 2017 00:35:13 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id dn3Ydvvg8M9gtdn3Zd1oxO; Fri, 04 Aug 2017 18:35:07 -0600 X-Authority-Analysis: v=2.2 cv=a+JAzQaF c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=KeKAF7QvOSUA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=6Vuxsx63iLNc-3tpRSQA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 2088FB3; Fri, 4 Aug 2017 17:35:04 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v750Xm3F076876; Fri, 4 Aug 2017 17:33:48 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201708050033.v750Xm3F076876@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r322073 - head/sys/contrib/ipfilter/netinet In-Reply-To: Message from Cy Schubert of "Sat, 05 Aug 2017 00:28:42 -0000." <201708050028.v750Sgsj015800@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 04 Aug 2017 17:33:48 -0700 X-CMAE-Envelope: MS4wfBHRIHGHDfo9MsUYbPRMiHNudLdy5VxSCw32+oRcXjgJlxC5iuhimk3V1Wnur1Tl8zN126FMH72JHmL4m0RHYzdPVcGm2yo3naiL9v+Jwcwv4canmjeW B/bHLWv5h7uT5eA0l6B7dcm486M8SB9DTTpeF0+uEMXZr3PJGU1C/E1Uc2nIdZ6pYJmlH/onUhH8bSwl7SFFMV2m+OiHUM3lVRO8iqYVWO8g4EB7UqTJ3+OL IleOOYvjMQhPK5l+QhsUf3GGoL2FEq0dBId+Sd0LC9wJdgiOS5SaY1uxW2VvYJ5P X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2017 00:35:14 -0000 In message <201708050028.v750Sgsj015800@repo.freebsd.org>, Cy Schubert writes: > Author: cy > Date: Sat Aug 5 00:28:42 2017 > New Revision: 322073 > URL: https://svnweb.freebsd.org/changeset/base/322073 > > Log: > Fix matchcing of NATed ICMP queries (resolving NATed MTU discovery). > > MFC after: 1 month Obtained from: NetBSD r1.16 > > Modified: > head/sys/contrib/ipfilter/netinet/ip_nat.c > > Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c > ============================================================================= > = > --- head/sys/contrib/ipfilter/netinet/ip_nat.c Fri Aug 4 23:34:39 201 > 7 (r322072) > +++ head/sys/contrib/ipfilter/netinet/ip_nat.c Sat Aug 5 00:28:42 201 > 7 (r322073) > @@ -4100,13 +4100,8 @@ ipf_nat_inlookup(fin, flags, p, src, mapdst) > dport = htons(fin->fin_data[1]); > break; > case IPPROTO_ICMP : > - if (flags & IPN_ICMPERR) { > - sport = fin->fin_data[1]; > - dport = 0; > - } else { > - dport = fin->fin_data[1]; > - sport = 0; > - } > + sport = 0; > + dport = fin->fin_data[1]; > break; > default : > sport = 0; > @@ -4426,8 +4421,6 @@ ipf_nat_outlookup(fin, flags, p, src, dst) > > ifp = fin->fin_ifp; > sflags = flags & IPN_TCPUDPICMP; > - sport = 0; > - dport = 0; > > switch (p) > { > @@ -4437,12 +4430,12 @@ ipf_nat_outlookup(fin, flags, p, src, dst) > dport = htons(fin->fin_data[1]); > break; > case IPPROTO_ICMP : > - if (flags & IPN_ICMPERR) > - sport = fin->fin_data[1]; > - else > - dport = fin->fin_data[1]; > + sport = 0; > + dport = fin->fin_data[1]; > break; > default : > + sport = 0; > + dport = 0; > break; > } > -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-head@freebsd.org Sat Aug 5 02:00:18 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1535DDD59AF; Sat, 5 Aug 2017 02:00:18 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 9F903845AB; Sat, 5 Aug 2017 02:00:17 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 5320CD65BDB; Sat, 5 Aug 2017 11:28:49 +1000 (AEST) Date: Sat, 5 Aug 2017 11:28:48 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Colin Percival cc: Hans Petter Selasky , cem@freebsd.org, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321985 - head/sys/ofed/drivers/infiniband/core In-Reply-To: <0100015dabf98abb-dde34a5d-d5bf-4dab-ae6f-897cd12526dc-000000@email.amazonses.com> Message-ID: <20170805105048.J1055@besplex.bde.org> References: <201708030918.v739IPVY034866@repo.freebsd.org> <0100015dabf98abb-dde34a5d-d5bf-4dab-ae6f-897cd12526dc-000000@email.amazonses.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=6eer1yf4SQJKv7TV9SgA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2017 02:00:18 -0000 On Fri, 4 Aug 2017, Colin Percival wrote: > On 08/03/17 23:28, Hans Petter Selasky wrote: >> On 08/03/17 16:37, Conrad Meyer wrote: >>> Is it not important that the subtraction and result are evaluated >>> without truncation? >> >> ticks is a circular counter. Assuming time = 0 and jiffies = -1U, then "delay" >> becomes a very large negative value, because long is used, and the delay <= 0 >> check, is no longer working like expected. >> >> Casting to "int" or truncating is the right thing to do in this case. > > Signed integer overflow is undefined. Using 'int' is liable to cause problems > after 2^32 ticks. There is no (new) overflow here. Converting a higher rank type to int has implementation-defined behaviour. I have yet to see an implementation that defines its behaviour except in its source code, but all implementations that I have seen do the right thing of truncating 2's complement integers. Perverse implementations would produce specific garbage values or perhaps rand(). They just have to document this. 'int overflows after 2^31-1 ticks if int is 32 bits. It is using u_int that is liable to cause problems after 2^32 ticks. Using long and u_long causes exactly the same problems if long is 32 bits. >>>> Modified: head/sys/ofed/drivers/infiniband/core/addr.c >>>> ============================================================================== >>>> --- head/sys/ofed/drivers/infiniband/core/addr.c Thu Aug 3 09:14:43 >>>> 2017 (r321984) >>>> +++ head/sys/ofed/drivers/infiniband/core/addr.c Thu Aug 3 09:18:25 >>>> 2017 (r321985) >>>> @@ -187,10 +187,10 @@ EXPORT_SYMBOL(rdma_translate_ip); >>>> >>>> static void set_timeout(unsigned long time) >>>> { >>>> - unsigned long delay; >>>> + int delay; /* under FreeBSD ticks are 32-bit */ >>>> >>>> delay = time - jiffies; There is no overflow here. The RHS is calculated in u_long arithmetic which has truncation instead of overflow. First, jiffies is converted to u_long in a standards-defined way. If jiffies is non-negative, then its value is unchanged by the conversion. I think jiffies can't be negative, but if it is then there are complications -- the value must be changed; it is changed by adding a multiple of ULONG_MAX which is normally 1, but it not easy to see that the multiple is always 1 (if that uis the case). Then the subtraction can't overflow, but it produces a garbage result of time < jiffies. As usual, using unsigned is a bug. Here it breaks calculations of negative differences. >>>> - if ((long)delay <= 0) >>>> + if (delay <= 0) >>>> delay = 1; Then we cast to long in the old code, and assign the RHS to int in the new code. Both are implementation-defined. The cast does nothing different from assignment except it might change compiler warnings. The old code seems to be correct enough. Suppose time is 59 and jiffies is 60. Then time - jiffies is 0xffffffffLU on 32-bit systems and 0xffffffffffffffffLU on 64-bit systems. If the implementation-defined behaviour were documented, then we would know that the result of casting either of these to long is -1L. This is < 0, so delay gets fixed up to +1. Similarly with the new code -- the assignment converts the huge unsigned values to -1. Problems with the type mismatch might occur later, but I don't see any. On 64-bit systems, the difference can be really huge without tripping the (long)delay <= 0 test. Above INT_MAX, later truncation to int in APIs using ticks will give garbage (possibly 0 or negative). I guess that is the problem. But even on 32-bit systems, the difference can be INT_MAX and that seems too large to be correct. If jiffies are 1/1000 seconds, then it is thewell-known magic number 24+ days. User code might generate that, but kernel driver code shouldn't. Bruce From owner-svn-src-head@freebsd.org Sat Aug 5 02:26:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D6A8DD74AF; Sat, 5 Aug 2017 02:26:12 +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 E59E28D3; Sat, 5 Aug 2017 02:26:11 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 62CF71045ED9; Sat, 5 Aug 2017 12:26:03 +1000 (AEST) Date: Sat, 5 Aug 2017 12:26:03 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: Bruce Evans , Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321920 - head/sys/sys In-Reply-To: <20170803120729.GO1700@kib.kiev.ua> Message-ID: <20170805112924.W1055@besplex.bde.org> References: <201708021014.v72AEHEk061037@repo.freebsd.org> <37abc595-c80e-a8da-04a8-815f42c634de@selasky.org> <20170802135455.GG1700@kib.kiev.ua> <20170803122015.Q1093@besplex.bde.org> <20170803075747.GJ1700@kib.kiev.ua> <20170803180419.R2314@besplex.bde.org> <20170803120729.GO1700@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=KeqiiUQD c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=HLF2S318A8q7yMrcC8QA:9 a=rz2QiUMzXMD4j6UH:21 a=fJpQLJjFt_BGb_za:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2017 02:26:12 -0000 On Thu, 3 Aug 2017, Konstantin Belousov wrote: > On Thu, Aug 03, 2017 at 07:34:56PM +1000, Bruce Evans wrote: >> I see another problem. Masking with 0xfffffffff and casting to unsigned >> are gratuitously different spellings for extracting the low 32 bits. >> I prefer the cast. > > Below is one more update. I reformulated the man page text, but not too > deep. Also I replaced masking with the cast. OK. > diff --git a/sys/sys/types.h b/sys/sys/types.h > index 30a08724443..eacbc1ba0c4 100644 > --- a/sys/sys/types.h > +++ b/sys/sys/types.h > @@ -364,9 +364,9 @@ __bitcount64(__uint64_t _x) > > #include > > -#define major(x) ((int)((dev_t)(x) >> 32)) /* major number */ > -#define minor(x) ((int)((x) & 0xffffffff)) /* minor number */ > -#define makedev(x, y) (((dev_t)(x) << 32) | (unsigned)(y)) /* create dev_t */ > +#define major(x) ((int)((dev_t)(x) >> 32)) > +#define minor(x) ((int)(x)) Another nice simplification. Strictly, it should be (int)(dev_t)(x) since the pseudo-prototype says that the arg is converted to dev_t, but yesterday I couldn't see any differences even for exotic x and exotic arches. Today I can see some difference for exotic x and perverse implementations. E.g., x with extra bits in a large signed integer type to invoke implementation-defined behaviour, and a perverse implementation that truncates to 0 for direct conversion to int but does the right thing for indirect conversion). But we depend on the implementation doing the right thing for other casts to int. Also, if dev_t == uintptr_t, it is valid for the caller to keep dev_t's in void *'s internally but not to pass void * to minor() or major() according to the prototype. However, casting in the macros breaks the warning for this. I think pure macros should not cast their args or pretend to have prototypes, but require callers to pass args of supported types. The old dev_t macros were closer to this -- they have expressions like ((x) << 8) which will fail if x is not an integral type or give wrong results ix x has extra bits. POSIX had to fix related problems for the ntohl() family. The result seems to be that the APIs act as if they are functions. So even if they are implemented as macros, the macros can't just cast their args, but must be wrapped by functions (which can be inline) to get less forceful conversions. FreeBSD's implementation does almost exactly this. It has to cast args for optimizing const args, but seems to get this right by not casting in the non-const case. However, I have uncommitted "fixes" which do cast in the non-const case. Apparently my fixes are backwards. > +#define makedev(x, y) (((dev_t)(x) << 32) | (unsigned)(y)) > > /* > * These declarations belong elsewhere, but are repeated here and in Bruce From owner-svn-src-head@freebsd.org Sat Aug 5 03:45:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAF6ADB55AF; Sat, 5 Aug 2017 03:45:49 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id A35703C6D; Sat, 5 Aug 2017 03:45:49 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id F3428D43442; Sat, 5 Aug 2017 13:22:10 +1000 (AEST) Date: Sat, 5 Aug 2017 13:22:10 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Alan Cox cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r322041 - head/sys/kern In-Reply-To: <201708040423.v744NOix022999@repo.freebsd.org> Message-ID: <20170805123249.K1377@besplex.bde.org> References: <201708040423.v744NOix022999@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=VbSHBBh9 c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=DUQRlfxLKrqfm2yATDEA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2017 03:45:50 -0000 On Fri, 4 Aug 2017, Alan Cox wrote: > Log: > In case readers are misled by expressions that combine multiplication and > division, add parentheses to make the precedence explicit. > > Submitted by: Doug Moore > Requested by: imp > Reviewed by: imp > MFC after: 1 week > X-MFC after: r321840 > Differential Revision: https://reviews.freebsd.org/D11815 This obfuscates the necessary parentheses. > Modified: head/sys/kern/subr_blist.c > ... > static inline daddr_t > radix_to_skip(daddr_t radix) > { > > return (radix / > - (BLIST_BMAP_RADIX / BLIST_META_RADIX * (BLIST_META_RADIX - 1))); > + ((BLIST_BMAP_RADIX / BLIST_META_RADIX) * (BLIST_META_RADIX - 1))); > } Readers now have to do a more complete parse to find the interesting parts, and writers have to count to a large number to get the count right when the parantheses pile up at the right. This expression is relatively simple to parse to remove the obfuscation, but consider more complicated cases: (1) (a + b + c + d + e) + (f + g + h + i + j) in floating point so that addition is not associative and the order matters. The order is left to right in C, and this expression uses 2 sets of parentheses to not use left to right for all terms. Full parentheses gives the good obfuscation: ((((a + b) + c) + d) + e) + ((((f + g) + h) + i) + j) (2) Similarly with +- instead of all +. The order matters much more, but I don't remember ever seeing expressions with only +- being obfuscated by parentheses, except in floating point code where the author wants to emphasize the left to right evaluation. I guess there are also examples with integer types. Even with all + operations, the order is critical with plain ints, since different orders might cause overflow, and with mixed signed/unsigned/small/large integer types, the promotions depend on the order. (3) Similarly with */ instead of +-. These are even more similar in programming uses than in math structures, since + is always associative and commutative in math structures, but it is not even commutative in programming. Bruce From owner-svn-src-head@freebsd.org Sat Aug 5 03:55:39 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87697DB5D04 for ; Sat, 5 Aug 2017 03:55:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x234.google.com (mail-io0-x234.google.com [IPv6:2607:f8b0:4001:c06::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5BC3D63430 for ; Sat, 5 Aug 2017 03:55:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x234.google.com with SMTP id c74so11823703iod.4 for ; Fri, 04 Aug 2017 20:55:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=fZFbPWEzrlHZNB7ND2VEwCDbWwgVRkA0kkezJMfVeEQ=; b=V987beTTQ63tExRITY1AAKGIm2dESvElKHkFxg+p0C/C1XswWG4BhaxarrEuthTIih WAeNO7xPjeWQnNjXE5/JxrlzpLXQr2nlqjO96MuWOBR73ZfqRq7P91flxGadZzVuOQcC xaxFeBTdebD/iYq5xnNCKToALM3YrAvexQn2eT1WARJyaWkdDevopS3c2tIzrSC5c9wK vSwM2qJExPhe8iLa8gUcd0R+GaJBgT53QE+G5cDwFH8UL3Kyqsvuc2NG4jvTTcnkB3kD xxtzYfekUJ0Xuw7ldyz/5c+Hwbjo9v4TUW4ckkSUV+Wp9Za8zBFjG5xUYAB/x9n75iBf UhAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=fZFbPWEzrlHZNB7ND2VEwCDbWwgVRkA0kkezJMfVeEQ=; b=ldVsHq/oa9pvhbJTNPFZ+RwMClOYN1T4krnmqZe1Tod38bAbb0Q+c6/iYU+Sw6I80Y YfyYFh9XcAzihNL8HJLrsFe49TMxEqCGE/7DF8wi3CMos2Bz8DKadoBrYwt1sYSnTsTy gVgZpKpQaLSZLPO1Fk7aZswa3i2cZdpS/xfp5uYp7+3UlSbcLhNR64lTKQneiGwmQAxQ Rc7Bgspf4KleZfHlJ/XRZfjtCctzBaBf7zhWDjs+/HT4qw0nq6ZLGFVwcAvQDgqamg8H 6lvqzDHvPpYJjbRKiND5aC9TG5RLgSqPhmX7jLGWLujfFPacGXSrr1we6e/kpSF9pBZ5 L1dg== X-Gm-Message-State: AHYfb5gmaWNDBNAg//+UkHzdDUEyL03iSlN8lw274FIzCxNFhSaQ9VSP zZSssHLUCBZ3tO3+lsjfga6oMOq0VE5M X-Received: by 10.107.190.197 with SMTP id o188mr4742802iof.160.1501905338668; Fri, 04 Aug 2017 20:55:38 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.58.17 with HTTP; Fri, 4 Aug 2017 20:55:38 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:d916:ea3b:9e7d:6b51] In-Reply-To: <20170805123249.K1377@besplex.bde.org> References: <201708040423.v744NOix022999@repo.freebsd.org> <20170805123249.K1377@besplex.bde.org> From: Warner Losh Date: Fri, 4 Aug 2017 21:55:38 -0600 X-Google-Sender-Auth: 0f4UTYpGde1x-n_2DglaHjnp8xE Message-ID: Subject: Re: svn commit: r322041 - head/sys/kern To: Bruce Evans Cc: Alan Cox , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2017 03:55:39 -0000 On Fri, Aug 4, 2017 at 9:22 PM, Bruce Evans wrote: > On Fri, 4 Aug 2017, Alan Cox wrote: > > Log: >> In case readers are misled by expressions that combine multiplication and >> division, add parentheses to make the precedence explicit. >> >> Submitted by: Doug Moore >> Requested by: imp >> Reviewed by: imp >> MFC after: 1 week >> X-MFC after: r321840 >> Differential Revision: https://reviews.freebsd.org/D11815 >> > > This obfuscates the necessary parentheses. > > Modified: head/sys/kern/subr_blist.c >> ... >> static inline daddr_t >> radix_to_skip(daddr_t radix) >> { >> >> return (radix / >> - (BLIST_BMAP_RADIX / BLIST_META_RADIX * (BLIST_META_RADIX - >> 1))); >> + ((BLIST_BMAP_RADIX / BLIST_META_RADIX) * (BLIST_META_RADIX - >> 1))); >> } >> > > Readers now have to do a more complete parse to find the interesting parts, > and writers have to count to a large number to get the count right when > the parantheses pile up at the right. > > This expression is relatively simple to parse to remove the obfuscation, > but consider more complicated cases: > > (1) > (a + b + c + d + e) + (f + g + h + i + j) > > in floating point so that addition is not associative and the order > matters. > The order is left to right in C, and this expression uses 2 sets of > parentheses to not use left to right for all terms. Full parentheses gives > the good obfuscation: > > ((((a + b) + c) + d) + e) + ((((f + g) + h) + i) + j) > > (2) Similarly with +- instead of all +. The order matters much more, but I > don't remember ever seeing expressions with only +- being obfuscated by > parentheses, except in floating point code where the author wants to > emphasize the left to right evaluation. I guess there are also examples > with integer types. Even with all + operations, the order is critical > with plain ints, since different orders might cause overflow, and with > mixed signed/unsigned/small/large integer types, the promotions depend > on the order. > > (3) Similarly with */ instead of +-. These are even more similar in > programming uses than in math structures, since + is always associative > and commutative in math structures, but it is not even commutative in > programming. You know, for this case, it's totally cool. Warner From owner-svn-src-head@freebsd.org Sat Aug 5 05:20:05 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A2A8DBE036; Sat, 5 Aug 2017 05:20:05 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E81DC65BB6; Sat, 5 Aug 2017 05:20:04 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v755K4t8036124; Sat, 5 Aug 2017 05:20:04 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v755K4JN036123; Sat, 5 Aug 2017 05:20:04 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201708050520.v755K4JN036123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sat, 5 Aug 2017 05:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322074 - head/sys/boot/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/sys/boot/efi/libefi X-SVN-Commit-Revision: 322074 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2017 05:20:05 -0000 Author: tsoome Date: Sat Aug 5 05:20:03 2017 New Revision: 322074 URL: https://svnweb.freebsd.org/changeset/base/322074 Log: libefi/time.c cstyle cleanup libefi/time.c is mix of different styles, this update does cleanup. Also fix 0 versus NULL, and zero the tv structure for case we get error from UEFI firmware. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D11861 Modified: head/sys/boot/efi/libefi/time.c Modified: head/sys/boot/efi/libefi/time.c ============================================================================== --- head/sys/boot/efi/libefi/time.c Sat Aug 5 00:28:42 2017 (r322073) +++ head/sys/boot/efi/libefi/time.c Sat Aug 5 05:20:03 2017 (r322074) @@ -2,28 +2,28 @@ * Copyright (c) 1999, 2000 * Intel 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. - * + * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: - * + * * This product includes software developed by Intel Corporation and * its contributors. - * + * * 4. Neither the name of Intel Corporation or its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION 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 @@ -35,7 +35,7 @@ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. - * + * */ #include @@ -48,50 +48,51 @@ __FBSDID("$FreeBSD$"); #include /* -// Accurate only for the past couple of centuries; -// that will probably do. -// -// (#defines From FreeBSD 3.2 lib/libc/stdtime/tzfile.h) -*/ + * Accurate only for the past couple of centuries; + * that will probably do. + * + * (#defines From FreeBSD 3.2 lib/libc/stdtime/tzfile.h) + */ -#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) -#define SECSPERHOUR ( 60*60 ) -#define SECSPERDAY (24 * SECSPERHOUR) +#define isleap(y) (((y) % 4) == 0 && \ + (((y) % 100) != 0 || ((y) % 400) == 0)) +#define SECSPERHOUR (60*60) +#define SECSPERDAY (24 * SECSPERHOUR) /* -// These arrays give the cumulative number of days up to the first of the -// month number used as the index (1 -> 12) for regular and leap years. -// The value at index 13 is for the whole year. -*/ + * These arrays give the cumulative number of days up to the first of the + * month number used as the index (1 -> 12) for regular and leap years. + * The value at index 13 is for the whole year. + */ static const time_t CumulativeDays[2][14] = { - {0, - 0, - 31, - 31 + 28, - 31 + 28 + 31, - 31 + 28 + 31 + 30, - 31 + 28 + 31 + 30 + 31, - 31 + 28 + 31 + 30 + 31 + 30, - 31 + 28 + 31 + 30 + 31 + 30 + 31, - 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31, - 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30, - 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31, - 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30, - 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31 }, - {0, - 0, - 31, - 31 + 29, - 31 + 29 + 31, - 31 + 29 + 31 + 30, - 31 + 29 + 31 + 30 + 31, - 31 + 29 + 31 + 30 + 31 + 30, - 31 + 29 + 31 + 30 + 31 + 30 + 31, - 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31, - 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30, - 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31, - 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30, - 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31 }}; + {0, + 0, + 31, + 31 + 28, + 31 + 28 + 31, + 31 + 28 + 31 + 30, + 31 + 28 + 31 + 30 + 31, + 31 + 28 + 31 + 30 + 31 + 30, + 31 + 28 + 31 + 30 + 31 + 30 + 31, + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31, + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30, + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31, + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30, + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31 }, + {0, + 0, + 31, + 31 + 29, + 31 + 29 + 31, + 31 + 29 + 31 + 30, + 31 + 29 + 31 + 30 + 31, + 31 + 29 + 31 + 30 + 31 + 30, + 31 + 29 + 31 + 30 + 31 + 30 + 31, + 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31, + 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30, + 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31, + 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30, + 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30 + 31 }}; void efi_time_init(void) @@ -106,145 +107,154 @@ efi_time_fini(void) void to_efi_time(EFI_TIME *efi_time, time_t time) { - if (time >= 0) { - for (efi_time->Year = 1970; - time > CumulativeDays[isleap(efi_time->Year)][13] * SECSPERDAY; - time -= CumulativeDays[isleap(efi_time->Year)][13] * SECSPERDAY, - efi_time->Year++); + int lyear, month; + time_t seconds; - for (efi_time->Month = 0; - time > CumulativeDays[isleap(efi_time->Year)][efi_time->Month] * - SECSPERDAY; - efi_time->Month++); + if (time >= 0) { + efi_time->Year = 1970; + lyear = isleap(efi_time->Year); + month = 13; + seconds = CumulativeDays[lyear][month] * SECSPERDAY; + while (time > seconds) { + time -= seconds; + efi_time->Year++; + lyear = isleap(efi_time->Year); + seconds = CumulativeDays[lyear][month] * SECSPERDAY; + } - time -= CumulativeDays[isleap(efi_time->Year)][efi_time->Month - 1] * - SECSPERDAY; + efi_time->Month = 0; + while (time > + CumulativeDays[lyear][month] * SECSPERDAY) { + efi_time->Month++; + } - for (efi_time->Day = 0; time > SECSPERDAY; - time -= SECSPERDAY, efi_time->Day++); + month = efi_time->Month - 1; + time -= CumulativeDays[lyear][month] * SECSPERDAY; - for (efi_time->Hour = 0; time > SECSPERHOUR; - time -= SECSPERHOUR, efi_time->Hour++); + for (efi_time->Day = 0; time > SECSPERDAY; efi_time->Day++) + time -= SECSPERDAY; - for (efi_time->Minute = 0; time > 60; - time -= 60, efi_time->Minute++); + for (efi_time->Hour = 0; time > SECSPERHOUR; efi_time->Hour++) + time -= SECSPERHOUR; - efi_time->Second = time; - efi_time->Nanosecond = 0; - efi_time->TimeZone = 0; - efi_time->Daylight = 0; - } else { - memset(efi_time, 0, sizeof(EFI_TIME)); - } + for (efi_time->Minute = 0; time > 60; efi_time->Minute++) + time -= 60; + + efi_time->Second = time; + efi_time->Nanosecond = 0; + efi_time->TimeZone = 0; + efi_time->Daylight = 0; + } else { + memset(efi_time, 0, sizeof(EFI_TIME)); + } } time_t from_efi_time(EFI_TIME *ETime) { + time_t UTime; + int Year; - time_t UTime; - int Year; + /* + * Do a santity check + */ + if (ETime->Year < 1998 || ETime->Year > 2099 || + ETime->Month == 0 || ETime->Month > 12 || + ETime->Day == 0 || ETime->Month > 31 || + ETime->Hour > 23 || ETime->Minute > 59 || + ETime->Second > 59 || ETime->TimeZone < -1440 || + (ETime->TimeZone > 1440 && ETime->TimeZone != 2047)) { + return (0); + } - /* - // Do a santity check - */ - if ( ETime->Year < 1998 || ETime->Year > 2099 || - ETime->Month == 0 || ETime->Month > 12 || - ETime->Day == 0 || ETime->Month > 31 || - ETime->Hour > 23 || - ETime->Minute > 59 || - ETime->Second > 59 || - ETime->TimeZone < -1440 || - (ETime->TimeZone > 1440 && ETime->TimeZone != 2047) ) { - return (0); - } + /* + * Years + */ + UTime = 0; + for (Year = 1970; Year != ETime->Year; ++Year) { + UTime += (CumulativeDays[isleap(Year)][13] * SECSPERDAY); + } - /* - // Years - */ - UTime = 0; - for (Year = 1970; Year != ETime->Year; ++Year) { - UTime += (CumulativeDays[isleap(Year)][13] * SECSPERDAY); - } + /* + * UTime should now be set to 00:00:00 on Jan 1 of the file's year. + * + * Months + */ + UTime += (CumulativeDays[isleap(ETime->Year)][ETime->Month] * + SECSPERDAY); - /* - // UTime should now be set to 00:00:00 on Jan 1 of the file's year. - // - // Months - */ - UTime += (CumulativeDays[isleap(ETime->Year)][ETime->Month] * SECSPERDAY); + /* + * UTime should now be set to 00:00:00 on the first of the file's + * month and year. + * + * Days -- Don't count the file's day + */ + UTime += (((ETime->Day > 0) ? ETime->Day-1:0) * SECSPERDAY); - /* - // UTime should now be set to 00:00:00 on the first of the file's month and year - // - // Days -- Don't count the file's day - */ - UTime += (((ETime->Day > 0) ? ETime->Day-1:0) * SECSPERDAY); + /* + * Hours + */ + UTime += (ETime->Hour * SECSPERHOUR); - /* - // Hours - */ - UTime += (ETime->Hour * SECSPERHOUR); + /* + * Minutes + */ + UTime += (ETime->Minute * 60); - /* - // Minutes - */ - UTime += (ETime->Minute * 60); + /* + * Seconds + */ + UTime += ETime->Second; - /* - // Seconds - */ - UTime += ETime->Second; + /* + * EFI time is repored in local time. Adjust for any time zone + * offset to get true UT + */ + if (ETime->TimeZone != EFI_UNSPECIFIED_TIMEZONE) { + /* + * TimeZone is kept in minues... + */ + UTime += (ETime->TimeZone * 60); + } - /* - // EFI time is repored in local time. Adjust for any time zone offset to - // get true UT - */ - if ( ETime->TimeZone != EFI_UNSPECIFIED_TIMEZONE ) { - /* - // TimeZone is kept in minues... - */ - UTime += (ETime->TimeZone * 60); - } - - return UTime; + return (UTime); } static int -EFI_GetTimeOfDay( - OUT struct timeval *tp, - OUT struct timezone *tzp - ) +EFI_GetTimeOfDay(OUT struct timeval *tp, OUT struct timezone *tzp) { EFI_TIME EfiTime; EFI_TIME_CAPABILITIES Capabilities; EFI_STATUS Status; /* - // Get time from EFI - */ + * Get time from EFI + */ Status = RS->GetTime(&EfiTime, &Capabilities); if (EFI_ERROR(Status)) return (-1); /* - // Convert to UNIX time (ie seconds since the epoch - */ + * Convert to UNIX time (ie seconds since the epoch + */ - tp->tv_sec = from_efi_time( &EfiTime ); + tp->tv_sec = from_efi_time(&EfiTime); tp->tv_usec = 0; /* EfiTime.Nanosecond * 1000; */ /* - // Do something with the timezone if needed - */ + * Do something with the timezone if needed + */ - if (tzp) { - tzp->tz_minuteswest = - EfiTime.TimeZone == EFI_UNSPECIFIED_TIMEZONE ? 0 : EfiTime.TimeZone; + if (tzp != NULL) { + if (EfiTime.TimeZone == EFI_UNSPECIFIED_TIMEZONE) + tzp->tz_minuteswest = 0; + else + tzp->tz_minuteswest = EfiTime.TimeZone; /* - // This isn't quit right since it doesn't deal with EFI_TIME_IN_DAYLIGHT - */ + * This isn't quit right since it doesn't deal with + * EFI_TIME_IN_DAYLIGHT + */ tzp->tz_dsttime = EfiTime.Daylight & EFI_TIME_ADJUST_DAYLIGHT ? 1 : 0; } @@ -256,15 +266,18 @@ time_t time(time_t *tloc) { struct timeval tv; - EFI_GetTimeOfDay(&tv, 0); - + + memset(&tv, 0, sizeof(tv)); + EFI_GetTimeOfDay(&tv, NULL); + if (tloc) *tloc = tv.tv_sec; - return tv.tv_sec; + return (tv.tv_sec); } time_t getsecs(void) { - return time(NULL); + + return (time(NULL)); } From owner-svn-src-head@freebsd.org Sat Aug 5 06:46:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D998DC1AEC; Sat, 5 Aug 2017 06:46:07 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B48F67E0F; Sat, 5 Aug 2017 06:46:07 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v756k6A4072192; Sat, 5 Aug 2017 06:46:06 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v756k6og072191; Sat, 5 Aug 2017 06:46:06 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201708050646.v756k6og072191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sat, 5 Aug 2017 06:46:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322075 - head/contrib/ipfilter/tools X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/ipfilter/tools X-SVN-Commit-Revision: 322075 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2017 06:46:07 -0000 Author: cy Date: Sat Aug 5 06:46:06 2017 New Revision: 322075 URL: https://svnweb.freebsd.org/changeset/base/322075 Log: loadpoolfile() implements a -R (NORESOLVE) option which is not listed in usage(). This commit trues up usage() with loadpoolfile(). Modified: head/contrib/ipfilter/tools/ippool.c Modified: head/contrib/ipfilter/tools/ippool.c ============================================================================== --- head/contrib/ipfilter/tools/ippool.c Sat Aug 5 05:20:03 2017 (r322074) +++ head/contrib/ipfilter/tools/ippool.c Sat Aug 5 06:46:06 2017 (r322075) @@ -77,7 +77,7 @@ usage(prog) fprintf(stderr, "Usage:\t%s\n", prog); fprintf(stderr, "\t-a [-dnv] -m [-o ] [-t type] [-T ttl] -i [/netmask]\n"); fprintf(stderr, "\t-A [-dnv] [-m ] [-o ] [-S ] [-t ]\n"); - fprintf(stderr, "\t-f [-dnuv]\n"); + fprintf(stderr, "\t-f [-dnuvR]\n"); fprintf(stderr, "\t-F [-dv] [-o ] [-t ]\n"); fprintf(stderr, "\t-l [-dv] [-m ] [-t ] [-o ] [-M ] [-N ]\n"); fprintf(stderr, "\t-r [-dnv] [-m ] [-o ] [-t type] -i [/netmask]\n"); From owner-svn-src-head@freebsd.org Sat Aug 5 06:56:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C043EDC2209; Sat, 5 Aug 2017 06:56:47 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D05C684BD; Sat, 5 Aug 2017 06:56:47 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v756ukbd076260; Sat, 5 Aug 2017 06:56:46 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v756uk48076256; Sat, 5 Aug 2017 06:56:46 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201708050656.v756uk48076256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 5 Aug 2017 06:56:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322076 - in head/sys: amd64/amd64 i386/i386 x86/include x86/x86 X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 x86/include x86/x86 X-SVN-Commit-Revision: 322076 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2017 06:56:47 -0000 Author: jkim Date: Sat Aug 5 06:56:46 2017 New Revision: 322076 URL: https://svnweb.freebsd.org/changeset/base/322076 Log: Detect hypervisors early. We used to set lower hz on hypervisors by default but it was broken since r273800 (and r278522, its MFC to stable/10) because identify_cpu() is called too late, i.e., after init_param1(). MFC after: 3 days Modified: head/sys/amd64/amd64/machdep.c head/sys/i386/i386/machdep.c head/sys/x86/include/x86_var.h head/sys/x86/x86/identcpu.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sat Aug 5 06:46:06 2017 (r322075) +++ head/sys/amd64/amd64/machdep.c Sat Aug 5 06:56:46 2017 (r322076) @@ -1537,6 +1537,8 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) kmdp = init_ops.parse_preload_data(modulep); + identify_hypervisor(); + /* Init basic tunables, hz etc */ init_param1(); Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Sat Aug 5 06:46:06 2017 (r322075) +++ head/sys/i386/i386/machdep.c Sat Aug 5 06:56:46 2017 (r322076) @@ -2185,6 +2185,8 @@ init386(int first) else init_static_kenv(NULL, 0); + identify_hypervisor(); + /* Init basic tunables, hz etc */ init_param1(); Modified: head/sys/x86/include/x86_var.h ============================================================================== --- head/sys/x86/include/x86_var.h Sat Aug 5 06:46:06 2017 (r322075) +++ head/sys/x86/include/x86_var.h Sat Aug 5 06:56:46 2017 (r322076) @@ -116,6 +116,7 @@ void cpu_setregs(void); void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); void identify_cpu(void); +void identify_hypervisor(void); void initializecpu(void); void initializecpucache(void); bool fix_cpuid(void); Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Sat Aug 5 06:46:06 2017 (r322075) +++ head/sys/x86/x86/identcpu.c Sat Aug 5 06:56:46 2017 (r322076) @@ -1252,7 +1252,7 @@ static const char *const vm_pnames[] = { NULL }; -static void +void identify_hypervisor(void) { u_int regs[4]; @@ -1403,7 +1403,6 @@ identify_cpu(void) cpu_feature2 = regs[2]; #endif - identify_hypervisor(); cpu_vendor_id = find_cpu_vendor_id(); if (fix_cpuid()) { From owner-svn-src-head@freebsd.org Sat Aug 5 07:42:55 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 239FBDC40DF; Sat, 5 Aug 2017 07:42:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAF4669A05; Sat, 5 Aug 2017 07:42:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v757giLO034595 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 5 Aug 2017 10:42:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v757giLO034595 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v757ghK5034594; Sat, 5 Aug 2017 10:42:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 5 Aug 2017 10:42:43 +0300 From: Konstantin Belousov To: Bruce Evans Cc: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321920 - head/sys/sys Message-ID: <20170805074243.GX1700@kib.kiev.ua> References: <201708021014.v72AEHEk061037@repo.freebsd.org> <37abc595-c80e-a8da-04a8-815f42c634de@selasky.org> <20170802135455.GG1700@kib.kiev.ua> <20170803122015.Q1093@besplex.bde.org> <20170803075747.GJ1700@kib.kiev.ua> <20170803180419.R2314@besplex.bde.org> <20170803120729.GO1700@kib.kiev.ua> <20170805112924.W1055@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170805112924.W1055@besplex.bde.org> User-Agent: Mutt/1.8.3 (2017-05-23) 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 autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2017 07:42:55 -0000 On Sat, Aug 05, 2017 at 12:26:03PM +1000, Bruce Evans wrote: > > +#define minor(x) ((int)(x)) > > Another nice simplification. Strictly, it should be (int)(dev_t)(x) since > the pseudo-prototype says that the arg is converted to dev_t, but yesterday > I couldn't see any differences even for exotic x and exotic arches. > > Today I can see some difference for exotic x and perverse implementations. > E.g., x with extra bits in a large signed integer type to invoke > implementation-defined behaviour, and a perverse implementation that > truncates to 0 for direct conversion to int but does the right thing > for indirect conversion). But we depend on the implementation doing > the right thing for other casts to int. > > Also, if dev_t == uintptr_t, it is valid for the caller to keep dev_t's > in void *'s internally but not to pass void * to minor() or major() > according to the prototype. However, casting in the macros breaks the > warning for this. I think pure macros should not cast their args or > pretend to have prototypes, but require callers to pass args of supported > types. The old dev_t macros were closer to this -- they have expressions > like ((x) << 8) which will fail if x is not an integral type or give > wrong results ix x has extra bits. So you are arguing to keep the & 0xffffffff operation ? I think this is not needed, since your note about cast being equivalent holds for all supported architectures and I do not see anywhere a contract for the operations to work on non-dev_t. So are you fine with the posted patch to sys/types.h ? From owner-svn-src-head@freebsd.org Sat Aug 5 07:52:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8352DC465C; Sat, 5 Aug 2017 07:52:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9762869E2C; Sat, 5 Aug 2017 07:52:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v757qFCO099895; Sat, 5 Aug 2017 07:52:15 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v757qF24099894; Sat, 5 Aug 2017 07:52:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201708050752.v757qF24099894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 5 Aug 2017 07:52:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322077 - head/share/man/man3 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/share/man/man3 X-SVN-Commit-Revision: 322077 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2017 07:52:16 -0000 Author: kib Date: Sat Aug 5 07:52:15 2017 New Revision: 322077 URL: https://svnweb.freebsd.org/changeset/base/322077 Log: Provide more detailed specification for major(), minor() and makedev(). Remove some statements which are no longer correct after ino64, and clarify other. The rewording is not in fact specific to ino64 and improvements are useful on the stable branches. Noted and reviewed by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/share/man/man3/makedev.3 Modified: head/share/man/man3/makedev.3 ============================================================================== --- head/share/man/man3/makedev.3 Sat Aug 5 06:56:46 2017 (r322076) +++ head/share/man/man3/makedev.3 Sat Aug 5 07:52:15 2017 (r322077) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 28, 2008 +.Dd August 3, 2017 .Dt MAKEDEV 3 .Os .Sh NAME @@ -43,7 +43,7 @@ .Sh DESCRIPTION The .Fn makedev -macro allows a unique device number to be generated based on its +macro returns a device number created from the provided .Fa major and .Fa minor @@ -52,13 +52,26 @@ The .Fn major and .Fn minor -macros can be used to obtain the original numbers from the device number +macros return the original numbers from the device number .Fa dev . +In other words, for a value +.Va dev +of the type +.Vt dev_t , +and values +.Va ma , mi +of the type +.Vt int , +the assertions +.Dl dev == makedev(major(dev), minor(dev)) +.Dl ma == major(makedev(ma, mi)) +.Dl mi == minor(makedev(ma, mi)) +are valid. .Pp In previous implementations of .Fx all block and character devices were uniquely identified by a pair of -major and minor numbers. +stable major and minor numbers. The major number referred to a certain device class (e.g. disks, TTYs) while the minor number identified an instance within the device class. Later versions of @@ -66,7 +79,8 @@ Later versions of automatically generate a unique device number for each character device visible in .Pa /dev/ . -These numbers are not divided in device classes. +These numbers are not divided in device classes and are not guaranteed +to be stable upon reboot or driver reload. .Pp On .Fx @@ -78,11 +92,9 @@ conventional way. .Sh RETURN VALUES The .Fn major -macro returns a device major number that has a value between 0 and 255. -The +and .Fn minor -macro returns a device minor number whose value can span the complete -range of an +macros return numbers whose value can span the complete range of an .Vt int . .Sh SEE ALSO .Xr mknod 2 , From owner-svn-src-head@freebsd.org Sat Aug 5 10:03:49 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CC06DCB4B9; Sat, 5 Aug 2017 10:03:49 +0000 (UTC) (envelope-from cmt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD6306EDB4; Sat, 5 Aug 2017 10:03:48 +0000 (UTC) (envelope-from cmt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v75A3lVs054958; Sat, 5 Aug 2017 10:03:47 GMT (envelope-from cmt@FreeBSD.org) Received: (from cmt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v75A3lYc054957; Sat, 5 Aug 2017 10:03:47 GMT (envelope-from cmt@FreeBSD.org) Message-Id: <201708051003.v75A3lYc054957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cmt set sender to cmt@FreeBSD.org using -f From: Christoph Moench-Tegeder Date: Sat, 5 Aug 2017 10:03:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322093 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: cmt X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 322093 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2017 10:03:49 -0000 Author: cmt (ports committer) Date: Sat Aug 5 10:03:47 2017 New Revision: 322093 URL: https://svnweb.freebsd.org/changeset/base/322093 Log: add myself to calendar.freebsd Reported by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Sat Aug 5 09:48:58 2017 (r322092) +++ head/usr.bin/calendar/calendars/calendar.freebsd Sat Aug 5 10:03:47 2017 (r322093) @@ -74,6 +74,7 @@ 02/15 Hiren Panchasara born in Ahmedabad, Gujarat, India, 1984 02/16 Justin Hibbits born in Toledo, Ohio, United States, 1983 02/16 Tobias Christian Berner born in Bern, Switzerland, 1985 +02/18 Christoph Moench-Tegeder born in Hannover, Niedersachsen, Germany, 1980 02/19 Murray Stokely born in Jacksonville, Florida, United States, 1979 02/20 Anders Nordby born in Oslo, Norway, 1976 02/21 Alexey Zelkin born in Simferopol, Ukraine, 1978 From owner-svn-src-head@freebsd.org Sat Aug 5 12:59:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 233E2DD4F1B; Sat, 5 Aug 2017 12:59:04 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F34CE748F3; Sat, 5 Aug 2017 12:59:03 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v75Cx30R024725; Sat, 5 Aug 2017 12:59:03 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v75Cx3jP024724; Sat, 5 Aug 2017 12:59:03 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201708051259.v75Cx3jP024724@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sat, 5 Aug 2017 12:59:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322097 - head/usr.sbin/tzsetup X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/usr.sbin/tzsetup X-SVN-Commit-Revision: 322097 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2017 12:59:04 -0000 Author: marius Date: Sat Aug 5 12:59:03 2017 New Revision: 322097 URL: https://svnweb.freebsd.org/changeset/base/322097 Log: - Move creation and unlinking of /etc/wall_cmos_clock from the handling of the initial UTC dialog to install_zoneinfo() so that file gets the necessary treatment also when that dialog is skipped via "-s", when selecting UTC from the time zone menu or on the command-line instead etc. - Make the initial UTC dialog actually work by giving the relevant files the necessary treatment and then exit when choosing "Yes" there instead of moving on to the time zone menu regardless. - Since r301131, /etc/localtime is also installed when selecting UTC in interactive configurations (which previously meant only via the time zone menu, though). Thus, the code added in r230298 which treats a NULL zone file name as UTC and removes /etc/localtime in that case can go again. - Consistently refer to "could not delete" (as chosen by the oldest such code in here) when unlink(2) fails instead of a to mixture of "delete" and "unlink" in error messages. Modified: head/usr.sbin/tzsetup/tzsetup.c Modified: head/usr.sbin/tzsetup/tzsetup.c ============================================================================== --- head/usr.sbin/tzsetup/tzsetup.c Sat Aug 5 12:54:07 2017 (r322096) +++ head/usr.sbin/tzsetup/tzsetup.c Sat Aug 5 12:59:03 2017 (r322097) @@ -107,7 +107,7 @@ xdialog_count_rows(const char *p) rows++; } - return rows ? rows : 1; + return (rows ? rows : 1); } static int @@ -124,7 +124,7 @@ xdialog_count_columns(const char *p) len = strlen(p); max_len = MAX(max_len, len); - return max_len; + return (max_len); } static int @@ -164,7 +164,8 @@ xdialog_menu(const char *title, const char *cprompt, i tag_x = MAX(tag_x, l + k + 2); } } - width = MAX(xdialog_count_columns(cprompt), title != NULL ? xdialog_count_columns(title) : 0); + width = MAX(xdialog_count_columns(cprompt), title != NULL ? + xdialog_count_columns(title) : 0); width = MAX(width, tag_x + 4) + 4; } width = MAX(width, 24); @@ -199,7 +200,7 @@ again: free(listitems); dlg_restore_vars(&save_vars); - return result; + return (result); } static int usedialog = 1; @@ -269,7 +270,7 @@ continent_country_menu(dialogMenuItem *continent) int rv; if (strcmp(continent->title, "UTC") == 0) - return set_zone_utc(); + return (set_zone_utc()); /* Short cut -- if there's only one country, don't post a menu. */ if (contp->nitems == 1) @@ -642,7 +643,7 @@ set_zone_menu(dialogMenuItem *dmi) static int set_zone_utc(void) { - if (!confirm_zone(NULL)) + if (!confirm_zone("UTC")) return (DITEM_FAILURE | DITEM_RECREATE); return (install_zoneinfo("UTC")); @@ -656,7 +657,7 @@ confirm_zone(const char *filename) struct tm *tm; int rv; - setenv("TZ", filename == NULL ? "" : filename, 1); + setenv("TZ", filename, 1); tzset(); tm = localtime(&t); @@ -714,11 +715,8 @@ install_zoneinfo_file(const char *zoneinfo_file) #ifdef VERBOSE snprintf(title, sizeof(title), "Info"); - if (zoneinfo_file == NULL) + if (copymode) snprintf(prompt, sizeof(prompt), - "Removing %s", path_localtime); - else if (copymode) - snprintf(prompt, sizeof(prompt), "Copying %s to %s", zoneinfo_file, path_localtime); else snprintf(prompt, sizeof(prompt), @@ -733,49 +731,6 @@ install_zoneinfo_file(const char *zoneinfo_file) #endif if (reallydoit) { - if (zoneinfo_file == NULL) { - if (unlink(path_localtime) < 0 && errno != ENOENT) { - snprintf(title, sizeof(title), "Error"); - snprintf(prompt, sizeof(prompt), - "Could not delete %s: %s", path_localtime, - strerror(errno)); -#ifdef HAVE_DIALOG - if (usedialog) - dialog_msgbox(title, prompt, 8, 72, 1); - else -#endif - fprintf(stderr, "%s\n", prompt); - - return (DITEM_FAILURE | DITEM_RECREATE); - } - if (unlink(path_db) < 0 && errno != ENOENT) { - snprintf(title, sizeof(title), "Error"); - snprintf(prompt, sizeof(prompt), - "Could not delete %s: %s", path_db, - strerror(errno)); -#ifdef HAVE_DIALOG - if (usedialog) - dialog_msgbox(title, prompt, 8, 72, 1); - else -#endif - fprintf(stderr, "%s\n", prompt); - - return (DITEM_FAILURE | DITEM_RECREATE); - } -#ifdef VERBOSE - snprintf(title, sizeof(title), "Done"); - snprintf(prompt, sizeof(prompt), - "Removed %s", path_localtime); -#ifdef HAVE_DIALOG - if (usedialog) - dialog_msgbox(title, prompt, 8, 72, 1); - else -#endif - fprintf(stderr, "%s\n", prompt); -#endif - return (DITEM_LEAVE_MENU); - } - if (copymode) { fd1 = open(zoneinfo_file, O_RDONLY, 0); if (fd1 < 0) { @@ -794,7 +749,7 @@ install_zoneinfo_file(const char *zoneinfo_file) if (unlink(path_localtime) < 0 && errno != ENOENT) { snprintf(prompt, sizeof(prompt), - "Could not unlink %s: %s", + "Could not delete %s: %s", path_localtime, strerror(errno)); #ifdef HAVE_DIALOG if (usedialog) { @@ -859,7 +814,7 @@ install_zoneinfo_file(const char *zoneinfo_file) } if (unlink(path_localtime) < 0 && errno != ENOENT) { snprintf(prompt, sizeof(prompt), - "Could not unlink %s: %s", + "Could not delete %s: %s", path_localtime, strerror(errno)); #ifdef HAVE_DIALOG if (usedialog) { @@ -911,10 +866,48 @@ install_zoneinfo_file(const char *zoneinfo_file) static int install_zoneinfo(const char *zoneinfo) { - int rv; + int fd, rv; FILE *f; char path_zoneinfo_file[MAXPATHLEN]; + char prompt[SILLY_BUFFER_SIZE], title[64]; + if (reallydoit) { + if (strcmp(zoneinfo, "UTC") == 0) { + if (unlink(path_wall_cmos_clock) < 0 && + errno != ENOENT) { + snprintf(title, sizeof(title), "Error"); + snprintf(prompt, sizeof(prompt), + "Could not delete %s: %s", + path_wall_cmos_clock, strerror(errno)); +#ifdef HAVE_DIALOG + if (usedialog) + dialog_msgbox(title, prompt, 8, 72, 1); + else +#endif + fprintf(stderr, "%s\n", prompt); + + return (DITEM_FAILURE | DITEM_RECREATE); + } + } else { + fd = open(path_wall_cmos_clock, O_WRONLY | O_CREAT | + O_TRUNC, S_IRUSR | S_IRGRP | S_IROTH); + if (fd < 0) { + snprintf(title, sizeof(title), "Error"); + snprintf(prompt, sizeof(prompt), + "Could not create %s: %s", + path_wall_cmos_clock, strerror(errno)); +#ifdef HAVE_DIALOG + if (usedialog) + dialog_msgbox(title, prompt, 8, 72, 1); + else +#endif + fprintf(stderr, "%s\n", prompt); + return (DITEM_FAILURE | DITEM_RECREATE); + } + close(fd); + } + } + if ((size_t)snprintf(path_zoneinfo_file, sizeof(path_zoneinfo_file), "%s/%s", path_zoneinfo, zoneinfo) >= sizeof(path_zoneinfo_file)) errx(1, "%s/%s name too long", path_zoneinfo, zoneinfo); @@ -945,7 +938,6 @@ main(int argc, char **argv) { #ifdef HAVE_DIALOG char title[64], prompt[128]; - int fd; #endif int c, rv, skiputc; char vm_guest[16] = ""; @@ -1067,19 +1059,11 @@ main(int argc, char **argv) yesno = dialog_yesno(title, prompt, 7, 73); dlg_restore_vars(&save_vars); if (!yesno) { - if (reallydoit) - unlink(path_wall_cmos_clock); - } else { if (reallydoit) { - fd = open(path_wall_cmos_clock, - O_WRONLY | O_CREAT | O_TRUNC, - S_IRUSR | S_IRGRP | S_IROTH); - if (fd < 0) { - end_dialog(); - err(1, "create %s", - path_wall_cmos_clock); - } - close(fd); + rv = install_zoneinfo("UTC"); + dlg_clear(); + end_dialog(); + exit(rv & ~DITEM_LEAVE_MENU); } } dlg_clear(); From owner-svn-src-head@freebsd.org Sat Aug 5 13:38:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3390DD6FA5; Sat, 5 Aug 2017 13:38:44 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8079675C44; Sat, 5 Aug 2017 13:38:44 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 9A5075A9F14; Sat, 5 Aug 2017 13:38:42 +0000 (UTC) Date: Sat, 5 Aug 2017 13:38:42 +0000 From: Brooks Davis To: Jeremie Le Hen Cc: "Ngie Cooper (yaneurabeya)" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r322029 - in head: usr.bin usr.sbin Message-ID: <20170805133842.GC16195@spindle.one-eyed-alien.net> References: <201708032130.v73LUC2H045637@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2017 13:38:44 -0000 On Fri, Aug 04, 2017 at 04:50:32PM +0200, Jeremie Le Hen wrote: > On Fri, Aug 4, 2017 at 12:42 AM, Ngie Cooper (yaneurabeya) > wrote: > > > >> On Aug 3, 2017, at 14:30, Jeremie Le Hen wrote: > >> > >> Author: jlh > >> Date: Thu Aug 3 21:30:12 2017 > >> New Revision: 322029 > >> URL: https://svnweb.freebsd.org/changeset/base/322029 > >> > >> Log: > >> rwho/ruptime/rwhod shouldn't be gated by RCMDS. > > > > The why in this commit and the next you made (r322031) would have been incredibly helpful. If bugzilla disappears I only have the commit history tracking the what. > > I agree, I realized this only afterwards. I don't know how to fix this though. Reverting the change and reapplying it with a meaningful message will produce the best result. -- Brooks From owner-svn-src-head@freebsd.org Sat Aug 5 16:58:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63832DBD91A; Sat, 5 Aug 2017 16:58:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32D197F53C; Sat, 5 Aug 2017 16:58:03 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v75Gw25p021412; Sat, 5 Aug 2017 16:58:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v75Gw2H3021411; Sat, 5 Aug 2017 16:58:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201708051658.v75Gw2H3021411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sat, 5 Aug 2017 16:58:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322101 - head/bin/chmod/tests X-SVN-Group: head X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: head/bin/chmod/tests X-SVN-Commit-Revision: 322101 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2017 16:58:03 -0000 Author: ngie Date: Sat Aug 5 16:58:02 2017 New Revision: 322101 URL: https://svnweb.freebsd.org/changeset/base/322101 Log: Don't check result of chflags in f_flag_cleanup() This will prevent false positives from occurring if the test is run on ZFS since ZFS doesn't support fflags throbbing like UFS. PR: 221189 MFC after: 4 days MFC with: r321949 Modified: head/bin/chmod/tests/chmod_test.sh Modified: head/bin/chmod/tests/chmod_test.sh ============================================================================== --- head/bin/chmod/tests/chmod_test.sh Sat Aug 5 16:55:07 2017 (r322100) +++ head/bin/chmod/tests/chmod_test.sh Sat Aug 5 16:58:02 2017 (r322101) @@ -115,7 +115,7 @@ f_flag_body() f_flag_cleanup() { - atf_check chflags 0 foo + chflags 0 foo || : } atf_test_case h_flag From owner-svn-src-head@freebsd.org Sat Aug 5 19:57:47 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57EB3DC721A; Sat, 5 Aug 2017 19:57:47 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 225281939; Sat, 5 Aug 2017 19:57:47 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v75Jvjct094162; Sat, 5 Aug 2017 19:57:45 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v75JvjRF094161; Sat, 5 Aug 2017 19:57:45 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201708051957.v75JvjRF094161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 5 Aug 2017 19:57:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322108 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 322108 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2017 19:57:47 -0000 Author: avos Date: Sat Aug 5 19:57:45 2017 New Revision: 322108 URL: https://svnweb.freebsd.org/changeset/base/322108 Log: Add myself to the calendar.freebsd. Reported by: mckusick Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Sat Aug 5 17:11:40 2017 (r322107) +++ head/usr.bin/calendar/calendars/calendar.freebsd Sat Aug 5 19:57:45 2017 (r322108) @@ -154,6 +154,7 @@ 04/22 Jakub Klama born in Blachownia, Silesia, Poland, 1989 04/25 Richard Gallamore born in Kissimmee, Florida, United States, 1987 04/26 Rene Ladan born in Geldrop, the Netherlands, 1980 +04/28 Andriy Voskoboinyk born in Bila Tserkva, Ukraine, 1992 04/29 Adam Weinberger born in Berkeley, California, United States, 1980 04/29 Eric Anholt born in Portland, Oregon, United States, 1983 05/01 Randall Stewart born in Spokane, Washington, United States, 1959 From owner-svn-src-head@freebsd.org Sat Aug 5 20:57:35 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB4A3DC9E5B; Sat, 5 Aug 2017 20:57:35 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A78435C9; Sat, 5 Aug 2017 20:57:35 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v75KvYND018593; Sat, 5 Aug 2017 20:57:34 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v75KvY5K018591; Sat, 5 Aug 2017 20:57:34 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201708052057.v75KvY5K018591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 5 Aug 2017 20:57:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322109 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 322109 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2017 20:57:35 -0000 Author: andrew Date: Sat Aug 5 20:57:34 2017 New Revision: 322109 URL: https://svnweb.freebsd.org/changeset/base/322109 Log: Mark each cpu in the appropriate cpuset_domain set. This allows devices to handle cases where they can only run on a single domain. To allow all devices access to this set we need to move reading the domain earlier in the boot as it was previously handled in the CPU driver, however this is too late for the GICv3 ITS driver. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/mp_machdep.c head/sys/arm64/include/param.h Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Sat Aug 5 19:57:45 2017 (r322108) +++ head/sys/arm64/arm64/mp_machdep.c Sat Aug 5 20:57:34 2017 (r322109) @@ -198,10 +198,6 @@ arm64_cpu_attach(device_t dev) /* Set the device to start it later */ cpu_list[cpuid] = dev; - /* Try to read the numa node of this cpu */ - OF_getencprop(ofw_bus_get_node(dev), "numa-node-id", - &__pcpu[cpuid].pc_domain, sizeof(__pcpu[cpuid].pc_domain)); - return (0); } @@ -535,6 +531,7 @@ static boolean_t cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) { uint64_t target_cpu; + int domain; target_cpu = reg[0]; if (addr_size == 2) { @@ -542,7 +539,17 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size target_cpu |= reg[1]; } - return (start_cpu(id, target_cpu) ? TRUE : FALSE); + if (!start_cpu(id, target_cpu)) + return (FALSE); + + /* Try to read the numa node of this cpu */ + if (OF_getencprop(node, "numa-node-id", &domain, sizeof(domain)) > 0) { + __pcpu[id].pc_domain = domain; + if (domain < MAXMEMDOM) + CPU_SET(id, &cpuset_domain[domain]); + } + + return (TRUE); } #endif Modified: head/sys/arm64/include/param.h ============================================================================== --- head/sys/arm64/include/param.h Sat Aug 5 19:57:45 2017 (r322108) +++ head/sys/arm64/include/param.h Sat Aug 5 20:57:34 2017 (r322109) @@ -60,7 +60,7 @@ #endif /* SMP || KLD_MODULE */ #ifndef MAXMEMDOM -#define MAXMEMDOM 1 +#define MAXMEMDOM 2 #endif #define ALIGNBYTES _ALIGNBYTES