CVS commit: src
Module Name:src Committed By: msaitoh Date: Fri Dec 27 07:41:23 UTC 2019 Modified Files: src/games/quiz/datfiles: ucc src/sbin/restore: restore.h src/sys/arch/m68k/fpe: fpu_emulate.c src/sys/dev/marvell: mvxpsec.c src/sys/dev/pci: if_vge.c Log Message: s/opration/operation/ To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/games/quiz/datfiles/ucc cvs rdiff -u -r1.20 -r1.21 src/sbin/restore/restore.h cvs rdiff -u -r1.39 -r1.40 src/sys/arch/m68k/fpe/fpu_emulate.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/marvell/mvxpsec.c cvs rdiff -u -r1.77 -r1.78 src/sys/dev/pci/if_vge.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/quiz/datfiles/ucc diff -u src/games/quiz/datfiles/ucc:1.1 src/games/quiz/datfiles/ucc:1.2 --- src/games/quiz/datfiles/ucc:1.1 Sun Apr 4 10:50:51 1993 +++ src/games/quiz/datfiles/ucc Fri Dec 27 07:41:22 2019 @@ -117,7 +117,7 @@ 9-305:when possession by secured party perfects security interest without filing 9-306:proceeds; secured party's rights on disposition of collateral 9-307:protection of buyers of goods -9-310:periority of certain liens arising by opration of law (mechanic's liens) +9-310:periority of certain liens arising by operation of law (mechanic's liens) 9-311:alienability of debtor's rights; judicial process 9-312:priorities among conflicting security interests in the same collateral 9-405:assignment of security interest Index: src/sbin/restore/restore.h diff -u src/sbin/restore/restore.h:1.20 src/sbin/restore/restore.h:1.21 --- src/sbin/restore/restore.h:1.20 Sat Aug 6 20:46:42 2011 +++ src/sbin/restore/restore.h Fri Dec 27 07:41:23 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: restore.h,v 1.20 2011/08/06 20:46:42 dholland Exp $ */ +/* $NetBSD: restore.h,v 1.21 2019/12/27 07:41:23 msaitoh Exp $ */ /* * Copyright (c) 1983, 1993 @@ -61,7 +61,7 @@ extern int32_t volno; /* current volume extern int32_t ntrec; /* number of TP_BSIZE records per tape block */ extern time_t dumptime; /* time that this dump begins */ extern time_t dumpdate; /* time that this dump was made */ -extern char command; /* opration being performed */ +extern char command; /* operation being performed */ extern size_t pagesize; /* system page size */ extern FILE *terminal; /* file descriptor for the terminal input */ extern const char *tmpdir; /* where to store temporary files */ Index: src/sys/arch/m68k/fpe/fpu_emulate.c diff -u src/sys/arch/m68k/fpe/fpu_emulate.c:1.39 src/sys/arch/m68k/fpe/fpu_emulate.c:1.40 --- src/sys/arch/m68k/fpe/fpu_emulate.c:1.39 Sat Apr 6 03:06:26 2019 +++ src/sys/arch/m68k/fpe/fpu_emulate.c Fri Dec 27 07:41:23 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: fpu_emulate.c,v 1.39 2019/04/06 03:06:26 thorpej Exp $ */ +/* $NetBSD: fpu_emulate.c,v 1.40 2019/12/27 07:41:23 msaitoh Exp $ */ /* * Copyright (c) 1995 Gordon W. Ross @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fpu_emulate.c,v 1.39 2019/04/06 03:06:26 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fpu_emulate.c,v 1.40 2019/12/27 07:41:23 msaitoh Exp $"); #include #include @@ -548,7 +548,7 @@ fpu_cmp(struct fpemu *fe) } /* - * arithmetic oprations + * arithmetic operations */ static int fpu_emul_arith(struct fpemu *fe, struct instruction *insn) Index: src/sys/dev/marvell/mvxpsec.c diff -u src/sys/dev/marvell/mvxpsec.c:1.3 src/sys/dev/marvell/mvxpsec.c:1.4 --- src/sys/dev/marvell/mvxpsec.c:1.3 Tue Oct 15 00:13:53 2019 +++ src/sys/dev/marvell/mvxpsec.c Fri Dec 27 07:41:23 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: mvxpsec.c,v 1.3 2019/10/15 00:13:53 chs Exp $ */ +/* $NetBSD: mvxpsec.c,v 1.4 2019/12/27 07:41:23 msaitoh Exp $ */ /* * Copyright (c) 2015 Internet Initiative Japan Inc. * All rights reserved. @@ -207,7 +207,7 @@ STATIC int mvxpsec_header_finalize(struc INLINE void mvxpsec_drop(struct mvxpsec_softc *, struct cryptop *, struct mvxpsec_packet *, int); STATIC int mvxpsec_dispatch_queue(struct mvxpsec_softc *); -/* opencrypto opration */ +/* opencrypto operation */ INLINE int mvxpsec_parse_crd(struct mvxpsec_packet *, struct cryptodesc *); INLINE int mvxpsec_parse_crp(struct mvxpsec_packet *); Index: src/sys/dev/pci/if_vge.c diff -u src/sys/dev/pci/if_vge.c:1.77 src/sys/dev/pci/if_vge.c:1.78 --- src/sys/dev/pci/if_vge.c:1.77 Thu Nov 21 02:59:43 2019 +++ src/sys/dev/pci/if_vge.c Fri Dec 27 07:41:23 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vge.c,v 1.77 2019/11/21 02:59:43 msaitoh Exp $ */ +/* $NetBSD: if_vge.c,v 1.78 2019/12/27 07:41:23 msaitoh Exp $ */ /*- * Copyright (c) 2004 @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.77 2019/11/21 02:59:43 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.78 2019/12/27 07:41:23 msaitoh Exp $"); /* * VIA Networking Technologies VT612x PCI gigabit ethernet NIC driver. @@ -1116,7 +1116,7 @@ vge_newbuf(struct vge_softc *sc, int idx /*
CVS commit: src
Module Name:src Committed By: msaitoh Date: Fri Dec 27 07:02:26 UTC 2019 Modified Files: src/distrib/notes/mvme68k: prep src/sys/dev/pci: if_sk.c Log Message: s/is is/is/ in comment. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/distrib/notes/mvme68k/prep cvs rdiff -u -r1.102 -r1.103 src/sys/dev/pci/if_sk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/mvme68k/prep diff -u src/distrib/notes/mvme68k/prep:1.14 src/distrib/notes/mvme68k/prep:1.15 --- src/distrib/notes/mvme68k/prep:1.14 Sat Sep 6 22:19:03 2008 +++ src/distrib/notes/mvme68k/prep Fri Dec 27 07:02:26 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: prep,v 1.14 2008/09/06 22:19:03 tsutsui Exp $ +.\" $NetBSD: prep,v 1.15 2019/12/27 07:02:26 msaitoh Exp $ . \*M machines usually need little or no preparation before installing .Nx , @@ -178,7 +178,7 @@ to be saved to NVRAM. .Pp The following installation instructions will assume that your target SCSI disk drive appears at SCSI-ID 0. -If you have a tape drive, the instructions assume is is configured +If you have a tape drive, the instructions assume is configured for SCSI-ID 5. When the RAMDISK root boots, .Nx Index: src/sys/dev/pci/if_sk.c diff -u src/sys/dev/pci/if_sk.c:1.102 src/sys/dev/pci/if_sk.c:1.103 --- src/sys/dev/pci/if_sk.c:1.102 Thu Nov 28 17:09:10 2019 +++ src/sys/dev/pci/if_sk.c Fri Dec 27 07:02:26 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_sk.c,v 1.102 2019/11/28 17:09:10 maxv Exp $ */ +/* $NetBSD: if_sk.c,v 1.103 2019/12/27 07:02:26 msaitoh Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -115,7 +115,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_sk.c,v 1.102 2019/11/28 17:09:10 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_sk.c,v 1.103 2019/12/27 07:02:26 msaitoh Exp $"); #include #include @@ -2513,7 +2513,7 @@ sk_init_xmac(struct sk_if_softc *sc_if) SK_XM_SETBIT_2(sc_if, XM_TXCMD, XM_TXCMD_AUTOPAD); /* - * Enable the reception of all error frames. This is is + * Enable the reception of all error frames. This is * a necessary evil due to the design of the XMAC. The * XMAC's receive FIFO is only 8K in size, however jumbo * frames can be up to 9000 bytes in length. When bad
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Fri Dec 27 06:59:45 UTC 2019 Modified Files: src/doc [netbsd-9]: CHANGES-9.0 Log Message: Ticket #584 To generate a diff of this commit: cvs rdiff -u -r1.1.2.147 -r1.1.2.148 src/doc/CHANGES-9.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.0 diff -u src/doc/CHANGES-9.0:1.1.2.147 src/doc/CHANGES-9.0:1.1.2.148 --- src/doc/CHANGES-9.0:1.1.2.147 Thu Dec 26 20:20:27 2019 +++ src/doc/CHANGES-9.0 Fri Dec 27 06:59:45 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.0,v 1.1.2.147 2019/12/26 20:20:27 martin Exp $ +# $NetBSD: CHANGES-9.0,v 1.1.2.148 2019/12/27 06:59:45 martin Exp $ A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30 until the 9.0 release: @@ -7321,3 +7321,8 @@ sys/arch/x86/pci/if_vmx.c 1.53 Add missing splnet() for ether_ioctl(). [knakahara, ticket #583] +sys/uvm/uvm_pager.c1.118 + + PR kern/48044: remove no longer valid assertion. + [ad, ticket #584] +
CVS commit: [netbsd-9] src/sys/uvm
Module Name:src Committed By: martin Date: Fri Dec 27 06:58:56 UTC 2019 Modified Files: src/sys/uvm [netbsd-9]: uvm_pager.c Log Message: Pull up following revision(s) (requested by ad in ticket #584): sys/uvm/uvm_pager.c: revision 1.118 PR kern/48044: panic: kernel diagnostic assertion "uvmexp.swpgonly + npages <= uvmexp.swpginuse" failed swpgonly is updated asynchronously with regard to swap use. We can't assert this condition with confidence in the post-5.0 world, at least not without broader changes. swpgonly's ultimate use is of a heuristic nature so this is no problem at all. To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.111.8.1 src/sys/uvm/uvm_pager.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/uvm/uvm_pager.c diff -u src/sys/uvm/uvm_pager.c:1.111 src/sys/uvm/uvm_pager.c:1.111.8.1 --- src/sys/uvm/uvm_pager.c:1.111 Sat Oct 28 00:37:13 2017 +++ src/sys/uvm/uvm_pager.c Fri Dec 27 06:58:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pager.c,v 1.111 2017/10/28 00:37:13 pgoyette Exp $ */ +/* $NetBSD: uvm_pager.c,v 1.111.8.1 2019/12/27 06:58:56 martin Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.111 2017/10/28 00:37:13 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.111.8.1 2019/12/27 06:58:56 martin Exp $"); #include "opt_uvmhist.h" #include "opt_readahead.h" @@ -469,7 +469,6 @@ uvm_aio_aiodone_pages(struct vm_page **p /* these pages are now only in swap. */ mutex_enter(&uvm_swap_data_lock); if (error != ENOMEM) { - KASSERT(uvmexp.swpgonly + npages <= uvmexp.swpginuse); uvmexp.swpgonly += npages; } mutex_exit(&uvm_swap_data_lock);
CVS commit: src/sys
Module Name:src Committed By: msaitoh Date: Fri Dec 27 06:52:44 UTC 2019 Modified Files: src/sys/arch/emips/ebus: dz_ebus.c src/sys/arch/vax/uba: qvavar.h src/sys/dev/dec: dzvar.h src/sys/dev/pci: if_devar.h Log Message: s/recevive/receive/ in comment. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/emips/ebus/dz_ebus.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/vax/uba/qvavar.h cvs rdiff -u -r1.11 -r1.12 src/sys/dev/dec/dzvar.h cvs rdiff -u -r1.62 -r1.63 src/sys/dev/pci/if_devar.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/emips/ebus/dz_ebus.c diff -u src/sys/arch/emips/ebus/dz_ebus.c:1.9 src/sys/arch/emips/ebus/dz_ebus.c:1.10 --- src/sys/arch/emips/ebus/dz_ebus.c:1.9 Sun Mar 4 21:41:48 2018 +++ src/sys/arch/emips/ebus/dz_ebus.c Fri Dec 27 06:52:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: dz_ebus.c,v 1.9 2018/03/04 21:41:48 mrg Exp $ */ +/* $NetBSD: dz_ebus.c,v 1.10 2019/12/27 06:52:43 msaitoh Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dz_ebus.c,v 1.9 2018/03/04 21:41:48 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dz_ebus.c,v 1.10 2019/12/27 06:52:43 msaitoh Exp $"); #include "opt_ddb.h" @@ -70,7 +70,7 @@ __KERNEL_RCSID(0, "$NetBSD: dz_ebus.c,v struct dz_softc { device_t sc_dev; /* Autoconf blaha */ - struct evcnt sc_rintrcnt; /* recevive interrupt counts */ + struct evcnt sc_rintrcnt; /* receive interrupt counts */ struct evcnt sc_tintrcnt; /* transmit interrupt counts */ struct _Usart *sc_dr; /* reg pointers */ bus_space_tag_t sc_iot; Index: src/sys/arch/vax/uba/qvavar.h diff -u src/sys/arch/vax/uba/qvavar.h:1.1 src/sys/arch/vax/uba/qvavar.h:1.2 --- src/sys/arch/vax/uba/qvavar.h:1.1 Sun Jul 5 03:07:21 2015 +++ src/sys/arch/vax/uba/qvavar.h Fri Dec 27 06:52:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: qvavar.h,v 1.1 2015/07/05 03:07:21 matt Exp $ */ +/* $NetBSD: qvavar.h,v 1.2 2019/12/27 06:52:43 msaitoh Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -95,7 +95,7 @@ struct qvaux_softc { device_t sc_dev; /* Autoconf blaha */ - struct evcnt sc_rintrcnt; /* recevive interrupt counts */ + struct evcnt sc_rintrcnt; /* receive interrupt counts */ struct evcnt sc_tintrcnt; /* transmit interrupt counts */ struct qvaux_regs sc_qr; /* reg pointers */ bus_space_tag_t sc_iot; Index: src/sys/dev/dec/dzvar.h diff -u src/sys/dev/dec/dzvar.h:1.11 src/sys/dev/dec/dzvar.h:1.12 --- src/sys/dev/dec/dzvar.h:1.11 Tue May 12 14:18:16 2009 +++ src/sys/dev/dec/dzvar.h Fri Dec 27 06:52:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: dzvar.h,v 1.11 2009/05/12 14:18:16 cegger Exp $ */ +/* $NetBSD: dzvar.h,v 1.12 2019/12/27 06:52:43 msaitoh Exp $ */ /* * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -83,7 +83,7 @@ struct dz_softc { device_t sc_dev; /* Autoconf blaha */ - struct evcnt sc_rintrcnt; /* recevive interrupt counts */ + struct evcnt sc_rintrcnt; /* receive interrupt counts */ struct evcnt sc_tintrcnt; /* transmit interrupt counts */ struct dz_regs sc_dr; /* reg pointers */ bus_space_tag_t sc_iot; Index: src/sys/dev/pci/if_devar.h diff -u src/sys/dev/pci/if_devar.h:1.62 src/sys/dev/pci/if_devar.h:1.63 --- src/sys/dev/pci/if_devar.h:1.62 Tue Feb 5 06:17:03 2019 +++ src/sys/dev/pci/if_devar.h Fri Dec 27 06:52:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_devar.h,v 1.62 2019/02/05 06:17:03 msaitoh Exp $ */ +/* $NetBSD: if_devar.h,v 1.63 2019/12/27 06:52:43 msaitoh Exp $ */ /*- * Copyright (c) 1994-1997 Matt Thomas (m...@3am-software.com) @@ -153,7 +153,7 @@ typedef struct { * * The receive space MUST ALWAYS be a multiple of the page size. * And the number of receive descriptors multiplied by the size - * of the receive buffers must equal the recevive space. This + * of the receive buffers must equal the receive space. This * is so that we can manipulate the page tables so that even if a * packet wraps around the end of the receive space, we can * treat it as virtually contiguous.
CVS commit: src/sys/dev/hyperv
Module Name:src Committed By: nonaka Date: Fri Dec 27 05:59:53 UTC 2019 Modified Files: src/sys/dev/hyperv: if_hvn.c Log Message: hvn(4): Handle CFI field of VLAN. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/dev/hyperv/if_hvn.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/hyperv/if_hvn.c diff -u src/sys/dev/hyperv/if_hvn.c:1.14 src/sys/dev/hyperv/if_hvn.c:1.15 --- src/sys/dev/hyperv/if_hvn.c:1.14 Fri Dec 27 05:56:42 2019 +++ src/sys/dev/hyperv/if_hvn.c Fri Dec 27 05:59:53 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_hvn.c,v 1.14 2019/12/27 05:56:42 nonaka Exp $ */ +/* $NetBSD: if_hvn.c,v 1.15 2019/12/27 05:59:53 nonaka Exp $ */ /* $OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $ */ /*- @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.14 2019/12/27 05:56:42 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.15 2019/12/27 05:59:53 nonaka Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -67,6 +67,9 @@ __KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1 #ifndef EVL_PRIO_BITS #define EVL_PRIO_BITS 13 #endif +#ifndef EVL_CFI_BITS +#define EVL_CFI_BITS 12 +#endif #define HVN_NVS_MSGSIZE 32 #define HVN_NVS_BUFSIZE PAGE_SIZE @@ -584,7 +587,7 @@ hvn_encap(struct hvn_softc *sc, struct m tag = vlan_get_tag(m); vlan = NDIS_VLAN_INFO_MAKE(EVL_VLANOFTAG(tag), - EVL_PRIOFTAG(tag), 0); + EVL_PRIOFTAG(tag), EVL_CFIOFTAG(tag)); cp = hvn_rndis_pktinfo_append(pkt, HVN_RNDIS_PKT_LEN, NDIS_VLAN_INFO_SIZE, NDIS_PKTINFO_TYPE_VLAN); memcpy(cp, &vlan, NDIS_VLAN_INFO_SIZE); @@ -1593,6 +1596,7 @@ hvn_rxeof(struct hvn_softc *sc, uint8_t if (vlan != 0x) { uint16_t t = NDIS_VLAN_INFO_ID(vlan); t |= NDIS_VLAN_INFO_PRI(vlan) << EVL_PRIO_BITS; +t |= NDIS_VLAN_INFO_CFI(vlan) << EVL_CFI_BITS; vlan_set_tag(m, t); } break;
CVS commit: src/sys/dev/hyperv
Module Name:src Committed By: nonaka Date: Fri Dec 27 05:56:42 UTC 2019 Modified Files: src/sys/dev/hyperv: if_hvn.c Log Message: hvn(4): Use vlan_{get,set,has}_tag(). To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/dev/hyperv/if_hvn.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/hyperv/if_hvn.c diff -u src/sys/dev/hyperv/if_hvn.c:1.13 src/sys/dev/hyperv/if_hvn.c:1.14 --- src/sys/dev/hyperv/if_hvn.c:1.13 Tue Dec 10 12:20:20 2019 +++ src/sys/dev/hyperv/if_hvn.c Fri Dec 27 05:56:42 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_hvn.c,v 1.13 2019/12/10 12:20:20 nonaka Exp $ */ +/* $NetBSD: if_hvn.c,v 1.14 2019/12/27 05:56:42 nonaka Exp $ */ /* $OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $ */ /*- @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.13 2019/12/10 12:20:20 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.14 2019/12/27 05:56:42 nonaka Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -577,13 +577,14 @@ hvn_encap(struct hvn_softc *sc, struct m } txd->txd_buf = m; - if (m->m_flags & M_VLANTAG) { + if (vlan_has_tag(m)) { uint32_t vlan; char *cp; + uint16_t tag; - vlan = NDIS_VLAN_INFO_MAKE( - EVL_VLANOFTAG(m->m_pkthdr.ether_vtag), - EVL_PRIOFTAG(m->m_pkthdr.ether_vtag), 0); + tag = vlan_get_tag(m); + vlan = NDIS_VLAN_INFO_MAKE(EVL_VLANOFTAG(tag), + EVL_PRIOFTAG(tag), 0); cp = hvn_rndis_pktinfo_append(pkt, HVN_RNDIS_PKT_LEN, NDIS_VLAN_INFO_SIZE, NDIS_PKTINFO_TYPE_VLAN); memcpy(cp, &vlan, NDIS_VLAN_INFO_SIZE); @@ -1590,10 +1591,9 @@ hvn_rxeof(struct hvn_softc *sc, uint8_t case NDIS_PKTINFO_TYPE_VLAN: memcpy(&vlan, pi->rm_data, sizeof(vlan)); if (vlan != 0x) { -m->m_pkthdr.ether_vtag = -NDIS_VLAN_INFO_ID(vlan) | -(NDIS_VLAN_INFO_PRI(vlan) << EVL_PRIO_BITS); -m->m_flags |= M_VLANTAG; +uint16_t t = NDIS_VLAN_INFO_ID(vlan); +t |= NDIS_VLAN_INFO_PRI(vlan) << EVL_PRIO_BITS; +vlan_set_tag(m, t); } break; default:
CVS commit: src/sys/dev/isa
Module Name:src Committed By: msaitoh Date: Fri Dec 27 04:50:41 UTC 2019 Modified Files: src/sys/dev/isa: if_ep_isa.c Log Message: s/like like/like/ in comment. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/dev/isa/if_ep_isa.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/isa/if_ep_isa.c diff -u src/sys/dev/isa/if_ep_isa.c:1.46 src/sys/dev/isa/if_ep_isa.c:1.47 --- src/sys/dev/isa/if_ep_isa.c:1.46 Sun Nov 10 21:16:35 2019 +++ src/sys/dev/isa/if_ep_isa.c Fri Dec 27 04:50:41 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ep_isa.c,v 1.46 2019/11/10 21:16:35 chs Exp $ */ +/* $NetBSD: if_ep_isa.c,v 1.47 2019/12/27 04:50:41 msaitoh Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ep_isa.c,v 1.46 2019/11/10 21:16:35 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ep_isa.c,v 1.47 2019/12/27 04:50:41 msaitoh Exp $"); #include #include @@ -143,7 +143,7 @@ epaddcard(int bus, int iobase, int irq, /* * 3c509 cards on the ISA bus are probed in ethernet address order. * The probe sequence requires careful orchestration, and we'd like - * like to allow the irq and base address to be wildcarded. So, we + * to allow the irq and base address to be wildcarded. So, we * probe all the cards the first time epprobe() is called. On subsequent * calls we look for matching cards. */
CVS commit: src/sys/uvm
Module Name:src Committed By: ad Date: Fri Dec 27 00:46:38 UTC 2019 Modified Files: src/sys/uvm: uvm_pager.c Log Message: PR kern/48044: panic: kernel diagnostic assertion "uvmexp.swpgonly + npages <= uvmexp.swpginuse" failed swpgonly is updated asynchronously with regard to swap use. We can't assert this condition with confidence in the post-5.0 world, at least not without broader changes. swpgonly's ultimate use is of a heuristic nature so this is no problem at all. To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.118 src/sys/uvm/uvm_pager.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/uvm/uvm_pager.c diff -u src/sys/uvm/uvm_pager.c:1.117 src/sys/uvm/uvm_pager.c:1.118 --- src/sys/uvm/uvm_pager.c:1.117 Sat Dec 21 14:41:44 2019 +++ src/sys/uvm/uvm_pager.c Fri Dec 27 00:46:38 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pager.c,v 1.117 2019/12/21 14:41:44 ad Exp $ */ +/* $NetBSD: uvm_pager.c,v 1.118 2019/12/27 00:46:38 ad Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.117 2019/12/21 14:41:44 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.118 2019/12/27 00:46:38 ad Exp $"); #include "opt_uvmhist.h" #include "opt_readahead.h" @@ -464,7 +464,6 @@ uvm_aio_aiodone_pages(struct vm_page **p /* these pages are now only in swap. */ if (error != ENOMEM) { - KASSERT(uvmexp.swpgonly + npages <= uvmexp.swpginuse); atomic_add_int(&uvmexp.swpgonly, npages); } if (error) {
CVS commit: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common
Module Name:src Committed By: kamil Date: Fri Dec 27 00:35:05 UTC 2019 Modified Files: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common: sanitizer_linux_libcdep.cc Log Message: Cherry-pick LLVM upstream patch to fix build of compiler-rt commit 52b5fe5f45b1908e140e05a4eceaaac7002be768 Author: Kamil Rytarowski Date: Wed Dec 25 04:05:10 2019 +0100 [compiler-rt] [netbsd] Define _RTLD_SOURCE to fix build The TLS base (LWP private pointer) functions are namespaced and hidden i.e. inside the _RTLD_SOURCE namespace. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc diff -u src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc:1.1.1.1 src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc:1.2 --- src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc:1.1.1.1 Tue Jan 8 05:40:29 2019 +++ src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/sanitizer_linux_libcdep.cc Fri Dec 27 00:35:05 2019 @@ -28,6 +28,10 @@ #include "sanitizer_placement_new.h" #include "sanitizer_procmaps.h" +#if SANITIZER_NETBSD +#define _RTLD_SOURCE // Fast LWP private pointer getters in ThreadSelfTlsTcb(). +#endif + #include // for dlsym() #include #include
CVS commit: src/sys/arch
Module Name:src Committed By: kamil Date: Fri Dec 27 00:32:17 UTC 2019 Modified Files: src/sys/arch/alpha/include: mcontext.h src/sys/arch/amd64/include: mcontext.h src/sys/arch/hppa/include: mcontext.h src/sys/arch/i386/include: mcontext.h src/sys/arch/ia64/include: mcontext.h src/sys/arch/sh3/include: mcontext.h src/sys/arch/sparc/include: mcontext.h src/sys/arch/vax/include: mcontext.h Log Message: Harmonize the namespace of fast TLS base pointer getter functions Protect __lwp_getprivate_fast() with _RTLD_SOURCE, _LIBC_SOURCE and __LIBPTHREAD_SOURCE__. Include in this namespace and use __BEGIN_DECLS/__END_DECLS for the sake of consistency. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/alpha/include/mcontext.h cvs rdiff -u -r1.19 -r1.20 src/sys/arch/amd64/include/mcontext.h cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hppa/include/mcontext.h cvs rdiff -u -r1.14 -r1.15 src/sys/arch/i386/include/mcontext.h cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ia64/include/mcontext.h cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sh3/include/mcontext.h cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sparc/include/mcontext.h cvs rdiff -u -r1.9 -r1.10 src/sys/arch/vax/include/mcontext.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/alpha/include/mcontext.h diff -u src/sys/arch/alpha/include/mcontext.h:1.9 src/sys/arch/alpha/include/mcontext.h:1.10 --- src/sys/arch/alpha/include/mcontext.h:1.9 Thu Feb 15 15:53:56 2018 +++ src/sys/arch/alpha/include/mcontext.h Fri Dec 27 00:32:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: mcontext.h,v 1.9 2018/02/15 15:53:56 kamil Exp $ */ +/* $NetBSD: mcontext.h,v 1.10 2019/12/27 00:32:16 kamil Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -102,6 +102,11 @@ typedef struct { #define _UC_MACHINE_SET_PC(uc, pc) _UC_MACHINE_PC(uc) = (pc) +#if defined(_RTLD_SOURCE) || defined(_LIBC_SOURCE) || \ +defined(__LIBPTHREAD_SOURCE__) +#include + +__BEGIN_DECLS static __inline void * __lwp_getprivate_fast(void) { @@ -113,5 +118,8 @@ __lwp_getprivate_fast(void) return __tmp; } +__END_DECLS + +#endif #endif /* !_ALPHA_MCONTEXT_H_ */ Index: src/sys/arch/amd64/include/mcontext.h diff -u src/sys/arch/amd64/include/mcontext.h:1.19 src/sys/arch/amd64/include/mcontext.h:1.20 --- src/sys/arch/amd64/include/mcontext.h:1.19 Thu Feb 15 15:53:56 2018 +++ src/sys/arch/amd64/include/mcontext.h Fri Dec 27 00:32:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: mcontext.h,v 1.19 2018/02/15 15:53:56 kamil Exp $ */ +/* $NetBSD: mcontext.h,v 1.20 2019/12/27 00:32:16 kamil Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -84,6 +84,11 @@ typedef struct { #define __UCONTEXT_SIZE 784 +#if defined(_RTLD_SOURCE) || defined(_LIBC_SOURCE) || \ +defined(__LIBPTHREAD_SOURCE__) +#include + +__BEGIN_DECLS static __inline void * __lwp_getprivate_fast(void) { @@ -93,6 +98,9 @@ __lwp_getprivate_fast(void) return __tmp; } +__END_DECLS + +#endif #ifdef _KERNEL Index: src/sys/arch/hppa/include/mcontext.h diff -u src/sys/arch/hppa/include/mcontext.h:1.10 src/sys/arch/hppa/include/mcontext.h:1.11 --- src/sys/arch/hppa/include/mcontext.h:1.10 Tue Feb 27 11:26:39 2018 +++ src/sys/arch/hppa/include/mcontext.h Fri Dec 27 00:32:17 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: mcontext.h,v 1.10 2018/02/27 11:26:39 kamil Exp $ */ +/* $NetBSD: mcontext.h,v 1.11 2019/12/27 00:32:17 kamil Exp $ */ #ifndef _HPPA_MCONTEXT_H_ #define _HPPA_MCONTEXT_H_ @@ -59,6 +59,11 @@ do { \ } while (/*CONSTCOND*/0) #define _UC_MACHINE_INTRV(uc) ((uc)->uc_mcontext.__gregs[_REG_RET0]) +#if defined(_RTLD_SOURCE) || defined(_LIBC_SOURCE) || \ +defined(__LIBPTHREAD_SOURCE__) +#include + +__BEGIN_DECLS static __inline void * __lwp_getprivate_fast(void) { @@ -68,6 +73,9 @@ __lwp_getprivate_fast(void) return __tmp; } +__END_DECLS + +#endif #endif /* !__ASSEMBLER__ */ Index: src/sys/arch/i386/include/mcontext.h diff -u src/sys/arch/i386/include/mcontext.h:1.14 src/sys/arch/i386/include/mcontext.h:1.15 --- src/sys/arch/i386/include/mcontext.h:1.14 Thu Feb 15 15:53:56 2018 +++ src/sys/arch/i386/include/mcontext.h Fri Dec 27 00:32:17 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: mcontext.h,v 1.14 2018/02/15 15:53:56 kamil Exp $ */ +/* $NetBSD: mcontext.h,v 1.15 2019/12/27 00:32:17 kamil Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -113,6 +113,11 @@ typedef struct { #define __UCONTEXT_SIZE 776 +#if defined(_RTLD_SOURCE) || defined(_LIBC_SOURCE) || \ +defined(__LIBPTHREAD_SOURCE__) +#include + +__BEGIN_DECLS static __inline void * __lwp_getprivate_fast(void) { @@ -122,5 +127,8 @@ __lwp_getprivate_fast(void) return __tmp; } +__END_DECLS + +#endif #endif /* !_I386_MCONTEXT_H_ */ Index: src/sys/arch/ia64/include/mcontext.h diff -u src/sys/arch/ia64/include/mcontext.h
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Thu Dec 26 20:25:57 UTC 2019 Modified Files: src/doc [netbsd-8]: CHANGES-8.2 Log Message: Tickets #1477 and #1478 To generate a diff of this commit: cvs rdiff -u -r1.1.2.83 -r1.1.2.84 src/doc/CHANGES-8.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.2 diff -u src/doc/CHANGES-8.2:1.1.2.83 src/doc/CHANGES-8.2:1.1.2.84 --- src/doc/CHANGES-8.2:1.1.2.83 Tue Dec 24 17:16:23 2019 +++ src/doc/CHANGES-8.2 Thu Dec 26 20:25:56 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.2,v 1.1.2.83 2019/12/24 17:16:23 martin Exp $ +# $NetBSD: CHANGES-8.2,v 1.1.2.84 2019/12/26 20:25:56 martin Exp $ A complete list of changes from the NetBSD 8.1 release to the NetBSD 8.2 release: @@ -1818,3 +1818,13 @@ sys/miscfs/nullfs/null_vfsops.c 1.96 Fix MPSAFE flag for the root vnode. [hannken, ticket #1476] +sys/arch/x86/pci/if_vmx.c 1.53 + + Add missing splnet() for ether_ioctl(). + [knakahara, ticket #1477] + +sys/dev/pci/ixgbe/ixgbe.c 1.218 + + Add missing core lock in ixgbe_handle_mod(). + [msaitoh, ticket #1478] +
CVS commit: [netbsd-8] src/sys/dev/pci/ixgbe
Module Name:src Committed By: martin Date: Thu Dec 26 20:25:07 UTC 2019 Modified Files: src/sys/dev/pci/ixgbe [netbsd-8]: ixgbe.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1478): sys/dev/pci/ixgbe/ixgbe.c: revision 1.218 Add missing core lock in ixgbe_handle_mod(). To generate a diff of this commit: cvs rdiff -u -r1.88.2.37 -r1.88.2.38 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.37 src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.38 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.37 Tue Nov 19 10:48:15 2019 +++ src/sys/dev/pci/ixgbe/ixgbe.c Thu Dec 26 20:25:07 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.88.2.37 2019/11/19 10:48:15 martin Exp $ */ +/* $NetBSD: ixgbe.c,v 1.88.2.38 2019/12/26 20:25:07 martin Exp $ */ /** @@ -4572,6 +4572,7 @@ ixgbe_handle_mod(void *context) device_t dev = adapter->dev; u32 err, cage_full = 0; + IXGBE_CORE_LOCK(adapter); ++adapter->mod_sicount.ev_count; if (adapter->hw.need_crosstalk_fix) { switch (hw->mac.type) { @@ -4589,14 +4590,14 @@ ixgbe_handle_mod(void *context) } if (!cage_full) - return; + goto out; } err = hw->phy.ops.identify_sfp(hw); if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { device_printf(dev, "Unsupported SFP+ module type was detected.\n"); - return; + goto out; } if (hw->mac.type == ixgbe_mac_82598EB) @@ -4607,9 +4608,11 @@ ixgbe_handle_mod(void *context) if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { device_printf(dev, "Setup failure - unsupported SFP+ module type.\n"); - return; + goto out; } softint_schedule(adapter->msf_si); +out: + IXGBE_CORE_UNLOCK(adapter); } /* ixgbe_handle_mod */
CVS commit: [netbsd-8] src/sys/arch/x86/pci
Module Name:src Committed By: martin Date: Thu Dec 26 20:23:40 UTC 2019 Modified Files: src/sys/arch/x86/pci [netbsd-8]: if_vmx.c Log Message: Pull up following revision(s) (requested by knakahara in ticket #1477): sys/arch/x86/pci/if_vmx.c: revision 1.53 Fix missing splnet() for ether_ioctl() caused by if_vmx.c:r1.32. pointed out by nonaka@n.o, thanks. To generate a diff of this commit: cvs rdiff -u -r1.19.6.6 -r1.19.6.7 src/sys/arch/x86/pci/if_vmx.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/x86/pci/if_vmx.c diff -u src/sys/arch/x86/pci/if_vmx.c:1.19.6.6 src/sys/arch/x86/pci/if_vmx.c:1.19.6.7 --- src/sys/arch/x86/pci/if_vmx.c:1.19.6.6 Mon Jul 22 17:47:16 2019 +++ src/sys/arch/x86/pci/if_vmx.c Thu Dec 26 20:23:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vmx.c,v 1.19.6.6 2019/07/22 17:47:16 martin Exp $ */ +/* $NetBSD: if_vmx.c,v 1.19.6.7 2019/12/26 20:23:39 martin Exp $ */ /* $OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.19.6.6 2019/07/22 17:47:16 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.19.6.7 2019/12/26 20:23:39 martin Exp $"); #include #include @@ -2887,7 +2887,9 @@ vmxnet3_ioctl(struct ifnet *ifp, u_long break; } if (ifp->if_mtu != nmtu) { + s = splnet(); error = ether_ioctl(ifp, cmd, data); + splx(s); if (error == ENETRESET) error = vmxnet3_init(ifp); }
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Thu Dec 26 20:20:27 UTC 2019 Modified Files: src/doc [netbsd-9]: CHANGES-9.0 Log Message: Tickets #582 and #583 To generate a diff of this commit: cvs rdiff -u -r1.1.2.146 -r1.1.2.147 src/doc/CHANGES-9.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.0 diff -u src/doc/CHANGES-9.0:1.1.2.146 src/doc/CHANGES-9.0:1.1.2.147 --- src/doc/CHANGES-9.0:1.1.2.146 Tue Dec 24 17:47:14 2019 +++ src/doc/CHANGES-9.0 Thu Dec 26 20:20:27 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.0,v 1.1.2.146 2019/12/24 17:47:14 martin Exp $ +# $NetBSD: CHANGES-9.0,v 1.1.2.147 2019/12/26 20:20:27 martin Exp $ A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30 until the 9.0 release: @@ -7310,3 +7310,14 @@ sys/miscfs/nullfs/null_vfsops.c 1.96 Fix MPSAFE flag for the root vnode. [hannken, ticket #581] +bin/sh/eval.c 1.177 + + Use fork() rather than vfork() when forking to run a background + process with redirects. + [kre, ticket #582] + +sys/arch/x86/pci/if_vmx.c 1.53 + + Add missing splnet() for ether_ioctl(). + [knakahara, ticket #583] +
CVS commit: [netbsd-9] src/sys/arch/x86/pci
Module Name:src Committed By: martin Date: Thu Dec 26 20:19:37 UTC 2019 Modified Files: src/sys/arch/x86/pci [netbsd-9]: if_vmx.c Log Message: Pull up following revision(s) (requested by knakahara in ticket #583): sys/arch/x86/pci/if_vmx.c: revision 1.53 Fix missing splnet() for ether_ioctl() caused by if_vmx.c:r1.32. pointed out by nonaka@n.o, thanks. To generate a diff of this commit: cvs rdiff -u -r1.45.2.4 -r1.45.2.5 src/sys/arch/x86/pci/if_vmx.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/x86/pci/if_vmx.c diff -u src/sys/arch/x86/pci/if_vmx.c:1.45.2.4 src/sys/arch/x86/pci/if_vmx.c:1.45.2.5 --- src/sys/arch/x86/pci/if_vmx.c:1.45.2.4 Thu Oct 10 17:32:15 2019 +++ src/sys/arch/x86/pci/if_vmx.c Thu Dec 26 20:19:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vmx.c,v 1.45.2.4 2019/10/10 17:32:15 martin Exp $ */ +/* $NetBSD: if_vmx.c,v 1.45.2.5 2019/12/26 20:19:37 martin Exp $ */ /* $OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.45.2.4 2019/10/10 17:32:15 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.45.2.5 2019/12/26 20:19:37 martin Exp $"); #include #include @@ -3385,7 +3385,9 @@ vmxnet3_ioctl(struct ifnet *ifp, u_long break; } if (ifp->if_mtu != nmtu) { + s = splnet(); error = ether_ioctl(ifp, cmd, data); + splx(s); if (error == ENETRESET) error = vmxnet3_init(ifp); }
CVS commit: [netbsd-9] src/bin/sh
Module Name:src Committed By: martin Date: Thu Dec 26 20:16:47 UTC 2019 Modified Files: src/bin/sh [netbsd-9]: eval.c Log Message: Pull up following revision(s) (requested by kre in ticket #582): bin/sh/eval.c: revision 1.177 Use fork() rather than vfork() when forking to run a background process with redirects. If we use vfork() and a redirect hangs (eg: opening a fifo) which the parent was intended to unhang, then the parent never gets to continue to unhang the child. eg: mkfifo f; cat f The parent should not be waiting for a background process, even just for its exec() to complete. if there are no redirects there is (should be) nothing left that might be done that will cause any noticeable delay, so vfork() should be safe in all other cases. To generate a diff of this commit: cvs rdiff -u -r1.175.2.1 -r1.175.2.2 src/bin/sh/eval.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/sh/eval.c diff -u src/bin/sh/eval.c:1.175.2.1 src/bin/sh/eval.c:1.175.2.2 --- src/bin/sh/eval.c:1.175.2.1 Wed Dec 11 14:52:50 2019 +++ src/bin/sh/eval.c Thu Dec 26 20:16:47 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: eval.c,v 1.175.2.1 2019/12/11 14:52:50 martin Exp $ */ +/* $NetBSD: eval.c,v 1.175.2.2 2019/12/26 20:16:47 martin Exp $ */ /*- * Copyright (c) 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95"; #else -__RCSID("$NetBSD: eval.c,v 1.175.2.1 2019/12/11 14:52:50 martin Exp $"); +__RCSID("$NetBSD: eval.c,v 1.175.2.2 2019/12/26 20:16:47 martin Exp $"); #endif #endif /* not lint */ @@ -552,8 +552,8 @@ evalsubshell(union node *n, int flags) forkshell(jp = makejob(n, 1), n, backgnd?FORK_BG:FORK_FG) == 0) { if (backgnd) flags &=~ EV_TESTED; - redirect(n->nredir.redirect, REDIR_KEEP); INTON; + redirect(n->nredir.redirect, REDIR_KEEP); evaltree(n->nredir.n, flags | EV_EXIT); /* never returns */ } else if (backgnd) exitstatus = 0; @@ -1086,7 +1086,8 @@ evalcommand(union node *cmd, int flgs, s * child's address space is actually shared with the parent as * we rely on this. */ - if (usefork == 0 && cmdentry.cmdtype == CMDNORMAL) { + if (usefork == 0 && cmdentry.cmdtype == CMDNORMAL && + (!cmd->ncmd.backgnd || cmd->ncmd.redirect == NULL)) { pid_t pid; int serrno;
CVS commit: src/sys/arch/amd64/conf
Module Name:src Committed By: msaitoh Date: Thu Dec 26 17:52:49 UTC 2019 Modified Files: src/sys/arch/amd64/conf: GENERIC Log Message: Add cas(4). To generate a diff of this commit: cvs rdiff -u -r1.551 -r1.552 src/sys/arch/amd64/conf/GENERIC 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/conf/GENERIC diff -u src/sys/arch/amd64/conf/GENERIC:1.551 src/sys/arch/amd64/conf/GENERIC:1.552 --- src/sys/arch/amd64/conf/GENERIC:1.551 Sat Dec 14 07:45:20 2019 +++ src/sys/arch/amd64/conf/GENERIC Thu Dec 26 17:52:49 2019 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.551 2019/12/14 07:45:20 maxv Exp $ +# $NetBSD: GENERIC,v 1.552 2019/12/26 17:52:49 msaitoh Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.551 $" +#ident "GENERIC-$Revision: 1.552 $" maxusers 64 # estimated number of users @@ -788,6 +788,7 @@ bge* at pci? dev ? function ? # Broadcom bnx* at pci? dev ? function ? # Broadcom NetXtremeII gigabit Ethernet bwi* at pci? dev ? function ? # Broadcom BCM43xx wireless bwfm* at pci? dev ? function ? # Broadcom FullMAC +cas* at pci? dev ? function ? # Sun Cassini/Cassini+ Ethernet dge* at pci? dev ? function ? # Intel 82597 10GbE LR ena* at pci? dev ? function ? # Amazon.com Elastic Network Adapter ep* at pci? dev ? function ? # 3Com 3c59x
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Dec 26 17:51:08 UTC 2019 Modified Files: src/sys/dev/pci: if_cas.c if_casreg.h if_casvar.h Log Message: Fix a bug that the driver sometimes incorrectly attach gentbi(4) instead of gphyter(4) on non-fiber device. Tested with Sun Quad GigaSwift Ethernet UTP (QGE) (part no. 501-6522) on amd64. On this environment, the problem frequently had occurred. I also tested with other 4 cas(4) variants. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/dev/pci/if_cas.c cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/if_casreg.h cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/if_casvar.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/if_cas.c diff -u src/sys/dev/pci/if_cas.c:1.36 src/sys/dev/pci/if_cas.c:1.37 --- src/sys/dev/pci/if_cas.c:1.36 Thu Nov 21 09:12:30 2019 +++ src/sys/dev/pci/if_cas.c Thu Dec 26 17:51:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_cas.c,v 1.36 2019/11/21 09:12:30 msaitoh Exp $ */ +/* $NetBSD: if_cas.c,v 1.37 2019/12/26 17:51:08 msaitoh Exp $ */ /* $OpenBSD: if_cas.c,v 1.29 2009/11/29 16:19:38 kettenis Exp $ */ /* @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.36 2019/11/21 09:12:30 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.37 2019/12/26 17:51:08 msaitoh Exp $"); #ifndef _MODULE #include "opt_inet.h" @@ -114,7 +114,7 @@ CFATTACH_DECL3_NEW(cas, sizeof(struct ca cas_match, cas_attach, cas_detach, NULL, NULL, NULL, DVF_DETACH_SHUTDOWN); -int cas_pci_enaddr(struct cas_softc *, struct pci_attach_args *, uint8_t *); +int cas_pci_readvpd(struct cas_softc *, struct pci_attach_args *, uint8_t *); void cas_config(struct cas_softc *, const uint8_t *); void cas_start(struct ifnet *); @@ -163,18 +163,32 @@ int cas_intr(void *); #define DPRINTF(sc, x) /* nothing */ #endif +static const struct cas_pci_dev { + uint16_t cpd_vendor; + uint16_t cpd_device; + int cpd_variant; +} cas_pci_devlist[] = { + { PCI_VENDOR_SUN, PCI_PRODUCT_SUN_CASSINI, CAS_CAS }, + { PCI_VENDOR_NS, PCI_PRODUCT_NS_SATURN, CAS_SATURN }, + { 0, 0, 0 } +}; + +#define CAS_LOCAL_MAC_ADDRESS "local-mac-address" +#define CAS_PHY_INTERFACE "phy-interface" +#define CAS_PHY_TYPE "phy-type" +#define CAS_PHY_TYPE_PCS "pcs" + int cas_match(device_t parent, cfdata_t cf, void *aux) { struct pci_attach_args *pa = aux; + int i; - if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_SUN && - (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_SUN_CASSINI)) - return 1; - - if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_NS && - (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_NS_SATURN)) - return 1; + for (i = 0; cas_pci_devlist[i].cpd_vendor != 0; i++) { + if ((PCI_VENDOR(pa->pa_id) == cas_pci_devlist[i].cpd_vendor) && + (PCI_PRODUCT(pa->pa_id) == cas_pci_devlist[i].cpd_device)) + return 1; + } return 0; } @@ -205,7 +219,7 @@ static const uint8_t cas_promdat2[] = { #define CAS_LMA_MAXNUM 4 int -cas_pci_enaddr(struct cas_softc *sc, struct pci_attach_args *pa, +cas_pci_readvpd(struct cas_softc *sc, struct pci_attach_args *pa, uint8_t *enaddr) { struct pci_vpd_largeres *res; @@ -214,9 +228,10 @@ cas_pci_enaddr(struct cas_softc *sc, str bus_space_tag_t romt; bus_size_t romsize = 0; uint8_t enaddrs[CAS_LMA_MAXNUM][ETHER_ADDR_LEN]; + bool pcs[4] = {false, false, false, false}; uint8_t buf[32], *desc; pcireg_t address; - int dataoff, vpdoff, len, lma = 0; + int dataoff, vpdoff, len, lma = 0, phy = 0; int i, rv = -1; if (pci_mapreg_map(pa, PCI_MAPREG_ROM, PCI_MAPREG_TYPE_MEM, 0, @@ -261,6 +276,20 @@ next: goto next; case PCI_VPDRES_TYPE_VPD: +#ifdef CAS_DEBUG + printf("\n"); + for (i = 0; i < len; i++) { + uint8_t byte; + if (i % 16 == 0) + printf("%04x :", i); + byte = bus_space_read_1(romt, romh, vpdoff + i); + printf(" %02x", byte); + if (i % 16 == 15) + printf("\n"); + } + printf("\n"); +#endif + while (len > 0) { bus_space_read_region_1(romt, romh, vpdoff, buf, sizeof(buf)); @@ -284,26 +313,57 @@ next: continue; desc += 3; - /* - * ...that's a byte array with the proper - * length for a MAC address... - */ - if (desc[0] != 'B' || desc[1] != ETHER_ADDR_LEN) -continue; - desc += 2; + if (desc[0] == 'B' || desc[1] == ETHER_ADDR_LEN) { +/* + * ...that's a byte array with the proper + * length for a MAC address... + */ +desc += 2; - /* - * ...named "local-mac-address". - */ - if (strcmp(desc, "local-mac-address") != 0) +/* + * ...named "local-mac-address". + */ +if (strcmp(desc, CAS_LOCAL_MAC_ADDRESS) != 0) + continue; +desc += sizeof(CAS_LOCAL_MAC_ADDRESS); + +if (lma == CAS_LMA_MAXNUM) + continue; + +memcpy(enaddrs[lma], desc, ETHER_ADDR_LEN); +lma++; +rv = 0; continue; - desc += strlen("local-mac-address") + 1; + } else if (desc[0] == 'S') { +
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Dec 26 15:32:37 UTC 2019 Modified Files: src/sys/dev/pci: if_stge.c Log Message: Improve flow control. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/dev/pci/if_stge.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_stge.c diff -u src/sys/dev/pci/if_stge.c:1.74 src/sys/dev/pci/if_stge.c:1.75 --- src/sys/dev/pci/if_stge.c:1.74 Thu Dec 26 15:26:58 2019 +++ src/sys/dev/pci/if_stge.c Thu Dec 26 15:32:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_stge.c,v 1.74 2019/12/26 15:26:58 msaitoh Exp $ */ +/* $NetBSD: if_stge.c,v 1.75 2019/12/26 15:32:37 msaitoh Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.74 2019/12/26 15:26:58 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.75 2019/12/26 15:32:37 msaitoh Exp $"); #include @@ -1498,11 +1498,11 @@ stge_init(struct ifnet *ifp) /* * Send a PAUSE frame when we reach 29,696 bytes in the Rx - * FIFO, and send an un-PAUSE frame when the FIFO is totally - * empty again. + * FIFO, and send an un-PAUSE frame when we reach 3056 bytes + * in the Rx FIFO. */ bus_space_write_2(st, sh, STGE_FlowOnTresh, 29696 / 16); - bus_space_write_2(st, sh, STGE_FlowOffThresh, 0); + bus_space_write_2(st, sh, STGE_FlowOffThresh, 3056 / 16); /* * Set the maximum frame size. @@ -1857,12 +1857,15 @@ stge_mii_statchg(struct ifnet *ifp) { struct stge_softc *sc = ifp->if_softc; + sc->sc_MACCtrl &= ~(MC_DuplexSelect | MC_RxFlowControlEnable | + MC_TxFlowControlEnable); + if (sc->sc_mii.mii_media_active & IFM_FDX) sc->sc_MACCtrl |= MC_DuplexSelect; - else - sc->sc_MACCtrl &= ~MC_DuplexSelect; - - /* XXX 802.1x flow-control? */ + if ((sc->sc_mii.mii_media_active & IFM_ETH_RXPAUSE) != 0) + sc->sc_MACCtrl |= MC_RxFlowControlEnable; + if ((sc->sc_mii.mii_media_active & IFM_ETH_TXPAUSE) != 0) + sc->sc_MACCtrl |= MC_TxFlowControlEnable; bus_space_write_4(sc->sc_st, sc->sc_sh, STGE_MACCtrl, sc->sc_MACCtrl); }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Dec 26 15:26:58 UTC 2019 Modified Files: src/sys/dev/pci: if_stge.c Log Message: Apply OpenBSD rev. 1.34: > Set Rx early threshold and Tx DMA thesholds. > > From Linux via FreeBSD To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/dev/pci/if_stge.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_stge.c diff -u src/sys/dev/pci/if_stge.c:1.73 src/sys/dev/pci/if_stge.c:1.74 --- src/sys/dev/pci/if_stge.c:1.73 Sun Nov 10 13:34:52 2019 +++ src/sys/dev/pci/if_stge.c Thu Dec 26 15:26:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_stge.c,v 1.73 2019/11/10 13:34:52 msaitoh Exp $ */ +/* $NetBSD: if_stge.c,v 1.74 2019/12/26 15:26:58 msaitoh Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.73 2019/11/10 13:34:52 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.74 2019/12/26 15:26:58 msaitoh Exp $"); #include @@ -1464,6 +1464,13 @@ stge_init(struct ifnet *ifp) bus_space_write_1(st, sh, STGE_RxDMABurstThresh, 0x30); bus_space_write_1(st, sh, STGE_RxDMAUrgentThresh, 0x30); + /* Rx early threhold, from Linux */ + bus_space_write_2(st, sh, STGE_RxEarlyThresh, 0x7ff); + + /* Tx DMA thresholds, from Linux */ + bus_space_write_1(st, sh, STGE_TxDMABurstThresh, 0x30); + bus_space_write_1(st, sh, STGE_TxDMAUrgentThresh, 0x04); + /* * Initialize the Rx DMA interrupt control register. We * request an interrupt after every incoming packet, but
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Dec 26 15:23:11 UTC 2019 Modified Files: src/sys/dev/pci: if_stgereg.h Log Message: Fix address of STGE_MaxFrameSize. Same as other OSes. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/if_stgereg.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/if_stgereg.h diff -u src/sys/dev/pci/if_stgereg.h:1.6 src/sys/dev/pci/if_stgereg.h:1.7 --- src/sys/dev/pci/if_stgereg.h:1.6 Mon Oct 7 11:53:40 2019 +++ src/sys/dev/pci/if_stgereg.h Thu Dec 26 15:23:11 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_stgereg.h,v 1.6 2019/10/07 11:53:40 msaitoh Exp $ */ +/* $NetBSD: if_stgereg.h,v 1.7 2019/12/26 15:23:11 msaitoh Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -323,7 +323,7 @@ struct stge_rfd { #define STGE_VLANId 0x80 -#define STGE_MaxFrameSize 0x84 +#define STGE_MaxFrameSize 0x86 #define STGE_ReceiveMode 0x88 /* 16-bit */ #define RM_ReceiveUnicast (1U << 0)
CVS commit: src/sys/dev/audio
Module Name:src Committed By: isaki Date: Thu Dec 26 11:27:03 UTC 2019 Modified Files: src/sys/dev/audio: audio.c Log Message: Improve and simplify around audio_realloc(). To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/dev/audio/audio.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/audio/audio.c diff -u src/sys/dev/audio/audio.c:1.34 src/sys/dev/audio/audio.c:1.35 --- src/sys/dev/audio/audio.c:1.34 Thu Dec 26 11:24:55 2019 +++ src/sys/dev/audio/audio.c Thu Dec 26 11:27:03 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.34 2019/12/26 11:24:55 isaki Exp $ */ +/* $NetBSD: audio.c,v 1.35 2019/12/26 11:27:03 isaki Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -142,7 +142,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.34 2019/12/26 11:24:55 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.35 2019/12/26 11:27:03 isaki Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -3061,30 +3061,6 @@ audioctl_open(dev_t dev, struct audio_so } /* - * Reallocate 'memblock' with specified 'bytes' if 'bytes' > 0. - * Or free 'memblock' and return NULL if 'byte' is zero. - */ -static void * -audio_realloc(void *memblock, size_t bytes) -{ - - if (memblock != NULL) { - if (bytes != 0) { - return kern_realloc(memblock, bytes, M_WAITOK); - } else { - kern_free(memblock); - return NULL; - } - } else { - if (bytes != 0) { - return kern_malloc(bytes, M_WAITOK); - } else { - return NULL; - } - } -} - -/* * Free 'mem' if available, and initialize the pointer. * For this reason, this is implemented as macro. */ @@ -3096,6 +3072,20 @@ audio_realloc(void *memblock, size_t byt } while (0) /* + * (Re)allocate 'memblock' with specified 'bytes'. + * bytes must not be 0. + * This function never returns NULL. + */ +static void * +audio_realloc(void *memblock, size_t bytes) +{ + + KASSERT(bytes != 0); + audio_free(memblock); + return kern_malloc(bytes, M_WAITOK); +} + +/* * (Re)allocate usrbuf with 'newbufsize' bytes. * Use this function for usrbuf because only usrbuf can be mmapped. * If successful, it updates track->usrbuf.mem, track->usrbuf.capacity and @@ -3660,7 +3650,6 @@ abort: static int audio_track_init_codec(audio_track_t *track, audio_ring_t **last_dstp) { - struct audio_softc *sc; audio_ring_t *last_dst; audio_ring_t *srcbuf; audio_format2_t *srcfmt; @@ -3671,7 +3660,6 @@ audio_track_init_codec(audio_track_t *tr KASSERT(track); - sc = track->mixer->sc; last_dst = *last_dstp; dstfmt = &last_dst->fmt; srcfmt = &track->inputfmt; @@ -3700,12 +3688,6 @@ audio_track_init_codec(audio_track_t *tr srcbuf->capacity = frame_per_block(track->mixer, &srcbuf->fmt); len = auring_bytelen(srcbuf); srcbuf->mem = audio_realloc(srcbuf->mem, len); - if (srcbuf->mem == NULL) { - device_printf(sc->sc_dev, "%s: malloc(%d) failed\n", - __func__, len); - error = ENOMEM; - goto abort; - } arg = &track->codec.arg; arg->srcfmt = &srcbuf->fmt; @@ -3731,7 +3713,6 @@ abort: static int audio_track_init_chvol(audio_track_t *track, audio_ring_t **last_dstp) { - struct audio_softc *sc; audio_ring_t *last_dst; audio_ring_t *srcbuf; audio_format2_t *srcfmt; @@ -3742,7 +3723,6 @@ audio_track_init_chvol(audio_track_t *tr KASSERT(track); - sc = track->mixer->sc; last_dst = *last_dstp; dstfmt = &last_dst->fmt; srcfmt = &track->inputfmt; @@ -3770,12 +3750,6 @@ audio_track_init_chvol(audio_track_t *tr srcbuf->capacity = frame_per_block(track->mixer, &srcbuf->fmt); len = auring_bytelen(srcbuf); srcbuf->mem = audio_realloc(srcbuf->mem, len); - if (srcbuf->mem == NULL) { - device_printf(sc->sc_dev, "%s: malloc(%d) failed\n", - __func__, len); - error = ENOMEM; - goto abort; - } arg = &track->chvol.arg; arg->srcfmt = &srcbuf->fmt; @@ -3786,7 +3760,6 @@ audio_track_init_chvol(audio_track_t *tr return 0; } -abort: track->chvol.filter = NULL; audio_free(srcbuf->mem); return error; @@ -3801,7 +3774,6 @@ abort: static int audio_track_init_chmix(audio_track_t *track, audio_ring_t **last_dstp) { - struct audio_softc *sc; audio_ring_t *last_dst; audio_ring_t *srcbuf; audio_format2_t *srcfmt; @@ -3814,7 +3786,6 @@ audio_track_init_chmix(audio_track_t *tr KASSERT(track); - sc = track->mixer->sc; last_dst = *last_dstp; dstfmt = &last_dst->fmt; srcfmt = &track->inputfmt; @@ -3845,12 +3816,6 @@ audio_track_init_chmix(audio_track_t *tr srcbuf->capacity = frame_per_block(track->mixer, &srcbuf->fmt); len = auring_bytelen(srcbuf); srcbuf->mem = audio_realloc(srcbuf->mem, len); - if (srcbuf->mem == NULL) { - device_printf(sc->sc_dev, "%s: malloc(%d) failed\n", - __func__, len); - error = ENOMEM; - goto abort; - } arg = &track->chmix.arg; arg->srcfmt = &srcbuf->fmt; @@ -3861,7 +3826,6 @@ audio_track_ini
CVS commit: src/sys/dev/audio
Module Name:src Committed By: isaki Date: Thu Dec 26 11:24:55 UTC 2019 Modified Files: src/sys/dev/audio: audio.c Log Message: Use M_WAITOK instead of M_NOWAIT. These allocations don't require NOWAIT constraints. Will fix PR kern/54796. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/dev/audio/audio.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/audio/audio.c diff -u src/sys/dev/audio/audio.c:1.33 src/sys/dev/audio/audio.c:1.34 --- src/sys/dev/audio/audio.c:1.33 Wed Nov 6 13:37:27 2019 +++ src/sys/dev/audio/audio.c Thu Dec 26 11:24:55 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.33 2019/11/06 13:37:27 isaki Exp $ */ +/* $NetBSD: audio.c,v 1.34 2019/12/26 11:24:55 isaki Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -142,7 +142,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.33 2019/11/06 13:37:27 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.34 2019/12/26 11:24:55 isaki Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -3070,14 +3070,14 @@ audio_realloc(void *memblock, size_t byt if (memblock != NULL) { if (bytes != 0) { - return kern_realloc(memblock, bytes, M_NOWAIT); + return kern_realloc(memblock, bytes, M_WAITOK); } else { kern_free(memblock); return NULL; } } else { if (bytes != 0) { - return kern_malloc(bytes, M_NOWAIT); + return kern_malloc(bytes, M_WAITOK); } else { return NULL; }
CVS commit: src/sys/arch/arm/broadcom
Module Name:src Committed By: skrll Date: Thu Dec 26 11:09:11 UTC 2019 Modified Files: src/sys/arch/arm/broadcom: bcm2835_intr.c bcm2835reg.h Log Message: Use PIC_IRQBASE_ALLOC for all pic_add calls and track/use each cpu irqbase To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arm/broadcom/bcm2835_intr.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/broadcom/bcm2835reg.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/arm/broadcom/bcm2835_intr.c diff -u src/sys/arch/arm/broadcom/bcm2835_intr.c:1.28 src/sys/arch/arm/broadcom/bcm2835_intr.c:1.29 --- src/sys/arch/arm/broadcom/bcm2835_intr.c:1.28 Wed Dec 25 10:49:29 2019 +++ src/sys/arch/arm/broadcom/bcm2835_intr.c Thu Dec 26 11:09:11 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm2835_intr.c,v 1.28 2019/12/25 10:49:29 skrll Exp $ */ +/* $NetBSD: bcm2835_intr.c,v 1.29 2019/12/26 11:09:11 skrll Exp $ */ /*- * Copyright (c) 2012, 2015, 2019 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.28 2019/12/25 10:49:29 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.29 2019/12/26 11:09:11 skrll Exp $"); #define _INTR_PRIVATE @@ -99,7 +99,10 @@ static int bcm2835_icu_match(device_t, static void bcm2835_icu_attach(device_t, device_t, void *); static int bcm2835_int_base; -static int bcm2836mp_int_base; +static int bcm2836mp_int_base[BCM2836_NCPUS]; + +#define BCM2835_INT_BASE bcm2835_int_base +#define BCM2836_INT_BASECPUN(n) bcm2836mp_int_base[(n)] static void bcm2835_set_priority(struct pic_softc *pic, int ipl) @@ -710,9 +713,9 @@ bcm2836mp_pic_find_pending_irqs(struct p BCM2836_LOCAL_INTC_IRQPENDINGN(cpuid)); lpending &= ~BCM2836_INTBIT_GPUPENDING; - if (lpending & BCM2836MP_ALL_IRQS) { - ipl |= pic_mark_pending_sources(pic, 0 /* BCM2836_INT_LOCALBASE */, - lpending & BCM2836MP_ALL_IRQS); + const uint32_t allirqs = lpending & BCM2836MP_ALL_IRQS; + if (allirqs) { + ipl |= pic_mark_pending_sources(pic, 0, allirqs); } return ipl; @@ -830,11 +833,7 @@ bcm2836mp_intr_init(void *priv, struct c snprintf(suffix, sizeof(suffix), "#%lu", cpuid); strlcat(pic->pic_name, suffix, sizeof(pic->pic_name)); #endif - if (cpuid == 0) { - bcm2836mp_int_base = pic_add(pic, PIC_IRQBASE_ALLOC); - } else { - pic_add(pic, BCM2836_INT_BASECPUN(cpuid)); - } + bcm2836mp_int_base[cpuid] = pic_add(pic, PIC_IRQBASE_ALLOC); #if defined(MULTIPROCESSOR) intr_establish(BCM2836_INT_MAILBOX0_CPUN(cpuid), IPL_HIGH, Index: src/sys/arch/arm/broadcom/bcm2835reg.h diff -u src/sys/arch/arm/broadcom/bcm2835reg.h:1.27 src/sys/arch/arm/broadcom/bcm2835reg.h:1.28 --- src/sys/arch/arm/broadcom/bcm2835reg.h:1.27 Thu Dec 26 08:27:43 2019 +++ src/sys/arch/arm/broadcom/bcm2835reg.h Thu Dec 26 11:09:11 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm2835reg.h,v 1.27 2019/12/26 08:27:43 skrll Exp $ */ +/* $NetBSD: bcm2835reg.h,v 1.28 2019/12/26 11:09:11 skrll Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -139,14 +139,9 @@ #define BCM2835_INTC_ENABLEBASE (BCM2835_INTC_BASE + 0x10) #define BCM2835_INTC_DISABLEBASE (BCM2835_INTC_BASE + 0x1c) -#define BCM2835_INT_BASE bcm2835_int_base - #define BCM2836_NCPUS 4 #define BCM2836_NIRQPERCPU 32 -#define BCM2836_INT_LOCALBASE bcm2836mp_int_base -#define BCM2836_INT_BASECPUN(n) (BCM2836_INT_LOCALBASE + ((n) * BCM2836_NIRQPERCPU)) - #define BCM2836_INT_CNTPSIRQ 0 #define BCM2836_INT_CNTPNSIRQ 1 #define BCM2836_INT_CNTHPIRQ 2
CVS commit: src/sys
Module Name:src Committed By: kamil Date: Thu Dec 26 08:52:39 UTC 2019 Modified Files: src/sys/kern: files.kern sys_ptrace_common.c src/sys/sys: ptrace.h Added Files: src/sys/kern: sys_ptrace_lwpstatus.c Log Message: Put ptrace_read_lwpstatus() and process_read_lwpstatus() to a new file Fixes "no PTRACE" kernel build, in particular zaurus kernel=INSTALL_C700. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/kern/files.kern cvs rdiff -u -r1.75 -r1.76 src/sys/kern/sys_ptrace_common.c cvs rdiff -u -r0 -r1.1 src/sys/kern/sys_ptrace_lwpstatus.c cvs rdiff -u -r1.68 -r1.69 src/sys/sys/ptrace.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/kern/files.kern diff -u src/sys/kern/files.kern:1.40 src/sys/kern/files.kern:1.41 --- src/sys/kern/files.kern:1.40 Fri Dec 20 21:20:09 2019 +++ src/sys/kern/files.kern Thu Dec 26 08:52:38 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.kern,v 1.40 2019/12/20 21:20:09 ad Exp $ +# $NetBSD: files.kern,v 1.41 2019/12/26 08:52:38 kamil Exp $ # # kernel sources @@ -163,6 +163,7 @@ file kern/sys_pipe.c !pipe_socketpair file kern/sys_process.c ptrace_hooks | ktrace file kern/sys_ptrace.c ptrace file kern/sys_ptrace_common.c ptrace +file kern/sys_ptrace_lwpstatus.c kern file kern/sys_pset.c kern file kern/sys_select.c kern file kern/sys_sig.c kern Index: src/sys/kern/sys_ptrace_common.c diff -u src/sys/kern/sys_ptrace_common.c:1.75 src/sys/kern/sys_ptrace_common.c:1.76 --- src/sys/kern/sys_ptrace_common.c:1.75 Wed Dec 25 15:54:02 2019 +++ src/sys/kern/sys_ptrace_common.c Thu Dec 26 08:52:38 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_ptrace_common.c,v 1.75 2019/12/25 15:54:02 kamil Exp $ */ +/* $NetBSD: sys_ptrace_common.c,v 1.76 2019/12/26 08:52:38 kamil Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -118,7 +118,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.75 2019/12/25 15:54:02 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.76 2019/12/26 08:52:38 kamil Exp $"); #ifdef _KERNEL_OPT #include "opt_ptrace.h" @@ -790,38 +790,6 @@ ptrace_lwpinfo(struct proc *t, struct lw return copyout(&pl, addr, sizeof(pl)); } -static void -ptrace_read_lwpstatus(struct lwp *l, struct ptrace_lwpstatus *pls) -{ - - KASSERT(l->l_lid == pls->pl_lwpid); - - memcpy(&pls->pl_sigmask, &l->l_sigmask, sizeof(pls->pl_sigmask)); - memcpy(&pls->pl_sigpend, &l->l_sigpend.sp_set, sizeof(pls->pl_sigpend)); - - if (l->l_name == NULL) - memset(&pls->pl_name, 0, PL_LNAMELEN); - else { - KASSERT(strlen(l->l_name) < PL_LNAMELEN); - strncpy(pls->pl_name, l->l_name, PL_LNAMELEN); - } - -#ifdef PTRACE_LWP_GETPRIVATE - pls->pl_private = (void *)(intptr_t)PTRACE_LWP_GETPRIVATE(l); -#else - pls->pl_private = l->l_private; -#endif -} - -void -process_read_lwpstatus(struct lwp *l, struct ptrace_lwpstatus *pls) -{ - - pls->pl_lwpid = l->l_lid; - - ptrace_read_lwpstatus(l, pls); -} - static int ptrace_lwpstatus(struct proc *t, struct ptrace_methods *ptm, struct lwp **lt, void *addr, size_t data, bool next) Index: src/sys/sys/ptrace.h diff -u src/sys/sys/ptrace.h:1.68 src/sys/sys/ptrace.h:1.69 --- src/sys/sys/ptrace.h:1.68 Tue Dec 24 14:50:59 2019 +++ src/sys/sys/ptrace.h Thu Dec 26 08:52:38 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ptrace.h,v 1.68 2019/12/24 14:50:59 kamil Exp $ */ +/* $NetBSD: ptrace.h,v 1.69 2019/12/26 08:52:38 kamil Exp $ */ /*- * Copyright (c) 1984, 1993 @@ -260,6 +260,8 @@ void proc_changeparent(struct proc *, st int do_ptrace(struct ptrace_methods *, struct lwp *, int, pid_t, void *, int, register_t *); +void ptrace_read_lwpstatus(struct lwp *, struct ptrace_lwpstatus *); + void process_read_lwpstatus(struct lwp *, struct ptrace_lwpstatus *); #ifndef process_read_lwpstatus32 #define process_read_lwpstatus32 process_read_lwpstatus Added files: Index: src/sys/kern/sys_ptrace_lwpstatus.c diff -u /dev/null src/sys/kern/sys_ptrace_lwpstatus.c:1.1 --- /dev/null Thu Dec 26 08:52:39 2019 +++ src/sys/kern/sys_ptrace_lwpstatus.c Thu Dec 26 08:52:38 2019 @@ -0,0 +1,81 @@ +/* $NetBSD: sys_ptrace_lwpstatus.c,v 1.1 2019/12/26 08:52:38 kamil Exp $ */ + +/*- + * Copyright (c) 2019 The NetBSD Foundation, 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: skrll Date: Thu Dec 26 08:48:53 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64: locore.S Log Message: Whitespace To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/arch/aarch64/aarch64/locore.S 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/aarch64/aarch64/locore.S diff -u src/sys/arch/aarch64/aarch64/locore.S:1.46 src/sys/arch/aarch64/aarch64/locore.S:1.47 --- src/sys/arch/aarch64/aarch64/locore.S:1.46 Sun Dec 8 10:37:19 2019 +++ src/sys/arch/aarch64/aarch64/locore.S Thu Dec 26 08:48:53 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.46 2019/12/08 10:37:19 skrll Exp $ */ +/* $NetBSD: locore.S,v 1.47 2019/12/26 08:48:53 skrll Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu @@ -38,7 +38,7 @@ #include #include "assym.h" -RCSID("$NetBSD: locore.S,v 1.46 2019/12/08 10:37:19 skrll Exp $") +RCSID("$NetBSD: locore.S,v 1.47 2019/12/26 08:48:53 skrll Exp $") /*#define DEBUG_LOCORE /* debug print */ @@ -119,7 +119,6 @@ ASENTRY_NP(aarch64_start) DPRINTSREG("ID_AA64MMFR0_EL1 = ", id_aa64mmfr0_el1) DPRINTSREG("ID_AA64MMFR1_EL1 = ", id_aa64mmfr1_el1) - #ifdef LOCORE_EL2 VPRINT("Drop to EL1...") # include @@ -153,7 +152,6 @@ aarch64_fatal: mov sp, x28 ret - /* * vstart is in kernel virtual address */ @@ -403,7 +401,6 @@ ENTRY_NP(cpu_mpstart) CPU_DPRINTSREG("MIDR_EL1 = ", midr_el1) CPU_DPRINTSREG("MPIDR_EL1= ", mpidr_el1) - #ifdef LOCORE_EL2 CPU_DPRINT("Drop to EL1...\n") bl drop_to_el1
CVS commit: src/sys/arch/arm/broadcom
Module Name:src Committed By: skrll Date: Thu Dec 26 08:27:43 UTC 2019 Modified Files: src/sys/arch/arm/broadcom: bcm2835reg.h Log Message: Use PIC_IRQBASE_ALLOC and allow conditional attachment of interrupt handlers (for RPI4) (missing from previous commit) To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/broadcom/bcm2835reg.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/arm/broadcom/bcm2835reg.h diff -u src/sys/arch/arm/broadcom/bcm2835reg.h:1.26 src/sys/arch/arm/broadcom/bcm2835reg.h:1.27 --- src/sys/arch/arm/broadcom/bcm2835reg.h:1.26 Tue Dec 24 14:10:51 2019 +++ src/sys/arch/arm/broadcom/bcm2835reg.h Thu Dec 26 08:27:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm2835reg.h,v 1.26 2019/12/24 14:10:51 skrll Exp $ */ +/* $NetBSD: bcm2835reg.h,v 1.27 2019/12/26 08:27:43 skrll Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -139,18 +139,13 @@ #define BCM2835_INTC_ENABLEBASE (BCM2835_INTC_BASE + 0x10) #define BCM2835_INTC_DISABLEBASE (BCM2835_INTC_BASE + 0x1c) -#if defined(SOC_BCM2836) -#define BCM2835_INT_BASE BCM2836_NIRQ -#else -#define BCM2835_INT_BASE 0 -#endif /* !BCM2836 */ +#define BCM2835_INT_BASE bcm2835_int_base #define BCM2836_NCPUS 4 #define BCM2836_NIRQPERCPU 32 -#define BCM2836_INT_LOCALBASE 0 +#define BCM2836_INT_LOCALBASE bcm2836mp_int_base #define BCM2836_INT_BASECPUN(n) (BCM2836_INT_LOCALBASE + ((n) * BCM2836_NIRQPERCPU)) -#define BCM2836_NIRQ (BCM2836_NIRQPERCPU * BCM2836_NCPUS) #define BCM2836_INT_CNTPSIRQ 0 #define BCM2836_INT_CNTPNSIRQ 1