CVS commit: src/external/bsd/openresolv/dist
Module Name:src Committed By: kre Date: Tue Oct 9 02:53:11 UTC 2018 Modified Files: src/external/bsd/openresolv/dist: dnsmasq.in Log Message: Fix stupid edit botch in previous, pointed out by leot@ (thanks). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/openresolv/dist/dnsmasq.in 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/openresolv/dist/dnsmasq.in diff -u src/external/bsd/openresolv/dist/dnsmasq.in:1.3 src/external/bsd/openresolv/dist/dnsmasq.in:1.4 --- src/external/bsd/openresolv/dist/dnsmasq.in:1.3 Tue Oct 9 01:28:35 2018 +++ src/external/bsd/openresolv/dist/dnsmasq.in Tue Oct 9 02:53:11 2018 @@ -184,7 +184,7 @@ if $changed; then eval $dnsmasq_restart elif [ -n "$RESTARTCMD" ]; then set -- ${dnsmasq_service} - eval "$RESTARTCMD"" + eval "$RESTARTCMD" else @SBINDIR@/resolvconf -r ${dnsmasq_service} fi
CVS commit: src/bin/sh
Module Name:src Committed By: kre Date: Tue Oct 9 02:43:42 UTC 2018 Modified Files: src/bin/sh: eval.c Log Message: When (about to) send the -x output for the end of a compound command (which has redirects, and so is included in -x output) use the -x/+x setting that existed when the comoound started, so if the state of xtrace changes during the command we don't end up with just half of the -x output (either the intro, or the conclusion, depending on which way the change happened). [this also happens to avoid a core dump in the previous code, but that could have been done other ways, this way actually simplifies things (less code)] To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 src/bin/sh/eval.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/eval.c diff -u src/bin/sh/eval.c:1.161 src/bin/sh/eval.c:1.162 --- src/bin/sh/eval.c:1.161 Sat Aug 25 02:42:49 2018 +++ src/bin/sh/eval.c Tue Oct 9 02:43:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: eval.c,v 1.161 2018/08/25 02:42:49 kre Exp $ */ +/* $NetBSD: eval.c,v 1.162 2018/10/09 02:43:41 kre Exp $ */ /*- * Copyright (c) 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95"; #else -__RCSID("$NetBSD: eval.c,v 1.161 2018/08/25 02:42:49 kre Exp $"); +__RCSID("$NetBSD: eval.c,v 1.162 2018/10/09 02:43:41 kre Exp $"); #endif #endif /* not lint */ @@ -625,7 +625,7 @@ evalredir(union node *n, int flags) handler = savehandler; e = exception; popredir(); - if (xflag && n->nredir.redirect) { + if (PS4 != NULL) { outxstr(PS4); /* { */ outxstr("} failed\n"); flushout(outx); @@ -650,7 +650,7 @@ evalredir(union node *n, int flags) popredir(); INTON; - if (xflag && n->nredir.redirect) { + if (PS4 != NULL) { outxstr(PS4); /* { */ outxstr("} done\n"); flushout(outx);
CVS commit: src/external/bsd/openresolv/dist
Module Name:src Committed By: kre Date: Tue Oct 9 01:28:35 UTC 2018 Modified Files: src/external/bsd/openresolv/dist: dnsmasq.in libc.in named.in unbound.in Log Message: PR port-evbarm/53661 Always quote RESTARTCMD when eval'ing it. Whatever script does it... To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/openresolv/dist/dnsmasq.in \ src/external/bsd/openresolv/dist/libc.in \ src/external/bsd/openresolv/dist/named.in cvs rdiff -u -r1.1.1.8 -r1.2 src/external/bsd/openresolv/dist/unbound.in 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/openresolv/dist/dnsmasq.in diff -u src/external/bsd/openresolv/dist/dnsmasq.in:1.2 src/external/bsd/openresolv/dist/dnsmasq.in:1.3 --- src/external/bsd/openresolv/dist/dnsmasq.in:1.2 Mon Sep 24 21:58:11 2018 +++ src/external/bsd/openresolv/dist/dnsmasq.in Tue Oct 9 01:28:35 2018 @@ -184,7 +184,7 @@ if $changed; then eval $dnsmasq_restart elif [ -n "$RESTARTCMD" ]; then set -- ${dnsmasq_service} - eval $RESTARTCMD + eval "$RESTARTCMD"" else @SBINDIR@/resolvconf -r ${dnsmasq_service} fi Index: src/external/bsd/openresolv/dist/libc.in diff -u src/external/bsd/openresolv/dist/libc.in:1.2 src/external/bsd/openresolv/dist/libc.in:1.3 --- src/external/bsd/openresolv/dist/libc.in:1.2 Mon Sep 24 21:58:11 2018 +++ src/external/bsd/openresolv/dist/libc.in Tue Oct 9 01:28:35 2018 @@ -234,7 +234,7 @@ if [ -n "$libc_restart" ]; then eval $libc_restart elif [ -n "$RESTARTCMD" ]; then set -- ${libc_service} - eval $RESTARTCMD + eval "$RESTARTCMD" else @SBINDIR@/resolvconf -r ${libc_service} fi Index: src/external/bsd/openresolv/dist/named.in diff -u src/external/bsd/openresolv/dist/named.in:1.2 src/external/bsd/openresolv/dist/named.in:1.3 --- src/external/bsd/openresolv/dist/named.in:1.2 Mon Sep 24 21:58:11 2018 +++ src/external/bsd/openresolv/dist/named.in Tue Oct 9 01:28:35 2018 @@ -111,7 +111,7 @@ if $changed; then eval $named_restart elif [ -n "$RESTARTCMD" ]; then set -- ${named_service} - eval $RESTARTCMD + eval "$RESTARTCMD" else @SBINDIR@/resolvconf -r ${named_service} fi Index: src/external/bsd/openresolv/dist/unbound.in diff -u src/external/bsd/openresolv/dist/unbound.in:1.1.1.8 src/external/bsd/openresolv/dist/unbound.in:1.2 --- src/external/bsd/openresolv/dist/unbound.in:1.1.1.8 Mon Apr 11 10:40:22 2016 +++ src/external/bsd/openresolv/dist/unbound.in Tue Oct 9 01:28:35 2018 @@ -76,7 +76,7 @@ restart_unbound() eval $unbound_restart elif [ -n "$RESTARTCMD" ]; then set -- ${unbound_service} - eval $RESTARTCMD + eval "$RESTARTCMD" else @SBINDIR@/resolvconf -r ${unbound_service} fi
CVS commit: src/lib/libterminfo
Module Name:src Committed By: roy Date: Mon Oct 8 20:44:34 UTC 2018 Modified Files: src/lib/libterminfo: term.c Log Message: terminfo: if $TERMINFO.cdb doesn't exist, try $TERMINFO This allows this command sequence to work: tic -o /tmp/foo foo TERMINFO=/tmp/foo TERM=foo infocmp To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/lib/libterminfo/term.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/libterminfo/term.c diff -u src/lib/libterminfo/term.c:1.28 src/lib/libterminfo/term.c:1.29 --- src/lib/libterminfo/term.c:1.28 Tue May 16 12:03:41 2017 +++ src/lib/libterminfo/term.c Mon Oct 8 20:44:34 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: term.c,v 1.28 2017/05/16 12:03:41 roy Exp $ */ +/* $NetBSD: term.c,v 1.29 2018/10/08 20:44:34 roy Exp $ */ /* * Copyright (c) 2009, 2010, 2011 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include -__RCSID("$NetBSD: term.c,v 1.28 2017/05/16 12:03:41 roy Exp $"); +__RCSID("$NetBSD: term.c,v 1.29 2018/10/08 20:44:34 roy Exp $"); #include @@ -284,9 +284,19 @@ _ti_dbgetterm(TERMINAL *term, const char size_t len, klen; int r; - if (snprintf(__ti_database, sizeof(__ti_database), "%s.cdb", path) < 0) - return -1; - db = cdbr_open(__ti_database, CDBR_DEFAULT); + r = snprintf(__ti_database, sizeof(__ti_database), "%s.cdb", path); + if (r < 0 || (size_t)r > sizeof(__ti_database)) { + db = NULL; + errno = ENOENT; /* To fall back to a non extension. */ + } else + db = cdbr_open(__ti_database, CDBR_DEFAULT); + + /* Target file *may* be a cdb file without the extension. */ + if (db == NULL && errno == ENOENT) { + len = strlcpy(__ti_database, path, sizeof(__ti_database)); + if (len < sizeof(__ti_database)) + db = cdbr_open(__ti_database, CDBR_DEFAULT); + } if (db == NULL) return -1;
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Mon Oct 8 19:09:18 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.1 Log Message: Ticket #1048 To generate a diff of this commit: cvs rdiff -u -r1.1.2.29 -r1.1.2.30 src/doc/CHANGES-8.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.1 diff -u src/doc/CHANGES-8.1:1.1.2.29 src/doc/CHANGES-8.1:1.1.2.30 --- src/doc/CHANGES-8.1:1.1.2.29 Thu Oct 4 10:21:11 2018 +++ src/doc/CHANGES-8.1 Mon Oct 8 19:09:18 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.1,v 1.1.2.29 2018/10/04 10:21:11 martin Exp $ +# $NetBSD: CHANGES-8.1,v 1.1.2.30 2018/10/08 19:09:18 martin Exp $ A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1 release: @@ -1225,3 +1225,10 @@ lib/libcurses/setterm.c1.67 Fix typos in curses_screen.3 [roy, ticket #1047] +lib/libcurses/curses_private.h 1.66 +lib/libcurses/slk.c1.3,1.4 + + curses: declare SLK format as invalid until slk_init(3) called. + curses: once __slk_init is called, reset slk_fmt. + [roy, ticket #1048] +
CVS commit: [netbsd-8] src/lib/libcurses
Module Name:src Committed By: martin Date: Mon Oct 8 19:06:52 UTC 2018 Modified Files: src/lib/libcurses [netbsd-8]: curses_private.h slk.c Log Message: Pull up following revision(s) (requested by roy in ticket #1048): lib/libcurses/curses_private.h: revision 1.66 lib/libcurses/slk.c: revision 1.3 lib/libcurses/slk.c: revision 1.4 curses: declare SLK format as invalid until slk_init(3) called If we don't, then when __slk_init with a valid format of 0 it sets up labels to be drawn without a window. - curses: once __slk_init is called, reset slk_fmt This allows soft label keys to be used on more than one terminal. To generate a diff of this commit: cvs rdiff -u -r1.62.4.2 -r1.62.4.3 src/lib/libcurses/curses_private.h cvs rdiff -u -r1.2 -r1.2.8.1 src/lib/libcurses/slk.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/libcurses/curses_private.h diff -u src/lib/libcurses/curses_private.h:1.62.4.2 src/lib/libcurses/curses_private.h:1.62.4.3 --- src/lib/libcurses/curses_private.h:1.62.4.2 Thu Oct 4 10:20:12 2018 +++ src/lib/libcurses/curses_private.h Mon Oct 8 19:06:52 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: curses_private.h,v 1.62.4.2 2018/10/04 10:20:12 martin Exp $ */ +/* $NetBSD: curses_private.h,v 1.62.4.3 2018/10/08 19:06:52 martin Exp $ */ /*- * Copyright (c) 1998-2000 Brett Lymn @@ -289,6 +289,7 @@ struct __screen { bool is_term_slk; WINDOW *slk_window; int slk_format; +#define SLK_FMT_INVAL -1 #define SLK_FMT_3_2_3 0 #define SLK_FMT_4_4 1 int slk_nlabels; Index: src/lib/libcurses/slk.c diff -u src/lib/libcurses/slk.c:1.2 src/lib/libcurses/slk.c:1.2.8.1 --- src/lib/libcurses/slk.c:1.2 Mon Jan 30 17:15:52 2017 +++ src/lib/libcurses/slk.c Mon Oct 8 19:06:52 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: slk.c,v 1.2 2017/01/30 17:15:52 roy Exp $ */ +/* $NetBSD: slk.c,v 1.2.8.1 2018/10/08 19:06:52 martin Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: slk.c,v 1.2 2017/01/30 17:15:52 roy Exp $"); +__RCSID("$NetBSD: slk.c,v 1.2.8.1 2018/10/08 19:06:52 martin Exp $"); #endif/* not lint */ #include @@ -57,7 +57,7 @@ __RCSID("$NetBSD: slk.c,v 1.2 2017/01/30 #define SLK_SIZE MAX_SLK_COLS #endif -static int slk_fmt; /* fmt of slk_init */ +static int slk_fmt = SLK_FMT_INVAL; /* fmt of slk_init */ /* Safe variants of public functions. */ static int __slk_attron(SCREEN *, const chtype); @@ -562,6 +562,10 @@ __slk_init(SCREEN *screen) __slk_free(screen); /* safety */ screen->slk_format = slk_fmt; + if (slk_fmt == SLK_FMT_INVAL) + return OK; + slk_fmt = SLK_FMT_INVAL; + switch(screen->slk_format) { case SLK_FMT_3_2_3: case SLK_FMT_4_4:
CVS commit: src/crypto/external/bsd/openssl/lib/libssl
Module Name:src Committed By: christos Date: Mon Oct 8 18:01:23 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/lib/libssl: Makefile Log Message: elide a warning that triggers on arm/clang To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/crypto/external/bsd/openssl/lib/libssl/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/lib/libssl/Makefile diff -u src/crypto/external/bsd/openssl/lib/libssl/Makefile:1.9 src/crypto/external/bsd/openssl/lib/libssl/Makefile:1.10 --- src/crypto/external/bsd/openssl/lib/libssl/Makefile:1.9 Fri Mar 2 08:26:40 2018 +++ src/crypto/external/bsd/openssl/lib/libssl/Makefile Mon Oct 8 14:01:23 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2018/03/02 13:26:40 christos Exp $ +# $NetBSD: Makefile,v 1.10 2018/10/08 18:01:23 christos Exp $ # RCSid: # Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp @@ -23,6 +23,8 @@ USE_FORT?=yes # cryptographic software a # XXX There's a bit of work to do before we can enable warnings. WARNS=0 CWARNFLAGS.clang+= -Wno-unused-value +# XXX: This warning seems to trigger incorrectly +CWARNFLAGS.clang+= -Wno-atomic-alignment LIB= ssl CPPFLAGS+= -Dlib${LIB} -I${OPENSSLSRC} -I${OPENSSLSRC}/crypto
CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau
Module Name:src Committed By: christos Date: Mon Oct 8 17:58:52 UTC 2018 Modified Files: src/sys/external/bsd/drm2/dist/drm/nouveau: nouveau_bo.c Log Message: comment out unused function (clang) To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 \ src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.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/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.c diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.c:1.12 src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.c:1.13 --- src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.c:1.12 Mon Aug 27 11:22:54 2018 +++ src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.c Mon Oct 8 13:58:52 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_bo.c,v 1.12 2018/08/27 15:22:54 riastradh Exp $ */ +/* $NetBSD: nouveau_bo.c,v 1.13 2018/10/08 17:58:52 christos Exp $ */ /* * Copyright 2007 Dave Airlied @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_bo.c,v 1.12 2018/08/27 15:22:54 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_bo.c,v 1.13 2018/10/08 17:58:52 christos Exp $"); #include #include @@ -543,6 +543,7 @@ nouveau_bo_validate(struct nouveau_bo *n # define iowrite16_native fake_iowrite16_native # define iowrite32_native fake_iowrite32_native +#ifdef notdef static inline uint16_t ioread16_native(const void __iomem *ptr) { @@ -553,6 +554,7 @@ ioread16_native(const void __iomem *ptr) return v; } +#endif static inline uint32_t ioread32_native(const void __iomem *ptr)
CVS commit: src/sys/dev/ic
Module Name:src Committed By: martin Date: Mon Oct 8 17:09:31 UTC 2018 Modified Files: src/sys/dev/ic: dwc_gmac.c dwc_gmac_reg.h dwc_gmac_var.h Log Message: Bring back support for enhanced descriptor format in newer core versions. Fix a few endian bugs and check the main core version before trying to read the hardware feature mask. Only read the hardware feature register if core version reported is >= 3.5 (all my older hardware reports 0). With some hints and patches from jared, and ok from aymeric To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/dev/ic/dwc_gmac.c cvs rdiff -u -r1.18 -r1.19 src/sys/dev/ic/dwc_gmac_reg.h cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ic/dwc_gmac_var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/dwc_gmac.c diff -u src/sys/dev/ic/dwc_gmac.c:1.54 src/sys/dev/ic/dwc_gmac.c:1.55 --- src/sys/dev/ic/dwc_gmac.c:1.54 Fri Sep 28 21:51:42 2018 +++ src/sys/dev/ic/dwc_gmac.c Mon Oct 8 17:09:31 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc_gmac.c,v 1.54 2018/09/28 21:51:42 aymeric Exp $ */ +/* $NetBSD: dwc_gmac.c,v 1.55 2018/10/08 17:09:31 martin Exp $ */ /*- * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.54 2018/09/28 21:51:42 aymeric Exp $"); +__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.55 2018/10/08 17:09:31 martin Exp $"); /* #define DWC_GMAC_DEBUG 1 */ @@ -100,6 +100,53 @@ static void dwc_gmac_rx_intr(struct dwc_ static void dwc_gmac_setmulti(struct dwc_gmac_softc *sc); static int dwc_gmac_ifflags_cb(struct ethercom *); static uint32_t bitrev32(uint32_t x); +static void dwc_gmac_desc_set_owned_by_dev(struct dwc_gmac_dev_dmadesc *); +static int dwc_gmac_desc_is_owned_by_dev(struct dwc_gmac_dev_dmadesc *); +static void dwc_gmac_desc_std_set_len(struct dwc_gmac_dev_dmadesc *, int); +static uint32_t dwc_gmac_desc_std_get_len(struct dwc_gmac_dev_dmadesc *); +static void dwc_gmac_desc_std_tx_init_flags(struct dwc_gmac_dev_dmadesc *); +static void dwc_gmac_desc_std_tx_set_first_frag(struct dwc_gmac_dev_dmadesc *); +static void dwc_gmac_desc_std_tx_set_last_frag(struct dwc_gmac_dev_dmadesc *); +static void dwc_gmac_desc_std_rx_init_flags(struct dwc_gmac_dev_dmadesc *); +static int dwc_gmac_desc_std_rx_has_error(struct dwc_gmac_dev_dmadesc *); +static void dwc_gmac_desc_enh_set_len(struct dwc_gmac_dev_dmadesc *, int); +static uint32_t dwc_gmac_desc_enh_get_len(struct dwc_gmac_dev_dmadesc *); +static void dwc_gmac_desc_enh_tx_init_flags(struct dwc_gmac_dev_dmadesc *); +static void dwc_gmac_desc_enh_tx_set_first_frag(struct dwc_gmac_dev_dmadesc *); +static void dwc_gmac_desc_enh_tx_set_last_frag(struct dwc_gmac_dev_dmadesc *); +static void dwc_gmac_desc_enh_rx_init_flags(struct dwc_gmac_dev_dmadesc *); +static int dwc_gmac_desc_enh_rx_has_error(struct dwc_gmac_dev_dmadesc *); + +static const struct dwc_gmac_desc_methods desc_methods_standard = { + .tx_init_flags = dwc_gmac_desc_std_tx_init_flags, + .tx_set_owned_by_dev = dwc_gmac_desc_set_owned_by_dev, + .tx_is_owned_by_dev = dwc_gmac_desc_is_owned_by_dev, + .tx_set_len = dwc_gmac_desc_std_set_len, + .tx_set_first_frag = dwc_gmac_desc_std_tx_set_first_frag, + .tx_set_last_frag = dwc_gmac_desc_std_tx_set_last_frag, + .rx_init_flags = dwc_gmac_desc_std_rx_init_flags, + .rx_set_owned_by_dev = dwc_gmac_desc_set_owned_by_dev, + .rx_is_owned_by_dev = dwc_gmac_desc_is_owned_by_dev, + .rx_set_len = dwc_gmac_desc_std_set_len, + .rx_get_len = dwc_gmac_desc_std_get_len, + .rx_has_error = dwc_gmac_desc_std_rx_has_error +}; + +static const struct dwc_gmac_desc_methods desc_methods_enhanced = { + .tx_init_flags = dwc_gmac_desc_enh_tx_init_flags, + .tx_set_owned_by_dev = dwc_gmac_desc_set_owned_by_dev, + .tx_is_owned_by_dev = dwc_gmac_desc_is_owned_by_dev, + .tx_set_len = dwc_gmac_desc_enh_set_len, + .tx_set_first_frag = dwc_gmac_desc_enh_tx_set_first_frag, + .tx_set_last_frag = dwc_gmac_desc_enh_tx_set_last_frag, + .rx_init_flags = dwc_gmac_desc_enh_rx_init_flags, + .rx_set_owned_by_dev = dwc_gmac_desc_set_owned_by_dev, + .rx_is_owned_by_dev = dwc_gmac_desc_is_owned_by_dev, + .rx_set_len = dwc_gmac_desc_enh_set_len, + .rx_get_len = dwc_gmac_desc_enh_get_len, + .rx_has_error = dwc_gmac_desc_enh_rx_has_error +}; + #define TX_DESC_OFFSET(N) ((AWGE_RX_RING_COUNT+(N)) \ *sizeof(struct dwc_gmac_dev_dmadesc)) @@ -122,7 +169,7 @@ static uint32_t bitrev32(uint32_t x); #define AWIN_DEF_MAC_INTRMASK \ (AWIN_GMAC_MAC_INT_TSI | AWIN_GMAC_MAC_INT_ANEG | \ - AWIN_GMAC_MAC_INT_LINKCHG | AWIN_GMAC_MAC_INT_RGSMII) + AWIN_GMAC_MAC_INT_LINKCHG) #ifdef DWC_GMAC_DEBUG static void dwc_gmac_dump_dma(struct dwc_gmac_softc *sc); @@ -141,7 +188,7 @@ int dwc_gmac_attach(struct dwc_gmac_softc *sc, uint32_t mii_clk) { uint8_t enaddr[ETHER_ADDR_LEN]; - uint32_t maclo, machi; + uint32_t maclo, machi, ver, hwft; struct mii_d
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto
Module Name:src Committed By: christos Date: Mon Oct 8 16:31:35 UTC 2018 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto: man.inc Log Message: Skip man pages that conflict (but have different case with libc: {hmac,md5}.3 and libdes: des_random_key.3) To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 \ src/crypto/external/bsd/openssl/lib/libcrypto/man.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/man.inc diff -u src/crypto/external/bsd/openssl/lib/libcrypto/man.inc:1.12 src/crypto/external/bsd/openssl/lib/libcrypto/man.inc:1.13 --- src/crypto/external/bsd/openssl/lib/libcrypto/man.inc:1.12 Mon Sep 24 07:02:12 2018 +++ src/crypto/external/bsd/openssl/lib/libcrypto/man.inc Mon Oct 8 12:31:35 2018 @@ -1,4 +1,4 @@ -# $NetBSD: man.inc,v 1.12 2018/09/24 11:02:12 christos Exp $ +# $NetBSD: man.inc,v 1.13 2018/10/08 16:31:35 christos Exp $ .PATH: ${.CURDIR}/man @@ -92,7 +92,6 @@ CTLOG_STORE_new.3 \ CTLOG_new.3 \ CT_POLICY_EVAL_CTX_new.3 \ DEFINE_STACK_OF.3 \ -DES_random_key.3 \ DH_generate_key.3 \ DH_generate_parameters.3 \ DH_get0_pqg.3 \ @@ -198,8 +197,6 @@ EVP_sm3.3 \ EVP_sm4_cbc.3 \ EVP_whirlpool.3 \ Ed25519.7 \ -HMAC.3 \ -MD5.3 \ MDC2_Init.3 \ OBJ_nid2obj.3 \ OCSP_REQUEST_new.3 \
CVS commit: src/external/bsd/openresolv/dist
Module Name:src Committed By: kre Date: Mon Oct 8 14:09:38 UTC 2018 Modified Files: src/external/bsd/openresolv/dist: resolvconf.in Log Message: PR port-evbarm/53661 (which has nothing particular to do with port-evbarm) When eval'ing RESTARTCMD don't field split it, only to join the words again (by eval) - that converts newlines and tabs to spaces, and the first of those causes sh syntax errors with the way that the various RESTARTCMDs are now written (but it was always dangerous, as filename expansions could also have happened, which is not wanted, I believe.) Also correct a translation error. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/openresolv/dist/resolvconf.in 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/openresolv/dist/resolvconf.in diff -u src/external/bsd/openresolv/dist/resolvconf.in:1.3 src/external/bsd/openresolv/dist/resolvconf.in:1.4 --- src/external/bsd/openresolv/dist/resolvconf.in:1.3 Tue Sep 25 05:57:46 2018 +++ src/external/bsd/openresolv/dist/resolvconf.in Mon Oct 8 14:09:38 2018 @@ -329,11 +329,11 @@ detect_init() fi' elif [ -x /usr/sbin/service ]; then # Could be FreeBSD - RESTARTCMD=' - if /usr/sbin/service $1 $status >/dev/null 2>&1 + RESTARTCMD=" + if /usr/sbin/service \$1 $status >/dev/null 2>&1 then -/usr/sbin/service $1 restart - fi' +/usr/sbin/service \$1 restart + fi" elif [ -x /bin/sv ]; then RESTARTCMD='/bin/sv status $1 >/dev/null 2>&1 && /bin/sv try-restart $1' @@ -697,7 +697,7 @@ if [ "$cmd" = r ] || [ "$cmd" = R ]; the detect_init || exit 1 if [ "$cmd" = r ]; then set -- $args - eval $RESTARTCMD + eval "$RESTARTCMD" else echo "$RESTARTCMD" fi
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Mon Oct 8 11:28:22 UTC 2018 Modified Files: src/sys/arch/arm/arm32: cpu.c Log Message: Trialing whitespace To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/sys/arch/arm/arm32/cpu.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/arm32/cpu.c diff -u src/sys/arch/arm/arm32/cpu.c:1.121 src/sys/arch/arm/arm32/cpu.c:1.122 --- src/sys/arch/arm/arm32/cpu.c:1.121 Sat Oct 6 16:04:21 2018 +++ src/sys/arch/arm/arm32/cpu.c Mon Oct 8 11:28:22 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.121 2018/10/06 16:04:21 skrll Exp $ */ +/* $NetBSD: cpu.c,v 1.122 2018/10/08 11:28:22 skrll Exp $ */ /* * Copyright (c) 1995 Mark Brinicombe. @@ -46,7 +46,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.121 2018/10/06 16:04:21 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.122 2018/10/08 11:28:22 skrll Exp $"); #include #include @@ -78,7 +78,7 @@ void identify_features(device_t); /* * Identify the master (boot) CPU */ - + void cpu_attach(device_t dv, cpuid_t id) { @@ -324,7 +324,7 @@ static const char * const pxa2x0_steppin }; /* Steppings for PXA255/26x. - * rev 5: PXA26x B0, rev 6: PXA255 A0 + * rev 5: PXA26x B0, rev 6: PXA255 A0 */ static const char * const pxa255_steppings[16] = { "rev 0", "rev 1", "rev 2", "step A-0", @@ -614,7 +614,7 @@ print_cache_info(device_t dv, struct arm info->icache_type & CACHE_TYPE_PIxx ? 'P' : 'V', info->icache_type & CACHE_TYPE_xxPT ? 'P' : 'V'); aprint_normal_dev(dv, "%dKB/%dB %d-way %s L%u %cI%cT Data cache\n", - info->dcache_size / 1024, + info->dcache_size / 1024, info->dcache_line_size, info->dcache_ways, wtnames[info->cache_type], level + 1, info->dcache_type & CACHE_TYPE_PIxx ? 'P' : 'V', @@ -748,7 +748,7 @@ identify_arm_cpu(device_t dv, struct cpu #endif #ifdef CPU_ARM7TDMI case CPU_CLASS_ARM7TDMI: -#endif +#endif #ifdef CPU_ARM8 case CPU_CLASS_ARM8: #endif
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: skrll Date: Mon Oct 8 10:22:17 UTC 2018 Modified Files: src/sys/arch/evbarm/conf: std.altera std.amlogic std.armadaxp std.armadillo9 std.bcm53xx std.beagle std.exynos std.generic std.imx6ul std.nitrogen6 std.rpi std.sunxi std.tegra std.vexpress std.virt std.zynq Log Message: Sort options. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/std.altera \ src/sys/arch/evbarm/conf/std.imx6ul cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/conf/std.amlogic \ src/sys/arch/evbarm/conf/std.armadaxp src/sys/arch/evbarm/conf/std.sunxi cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/conf/std.armadillo9 \ src/sys/arch/evbarm/conf/std.vexpress cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/conf/std.bcm53xx \ src/sys/arch/evbarm/conf/std.beagle cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/conf/std.exynos cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/std.generic cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/conf/std.nitrogen6 cvs rdiff -u -r1.21 -r1.22 src/sys/arch/evbarm/conf/std.rpi cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbarm/conf/std.tegra cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/conf/std.virt cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/conf/std.zynq 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/std.altera diff -u src/sys/arch/evbarm/conf/std.altera:1.2 src/sys/arch/evbarm/conf/std.altera:1.3 --- src/sys/arch/evbarm/conf/std.altera:1.2 Sun Oct 7 07:48:43 2018 +++ src/sys/arch/evbarm/conf/std.altera Mon Oct 8 10:22:17 2018 @@ -1,16 +1,16 @@ -# $NetBSD: std.altera,v 1.2 2018/10/07 07:48:43 skrll Exp $ +# $NetBSD: std.altera,v 1.3 2018/10/08 10:22:17 skrll Exp $ machine evbarm arm include "arch/evbarm/conf/std.evbarm" include "arch/evbarm/conf/files.altera" -options DRAM_BLOCKS=256 -options FDT -options FPU_VFP options ARM_HAS_VBAR options ARM_GENERIC_TODR options ARM_INTR_IMPL="" +options DRAM_BLOCKS=256 +options FDT +options FPU_VFP options TPIDRPRW_IS_CURCPU options __BUS_SPACE_HAS_STREAM_METHODS options __HAVE_CPU_COUNTER @@ -19,10 +19,8 @@ options __HAVE_FAST_SOFTINTS options __HAVE_MM_MD_DIRECT_MAPPED_PHYS options KERNEL_BASE_EXT=0x8000 - makeoptions KERNEL_BASE_PHYS="0x1" makeoptions KERNEL_BASE_VIRT="0x8001" - makeoptions BOARDTYPE="nanosoc" makeoptions BOARDMKFRAG="${THISARM}/conf/mk.altera" Index: src/sys/arch/evbarm/conf/std.imx6ul diff -u src/sys/arch/evbarm/conf/std.imx6ul:1.2 src/sys/arch/evbarm/conf/std.imx6ul:1.3 --- src/sys/arch/evbarm/conf/std.imx6ul:1.2 Sun Oct 7 07:48:44 2018 +++ src/sys/arch/evbarm/conf/std.imx6ul Mon Oct 8 10:22:17 2018 @@ -1,4 +1,4 @@ -# $NetBSD: std.imx6ul,v 1.2 2018/10/07 07:48:44 skrll Exp $ +# $NetBSD: std.imx6ul,v 1.3 2018/10/08 10:22:17 skrll Exp $ # # standard NetBSD/evbarm options for i.MX6UL @@ -8,28 +8,23 @@ include "arch/evbarm/conf/std.evbarm" # Pull in nitrogen6 config definitions. include "arch/evbarm/conf/files.nitrogen6" -options NITROGEN6 - +# Architecture opions +options ARM_GENERIC_TODR options ARM_HAS_VBAR +options ARM_INTR_IMPL="" +options CORTEX_PMC +options CORTEX_PMC_CCNT_HZ=79200 +options FPU_VFP +options NITROGEN6 +#options PMAP_NEED_ALLOC_POOLPAGE +options TPIDRPRW_IS_CURCPU options __HAVE_CPU_COUNTER options __HAVE_FAST_SOFTINTS # should be in types.h -options TPIDRPRW_IS_CURCPU #options __HAVE_MM_MD_DIRECT_MAPPED_PHYS -#options PMAP_NEED_ALLOC_POOLPAGE - -makeoptions CPUFLAGS="-mcpu=cortex-a7 -mfpu=neon" - -# To support easy transit to ../arch/arm/arm32 -options FPU_VFP -options CORTEX_PMC -options CORTEX_PMC_CCNT_HZ=79200 +makeoptions BOARDMKFRAG="${THISARM}/conf/mk.imx6ul" +makeoptions CPPFLAGS+="-I$S/../../../include" +makeoptions CPUFLAGS="-mcpu=cortex-a7 -mfpu=neon" options KERNEL_BASE_EXT=0x8000 makeoptions KERNEL_BASE_PHYS="0x8080" makeoptions KERNEL_BASE_VIRT="0x8080" - -makeoptions BOARDMKFRAG="${THISARM}/conf/mk.imx6ul" -makeoptions CPPFLAGS+="-I$S/../../../include" - -options ARM_INTR_IMPL="" -options ARM_GENERIC_TODR Index: src/sys/arch/evbarm/conf/std.amlogic diff -u src/sys/arch/evbarm/conf/std.amlogic:1.5 src/sys/arch/evbarm/conf/std.amlogic:1.6 --- src/sys/arch/evbarm/conf/std.amlogic:1.5 Sun Oct 7 07:51:54 2018 +++ src/sys/arch/evbarm/conf/std.amlogic Mon Oct 8 10:22:17 2018 @@ -1,4 +1,4 @@ -# $NetBSD: std.amlogic,v 1.5 2018/10/07 07:51:54 skrll Exp $ +# $NetBSD: std.amlogic,v 1.6 2018/10/08 10:22:17 skrll Exp $ # machine evbarm arm @@ -6,22 +6,22 @@ include "arch/evbarm/conf/std.evbarm" include "arch/evbarm/conf/files.amlogic" +# Architecture opions +options ARM_GENERIC_TODR +options ARM_HAS_VBAR +options ARM_INTR_IMPL="" +options CORTEX_PMC +options FPU_VFP options MODULAR options MODULAR_DEFAULT_AUT
CVS commit: src/sys/arch/arm/samsung
Module Name:src Committed By: skrll Date: Mon Oct 8 08:17:00 UTC 2018 Modified Files: src/sys/arch/arm/samsung: exynos_platform.c exynos_soc.c exynos_var.h Log Message: Remove a build dependency on SOC_EXYNOS4 and SOC_EXYNOS5. Now runtime. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/samsung/exynos_platform.c cvs rdiff -u -r1.36 -r1.37 src/sys/arch/arm/samsung/exynos_soc.c cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/samsung/exynos_var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/samsung/exynos_platform.c diff -u src/sys/arch/arm/samsung/exynos_platform.c:1.17 src/sys/arch/arm/samsung/exynos_platform.c:1.18 --- src/sys/arch/arm/samsung/exynos_platform.c:1.17 Fri Sep 21 12:04:07 2018 +++ src/sys/arch/arm/samsung/exynos_platform.c Mon Oct 8 08:17:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: exynos_platform.c,v 1.17 2018/09/21 12:04:07 skrll Exp $ */ +/* $NetBSD: exynos_platform.c,v 1.18 2018/10/08 08:17:00 skrll Exp $ */ /*- * Copyright (c) 2017 Jared D. McNeill @@ -35,7 +35,7 @@ #include "ukbd.h" #include -__KERNEL_RCSID(0, "$NetBSD: exynos_platform.c,v 1.17 2018/09/21 12:04:07 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: exynos_platform.c,v 1.18 2018/10/08 08:17:00 skrll Exp $"); #include #include @@ -124,8 +124,6 @@ static void exynos_platform_bootstrap(void) { - exynos_bootstrap(); - void (*mp_bootstrap)(void) = NULL; const struct of_compat_data *cd = of_search_compatible(OF_finddevice("/"), mp_compat_data); if (cd) @@ -205,9 +203,18 @@ exynos4_platform_devmap(void) return devmap; } +static void +exynos4_platform_bootstrap(void) +{ + + exynos_bootstrap(4); + + exynos_platform_bootstrap(); +} + static const struct arm_platform exynos4_platform = { .ap_devmap = exynos4_platform_devmap, - .ap_bootstrap = exynos_platform_bootstrap, + .ap_bootstrap = exynos4_platform_bootstrap, .ap_init_attach_args = exynos_platform_init_attach_args, .ap_early_putchar = exynos_platform_early_putchar, .ap_device_register = exynos_platform_device_register, @@ -240,9 +247,18 @@ exynos5_platform_devmap(void) return devmap; } +static void +exynos5_platform_bootstrap(void) +{ + + exynos_bootstrap(5); + + exynos_platform_bootstrap(); +} + static const struct arm_platform exynos5_platform = { .ap_devmap = exynos5_platform_devmap, - .ap_bootstrap = exynos_platform_bootstrap, + .ap_bootstrap = exynos5_platform_bootstrap, .ap_init_attach_args = exynos_platform_init_attach_args, .ap_early_putchar = exynos_platform_early_putchar, .ap_device_register = exynos_platform_device_register, Index: src/sys/arch/arm/samsung/exynos_soc.c diff -u src/sys/arch/arm/samsung/exynos_soc.c:1.36 src/sys/arch/arm/samsung/exynos_soc.c:1.37 --- src/sys/arch/arm/samsung/exynos_soc.c:1.36 Fri Sep 14 11:58:38 2018 +++ src/sys/arch/arm/samsung/exynos_soc.c Mon Oct 8 08:16:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: exynos_soc.c,v 1.36 2018/09/14 11:58:38 skrll Exp $ */ +/* $NetBSD: exynos_soc.c,v 1.37 2018/10/08 08:16:59 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #include "opt_exynos.h" #include -__KERNEL_RCSID(1, "$NetBSD: exynos_soc.c,v 1.36 2018/09/14 11:58:38 skrll Exp $"); +__KERNEL_RCSID(1, "$NetBSD: exynos_soc.c,v 1.37 2018/10/08 08:16:59 skrll Exp $"); #include #include @@ -475,7 +475,7 @@ exynos_clocks_bootstrap(void) void -exynos_bootstrap(void) +exynos_bootstrap(int soc) { int error; size_t core_size, audiocore_size; @@ -487,33 +487,40 @@ exynos_bootstrap(void) bus_addr_t exynos_cmu_apll_offset; const vaddr_t iobase = EXYNOS_CORE_VBASE; + switch (soc) { #ifdef SOC_EXYNOS4 - core_size = EXYNOS4_CORE_SIZE; - audiocore_size = EXYNOS4_AUDIOCORE_SIZE; - audiocore_pbase = EXYNOS4_AUDIOCORE_PBASE; - audiocore_vbase = EXYNOS4_AUDIOCORE_VBASE; - exynos_wdt_offset = EXYNOS4_WDT_OFFSET; - exynos_pmu_offset = EXYNOS4_PMU_OFFSET; - exynos_sysreg_offset = EXYNOS4_SYSREG_OFFSET; - exynos_cmu_apll_offset = EXYNOS4_CMU_APLL; - - cpu_freq_settings = cpu_freq_settings_exynos4; - ncpu_freq_settings = __arraycount(cpu_freq_settings_exynos4); + case 4: + core_size = EXYNOS4_CORE_SIZE; + audiocore_size = EXYNOS4_AUDIOCORE_SIZE; + audiocore_pbase = EXYNOS4_AUDIOCORE_PBASE; + audiocore_vbase = EXYNOS4_AUDIOCORE_VBASE; + exynos_wdt_offset = EXYNOS4_WDT_OFFSET; + exynos_pmu_offset = EXYNOS4_PMU_OFFSET; + exynos_sysreg_offset = EXYNOS4_SYSREG_OFFSET; + exynos_cmu_apll_offset = EXYNOS4_CMU_APLL; + + cpu_freq_settings = cpu_freq_settings_exynos4; + ncpu_freq_settings = __arraycount(cpu_freq_settings_exynos4); + break; #endif - #ifdef SOC_EXYNOS5 - core_size = EXYNOS5_CORE_SIZE; - audiocore_size = EXYNOS5_AUDIOCORE_SIZE; - audiocore_pbase = EXYNOS5_AUDIOCORE_PBASE; - audiocore_vbase = EXYNOS5_AUDIOCORE_VBASE; - exynos_wdt_offset = EXYNOS5_WDT_OFFSET; - exynos_pmu_offset = EXYNOS5_PMU
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: cherry Date: Mon Oct 8 08:05:08 UTC 2018 Modified Files: src/sys/arch/x86/x86: i8259.c intr.c ioapic.c Log Message: Clean up XEN specific stuff from the apic code, and move to intr.c No functional change. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/x86/x86/i8259.c cvs rdiff -u -r1.133 -r1.134 src/sys/arch/x86/x86/intr.c cvs rdiff -u -r1.58 -r1.59 src/sys/arch/x86/x86/ioapic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/i8259.c diff -u src/sys/arch/x86/x86/i8259.c:1.20 src/sys/arch/x86/x86/i8259.c:1.21 --- src/sys/arch/x86/x86/i8259.c:1.20 Sun Oct 7 16:36:36 2018 +++ src/sys/arch/x86/x86/i8259.c Mon Oct 8 08:05:08 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: i8259.c,v 1.20 2018/10/07 16:36:36 cherry Exp $ */ +/* $NetBSD: i8259.c,v 1.21 2018/10/08 08:05:08 cherry Exp $ */ /* * Copyright 2002 (c) Wasabi Systems, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: i8259.c,v 1.20 2018/10/07 16:36:36 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i8259.c,v 1.21 2018/10/08 08:05:08 cherry Exp $"); #include #include @@ -88,9 +88,6 @@ __KERNEL_RCSID(0, "$NetBSD: i8259.c,v 1. #include #include -#ifdef XEN -#include -#endif #ifndef __x86_64__ #include "mca.h" @@ -102,7 +99,6 @@ __KERNEL_RCSID(0, "$NetBSD: i8259.c,v 1. static void i8259_hwmask(struct pic *, int); static void i8259_hwunmask(struct pic *, int); static void i8259_setup(struct pic *, struct cpu_info *, int, int, int); -static void i8259_unsetup(struct pic *, struct cpu_info *, int, int, int); static void i8259_reinit_irqs(void); unsigned i8259_imen; @@ -119,7 +115,7 @@ struct pic i8259_pic = { .pic_hwmask = i8259_hwmask, .pic_hwunmask = i8259_hwunmask, .pic_addroute = i8259_setup, - .pic_delroute = i8259_unsetup, + .pic_delroute = i8259_setup, .pic_level_stubs = legacy_stubs, .pic_edge_stubs = legacy_stubs, }; @@ -256,62 +252,10 @@ static void i8259_setup(struct pic *pic, struct cpu_info *ci, int pin, int idtvec, int type) { -#if defined(XEN) - /* - * This is kludgy, and not the right place, but we can't bind - * before the routing has been set to the appropriate 'vector'. - * in x86/intr.c, this is done after idt_vec_set(), where this - * would have been more appropriate to put this. - */ - - int port, irq; - irq = vect2irq[idtvec]; - KASSERT(irq != 0); - if (irq2port[irq] != 0) { - /* - * Shared interrupt - we can't rebind. - * The port is shared instead. - */ - return; - } - - port = bind_pirq_to_evtch(irq); - KASSERT(port < NR_EVENT_CHANNELS); - KASSERT(port >= 0); - - KASSERT(irq2port[irq] == 0); - irq2port[irq] = port + 1; - - xen_atomic_set_bit(&ci->ci_evtmask[0], port); -#else if (CPU_IS_PRIMARY(ci)) i8259_reinit_irqs(); -#endif } -static void -i8259_unsetup(struct pic *pic, struct cpu_info *ci, -int pin, int idtvec, int type) -{ -#if defined(XEN) - int port, irq; - irq = vect2irq[idtvec]; - port = unbind_pirq_from_evtch(irq); - - KASSERT(port < NR_EVENT_CHANNELS); - - /* XXX: This is problematic for shared interrupts */ - KASSERT(irq2port[irq] != 0); - irq2port[irq] = 0; - - xen_atomic_clear_bit(&ci->ci_evtmask[0], port); -#else - if (CPU_IS_PRIMARY(ci)) - i8259_reinit_irqs(); -#endif -} - - void i8259_reinit(void) { Index: src/sys/arch/x86/x86/intr.c diff -u src/sys/arch/x86/x86/intr.c:1.133 src/sys/arch/x86/x86/intr.c:1.134 --- src/sys/arch/x86/x86/intr.c:1.133 Sun Oct 7 05:23:01 2018 +++ src/sys/arch/x86/x86/intr.c Mon Oct 8 08:05:08 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.133 2018/10/07 05:23:01 cherry Exp $ */ +/* $NetBSD: intr.c,v 1.134 2018/10/08 08:05:08 cherry Exp $ */ /* * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -133,7 +133,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.133 2018/10/07 05:23:01 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.134 2018/10/08 08:05:08 cherry Exp $"); #include "opt_intrdebug.h" #include "opt_multiprocessor.h" @@ -1278,12 +1278,24 @@ intr_establish_xname(int legacy_irq, str vector = xen_vec_alloc(gsi); - extern struct cpu_info phycpu_info_primary; /* XXX */ - struct cpu_info *ci = &phycpu_info_primary; - pic->pic_addroute(pic, ci, pin, vector, type); - - evtchn = irq2port[vect2irq[vector]]; - KASSERT(evtchn > 0); + if (irq2port[gsi] == 0) { + extern struct cpu_info phycpu_info_primary; /* XXX */ + struct cpu_info *ci = &phycpu_info_primary; + + pic->pic_addroute(pic, ci, pin, vector, type); + + evtchn = bind_pirq_to_evtch(gsi); + KASSERT(evtchn > 0); + KASSERT(evtchn < NR_EVENT_CHANNELS); + irq2port[gsi] = evtchn + 1; + xen_atomic_set_bit(&ci->ci_evtmask[0], evtchn); + } else { + /* + * Shared interrupt - we can't rebind. + * The port is shared instead. + */ + evtchn = irq2port[gsi]; + } pih = pirq_establish(gsi, evtchn, handler, arg,