CVS commit: src/usr.sbin/cpuctl/arch
Module Name:src Committed By: skrll Date: Wed Jan 23 07:41:54 UTC 2019 Modified Files: src/usr.sbin/cpuctl/arch: aarch64.c Log Message: Fix mvfr0.fptrap = 0 description To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 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.5 src/usr.sbin/cpuctl/arch/aarch64.c:1.6 --- src/usr.sbin/cpuctl/arch/aarch64.c:1.5 Thu Dec 20 07:10:23 2018 +++ src/usr.sbin/cpuctl/arch/aarch64.c Wed Jan 23 07:41:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: aarch64.c,v 1.5 2018/12/20 07:10:23 ryo Exp $ */ +/* $NetBSD: aarch64.c,v 1.6 2019/01/23 07:41:54 skrll Exp $ */ /* * Copyright (c) 2018 Ryo Shimizu @@ -29,7 +29,7 @@ #include #ifndef lint -__RCSID("$NetBSD: aarch64.c,v 1.5 2018/12/20 07:10:23 ryo Exp $"); +__RCSID("$NetBSD: aarch64.c,v 1.6 2019/01/23 07:41:54 skrll Exp $"); #endif /* no lint */ #include @@ -312,7 +312,7 @@ struct fieldinfo mvfr0_fieldinfo[] = { { .bitpos = 12, .bitwidth = 4, .name = "FPTrap", .info = (const char *[16]) { /* 16=4bit */ - [0] = "VFPv2 support exception trapping", + [0] = "No floating point exception trapping support", [1] = "VFPv2/VFPv3/VFPv4 support exception trapping" } },
CVS commit: src/sys/arch/mips/sibyte/dev
Module Name:src Committed By: msaitoh Date: Wed Jan 23 07:40:05 UTC 2019 Modified Files: src/sys/arch/mips/sibyte/dev: sbmac.c Log Message: Fix build break (return type of mii_writereg). To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/arch/mips/sibyte/dev/sbmac.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/mips/sibyte/dev/sbmac.c diff -u src/sys/arch/mips/sibyte/dev/sbmac.c:1.52 src/sys/arch/mips/sibyte/dev/sbmac.c:1.53 --- src/sys/arch/mips/sibyte/dev/sbmac.c:1.52 Tue Jan 22 03:42:26 2019 +++ src/sys/arch/mips/sibyte/dev/sbmac.c Wed Jan 23 07:40:05 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sbmac.c,v 1.52 2019/01/22 03:42:26 msaitoh Exp $ */ +/* $NetBSD: sbmac.c,v 1.53 2019/01/23 07:40:05 msaitoh Exp $ */ /* * Copyright 2000, 2001, 2004 @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.52 2019/01/22 03:42:26 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.53 2019/01/23 07:40:05 msaitoh Exp $"); #include "opt_inet.h" #include "opt_ns.h" @@ -314,7 +314,7 @@ sbmac_mii_readreg(device_t self, int phy /* * Write to a PHY register through the MII. */ -static +static int sbmac_mii_writereg(device_t self, int phy, int reg, uint16_t val) {
CVS commit: othersrc/libexec/tnftpd
Module Name:othersrc Committed By: lukem Date: Wed Jan 23 07:00:21 UTC 2019 Modified Files: othersrc/libexec/tnftpd: tnftpd.h Log Message: provide compat _DIAGASSERT() define no-op _DIAGASSERT() in tnftpd.h, so that I can perform less changes from "upstream" NetBSD when I merge code. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 othersrc/libexec/tnftpd/tnftpd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/tnftpd.h diff -u othersrc/libexec/tnftpd/tnftpd.h:1.35 othersrc/libexec/tnftpd/tnftpd.h:1.36 --- othersrc/libexec/tnftpd/tnftpd.h:1.35 Thu Mar 21 05:44:37 2013 +++ othersrc/libexec/tnftpd/tnftpd.h Wed Jan 23 07:00:21 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: tnftpd.h,v 1.35 2013/03/21 05:44:37 lukem Exp $ */ +/* $NetBSD: tnftpd.h,v 1.36 2019/01/23 07:00:21 lukem Exp $ */ #define FTPD_VERSION PACKAGE_STRING @@ -598,3 +598,10 @@ int usleep(unsigned int); */ #undef __dead #define __dead + +/* + * Compatibility for NetBSD + */ +#ifndef _DIAGASSERT +#define _DIAGASSERT(a) +#endif
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Jan 23 06:56:19 UTC 2019 Modified Files: src/sys/dev/pci: if_fxp_pci.c nvme_pci.c xhci_pci.c src/sys/dev/pci/ixgbe: ixgbe.c ixv.c Log Message: Nowadays some UEFI BIOSes don't enable some PCI devices' address decoding. To resolve this problem, pci_map.c rev. 1.34-1.36 changed the pci_mapreg_(sub)map()'s to set the decode bit if it's not set. It's good for almost all drivers, but some other drivers don't use pci_mapreg_map(). In drivers which don't use pci_mapreg_map(), some of them expilicitly enable decoding but others don't. Add code to enable decoding to them. See also the following discussion: http://mail-index.netbsd.org/tech-kern/2017/03/22/msg021678.html To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/sys/dev/pci/if_fxp_pci.c cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/nvme_pci.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/xhci_pci.c cvs rdiff -u -r1.170 -r1.171 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.107 -r1.108 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/if_fxp_pci.c diff -u src/sys/dev/pci/if_fxp_pci.c:1.84 src/sys/dev/pci/if_fxp_pci.c:1.85 --- src/sys/dev/pci/if_fxp_pci.c:1.84 Wed Jan 23 05:50:34 2019 +++ src/sys/dev/pci/if_fxp_pci.c Wed Jan 23 06:56:19 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_fxp_pci.c,v 1.84 2019/01/23 05:50:34 msaitoh Exp $ */ +/* $NetBSD: if_fxp_pci.c,v 1.85 2019/01/23 06:56:19 msaitoh Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_fxp_pci.c,v 1.84 2019/01/23 05:50:34 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_fxp_pci.c,v 1.85 2019/01/23 06:56:19 msaitoh Exp $"); #include #include @@ -302,6 +302,7 @@ fxp_pci_attach(device_t parent, device_t bus_space_handle_t ioh, memh; int ioh_valid, memh_valid; bus_addr_t addr; + pcireg_t csr; int flags; int error; char intrbuf[PCI_INTRSTR_LEN]; @@ -350,6 +351,15 @@ fxp_pci_attach(device_t parent, device_t if (memh_valid) { sc->sc_st = memt; sc->sc_sh = memh; + /* + * Enable address decoding for memory range in case BIOS or + * UEFI didn't set it. + */ + csr = pci_conf_read(pa->pa_pc, pa->pa_tag, + PCI_COMMAND_STATUS_REG); + csr |= PCI_COMMAND_MEM_ENABLE; + pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, + csr); } else if (ioh_valid) { sc->sc_st = iot; sc->sc_sh = ioh; Index: src/sys/dev/pci/nvme_pci.c diff -u src/sys/dev/pci/nvme_pci.c:1.25 src/sys/dev/pci/nvme_pci.c:1.26 --- src/sys/dev/pci/nvme_pci.c:1.25 Fri Dec 7 08:52:43 2018 +++ src/sys/dev/pci/nvme_pci.c Wed Jan 23 06:56:19 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nvme_pci.c,v 1.25 2018/12/07 08:52:43 msaitoh Exp $ */ +/* $NetBSD: nvme_pci.c,v 1.26 2019/01/23 06:56:19 msaitoh Exp $ */ /* $OpenBSD: nvme_pci.c,v 1.3 2016/04/14 11:18:32 dlg Exp $ */ /* @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nvme_pci.c,v 1.25 2018/12/07 08:52:43 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvme_pci.c,v 1.26 2019/01/23 06:56:19 msaitoh Exp $"); #include #include @@ -160,18 +160,24 @@ nvme_pci_attach(device_t parent, device_ pci_aprint_devinfo(pa, NULL); - reg = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); - if ((reg & PCI_COMMAND_MASTER_ENABLE) == 0) { - reg |= PCI_COMMAND_MASTER_ENABLE; - pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, reg); - } - /* Map registers */ memtype = pci_mapreg_type(pa->pa_pc, pa->pa_tag, NVME_PCI_BAR); if (PCI_MAPREG_TYPE(memtype) != PCI_MAPREG_TYPE_MEM) { aprint_error_dev(self, "invalid type (type=0x%x)\n", memtype); return; } + reg = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); + if (((reg & PCI_COMMAND_MASTER_ENABLE) == 0) || + ((reg & PCI_COMMAND_MEM_ENABLE) == 0)) { + /* + * Enable address decoding for memory range in case BIOS or + * UEFI didn't set it. + */ + reg |= PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_MEM_ENABLE; + pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, + reg); + } + sc->sc_iot = pa->pa_memt; error = pci_mapreg_info(pa->pa_pc, pa->pa_tag, NVME_PCI_BAR, memtype, , >sc_ios, ); Index: src/sys/dev/pci/xhci_pci.c diff -u src/sys/dev/pci/xhci_pci.c:1.20 src/sys/dev/pci/xhci_pci.c:1.21 --- src/sys/dev/pci/xhci_pci.c:1.20 Fri Jan 18 07:03:02 2019 +++ src/sys/dev/pci/xhci_pci.c Wed Jan 23 06:56:19 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci_pci.c,v 1.20 2019/01/18 07:03:02 skrll Exp $ */ +/* $NetBSD: xhci_pci.c,v 1.21 2019/01/23 06:56:19 msaitoh Exp $ */ /* OpenBSD: xhci_pci.c,v 1.4 2014/07/12 17:38:51 yuo Exp */ /* @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.20 2019/01/18 07:03:02 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xhci_pci.c,v 1.21
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Jan 23 05:50:34 UTC 2019 Modified Files: src/sys/dev/pci: if_fxp_pci.c Log Message: KNF. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/dev/pci/if_fxp_pci.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_fxp_pci.c diff -u src/sys/dev/pci/if_fxp_pci.c:1.83 src/sys/dev/pci/if_fxp_pci.c:1.84 --- src/sys/dev/pci/if_fxp_pci.c:1.83 Sun Dec 9 11:14:02 2018 +++ src/sys/dev/pci/if_fxp_pci.c Wed Jan 23 05:50:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_fxp_pci.c,v 1.83 2018/12/09 11:14:02 jdolecek Exp $ */ +/* $NetBSD: if_fxp_pci.c,v 1.84 2019/01/23 05:50:34 msaitoh Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_fxp_pci.c,v 1.83 2018/12/09 11:14:02 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_fxp_pci.c,v 1.84 2019/01/23 05:50:34 msaitoh Exp $"); #include #include @@ -190,13 +190,13 @@ fxp_pci_lookup(const struct pci_attach_a const struct fxp_pci_product *fpp; if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_INTEL) - return (NULL); + return NULL; for (fpp = fxp_pci_products; fpp->fpp_name != NULL; fpp++) if (PCI_PRODUCT(pa->pa_id) == fpp->fpp_prodid) - return (fpp); + return fpp; - return (NULL); + return NULL; } static int @@ -205,9 +205,9 @@ fxp_pci_match(device_t parent, cfdata_t struct pci_attach_args *pa = aux; if (fxp_pci_lookup(pa) != NULL) - return (1); + return 1; - return (0); + return 0; } /* @@ -245,8 +245,7 @@ fxp_pci_confreg_restore(struct fxp_pci_s reg = pci_conf_read(psc->psc_pc, psc->psc_tag, PCI_COMMAND_STATUS_REG); #endif - pci_conf_write(psc->psc_pc, psc->psc_tag, - PCI_COMMAND_STATUS_REG, + pci_conf_write(psc->psc_pc, psc->psc_tag, PCI_COMMAND_STATUS_REG, (reg & 0x) | (psc->psc_regs[PCI_COMMAND_STATUS_REG>>2] & 0x)); pci_conf_write(psc->psc_pc, psc->psc_tag, PCI_BHLC_REG, @@ -312,8 +311,7 @@ fxp_pci_attach(device_t parent, device_t /* * Map control/status registers. */ - ioh_valid = (pci_mapreg_map(pa, FXP_PCI_IOBA, - PCI_MAPREG_TYPE_IO, 0, + ioh_valid = (pci_mapreg_map(pa, FXP_PCI_IOBA, PCI_MAPREG_TYPE_IO, 0, , , NULL, NULL) == 0); /* @@ -542,5 +540,5 @@ fxp_pci_enable(struct fxp_softc *sc) /* Now restore the configuration registers. */ fxp_pci_confreg_restore(psc); - return (0); + return 0; }
CVS commit: othersrc/libexec/tnftpd/libnetbsd
Module Name:othersrc Committed By: lukem Date: Wed Jan 23 05:34:09 UTC 2019 Modified Files: othersrc/libexec/tnftpd/libnetbsd: fparseln.c Log Message: sync to fparseln.c 1.10 Update from NetBSD src/lib/libc/stdio/fparseln.c 1.5 to 1.10: - Don't report spurious empty lines eg after 2 comment lines, or on EOF after a single comment line. - No escape character means no escaped characters. - Remove 3rd and 4th clauses in christos' license. OK christos. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 othersrc/libexec/tnftpd/libnetbsd/fparseln.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/libnetbsd/fparseln.c diff -u othersrc/libexec/tnftpd/libnetbsd/fparseln.c:1.2 othersrc/libexec/tnftpd/libnetbsd/fparseln.c:1.3 --- othersrc/libexec/tnftpd/libnetbsd/fparseln.c:1.2 Sun Sep 21 16:35:25 2008 +++ othersrc/libexec/tnftpd/libnetbsd/fparseln.c Wed Jan 23 05:34:09 2019 @@ -1,5 +1,6 @@ -/* $NetBSD: fparseln.c,v 1.2 2008/09/21 16:35:25 lukem Exp $ */ +/* $NetBSD: fparseln.c,v 1.3 2019/01/23 05:34:09 lukem Exp $ */ /* from NetBSD: fparseln.c,v 1.5 1997/12/01 02:58:41 lukem Exp */ +/* from NetBSD: fparseln.c,v 1.10 2009/10/21 01:07:45 snj Exp */ /* * Copyright (c) 1997 Christos Zoulas. All rights reserved. @@ -12,11 +13,6 @@ * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - *must display the following acknowledgement: - * This product includes software developed by Christos Zoulas. - * 4. The name of the author may not be used to endorse or promote products - *derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -46,7 +42,7 @@ isescaped(const char *sp, const char *p, /* No escape character */ if (esc == '\0') - return 1; + return 0; /* Count the number of escape characters that precede ours */ for (ne = 0, cp = p; --cp >= sp && *cp == esc; ne++) @@ -118,13 +114,19 @@ fparseln(FILE *fp, size_t *size, size_t cp = [s - 1]; if (*cp == con && !isescaped(ptr, cp, esc)) { -s--; /* forget escape */ +s--; /* forget continuation char */ cnt = 1; } } - if (s == 0 && buf != NULL) - continue; + if (s == 0) { + /* + * nothing to add, skip realloc except in case + * we need a minimal buf to return an empty line + */ + if (cnt || buf != NULL) +continue; + } if ((cp = realloc(buf, len + s + 1)) == NULL) { free(buf); @@ -175,10 +177,10 @@ fparseln(FILE *fp, size_t *size, size_t #ifdef TEST -int main(int, char *[]); +int main(int, char **); int -main(int argc, char *argv[]) +main(int argc, char **argv) { char *ptr; size_t size, line;
CVS commit: othersrc/libexec/tnftpd/libnetbsd
Module Name:othersrc Committed By: lukem Date: Wed Jan 23 05:20:01 UTC 2019 Modified Files: othersrc/libexec/tnftpd/libnetbsd: err.c Log Message: Remove the 3rd clause from my BSD-derived license. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 othersrc/libexec/tnftpd/libnetbsd/err.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/libnetbsd/err.c diff -u othersrc/libexec/tnftpd/libnetbsd/err.c:1.4 othersrc/libexec/tnftpd/libnetbsd/err.c:1.5 --- othersrc/libexec/tnftpd/libnetbsd/err.c:1.4 Wed Jan 23 02:44:57 2019 +++ othersrc/libexec/tnftpd/libnetbsd/err.c Wed Jan 23 05:20:01 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: err.c,v 1.4 2019/01/23 02:44:57 lukem Exp $ */ +/* $NetBSD: err.c,v 1.5 2019/01/23 05:20:01 lukem Exp $ */ /* * Copyright 1997-2002 Luke Mewburn . @@ -12,8 +12,6 @@ * 2. Redistributions in binary form must reproduce the above copyright *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - *derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
CVS commit: othersrc/libexec/tnftpd/libnetbsd
Module Name:othersrc Committed By: lukem Date: Wed Jan 23 05:13:48 UTC 2019 Modified Files: othersrc/libexec/tnftpd/libnetbsd: fnmatch.c ftpfnmatch.h Log Message: sync to fnmatch.c 1.26, fnmatch.h Update from NetBSD src/lib/libc/gen/fnmatch.c 1.18 to 1.26. Update from NetBSD src/include/fnmatch.h 1.8 to 1.13. Notable changes: - Implement FNM_LEADING_DIR. - Limit recursions to avoid DoS attacks. From Maksymilian Arciemowicz. - Treat a backslash followed by NUL as NUL. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 othersrc/libexec/tnftpd/libnetbsd/fnmatch.c \ othersrc/libexec/tnftpd/libnetbsd/ftpfnmatch.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/libnetbsd/fnmatch.c diff -u othersrc/libexec/tnftpd/libnetbsd/fnmatch.c:1.3 othersrc/libexec/tnftpd/libnetbsd/fnmatch.c:1.4 --- othersrc/libexec/tnftpd/libnetbsd/fnmatch.c:1.3 Sun Sep 21 16:35:25 2008 +++ othersrc/libexec/tnftpd/libnetbsd/fnmatch.c Wed Jan 23 05:13:48 2019 @@ -1,5 +1,5 @@ -/* $NetBSD: fnmatch.c,v 1.3 2008/09/21 16:35:25 lukem Exp $ */ -/* from NetBSD: fnmatch.c,v 1.18 2000/06/28 01:13:36 thorpej Exp */ +/* $NetBSD: fnmatch.c,v 1.4 2019/01/23 05:13:48 lukem Exp $ */ +/* from NetBSD: fnmatch.c,v 1.26 2014/10/12 22:32:33 christos Exp */ /* * Copyright (c) 1989, 1993, 1994 @@ -42,38 +42,83 @@ #define EOS '\0' -static const char *rangematch(const char *, int, int); - -static int +static inline int foldcase(int ch, int flags) { if ((flags & FNM_CASEFOLD) != 0 && isupper(ch)) - return (tolower(ch)); - return (ch); + return tolower(ch); + return ch; } #define FOLDCASE(ch, flags) foldcase((unsigned char)(ch), (flags)) -int -fnmatch(const char *pattern, const char *string, int flags) +static const char * +rangematch(const char *pattern, int test, int flags) { - const char *stringstart; + int negate, ok, need; + char c, c2; + + /* + * A bracket expression starting with an unquoted circumflex + * character produces unspecified results (IEEE 1003.2-1992, + * 3.13.2). This implementation treats it like '!', for + * consistency with the regular expression syntax. + * J.T. Conklin (conk...@ngai.kaleida.com) + */ + if ((negate = (*pattern == '!' || *pattern == '^')) != 0) + ++pattern; + + need = 1; + for (ok = 0; (c = FOLDCASE(*pattern++, flags)) != ']' || need;) { + need = 0; + if (c == '/') + return (void *)-1; + if (c == '\\' && !(flags & FNM_NOESCAPE)) + c = FOLDCASE(*pattern++, flags); + if (c == EOS) + return NULL; + if (*pattern == '-' + && (c2 = FOLDCASE(*(pattern + 1), flags)) != EOS && + c2 != ']') { + pattern += 2; + if (c2 == '\\' && !(flags & FNM_NOESCAPE)) +c2 = FOLDCASE(*pattern++, flags); + if (c2 == EOS) +return NULL; + if (c <= test && test <= c2) +ok = 1; + } else if (c == test) + ok = 1; + } + return ok == negate ? NULL : pattern; +} + + +static int +fnmatchx(const char *pattern, const char *string, int flags, size_t recursion) +{ + const char *stringstart, *r; char c, test; - for (stringstart = string;;) + if (recursion-- == 0) + return FNM_NORES; + + for (stringstart = string;;) { switch (c = FOLDCASE(*pattern++, flags)) { case EOS: - return (*string == EOS ? 0 : FNM_NOMATCH); + if ((flags & FNM_LEADING_DIR) && *string == '/') +return 0; + return *string == EOS ? 0 : FNM_NOMATCH; case '?': if (*string == EOS) -return (FNM_NOMATCH); +return FNM_NOMATCH; if (*string == '/' && (flags & FNM_PATHNAME)) -return (FNM_NOMATCH); +return FNM_NOMATCH; if (*string == '.' && (flags & FNM_PERIOD) && (string == stringstart || ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) -return (FNM_NOMATCH); +return FNM_NOMATCH; ++string; break; case '*': @@ -85,91 +130,71 @@ fnmatch(const char *pattern, const char if (*string == '.' && (flags & FNM_PERIOD) && (string == stringstart || ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) -return (FNM_NOMATCH); +return FNM_NOMATCH; /* Optimize for pattern with * at end or before /. */ if (c == EOS) { if (flags & FNM_PATHNAME) - return (strchr(string, '/') == NULL ? - 0 : FNM_NOMATCH); + return (flags & FNM_LEADING_DIR) || + strchr(string, '/') == NULL ? + 0 : FNM_NOMATCH; else - return (0); + return 0; } else if (c == '/' && flags & FNM_PATHNAME) { if ((string = strchr(string, '/')) == NULL) - return (FNM_NOMATCH); + return FNM_NOMATCH; break; } /* General case, use recursion. */ while ((test = FOLDCASE(*string, flags)) != EOS) { -if (!fnmatch(pattern, string, - flags & ~FNM_PERIOD)) - return (0); +int e; +switch ((e = fnmatchx(pattern, string, +flags & ~FNM_PERIOD, recursion))) { +case FNM_NOMATCH: + break; +default: +
CVS commit: src/sys/dev/fdt
Module Name:src Committed By: thorpej Date: Wed Jan 23 04:23:01 UTC 2019 Modified Files: src/sys/dev/fdt: fdt_pinctrl.c Log Message: Implement subroutines for parsing out some of the generic properties specified in the pinctrl bindings, and adapt Meson, Rockchip, and Allwinner pinctrl back-ends to use them. Ok jmcneill@ To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/fdt/fdt_pinctrl.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/fdt/fdt_pinctrl.c diff -u src/sys/dev/fdt/fdt_pinctrl.c:1.6 src/sys/dev/fdt/fdt_pinctrl.c:1.7 --- src/sys/dev/fdt/fdt_pinctrl.c:1.6 Mon Jan 14 12:23:53 2019 +++ src/sys/dev/fdt/fdt_pinctrl.c Wed Jan 23 04:23:01 2019 @@ -1,6 +1,7 @@ -/* $NetBSD: fdt_pinctrl.c,v 1.6 2019/01/14 12:23:53 mlelstv Exp $ */ +/* $NetBSD: fdt_pinctrl.c,v 1.7 2019/01/23 04:23:01 thorpej Exp $ */ /*- + * Copyright (c) 2019 Jason R. Thorpe * Copyright (c) 2017 Jared McNeill * Copyright (c) 2015 Martin Fouts * All rights reserved. @@ -28,10 +29,11 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdt_pinctrl.c,v 1.6 2019/01/14 12:23:53 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdt_pinctrl.c,v 1.7 2019/01/23 04:23:01 thorpej Exp $"); #include #include +#include #include #include @@ -166,3 +168,192 @@ fdtbus_pinctrl_configure(void) { fdtbus_pinctrl_configure_node(OF_finddevice("/")); } + +/* + * Helper routines for parsing put properties related to pinctrl bindings. + */ + +/* + * Pin mux settings apply to sets of pins specified by one of 3 + * sets of properties: + * + * - "pins" + "function" + * - "groups" + "function" + * - "pinmux" + * + * Eactly one of those 3 combinations must be specified. + */ + +const char * +fdtbus_pinctrl_parse_function(int phandle) +{ + return fdtbus_get_string(phandle, "function"); +} + +const void * +fdtbus_pinctrl_parse_pins(int phandle, int *pins_len) +{ + int len; + + /* + * The pinctrl bindings specify that entries in "pins" + * may be integers or strings; this is determined by + * the hardware-specific binding. + */ + + len = OF_getproplen(phandle, "pins"); + if (len > 0) { + return fdtbus_get_prop(phandle, "pins", pins_len); + } + + return NULL; +} + +const char * +fdtbus_pinctrl_parse_groups(int phandle, int *groups_len) +{ + int len; + + len = OF_getproplen(phandle, "groups"); + if (len > 0) { + *groups_len = len; + return fdtbus_get_string(phandle, "groups"); + } + + return NULL; +} + +const u_int * +fdtbus_pinctrl_parse_pinmux(int phandle, int *pinmux_len) +{ + int len; + + len = OF_getproplen(phandle, "pinmux"); + if (len > 0) { + return fdtbus_get_prop(phandle, "pinmux", pinmux_len); + } + + return NULL; +} + +int +fdtbus_pinctrl_parse_bias(int phandle, int *pull_strength) +{ + const char *bias_prop = NULL; + int bias = -1; + + /* + * bias-pull-{up,down,pin-default} properties have an optional + * argument: the pull strength in Ohms. (In practice, this is + * sometimes a hardware-specific constant.) + * + * XXXJRT How to represent bias-pull-pin-default? + */ + + if (of_hasprop(phandle, "bias-disable")) { + bias = 0; + } else if (of_hasprop(phandle, "bias-pull-up")) { + bias_prop = "bias-pull-up"; + bias = GPIO_PIN_PULLUP; + } else if (of_hasprop(phandle, "bias-pull-down")) { + bias_prop = "bias-pull-down"; + bias = GPIO_PIN_PULLDOWN; + } + + if (pull_strength) { + *pull_strength = -1; + if (bias_prop) { + uint32_t val; + if (of_getprop_uint32(phandle, bias_prop, ) == 0) { +*pull_strength = (int)val; + } + } + } + + return bias; +} + +int +fdtbus_pinctrl_parse_drive(int phandle) +{ + int drive = -1; + + if (of_hasprop(phandle, "drive-push-pull")) + drive = GPIO_PIN_PUSHPULL; + else if (of_hasprop(phandle, "drive-open-drain")) + drive = GPIO_PIN_OPENDRAIN; + else if (of_hasprop(phandle, "drive-open-source")) + drive = 0; + + return drive; +} + +int +fdtbus_pinctrl_parse_drive_strength(int phandle) +{ + int val; + + /* + * drive-strength has as an argument the target strength + * in mA. + */ + + if (of_getprop_uint32(phandle, "drive-strength", ) == 0) + return val; + + return -1; +} +int fdtbus_pinctrl_parse_input_output(int phandle, int *output_value) +{ + int direction = -1; + int pinval = -1; + + if (of_hasprop(phandle, "input-enable")) { + direction = GPIO_PIN_INPUT; + } else if (of_hasprop(phandle, "input-disable")) { + /* + * XXXJRT How to represent this? This is more than + * just "don't set the direction" - it's an active + * command that might involve disabling an input + * buffer on the pin. + */ + } + + if (of_hasprop(phandle, "output-enable")) { + if (direction == -1) + direction = 0; + direction |= GPIO_PIN_OUTPUT; + } else if (of_hasprop(phandle, "output-disable")) { + if (direction == -1) + direction = 0; + direction |= GPIO_PIN_TRISTATE; + } + + if (of_hasprop(phandle, "output-low")) { + if (direction == -1) +
CVS commit: src/sys
Module Name:src Committed By: thorpej Date: Wed Jan 23 04:21:55 UTC 2019 Modified Files: src/sys/arch/arm/amlogic: meson_pinctrl.c src/sys/arch/arm/rockchip: rk3328_iomux.c rk3399_iomux.c src/sys/arch/arm/sunxi: sunxi_gpio.c src/sys/dev/fdt: fdtvar.h Log Message: Implement subroutines for parsing out some of the generic properties specified in the pinctrl bindings, and adapt Meson, Rockchip, and Allwinner pinctrl back-ends to use them. Ok jmcneill@ To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/amlogic/meson_pinctrl.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/rockchip/rk3328_iomux.c \ src/sys/arch/arm/rockchip/rk3399_iomux.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/sunxi/sunxi_gpio.c cvs rdiff -u -r1.45 -r1.46 src/sys/dev/fdt/fdtvar.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/amlogic/meson_pinctrl.c diff -u src/sys/arch/arm/amlogic/meson_pinctrl.c:1.1 src/sys/arch/arm/amlogic/meson_pinctrl.c:1.2 --- src/sys/arch/arm/amlogic/meson_pinctrl.c:1.1 Sat Jan 19 20:56:03 2019 +++ src/sys/arch/arm/amlogic/meson_pinctrl.c Wed Jan 23 04:21:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: meson_pinctrl.c,v 1.1 2019/01/19 20:56:03 jmcneill Exp $ */ +/* $NetBSD: meson_pinctrl.c,v 1.2 2019/01/23 04:21:54 thorpej Exp $ */ /*- * Copyright (c) 2019 Jared D. McNeill @@ -29,7 +29,7 @@ #include "opt_soc.h" #include -__KERNEL_RCSID(0, "$NetBSD: meson_pinctrl.c,v 1.1 2019/01/19 20:56:03 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: meson_pinctrl.c,v 1.2 2019/01/23 04:21:54 thorpej Exp $"); #include #include @@ -170,10 +170,9 @@ meson_pinctrl_set_config(device_t dev, c if (mux == -1) return -1; - groups_len = OF_getproplen(mux, "groups"); - if (groups_len <= 0) + groups = fdtbus_pinctrl_parse_groups(mux, _len); + if (groups == NULL) return -1; - groups = fdtbus_get_string(mux, "groups"); for (; groups_len > 0; groups_len -= strlen(groups) + 1, groups += strlen(groups) + 1) { Index: src/sys/arch/arm/rockchip/rk3328_iomux.c diff -u src/sys/arch/arm/rockchip/rk3328_iomux.c:1.1 src/sys/arch/arm/rockchip/rk3328_iomux.c:1.2 --- src/sys/arch/arm/rockchip/rk3328_iomux.c:1.1 Sun Aug 12 16:48:04 2018 +++ src/sys/arch/arm/rockchip/rk3328_iomux.c Wed Jan 23 04:21:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rk3328_iomux.c,v 1.1 2018/08/12 16:48:04 jmcneill Exp $ */ +/* $NetBSD: rk3328_iomux.c,v 1.2 2019/01/23 04:21:54 thorpej Exp $ */ /*- * Copyright (c) 2018 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rk3328_iomux.c,v 1.1 2018/08/12 16:48:04 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rk3328_iomux.c,v 1.2 2019/01/23 04:21:54 thorpej Exp $"); #include #include @@ -190,42 +190,49 @@ rk3328_iomux_set_mux(struct rk3328_iomux static int rk3328_iomux_config(struct rk3328_iomux_softc *sc, const int phandle, u_int bank, u_int idx, u_int mux) { - u_int drv; - if (of_hasprop(phandle, "bias-disable")) + const int bias = fdtbus_pinctrl_parse_bias(phandle, NULL); + switch (bias) { + case 0: rk3328_iomux_set_bias(sc, bank, idx, GRF_GPIO_P_CTL_Z); - else if (of_hasprop(phandle, "bias-pull-up")) + break; + case GPIO_PIN_PULLUP: rk3328_iomux_set_bias(sc, bank, idx, GRF_GPIO_P_CTL_PULLUP); - else if (of_hasprop(phandle, "bias-pull-down")) + break; + case GPIO_PIN_PULLDOWN: rk3328_iomux_set_bias(sc, bank, idx, GRF_GPIO_P_CTL_PULLDOWN); + break; + } - if (of_getprop_uint32(phandle, "drive-strength", ) == 0) { - switch (drv) { - case 2: - rk3328_iomux_set_drive_strength(sc, bank, idx, GRF_GPIO_E_CTL_2MA); - break; - case 4: - rk3328_iomux_set_drive_strength(sc, bank, idx, GRF_GPIO_E_CTL_4MA); - break; - case 8: - rk3328_iomux_set_drive_strength(sc, bank, idx, GRF_GPIO_E_CTL_8MA); - break; - case 12: - rk3328_iomux_set_drive_strength(sc, bank, idx, GRF_GPIO_E_CTL_12MA); - break; - default: - aprint_error_dev(sc->sc_dev, "unsupported drive-strength %u\n", drv); - return EINVAL; - } + const int drv = fdtbus_pinctrl_parse_drive_strength(phandle); + switch (drv) { + case -1: + break; + case 2: + rk3328_iomux_set_drive_strength(sc, bank, idx, GRF_GPIO_E_CTL_2MA); + break; + case 4: + rk3328_iomux_set_drive_strength(sc, bank, idx, GRF_GPIO_E_CTL_4MA); + break; + case 8: + rk3328_iomux_set_drive_strength(sc, bank, idx, GRF_GPIO_E_CTL_8MA); + break; + case 12: + rk3328_iomux_set_drive_strength(sc, bank, idx, GRF_GPIO_E_CTL_12MA); + break; + default: + aprint_error_dev(sc->sc_dev, "unsupported drive-strength %u\n", drv); + return EINVAL; } #if notyet - if (of_hasprop(phandle, "input-enable")) - rk3328_iomux_set_direction(sc, bank, idx, GPIO_PIN_INPUT, -1); - else if (of_hasprop(phandle, "output-high")) - rk3328_iomux_set_direction(sc, bank, idx, GPIO_PIN_OUTPUT, GPIO_PIN_HIGH); - else if (of_hasprop(phandle, "output-low")) -
CVS commit: [pgoyette-compat] src/sys/sys
Module Name:src Committed By: pgoyette Date: Wed Jan 23 03:40:08 UTC 2019 Modified Files: src/sys/sys [pgoyette-compat]: module_hook.h Log Message: Improve a comment To generate a diff of this commit: cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/sys/sys/module_hook.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/sys/module_hook.h diff -u src/sys/sys/module_hook.h:1.1.2.15 src/sys/sys/module_hook.h:1.1.2.16 --- src/sys/sys/module_hook.h:1.1.2.15 Wed Jan 23 03:34:15 2019 +++ src/sys/sys/module_hook.h Wed Jan 23 03:40:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: module_hook.h,v 1.1.2.15 2019/01/23 03:34:15 pgoyette Exp $ */ +/* $NetBSD: module_hook.h,v 1.1.2.16 2019/01/23 03:40:08 pgoyette Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -86,7 +86,10 @@ do {\ /* Prevent new localcount_acquire calls. */ \ hook.hooked = false; \ \ - /* Wait for existing localcount_acquire calls to finish. */ \ + /* \ + * Wait for localcount_acquire calls already under way \ + * to finish. \ + */ \ pserialize_perform(hook.psz);\ \ /* Wait for existing localcount references to drain. */\
CVS commit: src/sys/dev/mii
Module Name:src Committed By: msaitoh Date: Wed Jan 23 03:38:26 UTC 2019 Modified Files: src/sys/dev/mii: mvphy.c Log Message: Make evbmips/conf/WGT624V3 compilable: - Modify for new read/write API - Do "#if 0" for unused structures. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/dev/mii/mvphy.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/mii/mvphy.c diff -u src/sys/dev/mii/mvphy.c:1.10 src/sys/dev/mii/mvphy.c:1.11 --- src/sys/dev/mii/mvphy.c:1.10 Mon Jun 16 16:48:16 2014 +++ src/sys/dev/mii/mvphy.c Wed Jan 23 03:38:26 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: mvphy.c,v 1.10 2014/06/16 16:48:16 msaitoh Exp $ */ +/* $NetBSD: mvphy.c,v 1.11 2019/01/23 03:38:26 msaitoh Exp $ */ /*- * Copyright (c) 2006 Sam Leffler, Errno Consulting @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mvphy.c,v 1.10 2014/06/16 16:48:16 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mvphy.c,v 1.11 2019/01/23 03:38:26 msaitoh Exp $"); #include #include @@ -52,12 +52,12 @@ __KERNEL_RCSID(0, "$NetBSD: mvphy.c,v 1. #define MV_PORT(sc) ((sc)->mii_phy - 16) /* PHY # to switch port */ #define MV_CPU_PORT 5 /* port # of CPU port */ -#define MV_READ(p, phy, r) \ - (*(p)->mii_pdata->mii_readreg)(device_parent((p)->mii_dev), \ - phy, (r)) -#define MV_WRITE(p, phy, r, v) \ - (*(p)->mii_pdata->mii_writereg)(device_parent((p)->mii_dev), \ - phy, (r), (v)) +#define MV_READ(p, phy, r, v) \ + (*(p)->mii_pdata->mii_readreg)(device_parent((p)->mii_dev), \ + (phy), (r), (v)) +#define MV_WRITE(p, phy, r, v) \ + (*(p)->mii_pdata->mii_writereg)(device_parent((p)->mii_dev), \ + (phy), (r), (v)) /* XXX sysctl'able */ #define MV_ATUCTRL_ATU_SIZE_DEFAULT 2 /* 1024 entry database */ @@ -119,6 +119,7 @@ static const struct mvPhyConfig dumbConf { 0x1d, 0x1f, /* PHY port 5 = CPU port */ MV_PORT_CONTROL_PORT_STATE_FORWARDING } }; +#if 0 /* XXX what are these? */ static const struct mvPhyConfig routerConfig[] = { { 0x18, 0x2e, /* PHY port 0 = LAN port 0 */ MV_PORT_CONTROL_PORT_STATE_FORWARDING }, @@ -159,6 +160,7 @@ static const struct mvPhyConfig bridgeCo #endif } }; +#endif static void mvphy_switchconfig(struct mii_softc *, int); static void mvphy_flushatu(struct mii_softc *); @@ -206,7 +208,8 @@ mvphyattach(device_t parent, device_t se } PHY_RESET(sc); - sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask; + PHY_READ(sc, MII_BMSR, >mii_capabilities); + sc->mii_capabilities &= ma->mii_capmask; aprint_normal_dev(self, ""); if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0) aprint_error("no media present"); @@ -276,12 +279,12 @@ static void mvphy_status(struct mii_softc *sc) { struct mii_data *mii = sc->mii_pdata; - int hwstatus; + uint16_t hwstatus; mii->mii_media_status = IFM_AVALID; mii->mii_media_active = IFM_ETHER; - hwstatus = PHY_READ(sc, MII_MV_PHY_SPECIFIC_STATUS); + PHY_READ(sc, MII_MV_PHY_SPECIFIC_STATUS, ); if (hwstatus & MV_STATUS_REAL_TIME_LINK_UP) { mii->mii_media_status |= IFM_ACTIVE; if (hwstatus & MV_STATUS_RESOLVED_SPEED_100) @@ -332,7 +335,8 @@ mvphy_switchconfig(struct mii_softc *sc, static void mvphy_flushatu(struct mii_softc *sc) { - uint16_t status; + int status; + uint16_t reg; int i; /* wait for any previous request to complete */ @@ -340,7 +344,7 @@ mvphy_flushatu(struct mii_softc *sc) /* XXX timeout */ for (i = 0; i < 1000; i++) { status = MV_READ(sc, MII_MV_SWITCH_GLOBAL_ADDR, -MV_ATU_OPERATION); + MV_ATU_OPERATION, ); if (MV_ATU_IS_BUSY(status)) break; }
CVS commit: [pgoyette-compat] src/sys
Module Name:src Committed By: pgoyette Date: Wed Jan 23 03:34:15 UTC 2019 Modified Files: src/sys/arch/amd64/amd64 [pgoyette-compat]: netbsd32_machdep_16.c src/sys/arch/mips/mips [pgoyette-compat]: netbsd32_machdep_16.c src/sys/arch/sparc64/sparc64 [pgoyette-compat]: netbsd32_machdep_16.c src/sys/compat/common [pgoyette-compat]: bio_30.c ccd_60.c clockctl_50.c compat_sysv_50_mod.c ieee80211_20.c if43_20.c if_43.c if_spppsubr50.c kern_mod_80.c rndpseudo_50.c rtsock_14.c rtsock_50.c rtsock_70.c sysmon_power_40.c tty_60.c uipc_syscalls_40.c uipc_syscalls_50.c uipc_usrreq_70.c usb_subr_30.c vfs_syscalls_10.c vnd_30.c vnd_50.c src/sys/compat/netbsd32 [pgoyette-compat]: netbsd32_compat_50.c netbsd32_compat_80.c netbsd32_kern_proc.c src/sys/compat/sunos [pgoyette-compat]: sunos_mod.c src/sys/compat/sunos32 [pgoyette-compat]: sunos32_mod.c src/sys/dev/raidframe [pgoyette-compat]: rf_compat50.c rf_compat80.c src/sys/dev/wscons [pgoyette-compat]: wsevent_50.c src/sys/fs/puffs [pgoyette-compat]: puffs_compat.c src/sys/opencrypto [pgoyette-compat]: ocryptodev.c src/sys/sys [pgoyette-compat]: module_hook.h Log Message: Convert the macros for setting and unsetting a hook to generate in-line code rather than using an intermediary hook##set routine. Hooks are set and unset only in one place, so the intermediary routine provides no benefit. IMHO using the macro at the point- of-call is more readable than using it elsewhere in the code and then calling the generated intermediary routine (for which you won't even find its declaration or definition unless you remember to search for the HOOK_SET macro instead). NFC intended, will verify with a bulk build and an atf test run. To generate a diff of this commit: cvs rdiff -u -r1.1.2.11 -r1.1.2.12 \ src/sys/arch/amd64/amd64/netbsd32_machdep_16.c cvs rdiff -u -r1.1.2.9 -r1.1.2.10 \ src/sys/arch/mips/mips/netbsd32_machdep_16.c cvs rdiff -u -r1.1.2.5 -r1.1.2.6 \ src/sys/arch/sparc64/sparc64/netbsd32_machdep_16.c cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/compat/common/bio_30.c \ src/sys/compat/common/clockctl_50.c src/sys/compat/common/if43_20.c \ src/sys/compat/common/vfs_syscalls_10.c src/sys/compat/common/vnd_30.c cvs rdiff -u -r1.1.2.8 -r1.1.2.9 src/sys/compat/common/ccd_60.c cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/compat/common/compat_sysv_50_mod.c \ src/sys/compat/common/ieee80211_20.c src/sys/compat/common/vnd_50.c cvs rdiff -u -r1.14.2.14 -r1.14.2.15 src/sys/compat/common/if_43.c cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/compat/common/if_spppsubr50.c cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/compat/common/kern_mod_80.c cvs rdiff -u -r1.2.38.2 -r1.2.38.3 src/sys/compat/common/rndpseudo_50.c cvs rdiff -u -r1.5.14.6 -r1.5.14.7 src/sys/compat/common/rtsock_14.c cvs rdiff -u -r1.6.2.6 -r1.6.2.7 src/sys/compat/common/rtsock_50.c cvs rdiff -u -r1.2.2.4 -r1.2.2.5 src/sys/compat/common/rtsock_70.c cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/compat/common/sysmon_power_40.c cvs rdiff -u -r1.4.16.6 -r1.4.16.7 src/sys/compat/common/tty_60.c cvs rdiff -u -r1.15.2.12 -r1.15.2.13 src/sys/compat/common/uipc_syscalls_40.c cvs rdiff -u -r1.3.56.12 -r1.3.56.13 src/sys/compat/common/uipc_syscalls_50.c cvs rdiff -u -r1.1.20.5 -r1.1.20.6 src/sys/compat/common/uipc_usrreq_70.c cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/compat/common/usb_subr_30.c cvs rdiff -u -r1.32.16.15 -r1.32.16.16 \ src/sys/compat/netbsd32/netbsd32_compat_50.c cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/compat/netbsd32/netbsd32_compat_80.c cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/compat/netbsd32/netbsd32_kern_proc.c cvs rdiff -u -r1.3.28.2 -r1.3.28.3 src/sys/compat/sunos/sunos_mod.c cvs rdiff -u -r1.3.28.2 -r1.3.28.3 src/sys/compat/sunos32/sunos32_mod.c cvs rdiff -u -r1.3.2.6 -r1.3.2.7 src/sys/dev/raidframe/rf_compat50.c cvs rdiff -u -r1.2.2.4 -r1.2.2.5 src/sys/dev/raidframe/rf_compat80.c cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/dev/wscons/wsevent_50.c cvs rdiff -u -r1.4.16.5 -r1.4.16.6 src/sys/fs/puffs/puffs_compat.c cvs rdiff -u -r1.11.2.7 -r1.11.2.8 src/sys/opencrypto/ocryptodev.c cvs rdiff -u -r1.1.2.14 -r1.1.2.15 src/sys/sys/module_hook.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/netbsd32_machdep_16.c diff -u src/sys/arch/amd64/amd64/netbsd32_machdep_16.c:1.1.2.11 src/sys/arch/amd64/amd64/netbsd32_machdep_16.c:1.1.2.12 --- src/sys/arch/amd64/amd64/netbsd32_machdep_16.c:1.1.2.11 Mon Jan 14 13:34:26 2019 +++ src/sys/arch/amd64/amd64/netbsd32_machdep_16.c Wed Jan 23 03:34:14 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep_16.c,v 1.1.2.11 2019/01/14 13:34:26 pgoyette Exp $ */ +/* $NetBSD: netbsd32_machdep_16.c,v 1.1.2.12 2019/01/23 03:34:14 pgoyette Exp $ */ /* * Copyright (c) 2001 Wasabi Systems,
CVS commit: [pgoyette-compat] src/sys/compat/common
Module Name:src Committed By: pgoyette Date: Wed Jan 23 02:55:10 UTC 2019 Modified Files: src/sys/compat/common [pgoyette-compat]: compat_raid_50.c Log Message: Add compat_raid_80 to the required list To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/compat/common/compat_raid_50.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/compat/common/compat_raid_50.c diff -u src/sys/compat/common/compat_raid_50.c:1.1.2.1 src/sys/compat/common/compat_raid_50.c:1.1.2.2 --- src/sys/compat/common/compat_raid_50.c:1.1.2.1 Sat Sep 22 22:21:46 2018 +++ src/sys/compat/common/compat_raid_50.c Wed Jan 23 02:55:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_raid_50.c,v 1.1.2.1 2018/09/22 22:21:46 pgoyette Exp $ */ +/* $NetBSD: compat_raid_50.c,v 1.1.2.2 2019/01/23 02:55:09 pgoyette Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: compat_raid_50.c,v 1.1.2.1 2018/09/22 22:21:46 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: compat_raid_50.c,v 1.1.2.2 2019/01/23 02:55:09 pgoyette Exp $"); #include #include @@ -64,7 +64,7 @@ int compat_raid_50_fini(void) return 0; } -MODULE(MODULE_CLASS_EXEC, compat_raid_50, "compat_50,raid"); +MODULE(MODULE_CLASS_EXEC, compat_raid_50, "compat_50,raid,compat_raid_80"); static int compat_50_modcmd(modcmd_t cmd, void *arg)
CVS commit: src/lib/libwrap
Module Name:src Committed By: kre Date: Wed Jan 23 02:48:48 UTC 2019 Modified Files: src/lib/libwrap: expandm.c Log Message: And as long as we're attempting to achieve perfection in code that is never going to be executed, let's also check for possible overflow in a sum that will never be computed... To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libwrap/expandm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libwrap/expandm.c diff -u src/lib/libwrap/expandm.c:1.10 src/lib/libwrap/expandm.c:1.11 --- src/lib/libwrap/expandm.c:1.10 Wed Jan 23 02:32:06 2019 +++ src/lib/libwrap/expandm.c Wed Jan 23 02:48:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: expandm.c,v 1.10 2019/01/23 02:32:06 kre Exp $ */ +/* $NetBSD: expandm.c,v 1.11 2019/01/23 02:48:48 kre Exp $ */ /*- * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: expandm.c,v 1.10 2019/01/23 02:32:06 kre Exp $"); +__RCSID("$NetBSD: expandm.c,v 1.11 2019/01/23 02:48:48 kre Exp $"); #include #include @@ -68,7 +68,19 @@ expandm(const char *fmt, const char *sf, */ if (__predict_false(nlen >= INT_MAX)) { size_t blen = buf ? strlen(buf) : 0; - size_t tlen = nlen + blen; + size_t tlen; + + /* + * if we would overflow a ptrdiff_t when computing + * tlen, then don't bother. The format string is + * simply too large to be converted. + */ + if (blen >= PTRDIFF_MAX || + nlen >= PTRDIFF_MAX - blen || + nlen >= SIZE_T_MAX - blen) +goto out; + + tlen = nlen + blen; /* * We can't exceed PTRDIFF_MAX because we would
CVS commit: othersrc/libexec/tnftpd/libnetbsd
Module Name:othersrc Committed By: lukem Date: Wed Jan 23 02:44:57 UTC 2019 Modified Files: othersrc/libexec/tnftpd/libnetbsd: err.c Log Message: whitespace fixup consistent tab indenting, not a mix of spaces and tabs To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 othersrc/libexec/tnftpd/libnetbsd/err.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/libnetbsd/err.c diff -u othersrc/libexec/tnftpd/libnetbsd/err.c:1.3 othersrc/libexec/tnftpd/libnetbsd/err.c:1.4 --- othersrc/libexec/tnftpd/libnetbsd/err.c:1.3 Sun Sep 21 16:35:25 2008 +++ othersrc/libexec/tnftpd/libnetbsd/err.c Wed Jan 23 02:44:57 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: err.c,v 1.3 2008/09/21 16:35:25 lukem Exp $ */ +/* $NetBSD: err.c,v 1.4 2019/01/23 02:44:57 lukem Exp $ */ /* * Copyright 1997-2002 Luke Mewburn . @@ -34,61 +34,61 @@ extern char *__progname; void err(int eval, const char *fmt, ...) { - va_list ap; -int sverrno; + va_list ap; + int sverrno; sverrno = errno; -(void)fprintf(stderr, "%s: ", __progname); + (void)fprintf(stderr, "%s: ", __progname); va_start(ap, fmt); -if (fmt != NULL) { -(void)vfprintf(stderr, fmt, ap); -(void)fprintf(stderr, ": "); -} + if (fmt != NULL) { + (void)vfprintf(stderr, fmt, ap); + (void)fprintf(stderr, ": "); + } va_end(ap); -(void)fprintf(stderr, "%s\n", strerror(sverrno)); -exit(eval); + (void)fprintf(stderr, "%s\n", strerror(sverrno)); + exit(eval); } void errx(int eval, const char *fmt, ...) { - va_list ap; + va_list ap; -(void)fprintf(stderr, "%s: ", __progname); + (void)fprintf(stderr, "%s: ", __progname); va_start(ap, fmt); -if (fmt != NULL) -(void)vfprintf(stderr, fmt, ap); + if (fmt != NULL) + (void)vfprintf(stderr, fmt, ap); va_end(ap); -(void)fprintf(stderr, "\n"); -exit(eval); + (void)fprintf(stderr, "\n"); + exit(eval); } void warn(const char *fmt, ...) { - va_list ap; -int sverrno; + va_list ap; + int sverrno; sverrno = errno; -(void)fprintf(stderr, "%s: ", __progname); + (void)fprintf(stderr, "%s: ", __progname); va_start(ap, fmt); -if (fmt != NULL) { -(void)vfprintf(stderr, fmt, ap); -(void)fprintf(stderr, ": "); -} + if (fmt != NULL) { + (void)vfprintf(stderr, fmt, ap); + (void)fprintf(stderr, ": "); + } va_end(ap); -(void)fprintf(stderr, "%s\n", strerror(sverrno)); + (void)fprintf(stderr, "%s\n", strerror(sverrno)); } void warnx(const char *fmt, ...) { - va_list ap; + va_list ap; -(void)fprintf(stderr, "%s: ", __progname); + (void)fprintf(stderr, "%s: ", __progname); va_start(ap, fmt); -if (fmt != NULL) -(void)vfprintf(stderr, fmt, ap); + if (fmt != NULL) + (void)vfprintf(stderr, fmt, ap); va_end(ap); -(void)fprintf(stderr, "\n"); + (void)fprintf(stderr, "\n"); }
CVS commit: othersrc/libexec/tnftpd/libnetbsd
Module Name:othersrc Committed By: lukem Date: Wed Jan 23 02:37:28 UTC 2019 Modified Files: othersrc/libexec/tnftpd/libnetbsd: daemon.c Log Message: sync to daemon.c 1.10 Update to NetBSD src/lib/libc/gen/daemon.c 1.10 from 1.9: - Update old-style definitions to ANSI To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 othersrc/libexec/tnftpd/libnetbsd/daemon.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/libnetbsd/daemon.c diff -u othersrc/libexec/tnftpd/libnetbsd/daemon.c:1.3 othersrc/libexec/tnftpd/libnetbsd/daemon.c:1.4 --- othersrc/libexec/tnftpd/libnetbsd/daemon.c:1.3 Sun Sep 21 16:35:25 2008 +++ othersrc/libexec/tnftpd/libnetbsd/daemon.c Wed Jan 23 02:37:28 2019 @@ -1,5 +1,5 @@ -/* $NetBSD: daemon.c,v 1.3 2008/09/21 16:35:25 lukem Exp $ */ -/* from NetBSD: daemon.c,v 1.9 2003/08/07 16:42:46 agc Exp */ +/* $NetBSD: daemon.c,v 1.4 2019/01/23 02:37:28 lukem Exp $ */ +/* from NetBSD: daemon.c,v 1.10 2012/06/25 22:32:43 abs Exp */ /*- * Copyright (c) 1990, 1993 @@ -33,8 +33,7 @@ #include "tnftpd.h" int -daemon(nochdir, noclose) - int nochdir, noclose; +daemon(int nochdir, int noclose) { int fd;
CVS commit: othersrc/libexec/tnftpd/libnetbsd
Module Name:othersrc Committed By: lukem Date: Wed Jan 23 02:32:36 UTC 2019 Modified Files: othersrc/libexec/tnftpd/libnetbsd: arpa_ftp.h Log Message: sync to arpa/ftp.h 1.7 Update to NetBSD src/include/arpa/ftp.h revision 1.7 from revision 1.5: - 1.6: Move UCB-licensed code from 4-clause to 3-clause licence. [already done] - 1.7: Welcome to the constant age! To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 othersrc/libexec/tnftpd/libnetbsd/arpa_ftp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/libexec/tnftpd/libnetbsd/arpa_ftp.h diff -u othersrc/libexec/tnftpd/libnetbsd/arpa_ftp.h:1.3 othersrc/libexec/tnftpd/libnetbsd/arpa_ftp.h:1.4 --- othersrc/libexec/tnftpd/libnetbsd/arpa_ftp.h:1.3 Sun Sep 21 16:35:25 2008 +++ othersrc/libexec/tnftpd/libnetbsd/arpa_ftp.h Wed Jan 23 02:32:36 2019 @@ -1,5 +1,5 @@ -/* $NetBSD: arpa_ftp.h,v 1.3 2008/09/21 16:35:25 lukem Exp $ */ -/* from NetBSD: ftp.h,v 1.5 1998/02/10 00:32:50 perry Exp */ +/* $NetBSD: arpa_ftp.h,v 1.4 2019/01/23 02:32:36 lukem Exp $ */ +/* from NetBSD: ftp.h,v 1.7 2017/01/12 18:42:53 christos Exp */ /* * Copyright (c) 1983, 1989, 1993 @@ -55,7 +55,7 @@ #define TYPE_L 4 /* local byte size */ #ifdef FTP_NAMES -char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" }; +const char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" }; #endif /* @@ -65,7 +65,7 @@ char *typenames[] = {"0", "ASCII", "EBC #define FORM_T 2 /* telnet format effectors */ #define FORM_C 3 /* carriage control (ASA) */ #ifdef FTP_NAMES -char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" }; +const char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" }; #endif /* @@ -75,7 +75,7 @@ char *formnames[] = {"0", "Nonprint", " #define STRU_R 2 /* record structure */ #define STRU_P 3 /* page structure */ #ifdef FTP_NAMES -char *strunames[] = {"0", "File", "Record", "Page" }; +const char *strunames[] = {"0", "File", "Record", "Page" }; #endif /* @@ -85,7 +85,7 @@ char *strunames[] = {"0", "File", "Reco #define MODE_B 2 /* block */ #define MODE_C 3 /* compressed */ #ifdef FTP_NAMES -char *modenames[] = {"0", "Stream", "Block", "Compressed" }; +const char *modenames[] = {"0", "Stream", "Block", "Compressed" }; #endif /*
CVS commit: src/lib/libwrap
Module Name:src Committed By: kre Date: Wed Jan 23 02:32:06 UTC 2019 Modified Files: src/lib/libwrap: expandm.c Log Message: There's no point setting errno, it is just overwritten by err in the exit path ... this function never fails, it simply sometimes doesn't actually expand the %m and just leaves the format string intact. And declare variables at the head of their scope, not at some random place in the middle of the code, whatever C allows, that is just ugly. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libwrap/expandm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libwrap/expandm.c diff -u src/lib/libwrap/expandm.c:1.9 src/lib/libwrap/expandm.c:1.10 --- src/lib/libwrap/expandm.c:1.9 Wed Jan 23 02:00:00 2019 +++ src/lib/libwrap/expandm.c Wed Jan 23 02:32:06 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: expandm.c,v 1.9 2019/01/23 02:00:00 christos Exp $ */ +/* $NetBSD: expandm.c,v 1.10 2019/01/23 02:32:06 kre Exp $ */ /*- * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: expandm.c,v 1.9 2019/01/23 02:00:00 christos Exp $"); +__RCSID("$NetBSD: expandm.c,v 1.10 2019/01/23 02:32:06 kre Exp $"); #include #include @@ -56,11 +56,12 @@ expandm(const char *fmt, const char *sf, buf = NULL; for (ptr = fmt; (m = strstr(ptr, "%m")) != NULL; ptr = m + 2) { size_t cnt = 0; + size_t nlen; for (char *p = m; p >= ptr && *p == '%'; p--) cnt++; - size_t nlen = (size_t)(m - ptr); + nlen = (size_t)(m - ptr); /* * we can't exceed INT_MAX because int is used as * a format width @@ -73,10 +74,8 @@ expandm(const char *fmt, const char *sf, * We can't exceed PTRDIFF_MAX because we would * not be able to address the pointers */ - if (tlen >= PTRDIFF_MAX) { -errno = EINVAL; + if (tlen >= PTRDIFF_MAX) goto out; - } nbuf = realloc(buf, tlen + 1); if (nbuf == NULL)
CVS commit: [pgoyette-compat] src/sys/modules
Module Name:src Committed By: pgoyette Date: Wed Jan 23 02:25:29 UTC 2019 Modified Files: src/sys/modules/compat_50 [pgoyette-compat]: Makefile src/sys/modules/compat_80 [pgoyette-compat]: Makefile Log Message: Revert previous. Both opencrypto/ocryptodev and raidframe/rf_compat_xx already exist in their own modules and do not need to be part of the compat_{50,80} modules. To generate a diff of this commit: cvs rdiff -u -r1.1.2.14 -r1.1.2.15 src/sys/modules/compat_50/Makefile cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/modules/compat_80/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/compat_50/Makefile diff -u src/sys/modules/compat_50/Makefile:1.1.2.14 src/sys/modules/compat_50/Makefile:1.1.2.15 --- src/sys/modules/compat_50/Makefile:1.1.2.14 Wed Jan 23 02:15:02 2019 +++ src/sys/modules/compat_50/Makefile Wed Jan 23 02:25:29 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1.2.14 2019/01/23 02:15:02 pgoyette Exp $ +# $NetBSD: Makefile,v 1.1.2.15 2019/01/23 02:25:29 pgoyette Exp $ .include "../Makefile.inc" @@ -31,12 +31,4 @@ SRCS+= wsevent_50.c SRCS+= vnd_50.c -.PATH: ${S}/dev/raidframe - -SRCS+= rf_compat_50.c - -.PATH: ${S}/opencrypto - -SRCS+= ocryptodev.c - .include Index: src/sys/modules/compat_80/Makefile diff -u src/sys/modules/compat_80/Makefile:1.1.2.5 src/sys/modules/compat_80/Makefile:1.1.2.6 --- src/sys/modules/compat_80/Makefile:1.1.2.5 Wed Jan 23 02:15:02 2019 +++ src/sys/modules/compat_80/Makefile Wed Jan 23 02:25:29 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1.2.5 2019/01/23 02:15:02 pgoyette Exp $ +# $NetBSD: Makefile,v 1.1.2.6 2019/01/23 02:25:29 pgoyette Exp $ .include "../Makefile.inc" @@ -11,8 +11,4 @@ CPPFLAGS+= -DCOMPAT_80 SRCS+= compat_80_mod.c SRCS+= kern_mod_80.c -.PATH: ${S}/dev/raidframe - -SRCS+= rf_compat_80.c - .include
CVS commit: [pgoyette-compat] src/sys/modules
Module Name:src Committed By: pgoyette Date: Wed Jan 23 02:15:02 UTC 2019 Modified Files: src/sys/modules/compat_50 [pgoyette-compat]: Makefile src/sys/modules/compat_80 [pgoyette-compat]: Makefile Log Message: Ensure that all the compat code gets into the appropriate modules, even compat code that doesn't live in sys/compat To generate a diff of this commit: cvs rdiff -u -r1.1.2.13 -r1.1.2.14 src/sys/modules/compat_50/Makefile cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/modules/compat_80/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/compat_50/Makefile diff -u src/sys/modules/compat_50/Makefile:1.1.2.13 src/sys/modules/compat_50/Makefile:1.1.2.14 --- src/sys/modules/compat_50/Makefile:1.1.2.13 Tue Jan 15 01:12:30 2019 +++ src/sys/modules/compat_50/Makefile Wed Jan 23 02:15:02 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1.2.13 2019/01/15 01:12:30 pgoyette Exp $ +# $NetBSD: Makefile,v 1.1.2.14 2019/01/23 02:15:02 pgoyette Exp $ .include "../Makefile.inc" @@ -31,4 +31,12 @@ SRCS+= wsevent_50.c SRCS+= vnd_50.c +.PATH: ${S}/dev/raidframe + +SRCS+= rf_compat_50.c + +.PATH: ${S}/opencrypto + +SRCS+= ocryptodev.c + .include Index: src/sys/modules/compat_80/Makefile diff -u src/sys/modules/compat_80/Makefile:1.1.2.4 src/sys/modules/compat_80/Makefile:1.1.2.5 --- src/sys/modules/compat_80/Makefile:1.1.2.4 Wed Oct 3 22:50:50 2018 +++ src/sys/modules/compat_80/Makefile Wed Jan 23 02:15:02 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1.2.4 2018/10/03 22:50:50 pgoyette Exp $ +# $NetBSD: Makefile,v 1.1.2.5 2019/01/23 02:15:02 pgoyette Exp $ .include "../Makefile.inc" @@ -11,4 +11,8 @@ CPPFLAGS+= -DCOMPAT_80 SRCS+= compat_80_mod.c SRCS+= kern_mod_80.c +.PATH: ${S}/dev/raidframe + +SRCS+= rf_compat_80.c + .include
CVS commit: src/lib/libwrap
Module Name:src Committed By: christos Date: Wed Jan 23 02:00:00 UTC 2019 Modified Files: src/lib/libwrap: expandm.c Log Message: limit allocation to PTRDIFF_T to appease gcc-7, from mrg@ To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libwrap/expandm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libwrap/expandm.c diff -u src/lib/libwrap/expandm.c:1.8 src/lib/libwrap/expandm.c:1.9 --- src/lib/libwrap/expandm.c:1.8 Sun Jan 13 22:30:25 2019 +++ src/lib/libwrap/expandm.c Tue Jan 22 21:00:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: expandm.c,v 1.8 2019/01/14 03:30:25 kre Exp $ */ +/* $NetBSD: expandm.c,v 1.9 2019/01/23 02:00:00 christos Exp $ */ /*- * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: expandm.c,v 1.8 2019/01/14 03:30:25 kre Exp $"); +__RCSID("$NetBSD: expandm.c,v 1.9 2019/01/23 02:00:00 christos Exp $"); #include #include @@ -60,16 +60,30 @@ expandm(const char *fmt, const char *sf, for (char *p = m; p >= ptr && *p == '%'; p--) cnt++; - if (__predict_false((m - ptr) >= INT_MAX)) { + size_t nlen = (size_t)(m - ptr); + /* + * we can't exceed INT_MAX because int is used as + * a format width + */ + if (__predict_false(nlen >= INT_MAX)) { size_t blen = buf ? strlen(buf) : 0; - size_t nlen = (size_t)(m - ptr); + size_t tlen = nlen + blen; - nbuf = realloc(buf, blen + nlen + 1); + /* + * We can't exceed PTRDIFF_MAX because we would + * not be able to address the pointers + */ + if (tlen >= PTRDIFF_MAX) { +errno = EINVAL; +goto out; + } + + nbuf = realloc(buf, tlen + 1); if (nbuf == NULL) goto out; memcpy(nbuf + blen, ptr, nlen); - nbuf[blen + nlen] = '\0'; + nbuf[tlen] = '\0'; ptr += nlen; buf = nbuf; }
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: mrg Date: Wed Jan 23 00:05:47 UTC 2019 Modified Files: src/lib/libc/stdio: fprintf.c Log Message: remove diag assert - the compiler demands fp is non NULL now. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libc/stdio/fprintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdio/fprintf.c diff -u src/lib/libc/stdio/fprintf.c:1.14 src/lib/libc/stdio/fprintf.c:1.15 --- src/lib/libc/stdio/fprintf.c:1.14 Sun Feb 4 01:13:45 2018 +++ src/lib/libc/stdio/fprintf.c Wed Jan 23 00:05:47 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: fprintf.c,v 1.14 2018/02/04 01:13:45 mrg Exp $ */ +/* $NetBSD: fprintf.c,v 1.15 2019/01/23 00:05:47 mrg Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)fprintf.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: fprintf.c,v 1.14 2018/02/04 01:13:45 mrg Exp $"); +__RCSID("$NetBSD: fprintf.c,v 1.15 2019/01/23 00:05:47 mrg Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -53,8 +53,6 @@ fprintf(FILE *fp, const char *fmt, ...) int ret; va_list ap; - _DIAGASSERT(fp != NULL); - va_start(ap, fmt); ret = vfprintf(fp, fmt, ap); va_end(ap);
CVS commit: src/lib/libossaudio
Module Name:src Committed By: mrg Date: Wed Jan 23 00:08:06 UTC 2019 Modified Files: src/lib/libossaudio: ossaudio.c Log Message: memset to zero the entire array, not just 8 bytes of it. picked up by gcc7's checker that the array size has not been multipled by the member size. here, we had 8 but should have had 8 * sizeof(int). XXX: real bug - pullup-7, pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/lib/libossaudio/ossaudio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libossaudio/ossaudio.c diff -u src/lib/libossaudio/ossaudio.c:1.33 src/lib/libossaudio/ossaudio.c:1.34 --- src/lib/libossaudio/ossaudio.c:1.33 Thu Mar 23 15:50:48 2017 +++ src/lib/libossaudio/ossaudio.c Wed Jan 23 00:08:06 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ossaudio.c,v 1.33 2017/03/23 15:50:48 nat Exp $ */ +/* $NetBSD: ossaudio.c,v 1.34 2019/01/23 00:08:06 mrg Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: ossaudio.c,v 1.33 2017/03/23 15:50:48 nat Exp $"); +__RCSID("$NetBSD: ossaudio.c,v 1.34 2019/01/23 00:08:06 mrg Exp $"); /* * This is an OSS (Linux) sound API emulator. @@ -503,13 +503,13 @@ audio_ioctl(int fd, unsigned long com, v memset(tmpsysinfo.options, 0, 8); tmpsysinfo.numaudios = OSS_MAX_AUDIO_DEVS; tmpsysinfo.numaudioengines = 1; - memset(tmpsysinfo.openedaudio, 0, 8); + memset(tmpsysinfo.openedaudio, 0, sizeof(tmpsysinfo.openedaudio)); tmpsysinfo.numsynths = 1; tmpsysinfo.nummidis = -1; tmpsysinfo.numtimers = -1; tmpsysinfo.nummixers = 1; tmpsysinfo.numcards = 1; - memset(tmpsysinfo.openedmidi, 0, 8); + memset(tmpsysinfo.openedmidi, 0, sizeof(tmpsysinfo.openedmidi)); *(struct oss_sysinfo *)argp = tmpsysinfo; break; case SNDCTL_ENGINEINFO:
CVS commit: src/external/gpl3/gcc/lib
Module Name:src Committed By: mrg Date: Tue Jan 22 23:55:54 UTC 2019 Modified Files: src/external/gpl3/gcc/lib: Makefile.gthr src/external/gpl3/gcc/lib/libgomp: Makefile src/external/gpl3/gcc/lib/libstdc++-v3: Makefile src/external/gpl3/gcc/lib/libstdc++-v3/include/bits: Makefile src/external/gpl3/gcc/lib/libsupc++: Makefile.common Log Message: - fix Makefile.gthr CONFIG_LINKS handling. demand only that gthr-default.h source be found. fix installing the symlink. - -Wno-error=incompatible-pointer-types needed for libgomp/lock.c - build new libsupc++ files with -std=gnu++1z - install new libstdc++ bits files. (XXX use bits_sup_headers from libstdc++/include/Makefile.am with mknative-gccm) - start to get libstdc++ to build: various flag updates. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/lib/Makefile.gthr cvs rdiff -u -r1.20 -r1.21 src/external/gpl3/gcc/lib/libgomp/Makefile cvs rdiff -u -r1.35 -r1.36 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile cvs rdiff -u -r1.21 -r1.22 \ src/external/gpl3/gcc/lib/libstdc++-v3/include/bits/Makefile cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc/lib/libsupc++/Makefile.common Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/lib/Makefile.gthr diff -u src/external/gpl3/gcc/lib/Makefile.gthr:1.2 src/external/gpl3/gcc/lib/Makefile.gthr:1.3 --- src/external/gpl3/gcc/lib/Makefile.gthr:1.2 Sat Jan 19 20:02:06 2019 +++ src/external/gpl3/gcc/lib/Makefile.gthr Tue Jan 22 23:55:54 2019 @@ -1,22 +1,43 @@ -# $NetBSD: Makefile.gthr,v 1.2 2019/01/19 20:02:06 mrg Exp $ +# $NetBSD: Makefile.gthr,v 1.3 2019/01/22 23:55:54 mrg Exp $ # makefile fragment to setup files selected by configure .if ${MKGCC} != "no" LIBGCC_MACHINE_ARCH?=${MACHINE_ARCH:S/earmv5/earm/} +LIBGCC_DIST=${DIST}/libgcc -. -include "${DIST}/../lib/libgcc/arch/${LIBGCC_MACHINE_ARCH}/gthr-defs.mk" +. include "${DIST}/../lib/libgcc/arch/${LIBGCC_MACHINE_ARCH}/gthr-defs.mk" -CONFIG_LINKS= \ - ${G_enable_execute_stack} enable-execute-stack.c \ - ${G_unwind_header} unwind.h \ - ${G_md_unwind_header} md-unwind-support.h \ - ${G_sfp_machine_header} sfp-machine.h \ +.if !empty(G_enable_execute_stack) +CONFIG_LINKS+= \ + ${G_enable_execute_stack} enable-execute-stack.c +.endif + +.if !empty(G_unwind_header) +CONFIG_LINKS+= \ + ${G_unwind_header} unwind.h +.endif + +.if !empty(G_md_unwind_header) +CONFIG_LINKS+= \ + ${G_md_unwind_header} md-unwind-support.h +.endif + +.if !empty(G_sfp_machine_header) +CONFIG_LINKS+= \ + ${G_sfp_machine_header} sfp-machine.h +.endif + +# Demand this one exists. +CONFIG_LINKS+= \ ${G_thread_header} gthr-default.h + BUILDSYMLINKS+= ${CONFIG_LINKS} . for _src _dst in ${CONFIG_LINKS} DPSRCS+= ${_dst} . endfor +.PATH: ${LIBGCC_DIST} ${LIBGCC_DIST}/config + .endif Index: src/external/gpl3/gcc/lib/libgomp/Makefile diff -u src/external/gpl3/gcc/lib/libgomp/Makefile:1.20 src/external/gpl3/gcc/lib/libgomp/Makefile:1.21 --- src/external/gpl3/gcc/lib/libgomp/Makefile:1.20 Sun Aug 12 21:48:57 2018 +++ src/external/gpl3/gcc/lib/libgomp/Makefile Tue Jan 22 23:55:54 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.20 2018/08/12 21:48:57 mrg Exp $ +# $NetBSD: Makefile,v 1.21 2019/01/22 23:55:54 mrg Exp $ # build GCC's libgomp, so that -fopenmp works. @@ -91,4 +91,7 @@ libinstall:: COPTS+= -Wno-stack-protector -Wno-missing-prototypes COPTS.oacc-mem.c+= -Wno-pointer-arith +COPTS.lock.c+= -Wno-error=incompatible-pointer-types + + .PATH: ${ARCHDIR} ${DIST}/libgomp ${DIST}/libgomp/config/posix Index: src/external/gpl3/gcc/lib/libstdc++-v3/Makefile diff -u src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.35 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.36 --- src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.35 Sat Jan 19 17:11:02 2019 +++ src/external/gpl3/gcc/lib/libstdc++-v3/Makefile Tue Jan 22 23:55:54 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.35 2019/01/19 17:11:02 mrg Exp $ +# $NetBSD: Makefile,v 1.36 2019/01/22 23:55:54 mrg Exp $ REQUIRETOOLS= yes NOLINT= # defined @@ -52,14 +52,16 @@ SHLIB_MINOR= 1 SUBDIR= include SRCS= ${LIBSUPCXXSRCS} ${LIBSTDCXXSRCS} + +CXXFLAGS+= -fno-implicit-templates +CPPFLAGS+= -I${DIST}/libstdc++-v3/include +CPPFLAGS+= -I${.CURDIR}/arch/${LIBSTDCXX_MACHINE_ARCH} +CPPFLAGS+= -D_GLIBCXX_SHARED -DGTHREAD_USE_WEAK -DSUPPORTS_WEAK + # affects profiling; can't switch it off just for profiling easily. #CXXFLAGS+= ${G_SECTION_FLAGS} #CXXFLAGS+= -ffunction-sections -fdata-sections -CXXFLAGS+= -fno-implicit-templates -fdiagnostics-show-location=once -CPPFLAGS+= -I${DIST}/libstdc++-v3/include -CPPFLAGS+= -I${.CURDIR}/arch/${LIBSTDCXX_MACHINE_ARCH} -# include backwards compatible code -CPPFLAGS+= -D_GLIBCXX_SHARED -DGTHREAD_USE_WEAK -DSUPPORTS_WEAK +COPTS.bitmap_allocator.cc+= -ffunction-sections -fdata-sections CONF=
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Tue Jan 22 23:06:49 UTC 2019 Modified Files: src/sys/arch/arm/sunxi: sun4i_a10_ccu.c sun50i_a64_ccu.c sunxi_ccu.h sunxi_ccu_fractional.c Log Message: Add sun50i DE clocks. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/sunxi/sun4i_a10_ccu.c \ src/sys/arch/arm/sunxi/sun50i_a64_ccu.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/sunxi/sunxi_ccu.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sunxi_ccu_fractional.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/sun4i_a10_ccu.c diff -u src/sys/arch/arm/sunxi/sun4i_a10_ccu.c:1.9 src/sys/arch/arm/sunxi/sun4i_a10_ccu.c:1.10 --- src/sys/arch/arm/sunxi/sun4i_a10_ccu.c:1.9 Mon Apr 2 20:57:18 2018 +++ src/sys/arch/arm/sunxi/sun4i_a10_ccu.c Tue Jan 22 23:06:49 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sun4i_a10_ccu.c,v 1.9 2018/04/02 20:57:18 bouyer Exp $ */ +/* $NetBSD: sun4i_a10_ccu.c,v 1.10 2019/01/22 23:06:49 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: sun4i_a10_ccu.c,v 1.9 2018/04/02 20:57:18 bouyer Exp $"); +__KERNEL_RCSID(1, "$NetBSD: sun4i_a10_ccu.c,v 1.10 2019/01/22 23:06:49 jmcneill Exp $"); #include #include @@ -323,9 +323,10 @@ static struct sunxi_ccu_clk sun4i_a10_cc __BIT(15), /* div_en */ __BIT(14), /* frac_sel */ 27000, 29700, /* frac values */ - 8,/* prediv */ - __BIT(31) /* enable */ - ), + 0,/* prediv */ + 8,/* prediv_val */ + __BIT(31), /* enable */ + 0), SUNXI_CCU_FRACTIONAL(A10_CLK_PLL_VIDEO1, "pll_video1", "osc24m", PLL7_CFG_REG, /* reg */ __BITS(7,0), /* m */ @@ -334,9 +335,10 @@ static struct sunxi_ccu_clk sun4i_a10_cc __BIT(15), /* div_en */ __BIT(14), /* frac_sel */ 27000, 29700, /* frac values */ - 8,/* prediv */ - __BIT(31) /* enable */ - ), + 0,/* prediv */ + 8,/* prediv_val */ + __BIT(31), /* enable */ + 0), SUNXI_CCU_FIXED_FACTOR(A10_CLK_PLL_VIDEO0_2X, "pll_video0x2", "pll_video0", 1, 2), Index: src/sys/arch/arm/sunxi/sun50i_a64_ccu.c diff -u src/sys/arch/arm/sunxi/sun50i_a64_ccu.c:1.9 src/sys/arch/arm/sunxi/sun50i_a64_ccu.c:1.10 --- src/sys/arch/arm/sunxi/sun50i_a64_ccu.c:1.9 Fri May 18 02:03:00 2018 +++ src/sys/arch/arm/sunxi/sun50i_a64_ccu.c Tue Jan 22 23:06:49 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sun50i_a64_ccu.c,v 1.9 2018/05/18 02:03:00 jmcneill Exp $ */ +/* $NetBSD: sun50i_a64_ccu.c,v 1.10 2019/01/22 23:06:49 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: sun50i_a64_ccu.c,v 1.9 2018/05/18 02:03:00 jmcneill Exp $"); +__KERNEL_RCSID(1, "$NetBSD: sun50i_a64_ccu.c,v 1.10 2019/01/22 23:06:49 jmcneill Exp $"); #include #include @@ -44,6 +44,7 @@ __KERNEL_RCSID(1, "$NetBSD: sun50i_a64_c #define PLL_AUDIO_CTRL_REG 0x008 #define PLL_PERIPH0_CTRL_REG 0x028 #define PLL_PERIPH1_CTRL_REG 0x02c +#define PLL_DE_CTRL_REG 0x048 #define AHB1_APB1_CFG_REG 0x054 #define APB2_CFG_REG 0x058 #define AHB2_CFG_REG 0x05c @@ -59,6 +60,7 @@ __KERNEL_RCSID(1, "$NetBSD: sun50i_a64_c #define USBPHY_CFG_REG 0x0cc #define DRAM_CFG_REG 0x0f4 #define MBUS_RST_REG 0x0fc +#define DE_CLK_REG 0x104 #define AC_DIG_CLK_REG 0x140 #define BUS_SOFT_RST_REG0 0x2c0 #define BUS_SOFT_RST_REG1 0x2c4 @@ -143,6 +145,7 @@ static const char *apb1_parents[] = { "a static const char *apb2_parents[] = { "losc", "hosc", "pll_periph0" }; static const char *mmc_parents[] = { "hosc", "pll_periph0_2x", "pll_periph1_2x" }; static const char *ths_parents[] = { "hosc", NULL, NULL, NULL }; +static const char *de_parents[] = { "pll_periph0_2x", "pll_de" }; static const struct sunxi_ccu_nkmp_tbl sun50i_a64_cpux_table[] = { { 6000, 9, 0, 0, 2 }, @@ -259,6 +262,19 @@ static struct sunxi_ccu_clk sun50i_a64_c 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_FRACTIONAL(A64_CLK_PLL_DE, "pll_de", "hosc", + DE_CLK_REG, /* reg */ + __BITS(14,8), /* m */ + 16,/* m_min */ + 50,/* m_max */ + __BIT(24), /* div_en */ + __BIT(25), /* frac_sel */ + 27000, 29700, /* frac values */ + __BITS(3,0), /* prediv */ + 2,/* prediv_val */ + __BIT(31), /* enable */ + SUNXI_CCU_FRACTIONAL_PLUSONE), + SUNXI_CCU_PREDIV(A64_CLK_AHB1, "ahb1", ahb1_parents, AHB1_APB1_CFG_REG, /* reg */ __BITS(7,6), /* prediv */ @@ -318,6 +334,13 @@ static struct sunxi_ccu_clk sun50i_a64_c __BIT(31), /* enable */ SUNXI_CCU_DIV_TIMES_TWO), + SUNXI_CCU_DIV_GATE(A64_CLK_DE, "de", de_parents, + DE_CLK_REG, /* reg
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jdolecek Date: Tue Jan 22 22:22:06 UTC 2019 Modified Files: src/sys/dev/pci: ahcisata_pci.c Log Message: fix pasto; still PR kern/53307 To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/dev/pci/ahcisata_pci.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/ahcisata_pci.c diff -u src/sys/dev/pci/ahcisata_pci.c:1.53 src/sys/dev/pci/ahcisata_pci.c:1.54 --- src/sys/dev/pci/ahcisata_pci.c:1.53 Tue Jan 22 22:14:20 2019 +++ src/sys/dev/pci/ahcisata_pci.c Tue Jan 22 22:22:06 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ahcisata_pci.c,v 1.53 2019/01/22 22:14:20 jdolecek Exp $ */ +/* $NetBSD: ahcisata_pci.c,v 1.54 2019/01/22 22:22:06 jdolecek Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.53 2019/01/22 22:14:20 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.54 2019/01/22 22:22:06 jdolecek Exp $"); #ifdef _KERNEL_OPT #include "opt_ahcisata_pci.h" @@ -200,9 +200,9 @@ static const struct ahci_pci_quirk ahci_ AHCI_PCI_QUIRK_FORCE }, { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_HUDSON_SATA, AHCI_PCI_QUIRK_FORCE }, - { PCI_VENDOR_INTEL, 82801JI_SATA_AHCI, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_82801JI_SATA_AHCI, AHCI_QUIRK_BADPMP }, - { PCI_VENDOR_AMD, HUDSON_SATA_AHCI, + { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_HUDSON_SATA_AHCI, AHCI_QUIRK_BADPMP }, };
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jdolecek Date: Tue Jan 22 22:14:20 UTC 2019 Modified Files: src/sys/dev/pci: ahcisata_pci.c Log Message: add BADPMP quirk also for AMD Hudson AHCI SATA Controller, seems in some configurations/BIOS versions the PMP reset works, in others not; it's better to have the common configuration working related to PR kern/53307 To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/dev/pci/ahcisata_pci.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/ahcisata_pci.c diff -u src/sys/dev/pci/ahcisata_pci.c:1.52 src/sys/dev/pci/ahcisata_pci.c:1.53 --- src/sys/dev/pci/ahcisata_pci.c:1.52 Tue Jan 22 22:09:27 2019 +++ src/sys/dev/pci/ahcisata_pci.c Tue Jan 22 22:14:20 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ahcisata_pci.c,v 1.52 2019/01/22 22:09:27 jdolecek Exp $ */ +/* $NetBSD: ahcisata_pci.c,v 1.53 2019/01/22 22:14:20 jdolecek Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.52 2019/01/22 22:09:27 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.53 2019/01/22 22:14:20 jdolecek Exp $"); #ifdef _KERNEL_OPT #include "opt_ahcisata_pci.h" @@ -202,6 +202,8 @@ static const struct ahci_pci_quirk ahci_ AHCI_PCI_QUIRK_FORCE }, { PCI_VENDOR_INTEL, 82801JI_SATA_AHCI, AHCI_QUIRK_BADPMP }, + { PCI_VENDOR_AMD, HUDSON_SATA_AHCI, + AHCI_QUIRK_BADPMP }, }; struct ahci_pci_softc {
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jdolecek Date: Tue Jan 22 22:09:27 UTC 2019 Modified Files: src/sys/dev/pci: ahcisata_pci.c Log Message: add BADPMP quirk for Intel 82801JI SATA Controller (AHCI mode), which apparently has problem with the PMP reset part of PR kern/53307 - Christos machine To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pci/ahcisata_pci.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/ahcisata_pci.c diff -u src/sys/dev/pci/ahcisata_pci.c:1.51 src/sys/dev/pci/ahcisata_pci.c:1.52 --- src/sys/dev/pci/ahcisata_pci.c:1.51 Mon Jan 14 21:29:56 2019 +++ src/sys/dev/pci/ahcisata_pci.c Tue Jan 22 22:09:27 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ahcisata_pci.c,v 1.51 2019/01/14 21:29:56 jdolecek Exp $ */ +/* $NetBSD: ahcisata_pci.c,v 1.52 2019/01/22 22:09:27 jdolecek Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.51 2019/01/14 21:29:56 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.52 2019/01/22 22:09:27 jdolecek Exp $"); #ifdef _KERNEL_OPT #include "opt_ahcisata_pci.h" @@ -200,6 +200,8 @@ static const struct ahci_pci_quirk ahci_ AHCI_PCI_QUIRK_FORCE }, { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_HUDSON_SATA, AHCI_PCI_QUIRK_FORCE }, + { PCI_VENDOR_INTEL, 82801JI_SATA_AHCI, + AHCI_QUIRK_BADPMP }, }; struct ahci_pci_softc {
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Tue Jan 22 21:45:39 UTC 2019 Modified Files: src/sys/arch/arm/sunxi: sunxi_de2_ccu.c Log Message: Enable parent clocks and de-assert resets To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sunxi/sunxi_de2_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/sunxi_de2_ccu.c diff -u src/sys/arch/arm/sunxi/sunxi_de2_ccu.c:1.1 src/sys/arch/arm/sunxi/sunxi_de2_ccu.c:1.2 --- src/sys/arch/arm/sunxi/sunxi_de2_ccu.c:1.1 Tue Jan 22 20:17:36 2019 +++ src/sys/arch/arm/sunxi/sunxi_de2_ccu.c Tue Jan 22 21:45:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_de2_ccu.c,v 1.1 2019/01/22 20:17:36 jmcneill Exp $ */ +/* $NetBSD: sunxi_de2_ccu.c,v 1.2 2019/01/22 21:45:39 jmcneill Exp $ */ /*- * Copyright (c) 2019 Jared McNeill @@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: sunxi_de2_ccu.c,v 1.1 2019/01/22 20:17:36 jmcneill Exp $"); +__KERNEL_RCSID(1, "$NetBSD: sunxi_de2_ccu.c,v 1.2 2019/01/22 21:45:39 jmcneill Exp $"); #include #include @@ -103,19 +103,38 @@ sunxi_de2_ccu_attach(device_t parent, de { struct sunxi_ccu_softc * const sc = device_private(self); struct fdt_attach_args * const faa = aux; + const int phandle = faa->faa_phandle; const struct sunxi_de2_ccu_config *conf; + struct clk *clk_bus, *clk_mod; + struct fdtbus_reset *rst; sc->sc_dev = self; - sc->sc_phandle = faa->faa_phandle; + sc->sc_phandle = phandle; sc->sc_bst = faa->faa_bst; - conf = (void *)of_search_compatible(faa->faa_phandle, compat_data)->data; + conf = (void *)of_search_compatible(phandle, compat_data)->data; sc->sc_resets = conf->resets; sc->sc_nresets = conf->nresets; sc->sc_clks = conf->clks; sc->sc_nclks = conf->nclks; + clk_bus = fdtbus_clock_get(phandle, "bus"); + if (clk_bus == NULL || clk_enable(clk_bus) != 0) { + aprint_error(": couldn't enable bus clock\n"); + return; + } + clk_mod = fdtbus_clock_get(phandle, "mod"); + if (clk_mod == NULL || clk_enable(clk_mod) != 0) { + aprint_error(": couldn't enable mod clock\n"); + return; + } + rst = fdtbus_reset_get_index(phandle, 0); + if (rst == NULL || fdtbus_reset_deassert(rst) != 0) { + aprint_error(": couldn't de-assert reset\n"); + return; + } + if (sunxi_ccu_attach(sc) != 0) return;
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Tue Jan 22 21:38:08 UTC 2019 Modified Files: src/external/bsd/dhcpcd/dist/src: dhcpcd.c Log Message: Fix SMALLPROG build. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/external/bsd/dhcpcd/dist/src/dhcpcd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/src/dhcpcd.c diff -u src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.15 src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.16 --- src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.15 Tue Jan 22 15:20:21 2019 +++ src/external/bsd/dhcpcd/dist/src/dhcpcd.c Tue Jan 22 21:38:08 2019 @@ -765,7 +765,9 @@ dhcpcd_handlecarrier(struct dhcpcd_ctx * #ifdef NOCARRIER_PRESERVE_IP dhcpcd_drop(ifp, 0); #endif +#ifdef IPV4LL ipv4ll_reset(ifp); +#endif } } dhcpcd_initstate(ifp, 0);
CVS commit: [pgoyette-compat] src/sys/arch/amd64/conf
Module Name:src Committed By: pgoyette Date: Tue Jan 22 21:24:01 UTC 2019 Modified Files: src/sys/arch/amd64/conf [pgoyette-compat]: NOCOMPAT Log Message: Only explicitly disable COMPAT_15, it is the only compat option that is actually set. The others are "pulled in" by statements in sys/conf/files This avoids numerous noisy but unnecessary warnings from nbconfig. To generate a diff of this commit: cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/arch/amd64/conf/NOCOMPAT 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/NOCOMPAT diff -u src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.7 src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.8 --- src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.7 Tue Jan 22 12:02:05 2019 +++ src/sys/arch/amd64/conf/NOCOMPAT Tue Jan 22 21:24:01 2019 @@ -1,29 +1,33 @@ include "arch/amd64/conf/GENERIC" -#ident "NOCOMPAT-$Revision: 1.1.2.7 $" +#ident "NOCOMPAT-$Revision: 1.1.2.8 $" no options SYSVMSG # System V-like message queues no options SYSVSEM # System V-like semaphores no options SYSVSHM # System V-like memory sharing -no options COMPAT_43 -no options COMPAT_44 -no options COMPAT_BSDPTY -no options COMPAT_09 -no options COMPAT_10 -no options COMPAT_11 -no options COMPAT_12 -no options COMPAT_13 -no options COMPAT_14 +# We only to use ``no options COMPAT_15'' because only COMPAT_15 is +# explicitly enabled. (The others are pulled in by statements in +# sys/conf/files) + +#no options COMPAT_43 +#no options COMPAT_44 +#no options COMPAT_BSDPTY +#no options COMPAT_09 +#no options COMPAT_10 +#no options COMPAT_11 +#no options COMPAT_12 +#no options COMPAT_13 +#no options COMPAT_14 no options COMPAT_15 -no options COMPAT_16 -no options COMPAT_20 -no options COMPAT_30 -no options COMPAT_40 -no options COMPAT_50 -no options COMPAT_60 -no options COMPAT_70 -no options COMPAT_80 +#no options COMPAT_16 +#no options COMPAT_20 +#no options COMPAT_30 +#no options COMPAT_40 +#no options COMPAT_50 +#no options COMPAT_60 +#no options COMPAT_70 +#no options COMPAT_80 no options COMPAT_OSSAUDIO no options COMPAT_NETBSD32
CVS commit: xsrc/external/mit/xorg-server/dist
Module Name:xsrc Committed By: christos Date: Tue Jan 22 20:25:45 UTC 2019 Modified Files: xsrc/external/mit/xorg-server/dist/glx: glxscreens.h xsrc/external/mit/xorg-server/dist/include: glx_extinit.h Log Message: protect dup typedef. To generate a diff of this commit: cvs rdiff -u -r1.1.1.6 -r1.2 \ xsrc/external/mit/xorg-server/dist/glx/glxscreens.h cvs rdiff -u -r1.1.1.2 -r1.2 \ xsrc/external/mit/xorg-server/dist/include/glx_extinit.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/glx/glxscreens.h diff -u xsrc/external/mit/xorg-server/dist/glx/glxscreens.h:1.1.1.6 xsrc/external/mit/xorg-server/dist/glx/glxscreens.h:1.2 --- xsrc/external/mit/xorg-server/dist/glx/glxscreens.h:1.1.1.6 Mon Dec 31 04:36:08 2018 +++ xsrc/external/mit/xorg-server/dist/glx/glxscreens.h Tue Jan 22 15:25:45 2019 @@ -116,7 +116,10 @@ GLint glxConvertToXVisualType(int visual ** and DDX layers of the GLX server extension. The methods provide an ** interface for context management on a screen. */ +#ifndef __GLXscreen +#define __GLXscreen __GLXscreen typedef struct __GLXscreen __GLXscreen; +#endif struct __GLXscreen { void (*destroy) (__GLXscreen * screen); Index: xsrc/external/mit/xorg-server/dist/include/glx_extinit.h diff -u xsrc/external/mit/xorg-server/dist/include/glx_extinit.h:1.1.1.2 xsrc/external/mit/xorg-server/dist/include/glx_extinit.h:1.2 --- xsrc/external/mit/xorg-server/dist/include/glx_extinit.h:1.1.1.2 Mon Dec 31 04:36:08 2018 +++ xsrc/external/mit/xorg-server/dist/include/glx_extinit.h Tue Jan 22 15:25:45 2019 @@ -30,7 +30,10 @@ /* XXX this comment no longer makes sense i think */ #ifdef GLXEXT typedef struct __GLXprovider __GLXprovider; +#ifndef __GLXscreen +#define __GLXscreen __GLXscreen typedef struct __GLXscreen __GLXscreen; +#endif struct __GLXprovider { __GLXscreen *(*screenProbe) (ScreenPtr pScreen); const char *name;
CVS commit: src/sys/arch
Module Name:src Committed By: jmcneill Date: Tue Jan 22 20:17:36 UTC 2019 Modified Files: src/sys/arch/arm/sunxi: files.sunxi src/sys/arch/evbarm/conf: GENERIC64 Added Files: src/sys/arch/arm/sunxi: sunxi_de2.c sunxi_de2_ccu.c sunxi_de2_ccu.h Log Message: Add drivers for DE2 bus and clock controllers. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/arch/arm/sunxi/files.sunxi cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/sunxi/sunxi_de2.c \ src/sys/arch/arm/sunxi/sunxi_de2_ccu.c \ src/sys/arch/arm/sunxi/sunxi_de2_ccu.h cvs rdiff -u -r1.74 -r1.75 src/sys/arch/evbarm/conf/GENERIC64 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/files.sunxi diff -u src/sys/arch/arm/sunxi/files.sunxi:1.59 src/sys/arch/arm/sunxi/files.sunxi:1.60 --- src/sys/arch/arm/sunxi/files.sunxi:1.59 Thu Jan 3 14:44:21 2019 +++ src/sys/arch/arm/sunxi/files.sunxi Tue Jan 22 20:17:36 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.sunxi,v 1.59 2019/01/03 14:44:21 jmcneill Exp $ +# $NetBSD: files.sunxi,v 1.60 2019/01/22 20:17:36 jmcneill Exp $ # # Configuration info for Allwinner sunxi family SoCs # @@ -297,6 +297,16 @@ device sunxilradc attach sunxilradc at fdt with sunxi_lradc file arch/arm/sunxi/sunxi_lradc.c sunxi_lradc +# DE2 bus +device sunxide2bus { }: fdt, sunxi_sramc +attach sunxide2bus at fdt with sunxi_de2bus +file arch/arm/sunxi/sunxi_de2.c sunxi_de2bus + +# DE2 clocks +device sunxide2ccu: sunxi_ccu +attach sunxide2ccu at fdt with sunxi_de2ccu +file arch/arm/sunxi/sunxi_de2_ccu.c sunxi_de2ccu + # SOC parameters defflag opt_soc.h SOC_SUNXI defflag opt_soc.h SOC_SUNXI_MC Index: src/sys/arch/evbarm/conf/GENERIC64 diff -u src/sys/arch/evbarm/conf/GENERIC64:1.74 src/sys/arch/evbarm/conf/GENERIC64:1.75 --- src/sys/arch/evbarm/conf/GENERIC64:1.74 Tue Jan 22 16:36:07 2019 +++ src/sys/arch/evbarm/conf/GENERIC64 Tue Jan 22 20:17:36 2019 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC64,v 1.74 2019/01/22 16:36:07 jmcneill Exp $ +# $NetBSD: GENERIC64,v 1.75 2019/01/22 20:17:36 jmcneill Exp $ # # GENERIC ARM (aarch64) kernel # @@ -192,6 +192,7 @@ sun50ia64ccu* at fdt? pass 2 # Allwinne sun50ia64rccu* at fdt? pass 2 # Allwinner A64 CCU (PRCM) sun50ih6ccu* at fdt? pass 2 # Allwinner H6 CCU sun50ih6rccu* at fdt? pass 2 # Allwinner H6 CCU (PRCM) +sunxide2ccu* at fdt? pass 2 # Allwinner DE2 clock controller sunxiresets* at fdt? pass 1 # Allwinner misc. resets sunxigates* at fdt? pass 1 # Allwinner misc. gates sunxigmacclk* at fdt? pass 2 # Allwinner GMAC MII/RGMII clock mux @@ -379,6 +380,7 @@ pseudo-device wsfont # GPU #nouveau* at fdt? # NVIDIA GPU +sunxide2bus* at fdt? # Allwinner DE2 bus # Backlight pwmbacklight* at fdt? # PWM Backlight controls Added files: Index: src/sys/arch/arm/sunxi/sunxi_de2.c diff -u /dev/null src/sys/arch/arm/sunxi/sunxi_de2.c:1.1 --- /dev/null Tue Jan 22 20:17:36 2019 +++ src/sys/arch/arm/sunxi/sunxi_de2.c Tue Jan 22 20:17:36 2019 @@ -0,0 +1,72 @@ +/* $NetBSD: sunxi_de2.c,v 1.1 2019/01/22 20:17:36 jmcneill Exp $ */ + +/*- + * Copyright (c) 2019 Jared McNeill + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: sunxi_de2.c,v 1.1 2019/01/22 20:17:36 jmcneill Exp $"); + +#include +#include +#include +#include +#include + +#include + +#include + +static const char * compatible[] = { + "allwinner,sun50i-a64-de2", + NULL +}; + +static int +sunxi_de2_match(device_t parent, cfdata_t cf, void *aux) +{ + struct fdt_attach_args * const faa = aux; + + return of_match_compatible(faa->faa_phandle, compatible); +} + +static void
CVS commit: src/usr.bin/msgc
Module Name:src Committed By: martin Date: Tue Jan 22 18:39:49 UTC 2019 Modified Files: src/usr.bin/msgc: msg_sys.def Log Message: Support redrawing all windows when in a msg prompt via Ctrl-l. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/usr.bin/msgc/msg_sys.def 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/msgc/msg_sys.def diff -u src/usr.bin/msgc/msg_sys.def:1.42 src/usr.bin/msgc/msg_sys.def:1.43 --- src/usr.bin/msgc/msg_sys.def:1.42 Mon Jan 21 20:28:08 2019 +++ src/usr.bin/msgc/msg_sys.def Tue Jan 22 18:39:49 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_sys.def,v 1.42 2019/01/21 20:28:08 martin Exp $ */ +/* $NetBSD: msg_sys.def,v 1.43 2019/01/22 18:39:49 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -402,6 +402,10 @@ _msg_vprompt(const char *fmt, int flags, } else _msg_beep(); break; + case 'l' & 0x1f: + endwin(); + doupdate(); + break; case 'u' & 0x1f: /* ^U; line kill */ /* kill line */ len = pos = 0;
CVS commit: src/sys/dev/mii
Module Name:src Committed By: skrll Date: Tue Jan 22 17:41:06 UTC 2019 Modified Files: src/sys/dev/mii: micphy.c Log Message: Fix build after API change To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/mii/micphy.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/mii/micphy.c diff -u src/sys/dev/mii/micphy.c:1.4 src/sys/dev/mii/micphy.c:1.5 --- src/sys/dev/mii/micphy.c:1.4 Thu Jul 7 06:55:41 2016 +++ src/sys/dev/mii/micphy.c Tue Jan 22 17:41:06 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: micphy.c,v 1.4 2016/07/07 06:55:41 msaitoh Exp $ */ +/* $NetBSD: micphy.c,v 1.5 2019/01/22 17:41:06 skrll Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: micphy.c,v 1.4 2016/07/07 06:55:41 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: micphy.c,v 1.5 2019/01/22 17:41:06 skrll Exp $"); #include "opt_mii.h" @@ -136,9 +136,10 @@ micphyattach(device_t parent, device_t s micphy_fixup(sc, model, rev, parent); - sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask; + PHY_READ(sc, MII_BMSR, >mii_capabilities); + sc->mii_capabilities &= ma->mii_capmask; if (sc->mii_capabilities & BMSR_EXTSTAT) - sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR); + PHY_READ(sc, MII_EXTSR, >mii_extcapabilities); aprint_normal_dev(self, ""); if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0 && (sc->mii_extcapabilities & EXTSR_MEDIAMASK) == 0) @@ -152,7 +153,7 @@ static int micphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd) { struct ifmedia_entry *ife = mii->mii_media.ifm_cur; - int reg; + uint16_t reg; switch (cmd) { case MII_POLLSTAT: @@ -169,7 +170,7 @@ micphy_service(struct mii_softc *sc, str * isolate ourselves. */ if (IFM_INST(ife->ifm_media) != sc->mii_inst) { - reg = PHY_READ(sc, MII_BMCR); + PHY_READ(sc, MII_BMCR, ); PHY_WRITE(sc, MII_BMCR, reg | BMCR_ISO); return 0; } @@ -218,12 +219,12 @@ micphy_service(struct mii_softc *sc, str static void micphy_writexreg(struct mii_softc *sc, uint32_t reg, uint32_t wval) { - int rval __debugused; + uint16_t rval __debugused; PHY_WRITE(sc, XREG_CONTROL, XREG_CTL_SEL_WRITE | reg); PHY_WRITE(sc, XREG_WRITE, wval); PHY_WRITE(sc, XREG_CONTROL, XREG_CTL_SEL_READ | reg); - rval = PHY_READ(sc, XREG_READ); + PHY_READ(sc, XREG_READ, ); KDASSERT(wval == rval); }
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Tue Jan 22 16:36:07 UTC 2019 Modified Files: src/sys/arch/evbarm/conf: GENERIC64 Log Message: Add sunxisramc To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/arch/evbarm/conf/GENERIC64 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/evbarm/conf/GENERIC64 diff -u src/sys/arch/evbarm/conf/GENERIC64:1.73 src/sys/arch/evbarm/conf/GENERIC64:1.74 --- src/sys/arch/evbarm/conf/GENERIC64:1.73 Thu Jan 3 10:44:04 2019 +++ src/sys/arch/evbarm/conf/GENERIC64 Tue Jan 22 16:36:07 2019 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC64,v 1.73 2019/01/03 10:44:04 jmcneill Exp $ +# $NetBSD: GENERIC64,v 1.74 2019/01/22 16:36:07 jmcneill Exp $ # # GENERIC ARM (aarch64) kernel # @@ -138,6 +138,7 @@ gpioleds* at fdt? # System Controller syscon* at fdt? pass 1 # Generic System Controller +sunxisramc* at fdt? pass 1 # Allwinner System Control # Timer gtmr* at fdt? pass 1 # ARM Generic Timer
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Tue Jan 22 16:35:48 UTC 2019 Modified Files: src/sys/arch/arm/sunxi: sunxi_sramc.c Log Message: Add support for A64 and H6, and register self as a syscon To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sunxi/sunxi_sramc.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_sramc.c diff -u src/sys/arch/arm/sunxi/sunxi_sramc.c:1.1 src/sys/arch/arm/sunxi/sunxi_sramc.c:1.2 --- src/sys/arch/arm/sunxi/sunxi_sramc.c:1.1 Mon Oct 9 15:53:28 2017 +++ src/sys/arch/arm/sunxi/sunxi_sramc.c Tue Jan 22 16:35:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_sramc.c,v 1.1 2017/10/09 15:53:28 jmcneill Exp $ */ +/* $NetBSD: sunxi_sramc.c,v 1.2 2019/01/22 16:35:48 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_sramc.c,v 1.1 2017/10/09 15:53:28 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_sramc.c,v 1.2 2019/01/22 16:35:48 jmcneill Exp $"); #include #include @@ -35,13 +35,17 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_sramc. #include #include #include +#include #include +#include #include static const char * compatible[] = { "allwinner,sun4i-a10-sram-controller", + "allwinner,sun50i-a64-system-control", + "allwinner,sun50i-h6-system-control", NULL }; @@ -50,13 +54,18 @@ static const struct sunxi_sramc_area { const char *desc; bus_size_t reg; uint32_t mask; + u_intflags; +#define SUNXI_SRAMC_F_SWAP __BIT(0) } sunxi_sramc_areas[] = { { "allwinner,sun4i-a10-sram-a3-a4", "SRAM A3/A4", - 0x04, __BITS(5,4) }, + 0x04, __BITS(5,4), 0 }, { "allwinner,sun4i-a10-sram-d", "SRAM D", - 0x04, __BIT(0) } + 0x04, __BIT(0), 0 }, + { "allwinner,sun50i-a64-sram-c", + "SRAM C", + 0x04, __BIT(24), SUNXI_SRAMC_F_SWAP }, }; struct sunxi_sramc_node { @@ -70,6 +79,8 @@ struct sunxi_sramc_softc { intsc_phandle; bus_space_tag_t sc_bst; bus_space_handle_t sc_bsh; + kmutex_t sc_lock; + struct syscon sc_syscon; TAILQ_HEAD(, sunxi_sramc_node) sc_nodes; }; @@ -113,6 +124,42 @@ sunxi_sramc_init(struct sunxi_sramc_soft } } +static void +sunxi_sramc_lock(void *priv) +{ + struct sunxi_sramc_softc * const sc = priv; + + mutex_enter(>sc_lock); +} + +static void +sunxi_sramc_unlock(void *priv) +{ + struct sunxi_sramc_softc * const sc = priv; + + mutex_exit(>sc_lock); +} + +static uint32_t +sunxi_sramc_read_4(void *priv, bus_size_t reg) +{ + struct sunxi_sramc_softc * const sc = priv; + + KASSERT(mutex_owned(>sc_lock)); + + return SRAMC_READ(sc, reg); +} + +static void +sunxi_sramc_write_4(void *priv, bus_size_t reg, uint32_t val) +{ + struct sunxi_sramc_softc * const sc = priv; + + KASSERT(mutex_owned(>sc_lock)); + + SRAMC_WRITE(sc, reg, val); +} + static int sunxi_sramc_match(device_t parent, cfdata_t cf, void *aux) { @@ -142,6 +189,7 @@ sunxi_sramc_attach(device_t parent, devi aprint_error(": couldn't map registers\n"); return; } + mutex_init(>sc_lock, MUTEX_DEFAULT, IPL_VM); TAILQ_INIT(>sc_nodes); aprint_naive("\n"); @@ -151,6 +199,13 @@ sunxi_sramc_attach(device_t parent, devi KASSERT(sramc_softc == NULL); sramc_softc = sc; + + sc->sc_syscon.priv = sc; + sc->sc_syscon.lock = sunxi_sramc_lock; + sc->sc_syscon.unlock = sunxi_sramc_unlock; + sc->sc_syscon.read_4 = sunxi_sramc_read_4; + sc->sc_syscon.write_4 = sunxi_sramc_write_4; + fdtbus_register_syscon(self, phandle, >sc_syscon); } CFATTACH_DECL_NEW(sunxi_sramc, sizeof(struct sunxi_sramc_softc), @@ -170,6 +225,8 @@ sunxi_sramc_map(const int node_phandle, if (node->phandle == node_phandle) { if (config > __SHIFTOUT_MASK(node->area->mask)) return ERANGE; + if ((node->area->flags & SUNXI_SRAMC_F_SWAP) != 0) +config = !config; val = SRAMC_READ(sc, node->area->reg); val &= ~node->area->mask; val |= __SHIFTIN(config, node->area->mask);
CVS commit: src/doc
Module Name:src Committed By: jmcneill Date: Tue Jan 22 15:49:26 UTC 2019 Modified Files: src/doc: 3RDPARTY Log Message: dts updated to 4.20.3 To generate a diff of this commit: cvs rdiff -u -r1.1595 -r1.1596 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1595 src/doc/3RDPARTY:1.1596 --- src/doc/3RDPARTY:1.1595 Tue Jan 22 15:22:55 2019 +++ src/doc/3RDPARTY Tue Jan 22 15:49:26 2019 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1595 2019/01/22 15:22:55 roy Exp $ +# $NetBSD: 3RDPARTY,v 1.1596 2019/01/22 15:49:26 jmcneill Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1691,8 +1691,8 @@ Notes: external/gpl2/dtc/dtc2netbsd should be used to create directories to import Package: dts -Version: 4.18-rc2 -Current Vers: 4.19 +Version: 4.20.3 +Current Vers: 4.20.3 Maintainer: https://www.kernel.org/ Archive Site: https://cdn.kernel.org/pub/linux/kernel/v4.x/ Home Page: https://www.kernel.org/
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Tue Jan 22 15:34:04 UTC 2019 Modified Files: src/sys/dev/ic: lan9118.c Log Message: Fix return type of lan9118_mii_readreg To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/ic/lan9118.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/lan9118.c diff -u src/sys/dev/ic/lan9118.c:1.28 src/sys/dev/ic/lan9118.c:1.29 --- src/sys/dev/ic/lan9118.c:1.28 Tue Jan 22 03:42:26 2019 +++ src/sys/dev/ic/lan9118.c Tue Jan 22 15:34:04 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: lan9118.c,v 1.28 2019/01/22 03:42:26 msaitoh Exp $ */ +/* $NetBSD: lan9118.c,v 1.29 2019/01/22 15:34:04 jmcneill Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: lan9118.c,v 1.28 2019/01/22 03:42:26 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lan9118.c,v 1.29 2019/01/22 15:34:04 jmcneill Exp $"); /* * The LAN9118 Family @@ -794,7 +794,7 @@ lan9118_miibus_statchg(struct ifnet *ifp } -static uint16_t +static int lan9118_mii_readreg(struct lan9118_softc *sc, int phy, int reg, uint16_t *val) { uint32_t acc;
CVS commit: src/sys/arch/arm/dts
Module Name:src Committed By: jmcneill Date: Tue Jan 22 15:30:57 UTC 2019 Modified Files: src/sys/arch/arm/dts: socfpga_cyclone5_de0_nano_soc.dts Log Message: Update for 4.20.3 dts changes To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/sys/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts 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/dts/socfpga_cyclone5_de0_nano_soc.dts diff -u src/sys/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts:1.1 src/sys/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts:1.2 --- src/sys/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts:1.1 Sat Jan 5 13:55:46 2019 +++ src/sys/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts Tue Jan 22 15:30:57 2019 @@ -1,6 +1,6 @@ -#include "../../../external/gpl2/dts/dist/arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts" +#include "../../../external/gpl2/dts/dist/arch/arm/boot/dts/socfpga_cyclone5_de0_nano_soc.dts" / { soc {
CVS commit: src/sys/arch/arm/dts
Module Name:src Committed By: jmcneill Date: Tue Jan 22 15:28:45 UTC 2019 Modified Files: src/sys/arch/arm/dts: sun50i-a64-pinebook.dts sun50i-a64.dtsi Log Message: Update for 4.20.3 dts changes To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/dts/sun50i-a64-pinebook.dts cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/dts/sun50i-a64.dtsi 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/dts/sun50i-a64-pinebook.dts diff -u src/sys/arch/arm/dts/sun50i-a64-pinebook.dts:1.13 src/sys/arch/arm/dts/sun50i-a64-pinebook.dts:1.14 --- src/sys/arch/arm/dts/sun50i-a64-pinebook.dts:1.13 Sun Nov 11 11:44:53 2018 +++ src/sys/arch/arm/dts/sun50i-a64-pinebook.dts Tue Jan 22 15:28:45 2019 @@ -1,7 +1,7 @@ -/* $NetBSD: sun50i-a64-pinebook.dts,v 1.13 2018/11/11 11:44:53 mrg Exp $ */ +/* $NetBSD: sun50i-a64-pinebook.dts,v 1.14 2019/01/22 15:28:45 jmcneill Exp $ */ /*- - * Copyright (c) 2017 Jared McNeill + * Copyright (c) 2017-2019 Jared McNeill * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,9 +26,7 @@ * SUCH DAMAGE. */ -/dts-v1/; - -#include "../../../external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi" +#include "../../../external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts" #include "sun50i-a64.dtsi" #include @@ -37,48 +35,22 @@ #include / { - model = "Pine64 Pinebook"; - compatible = "pine64,pinebook", "allwinner,sun50i-a64"; - - aliases { - serial0 = - }; - chosen { - stdout-path = "serial0:115200n8"; - framebuffer@0 { allwinner,pipeline = "mixer0-lcd0"; }; }; gpio_keys { - compatible = "gpio-keys"; - lid_switch { - label = "Lid Switch"; + /* + * This is listed as PL12 in 4.20.3 sources, but + * we have used PH10 all along. + */ gpios = < 7 10 GPIO_ACTIVE_LOW>; /* PH10 */ - linux,input-type = ; - linux,code = ; - linux,can-disable; }; }; - backlight: backlight { - compatible = "pwm-backlight"; - pwms = < 0 5 0>; - brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; - default-brightness-level = <3>; - enable-gpios = < 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */ - }; - - reg_vcc3v3: vcc3v3 { - regulator-fixed; - regulator-name = "vcc3v3"; - regulator-min-microvolt = <330>; - regulator-max-microvolt = <330>; - }; - sound_spdif { status = "disabled"; }; @@ -101,22 +73,6 @@ status = "disabled"; }; - { - status = "okay"; -}; - - { - status = "okay"; -}; - - { - status = "okay"; -}; - - { - status = "okay"; -}; - { pinctrl-names = "default"; pinctrl-0 = <_pins>, <_rts_cts_pins>; @@ -130,74 +86,6 @@ }; }; -_otg { - dr_mode = "host"; - status = "okay"; -}; - - { - status = "okay"; -}; - - { - pinctrl-names = "default"; - pinctrl-0 = <_pins>; - vmmc-supply = <_vcc3v3>; - cd-gpios = < 5 6 GPIO_ACTIVE_LOW>; - disable-wp; - bus-width = <4>; - status = "okay"; -}; - - { - pinctrl-names = "default"; - pinctrl-0 = <_pins>; - vmmc-supply = <_dldo4>; - vqmmc-supply = <_eldo1>; - bus-width = <4>; - non-removable; - status = "okay"; - - rtl8723cs: wifi@1 { - reg = <1>; - }; -}; - - { - pinctrl-names = "default"; - pinctrl-0 = <_pins>; - vmmc-supply = <_dcdc1>; - bus-width = <8>; - non-removable; - cap-mmc-hw-reset; - status = "okay"; -}; - - { - pinctrl-names = "default"; - pinctrl-0 = <_pins_a>; - status = "okay"; -}; - - { - pinctrl-names = "default"; - pinctrl-0 = <_pins>; - status = "okay"; -}; - -_rsb { - status = "okay"; - - axp803: pmic@3a3 { - compatible = "x-powers,axp803"; - reg = <0x3a3>; - interrupt-parent = <_intc>; - interrupts = <0 IRQ_TYPE_LEVEL_LOW>; - }; -}; - -#include "axp803.dtsi" - { allwinner,pa-gpios = < 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ status = "okay"; Index: src/sys/arch/arm/dts/sun50i-a64.dtsi diff -u src/sys/arch/arm/dts/sun50i-a64.dtsi:1.9 src/sys/arch/arm/dts/sun50i-a64.dtsi:1.10 --- src/sys/arch/arm/dts/sun50i-a64.dtsi:1.9 Fri May 11 00:00:04 2018 +++ src/sys/arch/arm/dts/sun50i-a64.dtsi Tue Jan 22 15:28:45 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sun50i-a64.dtsi,v 1.9 2018/05/11 00:00:04 jmcneill Exp $ */ +/* $NetBSD: sun50i-a64.dtsi,v 1.10 2019/01/22 15:28:45 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -63,14 +63,6 @@ }; soc { - pwm: pwm@1c21400 { - compatible = "allwinner,sun50i-a64-pwm"; - reg = <0x01c21400 0x8>; - clocks = <>; - #pwm-cells = <3>; - status = "disabled"; - }; - dai: dai@1c22c00 { #sound-dai-cells = <0>; compatible = "allwinner,sun50i-a64-acodec-i2s"; @@ -116,10 +108,3 @@ { clocks = < 1>; /* 1=CLK_PLL_CPUX */ }; - - { - pwm0_pins: pwm0 { - pins = "PD22"; - function = "pwm"; - }; -};
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Tue Jan 22 15:20:21 UTC 2019 Modified Files: src/external/bsd/dhcpcd/dist/src: bpf.c dhcp.c dhcp6.c dhcpcd.c if-bsd.c if-options.c ipv6nd.c Log Message: Sync To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/bsd/dhcpcd/dist/src/bpf.c cvs rdiff -u -r1.14 -r1.15 src/external/bsd/dhcpcd/dist/src/dhcp.c \ src/external/bsd/dhcpcd/dist/src/dhcpcd.c cvs rdiff -u -r1.2 -r1.3 src/external/bsd/dhcpcd/dist/src/dhcp6.c \ src/external/bsd/dhcpcd/dist/src/if-bsd.c \ src/external/bsd/dhcpcd/dist/src/ipv6nd.c cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/src/if-options.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/src/bpf.c diff -u src/external/bsd/dhcpcd/dist/src/bpf.c:1.7 src/external/bsd/dhcpcd/dist/src/bpf.c:1.8 --- src/external/bsd/dhcpcd/dist/src/bpf.c:1.7 Sat Jun 2 09:44:27 2018 +++ src/external/bsd/dhcpcd/dist/src/bpf.c Tue Jan 22 15:20:21 2019 @@ -1,6 +1,6 @@ /* * dhcpcd: BPF arp and bootp filtering - * Copyright (c) 2006-2018 Roy Marples + * Copyright (c) 2006-2019 Roy Marples * All rights reserved * Redistribution and use in source and binary forms, with or without Index: src/external/bsd/dhcpcd/dist/src/dhcp.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.14 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.15 --- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.14 Sun Nov 4 16:30:28 2018 +++ src/external/bsd/dhcpcd/dist/src/dhcp.c Tue Jan 22 15:20:21 2019 @@ -1,6 +1,6 @@ /* * dhcpcd - DHCP client daemon - * Copyright (c) 2006-2018 Roy Marples + * Copyright (c) 2006-2019 Roy Marples * All rights reserved * Redistribution and use in source and binary forms, with or without @@ -1604,11 +1604,6 @@ dhcp_openudp(struct interface *ifp) n = 1; if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, , sizeof(n)) == -1) goto eexit; -#ifdef SO_RERROR - n = 1; - if (setsockopt(s, SOL_SOCKET, SO_RERROR, , sizeof(n)) == -1) - goto eexit; -#endif memset(, 0, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_port = htons(BOOTPC); @@ -2636,6 +2631,7 @@ dhcp_reboot(struct interface *ifp) * interface gets the reply. */ ia = ipv4_iffindaddr(ifp, >lease.addr, NULL); if (ia != NULL && + !(ifp->ctx->options & DHCPCD_TEST) && #ifdef IN_IFF_NOTUSEABLE !(ia->addr_flags & IN_IFF_NOTUSEABLE) && #endif Index: src/external/bsd/dhcpcd/dist/src/dhcpcd.c diff -u src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.14 src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.15 --- src/external/bsd/dhcpcd/dist/src/dhcpcd.c:1.14 Mon Aug 27 13:43:05 2018 +++ src/external/bsd/dhcpcd/dist/src/dhcpcd.c Tue Jan 22 15:20:21 2019 @@ -1,6 +1,6 @@ /* * dhcpcd - DHCP client daemon - * Copyright (c) 2006-2018 Roy Marples + * Copyright (c) 2006-2019 Roy Marples * All rights reserved * Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ * SUCH DAMAGE. */ -const char dhcpcd_copyright[] = "Copyright (c) 2006-2018 Roy Marples"; +const char dhcpcd_copyright[] = "Copyright (c) 2006-2019 Roy Marples"; #include #include @@ -314,13 +314,6 @@ dhcpcd_daemonise(struct dhcpcd_ctx *ctx) return 0; } - /* Store the pid and routing message seq number so we can identify - * the last message successfully sent to the kernel. - * This allows us to ignore all messages we sent after forking - * and detaching. */ - ctx->ppid = getpid(); - ctx->pseq = ctx->sseq; - switch (pid = fork()) { case -1: logerr("%s: fork", __func__); @@ -451,6 +444,10 @@ configure_interface1(struct interface *i ifo->options &= ~(DHCPCD_IPV6RS | DHCPCD_DHCP6 | DHCPCD_WAITIP6); + if (!(ifo->options & DHCPCD_IPV6RS)) + ifo->options &= + ~(DHCPCD_IPV6RA_AUTOCONF | DHCPCD_IPV6RA_REQRDNSS); + /* We want to setup INET6 on the interface as soon as possible. */ if (ifp->active == IF_ACTIVE_USER && ifo->options & DHCPCD_IPV6 && @@ -738,6 +735,7 @@ dhcpcd_handlecarrier(struct dhcpcd_ctx * #endif dhcp_abort(ifp); ipv6nd_expire(ifp, 0); + dhcp6_abort(ifp); #else dhcpcd_drop(ifp, 0); #endif @@ -754,19 +752,21 @@ dhcpcd_handlecarrier(struct dhcpcd_ctx * #endif if (ifp->wireless) { uint8_t ossid[IF_SSIDLEN]; -#ifdef NOCARRIER_PRESERVE_IP size_t olen; olen = ifp->ssid_len; -#endif memcpy(ossid, ifp->ssid, ifp->ssid_len); if_getssid(ifp); -#ifdef NOCARRIER_PRESERVE_IP + /* If we changed SSID network, drop leases */ if (ifp->ssid_len != olen || memcmp(ifp->ssid, ossid, ifp->ssid_len)) +{ +#ifdef NOCARRIER_PRESERVE_IP dhcpcd_drop(ifp, 0); #endif + ipv4ll_reset(ifp); +} } dhcpcd_initstate(ifp, 0); script_runreason(ifp, "CARRIER"); Index: src/external/bsd/dhcpcd/dist/src/dhcp6.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.2 src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.3
CVS commit: src/doc
Module Name:src Committed By: roy Date: Tue Jan 22 15:22:55 UTC 2019 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note import of dhcpcd-7.1.0 To generate a diff of this commit: cvs rdiff -u -r1.1594 -r1.1595 src/doc/3RDPARTY cvs rdiff -u -r1.2492 -r1.2493 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1594 src/doc/3RDPARTY:1.1595 --- src/doc/3RDPARTY:1.1594 Mon Jan 21 01:02:50 2019 +++ src/doc/3RDPARTY Tue Jan 22 15:22:55 2019 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1594 2019/01/21 01:02:50 alnsn Exp $ +# $NetBSD: 3RDPARTY,v 1.1595 2019/01/22 15:22:55 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -341,8 +341,8 @@ Notes: Use the dhcp2netbsd script. Package: dhcpcd -Version: 7.0.8 -Current Vers: 7.0.8 +Version: 7.1.0 +Current Vers: 7.1.0 Maintainer: roy Archive Site: ftp://roy.marples.name/pub/dhcpcd/ Home Page: http://roy.marples.name/projects/dhcpcd/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2492 src/doc/CHANGES:1.2493 --- src/doc/CHANGES:1.2492 Sat Jan 19 21:36:09 2019 +++ src/doc/CHANGES Tue Jan 22 15:22:55 2019 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2492 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2493 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -312,3 +312,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0: NETMAP algorithm for static NAT, lock-free lookup for 'ipset' tables, lock-free state lookup, incremental state G/C, etc). [rmind 20190119] + dhcpcd: Import dhcpcd-7.1.0 (roy 20190122)
CVS commit: src/sys/arch/arm/fdt
Module Name:src Committed By: jmcneill Date: Tue Jan 22 15:17:33 UTC 2019 Modified Files: src/sys/arch/arm/fdt: a9tmr_fdt.c Log Message: Listen for PMFE_SPEED_CHANGED events and automatically update a9tmr frequency To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/fdt/a9tmr_fdt.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/fdt/a9tmr_fdt.c diff -u src/sys/arch/arm/fdt/a9tmr_fdt.c:1.2 src/sys/arch/arm/fdt/a9tmr_fdt.c:1.3 --- src/sys/arch/arm/fdt/a9tmr_fdt.c:1.2 Sat Jan 19 20:56:03 2019 +++ src/sys/arch/arm/fdt/a9tmr_fdt.c Tue Jan 22 15:17:33 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: a9tmr_fdt.c,v 1.2 2019/01/19 20:56:03 jmcneill Exp $ */ +/* $NetBSD: a9tmr_fdt.c,v 1.3 2019/01/22 15:17:33 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: a9tmr_fdt.c,v 1.2 2019/01/19 20:56:03 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: a9tmr_fdt.c,v 1.3 2019/01/22 15:17:33 jmcneill Exp $"); #include #include @@ -48,8 +48,15 @@ static int a9tmr_fdt_match(device_t, cfd static void a9tmr_fdt_attach(device_t, device_t, void *); static void a9tmr_fdt_cpu_hatch(void *, struct cpu_info *); +static void a9tmr_fdt_speed_changed(device_t); -CFATTACH_DECL_NEW(a9tmr_fdt, 0, a9tmr_fdt_match, a9tmr_fdt_attach, NULL, NULL); +struct a9tmr_fdt_softc { + device_t sc_dev; + struct clk *sc_clk; +}; + +CFATTACH_DECL_NEW(a9tmr_fdt, sizeof(struct a9tmr_fdt_softc), +a9tmr_fdt_match, a9tmr_fdt_attach, NULL, NULL); static int a9tmr_fdt_match(device_t parent, cfdata_t cf, void *aux) @@ -67,21 +74,23 @@ a9tmr_fdt_match(device_t parent, cfdata_ static void a9tmr_fdt_attach(device_t parent, device_t self, void *aux) { + struct a9tmr_fdt_softc * const sc = device_private(self); struct fdt_attach_args * const faa = aux; const int phandle = faa->faa_phandle; bus_space_handle_t bsh; - struct clk *clk = fdtbus_clock_get_index(phandle, 0); - if (clk == NULL) { + sc->sc_dev = self; + sc->sc_clk = fdtbus_clock_get_index(phandle, 0); + if (sc->sc_clk == NULL) { aprint_error(": couldn't get clock\n"); return; } - if (clk_enable(clk) != 0) { + if (clk_enable(sc->sc_clk) != 0) { aprint_error(": couldn't enable clock\n"); return; } - uint32_t rate = clk_get_rate(clk); + uint32_t rate = clk_get_rate(sc->sc_clk); prop_dictionary_t dict = device_properties(self); prop_dictionary_set_uint32(dict, "frequency", rate); @@ -124,6 +133,8 @@ a9tmr_fdt_attach(device_t parent, device arm_fdt_cpu_hatch_register(self, a9tmr_fdt_cpu_hatch); arm_fdt_timer_register(a9tmr_cpu_initclocks); + + pmf_event_register(self, PMFE_SPEED_CHANGED, a9tmr_fdt_speed_changed, true); } static void @@ -131,3 +142,16 @@ a9tmr_fdt_cpu_hatch(void *priv, struct c { a9tmr_init_cpu_clock(ci); } + +static void +a9tmr_fdt_speed_changed(device_t dev) +{ + struct a9tmr_fdt_softc * const sc = device_private(dev); + prop_dictionary_t dict = device_properties(dev); + uint32_t rate; + + rate = clk_get_rate(sc->sc_clk); + prop_dictionary_set_uint32(dict, "frequency", rate); + + a9tmr_update_freq(rate); +}
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Tue Jan 22 15:16:26 UTC 2019 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv24123 Log Message: Import dhcpcd-7.1.0 with the following changes: * NetBSD: sets SO_RERROR on to detect receive socket overflow * BSD: route improvements to avoid listening for own changes * IP6: implement IP6 address sharing * BSD: catch UP/DOWN events when interfaces does support media changes * IPv4LL: remember old address when carrier is lost Status: Vendor Tag: roy Release Tags: dhcpcd-7-1-0 U src/external/bsd/dhcpcd/dist/.gitignore U src/external/bsd/dhcpcd/dist/BUILDING.md U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/Makefile U src/external/bsd/dhcpcd/dist/Makefile.inc U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/config-null.mk U src/external/bsd/dhcpcd/dist/configure U src/external/bsd/dhcpcd/dist/iconfig.mk U src/external/bsd/dhcpcd/dist/compat/_strtoi.h U src/external/bsd/dhcpcd/dist/compat/arc4random.c U src/external/bsd/dhcpcd/dist/compat/arc4random.h U src/external/bsd/dhcpcd/dist/compat/bitops.h U src/external/bsd/dhcpcd/dist/compat/queue.h U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.c U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.h U src/external/bsd/dhcpcd/dist/compat/reallocarray.c U src/external/bsd/dhcpcd/dist/compat/dprintf.c U src/external/bsd/dhcpcd/dist/compat/dprintf.h U src/external/bsd/dhcpcd/dist/compat/endian.h U src/external/bsd/dhcpcd/dist/compat/pidfile.c U src/external/bsd/dhcpcd/dist/compat/pidfile.h U src/external/bsd/dhcpcd/dist/compat/reallocarray.h U src/external/bsd/dhcpcd/dist/compat/strlcpy.c U src/external/bsd/dhcpcd/dist/compat/strlcpy.h U src/external/bsd/dhcpcd/dist/compat/strtoi.c U src/external/bsd/dhcpcd/dist/compat/strtoi.h U src/external/bsd/dhcpcd/dist/compat/strtou.c U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.c U src/external/bsd/dhcpcd/dist/compat/crypt/hmac.h U src/external/bsd/dhcpcd/dist/compat/crypt/md5.c U src/external/bsd/dhcpcd/dist/compat/crypt/md5.h U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.c U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.h C src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/GNUmakefile U src/external/bsd/dhcpcd/dist/src/Makefile U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/auth.c U src/external/bsd/dhcpcd/dist/src/auth.h C src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.c U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/dev.c U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/dhcp.h C src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in U src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions-small.conf U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions.conf U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in C src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/src/genembedc U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/if-linux-wext.c U src/external/bsd/dhcpcd/dist/src/genembedh C src/external/bsd/dhcpcd/dist/src/if-bsd.c U src/external/bsd/dhcpcd/dist/src/if-linux.c C src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/if-sun.c U src/external/bsd/dhcpcd/dist/src/if.c U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/ipv4.c U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.c U src/external/bsd/dhcpcd/dist/src/ipv6.h C src/external/bsd/dhcpcd/dist/src/ipv6nd.c U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/dev/Makefile U
CVS commit: src/sys/external/gpl2/dts/dist
Module Name:src Committed By: jmcneill Date: Tue Jan 22 15:13:23 UTC 2019 Modified Files: src/sys/external/gpl2/dts/dist/arch/arm/boot/dts: bcm283x.dtsi src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner: sun50i-h6-pine-h64.dts sun50i-h6.dtsi src/sys/external/gpl2/dts/dist/include/dt-bindings/input: linux-event-codes.h Removed Files: src/sys/external/gpl2/dts/dist/arch/arm/boot/dts: exynos4412-tmu-sensor-conf.dtsi exynos5420-tmu-sensor-conf.dtsi mt7623n-rfb-nand.dts mt7623n-rfb.dtsi socfpga_cyclone5_de0_sockit.dts tegra20-colibri-512.dtsi tegra20-iris-512.dts src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/exynos: exynos5433-tmu-g3d-sensor-conf.dtsi exynos5433-tmu-sensor-conf.dtsi exynos7-tmu-sensor-conf.dtsi src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/xilinx: zynqmp-ep108-clk.dtsi zynqmp-ep108.dts src/sys/external/gpl2/dts/dist/include/dt-bindings/clock: exynos5440.h Log Message: Merge conflicts. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/sys/external/gpl2/dts/dist/arch/arm/boot/dts/bcm283x.dtsi cvs rdiff -u -r1.1.1.2 -r0 \ src/sys/external/gpl2/dts/dist/arch/arm/boot/dts/exynos4412-tmu-sensor-conf.dtsi \ src/sys/external/gpl2/dts/dist/arch/arm/boot/dts/exynos5420-tmu-sensor-conf.dtsi \ src/sys/external/gpl2/dts/dist/arch/arm/boot/dts/mt7623n-rfb.dtsi \ src/sys/external/gpl2/dts/dist/arch/arm/boot/dts/tegra20-iris-512.dts cvs rdiff -u -r1.1.1.3 -r0 \ src/sys/external/gpl2/dts/dist/arch/arm/boot/dts/mt7623n-rfb-nand.dts \ src/sys/external/gpl2/dts/dist/arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts \ src/sys/external/gpl2/dts/dist/arch/arm/boot/dts/tegra20-colibri-512.dtsi cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi cvs rdiff -u -r1.1.1.2 -r0 \ src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/exynos/exynos5433-tmu-g3d-sensor-conf.dtsi \ src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/exynos/exynos5433-tmu-sensor-conf.dtsi \ src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/exynos/exynos7-tmu-sensor-conf.dtsi cvs rdiff -u -r1.1.1.3 -r0 \ src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/xilinx/zynqmp-ep108-clk.dtsi \ src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts cvs rdiff -u -r1.1.1.1 -r0 \ src/sys/external/gpl2/dts/dist/include/dt-bindings/clock/exynos5440.h cvs rdiff -u -r1.6 -r1.7 \ src/sys/external/gpl2/dts/dist/include/dt-bindings/input/linux-event-codes.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/external/gpl2/dts/dist/arch/arm/boot/dts/bcm283x.dtsi diff -u src/sys/external/gpl2/dts/dist/arch/arm/boot/dts/bcm283x.dtsi:1.5 src/sys/external/gpl2/dts/dist/arch/arm/boot/dts/bcm283x.dtsi:1.6 --- src/sys/external/gpl2/dts/dist/arch/arm/boot/dts/bcm283x.dtsi:1.5 Wed Aug 22 13:16:41 2018 +++ src/sys/external/gpl2/dts/dist/arch/arm/boot/dts/bcm283x.dtsi Tue Jan 22 15:13:22 2019 @@ -66,6 +66,12 @@ clock-frequency = <100>; }; + txp@7e004000 { + compatible = "brcm,bcm2835-txp"; + reg = <0x7e004000 0x20>; + interrupts = <1 11>; + }; + dma: dma@7e007000 { compatible = "brcm,bcm2835-dma"; reg = <0x7e007000 0xf00>; Index: src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts diff -u src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts:1.3 src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts:1.4 --- src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts:1.3 Wed Jun 27 16:32:14 2018 +++ src/sys/external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts Tue Jan 22 15:13:22 2019 @@ -23,6 +23,25 @@ stdout-path = "serial0:115200n8"; }; + leds { + compatible = "gpio-leds"; + + heartbeat { + label = "pine-h64:green:heartbeat"; + gpios = <_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */ + }; + + link { + label = "pine-h64:white:link"; + gpios = <_pio 0 3 GPIO_ACTIVE_HIGH>; /* PL3 */ + }; + + status { + label = "pine-h64:blue:status"; + gpios = <_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */ + }; + }; + reg_gmac_3v3: gmac-3v3 { compatible = "regulator-fixed"; regulator-name = "vcc-gmac-3v3"; @@ -33,20 +52,6 @@ enable-active-high; }; - reg_vcc3v3: vcc3v3 { - compatible = "regulator-fixed"; - regulator-name = "vcc3v3"; - regulator-min-microvolt = <330>; - regulator-max-microvolt = <330>; - }; - - reg_vcc1v8: vcc1v8 { - compatible = "regulator-fixed"; - regulator-name = "vcc1v8"; - regulator-min-microvolt =
CVS commit: src/sys
Module Name:src Committed By: skrll Date: Tue Jan 22 15:02:34 UTC 2019 Modified Files: src/sys/dev/usb: uhci.c xhci.c src/sys/external/bsd/dwc2: dwc2.c Log Message: Revert the KASSERT To generate a diff of this commit: cvs rdiff -u -r1.285 -r1.286 src/sys/dev/usb/uhci.c cvs rdiff -u -r1.104 -r1.105 src/sys/dev/usb/xhci.c cvs rdiff -u -r1.56 -r1.57 src/sys/external/bsd/dwc2/dwc2.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/usb/uhci.c diff -u src/sys/dev/usb/uhci.c:1.285 src/sys/dev/usb/uhci.c:1.286 --- src/sys/dev/usb/uhci.c:1.285 Tue Jan 22 06:42:33 2019 +++ src/sys/dev/usb/uhci.c Tue Jan 22 15:02:33 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.285 2019/01/22 06:42:33 skrll Exp $ */ +/* $NetBSD: uhci.c,v 1.286 2019/01/22 15:02:33 skrll Exp $ */ /* * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.285 2019/01/22 06:42:33 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.286 2019/01/22 15:02:33 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1740,7 +1740,6 @@ uhci_timeout_task(void *addr) DPRINTF("xfer=%#jx", (uintptr_t)xfer, 0, 0, 0); mutex_enter(>sc_lock); - KASSERT(xfer->ux_status == USBD_TIMEOUT); uhci_abort_xfer(xfer, USBD_TIMEOUT); mutex_exit(>sc_lock); } Index: src/sys/dev/usb/xhci.c diff -u src/sys/dev/usb/xhci.c:1.104 src/sys/dev/usb/xhci.c:1.105 --- src/sys/dev/usb/xhci.c:1.104 Tue Jan 22 06:42:33 2019 +++ src/sys/dev/usb/xhci.c Tue Jan 22 15:02:33 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.104 2019/01/22 06:42:33 skrll Exp $ */ +/* $NetBSD: xhci.c,v 1.105 2019/01/22 15:02:33 skrll Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.104 2019/01/22 06:42:33 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.105 2019/01/22 15:02:33 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -4180,7 +4180,6 @@ xhci_timeout_task(void *addr) struct xhci_softc * const sc = XHCI_XFER2SC(xfer); mutex_enter(>sc_lock); - KASSERT(xfer->ux_status == USBD_TIMEOUT); xhci_abort_xfer(xfer, USBD_TIMEOUT); mutex_exit(>sc_lock); } Index: src/sys/external/bsd/dwc2/dwc2.c diff -u src/sys/external/bsd/dwc2/dwc2.c:1.56 src/sys/external/bsd/dwc2/dwc2.c:1.57 --- src/sys/external/bsd/dwc2/dwc2.c:1.56 Tue Jan 22 06:42:33 2019 +++ src/sys/external/bsd/dwc2/dwc2.c Tue Jan 22 15:02:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc2.c,v 1.56 2019/01/22 06:42:33 skrll Exp $ */ +/* $NetBSD: dwc2.c,v 1.57 2019/01/22 15:02:34 skrll Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.56 2019/01/22 06:42:33 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.57 2019/01/22 15:02:34 skrll Exp $"); #include "opt_usb.h" @@ -341,7 +341,6 @@ dwc2_timeout_task(void *addr) DPRINTF("xfer=%p\n", xfer); mutex_enter(>sc_lock); - KASSERT(xfer->ux_status == USBD_TIMEOUT); dwc2_abort_xfer(xfer, USBD_TIMEOUT); mutex_exit(>sc_lock); }
CVS commit: src/tests/bin/sh
Module Name:src Committed By: kre Date: Tue Jan 22 14:31:53 UTC 2019 Modified Files: src/tests/bin/sh: t_here.sh Log Message: Add sub tests to the quoting test case, to demonstrate a parsing bug (and its fix (depending upon whether the test is run against an unfixed, or fixed, shell). An obvious indication of the failure is the following (one of the new sub-tests) p=A cat&2 "[$TEST_NUM] Expected output '$2', received '$result'" @@ -473,6 +476,42 @@ quoting_body() { EOF ' '5string1 line1?-line2string1 -line2 ""'\'\'' string1 6' 0 + # check that \ only quotes the magic chars, otherwise is retained + check 'p=A; cat <<-EOF + ${p+\%$p\%} + ${p+%$p%} + EOF + ' '\%A\% %A%' 0 + + # and check that " is not magic, so \ does not quote it + check 'p=A; cat <<-EOF + ${p+\"$p\"} + ${p+"$p"} + EOF + ' '\"A\" "A"' 0 + + # except in a ${var%} word, base syntax reapplies, and + # there quotes are magic again + check 'p=ABCD; cat <<-EOF + ${p%B?D} + ${p%B\?D} + ${p%"BCD"} + "${p%??}" + ${p#"${p%??}"} + "${p#"${p%?"?"}"}" + EOF + ' 'A ABCD A "AB" CD ""' 0 + + check 'p=AB??; cat <<-EOF + ${p%B?D} + ${p%B\??} + ${p%"B??"} + "${p%??}" + ${p#"${p%??}"} + "${p#"${p%?"?"}"}" + EOF + ' 'AB?? A A "AB" ?? "??"' 0 + results }
CVS commit: src/bin/sh
Module Name:src Committed By: kre Date: Tue Jan 22 14:32:17 UTC 2019 Modified Files: src/bin/sh: parser.c Log Message: lexical analysis fixes. This fixes the tests just committed in src/tests/bin/sh/t_here.sh The "magicq" magic was all wrong - it cannot be simply a parameter to readtoken1() as its value needs to alter during that routine (eg: when magicq is set - processing here doc text, or whatever) and we encountered ${var%pattern} "magicq" needs to be off for "pattern" - and it wasn't. To handle this magicq needs to be included in the token stack struct, and simply init'd from the arg to readtoken1 (which we rename). Then it can be manipulated as required. Once we no longer have that problem, some other issues can be cleaned up as well (some of this unbelievably fragile code was attempting to cope with this in various ad-hoc - and mostly broken - ways). Also, remove the magicq parameter from parsebackq() - it was not used (at all) and should never be, a command substitution, wherever it appears, always starts a new parsing context. How that applies to old style command substitutions is less clear, but until we see some real examples where we're not doing the right thing (slightly less likely now than before ... nothing has changed here in the way command substitutions are parsed, but quoting in general is slightly better) I don't plan on worrying about it. There are a couple of other minor cleanups, which make no actual difference (like adding () around the use of the parameter in the RETURN macro ... which is generally better, but makes no difference here as the param is always a simple constant. All the current ATF tests pass. To generate a diff of this commit: cvs rdiff -u -r1.163 -r1.164 src/bin/sh/parser.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/parser.c diff -u src/bin/sh/parser.c:1.163 src/bin/sh/parser.c:1.164 --- src/bin/sh/parser.c:1.163 Tue Jan 22 13:48:28 2019 +++ src/bin/sh/parser.c Tue Jan 22 14:32:17 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: parser.c,v 1.163 2019/01/22 13:48:28 kre Exp $ */ +/* $NetBSD: parser.c,v 1.164 2019/01/22 14:32:17 kre Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)parser.c 8.7 (Berkeley) 5/16/95"; #else -__RCSID("$NetBSD: parser.c,v 1.163 2019/01/22 13:48:28 kre Exp $"); +__RCSID("$NetBSD: parser.c,v 1.164 2019/01/22 14:32:17 kre Exp $"); #endif #endif /* not lint */ @@ -1066,7 +1066,7 @@ readtoken(void) * have parseword (readtoken1?) handle both words and redirection.] */ -#define RETURN(token) return lasttoken = token +#define RETURN(token) return lasttoken = (token) STATIC int xxreadtoken(void) @@ -1240,6 +1240,7 @@ struct tokenstate { unsigned short ts_varnest; /* 64000 levels should be enough! */ unsigned short ts_arinest; unsigned short ts_quoted; /* 1 -> single, 2 -> double */ + unsigned short ts_magicq; /* heredoc or word expand */ }; #define NQ 0x00 /* Unquoted */ @@ -1300,6 +1301,7 @@ bump_state_level(VSS *stack) ts->ts_varnest = os->ts_varnest; ts->ts_arinest = os->ts_arinest; /* when appropriate */ ts->ts_syntax = os->ts_syntax; /*they will be altered */ + ts->ts_magicq = os->ts_magicq; return stack; } @@ -1358,6 +1360,7 @@ cleanup_state_stack(VSS *stack) #define varnest (currentstate(stack)->ts_varnest) #define arinest (currentstate(stack)->ts_arinest) #define quoted (currentstate(stack)->ts_quoted) +#define magicq (currentstate(stack)->ts_magicq) #define TS_PUSH() (stack = bump_state_level(stack)) #define TS_POP() (stack = drop_state_level(stack)) @@ -1371,7 +1374,7 @@ cleanup_state_stack(VSS *stack) */ static char * parsebackq(VSS *const stack, char * const in, -struct nodelist **const pbqlist, const int oldstyle, const int magicq) +struct nodelist **const pbqlist, const int oldstyle) { struct nodelist **nlpp; const int savepbq = parsebackquote; @@ -1593,11 +1596,11 @@ parseredir(const char *out, int c) VTRACE(DBG_LEXER, ("is '%c'(%#.2x) ", c&0xFF, c&0x1FF)); switch (c) { case '<': - if (sizeof (struct nfile) != sizeof (struct nhere)) { + /* if sizes differ, just discard the old one */ + if (sizeof (struct nfile) != sizeof (struct nhere)) np = stalloc(sizeof(struct nhere)); -np->nfile.fd = 0; - } np->type = NHERE; + np->nhere.fd = 0; heredoc = stalloc(sizeof(struct HereDoc)); heredoc->here = np; heredoc->startline = plinno; @@ -1817,7 +1820,7 @@ readcstyleesc(char *out) * That will also need fixing, someday... */ STATIC int -readtoken1(int firstc, char const *syn, int magicq) +readtoken1(int firstc, char const *syn, int oneword) { int c; char * out; @@ -1850,6 +1853,7 @@ readtoken1(int firstc, char const *syn, arinest = 0; parenlevel = 0; elided_nl = 0; + magicq = oneword; CTRACE(DBG_LEXER, ("readtoken1(%c) syntax=%s
CVS commit: src/bin/sh
Module Name:src Committed By: kre Date: Tue Jan 22 13:48:28 UTC 2019 Modified Files: src/bin/sh: parser.c shell.h show.c Log Message: NFCI - DEBUG mode only change. Add tracing of lexical analyser operations. This is deliberately kept out of the normal "all on" set as it makes a *lot* of noise when enabled (especially in verbose mode) - but when needed, it helps (evidence for which is coming soon). As usual, no doc, you need the sources (and of course, a specially built sh to even be able to enable it.) To generate a diff of this commit: cvs rdiff -u -r1.162 -r1.163 src/bin/sh/parser.c cvs rdiff -u -r1.28 -r1.29 src/bin/sh/shell.h cvs rdiff -u -r1.51 -r1.52 src/bin/sh/show.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/parser.c diff -u src/bin/sh/parser.c:1.162 src/bin/sh/parser.c:1.163 --- src/bin/sh/parser.c:1.162 Mon Jan 21 14:24:44 2019 +++ src/bin/sh/parser.c Tue Jan 22 13:48:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: parser.c,v 1.162 2019/01/21 14:24:44 kre Exp $ */ +/* $NetBSD: parser.c,v 1.163 2019/01/22 13:48:28 kre Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)parser.c 8.7 (Berkeley) 5/16/95"; #else -__RCSID("$NetBSD: parser.c,v 1.162 2019/01/21 14:24:44 kre Exp $"); +__RCSID("$NetBSD: parser.c,v 1.163 2019/01/22 13:48:28 kre Exp $"); #endif #endif /* not lint */ @@ -63,6 +63,9 @@ __RCSID("$NetBSD: parser.c,v 1.162 2019/ #ifndef SMALL #include "myhistedit.h" #endif +#ifdef DEBUG +#include "nodenames.h" +#endif /* * Shell command parser. @@ -1072,6 +1075,9 @@ xxreadtoken(void) if (tokpushback) { tokpushback = 0; + CTRACE(DBG_LEXER, + ("xxreadtoken() returns %s (%d) again\n", + tokname[lasttoken], lasttoken)); return lasttoken; } if (needprompt) { @@ -1082,64 +1088,92 @@ xxreadtoken(void) startlinno = plinno; for (;;) { /* until token or start of word found */ c = pgetc_macro(); + CTRACE(DBG_LEXER, ("xxreadtoken() sees '%c' (%#.2x) ", + c&0xFF, c&0x1FF)); switch (c) { case ' ': case '\t': case PFAKE: + CTRACE(DBG_LEXER, (" ignored\n")); continue; case '#': while ((c = pgetc()) != '\n' && c != PEOF) continue; + CTRACE(DBG_LEXER, + ("skipped comment to (not incl) \\n\n")); pungetc(); continue; case '\n': plinno++; + CTRACE(DBG_LEXER, ("newline now @%d\n", plinno)); needprompt = doprompt; RETURN(TNL); case PEOF: + CTRACE(DBG_LEXER, ("EOF -> TEOF (return)\n")); RETURN(TEOF); case '&': - if (pgetc_linecont() == '&') + if (pgetc_linecont() == '&') { +CTRACE(DBG_LEXER, +("and another -> TAND (return)\n")); RETURN(TAND); + } pungetc(); + CTRACE(DBG_LEXER, (" -> TBACKGND (return)\n")); RETURN(TBACKGND); case '|': - if (pgetc_linecont() == '|') + if (pgetc_linecont() == '|') { +CTRACE(DBG_LEXER, +("and another -> TOR (return)\n")); RETURN(TOR); + } pungetc(); + CTRACE(DBG_LEXER, (" -> TPIPE (return)\n")); RETURN(TPIPE); case ';': switch (pgetc_linecont()) { case ';': +CTRACE(DBG_LEXER, +("and another -> TENDCASE (return)\n")); RETURN(TENDCASE); case '&': +CTRACE(DBG_LEXER, +("and '&' -> TCASEFALL (return)\n")); RETURN(TCASEFALL); default: pungetc(); +CTRACE(DBG_LEXER, (" -> TSEMI (return)\n")); RETURN(TSEMI); } case '(': + CTRACE(DBG_LEXER, (" -> TLP (return)\n")); RETURN(TLP); case ')': + CTRACE(DBG_LEXER, (" -> TRP (return)\n")); RETURN(TRP); case '\\': switch (pgetc()) { case '\n': startlinno = ++plinno; +CTRACE(DBG_LEXER, ("\\\n ignored, now @%d\n", +plinno)); if (doprompt) setprompt(2); else setprompt(0); continue; case PEOF: +CTRACE(DBG_LEXER, + ("then EOF -> TEOF (return) '\\' dropped\n")); RETURN(TEOF); default: +CTRACE(DBG_LEXER, ("not \\\n or EOF: ")); pungetc(); break; } /* FALLTHROUGH */ default: + CTRACE(DBG_LEXER, ("getting a word\n")); return readtoken1(c, BASESYNTAX, 0); } } @@ -1359,6 +1393,8 @@ parsebackq(VSS *const stack, char * cons cleanup_state_stack(stack); parsebackquote = 0; handler = savehandler; + CTRACE(DBG_LEXER, ("parsebackq() err (%d), unwinding\n", + exception)); longjmp(handler->loc, 1); } INTOFF; @@ -1380,7 +1416,8 @@ parsebackq(VSS *const stack, char * cons char *pstr; int line1 = plinno; - VTRACE(DBG_PARSE, ("parsebackq: repackaging `` as $( )")); + VTRACE(DBG_PARSE|DBG_LEXER, + ("parsebackq: repackaging `` as $( )")); /* * Because the entire `...` is read here, we don't * need to bother the state stack. That will be used @@ -1388,7 +1425,7 @@ parsebackq(VSS *const stack, char * cons */ STARTSTACKSTR(out); #ifdef DEBUG - for (psavelen =
CVS commit: src/external/mit/xorg/server/xorg-server/os
Module Name:src Committed By: tron Date: Tue Jan 22 12:45:26 UTC 2019 Modified Files: src/external/mit/xorg/server/xorg-server/os: Makefile Log Message: Fix build with "USE_SSP" set to "yes" To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 \ src/external/mit/xorg/server/xorg-server/os/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/xorg-server/os/Makefile diff -u src/external/mit/xorg/server/xorg-server/os/Makefile:1.16 src/external/mit/xorg/server/xorg-server/os/Makefile:1.17 --- src/external/mit/xorg/server/xorg-server/os/Makefile:1.16 Mon Dec 31 11:14:06 2018 +++ src/external/mit/xorg/server/xorg-server/os/Makefile Tue Jan 22 12:45:25 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2018/12/31 11:14:06 mrg Exp $ +# $NetBSD: Makefile,v 1.17 2019/01/22 12:45:25 tron Exp $ .include "../Makefile.serverlib" .include "../Makefile.servermod" @@ -37,6 +37,7 @@ COPTS.xdmauth.c= -Wno-error # XXX COPTS.xstrans.c= -Wno-error # XXX COPTS.access.c= -Wno-error # XXX bigreqstr.h COPTS.io.c= -Wno-error # XXX bigreqstr.h +COPTS.backtrace.c= -Wno-stack-protector .include .include
CVS commit: [pgoyette-compat] src/sys/arch/amd64/conf
Module Name:src Committed By: pgoyette Date: Tue Jan 22 12:02:05 UTC 2019 Modified Files: src/sys/arch/amd64/conf [pgoyette-compat]: NOCOMPAT Log Message: Rather than having to track changes in GENERIC and incorporate them into NOCOMPAT, just include GENERIC and then turn off the various COMPAT options. To generate a diff of this commit: cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/sys/arch/amd64/conf/NOCOMPAT 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/NOCOMPAT diff -u src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.6 src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.7 --- src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.6 Tue Jan 22 11:48:31 2019 +++ src/sys/arch/amd64/conf/NOCOMPAT Tue Jan 22 12:02:05 2019 @@ -1,1199 +1,33 @@ -# $NetBSD: NOCOMPAT,v 1.1.2.6 2019/01/22 11:48:31 pgoyette Exp $ -# -# GENERIC machine description file -# -# This machine description file is used to generate the default NetBSD -# kernel. The generic kernel does not include all options, subsystems -# and device drivers, but should be useful for most applications. -# -# The machine description file can be customised for your specific -# machine to reduce the kernel size and improve its performance. -# -# For further information on compiling NetBSD kernels, see the config(8) -# man page. -# -# For further information on hardware support for this architecture, see -# the intro(4) man page. For further information about kernel options -# for this architecture, see the options(4) man page. For an explanation -# of each device driver in this file see the section 4 man page for the -# device. +include "arch/amd64/conf/GENERIC" -include "arch/amd64/conf/std.amd64" +#ident "NOCOMPAT-$Revision: 1.1.2.7 $" -options INCLUDE_CONFIG_FILE # embed config file in kernel binary - -#ident "NOCOMPAT-$Revision: 1.1.2.6 $" - -maxusers 64 # estimated number of users - -# delay between "rebooting ..." message and hardware reset, in milliseconds -#options CPURESET_DELAY=2000 - -# This option allows you to force a serial console at the specified -# I/O address. see console(4) for details. -#options CONSDEVNAME="\"com\"",CONADDR=0x2f8,CONSPEED=57600 -# you don't want the option below ON iff you are using the -# serial console option of the new boot strap code. -#options CONS_OVERRIDE # Always use above! independent of boot info - -# The following options override the memory sizes passed in from the boot -# block. Use them *only* if the boot block is unable to determine the correct -# values. Note that the BIOS may *correctly* report less than 640k of base -# memory if the extended BIOS data area is located at the top of base memory -# (as is the case on most recent systems). -#options REALBASEMEM=639 # size of base memory (in KB) -#options REALEXTMEM=15360 # size of extended memory (in KB) - -# The following options limit the overall size of physical memory -# and/or the maximum address used by the system. -# Contrary to REALBASEMEM and REALEXTMEM, they still use the BIOS memory map -# and can deal with holes in the memory layout. -#options PHYSMEM_MAX_SIZE=64 # max size of physical memory (in MB) -#options PHYSMEM_MAX_ADDR=2048 # don't use memory above this (in MB) - -# Standard system options - -options INSECURE # disable kernel security levels - X needs this - -options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT -options NTP # NTP phase/frequency locked loop - -options KTRACE # system call tracing via ktrace(1) - -options CPU_UCODE # cpu ucode loading support - -# Note: SysV IPC parameters could be changed dynamically, see sysctl(8). -#options SYSVMSG # System V-like message queues -#options SYSVSEM # System V-like semaphores -#options SYSVSHM # System V-like memory sharing - -options MODULAR # new style module(7) framework -options MODULAR_DEFAULT_AUTOLOAD -options USERCONF # userconf(4) support -#options PIPE_SOCKETPAIR # smaller, but slower pipe(2) -options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel - -# CPU-related options -options SVS # Separate Virtual Space -makeoptions SPECTRE_V2_GCC_MITIGATION=1 # GCC Spectre variant 2 - # migitation -options SPECTRE_V2_GCC_MITIGATION - -# USER_LDT. You need to disable SVS to use it. -#options USER_LDT # user-settable LDT; used by WINE -#no options SVS - -# CPU features -acpicpu* at cpu? # ACPI CPU (including frequency scaling) -coretemp* at cpu? # Intel on-die thermal sensor -est0 at cpu0 # Intel Enhanced SpeedStep (non-ACPI) -#odcm0 at cpu0 # On-demand clock modulation -powernow0 at cpu0 # AMD PowerNow! and Cool'n'Quiet (non-ACPI) -vmt0 at cpu0 # VMware Tools - -# Alternate buffer queue strategies for better responsiveness under high -# disk I/O load. -#options BUFQ_READPRIO -options BUFQ_PRIOCSCAN - -# Diagnostic/debugging support options -options DIAGNOSTIC # inexpensive kernel consistency checks -#
CVS commit: [pgoyette-compat] src/sys/arch/amd64/conf
Module Name:src Committed By: pgoyette Date: Tue Jan 22 11:48:31 UTC 2019 Modified Files: src/sys/arch/amd64/conf [pgoyette-compat]: GENERIC NOCOMPAT Log Message: Synch GENERIC and NOCOMPAT with GENERIC from HEAD To generate a diff of this commit: cvs rdiff -u -r1.485.2.13 -r1.485.2.14 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/arch/amd64/conf/NOCOMPAT 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.485.2.13 src/sys/arch/amd64/conf/GENERIC:1.485.2.14 --- src/sys/arch/amd64/conf/GENERIC:1.485.2.13 Fri Jan 18 08:50:13 2019 +++ src/sys/arch/amd64/conf/GENERIC Tue Jan 22 11:48:31 2019 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.485.2.13 2019/01/18 08:50:13 pgoyette Exp $ +# $NetBSD: GENERIC,v 1.485.2.14 2019/01/22 11:48:31 pgoyette 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.485.2.13 $" +#ident "GENERIC-$Revision: 1.485.2.14 $" maxusers 64 # estimated number of users @@ -138,16 +138,15 @@ options KDTRACE_HOOKS # kernel DTrace h # NetBSD backward compatibility. Support goes from COMPAT_15 up until # the latest release. Note that really old compat (< COMPAT_16) is only # useful for 32-bit i386 binaries. -include "conf/compat_netbsd09.config" # XXX PRG XXX usually 15 +include "conf/compat_netbsd15.config" #options COMPAT_386BSD_MBRPART # recognize old partition ID options COMPAT_OSSAUDIO options COMPAT_NETBSD32 options COMPAT_LINUX -options COMPAT_LINUX32 # requires COMPAT_LINUX and COMPAT_NETBSD32 -# and COMPAT_50 (or older) -options EXEC_ELF32 # requires COMPAT_NETBSD32 +options COMPAT_LINUX32 # req. COMPAT_LINUX and COMPAT_NETBSD32 +options EXEC_ELF32 # Wedge support options DKWEDGE_AUTODISCOVER # Automatically add dk(4) instances Index: src/sys/arch/amd64/conf/NOCOMPAT diff -u src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.5 src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.6 --- src/sys/arch/amd64/conf/NOCOMPAT:1.1.2.5 Wed Dec 26 14:01:31 2018 +++ src/sys/arch/amd64/conf/NOCOMPAT Tue Jan 22 11:48:31 2019 @@ -1,4 +1,4 @@ -# $NetBSD: NOCOMPAT,v 1.1.2.5 2018/12/26 14:01:31 pgoyette Exp $ +# $NetBSD: NOCOMPAT,v 1.1.2.6 2019/01/22 11:48:31 pgoyette 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.1.2.5 $" +#ident "NOCOMPAT-$Revision: 1.1.2.6 $" maxusers 64 # estimated number of users @@ -74,8 +74,14 @@ options USERCONF # userconf(4) support options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel # CPU-related options -#options USER_LDT # user-settable LDT; used by WINE options SVS # Separate Virtual Space +makeoptions SPECTRE_V2_GCC_MITIGATION=1 # GCC Spectre variant 2 + # migitation +options SPECTRE_V2_GCC_MITIGATION + +# USER_LDT. You need to disable SVS to use it. +#options USER_LDT # user-settable LDT; used by WINE +#no options SVS # CPU features acpicpu* at cpu? # ACPI CPU (including frequency scaling) @@ -85,8 +91,6 @@ est0 at cpu0 # Intel Enhanced SpeedSte powernow0 at cpu0 # AMD PowerNow! and Cool'n'Quiet (non-ACPI) vmt0 at cpu0 # VMware Tools -options PMC # performance-monitoring counters support - # Alternate buffer queue strategies for better responsiveness under high # disk I/O load. #options BUFQ_READPRIO @@ -110,11 +114,21 @@ options DDB_HISTORY_SIZE=512 # enable h #options KGDB # remote debugger #options KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0x3f8,KGDB_DEVRATE=9600 makeoptions DEBUG="-g" # compile full symbol table for CTF +#options KUBSAN # Kernel Undefined Behavior Sanitizer (kUBSan) #options SYSCALL_STATS # per syscall counts #options SYSCALL_TIMES # per syscall times #options SYSCALL_TIMES_HASCOUNTER # use 'broken' rdtsc (soekris) options KDTRACE_HOOKS # kernel DTrace hooks +# Kernel Address Sanitizer (kASan). You need to disable SVS to use it. +#makeoptions KASAN=1 # Kernel Address Sanitizer +#options KASAN +#no options SVS + +# Kernel Info Leak Detector. +#makeoptions KLEAK=1 +#options KLEAK + # Compatibility options # x86_64 never shipped with a.out binaries; the two options below are # only relevant to 32-bit i386 binaries @@ -201,10 +215,6 @@ options NETATALK # AppleTalk networking options PPP_BSDCOMP # BSD-Compress compression support for PPP options PPP_DEFLATE # Deflate compression support for PPP options PPP_FILTER # Active filter support for PPP (requires bpf) -options IPFILTER_LOG # ipmon(8) log support -options IPFILTER_LOOKUP # ippool(8) support -options IPFILTER_COMPAT # Compat for IP-Filter -#options IPFILTER_DEFAULT_BLOCK # block all packets by