CVS commit: src/sys/dev/usb
Module Name:src Committed By: pgoyette Date: Sat May 20 00:56:32 UTC 2017 Modified Files: src/sys/dev/usb: files.usb Log Message: Fix the USBVERBOSE stuff so it does not get included in the build if there are no USB devices or controllers. Without this change, a kernel with no USB devices but with USBVERBOSE defined in the configuration file will include the usb_verbose.c file, but will fail to link due to undefined symbols. To generate a diff of this commit: cvs rdiff -u -r1.143 -r1.144 src/sys/dev/usb/files.usb 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/files.usb diff -u src/sys/dev/usb/files.usb:1.143 src/sys/dev/usb/files.usb:1.144 --- src/sys/dev/usb/files.usb:1.143 Mon Apr 17 08:59:37 2017 +++ src/sys/dev/usb/files.usb Sat May 20 00:56:32 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.usb,v 1.143 2017/04/17 08:59:37 riastradh Exp $ +# $NetBSD: files.usb,v 1.144 2017/05/20 00:56:32 pgoyette Exp $ # # Config file and device description for machine-independent USB code. # Included by ports that need it. Ports that use it must provide @@ -103,8 +103,7 @@ file dev/usb/usb_quirks.c usb define usb_dma: usb file dev/usb/usb_mem.c usb_dma needs-flag -define usbverbose: usb -file dev/usb/usb_verbose.c usbverbose +file dev/usb/usb_verbose.c usbverbose & usb # Hub driver device uhub: usbdevif, usbifif
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: christos Date: Fri May 19 19:55:16 UTC 2017 Modified Files: src/lib/libc/stdlib: jemalloc.c Log Message: remove accidental __strong_alias additions, noticed by coypu. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/lib/libc/stdlib/jemalloc.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/stdlib/jemalloc.c diff -u src/lib/libc/stdlib/jemalloc.c:1.41 src/lib/libc/stdlib/jemalloc.c:1.42 --- src/lib/libc/stdlib/jemalloc.c:1.41 Fri May 19 15:51:10 2017 +++ src/lib/libc/stdlib/jemalloc.c Fri May 19 15:55:16 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: jemalloc.c,v 1.41 2017/05/19 19:51:10 christos Exp $ */ +/* $NetBSD: jemalloc.c,v 1.42 2017/05/19 19:55:16 christos Exp $ */ /*- * Copyright (C) 2006,2007 Jason Evans . @@ -118,7 +118,7 @@ #include /* __FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp $"); */ -__RCSID("$NetBSD: jemalloc.c,v 1.41 2017/05/19 19:51:10 christos Exp $"); +__RCSID("$NetBSD: jemalloc.c,v 1.42 2017/05/19 19:55:16 christos Exp $"); #ifdef __FreeBSD__ #include "libc_private.h" @@ -162,10 +162,6 @@ __RCSID("$NetBSD: jemalloc.c,v 1.41 2017 #ifdef __NetBSD__ # include # include "extern.h" -__strong_alias(__libc_malloc,malloc) -__strong_alias(__libc_realloc,realloc) -__strong_alias(__libc_calloc,calloc) -__strong_alias(__libc_free,free) #define STRERROR_R(a, b, c) strerror_r_ss(a, b, c); #endif
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: christos Date: Fri May 19 19:51:11 UTC 2017 Modified Files: src/lib/libc/stdlib: jemalloc.c Log Message: use strerror_r_ss() To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/lib/libc/stdlib/jemalloc.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/stdlib/jemalloc.c diff -u src/lib/libc/stdlib/jemalloc.c:1.40 src/lib/libc/stdlib/jemalloc.c:1.41 --- src/lib/libc/stdlib/jemalloc.c:1.40 Tue Apr 12 14:07:08 2016 +++ src/lib/libc/stdlib/jemalloc.c Fri May 19 15:51:10 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: jemalloc.c,v 1.40 2016/04/12 18:07:08 joerg Exp $ */ +/* $NetBSD: jemalloc.c,v 1.41 2017/05/19 19:51:10 christos Exp $ */ /*- * Copyright (C) 2006,2007 Jason Evans . @@ -118,7 +118,7 @@ #include /* __FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp $"); */ -__RCSID("$NetBSD: jemalloc.c,v 1.40 2016/04/12 18:07:08 joerg Exp $"); +__RCSID("$NetBSD: jemalloc.c,v 1.41 2017/05/19 19:51:10 christos Exp $"); #ifdef __FreeBSD__ #include "libc_private.h" @@ -162,28 +162,12 @@ __RCSID("$NetBSD: jemalloc.c,v 1.40 2016 #ifdef __NetBSD__ # include # include "extern.h" +__strong_alias(__libc_malloc,malloc) +__strong_alias(__libc_realloc,realloc) +__strong_alias(__libc_calloc,calloc) +__strong_alias(__libc_free,free) -#define STRERROR_R(a, b, c) __strerror_r(a, b, c); -/* - * A non localized version of strerror, that avoids bringing in - * stdio and the locale code. All the malloc messages are in English - * so why bother? - */ -static int -__strerror_r(int e, char *s, size_t l) -{ - int rval; - size_t slen; - - if (e >= 0 && e < sys_nerr) { - slen = strlcpy(s, sys_errlist[e], l); - rval = 0; - } else { - slen = snprintf_ss(s, l, "Unknown error %u", e); - rval = EINVAL; - } - return slen >= l ? ERANGE : rval; -} +#define STRERROR_R(a, b, c) strerror_r_ss(a, b, c); #endif #ifdef __FreeBSD__
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: christos Date: Fri May 19 19:48:19 UTC 2017 Modified Files: src/lib/libc/stdlib: qsort.c Log Message: The BSD qsort() performs tail recursion elimination on the second side of the array being partitioned to save on stack space. Greater savings can be gained by choosing recursion for the smaller side of the partition and eliminating recursion for the larger side. This also results in a small but measurable performance gain. (From OpenBSD) To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/lib/libc/stdlib/qsort.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/stdlib/qsort.c diff -u src/lib/libc/stdlib/qsort.c:1.22 src/lib/libc/stdlib/qsort.c:1.23 --- src/lib/libc/stdlib/qsort.c:1.22 Sat May 26 17:47:05 2012 +++ src/lib/libc/stdlib/qsort.c Fri May 19 15:48:19 2017 @@ -1,5 +1,4 @@ -/* $NetBSD: qsort.c,v 1.22 2012/05/26 21:47:05 christos Exp $ */ - +/* $NetBSD: qsort.c,v 1.23 2017/05/19 19:48:19 christos Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -34,7 +33,7 @@ #if 0 static char sccsid[] = "@(#)qsort.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: qsort.c,v 1.22 2012/05/26 21:47:05 christos Exp $"); +__RCSID("$NetBSD: qsort.c,v 1.23 2017/05/19 19:48:19 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -102,7 +101,7 @@ qsort(void *a, size_t n, size_t es, int (*cmp)(const void *, const void *)) { char *pa, *pb, *pc, *pd, *pl, *pm, *pn; - size_t d, r; + size_t d, r, s; int swaptype, cmp_result; _DIAGASSERT(a != NULL || n == 0 || es == 0); @@ -159,13 +158,28 @@ loop: SWAPINIT(a, es); vecswap(a, pb - r, r); r = min((size_t)(pd - pc), pn - pd - es); vecswap(pb, pn - r, r); - if ((r = pb - pa) > es) - qsort(a, r / es, es, cmp); - if ((r = pd - pc) > es) { - /* Iterate rather than recurse to save stack space */ - a = pn - r; - n = r / es; - goto loop; + /* + * To save stack space we sort the smaller side of the partition first + * using recursion and eliminate tail recursion for the larger side. + */ + r = pb - pa; + s = pd - pc; + if (r < s) { + /* Recurse for 1st side, iterate for 2nd side. */ + if (s > es) { + if (r > es) +qsort(a, r / es, es, cmp); + a = pn - s; + n = s / es; + goto loop; + } + } else { + /* Recurse for 2nd side, iterate for 1st side. */ + if (r > es) { + if (s > es) +qsort(pn - s, s / es, es, cmp); + n = r / es; + goto loop; + } } -/* qsort(pn - r, r / es, es, cmp);*/ }
CVS commit: src/sys/arch
Module Name:src Committed By: macallan Date: Fri May 19 19:25:53 UTC 2017 Modified Files: src/sys/arch/sgimips/dev: crmfb.c src/sys/arch/sparc64/dev: ffb.c Log Message: enable font loading / screen resizing To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/sgimips/dev/crmfb.c cvs rdiff -u -r1.60 -r1.61 src/sys/arch/sparc64/dev/ffb.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/sgimips/dev/crmfb.c diff -u src/sys/arch/sgimips/dev/crmfb.c:1.43 src/sys/arch/sgimips/dev/crmfb.c:1.44 --- src/sys/arch/sgimips/dev/crmfb.c:1.43 Sun Feb 14 19:11:19 2016 +++ src/sys/arch/sgimips/dev/crmfb.c Fri May 19 19:25:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: crmfb.c,v 1.43 2016/02/14 19:11:19 dholland Exp $ */ +/* $NetBSD: crmfb.c,v 1.44 2017/05/19 19:25:53 macallan Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.43 2016/02/14 19:11:19 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.44 2017/05/19 19:25:53 macallan Exp $"); #include #include @@ -74,7 +74,7 @@ struct wsscreen_descr crmfb_defaultscree 0, 0, NULL, 8, 16, - WSSCREEN_WSCOLORS, + WSSCREEN_WSCOLORS | WSSCREEN_RESIZE, NULL, }; @@ -356,6 +356,7 @@ crmfb_attach(device_t parent, device_t s sc->sc_dma.size, 0, BUS_DMA_NOWAIT, &sc->sc_dma.map); if (rv) panic("crmfb_attach: can't create DMA map"); + rv = bus_dmamap_load(sc->sc_dmat, sc->sc_dma.map, sc->sc_dma.addr, sc->sc_dma.size, NULL, BUS_DMA_NOWAIT); if (rv) @@ -366,8 +367,10 @@ crmfb_attach(device_t parent, device_t s for (i = 0; i < (sc->sc_tiles_x * sc->sc_tiles_y); i++) { p[i] = ((uint32_t)v >> 16) + i; } + bus_dmamap_sync(sc->sc_dmat, sc->sc_dmai.map, 0, sc->sc_dmai.size, BUS_DMASYNC_PREWRITE); + sc->sc_linear = (paddr_t)DMAADDR(sc->sc_dma) + 0x10 * sc->sc_tiles_x; sc->sc_lptr = (char *)KERNADDR(sc->sc_dma) + (0x10 * sc->sc_tiles_x); @@ -602,7 +605,10 @@ crmfb_init_screen(void *c, struct vcons_ sc = (struct crmfb_softc *)c; ri = &scr->scr_ri; - ri->ri_flg = RI_CENTER | RI_FULLCLEAR | RI_ENABLE_ALPHA; + scr->scr_flags |= VCONS_LOADFONT; + + ri->ri_flg = RI_CENTER | RI_FULLCLEAR | + RI_ENABLE_ALPHA | RI_PREFER_ALPHA; ri->ri_depth = sc->sc_console_depth; ri->ri_width = sc->sc_width; ri->ri_height = sc->sc_height; @@ -629,7 +635,7 @@ crmfb_init_screen(void *c, struct vcons_ ri->ri_bits = NULL; rasops_init(ri, 0, 0); - ri->ri_caps = WSSCREEN_WSCOLORS; + ri->ri_caps = WSSCREEN_WSCOLORS | WSSCREEN_RESIZE; rasops_reconfig(ri, ri->ri_height / ri->ri_font->fontheight, ri->ri_width / ri->ri_font->fontwidth); ri->ri_hw = scr; Index: src/sys/arch/sparc64/dev/ffb.c diff -u src/sys/arch/sparc64/dev/ffb.c:1.60 src/sys/arch/sparc64/dev/ffb.c:1.61 --- src/sys/arch/sparc64/dev/ffb.c:1.60 Thu Apr 27 23:17:21 2017 +++ src/sys/arch/sparc64/dev/ffb.c Fri May 19 19:25:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ffb.c,v 1.60 2017/04/27 23:17:21 macallan Exp $ */ +/* $NetBSD: ffb.c,v 1.61 2017/05/19 19:25:53 macallan Exp $ */ /* $OpenBSD: creator.c,v 1.20 2002/07/30 19:48:15 jason Exp $ */ /* @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ffb.c,v 1.60 2017/04/27 23:17:21 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ffb.c,v 1.61 2017/05/19 19:25:53 macallan Exp $"); #include #include @@ -100,7 +100,8 @@ struct wsscreen_descr ffb_stdscreen = { 0, 0, /* will be filled in -- XXX shouldn't, it's global. */ 0, 0, 0, - WSSCREEN_REVERSE | WSSCREEN_WSCOLORS, + WSSCREEN_REVERSE | WSSCREEN_WSCOLORS | WSSCREEN_UNDERLINE | + WSSCREEN_RESIZE, NULL /* modecookie */ }; @@ -131,7 +132,6 @@ static void ffb_ras_setfg(struct ffb_sof static void ffb_ras_setbg(struct ffb_softc *, int32_t); void ffb_clearscreen(struct ffb_softc *); -int ffb_load_font(void *, void *, struct wsdisplay_font *); void ffb_init_screen(void *, struct vcons_screen *, int, long *); int ffb_allocattr(void *, int, int, int, long *); @@ -338,6 +338,7 @@ ffb_attach(device_t self) /* we mess with ffb_console_screen only once */ if (sc->sc_console) { + ffb_console_screen.scr_flags = VCONS_SCREEN_IS_STATIC; vcons_init_screen(&sc->vd, &ffb_console_screen, 1, &defattr); SCREEN_VISIBLE((&ffb_console_screen)); /* @@ -345,7 +346,6 @@ ffb_attach(device_t self) * screen */ sc->vd.active = &ffb_console_screen; - ffb_console_screen.scr_flags = VCONS_SCREEN_IS_STATIC; } else { if (ffb_console_screen.scr_ri.ri_rows == 0) { /* do some minimal setup to avoid weirdnesses later */ @@ -357,7 +357,6 @@ ffb_attach(device_t self) ffb_stdscreen.nrows = ri->ri_rows; ffb_stdscreen.ncols = ri->ri_cols; ffb_stdscreen.textops = &ri->ri_ops; - ffb_stdscreen.capabilities = ri->ri_caps; sc->sc_fb.fb_driver = &ffb_fbdriver; sc->sc_fb.fb_type.fb_cmsize = 0; @@ -1255,7 +1
CVS commit: src/sys/dev/wsfb
Module Name:src Committed By: macallan Date: Fri May 19 19:23:25 UTC 2017 Modified Files: src/sys/dev/wsfb: genfb.c Log Message: enable font loading and screen resizing To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/dev/wsfb/genfb.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/wsfb/genfb.c diff -u src/sys/dev/wsfb/genfb.c:1.59 src/sys/dev/wsfb/genfb.c:1.60 --- src/sys/dev/wsfb/genfb.c:1.59 Sat Feb 25 01:11:55 2017 +++ src/sys/dev/wsfb/genfb.c Fri May 19 19:23:24 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: genfb.c,v 1.59 2017/02/25 01:11:55 nonaka Exp $ */ +/* $NetBSD: genfb.c,v 1.60 2017/05/19 19:23:24 macallan Exp $ */ /*- * Copyright (c) 2007 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.59 2017/02/25 01:11:55 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.60 2017/05/19 19:23:24 macallan Exp $"); #include #include @@ -235,7 +235,8 @@ genfb_attach(struct genfb_softc *sc, str 0, 0, NULL, 8, 16, - WSSCREEN_WSCOLORS | WSSCREEN_HILIT, + WSSCREEN_WSCOLORS | WSSCREEN_HILIT | WSSCREEN_UNDERLINE | + WSSCREEN_RESIZE, NULL }; sc->sc_screens[0] = &sc->sc_defaultscreen_descr; @@ -538,6 +539,8 @@ genfb_init_screen(void *cookie, struct v if (sc->sc_want_clear) ri->ri_flg |= RI_FULLCLEAR; + scr->scr_flags |= VCONS_LOADFONT; + if (sc->sc_shadowfb != NULL) { ri->ri_hwbits = (char *)sc->sc_fbaddr; ri->ri_bits = (char *)sc->sc_shadowfb; @@ -582,8 +585,8 @@ genfb_init_screen(void *cookie, struct v rasops_init(ri, 0, 0); - ri->ri_caps = WSSCREEN_WSCOLORS; - + ri->ri_caps = WSSCREEN_WSCOLORS | WSSCREEN_HILIT | WSSCREEN_UNDERLINE | + WSSCREEN_RESIZE; rasops_reconfig(ri, sc->sc_height / ri->ri_font->fontheight, sc->sc_width / ri->ri_font->fontwidth);
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: macallan Date: Fri May 19 19:22:33 UTC 2017 Modified Files: src/sys/dev/wscons: files.wscons wsdisplay.c wsdisplay_vcons.c wsdisplay_vconsvar.h wsdisplayvar.h wsemul_dumb.c wsemul_sun.c wsemul_vt100.c wsemul_vt100_subr.c wsemulvar.h Log Message: add support for loading fonts in vcons and subsequently resizing screens - drivers can use this by setting VCONS_LOADFONT and WSSCREEN_RESIZE - each vcons screen can now have its own font and geometry - while there, add support for xterm's ESC[18t to report the text buffer's size With this tou can: wsfontload -N foo /usr/share/wscons/fonts/flori.816 wsconsctl -dw font=foo currently this is limited to drivers that don't use the glyph cache, like genfb To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/dev/wscons/files.wscons cvs rdiff -u -r1.141 -r1.142 src/sys/dev/wscons/wsdisplay.c cvs rdiff -u -r1.36 -r1.37 src/sys/dev/wscons/wsdisplay_vcons.c cvs rdiff -u -r1.24 -r1.25 src/sys/dev/wscons/wsdisplay_vconsvar.h cvs rdiff -u -r1.51 -r1.52 src/sys/dev/wscons/wsdisplayvar.h cvs rdiff -u -r1.15 -r1.16 src/sys/dev/wscons/wsemul_dumb.c \ src/sys/dev/wscons/wsemulvar.h cvs rdiff -u -r1.29 -r1.30 src/sys/dev/wscons/wsemul_sun.c cvs rdiff -u -r1.37 -r1.38 src/sys/dev/wscons/wsemul_vt100.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/wscons/wsemul_vt100_subr.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/wscons/files.wscons diff -u src/sys/dev/wscons/files.wscons:1.49 src/sys/dev/wscons/files.wscons:1.50 --- src/sys/dev/wscons/files.wscons:1.49 Fri Oct 17 10:09:21 2014 +++ src/sys/dev/wscons/files.wscons Fri May 19 19:22:33 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.wscons,v 1.49 2014/10/17 10:09:21 uebayasi Exp $ +# $NetBSD: files.wscons,v 1.50 2017/05/19 19:22:33 macallan Exp $ # # "Workstation Console" glue; attaches frame buffer to emulator & keyboard, @@ -76,7 +76,7 @@ defflag opt_tpcalib.h TPCALIBDEBUG # generic virtual console support on bitmapped framebuffers file dev/wscons/wsdisplay_vcons.c vcons file dev/wscons/wsdisplay_vcons_util.c vcons -defflag opt_vcons.h VCONS_DRAW_INTR VCONS_INTR_DEBUG +defflag opt_vcons.h VCONS_DRAW_INTR VCONS_INTR_DEBUG VCONS_DEBUG # generic support code for caching rendered glyphs in video memory define glyphcache Index: src/sys/dev/wscons/wsdisplay.c diff -u src/sys/dev/wscons/wsdisplay.c:1.141 src/sys/dev/wscons/wsdisplay.c:1.142 --- src/sys/dev/wscons/wsdisplay.c:1.141 Wed Jan 25 15:40:31 2017 +++ src/sys/dev/wscons/wsdisplay.c Fri May 19 19:22:33 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay.c,v 1.141 2017/01/25 15:40:31 jakllsch Exp $ */ +/* $NetBSD: wsdisplay.c,v 1.142 2017/05/19 19:22:33 macallan Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.141 2017/01/25 15:40:31 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.142 2017/05/19 19:22:33 macallan Exp $"); #ifdef _KERNEL_OPT #include "opt_wsdisplay_compat.h" @@ -257,6 +257,9 @@ static void wsdisplay_switch2_cb(void *, static int wsdisplay_switch3(device_t, int, int); static void wsdisplay_switch3_cb(void *, int, int); +static void wsdisplay_swdone_cb(void *, int, int); +static int wsdisplay_dosync(struct wsdisplay_softc *, int); + int wsdisplay_clearonclose; struct wsscreen * @@ -331,6 +334,8 @@ wsscreen_detach(struct wsscreen *scr) &ccol, &crow); wsemul_drop(scr->scr_dconf->wsemul); } + if (scr->scr_dconf->scrdata->capabilities & WSSCREEN_FREE) + free(__UNCONST(scr->scr_dconf->scrdata), M_DEVBUF); free(scr->scr_dconf, M_DEVBUF); free(scr, M_DEVBUF); } @@ -342,7 +347,6 @@ wsdisplay_screentype_pick(const struct w const struct wsscreen_descr *scr; KASSERT(scrdata->nscreens > 0); - if (name == NULL) return (scrdata->screens[0]); @@ -377,6 +381,7 @@ wsdisplay_addscreen(struct wsdisplay_sof const char *screentype, const char *emul) { const struct wsscreen_descr *scrdesc; + struct wsscreen_descr *scrdescr2; int error; void *cookie; int ccol, crow; @@ -388,10 +393,24 @@ wsdisplay_addscreen(struct wsdisplay_sof return (EINVAL); if (sc->sc_scr[idx] != NULL) return (EBUSY); - scrdesc = wsdisplay_screentype_pick(sc->sc_scrdata, screentype); if (!scrdesc) return (ENXIO); + + /* + * if this screen can resize we need to copy the descr so each screen + * gets its own + */ + if (scrdesc->capabilities & WSSCREEN_RESIZE) { + /* we want per screen wsscreen_descr */ + scrdescr2 = malloc(sizeof(struct wsscreen_descr), M_DEVBUF, M_NOWAIT); + if (scrdescr2 == NULL) + return ENOMEM; + memcpy(scrdescr2, scrdesc, sizeof(struct wsscreen_descr)); + scrdescr2->capabilities |= WSSCREEN_FREE; + scrdesc = scrdescr2; + } + error = (*sc->sc_accessops->alloc_screen)(sc->sc_accesscook
CVS commit: src/sys/uvm
Module Name:src Committed By: kamil Date: Fri May 19 16:56:35 UTC 2017 Modified Files: src/sys/uvm: uvm_map.c Log Message: Add missing , to fix syntax Unbreaks build after recent change adding a message for vm.user_va0_disable To generate a diff of this commit: cvs rdiff -u -r1.347 -r1.348 src/sys/uvm/uvm_map.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_map.c diff -u src/sys/uvm/uvm_map.c:1.347 src/sys/uvm/uvm_map.c:1.348 --- src/sys/uvm/uvm_map.c:1.347 Fri May 19 15:30:19 2017 +++ src/sys/uvm/uvm_map.c Fri May 19 16:56:35 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.347 2017/05/19 15:30:19 chs Exp $ */ +/* $NetBSD: uvm_map.c,v 1.348 2017/05/19 16:56:35 kamil Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.347 2017/05/19 15:30:19 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.348 2017/05/19 16:56:35 kamil Exp $"); #include "opt_ddb.h" #include "opt_pax.h" @@ -1068,7 +1068,7 @@ uvm_map(struct vm_map *map, vaddr_t *sta if ((flags & UVM_FLAG_FIXED) && *startp == 0 && !VM_MAP_IS_KERNEL(map) && user_va0_disable) { uprintf("%s: process wants to map virtual address 0; see " - "vm.user_va0_disable in sysctl(7).\n" __func__); + "vm.user_va0_disable in sysctl(7).\n", __func__); return EACCES; } #endif
CVS commit: src/sys/uvm
Module Name:src Committed By: chs Date: Fri May 19 15:30:19 UTC 2017 Modified Files: src/sys/uvm: uvm_map.c uvm_mmap.c Log Message: make MAP_FIXED mapping operations atomic. fixes PR 52239. previously, unmapping any entries being replaced was done separately from entering the new mapping, which allowed another thread doing a non-MAP_FIXED mapping to allocate the range out from under the MAP_FIXED thread. To generate a diff of this commit: cvs rdiff -u -r1.346 -r1.347 src/sys/uvm/uvm_map.c cvs rdiff -u -r1.164 -r1.165 src/sys/uvm/uvm_mmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_map.c diff -u src/sys/uvm/uvm_map.c:1.346 src/sys/uvm/uvm_map.c:1.347 --- src/sys/uvm/uvm_map.c:1.346 Fri May 19 14:42:00 2017 +++ src/sys/uvm/uvm_map.c Fri May 19 15:30:19 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.346 2017/05/19 14:42:00 christos Exp $ */ +/* $NetBSD: uvm_map.c,v 1.347 2017/05/19 15:30:19 chs Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.346 2017/05/19 14:42:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.347 2017/05/19 15:30:19 chs Exp $"); #include "opt_ddb.h" #include "opt_pax.h" @@ -1163,8 +1163,25 @@ retry: } vm_map_lock(map); /* could sleep here */ } - prev_entry = uvm_map_findspace(map, start, size, &start, - uobj, uoffset, align, flags); + if (flags & UVM_FLAG_FIXED) { + KASSERT((flags & UVM_FLAG_NOWAIT) == 0); + + /* + * Set prev_entry to what it will need to be after any existing + * entries are removed later in uvm_map_enter(). + */ + + if (uvm_map_lookup_entry(map, start, &prev_entry)) { + if (start == prev_entry->start) +prev_entry = prev_entry->prev; + else +UVM_MAP_CLIP_END(map, prev_entry, start); + SAVE_HINT(map, map->hint, prev_entry); + } + } else { + prev_entry = uvm_map_findspace(map, start, size, &start, + uobj, uoffset, align, flags); + } if (prev_entry == NULL) { unsigned int timestamp; @@ -1255,7 +1272,7 @@ uvm_map_enter(struct vm_map *map, const struct vm_map_entry *new_entry) { struct vm_map_entry *prev_entry = args->uma_prev; - struct vm_map_entry *dead = NULL; + struct vm_map_entry *dead = NULL, *dead_entries = NULL; const uvm_flag_t flags = args->uma_flags; const vm_prot_t prot = UVM_PROTECTION(flags); @@ -1284,6 +1301,8 @@ uvm_map_enter(struct vm_map *map, const KASSERT(map->hint == prev_entry); /* bimerge case assumes this */ KASSERT(vm_map_locked_p(map)); + KASSERT((flags & (UVM_FLAG_NOWAIT | UVM_FLAG_FIXED)) != + (UVM_FLAG_NOWAIT | UVM_FLAG_FIXED)); if (uobj) newetype = UVM_ET_OBJ; @@ -1297,6 +1316,27 @@ uvm_map_enter(struct vm_map *map, const } /* + * For fixed mappings, remove any old entries now. Adding the new + * entry cannot fail because that can only happen if UVM_FLAG_NOWAIT + * is set, and we do not support nowait and fixed together. + */ + + if (flags & UVM_FLAG_FIXED) { + uvm_unmap_remove(map, start, start + size, &dead_entries, 0); +#ifdef DEBUG + struct vm_map_entry *tmp_entry; + bool rv; + + rv = uvm_map_lookup_entry(map, start, &tmp_entry); + KASSERT(!rv); + KASSERTMSG(prev_entry == tmp_entry, + "args %p prev_entry %p tmp_entry %p", + args, prev_entry, tmp_entry); +#endif + SAVE_HINT(map, map->hint, prev_entry); + } + + /* * try and insert in map by extending previous entry, if possible. * XXX: we don't try and pull back the next entry. might be useful * for a stack, but we are currently allocating our stack in advance. @@ -1569,17 +1609,19 @@ nomerge: UVMHIST_LOG(maphist,"<- done!", 0, 0, 0, 0); error = 0; + done: vm_map_unlock(map); if (new_entry) { uvm_mapent_free(new_entry); } - if (dead) { KDASSERT(merged); uvm_mapent_free(dead); } + if (dead_entries) + uvm_unmap_detach(dead_entries, 0); return error; } Index: src/sys/uvm/uvm_mmap.c diff -u src/sys/uvm/uvm_mmap.c:1.164 src/sys/uvm/uvm_mmap.c:1.165 --- src/sys/uvm/uvm_mmap.c:1.164 Sat May 6 21:34:52 2017 +++ src/sys/uvm/uvm_mmap.c Fri May 19 15:30:19 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_mmap.c,v 1.164 2017/05/06 21:34:52 joerg Exp $ */ +/* $NetBSD: uvm_mmap.c,v 1.165 2017/05/19 15:30:19 chs Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -46,7 +46,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_mmap.c,v 1.164 2017/05/06 21:34:52 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_mmap.c,v 1.165 2017/05/19 15:30:19 chs Exp $"); #include "opt_compat_netbsd.h" #include "opt_pax.h" @@ -924,7 +924,7 @@ uvm_mmap(struct vm_map *map, vaddr_t *ad /* * for non-fixed mappings, round off the suggested address. - * for fixed mappings, check alignment and zap old mappings. + * for fixed mappings, check alignment. */ if ((flags & MAP_F
CVS commit: src/distrib
Module Name:src Committed By: christos Date: Fri May 19 15:16:12 UTC 2017 Modified Files: src/distrib/amd64/installimage: Makefile src/distrib/i386/installimage: Makefile Log Message: Bump a little to handle clang images. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/distrib/amd64/installimage/Makefile cvs rdiff -u -r1.9 -r1.10 src/distrib/i386/installimage/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/amd64/installimage/Makefile diff -u src/distrib/amd64/installimage/Makefile:1.7 src/distrib/amd64/installimage/Makefile:1.8 --- src/distrib/amd64/installimage/Makefile:1.7 Thu May 11 06:49:18 2017 +++ src/distrib/amd64/installimage/Makefile Fri May 19 11:16:12 2017 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.7 2017/05/11 10:49:18 martin Exp $ +# $NetBSD: Makefile,v 1.8 2017/05/19 15:16:12 christos Exp $ .include INSTIMGBASE= NetBSD-${DISTRIBVER}-amd64-install # gives ${IMGBASE}.img BOOTDISK= sd0 # for USB flash etc. -INSTIMAGEMB?= 1300 # for all installation binaries +INSTIMAGEMB?= 1400 # for all installation binaries PRIMARY_BOOT= bootxx_ffsv1 SECONDARY_BOOT= boot Index: src/distrib/i386/installimage/Makefile diff -u src/distrib/i386/installimage/Makefile:1.9 src/distrib/i386/installimage/Makefile:1.10 --- src/distrib/i386/installimage/Makefile:1.9 Sat Feb 20 11:40:15 2016 +++ src/distrib/i386/installimage/Makefile Fri May 19 11:16:12 2017 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.9 2016/02/20 16:40:15 christos Exp $ +# $NetBSD: Makefile,v 1.10 2017/05/19 15:16:12 christos Exp $ .include INSTIMGBASE= NetBSD-${DISTRIBVER}-i386-install # gives ${IMGBASE}.img BOOTDISK= sd0 # for USB flash etc. -INSTIMAGEMB?= 1200 # for all installation binaries +INSTIMAGEMB?= 1300 # for all installation binaries PRIMARY_BOOT= bootxx_ffsv1 SECONDARY_BOOT= boot
CVS commit: src/sys/uvm
Module Name:src Committed By: christos Date: Fri May 19 14:42:01 UTC 2017 Modified Files: src/sys/uvm: uvm_map.c Log Message: mention the man page instead of the command. To generate a diff of this commit: cvs rdiff -u -r1.345 -r1.346 src/sys/uvm/uvm_map.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_map.c diff -u src/sys/uvm/uvm_map.c:1.345 src/sys/uvm/uvm_map.c:1.346 --- src/sys/uvm/uvm_map.c:1.345 Fri May 19 10:38:46 2017 +++ src/sys/uvm/uvm_map.c Fri May 19 10:42:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.345 2017/05/19 14:38:46 christos Exp $ */ +/* $NetBSD: uvm_map.c,v 1.346 2017/05/19 14:42:00 christos Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.345 2017/05/19 14:38:46 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.346 2017/05/19 14:42:00 christos Exp $"); #include "opt_ddb.h" #include "opt_pax.h" @@ -1067,9 +1067,8 @@ uvm_map(struct vm_map *map, vaddr_t *sta #ifndef __USER_VA0_IS_SAFE if ((flags & UVM_FLAG_FIXED) && *startp == 0 && !VM_MAP_IS_KERNEL(map) && user_va0_disable) { - uprintf("%s: process wants to map page 0; " - "run 'sysctl -w vm.user_va0_disable=0' to enable access.\n", - __func__); + uprintf("%s: process wants to map virtual address 0; see " + "vm.user_va0_disable in sysctl(7).\n" __func__); return EACCES; } #endif
CVS commit: src/sys/uvm
Module Name:src Committed By: christos Date: Fri May 19 14:38:46 UTC 2017 Modified Files: src/sys/uvm: uvm_map.c Log Message: Provide a helpful message to the user trying to run an birary that needs page 0 access. To generate a diff of this commit: cvs rdiff -u -r1.344 -r1.345 src/sys/uvm/uvm_map.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_map.c diff -u src/sys/uvm/uvm_map.c:1.344 src/sys/uvm/uvm_map.c:1.345 --- src/sys/uvm/uvm_map.c:1.344 Sat May 6 17:34:52 2017 +++ src/sys/uvm/uvm_map.c Fri May 19 10:38:46 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.344 2017/05/06 21:34:52 joerg Exp $ */ +/* $NetBSD: uvm_map.c,v 1.345 2017/05/19 14:38:46 christos Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.344 2017/05/06 21:34:52 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.345 2017/05/19 14:38:46 christos Exp $"); #include "opt_ddb.h" #include "opt_pax.h" @@ -1066,8 +1066,12 @@ uvm_map(struct vm_map *map, vaddr_t *sta #ifndef __USER_VA0_IS_SAFE if ((flags & UVM_FLAG_FIXED) && *startp == 0 && - !VM_MAP_IS_KERNEL(map) && user_va0_disable) + !VM_MAP_IS_KERNEL(map) && user_va0_disable) { + uprintf("%s: process wants to map page 0; " + "run 'sysctl -w vm.user_va0_disable=0' to enable access.\n", + __func__); return EACCES; + } #endif /*
CVS commit: src/share/man/man9
Module Name:src Committed By: abhinav Date: Fri May 19 14:35:01 UTC 2017 Modified Files: src/share/man/man9: do_setresuid.9 Log Message: Remove reference to suser(9), its man page was removed quite long back. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/do_setresuid.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/do_setresuid.9 diff -u src/share/man/man9/do_setresuid.9:1.5 src/share/man/man9/do_setresuid.9:1.6 --- src/share/man/man9/do_setresuid.9:1.5 Tue Sep 17 19:58:03 2013 +++ src/share/man/man9/do_setresuid.9 Fri May 19 14:35:01 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: do_setresuid.9,v 1.5 2013/09/17 19:58:03 wiz Exp $ +.\" $NetBSD: do_setresuid.9,v 1.6 2017/05/19 14:35:01 abhinav Exp $ .\" .\"- .\" Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -84,8 +84,7 @@ These functions are implemented in: .Sh SEE ALSO .Xr setregid 2 , .Xr setreuid 2 , -.Xr setuid 2 , -.Xr suser 9 +.Xr setuid 2 .Sh HISTORY Implemented for .Nx 2.0
CVS commit: src/share/man/man9
Module Name:src Committed By: abhinav Date: Fri May 19 14:28:59 UTC 2017 Modified Files: src/share/man/man9: intro.9 Log Message: Remove reference to pathname(9), its man page was removed 10 years ago. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/share/man/man9/intro.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/intro.9 diff -u src/share/man/man9/intro.9:1.16 src/share/man/man9/intro.9:1.17 --- src/share/man/man9/intro.9:1.16 Mon Mar 23 13:40:34 2015 +++ src/share/man/man9/intro.9 Fri May 19 14:28:59 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: intro.9,v 1.16 2015/03/23 13:40:34 riastradh Exp $ +.\" $NetBSD: intro.9,v 1.17 2017/05/19 14:28:59 abhinav Exp $ .\" .\" Copyright (c) 1997, 2007 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -162,8 +162,7 @@ See Pathname lookup, cache and management. See .Xr namei 9 , -.Xr namecache 9 , -.Xr pathname 9 . +.Xr namecache 9 . .Pp Kernel interface to file systems. See
CVS commit: src/share/man/man4
Module Name:src Committed By: abhinav Date: Fri May 19 14:18:41 UTC 2017 Modified Files: src/share/man/man4: options.4 Log Message: Correct the xref: return_address(9) is only available for i386. To generate a diff of this commit: cvs rdiff -u -r1.465 -r1.466 src/share/man/man4/options.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/options.4 diff -u src/share/man/man4/options.4:1.465 src/share/man/man4/options.4:1.466 --- src/share/man/man4/options.4:1.465 Thu Mar 9 11:39:43 2017 +++ src/share/man/man4/options.4 Fri May 19 14:18:41 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: options.4,v 1.465 2017/03/09 11:39:43 wiz Exp $ +.\" $NetBSD: options.4,v 1.466 2017/05/19 14:18:41 abhinav Exp $ .\" .\" Copyright (c) 1996 .\" Perry E. Metzger. All rights reserved. @@ -1321,7 +1321,7 @@ changes the current CPU's interrupt prio .Dv IPL_HIGH , record a backtrace. Read -.Xr return_address 9 +.Xr i386/return_address 9 for caveats about collecting backtraces. This feature is experimental, and it is only available on i386. See
CVS commit: src/sys/dev/pci
Module Name:src Committed By: nonaka Date: Fri May 19 14:18:10 UTC 2017 Modified Files: src/sys/dev/pci: if_iwm.c Log Message: iwm(4): match Wireless 8265 device. To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/dev/pci/if_iwm.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_iwm.c diff -u src/sys/dev/pci/if_iwm.c:1.71 src/sys/dev/pci/if_iwm.c:1.72 --- src/sys/dev/pci/if_iwm.c:1.71 Tue Mar 14 23:59:26 2017 +++ src/sys/dev/pci/if_iwm.c Fri May 19 14:18:10 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_iwm.c,v 1.71 2017/03/14 23:59:26 nonaka Exp $ */ +/* $NetBSD: if_iwm.c,v 1.72 2017/05/19 14:18:10 nonaka Exp $ */ /* OpenBSD: if_iwm.c,v 1.148 2016/11/19 21:07:08 stsp Exp */ #define IEEE80211_NO_HT /* @@ -106,7 +106,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.71 2017/03/14 23:59:26 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.72 2017/05/19 14:18:10 nonaka Exp $"); #include #include @@ -7725,6 +7725,7 @@ static const pci_product_id_t iwm_device PCI_PRODUCT_INTEL_WIFI_LINK_8260_2, PCI_PRODUCT_INTEL_WIFI_LINK_4165_1, PCI_PRODUCT_INTEL_WIFI_LINK_4165_2, + PCI_PRODUCT_INTEL_WIFI_LINK_8265, }; static int
CVS commit: src/share/man/man4/man4.vax
Module Name:src Committed By: abhinav Date: Fri May 19 13:49:25 UTC 2017 Modified Files: src/share/man/man4/man4.vax: mt.4 Log Message: Correct xrefs. Ok christos To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/share/man/man4/man4.vax/mt.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/man4.vax/mt.4 diff -u src/share/man/man4/man4.vax/mt.4:1.12 src/share/man/man4/man4.vax/mt.4:1.13 --- src/share/man/man4/man4.vax/mt.4:1.12 Sat Feb 18 22:39:01 2017 +++ src/share/man/man4/man4.vax/mt.4 Fri May 19 13:49:25 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: mt.4,v 1.12 2017/02/18 22:39:01 wiz Exp $ +.\" $NetBSD: mt.4,v 1.13 2017/05/19 13:49:25 abhinav Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -45,7 +45,7 @@ The .Tn TM-78 Ns / Ns Tn TU-78 combination provides a standard tape drive interface as described in -.Xr vax/mtio 4 . +.Xr mtio 4 . Only 1600 and 6250 .Tn BPI are supported; the @@ -90,8 +90,8 @@ non-raw tape was used in the access it i .El .Sh SEE ALSO .Xr tar 1 , -.Xr vax/mt 1 , -.Xr vax/mtio 4 , +.Xr mt 1 , +.Xr mtio 4 , .Xr vax/tm 4 , .Xr vax/ts 4 , .Xr vax/ut 4
CVS commit: src/sys/sys
Module Name:src Committed By: pgoyette Date: Fri May 19 11:45:40 UTC 2017 Modified Files: src/sys/sys: localcount.h Log Message: The DEVSW_MODULE_INIT stuff is for possible future use; remove it for now. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/sys/localcount.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/localcount.h diff -u src/sys/sys/localcount.h:1.2 src/sys/sys/localcount.h:1.3 --- src/sys/sys/localcount.h:1.2 Fri May 19 00:01:34 2017 +++ src/sys/sys/localcount.h Fri May 19 11:45:40 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: localcount.h,v 1.2 2017/05/19 00:01:34 pgoyette Exp $ */ +/* $NetBSD: localcount.h,v 1.3 2017/05/19 11:45:40 pgoyette Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -55,11 +55,4 @@ void localcount_acquire(struct localcoun void localcount_release(struct localcount *, struct kcondvar *, struct kmutex *); -#ifdef _MODULE -#define DEVSW_MODULE_INIT \ - .d_localcount = &(struct localcount){NULL, NULL}, -#else -#define DEVSW_MODULE_INIT -#endif - #endif /* _SYS_LOCALCOUNT_H */
CVS commit: src/share/man/man9
Module Name:src Committed By: pgoyette Date: Fri May 19 11:12:50 UTC 2017 Modified Files: src/share/man/man9: localcount.9 Log Message: Identify TNF as the copyright holder. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/localcount.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/localcount.9 diff -u src/share/man/man9/localcount.9:1.4 src/share/man/man9/localcount.9:1.5 --- src/share/man/man9/localcount.9:1.4 Fri May 19 10:38:21 2017 +++ src/share/man/man9/localcount.9 Fri May 19 11:12:50 2017 @@ -1,6 +1,6 @@ -.\" $NetBSD: localcount.9,v 1.4 2017/05/19 10:38:21 wiz Exp $ +.\" $NetBSD: localcount.9,v 1.5 2017/05/19 11:12:50 pgoyette Exp $ .\" -.\" Copyright (c) 2016 +.\" Copyright (c) 2016 The NetBSD Foundation .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Fri May 19 10:38:21 UTC 2017 Modified Files: src/share/man/man9: localcount.9 Log Message: Cleanups and standardization. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man9/localcount.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/localcount.9 diff -u src/share/man/man9/localcount.9:1.3 src/share/man/man9/localcount.9:1.4 --- src/share/man/man9/localcount.9:1.3 Fri May 19 01:54:50 2017 +++ src/share/man/man9/localcount.9 Fri May 19 10:38:21 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: localcount.9,v 1.3 2017/05/19 01:54:50 pgoyette Exp $ +.\" $NetBSD: localcount.9,v 1.4 2017/05/19 10:38:21 wiz Exp $ .\" .\" Copyright (c) 2016 .\" All rights reserved. @@ -37,6 +37,7 @@ .Nm localcount_acquire , .Nm localcount_release , .Nm localcount_drain +.Nd reference-count primitives .Sh SYNOPSIS .In sys/localcount.h .Ft int @@ -85,9 +86,8 @@ network flows) and on which there may be such as xyzread for a device xyz(4), and short-term fast operations, such as .Dv xyzioctl(IOC_READ_A_CPU_REG) . .Sh FUNCTIONS -.Bl -tag -width abcd +.Bl -tag -width 32n .It Fn localcount_init "lc" -.Pp Dynamically initialize localcount .Ar lc for use. @@ -95,7 +95,6 @@ for use. No other operations can be performed on a localcount until it has been initialized. .It Fn localcount_fini "lc" -.Pp Release resources used by localcount .Ar lc . The caller must have already called @@ -105,30 +104,28 @@ The localcount may not be used after has been called until it has been re-initialized by .Fn localcount_init . .It Fn localcount_acquire "lc" -.Pp Acquire a reference to the localcount .Ar lc . .It Fn localcount_release "lc" "cv" "mtx" -.Pp Release a reference to the localcount .Ar lc . If the localcount is currently being drained, the mutex .Ar mtx -will be used to synchronize updates to the global reference count (i.e. +will be used to synchronize updates to the global reference count (i.e., the total across all CPUs). If the reference count goes to zero, .Fn localcount_release will broadcast availability of the condvar .Ar cv . .It Fn localcount_drain "lc" "cv" "mtx" -.Pp Wait for all references to the localcount .Ar lc to be released. The caller must hold the mutex .Ar mtx ; the mutex will be released during inter-CPU cross-calls (see -.Xr xcall 9 ) and while waiting on the condvar +.Xr xcall 9 ) +and while waiting on the condvar .Ar cv . The same .Ar cv @@ -138,7 +135,8 @@ must be used with .Fn localcount_release . .Pp The caller must guarantee that no new references can be acquired with -localcount_acquire before calling +.Fn localcount_acquire +before calling .Fn localcount_drain . For example, any object that may be found in a list and acquired must be removed from the list before calling @@ -150,6 +148,7 @@ is passed to it must be passed to .Fn localcount_fini before any other re-use. +.El .Sh CODE REFERENCES The core of the localcount implementation is located in .Pa sys/kern/subr_localcount.c . @@ -162,7 +161,6 @@ code must provide to support localcounts .Xr atomic_ops 3 , .Xr condvar 9 , .Xr mutex 9 , -and .Xr psref 9 .Sh HISTORY The localcount primitives first appeared in @@ -189,4 +187,3 @@ Once the has been drained, no further operations are allowed until the .Nm has been re-initialized. -
CVS commit: src/sys/dev/usb
Module Name:src Committed By: nat Date: Fri May 19 09:58:28 UTC 2017 Modified Files: src/sys/dev/usb: uaudio.c Log Message: Fix locking around calls to [p/r]int with a patch from skrll@. To generate a diff of this commit: cvs rdiff -u -r1.150 -r1.151 src/sys/dev/usb/uaudio.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/uaudio.c diff -u src/sys/dev/usb/uaudio.c:1.150 src/sys/dev/usb/uaudio.c:1.151 --- src/sys/dev/usb/uaudio.c:1.150 Fri May 19 04:20:45 2017 +++ src/sys/dev/usb/uaudio.c Fri May 19 09:58:28 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: uaudio.c,v 1.150 2017/05/19 04:20:45 nat Exp $ */ +/* $NetBSD: uaudio.c,v 1.151 2017/05/19 09:58:28 nat Exp $ */ /* * Copyright (c) 1999, 2012 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.150 2017/05/19 04:20:45 nat Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.151 2017/05/19 09:58:28 nat Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -2888,15 +2888,17 @@ uaudio_chan_pintr(struct usbd_xfer *xfer } #endif + mutex_enter(&ch->sc->sc_intr_lock); ch->transferred += cb->size; /* Call back to upper layer */ while (ch->transferred >= ch->blksize) { - mutex_enter(&ch->sc->sc_intr_lock); ch->transferred -= ch->blksize; DPRINTFN(5, "call %p(%p)\n", ch->intr, ch->arg); - ch->intr(ch->arg); mutex_exit(&ch->sc->sc_intr_lock); + ch->intr(ch->arg); + mutex_enter(&ch->sc->sc_intr_lock); } + mutex_exit(&ch->sc->sc_intr_lock); /* start next transfer */ uaudio_chan_ptransfer(ch); @@ -2990,14 +2992,16 @@ uaudio_chan_rintr(struct usbd_xfer *xfer } /* Call back to upper layer */ + mutex_enter(&ch->sc->sc_intr_lock); ch->transferred += count; while (ch->transferred >= ch->blksize) { - mutex_enter(&ch->sc->sc_intr_lock); ch->transferred -= ch->blksize; DPRINTFN(5, "call %p(%p)\n", ch->intr, ch->arg); - ch->intr(ch->arg); mutex_exit(&ch->sc->sc_intr_lock); + ch->intr(ch->arg); + mutex_enter(&ch->sc->sc_intr_lock); } + mutex_exit(&ch->sc->sc_intr_lock); /* start next transfer */ uaudio_chan_rtransfer(ch);
CVS commit: src/sys
Module Name:src Committed By: ozaki-r Date: Fri May 19 08:53:51 UTC 2017 Modified Files: src/sys/net: if.c if.h src/sys/netinet: ip_carp.c Log Message: Allow CARP to call the link_state_change handler immediately If the handler is delayed because of the indirection call via softint, some operations are executed in reverse and may cause unexpected behaviors. For example, due to the issue a GARP packet wasn't sent on a transition from the BACKUP state to the MASTER state; this happened because IN_IFF_DETACHED flag wasn't cleared on arpannounce, which had been cleared in the link_state_change handler. This fixes an issue reported by sborrill@ on tech-net: http://mail-index.netbsd.org/tech-net/2017/03/14/msg006283.html To generate a diff of this commit: cvs rdiff -u -r1.392 -r1.393 src/sys/net/if.c cvs rdiff -u -r1.238 -r1.239 src/sys/net/if.h cvs rdiff -u -r1.89 -r1.90 src/sys/netinet/ip_carp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if.c diff -u src/sys/net/if.c:1.392 src/sys/net/if.c:1.393 --- src/sys/net/if.c:1.392 Thu Apr 6 09:20:07 2017 +++ src/sys/net/if.c Fri May 19 08:53:51 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.392 2017/04/06 09:20:07 ozaki-r Exp $ */ +/* $NetBSD: if.c,v 1.393 2017/05/19 08:53:51 ozaki-r Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.392 2017/04/06 09:20:07 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.393 2017/05/19 08:53:51 ozaki-r Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -2247,16 +2247,20 @@ out: /* * Handle interface link state change notifications. - * Must be called at splnet(). */ -static void -if_link_state_change0(struct ifnet *ifp, int link_state) +void +if_link_state_change_softint(struct ifnet *ifp, int link_state) { struct domain *dp; + int s = splnet(); + + KASSERT(!cpu_intr_p()); /* Ensure the change is still valid. */ - if (ifp->if_link_state == link_state) + if (ifp->if_link_state == link_state) { + splx(s); return; + } #ifdef DEBUG log(LOG_DEBUG, "%s: link state %s (was %s)\n", ifp->if_xname, @@ -2301,6 +2305,7 @@ if_link_state_change0(struct ifnet *ifp, if (dp->dom_if_link_state_change != NULL) dp->dom_if_link_state_change(ifp, link_state); } + splx(s); } /* @@ -2321,7 +2326,7 @@ if_link_state_change_si(void *arg) /* Pop a link state change from the queue and process it. */ LQ_POP(ifp->if_link_queue, state); - if_link_state_change0(ifp, state); + if_link_state_change_softint(ifp, state); /* If there is a link state change to come, schedule it. */ if (LQ_ITEM(ifp->if_link_queue, 0) != LINK_STATE_UNSET) Index: src/sys/net/if.h diff -u src/sys/net/if.h:1.238 src/sys/net/if.h:1.239 --- src/sys/net/if.h:1.238 Thu Apr 6 03:54:59 2017 +++ src/sys/net/if.h Fri May 19 08:53:51 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if.h,v 1.238 2017/04/06 03:54:59 ozaki-r Exp $ */ +/* $NetBSD: if.h,v 1.239 2017/05/19 08:53:51 ozaki-r Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -956,6 +956,7 @@ void if_purgeaddrs(struct ifnet *, int, void if_detach(struct ifnet *); void if_down(struct ifnet *); void if_link_state_change(struct ifnet *, int); +void if_link_state_change_softint(struct ifnet *, int); void if_up(struct ifnet *); void ifinit(void); void ifinit1(void); Index: src/sys/netinet/ip_carp.c diff -u src/sys/netinet/ip_carp.c:1.89 src/sys/netinet/ip_carp.c:1.90 --- src/sys/netinet/ip_carp.c:1.89 Fri May 12 17:53:54 2017 +++ src/sys/netinet/ip_carp.c Fri May 19 08:53:51 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_carp.c,v 1.89 2017/05/12 17:53:54 ryo Exp $ */ +/* $NetBSD: ip_carp.c,v 1.90 2017/05/19 08:53:51 ozaki-r Exp $ */ /* $OpenBSD: ip_carp.c,v 1.113 2005/11/04 08:11:54 mcbride Exp $ */ /* @@ -33,7 +33,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.89 2017/05/12 17:53:54 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.90 2017/05/19 08:53:51 ozaki-r Exp $"); /* * TODO: @@ -2191,7 +2191,7 @@ carp_set_state(struct carp_softc *sc, in link_state = LINK_STATE_UNKNOWN; break; } - if_link_state_change(&sc->sc_if, link_state); + if_link_state_change_softint(&sc->sc_if, link_state); } void
CVS commit: src/sys/arch/mips/ingenic
Module Name:src Committed By: skrll Date: Fri May 19 07:43:31 UTC 2017 Modified Files: src/sys/arch/mips/ingenic: apbus.c ingenic_com.c ingenic_dme.c jzfb_regs.h jziic.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/mips/ingenic/apbus.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/ingenic/ingenic_com.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/ingenic/ingenic_dme.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/ingenic/jzfb_regs.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/ingenic/jziic.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/ingenic/apbus.c diff -u src/sys/arch/mips/ingenic/apbus.c:1.18 src/sys/arch/mips/ingenic/apbus.c:1.19 --- src/sys/arch/mips/ingenic/apbus.c:1.18 Thu Oct 8 17:54:30 2015 +++ src/sys/arch/mips/ingenic/apbus.c Fri May 19 07:43:31 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: apbus.c,v 1.18 2015/10/08 17:54:30 macallan Exp $ */ +/* $NetBSD: apbus.c,v 1.19 2017/05/19 07:43:31 skrll Exp $ */ /*- * Copyright (c) 2014 Michael Lorenz @@ -25,11 +25,11 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ - + /* catch-all for on-chip peripherals */ #include -__KERNEL_RCSID(0, "$NetBSD: apbus.c,v 1.18 2015/10/08 17:54:30 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: apbus.c,v 1.19 2017/05/19 07:43:31 skrll Exp $"); #include "locators.h" #define _MIPS_BUS_DMA_PRIVATE @@ -264,7 +264,7 @@ apbus_attach(device_t parent, device_t s reg &= ~adv->clk1; writereg(JZ_CLKGR1, reg); } - + (void) config_found_ia(self, "apbus", &aa, apbus_print); } } Index: src/sys/arch/mips/ingenic/ingenic_com.c diff -u src/sys/arch/mips/ingenic/ingenic_com.c:1.5 src/sys/arch/mips/ingenic/ingenic_com.c:1.6 --- src/sys/arch/mips/ingenic/ingenic_com.c:1.5 Sat Jul 11 19:00:04 2015 +++ src/sys/arch/mips/ingenic/ingenic_com.c Fri May 19 07:43:31 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ingenic_com.c,v 1.5 2015/07/11 19:00:04 macallan Exp $ */ +/* $NetBSD: ingenic_com.c,v 1.6 2017/05/19 07:43:31 skrll Exp $ */ /*- * Copyright (c) 2014 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ingenic_com.c,v 1.5 2015/07/11 19:00:04 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ingenic_com.c,v 1.6 2017/05/19 07:43:31 skrll Exp $"); #include #include @@ -112,7 +112,7 @@ ingenic_putchar_init(void) com0addr[com_lctl] = htole32(LCR_8BITS); /* XXX */ com0addr[com_mcr] = htole32(MCR_DTR|MCR_RTS); com0addr[com_fifo] = htole32( - FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST | + FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST | FIFO_TRIGGER_1 | FIFO_UART_ON); #if 0 } @@ -149,7 +149,7 @@ void ingenic_com_cnattach(void) { int i; - + bus_space_map(apbus_memt, JZ_UART0, 0x100, 0, ®h); cons_com = JZ_UART0; memset(®s, 0, sizeof(regs)); Index: src/sys/arch/mips/ingenic/ingenic_dme.c diff -u src/sys/arch/mips/ingenic/ingenic_dme.c:1.2 src/sys/arch/mips/ingenic/ingenic_dme.c:1.3 --- src/sys/arch/mips/ingenic/ingenic_dme.c:1.2 Thu Oct 8 17:55:58 2015 +++ src/sys/arch/mips/ingenic/ingenic_dme.c Fri May 19 07:43:31 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ingenic_dme.c,v 1.2 2015/10/08 17:55:58 macallan Exp $ */ +/* $NetBSD: ingenic_dme.c,v 1.3 2017/05/19 07:43:31 skrll Exp $ */ /*- * Copyright (c) 2015 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ingenic_dme.c,v 1.2 2015/10/08 17:55:58 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ingenic_dme.c,v 1.3 2017/05/19 07:43:31 skrll Exp $"); #include #include @@ -160,7 +160,7 @@ fail: static int ingenic_dme_intr(void *arg) { - uint32_t reg; + uint32_t reg; int ret = 0; /* see if it's us */ Index: src/sys/arch/mips/ingenic/jzfb_regs.h diff -u src/sys/arch/mips/ingenic/jzfb_regs.h:1.1 src/sys/arch/mips/ingenic/jzfb_regs.h:1.2 --- src/sys/arch/mips/ingenic/jzfb_regs.h:1.1 Thu Apr 7 01:00:05 2016 +++ src/sys/arch/mips/ingenic/jzfb_regs.h Fri May 19 07:43:31 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: jzfb_regs.h,v 1.1 2016/04/07 01:00:05 macallan Exp $ */ +/* $NetBSD: jzfb_regs.h,v 1.2 2017/05/19 07:43:31 skrll Exp $ */ /*- * Copyright (c) 2015 Michael Lorenz @@ -86,4 +86,4 @@ #define JZ_LCDENH_GAMMA 0x0800 #define JZ_LCDENH_VEE 0x1000 -#endif /* JZFB_REGS_H */ \ No newline at end of file +#endif /* JZFB_REGS_H */ Index: src/sys/arch/mips/ingenic/jziic.c diff -u src/sys/arch/mips/ingenic/jziic.c:1.3 src/sys/arch/mips/ingenic/jziic.c:1.4 --- src/sys/arch/mips/ingenic/jziic.c:1.3 Mon Dec 14 23:21:23 2015 +++ src/sys/arch/mips/ingenic/jziic.c Fri May 19 07:43:31 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: jziic.c,v 1.3 2015/12/14 23:21:23 macallan Exp $ */ +/* $NetBSD: jziic.c,v 1.4 2017/05/19 07:43:31 skrll Exp $ */ /*- * Copyright (c) 2015 Michael Lorenz @@ -27,12 +27,12 @@ */ #include -__KERNEL_RCSID(0,
CVS commit: src/sys/arch/evbmips/ingenic
Module Name:src Committed By: skrll Date: Fri May 19 07:40:58 UTC 2017 Modified Files: src/sys/arch/evbmips/ingenic: autoconf.c clock.c cpu.c machdep.c mainbus.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbmips/ingenic/autoconf.c \ src/sys/arch/evbmips/ingenic/cpu.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbmips/ingenic/clock.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbmips/ingenic/machdep.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbmips/ingenic/mainbus.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/evbmips/ingenic/autoconf.c diff -u src/sys/arch/evbmips/ingenic/autoconf.c:1.2 src/sys/arch/evbmips/ingenic/autoconf.c:1.3 --- src/sys/arch/evbmips/ingenic/autoconf.c:1.2 Thu Oct 8 17:51:15 2015 +++ src/sys/arch/evbmips/ingenic/autoconf.c Fri May 19 07:40:58 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.2 2015/10/08 17:51:15 macallan Exp $ */ +/* $NetBSD: autoconf.c,v 1.3 2017/05/19 07:40:58 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.2 2015/10/08 17:51:15 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.3 2017/05/19 07:40:58 skrll Exp $"); #include #include @@ -46,7 +46,7 @@ void ingenic_set_enaddr(uint8_t *); /* * Configure all devices on system - */ + */ void cpu_configure(void) { @@ -72,7 +72,7 @@ device_register(device_t dev, void *aux) if (device_is_a(dev, "dme") && have_enaddr) { prop_dictionary_t dict; prop_data_t blob; - + dict = device_properties(dev); blob = prop_data_create_data(enaddr, ETHER_ADDR_LEN); Index: src/sys/arch/evbmips/ingenic/cpu.c diff -u src/sys/arch/evbmips/ingenic/cpu.c:1.2 src/sys/arch/evbmips/ingenic/cpu.c:1.3 --- src/sys/arch/evbmips/ingenic/cpu.c:1.2 Fri Aug 26 13:54:18 2016 +++ src/sys/arch/evbmips/ingenic/cpu.c Fri May 19 07:40:58 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.2 2016/08/26 13:54:18 skrll Exp $ */ +/* $NetBSD: cpu.c,v 1.3 2017/05/19 07:40:58 skrll Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.2 2016/08/26 13:54:18 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.3 2017/05/19 07:40:58 skrll Exp $"); #include "opt_ingenic.h" #include "opt_multiprocessor.h" @@ -79,7 +79,7 @@ cpu_attach(device_t parent, device_t sel #ifdef MULTIPROCESSOR uint32_t vec, reg; int bail = 1; - + startup_cpu_info = cpu_info_alloc(NULL, unit, 0, unit, 0); startup_cpu_info->ci_cpu_freq = ci->ci_cpu_freq; ci = startup_cpu_info; Index: src/sys/arch/evbmips/ingenic/clock.c diff -u src/sys/arch/evbmips/ingenic/clock.c:1.8 src/sys/arch/evbmips/ingenic/clock.c:1.9 --- src/sys/arch/evbmips/ingenic/clock.c:1.8 Fri Aug 26 15:45:48 2016 +++ src/sys/arch/evbmips/ingenic/clock.c Fri May 19 07:40:58 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.8 2016/08/26 15:45:48 skrll Exp $ */ +/* $NetBSD: clock.c,v 1.9 2017/05/19 07:40:58 skrll Exp $ */ /*- * Copyright (c) 2014 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.8 2016/08/26 15:45:48 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.9 2017/05/19 07:40:58 skrll Exp $"); #include "opt_multiprocessor.h" @@ -87,7 +87,7 @@ cpu_initclocks(void) * that to work yet ( all I get is INT0 which is for hardware interrupts * in general ) * So if we can get OST to fire on INT2 we can just block INT0 on core1 - * and have a timer interrupt on both cores, if not the regular timer + * and have a timer interrupt on both cores, if not the regular timer * would be more convenient but we'd have to shoot an IPI to core1 on * every tick. * For now, use OST and hope we'll figure out how to make it fire on @@ -129,7 +129,7 @@ cpu_initclocks(void) printf("cnt5: %08x\n", readreg(JZ_TC_TCNT(5))); printf("CR: %08x\n", MFC0(MIPS_COP_0_CAUSE, 0)); printf("SR: %08x\n", MFC0(MIPS_COP_0_STATUS, 0)); - + printf("INTC %08x %08x\n", readreg(JZ_ICSR0), readreg(JZ_ICSR1)); delay(300); printf("%s %d\n", __func__, MFC0(12, 3)); @@ -209,8 +209,8 @@ ingenic_clockintr(struct clockframe *cf) /* Check for lost clock interrupts */ new_cnt = readreg(JZ_OST_CNT_LO); - /* - * Missed one or more clock interrupts, so let's start + /* + * Missed one or more clock interrupts, so let's start * counting again from the current value. */ if ((ci->ci_next_cp0_clk_intr - new_cnt) & 0x8000) { Index: src/sys/arch/evbmips/ingenic/machdep.c diff -u src/sys/arch/evbmips/ingenic/machdep.c:1.12 src/sys/arch/evbmips/ingenic/machdep.c:1.13 --- src/sys/arch/evbmips/ingenic/machdep.c:1.12 Thu Dec 22 14:47:57 2016 +++ src/sys/arch/evbmips/ingenic/machdep.c Fri May 19 07:40:58 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.1
CVS commit: src/sys/arch
Module Name:src Committed By: skrll Date: Fri May 19 07:30:24 UTC 2017 Modified Files: src/sys/arch/evbmips/conf: files.ingenic src/sys/arch/mips/conf: files.ingenic Log Message: Move arch/mips/mips/bus_dma.c to correct location To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbmips/conf/files.ingenic cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/conf/files.ingenic 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/evbmips/conf/files.ingenic diff -u src/sys/arch/evbmips/conf/files.ingenic:1.6 src/sys/arch/evbmips/conf/files.ingenic:1.7 --- src/sys/arch/evbmips/conf/files.ingenic:1.6 Fri Jan 29 01:54:13 2016 +++ src/sys/arch/evbmips/conf/files.ingenic Fri May 19 07:30:24 2017 @@ -1,7 +1,6 @@ -# $NetBSD: files.ingenic,v 1.6 2016/01/29 01:54:13 macallan Exp $ +# $NetBSD: files.ingenic,v 1.7 2017/05/19 07:30:24 skrll Exp $ -file arch/mips/mips/bus_dma.c file kern/subr_disk_mbr.c file arch/evbmips/evbmips/interrupt.c Index: src/sys/arch/mips/conf/files.ingenic diff -u src/sys/arch/mips/conf/files.ingenic:1.8 src/sys/arch/mips/conf/files.ingenic:1.9 --- src/sys/arch/mips/conf/files.ingenic:1.8 Thu Oct 8 17:54:30 2015 +++ src/sys/arch/mips/conf/files.ingenic Fri May 19 07:30:24 2017 @@ -1,4 +1,6 @@ -# $NetBSD: files.ingenic,v 1.8 2015/10/08 17:54:30 macallan Exp $ +# $NetBSD: files.ingenic,v 1.9 2017/05/19 07:30:24 skrll Exp $ + +file arch/mips/mips/bus_dma.c include "dev/scsipi/files.scsipi" # SCSI devices include "dev/ata/files.ata" # ATA devices