CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed May 9 03:50:51 UTC 2018 Modified Files: src/sys/dev/pci: pci_subr.c pcireg.h Log Message: Fix typo. s/TPL/TLP/ To generate a diff of this commit: cvs rdiff -u -r1.200 -r1.201 src/sys/dev/pci/pci_subr.c cvs rdiff -u -r1.137 -r1.138 src/sys/dev/pci/pcireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pci_subr.c diff -u src/sys/dev/pci/pci_subr.c:1.200 src/sys/dev/pci/pci_subr.c:1.201 --- src/sys/dev/pci/pci_subr.c:1.200 Thu Feb 1 09:09:14 2018 +++ src/sys/dev/pci/pci_subr.c Wed May 9 03:50:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_subr.c,v 1.200 2018/02/01 09:09:14 msaitoh Exp $ */ +/* $NetBSD: pci_subr.c,v 1.201 2018/05/09 03:50:51 msaitoh Exp $ */ /* * Copyright (c) 1997 Zubin D. Dittia. All rights reserved. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.200 2018/02/01 09:09:14 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.201 2018/05/09 03:50:51 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_pci.h" @@ -3846,7 +3846,7 @@ pci_conf_print_dpc_cap(const pcireg_t *r extcapoff + PCI_DPC_RPPIO_HLOG); printf("RP PIO ImpSpec Log Register: start from 0x%03x\n", extcapoff + PCI_DPC_RPPIO_IMPSLOG); - printf("RP PIO TPL Prefix Log Register: start from 0x%03x\n", + printf("RP PIO TLP Prefix Log Register: start from 0x%03x\n", extcapoff + PCI_DPC_RPPIO_TLPPLOG); } Index: src/sys/dev/pci/pcireg.h diff -u src/sys/dev/pci/pcireg.h:1.137 src/sys/dev/pci/pcireg.h:1.138 --- src/sys/dev/pci/pcireg.h:1.137 Thu Feb 1 09:09:14 2018 +++ src/sys/dev/pci/pcireg.h Wed May 9 03:50:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pcireg.h,v 1.137 2018/02/01 09:09:14 msaitoh Exp $ */ +/* $NetBSD: pcireg.h,v 1.138 2018/05/09 03:50:51 msaitoh Exp $ */ /* * Copyright (c) 1995, 1996, 1999, 2000 @@ -2029,7 +2029,7 @@ struct pci_rom { /* Same */ #define PCI_DPC_RPPIO_HLOG 0x20 /* RP PIO Header Log Register */ #define PCI_DPC_RPPIO_IMPSLOG 0x30 /* RP PIO ImpSpec Log Register */ -#define PCI_DPC_RPPIO_TLPPLOG 0x34 /* RP PIO TPL Prefix Log Register */ +#define PCI_DPC_RPPIO_TLPPLOG 0x34 /* RP PIO TLP Prefix Log Register */ /* * Extended capability ID: 0x001e
CVS commit: src/sys/arch/arm
Module Name:src Committed By: thorpej Date: Wed May 9 02:53:00 UTC 2018 Modified Files: src/sys/arch/arm/broadcom: bcm2835_bsc.c src/sys/arch/arm/nvidia: tegra_i2c.c src/sys/arch/arm/samsung: exynos_i2c.c src/sys/arch/arm/sunxi: sunxi_rsb.c sunxi_twi.c Log Message: If we don't get informed (via device properties) of child I2C devices, don't assign an empty array to iba.iba_child_devices, as it will prevent indirect configuration of the I2C bus from occurring. Tested on Raspberry Pi (bcm2835), identical logical fix replicated (and compile-tested) elsewhere. PR port-arm/53171 To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/broadcom/bcm2835_bsc.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/nvidia/tegra_i2c.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/samsung/exynos_i2c.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sunxi/sunxi_rsb.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/sunxi/sunxi_twi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/broadcom/bcm2835_bsc.c diff -u src/sys/arch/arm/broadcom/bcm2835_bsc.c:1.10 src/sys/arch/arm/broadcom/bcm2835_bsc.c:1.11 --- src/sys/arch/arm/broadcom/bcm2835_bsc.c:1.10 Sat Mar 3 16:03:38 2018 +++ src/sys/arch/arm/broadcom/bcm2835_bsc.c Wed May 9 02:53:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm2835_bsc.c,v 1.10 2018/03/03 16:03:38 skrll Exp $ */ +/* $NetBSD: bcm2835_bsc.c,v 1.11 2018/05/09 02:53:00 thorpej Exp $ */ /* * Copyright (c) 2012 Jonathan A. Kollasch @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bcm2835_bsc.c,v 1.10 2018/03/03 16:03:38 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bcm2835_bsc.c,v 1.11 2018/05/09 02:53:00 thorpej Exp $"); #if defined(_KERNEL_OPT) #include "opt_kernhist.h" @@ -183,8 +183,6 @@ bsciic_attach(device_t parent, device_t iba.iba_child_devices = prop_dictionary_get(devs, "i2c-child-devices"); if (iba.iba_child_devices) prop_object_retain(iba.iba_child_devices); - else - iba.iba_child_devices = prop_array_create(); prop_object_release(devs); config_found_ia(self, "i2cbus", , iicbus_print); Index: src/sys/arch/arm/nvidia/tegra_i2c.c diff -u src/sys/arch/arm/nvidia/tegra_i2c.c:1.16 src/sys/arch/arm/nvidia/tegra_i2c.c:1.17 --- src/sys/arch/arm/nvidia/tegra_i2c.c:1.16 Thu May 25 23:43:49 2017 +++ src/sys/arch/arm/nvidia/tegra_i2c.c Wed May 9 02:53:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_i2c.c,v 1.16 2017/05/25 23:43:49 jmcneill Exp $ */ +/* $NetBSD: tegra_i2c.c,v 1.17 2018/05/09 02:53:00 thorpej Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill@@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tegra_i2c.c,v 1.16 2017/05/25 23:43:49 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tegra_i2c.c,v 1.17 2018/05/09 02:53:00 thorpej Exp $"); #include #include @@ -199,11 +199,8 @@ tegra_i2c_attach(device_t parent, device memset(, 0, sizeof(iba)); iba.iba_tag = >sc_ic; iba.iba_child_devices = prop_dictionary_get(devs, "i2c-child-devices"); - if (iba.iba_child_devices != NULL) { + if (iba.iba_child_devices != NULL) prop_object_retain(iba.iba_child_devices); - } else { - iba.iba_child_devices = prop_array_create(); - } prop_object_release(devs); sc->sc_i2cdev = config_found_ia(self, "i2cbus", , iicbus_print); Index: src/sys/arch/arm/samsung/exynos_i2c.c diff -u src/sys/arch/arm/samsung/exynos_i2c.c:1.13 src/sys/arch/arm/samsung/exynos_i2c.c:1.14 --- src/sys/arch/arm/samsung/exynos_i2c.c:1.13 Sun Jul 2 18:27:45 2017 +++ src/sys/arch/arm/samsung/exynos_i2c.c Wed May 9 02:53:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: exynos_i2c.c,v 1.13 2017/07/02 18:27:45 jmcneill Exp $ */ +/* $NetBSD: exynos_i2c.c,v 1.14 2018/05/09 02:53:00 thorpej Exp $ */ /* * Copyright (c) 2015 Jared D. McNeill @@ -31,7 +31,7 @@ #include "opt_arm_debug.h" #include -__KERNEL_RCSID(0, "$NetBSD: exynos_i2c.c,v 1.13 2017/07/02 18:27:45 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: exynos_i2c.c,v 1.14 2018/05/09 02:53:00 thorpej Exp $"); #include #include @@ -198,8 +198,6 @@ exynos_i2c_attach(device_t parent, devic iba.iba_child_devices = prop_dictionary_get(devs, "i2c-child-devices"); if (iba.iba_child_devices != NULL) prop_object_retain(iba.iba_child_devices); - else - iba.iba_child_devices = prop_array_create(); prop_object_release(devs); sc->sc_i2cdev = config_found_ia(self, "i2cbus", , iicbus_print); Index: src/sys/arch/arm/sunxi/sunxi_rsb.c diff -u src/sys/arch/arm/sunxi/sunxi_rsb.c:1.1 src/sys/arch/arm/sunxi/sunxi_rsb.c:1.2 --- src/sys/arch/arm/sunxi/sunxi_rsb.c:1.1 Sun Jul 2 18:06:45 2017 +++ src/sys/arch/arm/sunxi/sunxi_rsb.c Wed May 9 02:53:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_rsb.c,v 1.1 2017/07/02 18:06:45 jmcneill Exp $ */ +/* $NetBSD: sunxi_rsb.c,v 1.2 2018/05/09 02:53:00 thorpej Exp $ */ /*- * Copyright (c) 2014-2017
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: thorpej Date: Wed May 9 02:46:22 UTC 2018 Modified Files: src/sys/dev/i2c: ibmhawk.c Log Message: The probe this driver uses is potentially destructive; at the very least, filter on the I2C address the device is expected at before we unleash its fury. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/i2c/ibmhawk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/i2c/ibmhawk.c diff -u src/sys/dev/i2c/ibmhawk.c:1.4 src/sys/dev/i2c/ibmhawk.c:1.5 --- src/sys/dev/i2c/ibmhawk.c:1.4 Thu Jul 14 04:01:32 2016 +++ src/sys/dev/i2c/ibmhawk.c Wed May 9 02:46:22 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ibmhawk.c,v 1.4 2016/07/14 04:01:32 msaitoh Exp $ */ +/* $NetBSD: ibmhawk.c,v 1.5 2018/05/09 02:46:22 thorpej Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -99,6 +99,12 @@ ibmhawk_match(device_t parent, cfdata_t ibmhawk_response_t resp; static struct ibmhawk_softc sc; + /* There is an expected address for this device: */ + if (ia->ia_addr != 0x37) + return 0; + + /* XXX Probe is potentially destructive. */ + sc.sc_tag = ia->ia_tag; sc.sc_addr = ia->ia_addr; if (ibmhawk_request(, IHR_EQUIP, ))
CVS commit: src/usr.bin/pmap
Module Name:src Committed By: christos Date: Wed May 9 01:04:01 UTC 2018 Modified Files: src/usr.bin/pmap: pmap.c Log Message: handle field rename. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/usr.bin/pmap/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/pmap/pmap.c diff -u src/usr.bin/pmap/pmap.c:1.53 src/usr.bin/pmap/pmap.c:1.54 --- src/usr.bin/pmap/pmap.c:1.53 Wed Oct 4 07:33:01 2017 +++ src/usr.bin/pmap/pmap.c Tue May 8 21:04:01 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.53 2017/10/04 11:33:01 kamil Exp $ */ +/* $NetBSD: pmap.c,v 1.54 2018/05/09 01:04:01 christos Exp $ */ /* * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: pmap.c,v 1.53 2017/10/04 11:33:01 kamil Exp $"); +__RCSID("$NetBSD: pmap.c,v 1.54 2018/05/09 01:04:01 christos Exp $"); #endif #include @@ -119,7 +119,7 @@ dump_vm_map(kvm_t *kd, struct kinfo_proc printf(" vm_refcnt = %d,", D(vmspace, vmspace)->vm_refcnt); printf(" vm_shm = %p,\n", D(vmspace, vmspace)->vm_shm); printf("vm_rssize = %d,", D(vmspace, vmspace)->vm_rssize); - printf(" vm_swrss = %d,", D(vmspace, vmspace)->vm_swrss); + printf(" vm_rssmax = %d,", D(vmspace, vmspace)->vm_rssmax); printf(" vm_tsize = %d,", D(vmspace, vmspace)->vm_tsize); printf(" vm_dsize = %d,\n", D(vmspace, vmspace)->vm_dsize); printf("vm_ssize = %d,", D(vmspace, vmspace)->vm_ssize);
CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib
Module Name:src Committed By: sevan Date: Wed May 9 00:24:50 UTC 2018 Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: libnetpgp.3 Log Message: Add the type of information returned about maintainer. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 \ src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3 diff -u src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3:1.23 src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3:1.24 --- src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3:1.23 Sun Apr 29 14:21:16 2018 +++ src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3 Wed May 9 00:24:50 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: libnetpgp.3,v 1.23 2018/04/29 14:21:16 sevan Exp $ +.\" $NetBSD: libnetpgp.3,v 1.24 2018/05/09 00:24:50 sevan Exp $ .\" .\" Copyright (c) 2009,2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 29, 2018 +.Dd May 9, 2018 .Dt LIBNETPGP 3 .Os .Sh NAME @@ -342,6 +342,8 @@ At the present time, two types are defin .Dq version and .Dq maintainer . +The mantainer information returned contains the name, email address, PGP short +key id. A failure to present a known .Ar type argument to
CVS commit: src/usr.bin/crunch/crunchgen
Module Name:src Committed By: mrg Date: Tue May 8 23:05:17 UTC 2018 Modified Files: src/usr.bin/crunch/crunchgen: crunchgen.c Log Message: in dir_search(), don't assume a directory existing is useful, instead confirm that there is a non zero makefile in there. (this assumes the makefile is called "Makefile", which is assumed in other places in crunchgen.c already, so this doesn't make it worse.) this fixes build issues when an empty subdir exists because some files were moved subdir at some stage (ktrace, rcorder), and a non-prune update may look in the wrong dir. bump version (lots of updates between now and the previous update.) To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/usr.bin/crunch/crunchgen/crunchgen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/crunch/crunchgen/crunchgen.c diff -u src/usr.bin/crunch/crunchgen/crunchgen.c:1.85 src/usr.bin/crunch/crunchgen/crunchgen.c:1.86 --- src/usr.bin/crunch/crunchgen/crunchgen.c:1.85 Sun Oct 8 15:06:17 2017 +++ src/usr.bin/crunch/crunchgen/crunchgen.c Tue May 8 23:05:17 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: crunchgen.c,v 1.85 2017/10/08 15:06:17 christos Exp $ */ +/* $NetBSD: crunchgen.c,v 1.86 2018/05/08 23:05:17 mrg Exp $ */ /* * Copyright (c) 1994 University of Maryland * All Rights Reserved. @@ -38,7 +38,7 @@ #include #if !defined(lint) -__RCSID("$NetBSD: crunchgen.c,v 1.85 2017/10/08 15:06:17 christos Exp $"); +__RCSID("$NetBSD: crunchgen.c,v 1.86 2018/05/08 23:05:17 mrg Exp $"); #endif #include @@ -55,7 +55,7 @@ __RCSID("$NetBSD: crunchgen.c,v 1.85 201 #include #include -#define CRUNCH_VERSION "20050208" +#define CRUNCH_VERSION "20180508" #define MAXLINELEN 16384 #define MAXFIELDS 2048 @@ -907,8 +907,8 @@ dir_search(char *progname) strlst_t *dir; for (dir=srcdirs; dir != NULL; dir=dir->next) { - (void)snprintf(path, sizeof(path), "%s/%s", dir->str, progname); - if (is_dir(path)) + snprintf(path, sizeof(path), "%s/%s/Makefile", dir->str, progname); + if (is_nonempty_file(path)) return dir->str; } return NULL;
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Tue May 8 22:07:02 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sun50i_a64_ccu.c Log Message: Add audio clocks To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/sunxi/sun50i_a64_ccu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sunxi/sun50i_a64_ccu.c diff -u src/sys/arch/arm/sunxi/sun50i_a64_ccu.c:1.4 src/sys/arch/arm/sunxi/sun50i_a64_ccu.c:1.5 --- src/sys/arch/arm/sunxi/sun50i_a64_ccu.c:1.4 Sat May 5 13:28:23 2018 +++ src/sys/arch/arm/sunxi/sun50i_a64_ccu.c Tue May 8 22:07:02 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sun50i_a64_ccu.c,v 1.4 2018/05/05 13:28:23 jmcneill Exp $ */ +/* $NetBSD: sun50i_a64_ccu.c,v 1.5 2018/05/08 22:07:02 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill@@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: sun50i_a64_ccu.c,v 1.4 2018/05/05 13:28:23 jmcneill Exp $"); +__KERNEL_RCSID(1, "$NetBSD: sun50i_a64_ccu.c,v 1.5 2018/05/08 22:07:02 jmcneill Exp $"); #include #include @@ -144,6 +144,11 @@ static const char *apb2_parents[] = { "l static const char *mod_parents[] = { "hosc", "pll_periph0", "pll_periph1" }; static const char *ths_parents[] = { "hosc", NULL, NULL, NULL }; +static const struct sunxi_ccu_nkmp_tbl sun50i_a64_ac_dig_table[] = { + { 24576000, 0x55, 0, 0x14, 0x3 }, + { 0 } +}; + static struct sunxi_ccu_clk sun50i_a64_ccu_clks[] = { SUNXI_CCU_NKMP(A64_CLK_PLL_PERIPH0, "pll_periph0", "hosc", PLL_PERIPH0_CTRL_REG, /* reg */ @@ -154,6 +159,22 @@ static struct sunxi_ccu_clk sun50i_a64_c __BIT(31), /* enable */ SUNXI_CCU_NKMP_DIVIDE_BY_TWO), + SUNXI_CCU_NKMP_TABLE(A64_CLK_PLL_AUDIO_BASE, "pll_audio_base", "hosc", + PLL_AUDIO_CTRL_REG, /* reg */ + __BITS(14,8), /* n */ + 0,/* k */ + __BITS(4,0), /* m */ + __BITS(19,16), /* p */ + __BIT(31), /* enable */ + __BIT(28), /* lock */ + sun50i_a64_ac_dig_table, /* table */ + 0), + + SUNXI_CCU_FIXED_FACTOR(A64_CLK_PLL_AUDIO, "pll_audio", "pll_audio_base", 1, 1), + SUNXI_CCU_FIXED_FACTOR(A64_CLK_PLL_AUDIO_2X, "pll_audio_2x", "pll_audio_base", 1, 2), + SUNXI_CCU_FIXED_FACTOR(A64_CLK_PLL_AUDIO_4X, "pll_audio_4x", "pll_audio_base", 1, 4), + SUNXI_CCU_FIXED_FACTOR(A64_CLK_PLL_AUDIO_8X, "pll_audio_8x", "pll_audio_base", 1, 8), + SUNXI_CCU_PREDIV(A64_CLK_AHB1, "ahb1", ahb1_parents, AHB1_APB1_CFG_REG, /* reg */ __BITS(7,6), /* prediv */ @@ -201,6 +222,11 @@ static struct sunxi_ccu_clk sun50i_a64_c __BIT(31), /* enable */ SUNXI_CCU_DIV_TIMES_TWO), + SUNXI_CCU_GATE(A64_CLK_AC_DIG, "ac-dig", "pll_audio", + AC_DIG_CLK_REG, 31), + SUNXI_CCU_GATE(A64_CLK_AC_DIG_4X, "ac-dig-4x", "pll_audio_4x", + AC_DIG_CLK_REG, 30), + SUNXI_CCU_GATE(A64_CLK_BUS_MIPI_DSI, "bus-mipi-dsi", "ahb1", BUS_CLK_GATING_REG0, 1), SUNXI_CCU_GATE(A64_CLK_BUS_CE, "bus-ce", "ahb1",
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Tue May 8 22:05:25 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sunxi_ccu.h sunxi_ccu_fixed_factor.c Log Message: Pass set_rate calls on fixed factor clocks through to the parent clock (adjusting accordingly) To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/sunxi/sunxi_ccu.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sunxi/sunxi_ccu_fixed_factor.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sunxi/sunxi_ccu.h diff -u src/sys/arch/arm/sunxi/sunxi_ccu.h:1.17 src/sys/arch/arm/sunxi/sunxi_ccu.h:1.18 --- src/sys/arch/arm/sunxi/sunxi_ccu.h:1.17 Sun Apr 1 21:19:17 2018 +++ src/sys/arch/arm/sunxi/sunxi_ccu.h Tue May 8 22:05:25 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_ccu.h,v 1.17 2018/04/01 21:19:17 bouyer Exp $ */ +/* $NetBSD: sunxi_ccu.h,v 1.18 2018/05/08 22:05:25 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill@@ -341,6 +341,8 @@ struct sunxi_ccu_fixed_factor { u_int sunxi_ccu_fixed_factor_get_rate(struct sunxi_ccu_softc *, struct sunxi_ccu_clk *); +int sunxi_ccu_fixed_factor_set_rate(struct sunxi_ccu_softc *, + struct sunxi_ccu_clk *, u_int); const char *sunxi_ccu_fixed_factor_get_parent(struct sunxi_ccu_softc *, struct sunxi_ccu_clk *); @@ -353,6 +355,7 @@ const char *sunxi_ccu_fixed_factor_get_p .u.fixed_factor.mult = (_mult),\ .get_rate = sunxi_ccu_fixed_factor_get_rate, \ .get_parent = sunxi_ccu_fixed_factor_get_parent, \ + .set_rate = sunxi_ccu_fixed_factor_set_rate, \ } struct sunxi_ccu_fractional { Index: src/sys/arch/arm/sunxi/sunxi_ccu_fixed_factor.c diff -u src/sys/arch/arm/sunxi/sunxi_ccu_fixed_factor.c:1.1 src/sys/arch/arm/sunxi/sunxi_ccu_fixed_factor.c:1.2 --- src/sys/arch/arm/sunxi/sunxi_ccu_fixed_factor.c:1.1 Sat Sep 30 12:48:58 2017 +++ src/sys/arch/arm/sunxi/sunxi_ccu_fixed_factor.c Tue May 8 22:05:25 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_ccu_fixed_factor.c,v 1.1 2017/09/30 12:48:58 jmcneill Exp $ */ +/* $NetBSD: sunxi_ccu_fixed_factor.c,v 1.2 2018/05/08 22:05:25 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_ccu_fixed_factor.c,v 1.1 2017/09/30 12:48:58 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_ccu_fixed_factor.c,v 1.2 2018/05/08 22:05:25 jmcneill Exp $"); #include #include @@ -64,6 +64,33 @@ sunxi_ccu_fixed_factor_get_rate(struct s return (u_int)(((uint64_t)p_rate * fixed_factor->mult) / fixed_factor->div); } +static int +sunxi_ccu_fixed_factor_set_parent_rate(struct clk *clkp, u_int rate) +{ + struct clk *clkp_parent; + + clkp_parent = clk_get_parent(clkp); + if (clkp_parent == NULL) + return ENXIO; + + return clk_set_rate(clkp_parent, rate); +} + +int +sunxi_ccu_fixed_factor_set_rate(struct sunxi_ccu_softc *sc, +struct sunxi_ccu_clk *clk, u_int rate) +{ + struct sunxi_ccu_fixed_factor *fixed_factor = >u.fixed_factor; + struct clk *clkp = >base; + + KASSERT(clk->type == SUNXI_CCU_FIXED_FACTOR); + + rate *= fixed_factor->div; + rate /= fixed_factor->mult; + + return sunxi_ccu_fixed_factor_set_parent_rate(clkp, rate); +} + const char * sunxi_ccu_fixed_factor_get_parent(struct sunxi_ccu_softc *sc, struct sunxi_ccu_clk *clk)
CVS commit: src/sys/arch
Module Name:src Committed By: christos Date: Tue May 8 19:35:17 UTC 2018 Modified Files: src/sys/arch/sun2/include: types.h src/sys/arch/sun3/include: types.h Log Message: make as not having pmap statistics available To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sun2/include/types.h cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sun3/include/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sun2/include/types.h diff -u src/sys/arch/sun2/include/types.h:1.11 src/sys/arch/sun2/include/types.h:1.12 --- src/sys/arch/sun2/include/types.h:1.11 Tue Jan 17 15:34:57 2012 +++ src/sys/arch/sun2/include/types.h Tue May 8 15:35:17 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.11 2012/01/17 20:34:57 joerg Exp $ */ +/* $NetBSD: types.h,v 1.12 2018/05/08 19:35:17 christos Exp $ */ #include #define __HAVE_MM_MD_KERNACC @@ -6,3 +6,4 @@ #define __HAVE_MM_MD_READWRITE #define __HAVE_MM_MD_MMAP #define __HAVE_NO___THREAD +#define __HAVE_NO_PMAP_STATS Index: src/sys/arch/sun3/include/types.h diff -u src/sys/arch/sun3/include/types.h:1.19 src/sys/arch/sun3/include/types.h:1.20 --- src/sys/arch/sun3/include/types.h:1.19 Sat Oct 27 20:25:59 2012 +++ src/sys/arch/sun3/include/types.h Tue May 8 15:35:17 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.19 2012/10/28 00:25:59 chs Exp $ */ +/* $NetBSD: types.h,v 1.20 2018/05/08 19:35:17 christos Exp $ */ #include @@ -6,3 +6,4 @@ #define __HAVE_MM_MD_DIRECT_MAPPED_PHYS #define __HAVE_MM_MD_MMAP #define __HAVE_MM_MD_READWRITE +#define __HAVE_NO_PMAP_STATS
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Tue May 8 19:34:54 UTC 2018 Modified Files: src/sys/kern: kern_resource.c Log Message: get the maxrss from the vmspace field, and handle platforms that don't have pmap statistics here. To generate a diff of this commit: cvs rdiff -u -r1.178 -r1.179 src/sys/kern/kern_resource.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_resource.c diff -u src/sys/kern/kern_resource.c:1.178 src/sys/kern/kern_resource.c:1.179 --- src/sys/kern/kern_resource.c:1.178 Mon May 7 17:03:45 2018 +++ src/sys/kern/kern_resource.c Tue May 8 15:34:54 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_resource.c,v 1.178 2018/05/07 21:03:45 christos Exp $ */ +/* $NetBSD: kern_resource.c,v 1.179 2018/05/08 19:34:54 christos Exp $ */ /*- * Copyright (c) 1982, 1986, 1991, 1993 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_resource.c,v 1.178 2018/05/07 21:03:45 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_resource.c,v 1.179 2018/05/08 19:34:54 christos Exp $"); #include #include @@ -604,6 +604,12 @@ ruspace(struct proc *p) ru->ru_ixrss = vm->vm_tsize << (PAGE_SHIFT - 10); ru->ru_idrss = vm->vm_dsize << (PAGE_SHIFT - 10); ru->ru_isrss = vm->vm_ssize << (PAGE_SHIFT - 10); +#ifdef __HAVE_NO_PMAP_STATS + /* We don't keep track of the max so we get the current */ + ru->ru_maxrss = vm_resident_space(vm) << (PAGE_SHIFT - 10); +#else + ru->ru_maxrss = vm->vm_rssmax << (PAGE_SHIFT - 10); +#endif } void
CVS commit: src/sys/uvm
Module Name:src Committed By: christos Date: Tue May 8 19:33:57 UTC 2018 Modified Files: src/sys/uvm: uvm_extern.h uvm_fault.c uvm_fault_i.h Log Message: don't store the rssmax in the lwp rusage, it is a per proc property. Instead utilize an unused field in the vmspace struct to store it. Also conditionalize on platforms that have pmap statistics available. To generate a diff of this commit: cvs rdiff -u -r1.210 -r1.211 src/sys/uvm/uvm_extern.h cvs rdiff -u -r1.203 -r1.204 src/sys/uvm/uvm_fault.c cvs rdiff -u -r1.30 -r1.31 src/sys/uvm/uvm_fault_i.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_extern.h diff -u src/sys/uvm/uvm_extern.h:1.210 src/sys/uvm/uvm_extern.h:1.211 --- src/sys/uvm/uvm_extern.h:1.210 Fri Apr 20 15:02:18 2018 +++ src/sys/uvm/uvm_extern.h Tue May 8 15:33:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_extern.h,v 1.210 2018/04/20 19:02:18 jdolecek Exp $ */ +/* $NetBSD: uvm_extern.h,v 1.211 2018/05/08 19:33:57 christos Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -557,7 +557,7 @@ struct vmspace { /* we copy from vm_startcopy to the end of the structure on fork */ #define vm_startcopy vm_rssize segsz_t vm_rssize; /* current resident set size in pages */ - segsz_t vm_swrss; /* resident set size before last swap */ + segsz_t vm_rssmax; /* max resident size in pages */ segsz_t vm_tsize; /* text size (pages) XXX */ segsz_t vm_dsize; /* data size (pages) XXX */ segsz_t vm_ssize; /* stack size (pages) */ Index: src/sys/uvm/uvm_fault.c diff -u src/sys/uvm/uvm_fault.c:1.203 src/sys/uvm/uvm_fault.c:1.204 --- src/sys/uvm/uvm_fault.c:1.203 Mon May 7 17:00:14 2018 +++ src/sys/uvm/uvm_fault.c Tue May 8 15:33:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_fault.c,v 1.203 2018/05/07 21:00:14 christos Exp $ */ +/* $NetBSD: uvm_fault.c,v 1.204 2018/05/08 19:33:57 christos Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.203 2018/05/07 21:00:14 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.204 2018/05/08 19:33:57 christos Exp $"); #include "opt_uvmhist.h" @@ -661,24 +661,22 @@ void uvmfault_update_stats(struct uvm_faultinfo *ufi) { struct vm_map *map; + struct vmspace *vm; struct proc *p; - struct lwp *l; vsize_t res; map = ufi->orig_map; p = curproc; KASSERT(p != NULL); - if (>p_vmspace->vm_map != map) + vm = p->p_vmspace; + + if (>vm_map != map) return; res = pmap_resident_count(map->pmap); - /* Convert res from pages to kilobytes. */ - res <<= (PAGE_SHIFT - 10); - - l = curlwp; - if (l->l_ru.ru_maxrss < res) - l->l_ru.ru_maxrss = res; + if (vm->vm_rssmax < res) + vm->vm_rssmax = res; } /* Index: src/sys/uvm/uvm_fault_i.h diff -u src/sys/uvm/uvm_fault_i.h:1.30 src/sys/uvm/uvm_fault_i.h:1.31 --- src/sys/uvm/uvm_fault_i.h:1.30 Mon May 7 17:00:14 2018 +++ src/sys/uvm/uvm_fault_i.h Tue May 8 15:33:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_fault_i.h,v 1.30 2018/05/07 21:00:14 christos Exp $ */ +/* $NetBSD: uvm_fault_i.h,v 1.31 2018/05/08 19:33:57 christos Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -52,7 +52,9 @@ uvmfault_unlockmaps(struct uvm_faultinfo return; } +#ifndef __HAVE_NO_PMAP_STATS uvmfault_update_stats(ufi); +#endif if (write_locked) { vm_map_unlock(ufi->map); } else {
CVS commit: src/sys/arch
Module Name:src Committed By: maxv Date: Tue May 8 17:20:44 UTC 2018 Modified Files: src/sys/arch/amd64/amd64: amd64_trap.S machdep.c src/sys/arch/x86/include: pmap.h Log Message: Mitigation for the SS bug, CVE-2018-8897. We disabled dbregs a month ago in -current and -8 so we are not particularly affected anymore. The #DB handler runs on ist3, if we decide to process the exception we copy the iret frame on the correct non-ist stack and continue as usual. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/arch/amd64/amd64/amd64_trap.S cvs rdiff -u -r1.303 -r1.304 src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.76 -r1.77 src/sys/arch/x86/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/amd64_trap.S diff -u src/sys/arch/amd64/amd64/amd64_trap.S:1.40 src/sys/arch/amd64/amd64/amd64_trap.S:1.41 --- src/sys/arch/amd64/amd64/amd64_trap.S:1.40 Wed Mar 28 16:02:49 2018 +++ src/sys/arch/amd64/amd64/amd64_trap.S Tue May 8 17:20:44 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: amd64_trap.S,v 1.40 2018/03/28 16:02:49 maxv Exp $ */ +/* $NetBSD: amd64_trap.S,v 1.41 2018/05/08 17:20:44 maxv Exp $ */ /* * Copyright (c) 1998, 2007, 2008, 2017 The NetBSD Foundation, Inc. @@ -106,14 +106,132 @@ .text +/* + * ASM macro, used to leave the IST3 stack and to put ourselves on a non-IST + * stack. Only RDX, RCX and RAX are allowed to be used. + * + *+--+ + * The iret frame we copy is: | rip | cs | rflags | rsp | ss | + *+--+ + */ +.macro IST3_LEAVE is_user + .if \is_user + movq CPUVAR(CURLWP),%rax + movq L_PCB(%rax),%rax + movq PCB_RSP0(%rax),%rax + .else + movq TF_RSP(%rsp),%rax + .endif + + subq $(5*8),%rax + movq %rax,CPUVAR(SCRATCH) + + /* Copy the iret frame. */ + movq TF_SS(%rsp),%rcx + movq %rcx,(4*8)(%rax) + movq TF_RSP(%rsp),%rcx + movq %rcx,(3*8)(%rax) + movq TF_RFLAGS(%rsp),%rcx + movq %rcx,(2*8)(%rax) + movq TF_CS(%rsp),%rcx + movq %rcx,(1*8)(%rax) + movq TF_RIP(%rsp),%rcx + movq %rcx,(0*8)(%rax) + + /* Restore. */ + movq TF_RDX(%rsp),%rdx + movq TF_RCX(%rsp),%rcx + movq TF_RAX(%rsp),%rax + + /* Zero out the stack we used, RDX+RCX+RAX+IRET. */ + movq $0,TF_RDX(%rsp) + movq $0,TF_RCX(%rsp) + movq $0,TF_RAX(%rsp) + movq $0,TF_RIP(%rsp) + movq $0,TF_CS(%rsp) + movq $0,TF_RFLAGS(%rsp) + movq $0,TF_RSP(%rsp) + movq $0,TF_SS(%rsp) + + movq CPUVAR(SCRATCH),%rsp +.endm + TEXT_USER_BEGIN IDTVEC(trap00) ZTRAP(T_DIVIDE) IDTVEC_END(trap00) +/* + * Handle the SS shadow, CVE-2018-8897. + * + * We are running on the IST3 stack. If we are under an SS shadow, ignore + * the exception and return immediately. Otherwise, copy the iret frame + * onto the non-IST stack, and ZTRAP on it as usual. + * + * IST3 is used temporarily, and is mapped in userland by SVS. It contains + * a few secrets, the values of the CPU context. These secrets are zeroed + * out when we leave. + * + * When we ignore an SS shadow, we can't zero out the iret frame. It is + * not a problem, because in this particular case, the frame is known not + * to contain secrets. + */ IDTVEC(trap01) +#ifndef XEN + subq $(TF_REGSIZE+16),%rsp + + /* We clobber only RDX, RCX and RAX. */ + movq %rdx,TF_RDX(%rsp) + movq %rcx,TF_RCX(%rsp) + movq %rax,TF_RAX(%rsp) + + testb $SEL_UPL,TF_CS(%rsp) + jnz .Luser_dbentry + + movl $MSR_GSBASE,%ecx + rdmsr + cmpl $VM_MIN_KERNEL_ADDRESS_HIGH32,%edx + jae .Lkern_dbentry + + /* SS shadow, ignore the exception. */ + xorq %rax,%rax + movq %rax,%dr6 + + /* Restore and zero out. */ + movq TF_RDX(%rsp),%rdx + movq TF_RCX(%rsp),%rcx + movq TF_RAX(%rsp),%rax + movq $0,TF_RDX(%rsp) + movq $0,TF_RCX(%rsp) + movq $0,TF_RAX(%rsp) + + addq $(TF_REGSIZE+16),%rsp + iretq + +.Lkern_dbentry: + IST3_LEAVE 0 ZTRAP(T_TRCTRAP) + +.Luser_dbentry: + swapgs + SVS_ENTER_ALTSTACK + IST3_LEAVE 1 + ZTRAP_NJ(T_TRCTRAP) + subq $TF_REGSIZE,%rsp + INTR_SAVE_GPRS + cld + SMAP_ENABLE + IBRS_ENTER + movw %gs,TF_GS(%rsp) + movw %fs,TF_FS(%rsp) + movw %es,TF_ES(%rsp) + movw %ds,TF_DS(%rsp) + + jmp .Lalltraps_noentry +#else + ZTRAP(T_TRCTRAP) +#endif IDTVEC_END(trap01) /* Index: src/sys/arch/amd64/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.303 src/sys/arch/amd64/amd64/machdep.c:1.304 --- src/sys/arch/amd64/amd64/machdep.c:1.303 Wed Apr 4 12:59:49 2018 +++ src/sys/arch/amd64/amd64/machdep.c Tue May 8 17:20:44 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.303 2018/04/04 12:59:49 maxv Exp $ */ +/* $NetBSD: machdep.c,v 1.304 2018/05/08 17:20:44 maxv Exp $ */ /* * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011 @@ -110,7 +110,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.303 2018/04/04 12:59:49 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.304 2018/05/08 17:20:44 maxv Exp $"); /* #define
CVS commit: src/sys/nfs
Module Name:src Committed By: maxv Date: Tue May 8 16:47:58 UTC 2018 Modified Files: src/sys/nfs: nfs_subs.c Log Message: Use M_MOVE_PKTHDR. To generate a diff of this commit: cvs rdiff -u -r1.231 -r1.232 src/sys/nfs/nfs_subs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/nfs/nfs_subs.c diff -u src/sys/nfs/nfs_subs.c:1.231 src/sys/nfs/nfs_subs.c:1.232 --- src/sys/nfs/nfs_subs.c:1.231 Thu Apr 26 20:10:44 2018 +++ src/sys/nfs/nfs_subs.c Tue May 8 16:47:58 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_subs.c,v 1.231 2018/04/26 20:10:44 maxv Exp $ */ +/* $NetBSD: nfs_subs.c,v 1.232 2018/05/08 16:47:58 maxv Exp $ */ /* * Copyright (c) 1989, 1993 @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nfs_subs.c,v 1.231 2018/04/26 20:10:44 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_subs.c,v 1.232 2018/05/08 16:47:58 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_nfs.h" @@ -942,10 +942,7 @@ nfsm_disct(struct mbuf **mdp, char **dpo *mdp = m1 = m_get(M_WAIT, MT_DATA); MCLAIM(m1, m2->m_owner); if ((m2->m_flags & M_PKTHDR) != 0) { -/* XXX MOVE */ -M_COPY_PKTHDR(m1, m2); -m_tag_delete_chain(m2, NULL); -m2->m_flags &= ~M_PKTHDR; +M_MOVE_PKTHDR(m1, m2); } if (havebuf) { havebuf->m_next = m1;
CVS commit: src/bin/ksh
Module Name:src Committed By: kamil Date: Tue May 8 16:37:59 UTC 2018 Modified Files: src/bin/ksh: c_ksh.c c_sh.c emacs.c eval.c exec.c expand.h expr.c history.c io.c lex.c mail.c main.c misc.c syn.c table.c trap.c tree.c var.c vi.c Log Message: Stop using the register keyword in ksh(1) ksh also does some strange things with it, like put it in argument lists. No functional change intended. PR bin/53237 ksh: remove register keyword by Nia Alarie To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/bin/ksh/c_ksh.c cvs rdiff -u -r1.23 -r1.24 src/bin/ksh/c_sh.c src/bin/ksh/misc.c \ src/bin/ksh/var.c cvs rdiff -u -r1.37 -r1.38 src/bin/ksh/emacs.c cvs rdiff -u -r1.22 -r1.23 src/bin/ksh/eval.c src/bin/ksh/lex.c \ src/bin/ksh/main.c cvs rdiff -u -r1.26 -r1.27 src/bin/ksh/exec.c cvs rdiff -u -r1.6 -r1.7 src/bin/ksh/expand.h src/bin/ksh/table.c cvs rdiff -u -r1.11 -r1.12 src/bin/ksh/expr.c cvs rdiff -u -r1.18 -r1.19 src/bin/ksh/history.c cvs rdiff -u -r1.17 -r1.18 src/bin/ksh/io.c cvs rdiff -u -r1.8 -r1.9 src/bin/ksh/mail.c src/bin/ksh/tree.c cvs rdiff -u -r1.10 -r1.11 src/bin/ksh/syn.c cvs rdiff -u -r1.13 -r1.14 src/bin/ksh/trap.c cvs rdiff -u -r1.19 -r1.20 src/bin/ksh/vi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/ksh/c_ksh.c diff -u src/bin/ksh/c_ksh.c:1.27 src/bin/ksh/c_ksh.c:1.28 --- src/bin/ksh/c_ksh.c:1.27 Wed Jan 24 09:53:20 2018 +++ src/bin/ksh/c_ksh.c Tue May 8 16:37:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: c_ksh.c,v 1.27 2018/01/24 09:53:20 kamil Exp $ */ +/* $NetBSD: c_ksh.c,v 1.28 2018/05/08 16:37:59 kamil Exp $ */ /* * built-in Korn commands: c_* @@ -6,7 +6,7 @@ #include #ifndef lint -__RCSID("$NetBSD: c_ksh.c,v 1.27 2018/01/24 09:53:20 kamil Exp $"); +__RCSID("$NetBSD: c_ksh.c,v 1.28 2018/05/08 16:37:59 kamil Exp $"); #endif #include @@ -317,7 +317,7 @@ c_print(wp) Xinit(xs, xp, 128, ATEMP); while (*wp != NULL) { - register int c; + int c; s = *wp; while ((c = *s++) != '\0') { Xcheck(xs, xp); @@ -995,8 +995,8 @@ int c_unalias(wp) char **wp; { - register struct table *t = - register struct tbl *ap; + struct table *t = + struct tbl *ap; int rv = 0, all = 0; int optc; @@ -1389,7 +1389,7 @@ c_bind(wp) char **wp; { int rv = 0, macro = 0, list = 0; - register char *cp; + char *cp; int optc; while ((optc = ksh_getopt(wp, _opt, "lm")) != EOF) Index: src/bin/ksh/c_sh.c diff -u src/bin/ksh/c_sh.c:1.23 src/bin/ksh/c_sh.c:1.24 --- src/bin/ksh/c_sh.c:1.23 Fri Jun 30 04:41:19 2017 +++ src/bin/ksh/c_sh.c Tue May 8 16:37:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: c_sh.c,v 1.23 2017/06/30 04:41:19 kamil Exp $ */ +/* $NetBSD: c_sh.c,v 1.24 2018/05/08 16:37:59 kamil Exp $ */ /* * built-in Bourne commands @@ -6,7 +6,7 @@ #include #ifndef lint -__RCSID("$NetBSD: c_sh.c,v 1.23 2017/06/30 04:41:19 kamil Exp $"); +__RCSID("$NetBSD: c_sh.c,v 1.24 2018/05/08 16:37:59 kamil Exp $"); #endif #include @@ -31,8 +31,8 @@ int c_shift(wp) char **wp; { - register struct block *l = e->loc; - register int n; + struct block *l = e->loc; + int n; long val; char *arg; @@ -63,8 +63,8 @@ int c_umask(wp) char **wp; { - register int i; - register char *cp; + int i; + char *cp; int symbolic = 0; int old_umask; int optc; @@ -245,11 +245,11 @@ int c_read(wp) char **wp; { - register int c = 0; + int c = 0; int expandv = 1, history = 0; int expanding; int ecode = 0; - register char *cp; + char *cp; int fd = 0; struct shf *shf; int optc; @@ -429,7 +429,7 @@ int c_eval(wp) char **wp; { - register struct source *s; + struct source *s; int rv; if (ksh_getopt(wp, _opt, null) == '?') @@ -475,7 +475,7 @@ c_trap(wp) { int i; char *s; - register Trap *p; + Trap *p; if (ksh_getopt(wp, _opt, null) == '?') return 1; @@ -635,7 +635,7 @@ c_set(wp) { int argi, setargs; struct block *l = e->loc; - register char **owp = wp; + char **owp = wp; if (wp[1] == NULL) { static const char *const args [] = { "set", "-", NULL }; @@ -669,7 +669,7 @@ int c_unset(wp) char **wp; { - register char *id; + char *id; int optc, unset_var = 1; int ret = 0; @@ -816,8 +816,8 @@ clocktos(t) clock_t t; { static char temp[22]; /* enough for 64 bit clock_t */ - register int i; - register char *cp = temp + sizeof(temp); + int i; + char *cp = temp + sizeof(temp); /* note: posix says must use max precision, ie, if clk_tck is * 1000, must print 3 places after decimal (if non-zero, else 1). Index: src/bin/ksh/misc.c diff -u src/bin/ksh/misc.c:1.23 src/bin/ksh/misc.c:1.24 --- src/bin/ksh/misc.c:1.23 Fri Jun 30 04:41:19 2017 +++ src/bin/ksh/misc.c Tue May 8 16:37:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: misc.c,v 1.23 2017/06/30 04:41:19 kamil Exp $ */ +/* $NetBSD: misc.c,v 1.24 2018/05/08 16:37:59 kamil Exp $ */ /* * Miscellaneous functions @@ -6,7 +6,7 @@ #include
CVS commit: src/usr.sbin/cpuctl/arch
Module Name:src Committed By: ryo Date: Tue May 8 11:42:43 UTC 2018 Modified Files: src/usr.sbin/cpuctl/arch: aarch64.c Log Message: TGran64 indication was actually the opposite To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/cpuctl/arch/aarch64.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/cpuctl/arch/aarch64.c diff -u src/usr.sbin/cpuctl/arch/aarch64.c:1.1 src/usr.sbin/cpuctl/arch/aarch64.c:1.2 --- src/usr.sbin/cpuctl/arch/aarch64.c:1.1 Thu May 3 15:47:36 2018 +++ src/usr.sbin/cpuctl/arch/aarch64.c Tue May 8 11:42:43 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: aarch64.c,v 1.1 2018/05/03 15:47:36 ryo Exp $ */ +/* $NetBSD: aarch64.c,v 1.2 2018/05/08 11:42:43 ryo Exp $ */ /* * Copyright (c) 2018 Ryo Shimizu@@ -29,7 +29,7 @@ #include #ifndef lint -__RCSID("$NetBSD: aarch64.c,v 1.1 2018/05/03 15:47:36 ryo Exp $"); +__RCSID("$NetBSD: aarch64.c,v 1.2 2018/05/08 11:42:43 ryo Exp $"); #endif /* no lint */ #include @@ -239,8 +239,8 @@ struct fieldinfo id_aa64mmfr0_fieldinfo[ { .bitpos = 24, .bitwidth = 4, .name = "TGran64", .info = (const char *[16]) { /* 16=4bit */ - [0] = "No 64KB granule", - [15] = "64KB granule" + [0] = "64KB granule", + [15] = "No 64KB granule" } }, {
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Tue May 8 11:36:40 UTC 2018 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Fix a bug that TX might stall because WM_TXQ_NO_SPACE is not cleared in if_init() (though I've never seen this problem). Clear txq->txq_flags in wm_init_tx_queue(). OK'd by knakahara. To generate a diff of this commit: cvs rdiff -u -r1.577 -r1.578 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.577 src/sys/dev/pci/if_wm.c:1.578 --- src/sys/dev/pci/if_wm.c:1.577 Tue May 8 07:59:56 2018 +++ src/sys/dev/pci/if_wm.c Tue May 8 11:36:39 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.577 2018/05/08 07:59:56 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.578 2018/05/08 11:36:39 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -83,7 +83,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.577 2018/05/08 07:59:56 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.578 2018/05/08 11:36:39 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -6703,6 +6703,7 @@ wm_init_tx_queue(struct wm_softc *sc, st wm_init_tx_regs(sc, wmq, txq); wm_init_tx_buffer(sc, txq); + txq->txq_flags = 0; /* Clear WM_TXQ_NO_SPACE */ txq->txq_sending = false; }
CVS commit: src/sys/dev/ic
Module Name:src Committed By: pgoyette Date: Tue May 8 10:41:56 UTC 2018 Modified Files: src/sys/dev/ic: hme.c Log Message: Fix mis-placed right paren. kern/53271 To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/sys/dev/ic/hme.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/hme.c diff -u src/sys/dev/ic/hme.c:1.96 src/sys/dev/ic/hme.c:1.97 --- src/sys/dev/ic/hme.c:1.96 Tue May 23 02:19:14 2017 +++ src/sys/dev/ic/hme.c Tue May 8 10:41:56 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: hme.c,v 1.96 2017/05/23 02:19:14 ozaki-r Exp $ */ +/* $NetBSD: hme.c,v 1.97 2018/05/08 10:41:56 pgoyette Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hme.c,v 1.96 2017/05/23 02:19:14 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hme.c,v 1.97 2018/05/08 10:41:56 pgoyette Exp $"); /* #define HMEDEBUG */ @@ -753,7 +753,7 @@ hme_get(struct hme_softc *sc, int ri, ui pktlen = m0->m_pkthdr.len - ETHER_HDR_LEN; } else if (ntohs(eh->ether_type) == ETHERTYPE_VLAN) { evh = (struct ether_vlan_header *)eh; - if (ntohs(evh->evl_proto != ETHERTYPE_IP)) + if (ntohs(evh->evl_proto) != ETHERTYPE_IP) goto swcsum; ip = (struct ip *)((char *)eh + ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN);
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Tue May 8 09:45:54 UTC 2018 Modified Files: src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixgbe.h ixv.c Log Message: - Fix broken watchdog timer. This change detects TX device timeout correctly. NOTE: It's supporsed not to be called {ixgbe,ixv}_rearm_queues() in the timer. Those are not required if any chip have no bug. In reality, ixgbe_rearm_queues() is required on 82599 and newer chip AND other than queue 0 to prevent device timeout. When it occured, packet was sent but the descriptor's DD bit wasn't set even though IXGBE_TXD_CMD_EOP and IXGBE_TXD_CMD_RS were set. After forcing interrupt by writing EICS register in ixgbe_rearm_queues(), DD is set. Why? Is this an undocumented errata? It might be possible not call rearm_queues on 82598 or queue 0, we call in any cases in case the problem occurs. On ixv(4), I have not seen this problem yet (though I tested only on X550_X(Xeon D 12xx)'s virtual function), but we do rearm in case TX device timeout happen. - ixv(4): Call callout_stop() earlier in ixv_stop() like ixgbe_stop(). - KNF. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/dev/pci/ixgbe/ix_txrx.c cvs rdiff -u -r1.149 -r1.150 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.46 -r1.47 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.95 -r1.96 src/sys/dev/pci/ixgbe/ixv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ixgbe/ix_txrx.c diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.41 src/sys/dev/pci/ixgbe/ix_txrx.c:1.42 --- src/sys/dev/pci/ixgbe/ix_txrx.c:1.41 Wed Apr 25 08:46:19 2018 +++ src/sys/dev/pci/ixgbe/ix_txrx.c Tue May 8 09:45:54 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ix_txrx.c,v 1.41 2018/04/25 08:46:19 msaitoh Exp $ */ +/* $NetBSD: ix_txrx.c,v 1.42 2018/05/08 09:45:54 msaitoh Exp $ */ /** @@ -130,9 +130,10 @@ static void ixgbe_setup_hw_rsc(struct rx int ixgbe_legacy_start_locked(struct ifnet *ifp, struct tx_ring *txr) { - int rc; struct mbuf*m_head; struct adapter *adapter = txr->adapter; + int enqueued = 0; + int rc; IXGBE_TX_LOCK_ASSERT(txr); @@ -158,6 +159,7 @@ ixgbe_legacy_start_locked(struct ifnet * if ((rc = ixgbe_xmit(txr, m_head)) == EAGAIN) { break; } + enqueued++; IFQ_DEQUEUE(>if_snd, m_head); if (rc != 0) { m_freem(m_head); @@ -167,6 +169,10 @@ ixgbe_legacy_start_locked(struct ifnet * /* Send a copy of the frame to the BPF listener */ bpf_mtap(ifp, m_head); } + if (enqueued) { + txr->lastsent = time_uptime; + txr->sending = true; + } return IXGBE_SUCCESS; } /* ixgbe_legacy_start_locked */ @@ -313,6 +319,11 @@ ixgbe_mq_start_locked(struct ifnet *ifp, break; } + if (enqueued) { + txr->lastsent = time_uptime; + txr->sending = true; + } + if (txr->tx_avail < IXGBE_TX_CLEANUP_THRESHOLD(txr->adapter)) ixgbe_txeof(txr); @@ -537,10 +548,6 @@ retry: if (m_head->m_flags & M_MCAST) ifp->if_omcasts++; - /* Mark queue as having work */ - if (txr->busy == 0) - txr->busy = 1; - return (0); } /* ixgbe_xmit */ @@ -666,6 +673,7 @@ ixgbe_setup_transmit_ring(struct tx_ring /* Free any existing tx buffers. */ txbuf = txr->tx_buffers; for (int i = 0; i < txr->num_desc; i++, txbuf++) { + txr->sending = false; if (txbuf->m_head != NULL) { bus_dmamap_sync(txr->txtag->dt_dmat, txbuf->map, 0, txbuf->m_head->m_pkthdr.len, @@ -1126,7 +1134,7 @@ ixgbe_txeof(struct tx_ring *txr) #endif /* DEV_NETMAP */ if (txr->tx_avail == txr->num_desc) { - txr->busy = 0; + txr->sending = false; return false; } @@ -1208,26 +1216,6 @@ ixgbe_txeof(struct tx_ring *txr) work += txr->num_desc; txr->next_to_clean = work; - /* - * Queue Hang detection, we know there's - * work outstanding or the first return - * would have been taken, so increment busy - * if nothing managed to get cleaned, then - * in local_timer it will be checked and - * marked as HUNG if it exceeds a MAX attempt. - */ - if ((processed == 0) && (txr->busy != IXGBE_QUEUE_HUNG)) - ++txr->busy; - /* - * If anything gets cleaned we reset state to 1, - * note this will turn off HUNG if its set. - */ - if (processed) - txr->busy = 1; - - if (txr->tx_avail == txr->num_desc) - txr->busy = 0; - return ((limit > 0) ? false : true); } /* ixgbe_txeof */ Index: src/sys/dev/pci/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.149 src/sys/dev/pci/ixgbe/ixgbe.c:1.150 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.149 Thu Apr 19 07:40:12 2018 +++ src/sys/dev/pci/ixgbe/ixgbe.c Tue May 8 09:45:54 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.149 2018/04/19 07:40:12 msaitoh Exp $ */ +/* $NetBSD: ixgbe.c,v 1.150 2018/05/08 09:45:54 msaitoh Exp $ */ /** @@ -184,6 +184,8 @@ static void
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Tue May 8 07:59:56 UTC 2018 Modified Files: src/sys/dev/pci: if_wm.c Log Message: rxipsum and rxtusum are not interrupt counter, so use EVCNT_TYPE_MISC instead of EVCNT_TYPE_INTR. To generate a diff of this commit: cvs rdiff -u -r1.576 -r1.577 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.576 src/sys/dev/pci/if_wm.c:1.577 --- src/sys/dev/pci/if_wm.c:1.576 Mon Apr 23 01:35:25 2018 +++ src/sys/dev/pci/if_wm.c Tue May 8 07:59:56 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.576 2018/04/23 01:35:25 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.577 2018/05/08 07:59:56 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -83,7 +83,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.576 2018/04/23 01:35:25 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.577 2018/05/08 07:59:56 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -6508,8 +6508,8 @@ wm_alloc_txrx_queues(struct wm_softc *sc WM_Q_INTR_EVCNT_ATTACH(rxq, rxintr, rxq, i, xname); WM_Q_INTR_EVCNT_ATTACH(rxq, rxdefer, rxq, i, xname); - WM_Q_INTR_EVCNT_ATTACH(rxq, rxipsum, rxq, i, xname); - WM_Q_INTR_EVCNT_ATTACH(rxq, rxtusum, rxq, i, xname); + WM_Q_MISC_EVCNT_ATTACH(rxq, rxipsum, rxq, i, xname); + WM_Q_MISC_EVCNT_ATTACH(rxq, rxtusum, rxq, i, xname); #endif /* WM_EVENT_COUNTERS */ rx_done++;
CVS commit: src/sys/net80211
Module Name:src Committed By: maxv Date: Tue May 8 07:02:07 UTC 2018 Modified Files: src/sys/net80211: ieee80211_crypto.c ieee80211_input.c ieee80211_output.c ieee80211_var.h Log Message: Remove three useless debug messages, remove meaningless XXXs, and remove ieee80211_note_frame (unused). To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/net80211/ieee80211_crypto.c cvs rdiff -u -r1.110 -r1.111 src/sys/net80211/ieee80211_input.c cvs rdiff -u -r1.62 -r1.63 src/sys/net80211/ieee80211_output.c cvs rdiff -u -r1.32 -r1.33 src/sys/net80211/ieee80211_var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net80211/ieee80211_crypto.c diff -u src/sys/net80211/ieee80211_crypto.c:1.22 src/sys/net80211/ieee80211_crypto.c:1.23 --- src/sys/net80211/ieee80211_crypto.c:1.22 Tue Apr 10 07:53:36 2018 +++ src/sys/net80211/ieee80211_crypto.c Tue May 8 07:02:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ieee80211_crypto.c,v 1.22 2018/04/10 07:53:36 maxv Exp $ */ +/* $NetBSD: ieee80211_crypto.c,v 1.23 2018/05/08 07:02:07 maxv Exp $ */ /* * Copyright (c) 2001 Atsushi Onoe @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto.c,v 1.12 2005/08/08 18:46:35 sam Exp $"); #endif #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: ieee80211_crypto.c,v 1.22 2018/04/10 07:53:36 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee80211_crypto.c,v 1.23 2018/05/08 07:02:07 maxv Exp $"); #endif #ifdef _KERNEL_OPT @@ -647,9 +647,6 @@ ieee80211_crypto_decap(struct ieee80211c } if (m == NULL) { - IEEE80211_DPRINTF(ic, IEEE80211_MSG_CRYPTO, - "[%s] unable to pullup %s header\n", - ether_sprintf(wh->i_addr2), cip->ic_name); ic->ic_stats.is_rx_tooshort++; return NULL; } Index: src/sys/net80211/ieee80211_input.c diff -u src/sys/net80211/ieee80211_input.c:1.110 src/sys/net80211/ieee80211_input.c:1.111 --- src/sys/net80211/ieee80211_input.c:1.110 Sun Jan 21 14:13:49 2018 +++ src/sys/net80211/ieee80211_input.c Tue May 8 07:02:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ieee80211_input.c,v 1.110 2018/01/21 14:13:49 maxv Exp $ */ +/* $NetBSD: ieee80211_input.c,v 1.111 2018/05/08 07:02:07 maxv Exp $ */ /* * Copyright (c) 2001 Atsushi Onoe @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.81 2005/08/10 16:22:29 sam Exp $"); #endif #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.110 2018/01/21 14:13:49 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.111 2018/05/08 07:02:07 maxv Exp $"); #endif #ifdef _KERNEL_OPT @@ -173,9 +173,6 @@ ieee80211_input_data(struct ieee80211com if (m->m_len < hdrspace && (m = m_pullup(m, hdrspace)) == NULL) { - IEEE80211_DISCARD_MAC(ic, IEEE80211_MSG_ANY, - ni->ni_macaddr, NULL, - "data too short: expecting %u", hdrspace); ic->ic_stats.is_rx_tooshort++; goto out; } @@ -3248,23 +3245,6 @@ ieee80211_note(struct ieee80211com *ic, } void -ieee80211_note_frame(struct ieee80211com *ic, - const struct ieee80211_frame *wh, - const char *fmt, ...) -{ - char buf[128]; /* XXX */ - va_list ap; - char ebuf[3 * ETHER_ADDR_LEN]; - - va_start(ap, fmt); - vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - if_printf(ic->ic_ifp, "[%s] %s\n", - ether_snprintf(ebuf, sizeof(ebuf), - ieee80211_getbssid(ic, wh)), buf); -} - -void ieee80211_note_mac(struct ieee80211com *ic, const u_int8_t mac[IEEE80211_ADDR_LEN], const char *fmt, ...) Index: src/sys/net80211/ieee80211_output.c diff -u src/sys/net80211/ieee80211_output.c:1.62 src/sys/net80211/ieee80211_output.c:1.63 --- src/sys/net80211/ieee80211_output.c:1.62 Thu May 3 17:14:37 2018 +++ src/sys/net80211/ieee80211_output.c Tue May 8 07:02:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ieee80211_output.c,v 1.62 2018/05/03 17:14:37 maxv Exp $ */ +/* $NetBSD: ieee80211_output.c,v 1.63 2018/05/08 07:02:07 maxv Exp $ */ /* * Copyright (c) 2001 Atsushi Onoe @@ -37,16 +37,13 @@ __FBSDID("$FreeBSD: src/sys/net80211/ieee80211_output.c,v 1.34 2005/08/10 16:22:29 sam Exp $"); #endif #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: ieee80211_output.c,v 1.62 2018/05/03 17:14:37 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee80211_output.c,v 1.63 2018/05/08 07:02:07 maxv Exp $"); #endif #ifdef _KERNEL_OPT #include "opt_inet.h" #endif -#ifdef __NetBSD__ -#endif /* __NetBSD__ */ - #include #include #include @@ -247,7 +244,6 @@ ieee80211_send_nulldata(struct ieee80211 MGETHDR(m, M_NOWAIT, MT_HEADER); if (m == NULL) { - /* XXX debug msg */ ic->ic_stats.is_tx_nobuf++; ieee80211_unref_node(); return ENOMEM; @@ -434,8 +430,6 @@ ieee80211_mbuf_adjust(struct ieee80211co if (M_LEADINGSPACE(m) < needed_space - TO_BE_RECLAIMED) { struct mbuf *n = m_gethdr(M_NOWAIT, m->m_type); if (n == NULL) { - IEEE80211_DPRINTF(ic, IEEE80211_MSG_OUTPUT, - "%s: cannot expand
CVS commit: src/sys/arch/arm/imx
Module Name:src Committed By: maxv Date: Tue May 8 06:11:45 UTC 2018 Modified Files: src/sys/arch/arm/imx: if_enet.c Log Message: Don't remove M_PKTHDR manually, use m_remove_pkthdr instead. ok ryo@ To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/imx/if_enet.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/imx/if_enet.c diff -u src/sys/arch/arm/imx/if_enet.c:1.12 src/sys/arch/arm/imx/if_enet.c:1.13 --- src/sys/arch/arm/imx/if_enet.c:1.12 Fri Feb 16 08:42:45 2018 +++ src/sys/arch/arm/imx/if_enet.c Tue May 8 06:11:45 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_enet.c,v 1.12 2018/02/16 08:42:45 ryo Exp $ */ +/* $NetBSD: if_enet.c,v 1.13 2018/05/08 06:11:45 maxv Exp $ */ /* * Copyright (c) 2014 Ryo Shimizu@@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_enet.c,v 1.12 2018/02/16 08:42:45 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_enet.c,v 1.13 2018/05/08 06:11:45 maxv Exp $"); #include "vlan.h" @@ -607,7 +607,8 @@ enet_rx_intr(void *arg) m->m_len = len; amount += len; - m->m_flags &= ~M_PKTHDR; + if (m->m_flags & M_PKTHDR) +m_remove_pkthdr(m); mprev->m_next = m; } mprev = m;
CVS commit: src/sys/net
Module Name:src Committed By: maxv Date: Tue May 8 06:08:19 UTC 2018 Modified Files: src/sys/net: if_l2tp.c Log Message: Simplify: use M_MOVE_PKTHDR directly. ok knakahara@ To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/net/if_l2tp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_l2tp.c diff -u src/sys/net/if_l2tp.c:1.26 src/sys/net/if_l2tp.c:1.27 --- src/sys/net/if_l2tp.c:1.26 Mon May 7 09:51:02 2018 +++ src/sys/net/if_l2tp.c Tue May 8 06:08:19 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_l2tp.c,v 1.26 2018/05/07 09:51:02 maxv Exp $ */ +/* $NetBSD: if_l2tp.c,v 1.27 2018/05/08 06:08:19 maxv Exp $ */ /* * Copyright (c) 2017 Internet Initiative Japan Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.26 2018/05/07 09:51:02 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.27 2018/05/08 06:08:19 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -506,7 +506,7 @@ l2tp_input(struct mbuf *m, struct ifnet m_freem(m); return; } - M_COPY_PKTHDR(m_head, m); + M_MOVE_PKTHDR(m_head, m); /* * m_head should be: @@ -530,11 +530,6 @@ l2tp_input(struct mbuf *m, struct ifnet if (m->m_len == 0) { m_head->m_next = m_free(m); } else { - /* - * Already copied mtag with M_COPY_PKTHDR. - * but don't delete mtag in case cut off M_PKTHDR flag - */ - m_remove_pkthdr(m); m_head->m_next = m; }