CVS commit: xsrc/external/mit/xorg-server/dist/hw/sun
Module Name:xsrc Committed By: tsutsui Date: Sat Nov 21 03:02:09 UTC 2020 Modified Files: xsrc/external/mit/xorg-server/dist/hw/sun: sunMouse.c Log Message: valuator_mask_zero() is enough for mouse button events. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xorg-server/dist/hw/sun/sunMouse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/hw/sun/sunMouse.c diff -u xsrc/external/mit/xorg-server/dist/hw/sun/sunMouse.c:1.2 xsrc/external/mit/xorg-server/dist/hw/sun/sunMouse.c:1.3 --- xsrc/external/mit/xorg-server/dist/hw/sun/sunMouse.c:1.2 Thu Aug 13 05:12:35 2020 +++ xsrc/external/mit/xorg-server/dist/hw/sun/sunMouse.c Sat Nov 21 03:02:09 2020 @@ -283,7 +283,7 @@ sunMouseEnqueueEvent(DeviceIntPtr device } } flag = POINTER_RELATIVE; - valuator_mask_set_range(&mask, 0, 0, NULL); + valuator_mask_zero(&mask); QueuePointerEvents(device, type, buttons, flag, &mask); break; case LOC_X_DELTA:
CVS commit: src/sys/arch
Module Name:src Committed By: thorpej Date: Sat Nov 21 00:27:52 UTC 2020 Modified Files: src/sys/arch/sun2/dev: sc_mbmem.c src/sys/arch/sun3/dev: cg4.c eeprom.c fd.c si.c si_sebuf.c xd.c xy.c src/sys/arch/sun68k/sun68k: bus.c isr.c vme_sun68k.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sun2/dev/sc_mbmem.c cvs rdiff -u -r1.41 -r1.42 src/sys/arch/sun3/dev/cg4.c cvs rdiff -u -r1.33 -r1.34 src/sys/arch/sun3/dev/eeprom.c cvs rdiff -u -r1.83 -r1.84 src/sys/arch/sun3/dev/fd.c cvs rdiff -u -r1.63 -r1.64 src/sys/arch/sun3/dev/si.c cvs rdiff -u -r1.29 -r1.30 src/sys/arch/sun3/dev/si_sebuf.c cvs rdiff -u -r1.74 -r1.75 src/sys/arch/sun3/dev/xd.c cvs rdiff -u -r1.79 -r1.80 src/sys/arch/sun3/dev/xy.c cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sun68k/sun68k/bus.c cvs rdiff -u -r1.25 -r1.26 src/sys/arch/sun68k/sun68k/isr.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sun68k/sun68k/vme_sun68k.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/sun2/dev/sc_mbmem.c diff -u src/sys/arch/sun2/dev/sc_mbmem.c:1.14 src/sys/arch/sun2/dev/sc_mbmem.c:1.15 --- src/sys/arch/sun2/dev/sc_mbmem.c:1.14 Sat Nov 21 04:16:52 2009 +++ src/sys/arch/sun2/dev/sc_mbmem.c Sat Nov 21 00:27:52 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sc_mbmem.c,v 1.14 2009/11/21 04:16:52 rmind Exp $ */ +/* $NetBSD: sc_mbmem.c,v 1.15 2020/11/21 00:27:52 thorpej Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -59,13 +59,13 @@ / #include -__KERNEL_RCSID(0, "$NetBSD: sc_mbmem.c,v 1.14 2009/11/21 04:16:52 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sc_mbmem.c,v 1.15 2020/11/21 00:27:52 thorpej Exp $"); #include #include #include #include -#include +#include #include #include #include @@ -164,9 +164,7 @@ sunsc_mbmem_attach(device_t parent, devi /* Allocate DMA handles. */ i = SUNSCPAL_OPENINGS * sizeof(struct sunscpal_dma_handle); - sc->sc_dma_handles = malloc(i, M_DEVBUF, M_WAITOK); - if (sc->sc_dma_handles == NULL) - panic("sc: DMA handles malloc failed"); + sc->sc_dma_handles = kmem_alloc(i, KM_SLEEP); for (i = 0; i < SUNSCPAL_OPENINGS; i++) if (bus_dmamap_create(sc->sunscpal_dmat, SUNSCPAL_MAX_DMA_LEN, 1, SUNSCPAL_MAX_DMA_LEN, Index: src/sys/arch/sun3/dev/cg4.c diff -u src/sys/arch/sun3/dev/cg4.c:1.41 src/sys/arch/sun3/dev/cg4.c:1.42 --- src/sys/arch/sun3/dev/cg4.c:1.41 Fri Jul 25 08:10:35 2014 +++ src/sys/arch/sun3/dev/cg4.c Sat Nov 21 00:27:52 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cg4.c,v 1.41 2014/07/25 08:10:35 dholland Exp $ */ +/* $NetBSD: cg4.c,v 1.42 2020/11/21 00:27:52 thorpej Exp $ */ /* * Copyright (c) 1992, 1993 @@ -55,14 +55,14 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cg4.c,v 1.41 2014/07/25 08:10:35 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cg4.c,v 1.42 2020/11/21 00:27:52 thorpej Exp $"); #include #include #include #include #include -#include +#include #include #include #include @@ -573,7 +573,7 @@ cg4b_init(struct cg4_softc *sc) int i; /* Need a buffer for colormap format translation. */ - btcm = malloc(sizeof(*btcm), M_DEVBUF, M_WAITOK); + btcm = kmem_alloc(sizeof(*btcm), KM_SLEEP); sc->sc_btcm = btcm; /* Index: src/sys/arch/sun3/dev/eeprom.c diff -u src/sys/arch/sun3/dev/eeprom.c:1.33 src/sys/arch/sun3/dev/eeprom.c:1.34 --- src/sys/arch/sun3/dev/eeprom.c:1.33 Sun Nov 10 21:16:33 2019 +++ src/sys/arch/sun3/dev/eeprom.c Sat Nov 21 00:27:52 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: eeprom.c,v 1.33 2019/11/10 21:16:33 chs Exp $ */ +/* $NetBSD: eeprom.c,v 1.34 2020/11/21 00:27:52 thorpej Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -38,14 +38,14 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: eeprom.c,v 1.33 2019/11/10 21:16:33 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: eeprom.c,v 1.34 2020/11/21 00:27:52 thorpej Exp $"); #include #include #include #include #include -#include +#include #include #include @@ -105,7 +105,7 @@ eeprom_attach(device_t parent, device_t panic("%s: can't map va", __func__); /* Keep a "soft" copy of the EEPROM to make access simpler. */ - eeprom_copy = malloc(ee_size, M_DEVBUF, M_WAITOK); + eeprom_copy = kmem_alloc(ee_size, KM_SLEEP); /* * On the 3/80, do not touch the last 40 bytes! Index: src/sys/arch/sun3/dev/fd.c diff -u src/sys/arch/sun3/dev/fd.c:1.83 src/sys/arch/sun3/dev/fd.c:1.84 --- src/sys/arch/sun3/dev/fd.c:1.83 Sun Nov 10 21:16:33 2019 +++ src/sys/arch/sun3/dev/fd.c Sat Nov 21 00:27:52 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.83 2019/11/10 21:16:33 chs Exp $ */ +/* $NetBSD: fd.c,v 1.84 2020/11/21 00:27:52 thorpej Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -72,7 +72,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.83 2019/11/10 21:16:33 chs Ex
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Fri Nov 20 20:01:16 UTC 2020 Modified Files: src/usr.bin/make: parse.c Log Message: make(1): make string iterator in ParseDependencyTargetWord const To generate a diff of this commit: cvs rdiff -u -r1.444 -r1.445 src/usr.bin/make/parse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/parse.c diff -u src/usr.bin/make/parse.c:1.444 src/usr.bin/make/parse.c:1.445 --- src/usr.bin/make/parse.c:1.444 Fri Nov 20 00:24:56 2020 +++ src/usr.bin/make/parse.c Fri Nov 20 20:01:16 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.444 2020/11/20 00:24:56 rillig Exp $ */ +/* $NetBSD: parse.c,v 1.445 2020/11/20 20:01:16 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -117,7 +117,7 @@ #include "pathnames.h" /* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: parse.c,v 1.444 2020/11/20 00:24:56 rillig Exp $"); +MAKE_RCSID("$NetBSD: parse.c,v 1.445 2020/11/20 20:01:16 rillig Exp $"); /* types and constants */ @@ -1042,9 +1042,9 @@ ParseErrorNoDependency(const char *lstar } static void -ParseDependencyTargetWord(/*const*/ char **pp, const char *lstart) +ParseDependencyTargetWord(const char **pp, const char *lstart) { -/*const*/ char *cp = *pp; +const char *cp = *pp; while (*cp != '\0') { if ((ch_isspace(*cp) || *cp == '!' || *cp == ':' || *cp == '(') && @@ -1422,6 +1422,7 @@ ParseDoDependencyTargets(char **inout_cp char *cp = *inout_cp; char *tgt = *inout_line; char savec; +const char *p; for (;;) { /* @@ -1431,7 +1432,9 @@ ParseDoDependencyTargets(char **inout_cp /* Find the end of the next word. */ cp = tgt; - ParseDependencyTargetWord(&cp, lstart); + p = cp; + ParseDependencyTargetWord(&p, lstart); + cp += p - cp; /* * If the word is followed by a left parenthesis, it's the
CVS commit: xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k
Module Name:xsrc Committed By: tsutsui Date: Fri Nov 20 19:06:56 UTC 2020 Modified Files: xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k: x68kMouse.c Log Message: valuator_mask_zero() is enough for mouse button events. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kMouse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kMouse.c diff -u xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kMouse.c:1.7 xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kMouse.c:1.8 --- xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kMouse.c:1.7 Sat Aug 1 20:21:00 2020 +++ xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kMouse.c Fri Nov 20 19:06:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: x68kMouse.c,v 1.7 2020/08/01 20:21:00 tsutsui Exp $ */ +/* $NetBSD: x68kMouse.c,v 1.8 2020/11/20 19:06:56 tsutsui Exp $ */ /*- * Copyright (c) 1996 Yasushi Yamasaki * All rights reserved. @@ -299,7 +299,7 @@ x68kMouseEnqueueEvent(DeviceIntPtr devic } } flag = POINTER_RELATIVE; - valuator_mask_set_range(&mask, 0, 0, NULL); + valuator_mask_zero(&mask); QueuePointerEvents(device, type, buttons, flag, &mask); break; case LOC_X_DELTA:
CVS commit: src/sys/arch/arm/zynq
Module Name:src Committed By: thorpej Date: Fri Nov 20 18:51:31 UTC 2020 Modified Files: src/sys/arch/arm/zynq: zynq_uart.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/zynq/zynq_uart.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/zynq/zynq_uart.c diff -u src/sys/arch/arm/zynq/zynq_uart.c:1.3 src/sys/arch/arm/zynq/zynq_uart.c:1.4 --- src/sys/arch/arm/zynq/zynq_uart.c:1.3 Sun Nov 10 21:16:24 2019 +++ src/sys/arch/arm/zynq/zynq_uart.c Fri Nov 20 18:51:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: zynq_uart.c,v 1.3 2019/11/10 21:16:24 chs Exp $ */ +/* $NetBSD: zynq_uart.c,v 1.4 2020/11/20 18:51:31 thorpej Exp $ */ /* * Copyright (c) 2012 Genetec Corporation. All rights reserved. @@ -96,7 +96,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: zynq_uart.c,v 1.3 2019/11/10 21:16:24 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zynq_uart.c,v 1.4 2020/11/20 18:51:31 thorpej Exp $"); #include "opt_zynq.h" #include "opt_zynquart.h" @@ -133,7 +133,7 @@ __KERNEL_RCSID(0, "$NetBSD: zynq_uart.c, #include #include #include -#include +#include #include #include #include @@ -422,8 +422,8 @@ zynquart_attach_common(device_t parent, tp->t_hwiflow = zynquarthwiflow; sc->sc_tty = tp; - sc->sc_rbuf = malloc(sizeof (*sc->sc_rbuf) * zynquart_rbuf_size, - M_DEVBUF, M_WAITOK); + sc->sc_rbuf = kmem_alloc(sizeof (*sc->sc_rbuf) * zynquart_rbuf_size, + KM_SLEEP); sc->sc_rbuf_size = zynquart_rbuf_size; sc->sc_rbuf_in = sc->sc_rbuf_out = 0; sc->sc_txfifo_len = 64; @@ -553,7 +553,7 @@ zynquart_detach(device_t self, int flags } /* Free the receive buffer. */ - free(sc->sc_rbuf, M_DEVBUF); + kmem_free(sc->sc_rbuf, sizeof(*sc->sc_rbuf) * sc->sc_rbuf_size); /* Detach and free the tty. */ tty_detach(sc->sc_tty);
CVS commit: src/sys/arch/arm
Module Name:src Committed By: thorpej Date: Fri Nov 20 18:49:45 UTC 2020 Modified Files: src/sys/arch/arm/xilinx: zynq_uart.c src/sys/arch/arm/xscale: becc_icu.c i80321_icu.c ixp425_intr.c pxa2x0_gpio.c pxa2x0_lcd.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/xilinx/zynq_uart.c cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/xscale/becc_icu.c cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/xscale/i80321_icu.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/xscale/ixp425_intr.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/xscale/pxa2x0_gpio.c cvs rdiff -u -r1.37 -r1.38 src/sys/arch/arm/xscale/pxa2x0_lcd.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/xilinx/zynq_uart.c diff -u src/sys/arch/arm/xilinx/zynq_uart.c:1.2 src/sys/arch/arm/xilinx/zynq_uart.c:1.3 --- src/sys/arch/arm/xilinx/zynq_uart.c:1.2 Sun Nov 10 21:16:24 2019 +++ src/sys/arch/arm/xilinx/zynq_uart.c Fri Nov 20 18:49:44 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: zynq_uart.c,v 1.2 2019/11/10 21:16:24 chs Exp $ */ +/* $NetBSD: zynq_uart.c,v 1.3 2020/11/20 18:49:44 thorpej Exp $ */ /* * Copyright (c) 2012 Genetec Corporation. All rights reserved. @@ -96,7 +96,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: zynq_uart.c,v 1.2 2019/11/10 21:16:24 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zynq_uart.c,v 1.3 2020/11/20 18:49:44 thorpej Exp $"); #include "opt_soc.h" #include "opt_console.h" @@ -126,7 +126,7 @@ __KERNEL_RCSID(0, "$NetBSD: zynq_uart.c, #include #include #include -#include +#include #include #include #include @@ -412,8 +412,8 @@ zynquart_attach_common(device_t parent, tp->t_hwiflow = zynquarthwiflow; sc->sc_tty = tp; - sc->sc_rbuf = malloc(sizeof (*sc->sc_rbuf) * zynquart_rbuf_size, - M_DEVBUF, M_WAITOK); + sc->sc_rbuf = kmem_alloc(sizeof (*sc->sc_rbuf) * zynquart_rbuf_size, + KM_SLEEP); sc->sc_rbuf_size = zynquart_rbuf_size; sc->sc_rbuf_in = sc->sc_rbuf_out = 0; sc->sc_txfifo_len = 64; @@ -538,7 +538,7 @@ zynquart_detach(device_t self, int flags } /* Free the receive buffer. */ - free(sc->sc_rbuf, M_DEVBUF); + kmem_free(sc->sc_rbuf, sizeof(*sc->sc_rbuf) * sc->sc_rbuf_size); /* Detach and free the tty. */ tty_detach(sc->sc_tty); Index: src/sys/arch/arm/xscale/becc_icu.c diff -u src/sys/arch/arm/xscale/becc_icu.c:1.14 src/sys/arch/arm/xscale/becc_icu.c:1.15 --- src/sys/arch/arm/xscale/becc_icu.c:1.14 Sun Nov 10 21:16:24 2019 +++ src/sys/arch/arm/xscale/becc_icu.c Fri Nov 20 18:49:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: becc_icu.c,v 1.14 2019/11/10 21:16:24 chs Exp $ */ +/* $NetBSD: becc_icu.c,v 1.15 2020/11/20 18:49:45 thorpej Exp $ */ /* * Copyright (c) 2002 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: becc_icu.c,v 1.14 2019/11/10 21:16:24 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: becc_icu.c,v 1.15 2020/11/20 18:49:45 thorpej Exp $"); #ifndef EVBARM_SPL_NOINLINE #define EVBARM_SPL_NOINLINE @@ -48,7 +48,7 @@ __KERNEL_RCSID(0, "$NetBSD: becc_icu.c,v #include #include -#include +#include #include #include @@ -293,7 +293,7 @@ becc_intr_establish(int irq, int ipl, in if (irq < 0 || irq > NIRQ) panic("becc_intr_establish: IRQ %d out of range", irq); - ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK); + ih = kmem_alloc(sizeof(*ih), KM_SLEEP); ih->ih_func = func; ih->ih_arg = arg; ih->ih_ipl = ipl; Index: src/sys/arch/arm/xscale/i80321_icu.c diff -u src/sys/arch/arm/xscale/i80321_icu.c:1.25 src/sys/arch/arm/xscale/i80321_icu.c:1.26 --- src/sys/arch/arm/xscale/i80321_icu.c:1.25 Sun Nov 10 21:16:24 2019 +++ src/sys/arch/arm/xscale/i80321_icu.c Fri Nov 20 18:49:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: i80321_icu.c,v 1.25 2019/11/10 21:16:24 chs Exp $ */ +/* $NetBSD: i80321_icu.c,v 1.26 2020/11/20 18:49:45 thorpej Exp $ */ /* * Copyright (c) 2001, 2002, 2006 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: i80321_icu.c,v 1.25 2019/11/10 21:16:24 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i80321_icu.c,v 1.26 2020/11/20 18:49:45 thorpej Exp $"); #ifndef EVBARM_SPL_NOINLINE #define EVBARM_SPL_NOINLINE @@ -48,7 +48,7 @@ __KERNEL_RCSID(0, "$NetBSD: i80321_icu.c #include #include -#include +#include #include @@ -309,7 +309,7 @@ i80321_intr_establish(int irq, int ipl, if (irq < 0 || irq > NIRQ) panic("i80321_intr_establish: IRQ %d out of range", irq); - ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK); + ih = kmem_alloc(sizeof(*ih), KM_SLEEP); ih->ih_func = func; ih->ih_arg = arg; ih->ih_ipl = ipl; Index: src/sys/arch/arm/xscale/ixp425_intr.c diff -u src/sys/arch/arm/xscale/ixp425_intr.c:1.27 src/sys/arch/arm/xscale/ixp425_intr.c:1.28 --- src/sys/arch/arm/xscale/ixp425_intr.c:1.27 Sun Nov 10 21:16:24 2019 +++ src/sys/arch/arm/xscale/ixp425_intr.c Fri Nov 20 18:49:45
CVS commit: src/sys/arch/arm/sa11x0
Module Name:src Committed By: thorpej Date: Fri Nov 20 18:37:31 UTC 2020 Modified Files: src/sys/arch/arm/sa11x0: sa.c sa11x0_com.c sa11x0_irqhandler.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/sa11x0/sa.c cvs rdiff -u -r1.57 -r1.58 src/sys/arch/arm/sa11x0/sa11x0_com.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/sa11x0/sa11x0_irqhandler.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/sa11x0/sa.c diff -u src/sys/arch/arm/sa11x0/sa.c:1.25 src/sys/arch/arm/sa11x0/sa.c:1.26 --- src/sys/arch/arm/sa11x0/sa.c:1.25 Sun Nov 10 21:16:24 2019 +++ src/sys/arch/arm/sa11x0/sa.c Fri Nov 20 18:37:30 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sa.c,v 1.25 2019/11/10 21:16:24 chs Exp $ */ +/* $NetBSD: sa.c,v 1.26 2020/11/20 18:37:30 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sa.c,v 1.25 2019/11/10 21:16:24 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sa.c,v 1.26 2020/11/20 18:37:30 thorpej Exp $"); #include #include @@ -43,7 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: sa.c,v 1 #include #include #include -#include +#include #include #include @@ -124,7 +124,7 @@ sacc_intr_establish(sacc_chipset_tag_t * struct sacc_softc *sc = (struct sacc_softc *)ic; struct sacc_intrhand **p, *ih; - ih = malloc(sizeof *ih, M_DEVBUF, M_WAITOK); + ih = kmem_alloc(sizeof *ih, KM_SLEEP); if (irq < 0 || irq > SACCIC_LEN || !(type == IST_EDGE_RAISE || type == IST_EDGE_FALL)) @@ -186,7 +186,7 @@ sacc_intr_disestablish(sacc_chipset_tag_ sacc_intr_calculatemasks(sc); splx(s); - free(ih, M_DEVBUF); + kmem_free(ih, sizeof(*ih)); } static void Index: src/sys/arch/arm/sa11x0/sa11x0_com.c diff -u src/sys/arch/arm/sa11x0/sa11x0_com.c:1.57 src/sys/arch/arm/sa11x0/sa11x0_com.c:1.58 --- src/sys/arch/arm/sa11x0/sa11x0_com.c:1.57 Sun Nov 10 21:16:24 2019 +++ src/sys/arch/arm/sa11x0/sa11x0_com.c Fri Nov 20 18:37:30 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sa11x0_com.c,v 1.57 2019/11/10 21:16:24 chs Exp $*/ +/* $NetBSD: sa11x0_com.c,v 1.58 2020/11/20 18:37:30 thorpej Exp $*/ /*- * Copyright (c) 1998, 1999, 2001 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sa11x0_com.c,v 1.57 2019/11/10 21:16:24 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sa11x0_com.c,v 1.58 2020/11/20 18:37:30 thorpej Exp $"); #include "opt_com.h" #include "opt_console.h" @@ -85,7 +85,7 @@ __KERNEL_RCSID(0, "$NetBSD: sa11x0_com.c #include #include #include -#include +#include #include #include #include @@ -311,7 +311,7 @@ sacom_attach_subr(struct sacom_softc *sc tp->t_hwiflow = sacomhwiflow; sc->sc_tty = tp; - sc->sc_rbuf = malloc(SACOM_RING_SIZE << 1, M_DEVBUF, M_WAITOK); + sc->sc_rbuf = kmem_alloc(SACOM_RING_SIZE << 1, KM_SLEEP); sc->sc_rbput = sc->sc_rbget = sc->sc_rbuf; sc->sc_rbavail = SACOM_RING_SIZE; sc->sc_ebuf = sc->sc_rbuf + (SACOM_RING_SIZE << 1); @@ -377,7 +377,7 @@ sacom_detach(device_t dev, int flags) vdevgone(maj, mn, mn, VCHR); /* Free the receive buffer. */ - free(sc->sc_rbuf, M_DEVBUF); + kmem_free(sc->sc_rbuf, SACOM_RING_SIZE << 1); /* Detach and free the tty. */ tty_detach(sc->sc_tty); Index: src/sys/arch/arm/sa11x0/sa11x0_irqhandler.c diff -u src/sys/arch/arm/sa11x0/sa11x0_irqhandler.c:1.19 src/sys/arch/arm/sa11x0/sa11x0_irqhandler.c:1.20 --- src/sys/arch/arm/sa11x0/sa11x0_irqhandler.c:1.19 Sun Nov 10 21:16:24 2019 +++ src/sys/arch/arm/sa11x0/sa11x0_irqhandler.c Fri Nov 20 18:37:30 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sa11x0_irqhandler.c,v 1.19 2019/11/10 21:16:24 chs Exp $ */ +/* $NetBSD: sa11x0_irqhandler.c,v 1.20 2020/11/20 18:37:30 thorpej Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -69,7 +69,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: sa11x0_irqhandler.c,v 1.19 2019/11/10 21:16:24 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sa11x0_irqhandler.c,v 1.20 2020/11/20 18:37:30 thorpej Exp $"); #include "opt_irqstats.h" @@ -79,7 +79,7 @@ __KERNEL_RCSID(0, "$NetBSD: sa11x0_irqha #include #include #include -#include +#include #include @@ -167,7 +167,7 @@ sa11x0_intr_establish(sa11x0_chipset_tag struct irqhandler **p, *q, *ih; static struct irqhandler fakehand = {fakeintr}; - ih = malloc(sizeof *ih, M_DEVBUF, M_WAITOK); + ih = kmem_alloc(sizeof *ih, KM_SLEEP); if (irq < 0 || irq >= ICU_LEN || type == IST_NONE) panic("intr_establish: bogus irq or type"); @@ -249,7 +249,7 @@ sa11x0_intr_disestablish(sa11x0_chipset_ *p = q->ih_next; else panic("intr_disestablish: handler not registered"); - free(ih, M_DEVBUF); + kmem_free(ih, sizeof(*ih)); intr_calculatemasks(); saved_cpsr = SetCPSR(I32_bit, I32_bit);
CVS commit: src/sys/arch/arm
Module Name:src Committed By: thorpej Date: Fri Nov 20 18:34:45 UTC 2020 Modified Files: src/sys/arch/arm/omap: omap_gpio.c src/sys/arch/arm/s3c2xx0: s3c2440_dma.c s3c24x0_lcd.c s3c2800_pci.c sscom.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/omap/omap_gpio.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/s3c2xx0/s3c2440_dma.c cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/s3c2xx0/s3c24x0_lcd.c cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arm/s3c2xx0/s3c2800_pci.c cvs rdiff -u -r1.48 -r1.49 src/sys/arch/arm/s3c2xx0/sscom.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/omap/omap_gpio.c diff -u src/sys/arch/arm/omap/omap_gpio.c:1.9 src/sys/arch/arm/omap/omap_gpio.c:1.10 --- src/sys/arch/arm/omap/omap_gpio.c:1.9 Sun Nov 10 21:16:24 2019 +++ src/sys/arch/arm/omap/omap_gpio.c Fri Nov 20 18:34:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: omap_gpio.c,v 1.9 2019/11/10 21:16:24 chs Exp $ */ +/* $NetBSD: omap_gpio.c,v 1.10 2020/11/20 18:34:45 thorpej Exp $ */ /* * The OMAP GPIO Controller interface is inspired by pxa2x0_gpio.c @@ -38,12 +38,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: omap_gpio.c,v 1.9 2019/11/10 21:16:24 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: omap_gpio.c,v 1.10 2020/11/20 18:34:45 thorpej Exp $"); #include #include #include -#include +#include #include #include @@ -275,7 +275,7 @@ omap_gpio_intr_establish(u_int gpio, int panic("omapgpio: Illegal shared interrupt on pin %d", gpio); } - gh = malloc(sizeof(struct gpio_irq_handler), M_DEVBUF, M_WAITOK); + gh = kmem_alloc(sizeof(*gh), KM_SLEEP); gh->gh_func = func; gh->gh_arg = arg; gh->gh_spl = spl; @@ -368,7 +368,7 @@ omap_gpio_intr_disestablish(void *cookie sc->sc_handlers[relnum] = NULL; - free(gh, M_DEVBUF); + kmem_free(gh, sizeof(*gh)); } void Index: src/sys/arch/arm/s3c2xx0/s3c2440_dma.c diff -u src/sys/arch/arm/s3c2xx0/s3c2440_dma.c:1.4 src/sys/arch/arm/s3c2xx0/s3c2440_dma.c:1.5 --- src/sys/arch/arm/s3c2xx0/s3c2440_dma.c:1.4 Sun Nov 10 21:16:24 2019 +++ src/sys/arch/arm/s3c2xx0/s3c2440_dma.c Fri Nov 20 18:34:45 2020 @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include @@ -276,7 +276,7 @@ dmac_xfer_t s3c2440_dmac_allocate_xfer(void) { struct dmac_xfer_state *dxs; - dxs = malloc(sizeof(struct dmac_xfer_state), M_DEVBUF, M_WAITOK); + dxs = kmem_alloc(sizeof(struct dmac_xfer_state), KM_SLEEP); dxs->dxs_xfer.dx_done = NULL; dxs->dxs_xfer.dx_sync_bus = DMAC_SYNC_BUS_AUTO; @@ -288,7 +288,7 @@ s3c2440_dmac_allocate_xfer(void) { void s3c2440_dmac_free_xfer(dmac_xfer_t dx) { - free(dx, M_DEVBUF); + kmem_free(dx, sizeof(struct dmac_xfer_state)); } int Index: src/sys/arch/arm/s3c2xx0/s3c24x0_lcd.c diff -u src/sys/arch/arm/s3c2xx0/s3c24x0_lcd.c:1.14 src/sys/arch/arm/s3c2xx0/s3c24x0_lcd.c:1.15 --- src/sys/arch/arm/s3c2xx0/s3c24x0_lcd.c:1.14 Sun Nov 10 21:16:24 2019 +++ src/sys/arch/arm/s3c2xx0/s3c24x0_lcd.c Fri Nov 20 18:34:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: s3c24x0_lcd.c,v 1.14 2019/11/10 21:16:24 chs Exp $ */ +/* $NetBSD: s3c24x0_lcd.c,v 1.15 2020/11/20 18:34:45 thorpej Exp $ */ /* * Copyright (c) 2004 Genetec Corporation. All rights reserved. @@ -34,13 +34,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: s3c24x0_lcd.c,v 1.14 2019/11/10 21:16:24 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: s3c24x0_lcd.c,v 1.15 2020/11/20 18:34:45 thorpej Exp $"); #include #include #include #include -#include +#include #include /* for cold */ #include @@ -338,7 +338,7 @@ s3c24x0_lcd_new_screen(struct s3c24x0_lc return NULL; } - scr = malloc(sizeof *scr, M_DEVBUF, M_ZERO | M_WAITOK); + scr = kmem_zalloc(sizeof *scr, KM_SLEEP); scr->nsegs = 0; scr->depth = depth; scr->stride = virtual_width * depth / 8; @@ -392,7 +392,7 @@ s3c24x0_lcd_new_screen(struct s3c24x0_lc bus_dmamem_unmap(sc->dma_tag, scr->buf_va, size); if (scr->nsegs) bus_dmamem_free(sc->dma_tag, scr->segs, scr->nsegs); - free(scr, M_DEVBUF); + kmem_free(scr, sizeof(*scr)); } return NULL; } @@ -608,7 +608,7 @@ s3c24x0_lcd_free_screen(void *v, void *c if (scr->nsegs > 0) bus_dmamem_free(sc->dma_tag, scr->segs, scr->nsegs); - free(scr, M_DEVBUF); + kmem_free(scr, sizeof(*scr)); } int Index: src/sys/arch/arm/s3c2xx0/s3c2800_pci.c diff -u src/sys/arch/arm/s3c2xx0/s3c2800_pci.c:1.29 src/sys/arch/arm/s3c2xx0/s3c2800_pci.c:1.30 --- src/sys/arch/arm/s3c2xx0/s3c2800_pci.c:1.29 Tue Jul 7 03:38:46 2020 +++ src/sys/arch/arm/s3c2xx0/s3c2800_pci.c Fri Nov 20 18:34:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: s3c2800_pci.c,v 1.29 2020/07/07 03:38:46 thorpej Exp $ */ +/* $NetBSD: s3c2800_pci.c,v 1.30 2020/11/20 18:34:45 thorpej Exp $ */ /* * Copyright (c) 2002 Fujitsu Component Limited @@ -100,7 +100,7 @@ */ #include -__KERNEL_RCSID(0, "$N
CVS commit: src/sys/arch/arm
Module Name:src Committed By: thorpej Date: Fri Nov 20 18:26:26 UTC 2020 Modified Files: src/sys/arch/arm/ixp12x0: ixp12x0_com.c ixp12x0_intr.c src/sys/arch/arm/marvell: mvsoc_sdhc.c src/sys/arch/arm/ofw: ofw_irqhandler.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/arch/arm/ixp12x0/ixp12x0_com.c cvs rdiff -u -r1.32 -r1.33 src/sys/arch/arm/ixp12x0/ixp12x0_intr.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/marvell/mvsoc_sdhc.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/ofw/ofw_irqhandler.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/ixp12x0/ixp12x0_com.c diff -u src/sys/arch/arm/ixp12x0/ixp12x0_com.c:1.48 src/sys/arch/arm/ixp12x0/ixp12x0_com.c:1.49 --- src/sys/arch/arm/ixp12x0/ixp12x0_com.c:1.48 Sun Nov 10 21:16:24 2019 +++ src/sys/arch/arm/ixp12x0/ixp12x0_com.c Fri Nov 20 18:26:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ixp12x0_com.c,v 1.48 2019/11/10 21:16:24 chs Exp $ */ +/* $NetBSD: ixp12x0_com.c,v 1.49 2020/11/20 18:26:26 thorpej Exp $ */ /* * Copyright (c) 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc. * All rights reserved. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ixp12x0_com.c,v 1.48 2019/11/10 21:16:24 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixp12x0_com.c,v 1.49 2020/11/20 18:26:26 thorpej Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -82,7 +82,7 @@ __KERNEL_RCSID(0, "$NetBSD: ixp12x0_com. #include #include #include -#include +#include #include #include #include @@ -212,7 +212,7 @@ ixpcom_attach_subr(struct ixpcom_softc * tp->t_hwiflow = ixpcomhwiflow; sc->sc_tty = tp; - sc->sc_rbuf = malloc(IXPCOM_RING_SIZE << 1, M_DEVBUF, M_WAITOK); + sc->sc_rbuf = kmem_alloc(IXPCOM_RING_SIZE << 1, KM_SLEEP); sc->sc_rbput = sc->sc_rbget = sc->sc_rbuf; sc->sc_rbavail = IXPCOM_RING_SIZE; sc->sc_ebuf = sc->sc_rbuf + (IXPCOM_RING_SIZE << 1); Index: src/sys/arch/arm/ixp12x0/ixp12x0_intr.c diff -u src/sys/arch/arm/ixp12x0/ixp12x0_intr.c:1.32 src/sys/arch/arm/ixp12x0/ixp12x0_intr.c:1.33 --- src/sys/arch/arm/ixp12x0/ixp12x0_intr.c:1.32 Sun Nov 10 21:16:24 2019 +++ src/sys/arch/arm/ixp12x0/ixp12x0_intr.c Fri Nov 20 18:26:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ixp12x0_intr.c,v 1.32 2019/11/10 21:16:24 chs Exp $ */ +/* $NetBSD: ixp12x0_intr.c,v 1.33 2020/11/20 18:26:26 thorpej Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ixp12x0_intr.c,v 1.32 2019/11/10 21:16:24 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixp12x0_intr.c,v 1.33 2020/11/20 18:26:26 thorpej Exp $"); /* * Interrupt support for the Intel ixp12x0 @@ -38,7 +38,7 @@ __KERNEL_RCSID(0, "$NetBSD: ixp12x0_intr #include #include -#include +#include #include #include #include @@ -342,7 +342,7 @@ ixp12x0_intr_establish(int irq, int ipl, if (ipl < 0 || ipl > NIPL) panic("ixp12x0_intr_establish: IPL %d out of range", ipl); - ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK); + ih = kmem_alloc(sizeof(*ih), KM_SLEEP); ih->ih_func = ih_func; ih->ih_arg = arg; ih->ih_irq = irq; Index: src/sys/arch/arm/marvell/mvsoc_sdhc.c diff -u src/sys/arch/arm/marvell/mvsoc_sdhc.c:1.1 src/sys/arch/arm/marvell/mvsoc_sdhc.c:1.2 --- src/sys/arch/arm/marvell/mvsoc_sdhc.c:1.1 Sat Jan 7 16:19:28 2017 +++ src/sys/arch/arm/marvell/mvsoc_sdhc.c Fri Nov 20 18:26:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mvsoc_sdhc.c,v 1.1 2017/01/07 16:19:28 kiyohara Exp $ */ +/* $NetBSD: mvsoc_sdhc.c,v 1.2 2020/11/20 18:26:26 thorpej Exp $ */ /* * Copyright (c) 2016 KIYOHARA Takashi * All rights reserved. @@ -26,13 +26,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mvsoc_sdhc.c,v 1.1 2017/01/07 16:19:28 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mvsoc_sdhc.c,v 1.2 2020/11/20 18:26:26 thorpej Exp $"); #include #include #include #include -#include +#include #include #include @@ -75,7 +75,7 @@ mvsoc_sdhc_attach(device_t parent, devic int error; sc->sc_dev = self; - sc->sc_host = malloc(sizeof(*sc->sc_host), M_DEVBUF, M_WAITOK | M_ZERO); + sc->sc_host = kmem_zalloc(sizeof(*sc->sc_host), KM_SLEEP); sc->sc_dmat = mva->mva_dmat; /* Must require the DMA. This sdhc can't 32bit access to SDHC_DATA. */ sc->sc_flags = SDHC_FLAG_USE_DMA; Index: src/sys/arch/arm/ofw/ofw_irqhandler.c diff -u src/sys/arch/arm/ofw/ofw_irqhandler.c:1.22 src/sys/arch/arm/ofw/ofw_irqhandler.c:1.23 --- src/sys/arch/arm/ofw/ofw_irqhandler.c:1.22 Sun Nov 10 21:16:24 2019 +++ src/sys/arch/arm/ofw/ofw_irqhandler.c Fri Nov 20 18:26:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ofw_irqhandler.c,v 1.22 2019/11/10 21:16:24 chs Exp $ */ +/* $NetBSD: ofw_irqhandler.c,v 1.23 2020/11/20 18:26:26 thorpej Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -42,12 +42,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ofw_irqhandler.c,v 1.
CVS commit: src/sys/arch/arm/iomd
Module Name:src Committed By: thorpej Date: Fri Nov 20 18:18:51 UTC 2020 Modified Files: src/sys/arch/arm/iomd: iomd_irqhandler.c iomdkbc.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/iomd/iomd_irqhandler.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/iomd/iomdkbc.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/iomd/iomd_irqhandler.c diff -u src/sys/arch/arm/iomd/iomd_irqhandler.c:1.23 src/sys/arch/arm/iomd/iomd_irqhandler.c:1.24 --- src/sys/arch/arm/iomd/iomd_irqhandler.c:1.23 Sun Nov 10 21:16:23 2019 +++ src/sys/arch/arm/iomd/iomd_irqhandler.c Fri Nov 20 18:18:51 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: iomd_irqhandler.c,v 1.23 2019/11/10 21:16:23 chs Exp $ */ +/* $NetBSD: iomd_irqhandler.c,v 1.24 2020/11/20 18:18:51 thorpej Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -40,14 +40,14 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: iomd_irqhandler.c,v 1.23 2019/11/10 21:16:23 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iomd_irqhandler.c,v 1.24 2020/11/20 18:18:51 thorpej Exp $"); #include "opt_irqstats.h" #include #include #include -#include +#include #include #include @@ -346,7 +346,7 @@ intr_claim(int irq, int level, const cha { irqhandler_t *ih; - ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK); + ih = kmem_alloc(sizeof(*ih), KM_SLEEP); ih->ih_level = level; ih->ih_name = name; ih->ih_func = ih_func; @@ -354,7 +354,7 @@ intr_claim(int irq, int level, const cha ih->ih_flags = 0; if (irq_claim(irq, ih) != 0) { - free(ih, M_DEVBUF); + kmem_free(ih, sizeof(*ih)); return NULL; } return ih; @@ -367,7 +367,7 @@ intr_release(void *arg) irqhandler_t *ih = (irqhandler_t *)arg; if (irq_release(ih->ih_num, ih) == 0) { - free(ih, M_DEVBUF); + kmem_free(ih, sizeof(*ih)); return 0 ; } return 1; Index: src/sys/arch/arm/iomd/iomdkbc.c diff -u src/sys/arch/arm/iomd/iomdkbc.c:1.6 src/sys/arch/arm/iomd/iomdkbc.c:1.7 --- src/sys/arch/arm/iomd/iomdkbc.c:1.6 Sun Nov 10 21:16:23 2019 +++ src/sys/arch/arm/iomd/iomdkbc.c Fri Nov 20 18:18:51 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: iomdkbc.c,v 1.6 2019/11/10 21:16:23 chs Exp $ */ +/* $NetBSD: iomdkbc.c,v 1.7 2020/11/20 18:18:51 thorpej Exp $ */ /*- * Copyright (c) 2004 Ben Harris @@ -28,11 +28,11 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: iomdkbc.c,v 1.6 2019/11/10 21:16:23 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iomdkbc.c,v 1.7 2020/11/20 18:18:51 thorpej Exp $"); #include #include -#include +#include #include #include @@ -133,8 +133,8 @@ iomdkbc_attach(device_t parent, device_t /* Have an iomdkbc as console. Assume it's this one.*/ t = &iomdkbc_cntag; } else { - t = malloc(sizeof(struct iomdkbc_internal), M_DEVBUF, - M_WAITOK | M_ZERO); + t = kmem_zalloc(sizeof(struct iomdkbc_internal), + KM_SLEEP); t->t_haveport[PCKBPORT_KBD_SLOT] = 1; t->t_iot = ka->ka_iot; t->t_ioh[PCKBPORT_KBD_SLOT] = ka->ka_ioh; @@ -151,8 +151,8 @@ iomdkbc_attach(device_t parent, device_t if (strcmp(pa->pa_name, "opms") == 0) { if (t == NULL) { - t = malloc(sizeof(struct iomdkbc_internal), M_DEVBUF, - M_WAITOK | M_ZERO); + t = kmem_zalloc(sizeof(struct iomdkbc_internal), + KM_SLEEP); } t->t_haveport[PCKBPORT_AUX_SLOT] = 1; t->t_iot = pa->pa_iot;
CVS commit: src/sys/arch/arm/imx
Module Name:src Committed By: thorpej Date: Fri Nov 20 18:16:40 UTC 2020 Modified Files: src/sys/arch/arm/imx: imx51_ipuv3.c imxuart.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/imx/imx51_ipuv3.c cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/imx/imxuart.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/imx/imx51_ipuv3.c diff -u src/sys/arch/arm/imx/imx51_ipuv3.c:1.8 src/sys/arch/arm/imx/imx51_ipuv3.c:1.9 --- src/sys/arch/arm/imx/imx51_ipuv3.c:1.8 Sun Nov 10 21:16:23 2019 +++ src/sys/arch/arm/imx/imx51_ipuv3.c Fri Nov 20 18:16:40 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: imx51_ipuv3.c,v 1.8 2019/11/10 21:16:23 chs Exp $ */ +/* $NetBSD: imx51_ipuv3.c,v 1.9 2020/11/20 18:16:40 thorpej Exp $ */ /* * Copyright (c) 2011, 2012 Genetec Corporation. All rights reserved. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: imx51_ipuv3.c,v 1.8 2019/11/10 21:16:23 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx51_ipuv3.c,v 1.9 2020/11/20 18:16:40 thorpej Exp $"); #include "opt_imx51_ipuv3.h" @@ -35,7 +35,7 @@ __KERNEL_RCSID(0, "$NetBSD: imx51_ipuv3. #include #include #include -#include +#include #include /* for cold */ #include @@ -932,7 +932,7 @@ imx51_ipuv3_new_screen(struct imx51_ipuv width = geometry->panel_width; height = geometry->panel_height; - scr = malloc(sizeof(*scr), M_DEVBUF, M_WAITOK | M_ZERO); + scr = kmem_zalloc(sizeof(*scr), KM_SLEEP); scr->nsegs = 0; scr->depth = depth; scr->stride = width * depth / 8; @@ -944,7 +944,7 @@ imx51_ipuv3_new_screen(struct imx51_ipuv aprint_error_dev(sc->dev, "failed to allocate %u bytes of video memory: %d\n", scr->stride * height, error); - free(scr, M_DEVBUF); + kmem_free(scr, sizeof(*scr)); return error; } Index: src/sys/arch/arm/imx/imxuart.c diff -u src/sys/arch/arm/imx/imxuart.c:1.25 src/sys/arch/arm/imx/imxuart.c:1.26 --- src/sys/arch/arm/imx/imxuart.c:1.25 Wed May 20 09:18:25 2020 +++ src/sys/arch/arm/imx/imxuart.c Fri Nov 20 18:16:40 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: imxuart.c,v 1.25 2020/05/20 09:18:25 hkenken Exp $ */ +/* $NetBSD: imxuart.c,v 1.26 2020/11/20 18:16:40 thorpej Exp $ */ /* * Copyright (c) 2009, 2010 Genetec Corporation. All rights reserved. @@ -96,7 +96,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: imxuart.c,v 1.25 2020/05/20 09:18:25 hkenken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imxuart.c,v 1.26 2020/11/20 18:16:40 thorpej Exp $"); #include "opt_imxuart.h" #include "opt_ddb.h" @@ -148,7 +148,7 @@ __KERNEL_RCSID(0, "$NetBSD: imxuart.c,v #include #include #include -#include +#include #include #include #include @@ -354,8 +354,8 @@ imxuart_attach_subr(struct imxuart_softc tp->t_hwiflow = imxuhwiflow; sc->sc_tty = tp; - sc->sc_rbuf = malloc(sizeof (*sc->sc_rbuf) * imxuart_rbuf_size, - M_DEVBUF, M_WAITOK); + sc->sc_rbuf = kmem_alloc(sizeof (*sc->sc_rbuf) * imxuart_rbuf_size, + KM_SLEEP); sc->sc_rbuf_size = imxuart_rbuf_size; sc->sc_rbuf_in = sc->sc_rbuf_out = 0; sc->sc_txfifo_len = 32; @@ -542,7 +542,7 @@ imxuart_detach(device_t self, int flags) } /* Free the receive buffer. */ - free(sc->sc_rbuf, M_DEVBUF); + kmem_free(sc->sc_rbuf, sizeof(*sc->sc_rbuf) * sc->sc_rbuf_size); /* Detach and free the tty. */ tty_detach(sc->sc_tty);
CVS commit: src/sys/arch/arm/gemini
Module Name:src Committed By: thorpej Date: Fri Nov 20 18:10:07 UTC 2020 Modified Files: src/sys/arch/arm/gemini: gemini_ipi.c gemini_lpchc.c gemini_pci.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/gemini/gemini_ipi.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/gemini/gemini_lpchc.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/gemini/gemini_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/gemini/gemini_ipi.c diff -u src/sys/arch/arm/gemini/gemini_ipi.c:1.8 src/sys/arch/arm/gemini/gemini_ipi.c:1.9 --- src/sys/arch/arm/gemini/gemini_ipi.c:1.8 Sun Nov 10 21:16:23 2019 +++ src/sys/arch/arm/gemini/gemini_ipi.c Fri Nov 20 18:10:07 2020 @@ -7,13 +7,13 @@ #include -__KERNEL_RCSID(0, "$NetBSD: gemini_ipi.c,v 1.8 2019/11/10 21:16:23 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gemini_ipi.c,v 1.9 2020/11/20 18:10:07 thorpej Exp $"); #include #include #include #include -#include +#include #include #include #include @@ -103,7 +103,7 @@ gemini_ipi_intrq_insert(gemini_ipi_softc { gemini_ipi_intrq_t *iqp; -iqp = malloc(sizeof(*iqp), M_DEVBUF, M_WAITOK|M_ZERO); +iqp = kmem_zalloc(sizeof(*iqp), KM_SLEEP); iqp->iq_func = func; iqp->iq_arg = arg; SIMPLEQ_INSERT_TAIL(&sc->sc_intrq, iqp, iq_q); @@ -120,7 +120,7 @@ gemini_ipi_intrq_remove(gemini_ipi_softc if ((void *)iqp == cookie) { SIMPLEQ_REMOVE(&sc->sc_intrq, iqp, gemini_ipi_intrq, iq_q); - free(iqp, M_DEVBUF); + kmem_free(iqp, sizeof(*iqp)); return; } } Index: src/sys/arch/arm/gemini/gemini_lpchc.c diff -u src/sys/arch/arm/gemini/gemini_lpchc.c:1.4 src/sys/arch/arm/gemini/gemini_lpchc.c:1.5 --- src/sys/arch/arm/gemini/gemini_lpchc.c:1.4 Sun Nov 10 21:16:23 2019 +++ src/sys/arch/arm/gemini/gemini_lpchc.c Fri Nov 20 18:10:07 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: gemini_lpchc.c,v 1.4 2019/11/10 21:16:23 chs Exp $ */ +/* $NetBSD: gemini_lpchc.c,v 1.5 2020/11/20 18:10:07 thorpej Exp $ */ /* * GEMINI LPC Host Controller @@ -7,7 +7,7 @@ #include "locators.h" #include -__KERNEL_RCSID(0, "$NetBSD: gemini_lpchc.c,v 1.4 2019/11/10 21:16:23 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gemini_lpchc.c,v 1.5 2020/11/20 18:10:07 thorpej Exp $"); #include #include @@ -15,7 +15,7 @@ __KERNEL_RCSID(0, "$NetBSD: gemini_lpchc #include #include #include -#include +#include #include @@ -94,7 +94,7 @@ gemini_lpchc_intrq_insert(gemini_lpchc_s { gemini_lpchc_intrq_t *iqp; -iqp = malloc(sizeof(*iqp), M_DEVBUF, M_WAITOK|M_ZERO); +iqp = kmem_zalloc(sizeof(*iqp), KM_SLEEP); iqp->iq_func = func; iqp->iq_arg = arg; iqp->iq_bit = bit; @@ -113,7 +113,7 @@ gemini_lpchc_intrq_remove(gemini_lpchc_s if ((void *)iqp == cookie) { SIMPLEQ_REMOVE(&sc->sc_intrq, iqp, gemini_lpchc_intrq, iq_q); - free(iqp, M_DEVBUF); + kmem_free(iqp, sizeof(*iqp)); return; } } Index: src/sys/arch/arm/gemini/gemini_pci.c diff -u src/sys/arch/arm/gemini/gemini_pci.c:1.22 src/sys/arch/arm/gemini/gemini_pci.c:1.23 --- src/sys/arch/arm/gemini/gemini_pci.c:1.22 Tue Jul 7 03:38:45 2020 +++ src/sys/arch/arm/gemini/gemini_pci.c Fri Nov 20 18:10:07 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: gemini_pci.c,v 1.22 2020/07/07 03:38:45 thorpej Exp $ */ +/* $NetBSD: gemini_pci.c,v 1.23 2020/11/20 18:10:07 thorpej Exp $ */ /* adapted from: * NetBSD: i80312_pci.c,v 1.9 2005/12/11 12:16:51 christos Exp @@ -44,7 +44,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gemini_pci.c,v 1.22 2020/07/07 03:38:45 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gemini_pci.c,v 1.23 2020/11/20 18:10:07 thorpej Exp $"); #include "opt_gemini.h" #include "opt_pci.h" @@ -53,7 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: gemini_pci.c #include #include #include -#include +#include #include #include @@ -116,7 +116,7 @@ gemini_pci_intrq_insert(void *ih, int (* { struct gemini_pci_intrq *iqp; -iqp = malloc(sizeof(*iqp), M_DEVBUF, M_WAITOK|M_ZERO); +iqp = kmem_zalloc(sizeof(*iqp), KM_SLEEP); iqp->iq_func = func; iqp->iq_arg = arg; iqp->iq_ih = ih; @@ -134,7 +134,7 @@ gemini_pci_intrq_remove(void *cookie) if ((void *)iqp == cookie) { SIMPLEQ_REMOVE(&gemini_pci_intrq, iqp, gemini_pci_intrq, iq_q); - free(iqp, M_DEVBUF); + kmem_free(iqp, sizeof(*iqp)); return; } }
CVS commit: xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k
Module Name:xsrc Committed By: tsutsui Date: Fri Nov 20 18:09:00 UTC 2020 Modified Files: xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k: x68kConfig.c Log Message: Sync with xorg-server: Report which settings are chosen per a config file in the log file. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k/x68kConfig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k/x68kConfig.c diff -u xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k/x68kConfig.c:1.4 xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k/x68kConfig.c:1.5 --- xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k/x68kConfig.c:1.4 Thu Nov 5 16:06:08 2020 +++ xsrc/external/mit/xorg-server.old/dist/hw/netbsd/x68k/x68kConfig.c Fri Nov 20 18:09:00 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: x68kConfig.c,v 1.4 2020/11/05 16:06:08 tsutsui Exp $ */ +/* $NetBSD: x68kConfig.c,v 1.5 2020/11/20 18:09:00 tsutsui Exp $ */ /*- * Copyright (c) 1996 Yasushi Yamasaki * All rights reserved. @@ -112,16 +112,20 @@ const char *hostConfigFilename = "/etc/X const char *siteConfigFilename = X11_LIBDIR "/X68kConfig"; const char *configFilename = NULL; static FILE *config; -char modeSet = FALSE; +static char modeSet = FALSE; static int parseCommand(void); +static void logConfig(void); int x68kConfig(void) { -if (configFilename) +MessageType filefrom = X_DEFAULT; + +if (configFilename) { config = fopen(configFilename, "r"); -else { + filefrom = X_CMDLINE; +} else { configFilename = hostConfigFilename; config = fopen(configFilename, "r"); if (config == NULL) { @@ -131,11 +135,15 @@ x68kConfig(void) } if (config == NULL) FatalError("Can't open X68kConfig file"); + +LogMessage(filefrom, "Using config file: \"%s\"\n", configFilename); + while (parseCommand()) ; fclose(config); if (!modeSet) FatalError("No mode set."); +logConfig(); return 1; } @@ -143,7 +151,7 @@ x68kConfig(void) /*- * X68KConfig parsing part *---*/ -void parseError(int line, const char *str, ...); +static void parseError(int line, const char *str, ...); enum TokenType { TOKEN_EOF, @@ -255,7 +263,7 @@ static void parseMouse(int argc, Token * static void parseKeyboard(int argc, Token **argv); static void parseMode(int argc, Token **argv); -Command command[] = { +static const Command command[] = { { "ModeDef", parseModeDef }, { "Mouse", parseMouse }, { "Keyboard", parseKeyboard }, @@ -263,6 +271,24 @@ Command command[] = { }; #define NCOMMANDS (sizeof(command)/sizeof(command[0])) +static const char *x68kTypeStr[] = { + [X68K_FB_NULL]= NULL, + [X68K_FB_TEXT]= "Text", + [X68K_FB_GRAPHIC] = "Graphic", +}; +#define NTYPES (sizeof(x68kTypeStr) / sizeof(x68kTypeStr[0])) + +static const char *x68kClassStr[] = { + [StaticGray] = "StaticGray", + [GrayScale] = "GrayScale", + [StaticColor] = "StaticColor", + [PseudoColor] = "PseudoColor", + [TrueColor] = "TrueColor", + [DirectColor] = "DirectColor", +}; +#define NCLASSES (sizeof(x68kClassStr) / sizeof(x68kClassStr[0])) +#define ClassInvalid (-1) + /*- * function "parseCommand" * @@ -333,13 +359,13 @@ parseCommand(void) * purpose: examine the number of arguments and the type of each *argument. * argument: (int)n : correct number of arguments - *(enum TokenType *)type : table of types + *(const enum TokenType *)type : table of types *(int)argc_m1 : actual number of arguments *(Token **)argv : command and arguments * returns: nothing *---*/ static void -checkArguments(int n, enum TokenType *type, int argc_m1, Token **argv) +checkArguments(int n, const enum TokenType *type, int argc_m1, Token **argv) { int i; @@ -359,7 +385,7 @@ checkArguments(int n, enum TokenType *ty typedef struct _Mode { struct _Mode *next; -char *name; +const char *name; int type; int depth; int class; @@ -367,7 +393,8 @@ typedef struct _Mode { X68kFbReg reg; } Mode; -Mode *modeList = NULL; +static Mode *modeList = NULL; +static Mode *modeChosen; /*- * function "parseModeDef" @@ -379,7 +406,7 @@ Mode *modeList = NULL; static void parseModeDef(int argc, Token **argv) { -enum TokenType argtype[] = { +
CVS commit: src/sys/arch/arm
Module Name:src Committed By: thorpej Date: Fri Nov 20 18:03:53 UTC 2020 Modified Files: src/sys/arch/arm/at91: at91aic.c at91dbgu.c src/sys/arch/arm/clps711x: clpscom.c src/sys/arch/arm/ep93xx: ep93xx_intr.c epcom.c src/sys/arch/arm/footbridge: footbridge_com.c footbridge_irqhandler.c src/sys/arch/arm/footbridge/isa: isa_machdep.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/at91/at91aic.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/at91/at91dbgu.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/clps711x/clpscom.c cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/ep93xx/ep93xx_intr.c cvs rdiff -u -r1.31 -r1.32 src/sys/arch/arm/ep93xx/epcom.c cvs rdiff -u -r1.38 -r1.39 src/sys/arch/arm/footbridge/footbridge_com.c cvs rdiff -u -r1.26 -r1.27 \ src/sys/arch/arm/footbridge/footbridge_irqhandler.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/footbridge/isa/isa_machdep.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/at91/at91aic.c diff -u src/sys/arch/arm/at91/at91aic.c:1.11 src/sys/arch/arm/at91/at91aic.c:1.12 --- src/sys/arch/arm/at91/at91aic.c:1.11 Wed Mar 26 08:51:59 2014 +++ src/sys/arch/arm/at91/at91aic.c Fri Nov 20 18:03:52 2020 @@ -1,5 +1,5 @@ -/* $Id: at91aic.c,v 1.11 2014/03/26 08:51:59 christos Exp $ */ -/* $NetBSD: at91aic.c,v 1.11 2014/03/26 08:51:59 christos Exp $ */ +/* $Id: at91aic.c,v 1.12 2020/11/20 18:03:52 thorpej Exp $ */ +/* $NetBSD: at91aic.c,v 1.12 2020/11/20 18:03:52 thorpej Exp $ */ /* * Copyright (c) 2007 Embedtronics Oy. @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include @@ -307,7 +307,7 @@ at91aic_intr_establish(int irq, int ipl, panic("intr_establish: interrupt type %d is invalid", type); } - ih = malloc(sizeof(*ih), M_DEVBUF, M_NOWAIT); + ih = kmem_alloc(sizeof(*ih), KM_SLEEP); if (ih == NULL) return (NULL); @@ -338,7 +338,7 @@ at91aic_intr_establish(int irq, int ipl, } #endif } else { - free(ih, M_DEVBUF); + kmem_free(ih, sizeof(*ih)); ih = NULL; } Index: src/sys/arch/arm/at91/at91dbgu.c diff -u src/sys/arch/arm/at91/at91dbgu.c:1.17 src/sys/arch/arm/at91/at91dbgu.c:1.18 --- src/sys/arch/arm/at91/at91dbgu.c:1.17 Sun Dec 15 16:48:25 2019 +++ src/sys/arch/arm/at91/at91dbgu.c Fri Nov 20 18:03:52 2020 @@ -1,5 +1,5 @@ -/* $Id: at91dbgu.c,v 1.17 2019/12/15 16:48:25 tsutsui Exp $ */ -/* $NetBSD: at91dbgu.c,v 1.17 2019/12/15 16:48:25 tsutsui Exp $ */ +/* $Id: at91dbgu.c,v 1.18 2020/11/20 18:03:52 thorpej Exp $ */ +/* $NetBSD: at91dbgu.c,v 1.18 2020/11/20 18:03:52 thorpej Exp $ */ /* * @@ -76,7 +76,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: at91dbgu.c,v 1.17 2019/12/15 16:48:25 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: at91dbgu.c,v 1.18 2020/11/20 18:03:52 thorpej Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -106,7 +106,7 @@ __KERNEL_RCSID(0, "$NetBSD: at91dbgu.c,v #include #include #include -#include +#include #include #include #include @@ -249,7 +249,7 @@ at91dbgu_attach(device_t parent, device_ tp->t_hwiflow = at91dbgu_hwiflow; sc->sc_tty = tp; - sc->sc_rbuf = malloc(AT91DBGU_RING_SIZE << 1, M_DEVBUF, M_WAITOK); + sc->sc_rbuf = kmem_alloc(AT91DBGU_RING_SIZE << 1, KM_SLEEP); sc->sc_rbput = sc->sc_rbget = sc->sc_rbuf; sc->sc_rbavail = AT91DBGU_RING_SIZE; sc->sc_ebuf = sc->sc_rbuf + (AT91DBGU_RING_SIZE << 1); Index: src/sys/arch/arm/clps711x/clpscom.c diff -u src/sys/arch/arm/clps711x/clpscom.c:1.8 src/sys/arch/arm/clps711x/clpscom.c:1.9 --- src/sys/arch/arm/clps711x/clpscom.c:1.8 Sun Nov 10 21:16:23 2019 +++ src/sys/arch/arm/clps711x/clpscom.c Fri Nov 20 18:03:52 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: clpscom.c,v 1.8 2019/11/10 21:16:23 chs Exp $ */ +/* $NetBSD: clpscom.c,v 1.9 2020/11/20 18:03:52 thorpej Exp $ */ /* * Copyright (c) 2013 KIYOHARA Takashi * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: clpscom.c,v 1.8 2019/11/10 21:16:23 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: clpscom.c,v 1.9 2020/11/20 18:03:52 thorpej Exp $"); #include "rnd.h" @@ -38,7 +38,7 @@ __KERNEL_RCSID(0, "$NetBSD: clpscom.c,v #include #include #include -#include +#include #include #include #include @@ -222,7 +222,7 @@ clpscom_attach(device_t parent, device_t sc->sc_tty->t_hwiflow = clpscom_hwiflow; sc->sc_tbc = 0; - sc->sc_rbuf = malloc(CLPSCOM_RING_SIZE << 1, M_DEVBUF, M_WAITOK); + sc->sc_rbuf = kmem_alloc(CLPSCOM_RING_SIZE << 1, KM_SLEEP); sc->sc_rbput = sc->sc_rbget = sc->sc_rbuf; sc->sc_rbavail = CLPSCOM_RING_SIZE; Index: src/sys/arch/arm/ep93xx/ep93xx_intr.c diff -u src/sys/arch/arm/ep93xx/ep93xx_intr.c:1.25 src/sys/arch/arm/ep93xx/ep93xx_intr.c:1.26 --- src/sys/arch/arm/ep93xx/ep93xx_intr.c:1.25 Sun Nov 10 21:16:23 2019 +++ src/sys/ar
CVS commit: src/sys/arch/amigappc/amigappc
Module Name:src Committed By: thorpej Date: Fri Nov 20 17:48:25 UTC 2020 Modified Files: src/sys/arch/amigappc/amigappc: pic_amiga.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/amigappc/amigappc/pic_amiga.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/amigappc/amigappc/pic_amiga.c diff -u src/sys/arch/amigappc/amigappc/pic_amiga.c:1.4 src/sys/arch/amigappc/amigappc/pic_amiga.c:1.5 --- src/sys/arch/amigappc/amigappc/pic_amiga.c:1.4 Sun Nov 10 21:16:22 2019 +++ src/sys/arch/amigappc/amigappc/pic_amiga.c Fri Nov 20 17:48:25 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pic_amiga.c,v 1.4 2019/11/10 21:16:22 chs Exp $ */ +/* $NetBSD: pic_amiga.c,v 1.5 2020/11/20 17:48:25 thorpej Exp $ */ /*- * Copyright (c) 2008,2009,2010 Frank Wille. @@ -29,10 +29,10 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pic_amiga.c,v 1.4 2019/11/10 21:16:22 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pic_amiga.c,v 1.5 2020/11/20 17:48:25 thorpej Exp $"); #include -#include +#include #include #include @@ -65,7 +65,7 @@ setup_amiga_intr(void) struct amiga_ops *amipic; struct pic_ops *pic; - amipic = malloc(sizeof(struct amiga_ops), M_DEVBUF, M_WAITOK); + amipic = kmem_alloc(sizeof(struct amiga_ops), KM_SLEEP); pic = &amipic->pic; pic->pic_numintrs = MAXIPL;
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: thorpej Date: Fri Nov 20 17:44:56 UTC 2020 Modified Files: src/sys/arch/amd64/amd64: netbsd32_machdep.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.136 -r1.137 src/sys/arch/amd64/amd64/netbsd32_machdep.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/amd64/amd64/netbsd32_machdep.c diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.136 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.137 --- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.136 Sat Apr 25 15:26:16 2020 +++ src/sys/arch/amd64/amd64/netbsd32_machdep.c Fri Nov 20 17:44:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.136 2020/04/25 15:26:16 bouyer Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.137 2020/11/20 17:44:56 thorpej Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.136 2020/04/25 15:26:16 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.137 2020/11/20 17:44:56 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -50,7 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_mac #include #include #include -#include +#include #include #include #include @@ -632,14 +632,16 @@ x86_64_set_ldt32(struct lwp *l, void *ar if (ua.num < 0 || ua.num > MAX_USERLDT_SLOTS) return EINVAL; - descv = malloc(sizeof(*descv) * ua.num, M_TEMP, M_WAITOK); + const size_t alloc_size = sizeof(*descv) * ua.num; + + descv = kmem_alloc(alloc_size, KM_SLEEP); error = copyin((void *)(uintptr_t)ua32.desc, descv, sizeof(*descv) * ua.num); if (error == 0) error = x86_set_ldt1(l, &ua, descv); *retval = ua.start; - free(descv, M_TEMP); + kmem_free(descv, alloc_size); return error; } @@ -660,14 +662,16 @@ x86_64_get_ldt32(struct lwp *l, void *ar if (ua.num < 0 || ua.num > MAX_USERLDT_SLOTS) return EINVAL; - cp = malloc(ua.num * sizeof(union descriptor), M_TEMP, M_WAITOK); + const size_t alloc_size = ua.num * sizeof(union descriptor); + + cp = kmem_alloc(alloc_size, KM_SLEEP); error = x86_get_ldt1(l, &ua, cp); *retval = ua.num; if (error == 0) error = copyout(cp, (void *)(uintptr_t)ua32.desc, ua.num * sizeof(*cp)); - free(cp, M_TEMP); + kmem_free(cp, alloc_size); return error; } #endif
CVS commit: src/sys/arch/acorn32
Module Name:src Committed By: thorpej Date: Fri Nov 20 17:38:05 UTC 2020 Modified Files: src/sys/arch/acorn32/mainbus: fd.c src/sys/arch/acorn32/podulebus: podulebus.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/arch/acorn32/mainbus/fd.c cvs rdiff -u -r1.29 -r1.30 src/sys/arch/acorn32/podulebus/podulebus.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/acorn32/mainbus/fd.c diff -u src/sys/arch/acorn32/mainbus/fd.c:1.61 src/sys/arch/acorn32/mainbus/fd.c:1.62 --- src/sys/arch/acorn32/mainbus/fd.c:1.61 Sun Nov 10 21:16:21 2019 +++ src/sys/arch/acorn32/mainbus/fd.c Fri Nov 20 17:38:05 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.61 2019/11/10 21:16:21 chs Exp $ */ +/* $NetBSD: fd.c,v 1.62 2020/11/20 17:38:05 thorpej Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.61 2019/11/10 21:16:21 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.62 2020/11/20 17:38:05 thorpej Exp $"); #include "opt_ddb.h" @@ -97,7 +97,7 @@ __KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.61 #include #include #include -#include +#include #include #include #include @@ -1397,8 +1397,7 @@ fdioctl(dev_t dev, u_long cmd, void *add return EINVAL; } - fd_formb = malloc(sizeof(struct ne7_fd_formb), - M_TEMP, M_WAITOK); + fd_formb = kmem_alloc(sizeof(*fd_formb), KM_SLEEP); fd_formb->head = form_cmd->head; fd_formb->cyl = form_cmd->cylinder; fd_formb->transfer_rate = fd->sc_type->rate; @@ -1422,7 +1421,7 @@ fdioctl(dev_t dev, u_long cmd, void *add } error = fdformat(dev, fd_formb, l); - free(fd_formb, M_TEMP); + kmem_free(fd_formb, sizeof(*fd_formb)); return error; case FDIOCGETOPTS: /* get drive options */ Index: src/sys/arch/acorn32/podulebus/podulebus.c diff -u src/sys/arch/acorn32/podulebus/podulebus.c:1.29 src/sys/arch/acorn32/podulebus/podulebus.c:1.30 --- src/sys/arch/acorn32/podulebus/podulebus.c:1.29 Sat Oct 25 10:58:12 2014 +++ src/sys/arch/acorn32/podulebus/podulebus.c Fri Nov 20 17:38:05 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: podulebus.c,v 1.29 2014/10/25 10:58:12 skrll Exp $ */ +/* $NetBSD: podulebus.c,v 1.30 2020/11/20 17:38:05 thorpej Exp $ */ /* * Copyright (c) 1994-1996 Mark Brinicombe. @@ -43,12 +43,12 @@ #include -__KERNEL_RCSID(0, "$NetBSD: podulebus.c,v 1.29 2014/10/25 10:58:12 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: podulebus.c,v 1.30 2020/11/20 17:38:05 thorpej Exp $"); #include #include #include -#include +#include #include #include #include @@ -561,7 +561,7 @@ podulebus_shift_tag(bus_space_tag_t tag, */ /* XXX never freed, but podules are never detached anyway. */ -*tagp = malloc(sizeof(struct bus_space), M_DEVBUF, M_WAITOK); +*tagp = kmem_alloc(sizeof(struct bus_space), KM_SLEEP); **tagp = *tag; (*tagp)->bs_cookie = (void *)shift; }
CVS commit: src/doc
Module Name:src Committed By: roy Date: Fri Nov 20 13:33:07 UTC 2020 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note import of dhcpcd-9.3.3 To generate a diff of this commit: cvs rdiff -u -r1.1760 -r1.1761 src/doc/3RDPARTY cvs rdiff -u -r1.2753 -r1.2754 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1760 src/doc/3RDPARTY:1.1761 --- src/doc/3RDPARTY:1.1760 Sun Nov 8 15:57:01 2020 +++ src/doc/3RDPARTY Fri Nov 20 13:33:07 2020 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1760 2020/11/08 15:57:01 wiz Exp $ +# $NetBSD: 3RDPARTY,v 1.1761 2020/11/20 13:33:07 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -352,12 +352,12 @@ Notes: Use the dhcp2netbsd script. Package: dhcpcd -Version: 9.3.2 -Current Vers: 9.3.2 +Version: 9.3.3 +Current Vers: 9.3.3 Maintainer: roy Archive Site: ftp://roy.marples.name/pub/dhcpcd/ Home Page: http://roy.marples.name/projects/dhcpcd/ -Date: 2020-11-01 +Date: 2020-11-20 Mailing List: dhcpcd-disc...@marples.name License: BSD (2-clause) Location: external/bsd/dhcpcd/dist Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2753 src/doc/CHANGES:1.2754 --- src/doc/CHANGES:1.2753 Thu Nov 12 12:19:46 2020 +++ src/doc/CHANGES Fri Nov 20 13:33:07 2020 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2753 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2754 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -297,7 +297,8 @@ Changes from NetBSD 9.0 to NetBSD 10.0: tzcode: Updated to 2020c. [christos 20201017] ossaudio(3): Added support for the OSSv4 Mixer API [nia 20201017] tzdata updated to 2020d [kre 20201022] - dhcpcd: Update to version 9.3.1 [roy 20201101] + dhcpcd: Update to version 9.3.2 [roy 20201101] tmux(1): Imported 3.1c. [christos 20201101] kernel: Better default for kern.maxfiles for systems with larger RAM [simonb 20201112] + dhcpcd: Update to version 9.3.3 [roy 20201120]
CVS commit: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri Nov 20 13:24:58 UTC 2020 Modified Files: src/external/bsd/dhcpcd/dist/hooks: 20-resolv.conf 50-ntp.conf 50-ypbind.in src/external/bsd/dhcpcd/dist/src: dhcp.c dhcp6.c dhcpcd.8.in dhcpcd.c if-options.c ipv6.c ipv6nd.c privsep.c script.c Log Message: Sync with dhcpcd-9.3.3 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf \ src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf cvs rdiff -u -r1.2 -r1.3 src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in cvs rdiff -u -r1.42 -r1.43 src/external/bsd/dhcpcd/dist/src/dhcp.c cvs rdiff -u -r1.24 -r1.25 src/external/bsd/dhcpcd/dist/src/dhcp6.c cvs rdiff -u -r1.9 -r1.10 src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in cvs rdiff -u -r1.45 -r1.46 src/external/bsd/dhcpcd/dist/src/dhcpcd.c cvs rdiff -u -r1.28 -r1.29 src/external/bsd/dhcpcd/dist/src/if-options.c cvs rdiff -u -r1.15 -r1.16 src/external/bsd/dhcpcd/dist/src/ipv6.c cvs rdiff -u -r1.25 -r1.26 src/external/bsd/dhcpcd/dist/src/ipv6nd.c cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/src/privsep.c cvs rdiff -u -r1.11 -r1.12 src/external/bsd/dhcpcd/dist/src/script.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf diff -u src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf:1.4 src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf:1.5 --- src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf:1.4 Thu Apr 2 12:41:47 2020 +++ src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf Fri Nov 20 13:24:58 2020 @@ -198,8 +198,10 @@ BOUND6|RENEW6|REBIND6|REBOOT6|INFORM6) ;; esac -if $if_up || [ "$reason" = ROUTERADVERT ]; then - add_resolv_conf -elif $if_down; then - remove_resolv_conf +if $if_configured; then + if $if_up || [ "$reason" = ROUTERADVERT ]; then + add_resolv_conf + elif $if_down; then + remove_resolv_conf + fi fi Index: src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf diff -u src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf:1.4 src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf:1.5 --- src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf:1.4 Thu Apr 2 12:41:48 2020 +++ src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf Fri Nov 20 13:24:58 2020 @@ -135,8 +135,10 @@ BOUND6|RENEW6|REBIND6|REBOOT6|INFORM6) ;; esac -if $if_up; then - add_ntp_conf -elif $if_down; then - remove_ntp_conf +if $if_configured; then + if $if_up; then + add_ntp_conf + elif $if_down; then + remove_ntp_conf + fi fi Index: src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in diff -u src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in:1.2 src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in:1.3 --- src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in:1.2 Sat Sep 22 13:17:46 2018 +++ src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in Fri Nov 20 13:24:58 2020 @@ -68,7 +68,9 @@ restore_yp_binding() fi } -if [ "$reason" = PREINIT ]; then +if ! $if_configured; then + ; +elif [ "$reason" = PREINIT ]; then rm -f "$ypbind_dir/$interface".* elif $if_up || $if_down; then if [ -n "$new_nis_domain" ]; then Index: src/external/bsd/dhcpcd/dist/src/dhcp.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.42 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.43 --- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.42 Sun Nov 1 14:24:01 2020 +++ src/external/bsd/dhcpcd/dist/src/dhcp.c Fri Nov 20 13:24:58 2020 @@ -2346,6 +2346,24 @@ dhcp_bind(struct interface *ifp) old_state = state->added; + if (!(ifo->options & DHCPCD_CONFIGURE)) { + struct ipv4_addr *ia; + + script_runreason(ifp, state->reason); + dhcpcd_daemonise(ifp->ctx); + + /* We we are not configuring the address, we need to keep + * the BPF socket open if the address does not exist. */ + ia = ipv4_iffindaddr(ifp, &state->lease.addr, NULL); + if (ia != NULL) { + state->addr = ia; + state->added = STATE_ADDED; + dhcp_closebpf(ifp); + goto openudp; + } + return; + } + /* Close the BPF filter as we can now receive DHCP messages * on a UDP socket. */ dhcp_closebpf(ifp); @@ -2353,6 +2371,7 @@ dhcp_bind(struct interface *ifp) /* Add the address */ ipv4_applyaddr(ifp); +openudp: /* If not in master mode, open an address specific socket. */ if (ctx->options & DHCPCD_MASTER || (state->old != NULL && @@ -2361,7 +2380,6 @@ dhcp_bind(struct interface *ifp) return; dhcp_closeinet(ifp); - #ifdef PRIVSEP if (IN_PRIVSEP_SE(ctx)) { if (ps_inet_openbootp(state->addr) == -1) @@ -2805,7 +2823,13 @@ dhcp_drop(struct interface *ifp, const c state->new = NULL; state->new_len = 0; state->reason = reason; - ipv4_applyaddr(ifp); + if (ifp->options->options & DHCPCD_CONFIGURE) + ipv4_applyaddr(ifp); + else { + state->addr = NULL; + state->added = 0; + script_runreason(ifp, state->reason); + } free(state->old); state->old = NULL; state->old_len = 0; @@ -4219,6 +4243,20 @@ dhcp_handleifa(int cmd, struct ipv4
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri Nov 20 13:23:39 UTC 2020 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv8156 Log Message: Update to dhcpcd-9.3.3 with the following changes: * dhcpcd: Don't create a launcher process if keeping in foreground * dhcpcd: Add --noconfigure option * control: Create an unpriv socket for non master mode * options: Don't log unknown ones when printing pidfile location Status: Vendor Tag: ROY Release Tags: dhcpcd-9_3_3 U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/control.c C src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/if.c C src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.c C src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/auth.c U src/external/bsd/dhcpcd/dist/src/if-bsd.c C src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/ipv4.c U src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.c C src/external/bsd/dhcpcd/dist/src/ipv6.c C src/external/bsd/dhcpcd/dist/src/ipv6nd.c C src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c C src/external/bsd/dhcpcd/dist/src/privsep.c U src/external/bsd/dhcpcd/dist/src/privsep-root.c U src/external/bsd/dhcpcd/dist/src/privsep-control.c U src/external/bsd/dhcpcd/dist/src/privsep-inet.c U src/external/bsd/dhcpcd/dist/src/privsep-bpf.c U src/external/bsd/dhcpcd/dist/src/privsep-bsd.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/src/privsep.h U src/external/bsd/dhcpcd/dist/src/privsep-root.h U src/external/bsd/dhcpcd/dist/src/privsep-control.h U src/external/bsd/dhcpcd/dist/src/privsep-inet.h U src/external/bsd/dhcpcd/dist/src/privsep-bpf.h U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in C src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.in U src/external/bsd/dhcpcd/dist/hooks/dhcpcd-run-hooks.8.in U src/external/bsd/dhcpcd/dist/hooks/01-test U src/external/bsd/dhcpcd/dist/hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/hooks/15-timezone C src/external/bsd/dhcpcd/dist/hooks/20-resolv.conf U src/external/bsd/dhcpcd/dist/hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/hooks/30-hostname.in C src/external/bsd/dhcpcd/dist/hooks/50-ntp.conf C src/external/bsd/dhcpcd/dist/hooks/50-ypbind.in 12 conflicts created by this import. Use the following command to help the merge: cvs checkout -jROY:yesterday -jROY src/external/bsd/dhcpcd/dist
CVS commit: src/sys/coda
Module Name:src Committed By: hannken Date: Fri Nov 20 10:08:47 UTC 2020 Modified Files: src/sys/coda: coda_vfsops.c Log Message: When validating the mount device string make sure its length is below *data_len and below PATH_MAX. Reported-by: syzbot+2d3af801141509cc8...@syzkaller.appspotmail.com To generate a diff of this commit: cvs rdiff -u -r1.88 -r1.89 src/sys/coda/coda_vfsops.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/coda/coda_vfsops.c diff -u src/sys/coda/coda_vfsops.c:1.88 src/sys/coda/coda_vfsops.c:1.89 --- src/sys/coda/coda_vfsops.c:1.88 Sat Nov 14 11:41:29 2020 +++ src/sys/coda/coda_vfsops.c Fri Nov 20 10:08:47 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: coda_vfsops.c,v 1.88 2020/11/14 11:41:29 hannken Exp $ */ +/* $NetBSD: coda_vfsops.c,v 1.89 2020/11/20 10:08:47 hannken Exp $ */ /* * @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: coda_vfsops.c,v 1.88 2020/11/14 11:41:29 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: coda_vfsops.c,v 1.89 2020/11/20 10:08:47 hannken Exp $"); #include #include @@ -197,7 +197,11 @@ coda_mount(struct mount *vfsp, /* Alloca * fixed default size for the filename buffer. */ /* Ensure that namei() doesn't run off the filename buffer */ -((char *)data)[*data_len - 1] = 0; +if (*data_len < 1 || *data_len > PATH_MAX || + strnlen(data, *data_len) >= *data_len) { + MARK_INT_FAIL(CODA_MOUNT_STATS); + return EINVAL; +} error = namei_simple_kernel((char *)data, NSM_FOLLOW_NOEMULROOT, &dvp);