CVS commit: src/share/mk
Module Name:src Committed By: simonb Date: Mon Mar 29 05:22:50 UTC 2021 Modified Files: src/share/mk: bsd.kmodule.mk Log Message: On MIPS if we compile C files as N64, compile assembly with the same ABI. To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/share/mk/bsd.kmodule.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: simonb Date: Mon Mar 29 05:22:50 UTC 2021 Modified Files: src/share/mk: bsd.kmodule.mk Log Message: On MIPS if we compile C files as N64, compile assembly with the same ABI. To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/share/mk/bsd.kmodule.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.kmodule.mk diff -u src/share/mk/bsd.kmodule.mk:1.75 src/share/mk/bsd.kmodule.mk:1.76 --- src/share/mk/bsd.kmodule.mk:1.75 Tue Mar 23 13:22:40 2021 +++ src/share/mk/bsd.kmodule.mk Mon Mar 29 05:22:49 2021 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.kmodule.mk,v 1.75 2021/03/23 13:22:40 simonb Exp $ +# $NetBSD: bsd.kmodule.mk,v 1.76 2021/03/29 05:22:49 simonb Exp $ # We are not building this with PIE MKPIE=no @@ -57,9 +57,11 @@ CFLAGS+= -fno-pic CFLAGS+= -fPIC -Wa,-fno-pic .elif ${MACHINE_ARCH} == "mips64eb" && !defined(BSD_MK_COMPAT_FILE) CFLAGS+= -mabi=64 +AFLAGS+= -mabi=64 LDFLAGS+= -Wl,-m,elf64btsmip .elif ${MACHINE_ARCH} == "mips64el" && !defined(BSD_MK_COMPAT_FILE) CFLAGS+= -mabi=64 +AFLAGS+= -mabi=64 LDFLAGS+= -Wl,-m,elf64ltsmip .endif
CVS commit: src/external/cddl/osnet/lib/libdtrace
Module Name:src Committed By: simonb Date: Mon Mar 29 05:18:02 UTC 2021 Modified Files: src/external/cddl/osnet/lib/libdtrace: Makefile Log Message: Compile MIPS specific code. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/external/cddl/osnet/lib/libdtrace/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/lib/libdtrace/Makefile diff -u src/external/cddl/osnet/lib/libdtrace/Makefile:1.28 src/external/cddl/osnet/lib/libdtrace/Makefile:1.29 --- src/external/cddl/osnet/lib/libdtrace/Makefile:1.28 Tue Mar 17 01:36:29 2020 +++ src/external/cddl/osnet/lib/libdtrace/Makefile Mon Mar 29 05:18:02 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.28 2020/03/17 01:36:29 fox Exp $ +# $NetBSD: Makefile,v 1.29 2021/03/29 05:18:02 simonb Exp $ # $FreeBSD: head/cddl/lib/libdtrace/Makefile 314654 2017-03-04 11:30:04Z ngie $ @@ -115,6 +115,9 @@ CPPFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/ .elif ${MACHINE_CPU} == "arm" CPPFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/arm .PATH: ${.CURDIR}/../../dist/lib/libdtrace/arm +.elif ${MACHINE_CPU} == "mips" +CPPFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/mips +.PATH: ${.CURDIR}/../../dist/lib/libdtrace/mips .endif COPTS.dt_link.c += ${GCC_NO_FORMAT_TRUNCATION}
CVS commit: src/external/cddl/osnet/lib/libdtrace
Module Name:src Committed By: simonb Date: Mon Mar 29 05:18:02 UTC 2021 Modified Files: src/external/cddl/osnet/lib/libdtrace: Makefile Log Message: Compile MIPS specific code. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/external/cddl/osnet/lib/libdtrace/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/cddl/osnet/dev
Module Name:src Committed By: simonb Date: Mon Mar 29 05:17:09 UTC 2021 Added Files: src/external/cddl/osnet/dev/dtrace/mips: dtrace_asm.S dtrace_isa.c dtrace_subr.c regset.h src/external/cddl/osnet/dev/fbt/mips: fbt_isa.c fbt_isa.h Log Message: Work in progress dtrace for MIPS. MIPS support mostly copied from FreeBSD, with NetBSD-specific changes largely based on aarch64 dtrace support. Working well enough for system call tracing. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/cddl/osnet/dev/dtrace/mips/dtrace_asm.S \ src/external/cddl/osnet/dev/dtrace/mips/dtrace_isa.c \ src/external/cddl/osnet/dev/dtrace/mips/dtrace_subr.c \ src/external/cddl/osnet/dev/dtrace/mips/regset.h cvs rdiff -u -r0 -r1.1 src/external/cddl/osnet/dev/fbt/mips/fbt_isa.c \ src/external/cddl/osnet/dev/fbt/mips/fbt_isa.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/cddl/osnet/dev/dtrace/mips/dtrace_asm.S diff -u /dev/null src/external/cddl/osnet/dev/dtrace/mips/dtrace_asm.S:1.1 --- /dev/null Mon Mar 29 05:17:09 2021 +++ src/external/cddl/osnet/dev/dtrace/mips/dtrace_asm.S Mon Mar 29 05:17:09 2021 @@ -0,0 +1,233 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [] [name of copyright owner] + * + * CDDL HEADER END + * + * $FreeBSD$ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#define _ASM +#define _LOCORE + +#include +#include + +#include +#include +#include + +.setnoreorder # Noreorder is default style! + +/* + * Primitives + */ + +.text + +/* +void dtrace_membar_producer(void) +*/ +LEAF(dtrace_membar_producer) + j ra + nop +END(dtrace_membar_producer) + +/* +void dtrace_membar_consumer(void) +*/ +LEAF(dtrace_membar_consumer) + j ra + nop +END(dtrace_membar_consumer) + +/* +dtrace_icookie_t dtrace_interrupt_disable(void) +*/ +LEAF(dtrace_interrupt_disable) + mfc0 t0, MIPS_COP_0_STATUS + move v0, t0 + and v0, v0, MIPS_SR_INT_IE + and t0, t0, ~MIPS_SR_INT_IE + mtc0 t0, MIPS_COP_0_STATUS + j ra + nop +END(dtrace_interrupt_disable) + +/* +void dtrace_interrupt_enable(dtrace_icookie_t cookie) +*/ +LEAF(dtrace_interrupt_enable) + mfc0 t0, MIPS_COP_0_STATUS + beqz a0, not_enabled + or t0, t0, MIPS_SR_INT_IE + mtc0 t0, MIPS_COP_0_STATUS +not_enabled: + j ra + nop +END(dtrace_interrupt_enable) + +/* +uint32_t dtrace_cas32(uint32_t *target, uint32_t cmp, uint32_t new) +*/ +LEAF(dtrace_cas32) +1: + move t1, a2 + ll t0, 0(a0) + bne t0, a1, 2f + nop + sc t1, 0(a0) + beqz t1, 1b + nop +2: move v0, t0 + j ra + nop +END(dtrace_cas32) + +/* +void * +dtrace_casptr(void *target, void *cmp, void *new) +*/ +LEAF(dtrace_casptr) +1: + move t1, a2 + PTR_LL t0, 0(a0) + bne t0, a1, 2f + nop + PTR_SC t1, 0(a0) + beqz t1, 1b + nop +2: move v0, t0 + j ra + nop +END(dtrace_casptr) + + +/* +uintptr_t +dtrace_fulword(void *addr) +*/ +LEAF(dtrace_fulword) +END(dtrace_fulword) + +/* +uint8_t +dtrace_fuword8_nocheck(void *addr) +*/ +LEAF(dtrace_fuword8_nocheck) + lbu v0, 0(a0) + j ra + nop +END(dtrace_fuword8_nocheck) + +/* +uint16_t +dtrace_fuword16_nocheck(void *addr) +*/ +LEAF(dtrace_fuword16_nocheck) + lhu v0, 0(a0) + j ra + nop +END(dtrace_fuword16_nocheck) + +/* +uint32_t +dtrace_fuword32_nocheck(void *addr) +*/ +LEAF(dtrace_fuword32_nocheck) + lw v0, 0(a0) + j ra + nop +END(dtrace_fuword32_nocheck) + +/* +uint64_t +dtrace_fuword64_nocheck(void *addr) +*/ +LEAF(dtrace_fuword64_nocheck) +#if defined(__mips_n64) || defined(__mips_n32) + ld v0, 0(a0) +#else + lw v1,4(a0) + lw v0,0(a0) +#endif + j ra + nop +END(dtrace_fuword64_nocheck) + +/* +XXX: unoptimized +void +dtrace_copy(uintptr_t src, uintptr_t dest, size_t size) +*/ +LEAF(dtrace_copy) +1: + beqz a2, 2f + nop + lbu t0, 0(a0) + sb t0, 0(a1) + PTR_ADDU a0, a0, 1 + PTR_ADDU a1, a1, 1 + INT_SUBU a2, a2, 1 + j 1b + nop +2: + j ra + nop +END(dtrace_copy) + +/* +XXX: Unoptimized. Check for flags on page boundaries only(?) +void +dtrace_copystr(uintptr_t uaddr, uintptr_t kaddr, size_t size, +volatile uint16_t *flags) +*/ +LEAF(dtrace_copystr) +1: + lbu t0, 0(a0) + sb t0,
CVS commit: src/external/cddl/osnet/dev
Module Name:src Committed By: simonb Date: Mon Mar 29 05:17:09 UTC 2021 Added Files: src/external/cddl/osnet/dev/dtrace/mips: dtrace_asm.S dtrace_isa.c dtrace_subr.c regset.h src/external/cddl/osnet/dev/fbt/mips: fbt_isa.c fbt_isa.h Log Message: Work in progress dtrace for MIPS. MIPS support mostly copied from FreeBSD, with NetBSD-specific changes largely based on aarch64 dtrace support. Working well enough for system call tracing. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/cddl/osnet/dev/dtrace/mips/dtrace_asm.S \ src/external/cddl/osnet/dev/dtrace/mips/dtrace_isa.c \ src/external/cddl/osnet/dev/dtrace/mips/dtrace_subr.c \ src/external/cddl/osnet/dev/dtrace/mips/regset.h cvs rdiff -u -r0 -r1.1 src/external/cddl/osnet/dev/fbt/mips/fbt_isa.c \ src/external/cddl/osnet/dev/fbt/mips/fbt_isa.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/cddl/osnet/dev/cyclic/mips
Module Name:src Committed By: simonb Date: Mon Mar 29 03:27:38 UTC 2021 Added Files: src/external/cddl/osnet/dev/cyclic/mips: cyclic_machdep.c Log Message: Add cyclic_machdep.c for MIPS The code is identical to i386's one. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ src/external/cddl/osnet/dev/cyclic/mips/cyclic_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/cddl/osnet/dev/cyclic/mips/cyclic_machdep.c diff -u /dev/null src/external/cddl/osnet/dev/cyclic/mips/cyclic_machdep.c:1.1 --- /dev/null Mon Mar 29 03:27:38 2021 +++ src/external/cddl/osnet/dev/cyclic/mips/cyclic_machdep.c Mon Mar 29 03:27:38 2021 @@ -0,0 +1,148 @@ +/* $NetBSD: cyclic_machdep.c,v 1.1 2021/03/29 03:27:38 simonb Exp $ */ + +/*- + * Copyright 2006-2008 John Birrell + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/sys/cddl/dev/cyclic/i386/cyclic_machdep.c 222813 2011-06-07 08:46:13Z attilio $ + * + */ + +static void enable(cyb_arg_t); +static void disable(cyb_arg_t); +static void reprogram(cyb_arg_t, hrtime_t); +static void xcall(cyb_arg_t, cpu_t *, cyc_func_t, void *); + +static cyc_backend_t be = { + NULL, /* cyb_configure */ + NULL, /* cyb_unconfigure */ + enable, + disable, + reprogram, + xcall, + NULL /* cyb_arg_t cyb_arg */ +}; + +static void +cyclic_ap_start(void *dummy) +{ + /* Initialise the rest of the CPUs. */ + cyclic_mp_init(); +} + +SYSINIT(cyclic_ap_start, SI_SUB_SMP, SI_ORDER_ANY, cyclic_ap_start, NULL); + +/* + * Machine dependent cyclic subsystem initialisation. + */ +static void +cyclic_machdep_init(void) +{ + /* Register the cyclic backend. */ + cyclic_init(); +#ifdef __NetBSD__ + cyclic_ap_start(NULL); +#endif +} + +static void +cyclic_machdep_uninit(void) +{ + int i; + + for (i = 0; i <= mp_maxid; i++) + /* Reset the cyclic clock callback hook. */ + cyclic_clock_func[i] = NULL; + + /* De-register the cyclic backend. */ + cyclic_uninit(); +} + +static hrtime_t exp_due[MAXCPU]; + +/* + * This function is the one registered by the machine dependent + * initialiser as the callback for high speed timer events. + */ +static void +cyclic_clock(struct clockframe *frame) +{ + cpu_t *c = _cpu[cpu_number()]; + + if (c->cpu_cyclic != NULL && gethrtime() >= exp_due[cpu_number()]) { + if (TRAPF_USERMODE(frame)) { + c->cpu_profile_pc = 0; + c->cpu_profile_upc = TRAPF_PC(frame); + } else { + c->cpu_profile_pc = TRAPF_PC(frame); + c->cpu_profile_upc = 0; + } + + c->cpu_intr_actv = 1; + + /* Fire any timers that are due. */ + cyclic_fire(c); + + c->cpu_intr_actv = 0; + } +} + +static void enable(cyb_arg_t arg) +{ + /* Register the cyclic clock callback function. */ + cyclic_clock_func[cpu_number()] = cyclic_clock; +} + +static void disable(cyb_arg_t arg) +{ + /* Reset the cyclic clock callback function. */ + cyclic_clock_func[cpu_number()] = NULL; +} + +static void reprogram(cyb_arg_t arg, hrtime_t exp) +{ + exp_due[cpu_number()] = exp; +} + +#ifdef __NetBSD__ +static void xcall_func(void *arg0, void *arg1) +{ + cyc_func_t func; + + func = arg0; + (*func)(arg1); +} +#endif + +static void xcall(cyb_arg_t arg, cpu_t *c, cyc_func_t func, void *param) +{ +#ifdef __NetBSD__ + uint64_t xc; + + xc = xc_unicast(XC_HIGHPRI, xcall_func, func, param, cpu_lookup(c->cpuid)); + xc_wait(xc); +#else + smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid), + smp_no_rendevous_barrier, func, smp_no_rendevous_barrier, param); +#endif +}
CVS commit: src/external/cddl/osnet/dev/cyclic/mips
Module Name:src Committed By: simonb Date: Mon Mar 29 03:27:38 UTC 2021 Added Files: src/external/cddl/osnet/dev/cyclic/mips: cyclic_machdep.c Log Message: Add cyclic_machdep.c for MIPS The code is identical to i386's one. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ src/external/cddl/osnet/dev/cyclic/mips/cyclic_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: simonb Date: Mon Mar 29 03:22:18 UTC 2021 Modified Files: src/sys/arch/mips/mips: trap.c Log Message: (Very) minimal kernel support for dtrace on MIPS; enough to system call tracing to work for example. To generate a diff of this commit: cvs rdiff -u -r1.259 -r1.260 src/sys/arch/mips/mips/trap.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/mips/trap.c diff -u src/sys/arch/mips/mips/trap.c:1.259 src/sys/arch/mips/mips/trap.c:1.260 --- src/sys/arch/mips/mips/trap.c:1.259 Wed Mar 17 11:05:37 2021 +++ src/sys/arch/mips/mips/trap.c Mon Mar 29 03:22:17 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.259 2021/03/17 11:05:37 simonb Exp $ */ +/* $NetBSD: trap.c,v 1.260 2021/03/29 03:22:17 simonb Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,10 +39,11 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.259 2021/03/17 11:05:37 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.260 2021/03/29 03:22:17 simonb Exp $"); #include "opt_cputype.h" /* which mips CPU levels do we support? */ #include "opt_ddb.h" +#include "opt_dtrace.h" #include "opt_kgdb.h" #include "opt_multiprocessor.h" @@ -804,6 +805,16 @@ mips_singlestep(struct lwp *l) return 0; } +#ifdef KDTRACE_HOOKS +#include + +/* Not used for now, but needed for dtrace/fbt modules */ +dtrace_doubletrap_func_t dtrace_doubletrap_func = NULL; +dtrace_trap_func_t dtrace_trap_func = NULL; + +int(* dtrace_invop_jump_addr)(struct trapframe *); +#endif /* KDTRACE_HOOKS */ + #ifdef TRAP_SIGDEBUG static void frame_dump(const struct trapframe *tf, struct pcb *pcb) @@ -863,4 +874,4 @@ sigdebug(const struct trapframe *tf, con e); frame_dump(tf, lwp_getpcb(l)); } -#endif +#endif /* TRAP_SIGDEBUG */
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: simonb Date: Mon Mar 29 03:22:18 UTC 2021 Modified Files: src/sys/arch/mips/mips: trap.c Log Message: (Very) minimal kernel support for dtrace on MIPS; enough to system call tracing to work for example. To generate a diff of this commit: cvs rdiff -u -r1.259 -r1.260 src/sys/arch/mips/mips/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/mips
Module Name:src Committed By: simonb Date: Mon Mar 29 03:09:42 UTC 2021 Modified Files: src/sys/arch/mips/include: db_machdep.h src/sys/arch/mips/mips: mips_stacktrace.c Log Message: Expose kdbpeek() and kdbrpeek() for dtrace. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/mips/include/db_machdep.h cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/mips/mips_stacktrace.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/include/db_machdep.h diff -u src/sys/arch/mips/include/db_machdep.h:1.36 src/sys/arch/mips/include/db_machdep.h:1.37 --- src/sys/arch/mips/include/db_machdep.h:1.36 Mon Mar 29 03:07:33 2021 +++ src/sys/arch/mips/include/db_machdep.h Mon Mar 29 03:09:41 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: db_machdep.h,v 1.36 2021/03/29 03:07:33 simonb Exp $ */ +/* $NetBSD: db_machdep.h,v 1.37 2021/03/29 03:09:41 simonb Exp $ */ /* * Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author) @@ -99,6 +99,12 @@ db_set_ddb_regs(int type, struct reg *re ddb_regs = *regs; } +/* + * Helper functions for fetching 32-bit and 64-bit kernel memory. + */ +bool kdbpeek(vaddr_t, unsigned *); +mips_reg_t kdbrpeek(vaddr_t addr, size_t n); + /* * Constants for KGDB. Index: src/sys/arch/mips/mips/mips_stacktrace.c diff -u src/sys/arch/mips/mips/mips_stacktrace.c:1.7 src/sys/arch/mips/mips/mips_stacktrace.c:1.8 --- src/sys/arch/mips/mips/mips_stacktrace.c:1.7 Thu Sep 24 03:17:18 2020 +++ src/sys/arch/mips/mips/mips_stacktrace.c Mon Mar 29 03:09:42 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_stacktrace.c,v 1.7 2020/09/24 03:17:18 mrg Exp $ */ +/* $NetBSD: mips_stacktrace.c,v 1.8 2021/03/29 03:09:42 simonb Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mips_stacktrace.c,v 1.7 2020/09/24 03:17:18 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mips_stacktrace.c,v 1.8 2021/03/29 03:09:42 simonb Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -191,7 +191,7 @@ static const struct { void *addr; const }; -static bool +bool kdbpeek(vaddr_t addr, unsigned *valp) { if (addr & 3) { @@ -211,7 +211,7 @@ kdbpeek(vaddr_t addr, unsigned *valp) } } -static mips_reg_t +mips_reg_t kdbrpeek(vaddr_t addr, size_t n) { mips_reg_t rc = 0;
CVS commit: src/sys/arch/mips
Module Name:src Committed By: simonb Date: Mon Mar 29 03:09:42 UTC 2021 Modified Files: src/sys/arch/mips/include: db_machdep.h src/sys/arch/mips/mips: mips_stacktrace.c Log Message: Expose kdbpeek() and kdbrpeek() for dtrace. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/mips/include/db_machdep.h cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/mips/mips_stacktrace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: simonb Date: Mon Mar 29 03:07:33 UTC 2021 Modified Files: src/sys/arch/mips/include: db_machdep.h Log Message: Move the cpu_reset_address() declaration inside #ifdef _KERNEL, add a comment. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/mips/include/db_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/db_machdep.h diff -u src/sys/arch/mips/include/db_machdep.h:1.35 src/sys/arch/mips/include/db_machdep.h:1.36 --- src/sys/arch/mips/include/db_machdep.h:1.35 Mon Mar 29 03:03:48 2021 +++ src/sys/arch/mips/include/db_machdep.h Mon Mar 29 03:07:33 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: db_machdep.h,v 1.35 2021/03/29 03:03:48 simonb Exp $ */ +/* $NetBSD: db_machdep.h,v 1.36 2021/03/29 03:07:33 simonb Exp $ */ /* * Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author) @@ -128,10 +128,15 @@ bool ddb_running_on_any_cpu_p(void); void db_resume_others(void); void db_mips_stack_trace(void *, void *, void (*pr)(const char *, ...)); -extern void (*cpu_reset_address)(void); #ifdef _KERNEL /* + * Optional function to perform machine- or cpu-specific reset. + * Called from ddb "machine reset". + */ +extern void (*cpu_reset_address)(void); + +/* * We have machine-dependent commands. */ #define DB_MACHINE_COMMANDS
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: simonb Date: Mon Mar 29 03:07:33 UTC 2021 Modified Files: src/sys/arch/mips/include: db_machdep.h Log Message: Move the cpu_reset_address() declaration inside #ifdef _KERNEL, add a comment. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/mips/include/db_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: simonb Date: Mon Mar 29 03:03:48 UTC 2021 Modified Files: src/sys/arch/mips/include: db_machdep.h Log Message: Whitespace nits. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/mips/include/db_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: simonb Date: Mon Mar 29 03:03:48 UTC 2021 Modified Files: src/sys/arch/mips/include: db_machdep.h Log Message: Whitespace nits. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/mips/include/db_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/db_machdep.h diff -u src/sys/arch/mips/include/db_machdep.h:1.34 src/sys/arch/mips/include/db_machdep.h:1.35 --- src/sys/arch/mips/include/db_machdep.h:1.34 Wed Feb 10 07:19:54 2021 +++ src/sys/arch/mips/include/db_machdep.h Mon Mar 29 03:03:48 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: db_machdep.h,v 1.34 2021/02/10 07:19:54 simonb Exp $ */ +/* $NetBSD: db_machdep.h,v 1.35 2021/03/29 03:03:48 simonb Exp $ */ /* * Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author) @@ -83,11 +83,10 @@ extern db_regs_t ddb_regs; /* register s #define IS_WATCHPOINT_TRAP(type, code) (0) /* XXX mips3 watchpoint */ /* - * Interface to disassembly (shared with mdb) + * Interface to disassembly (shared with mdb) */ db_addr_t db_disasm_insn(int insn, db_addr_t loc, bool altfmt); - /* * Entrypoints to DDB for kernel, keyboard drivers, init hook */
CVS commit: src/sys/fs/nfs
Module Name:src Committed By: simonb Date: Mon Mar 29 02:13:38 UTC 2021 Modified Files: src/sys/fs/nfs/client: nfs_clbio.c src/sys/fs/nfs/server: nfs_nfsdport.c Log Message: Don't use legacy VM types. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/fs/nfs/client/nfs_clbio.c cvs rdiff -u -r1.3 -r1.4 src/sys/fs/nfs/server/nfs_nfsdport.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/fs/nfs/client/nfs_clbio.c diff -u src/sys/fs/nfs/client/nfs_clbio.c:1.6 src/sys/fs/nfs/client/nfs_clbio.c:1.7 --- src/sys/fs/nfs/client/nfs_clbio.c:1.6 Tue Sep 29 03:02:19 2020 +++ src/sys/fs/nfs/client/nfs_clbio.c Mon Mar 29 02:13:37 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_clbio.c,v 1.6 2020/09/29 03:02:19 msaitoh Exp $ */ +/* $NetBSD: nfs_clbio.c,v 1.7 2021/03/29 02:13:37 simonb Exp $ */ /*- * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -35,7 +35,7 @@ #include /* __FBSDID("FreeBSD: head/sys/fs/nfsclient/nfs_clbio.c 304026 2016-08-12 22:44:59Z rmacklem "); */ -__RCSID("$NetBSD: nfs_clbio.c,v 1.6 2020/09/29 03:02:19 msaitoh Exp $"); +__RCSID("$NetBSD: nfs_clbio.c,v 1.7 2021/03/29 02:13:37 simonb Exp $"); #include #include @@ -77,7 +77,7 @@ ncl_getpages(struct vop_getpages_args *a int i, error, nextoff, size, toff, count, npages; struct uio uio; struct iovec iov; - vm_offset_t kva; + vaddr_t kva; struct buf *bp; struct vnode *vp; struct thread *td; @@ -137,7 +137,7 @@ ncl_getpages(struct vop_getpages_args *a */ bp = getpbuf(_pbuf_freecnt); - kva = (vm_offset_t) bp->b_data; + kva = (vaddr_t) bp->b_data; pmap_qenter(kva, pages, npages); PCPU_INC(cnt.v_vnodein); PCPU_ADD(cnt.v_vnodepgsin, npages); @@ -221,7 +221,7 @@ ncl_putpages(struct vop_putpages_args *a { struct uio uio; struct iovec iov; - vm_offset_t kva; + vaddr_t kva; struct buf *bp; int iomode, must_commit, i, error, npages, count; off_t offset; @@ -283,7 +283,7 @@ ncl_putpages(struct vop_putpages_args *a */ bp = getpbuf(_pbuf_freecnt); - kva = (vm_offset_t) bp->b_data; + kva = (vaddr_t) bp->b_data; pmap_qenter(kva, pages, npages); PCPU_INC(cnt.v_vnodeout); PCPU_ADD(cnt.v_vnodepgsout, count); Index: src/sys/fs/nfs/server/nfs_nfsdport.c diff -u src/sys/fs/nfs/server/nfs_nfsdport.c:1.3 src/sys/fs/nfs/server/nfs_nfsdport.c:1.4 --- src/sys/fs/nfs/server/nfs_nfsdport.c:1.3 Mon Sep 3 16:29:34 2018 +++ src/sys/fs/nfs/server/nfs_nfsdport.c Mon Mar 29 02:13:38 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_nfsdport.c,v 1.3 2018/09/03 16:29:34 riastradh Exp $ */ +/* $NetBSD: nfs_nfsdport.c,v 1.4 2021/03/29 02:13:38 simonb Exp $ */ /*- * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -34,7 +34,7 @@ #include /* __FBSDID("FreeBSD: head/sys/fs/nfsserver/nfs_nfsdport.c 308212 2016-11-02 12:43:15Z kib "); */ -__RCSID("$NetBSD: nfs_nfsdport.c,v 1.3 2018/09/03 16:29:34 riastradh Exp $"); +__RCSID("$NetBSD: nfs_nfsdport.c,v 1.4 2021/03/29 02:13:38 simonb Exp $"); #if 0 #include @@ -136,7 +136,7 @@ nfsrv_sequential_heuristic(struct uio *u /* Locate best candidate. */ try = 32; - hi = ((int)(vm_offset_t)vp / sizeof(struct vnode)) % NUM_HEURISTIC; + hi = ((int)(vaddr_t)vp / sizeof(struct vnode)) % NUM_HEURISTIC; nh = [hi]; while (try--) { if (nfsheur[hi].nh_vp == vp) {
CVS commit: src/sys/fs/nfs
Module Name:src Committed By: simonb Date: Mon Mar 29 02:13:38 UTC 2021 Modified Files: src/sys/fs/nfs/client: nfs_clbio.c src/sys/fs/nfs/server: nfs_nfsdport.c Log Message: Don't use legacy VM types. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/fs/nfs/client/nfs_clbio.c cvs rdiff -u -r1.3 -r1.4 src/sys/fs/nfs/server/nfs_nfsdport.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: simonb Date: Mon Mar 29 02:07:43 UTC 2021 Modified Files: src/sys/arch/mips/include: types.h Log Message: Provide vm_offset_t and vm_size_t typedefs - used by dtrace. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/arch/mips/include/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/types.h diff -u src/sys/arch/mips/include/types.h:1.74 src/sys/arch/mips/include/types.h:1.75 --- src/sys/arch/mips/include/types.h:1.74 Sat Jan 23 19:38:53 2021 +++ src/sys/arch/mips/include/types.h Mon Mar 29 02:07:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.74 2021/01/23 19:38:53 christos Exp $ */ +/* $NetBSD: types.h,v 1.75 2021/03/29 02:07:43 simonb Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -98,6 +98,9 @@ typedef __uint32_t vsize_t; #define PRIdVSIZE PRId32 #endif +typedef vaddr_t vm_offset_t; /* deprecated (cddl/FreeBSD compat) */ +typedef vsize_t vm_size_t; /* deprecated (cddl/FreeBSD compat) */ + typedef int mips_prid_t; /* Make sure this is signed; we need pointers to be sign-extended. */
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: simonb Date: Mon Mar 29 02:07:43 UTC 2021 Modified Files: src/sys/arch/mips/include: types.h Log Message: Provide vm_offset_t and vm_size_t typedefs - used by dtrace. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/arch/mips/include/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: simonb Date: Mon Mar 29 01:57:09 UTC 2021 Modified Files: src/distrib/sets/lists/comp: stl.mi src/external/cddl/osnet/lib: Makefile Log Message: Don't build or install /usr/lib/dtrace/drti.o - currently not used, may be one day... To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/distrib/sets/lists/comp/stl.mi cvs rdiff -u -r1.9 -r1.10 src/external/cddl/osnet/lib/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/sets/lists/comp/stl.mi diff -u src/distrib/sets/lists/comp/stl.mi:1.7 src/distrib/sets/lists/comp/stl.mi:1.8 --- src/distrib/sets/lists/comp/stl.mi:1.7 Thu Aug 27 15:32:00 2020 +++ src/distrib/sets/lists/comp/stl.mi Mon Mar 29 01:57:09 2021 @@ -1,7 +1,7 @@ -# $NetBSD: stl.mi,v 1.7 2020/08/27 15:32:00 riastradh Exp $ +# $NetBSD: stl.mi,v 1.8 2021/03/29 01:57:09 simonb Exp $ ./usr/lib/crtbegin.ocomp-c-lib compatfile ./usr/lib/crtend.ocomp-c-lib compatfile ./usr/lib/crti.ocomp-c-lib compatfile ./usr/lib/crtn.ocomp-c-lib compatfile -./usr/lib/dtrace/drti.ocomp-c-lib dtrace +./usr/lib/dtrace/drti.ocomp-c-lib dtrace,obsolete ./usr/lib/sysident.ocomp-c-lib compatfile Index: src/external/cddl/osnet/lib/Makefile diff -u src/external/cddl/osnet/lib/Makefile:1.9 src/external/cddl/osnet/lib/Makefile:1.10 --- src/external/cddl/osnet/lib/Makefile:1.9 Mon May 28 21:05:08 2018 +++ src/external/cddl/osnet/lib/Makefile Mon Mar 29 01:57:09 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2018/05/28 21:05:08 chs Exp $ +# $NetBSD: Makefile,v 1.10 2021/03/29 01:57:09 simonb Exp $ # # @@ -6,7 +6,8 @@ .if (defined(MKDTRACE) && ${MKDTRACE} != "no") SUBDIR+= libdtrace -SUBDIR+= drti +# drti.o is not (yet) used +# SUBDIR+= drti .endif .if ${MKCTF:Uno} != "no" SUBDIR+= libctf
CVS commit: src
Module Name:src Committed By: simonb Date: Mon Mar 29 01:57:09 UTC 2021 Modified Files: src/distrib/sets/lists/comp: stl.mi src/external/cddl/osnet/lib: Makefile Log Message: Don't build or install /usr/lib/dtrace/drti.o - currently not used, may be one day... To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/distrib/sets/lists/comp/stl.mi cvs rdiff -u -r1.9 -r1.10 src/external/cddl/osnet/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: simonb Date: Mon Mar 29 01:48:29 UTC 2021 Modified Files: src/distrib/sets/lists/comp: ad.mips src/sys/arch/mips/include: Makefile Log Message: Install , now needed for dtrace. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/distrib/sets/lists/comp/ad.mips cvs rdiff -u -r1.34 -r1.35 src/sys/arch/mips/include/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/sets/lists/comp/ad.mips diff -u src/distrib/sets/lists/comp/ad.mips:1.86 src/distrib/sets/lists/comp/ad.mips:1.87 --- src/distrib/sets/lists/comp/ad.mips:1.86 Mon Sep 7 00:19:04 2020 +++ src/distrib/sets/lists/comp/ad.mips Mon Mar 29 01:48:29 2021 @@ -1,4 +1,4 @@ -# $NetBSD: ad.mips,v 1.86 2020/09/07 00:19:04 mrg Exp $ +# $NetBSD: ad.mips,v 1.87 2021/03/29 01:48:29 simonb Exp $ -./usr/lib/64/libgomp.a -./usr/lib/64/libgomp.so -./usr/lib/64/libgomp.so.1 @@ -55,6 +55,7 @@ ./usr/include/mips/endian_machdep.h comp-c-include ./usr/include/mips/fenv.h comp-c-include ./usr/include/mips/float.h comp-c-include +./usr/include/mips/frame.h comp-c-include ./usr/include/mips/ieee.h comp-c-include ./usr/include/mips/ieeefp.h comp-c-include ./usr/include/mips/int_const.h comp-c-include Index: src/sys/arch/mips/include/Makefile diff -u src/sys/arch/mips/include/Makefile:1.34 src/sys/arch/mips/include/Makefile:1.35 --- src/sys/arch/mips/include/Makefile:1.34 Thu Jul 12 10:46:45 2018 +++ src/sys/arch/mips/include/Makefile Mon Mar 29 01:48:29 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.34 2018/07/12 10:46:45 maxv Exp $ +# $NetBSD: Makefile,v 1.35 2021/03/29 01:48:29 simonb Exp $ INCSDIR= /usr/include/mips @@ -6,7 +6,7 @@ INCS= ansi.h asm.h \ bswap.h \ cachectl.h cdefs.h cpu.h cpuregs.h \ ecoff_machdep.h elf_machdep.h endian.h endian_machdep.h \ - fenv.h float.h \ + fenv.h float.h frame.h \ ieee.h ieeefp.h \ int_const.h int_fmtio.h int_limits.h int_mwgwtypes.h int_types.h \ kcore.h kdbparam.h \
CVS commit: src
Module Name:src Committed By: simonb Date: Mon Mar 29 01:48:29 UTC 2021 Modified Files: src/distrib/sets/lists/comp: ad.mips src/sys/arch/mips/include: Makefile Log Message: Install , now needed for dtrace. To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/distrib/sets/lists/comp/ad.mips cvs rdiff -u -r1.34 -r1.35 src/sys/arch/mips/include/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: simonb Date: Mon Mar 29 01:47:46 UTC 2021 Modified Files: src/sys/arch/mips/include: cpu.h Log Message: Include #include to get lwp_trapframe() definition. Needed for dtrace. To generate a diff of this commit: cvs rdiff -u -r1.131 -r1.132 src/sys/arch/mips/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/cpu.h diff -u src/sys/arch/mips/include/cpu.h:1.131 src/sys/arch/mips/include/cpu.h:1.132 --- src/sys/arch/mips/include/cpu.h:1.131 Mon Aug 17 03:19:35 2020 +++ src/sys/arch/mips/include/cpu.h Mon Mar 29 01:47:45 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.131 2020/08/17 03:19:35 mrg Exp $ */ +/* $NetBSD: cpu.h,v 1.132 2021/03/29 01:47:45 simonb Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -53,6 +53,8 @@ #include "opt_multiprocessor.h" #endif +#include + #include #include #include
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: simonb Date: Mon Mar 29 01:47:46 UTC 2021 Modified Files: src/sys/arch/mips/include: cpu.h Log Message: Include #include to get lwp_trapframe() definition. Needed for dtrace. To generate a diff of this commit: cvs rdiff -u -r1.131 -r1.132 src/sys/arch/mips/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: simonb Date: Mon Mar 29 01:46:26 UTC 2021 Modified Files: src/sys/arch/mips/include: frame.h Log Message: Add an lwp_trapframe() interface to return an LWP's user trapframe. Needed by dtrace. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/mips/include/frame.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/frame.h diff -u src/sys/arch/mips/include/frame.h:1.11 src/sys/arch/mips/include/frame.h:1.12 --- src/sys/arch/mips/include/frame.h:1.11 Wed Mar 24 05:35:05 2021 +++ src/sys/arch/mips/include/frame.h Mon Mar 29 01:46:26 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: frame.h,v 1.11 2021/03/24 05:35:05 simonb Exp $ */ +/* $NetBSD: frame.h,v 1.12 2021/03/29 01:46:26 simonb Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -42,6 +42,8 @@ #include void *getframe(struct lwp *, int, int *); +#define lwp_trapframe(l) ((l)->l_md.md_utf) + #if defined(COMPAT_16) || defined(COMPAT_ULTRIX) void sendsig_sigcontext(const ksiginfo_t *, const sigset_t *); #endif
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: simonb Date: Mon Mar 29 01:46:26 UTC 2021 Modified Files: src/sys/arch/mips/include: frame.h Log Message: Add an lwp_trapframe() interface to return an LWP's user trapframe. Needed by dtrace. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/mips/include/frame.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/cddl/osnet/sys/sys
Module Name:src Committed By: simonb Date: Mon Mar 29 01:43:18 UTC 2021 Modified Files: src/external/cddl/osnet/sys/sys: mutex_impl.h Log Message: Don't define mtx_owner here. mtx_owner is always available, and not all architecutres use the same structure for a kernel mutex. OK thorpej@ To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/sys/sys/mutex_impl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/sys/sys/mutex_impl.h diff -u src/external/cddl/osnet/sys/sys/mutex_impl.h:1.1 src/external/cddl/osnet/sys/sys/mutex_impl.h:1.2 --- src/external/cddl/osnet/sys/sys/mutex_impl.h:1.1 Sun Feb 21 01:46:36 2010 +++ src/external/cddl/osnet/sys/sys/mutex_impl.h Mon Mar 29 01:43:18 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mutex_impl.h,v 1.1 2010/02/21 01:46:36 darran Exp $ */ +/* $NetBSD: mutex_impl.h,v 1.2 2021/03/29 01:43:18 simonb Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -35,7 +35,6 @@ #define __MUTEX_PRIVATE #include -#define mtx_owner u.mtxa_owner #define MUTEX_THREAD ((uintptr_t)-16L) #define MUTEX_OWNER(mtx) \ ((mtx)->mtx_owner & MUTEX_THREAD)
CVS commit: src/external/cddl/osnet/sys/sys
Module Name:src Committed By: simonb Date: Mon Mar 29 01:43:18 UTC 2021 Modified Files: src/external/cddl/osnet/sys/sys: mutex_impl.h Log Message: Don't define mtx_owner here. mtx_owner is always available, and not all architecutres use the same structure for a kernel mutex. OK thorpej@ To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/sys/sys/mutex_impl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc/dist/gcc/config/mips
Module Name:src Committed By: simonb Date: Mon Mar 29 01:33:12 UTC 2021 Modified Files: src/external/gpl3/gcc/dist/gcc/config/mips: mips.c netbsd.h netbsd64.h Log Message: Don't override TARGET_ASM_OUTPUT_SOURCE_FILENAME on MIPS for NetBSD - use the default which includes a '.file "filename"' as the first name so that the FILE symbols type is set to the real source file name. Needed to make ctfconvert work. OK mrg@. XXX needs to be fed back to GNU. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/dist/gcc/config/mips/mips.c cvs rdiff -u -r1.14 -r1.15 \ src/external/gpl3/gcc/dist/gcc/config/mips/netbsd.h cvs rdiff -u -r1.4 -r1.5 \ src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc/dist/gcc/config/mips
Module Name:src Committed By: simonb Date: Mon Mar 29 01:33:12 UTC 2021 Modified Files: src/external/gpl3/gcc/dist/gcc/config/mips: mips.c netbsd.h netbsd64.h Log Message: Don't override TARGET_ASM_OUTPUT_SOURCE_FILENAME on MIPS for NetBSD - use the default which includes a '.file "filename"' as the first name so that the FILE symbols type is set to the real source file name. Needed to make ctfconvert work. OK mrg@. XXX needs to be fed back to GNU. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gcc/dist/gcc/config/mips/mips.c cvs rdiff -u -r1.14 -r1.15 \ src/external/gpl3/gcc/dist/gcc/config/mips/netbsd.h cvs rdiff -u -r1.4 -r1.5 \ src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/config/mips/mips.c diff -u src/external/gpl3/gcc/dist/gcc/config/mips/mips.c:1.11 src/external/gpl3/gcc/dist/gcc/config/mips/mips.c:1.12 --- src/external/gpl3/gcc/dist/gcc/config/mips/mips.c:1.11 Sat Sep 5 09:12:26 2020 +++ src/external/gpl3/gcc/dist/gcc/config/mips/mips.c Mon Mar 29 01:33:12 2021 @@ -9488,7 +9488,7 @@ mips_output_external (FILE *file, tree d /* Implement TARGET_ASM_OUTPUT_SOURCE_FILENAME. */ -static void +static void ATTRIBUTE_UNUSED mips_output_filename (FILE *stream, const char *name) { /* If we are emitting DWARF-2, let dwarf2out handle the ".file" @@ -22744,8 +22744,10 @@ mips_starting_frame_offset (void) #undef TARGET_TRAMPOLINE_INIT #define TARGET_TRAMPOLINE_INIT mips_trampoline_init +#ifndef MIPS_USE_GCC_DEFAULT_OUTPUT_SOURCE_FILENAME #undef TARGET_ASM_OUTPUT_SOURCE_FILENAME #define TARGET_ASM_OUTPUT_SOURCE_FILENAME mips_output_filename +#endif /* MIPS_USE_GCC_DEFAULT_OUTPUT_SOURCE_FILENAME */ #undef TARGET_SHIFT_TRUNCATION_MASK #define TARGET_SHIFT_TRUNCATION_MASK mips_shift_truncation_mask Index: src/external/gpl3/gcc/dist/gcc/config/mips/netbsd.h diff -u src/external/gpl3/gcc/dist/gcc/config/mips/netbsd.h:1.14 src/external/gpl3/gcc/dist/gcc/config/mips/netbsd.h:1.15 --- src/external/gpl3/gcc/dist/gcc/config/mips/netbsd.h:1.14 Sat Sep 5 09:12:26 2020 +++ src/external/gpl3/gcc/dist/gcc/config/mips/netbsd.h Mon Mar 29 01:33:12 2021 @@ -229,3 +229,5 @@ along with GCC; see the file COPYING3. #undef TARGET_WRITABLE_EH_FRAME #define TARGET_WRITABLE_EH_FRAME 0 + +#define MIPS_USE_GCC_DEFAULT_OUTPUT_SOURCE_FILENAME Index: src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h diff -u src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h:1.4 src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h:1.5 --- src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h:1.4 Sat Mar 1 09:44:50 2014 +++ src/external/gpl3/gcc/dist/gcc/config/mips/netbsd64.h Mon Mar 29 01:33:12 2021 @@ -45,3 +45,5 @@ Boston, MA 02110-1301, USA. */ %{mips32} %{mips32r2} %{mips64} %{mips64r2} \ %{bestGnum} %{call_shared} %{no_archive} %{exact_version} \ %(netbsd_link_spec)" + +#define MIPS_USE_GCC_DEFAULT_OUTPUT_SOURCE_FILENAME
re: CVS commit: src/share/misc
> Log Message: > Clarify and explain the rationale for parentheses in sizeof and return as > discussed. +* a function call. We always parenthesize the sizeof expression for +* consistency. i object. this discussion was not finished. .mrg.
CVS commit: [thorpej-cfargs] src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:41:04 UTC 2021 Modified Files: src/sys/dev/pci [thorpej-cfargs]: mfii.c mpii.c Log Message: No need to pass interface attribute or locators to config_found(). To generate a diff of this commit: cvs rdiff -u -r1.7.4.2 -r1.7.4.3 src/sys/dev/pci/mfii.c cvs rdiff -u -r1.27.2.2 -r1.27.2.3 src/sys/dev/pci/mpii.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/mfii.c diff -u src/sys/dev/pci/mfii.c:1.7.4.2 src/sys/dev/pci/mfii.c:1.7.4.3 --- src/sys/dev/pci/mfii.c:1.7.4.2 Mon Mar 22 16:23:45 2021 +++ src/sys/dev/pci/mfii.c Sun Mar 28 20:41:04 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mfii.c,v 1.7.4.2 2021/03/22 16:23:45 thorpej Exp $ */ +/* $NetBSD: mfii.c,v 1.7.4.3 2021/03/28 20:41:04 thorpej Exp $ */ /* $OpenBSD: mfii.c,v 1.58 2018/08/14 05:22:21 jmatthew Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.7.4.2 2021/03/22 16:23:45 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.7.4.3 2021/03/28 20:41:04 thorpej Exp $"); #include "bio.h" @@ -988,13 +988,11 @@ static int mfii_rescan(device_t self, const char *ifattr, const int *locators) { struct mfii_softc *sc = device_private(self); + if (sc->sc_child != NULL) return 0; - sc->sc_child = config_found(self, >sc_chan, scsiprint, - CFARG_IATTR, ifattr, - CFARG_LOCATORS, locators, - CFARG_EOL); + sc->sc_child = config_found(self, >sc_chan, scsiprint, CFARG_EOL); return 0; } Index: src/sys/dev/pci/mpii.c diff -u src/sys/dev/pci/mpii.c:1.27.2.2 src/sys/dev/pci/mpii.c:1.27.2.3 --- src/sys/dev/pci/mpii.c:1.27.2.2 Mon Mar 22 16:23:45 2021 +++ src/sys/dev/pci/mpii.c Sun Mar 28 20:41:04 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mpii.c,v 1.27.2.2 2021/03/22 16:23:45 thorpej Exp $ */ +/* $NetBSD: mpii.c,v 1.27.2.3 2021/03/28 20:41:04 thorpej Exp $ */ /* $OpenBSD: mpii.c,v 1.115 2018/08/14 05:22:21 jmatthew Exp $ */ /* * Copyright (c) 2010, 2012 Mike Belopuhov @@ -20,7 +20,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.27.2.2 2021/03/22 16:23:45 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.27.2.3 2021/03/28 20:41:04 thorpej Exp $"); #include "bio.h" @@ -726,10 +726,7 @@ mpii_rescan(device_t self, const char *i if (sc->sc_child != NULL) return 0; - sc->sc_child = config_found(self, >sc_chan, scsiprint, - CFARG_IATTR, ifattr, - CFARG_LOCATORS, locators, - CFARG_EOL); + sc->sc_child = config_found(self, >sc_chan, scsiprint, CFARG_EOL); return 0; }
CVS commit: [thorpej-cfargs] src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:41:04 UTC 2021 Modified Files: src/sys/dev/pci [thorpej-cfargs]: mfii.c mpii.c Log Message: No need to pass interface attribute or locators to config_found(). To generate a diff of this commit: cvs rdiff -u -r1.7.4.2 -r1.7.4.3 src/sys/dev/pci/mfii.c cvs rdiff -u -r1.27.2.2 -r1.27.2.3 src/sys/dev/pci/mpii.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-cfargs] src/sys/dev/gpio
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:40:30 UTC 2021 Modified Files: src/sys/dev/gpio [thorpej-cfargs]: gpio.c Log Message: No need to pass interface attribute or locators to config_search(). To generate a diff of this commit: cvs rdiff -u -r1.64.10.4 -r1.64.10.5 src/sys/dev/gpio/gpio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-cfargs] src/sys/dev/gpio
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:40:30 UTC 2021 Modified Files: src/sys/dev/gpio [thorpej-cfargs]: gpio.c Log Message: No need to pass interface attribute or locators to config_search(). To generate a diff of this commit: cvs rdiff -u -r1.64.10.4 -r1.64.10.5 src/sys/dev/gpio/gpio.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/gpio/gpio.c diff -u src/sys/dev/gpio/gpio.c:1.64.10.4 src/sys/dev/gpio/gpio.c:1.64.10.5 --- src/sys/dev/gpio/gpio.c:1.64.10.4 Sun Mar 21 18:03:32 2021 +++ src/sys/dev/gpio/gpio.c Sun Mar 28 20:40:30 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: gpio.c,v 1.64.10.4 2021/03/21 18:03:32 thorpej Exp $ */ +/* $NetBSD: gpio.c,v 1.64.10.5 2021/03/28 20:40:30 thorpej Exp $ */ /* $OpenBSD: gpio.c,v 1.6 2006/01/14 12:33:49 grange Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.64.10.4 2021/03/21 18:03:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.64.10.5 2021/03/28 20:40:30 thorpej Exp $"); /* * General Purpose Input/Output framework. @@ -192,8 +192,6 @@ gpio_rescan(device_t self, const char *i config_search(self, NULL, CFARG_SUBMATCH, gpio_search, - CFARG_IATTR, ifattr, - CFARG_LOCATORS, locators, CFARG_EOL); return 0;
CVS commit: [thorpej-cfargs] src/sys/dev/pcmcia
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:39:10 UTC 2021 Modified Files: src/sys/dev/pcmcia [thorpej-cfargs]: pcmcia.c Log Message: - Unwrap a line. - No need to be explcit about interface attribute. To generate a diff of this commit: cvs rdiff -u -r1.94.70.2 -r1.94.70.3 src/sys/dev/pcmcia/pcmcia.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/pcmcia/pcmcia.c diff -u src/sys/dev/pcmcia/pcmcia.c:1.94.70.2 src/sys/dev/pcmcia/pcmcia.c:1.94.70.3 --- src/sys/dev/pcmcia/pcmcia.c:1.94.70.2 Mon Mar 22 16:23:46 2021 +++ src/sys/dev/pcmcia/pcmcia.c Sun Mar 28 20:39:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pcmcia.c,v 1.94.70.2 2021/03/22 16:23:46 thorpej Exp $ */ +/* $NetBSD: pcmcia.c,v 1.94.70.3 2021/03/28 20:39:10 thorpej Exp $ */ /* * Copyright (c) 2004 Charles M. Hannum. All rights reserved. @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pcmcia.c,v 1.94.70.2 2021/03/22 16:23:46 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcmcia.c,v 1.94.70.3 2021/03/28 20:39:10 thorpej Exp $"); #include "opt_pcmciaverbose.h" @@ -214,8 +214,7 @@ done: } int -pcmcia_rescan(device_t self, const char *ifattr, -const int *locators) +pcmcia_rescan(device_t self, const char *ifattr, const int *locators) { struct pcmcia_softc *sc = device_private(self); struct pcmcia_function *pf; @@ -248,7 +247,6 @@ pcmcia_rescan(device_t self, const char pf->child = config_found(self, , pcmcia_print, CFARG_SUBMATCH, config_stdsubmatch, - CFARG_IATTR, ifattr, CFARG_LOCATORS, locs, CFARG_EOL); }
CVS commit: [thorpej-cfargs] src/sys/dev/pcmcia
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:39:10 UTC 2021 Modified Files: src/sys/dev/pcmcia [thorpej-cfargs]: pcmcia.c Log Message: - Unwrap a line. - No need to be explcit about interface attribute. To generate a diff of this commit: cvs rdiff -u -r1.94.70.2 -r1.94.70.3 src/sys/dev/pcmcia/pcmcia.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-cfargs] src/sys/dev/scsipi
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:38:47 UTC 2021 Modified Files: src/sys/dev/scsipi [thorpej-cfargs]: scsiconf.c Log Message: Unwrap a line. To generate a diff of this commit: cvs rdiff -u -r1.290.4.2 -r1.290.4.3 src/sys/dev/scsipi/scsiconf.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/scsipi/scsiconf.c diff -u src/sys/dev/scsipi/scsiconf.c:1.290.4.2 src/sys/dev/scsipi/scsiconf.c:1.290.4.3 --- src/sys/dev/scsipi/scsiconf.c:1.290.4.2 Sun Mar 21 17:35:49 2021 +++ src/sys/dev/scsipi/scsiconf.c Sun Mar 28 20:38:47 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: scsiconf.c,v 1.290.4.2 2021/03/21 17:35:49 thorpej Exp $ */ +/* $NetBSD: scsiconf.c,v 1.290.4.3 2021/03/28 20:38:47 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.290.4.2 2021/03/21 17:35:49 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.290.4.3 2021/03/28 20:38:47 thorpej Exp $"); #include #include @@ -433,8 +433,7 @@ ret: } static int -scsibusrescan(device_t sc, const char *ifattr, -const int *locators) +scsibusrescan(device_t sc, const char *ifattr, const int *locators) { KASSERT(ifattr && !strcmp(ifattr, "scsibus"));
CVS commit: [thorpej-cfargs] src/sys/dev/scsipi
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:38:47 UTC 2021 Modified Files: src/sys/dev/scsipi [thorpej-cfargs]: scsiconf.c Log Message: Unwrap a line. To generate a diff of this commit: cvs rdiff -u -r1.290.4.2 -r1.290.4.3 src/sys/dev/scsipi/scsiconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-cfargs] src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:38:04 UTC 2021 Modified Files: src/sys/dev/pci [thorpej-cfargs]: mlx_pci.c twe.c Log Message: Correct the names of the arguments passed to the rescan function. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.27.14.1 src/sys/dev/pci/mlx_pci.c cvs rdiff -u -r1.108.10.2 -r1.108.10.3 src/sys/dev/pci/twe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-cfargs] src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:38:04 UTC 2021 Modified Files: src/sys/dev/pci [thorpej-cfargs]: mlx_pci.c twe.c Log Message: Correct the names of the arguments passed to the rescan function. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.27.14.1 src/sys/dev/pci/mlx_pci.c cvs rdiff -u -r1.108.10.2 -r1.108.10.3 src/sys/dev/pci/twe.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/mlx_pci.c diff -u src/sys/dev/pci/mlx_pci.c:1.27 src/sys/dev/pci/mlx_pci.c:1.27.14.1 --- src/sys/dev/pci/mlx_pci.c:1.27 Sun Dec 9 11:14:02 2018 +++ src/sys/dev/pci/mlx_pci.c Sun Mar 28 20:38:04 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mlx_pci.c,v 1.27 2018/12/09 11:14:02 jdolecek Exp $ */ +/* $NetBSD: mlx_pci.c,v 1.27.14.1 2021/03/28 20:38:04 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mlx_pci.c,v 1.27 2018/12/09 11:14:02 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mlx_pci.c,v 1.27.14.1 2021/03/28 20:38:04 thorpej Exp $"); #include #include @@ -145,7 +145,7 @@ static struct mlx_pci_ident { }; static int -mlx_pci_rescan(device_t self, const char *attr, const int *flag) +mlx_pci_rescan(device_t self, const char *ifattr, const int *locs) { return mlx_configure(device_private(self), 1); Index: src/sys/dev/pci/twe.c diff -u src/sys/dev/pci/twe.c:1.108.10.2 src/sys/dev/pci/twe.c:1.108.10.3 --- src/sys/dev/pci/twe.c:1.108.10.2 Mon Mar 22 16:23:46 2021 +++ src/sys/dev/pci/twe.c Sun Mar 28 20:38:04 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: twe.c,v 1.108.10.2 2021/03/22 16:23:46 thorpej Exp $ */ +/* $NetBSD: twe.c,v 1.108.10.3 2021/03/28 20:38:04 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001, 2002, 2003, 2004 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.108.10.2 2021/03/22 16:23:46 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.108.10.3 2021/03/28 20:38:04 thorpej Exp $"); #include #include @@ -451,7 +451,7 @@ twe_attach(device_t parent, device_t sel twe_describe_controller(sc); /* Find and attach RAID array units. */ - twe_rescan(self, "twe", 0); + twe_rescan(self, NULL, NULL); /* ...and finally, enable interrupts. */ twe_outl(sc, TWE_REG_CTL, TWE_CTL_CLEAR_ATTN_INTR | @@ -482,7 +482,7 @@ twe_attach(device_t parent, device_t sel } static int -twe_rescan(device_t self, const char *attr, const int *flags) +twe_rescan(device_t self, const char *ifattr, const int *locs) { struct twe_softc *sc; int i;
CVS commit: [thorpej-cfargs] src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:36:40 UTC 2021 Modified Files: src/sys/dev/pci [thorpej-cfargs]: amr.c Log Message: Correct the names of the arguments passed to the rescan function. To generate a diff of this commit: cvs rdiff -u -r1.65.10.2 -r1.65.10.3 src/sys/dev/pci/amr.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/amr.c diff -u src/sys/dev/pci/amr.c:1.65.10.2 src/sys/dev/pci/amr.c:1.65.10.3 --- src/sys/dev/pci/amr.c:1.65.10.2 Mon Mar 22 16:23:45 2021 +++ src/sys/dev/pci/amr.c Sun Mar 28 20:36:40 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: amr.c,v 1.65.10.2 2021/03/22 16:23:45 thorpej Exp $ */ +/* $NetBSD: amr.c,v 1.65.10.3 2021/03/28 20:36:40 thorpej Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: amr.c,v 1.65.10.2 2021/03/22 16:23:45 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amr.c,v 1.65.10.3 2021/03/28 20:36:40 thorpej Exp $"); #include #include @@ -511,7 +511,7 @@ amr_attach(device_t parent, device_t sel } static int -amr_rescan(device_t self, const char *attr, const int *flags) +amr_rescan(device_t self, const char *ifattr, const int *ulocs) { int j; int locs[AMRCF_NLOCS]; @@ -531,7 +531,7 @@ amr_rescan(device_t self, const char *at amr->amr_drive[j].al_dv = config_found(amr->amr_dv, , amr_print, CFARG_SUBMATCH, config_stdsubmatch, - CFARG_IATTR, attr, + CFARG_IATTR, ifattr, CFARG_LOCATORS, locs, CFARG_EOL); }
CVS commit: [thorpej-cfargs] src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:36:40 UTC 2021 Modified Files: src/sys/dev/pci [thorpej-cfargs]: amr.c Log Message: Correct the names of the arguments passed to the rescan function. To generate a diff of this commit: cvs rdiff -u -r1.65.10.2 -r1.65.10.3 src/sys/dev/pci/amr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-cfargs] src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:36:16 UTC 2021 Modified Files: src/sys/dev/pci [thorpej-cfargs]: aac_pci.c Log Message: Correct the names of the arguments passed to the rescan function. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.40.14.1 src/sys/dev/pci/aac_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-cfargs] src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:36:16 UTC 2021 Modified Files: src/sys/dev/pci [thorpej-cfargs]: aac_pci.c Log Message: Correct the names of the arguments passed to the rescan function. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.40.14.1 src/sys/dev/pci/aac_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/aac_pci.c diff -u src/sys/dev/pci/aac_pci.c:1.40 src/sys/dev/pci/aac_pci.c:1.40.14.1 --- src/sys/dev/pci/aac_pci.c:1.40 Sun Dec 9 11:14:01 2018 +++ src/sys/dev/pci/aac_pci.c Sun Mar 28 20:36:16 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: aac_pci.c,v 1.40 2018/12/09 11:14:01 jdolecek Exp $ */ +/* $NetBSD: aac_pci.c,v 1.40.14.1 2021/03/28 20:36:16 thorpej Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: aac_pci.c,v 1.40 2018/12/09 11:14:01 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aac_pci.c,v 1.40.14.1 2021/03/28 20:36:16 thorpej Exp $"); #include #include @@ -617,7 +617,7 @@ aac_pci_attach(device_t parent, device_t /* ARGSUSED */ static int -aac_pci_rescan(device_t self, const char *attr, const int *flags) +aac_pci_rescan(device_t self, const char *ifattr, const int *locs) { return aac_devscan(device_private(self));
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Mar 28 20:35:58 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: init.c Log Message: lint: add assertions for aggregate initialization No functional change. To generate a diff of this commit: cvs rdiff -u -r1.173 -r1.174 src/usr.bin/xlint/lint1/init.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/xlint/lint1/init.c diff -u src/usr.bin/xlint/lint1/init.c:1.173 src/usr.bin/xlint/lint1/init.c:1.174 --- src/usr.bin/xlint/lint1/init.c:1.173 Sun Mar 28 19:53:58 2021 +++ src/usr.bin/xlint/lint1/init.c Sun Mar 28 20:35:58 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.173 2021/03/28 19:53:58 rillig Exp $ */ +/* $NetBSD: init.c,v 1.174 2021/03/28 20:35:58 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: init.c,v 1.173 2021/03/28 19:53:58 rillig Exp $"); +__RCSID("$NetBSD: init.c,v 1.174 2021/03/28 20:35:58 rillig Exp $"); #endif #include @@ -535,6 +535,18 @@ brace_level_debug(const struct brace_lev #define brace_level_debug(level) do { } while (false) #endif +static void +brace_level_assert_struct_or_union(const struct brace_level *level) +{ + lint_assert(is_struct_or_union(level->bl_type->t_tspec)); +} + +static void +brace_level_assert_array(const struct brace_level *level) +{ + lint_assert(level->bl_type->t_tspec == ARRAY); +} + static type_t * brace_level_subtype(struct brace_level *level) { @@ -548,6 +560,8 @@ brace_level_subtype(struct brace_level * static void brace_level_set_array_dimension(struct brace_level *level, int dim) { + brace_level_assert_array(level); + debug_step("setting the array size to %d", dim); level->bl_type->t_dim = dim; debug_indent(); @@ -559,6 +573,7 @@ brace_level_next_member(struct brace_lev { const sym_t *m; + brace_level_assert_struct_or_union(level); do { m = level->bl_next_member = level->bl_next_member->s_next; /* XXX: can this assertion be made to fail? */ @@ -575,7 +590,7 @@ brace_level_look_up_member(const struct const type_t *tp = level->bl_type; const sym_t *m; - lint_assert(is_struct_or_union(tp->t_tspec)); + brace_level_assert_struct_or_union(level); for (m = tp->t_str->sou_first_member; m != NULL; m = m->s_next) { if (m->s_bitfield && m->s_name == unnamed) @@ -613,6 +628,8 @@ brace_level_look_up_first_member_unnamed { sym_t *m; + brace_level_assert_struct_or_union(level); + for (m = level->bl_type->t_str->sou_first_member; m != NULL; m = m->s_next) { if (m->s_bitfield && m->s_name == unnamed) @@ -632,6 +649,8 @@ brace_level_look_up_first_member_unnamed static bool brace_level_push_array(struct brace_level *level) { + brace_level_assert_array(level); + if (level->bl_enclosing->bl_seen_named_member) { level->bl_brace = true; debug_step("ARRAY, seen named member, needs closing brace");
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Mar 28 20:35:58 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: init.c Log Message: lint: add assertions for aggregate initialization No functional change. To generate a diff of this commit: cvs rdiff -u -r1.173 -r1.174 src/usr.bin/xlint/lint1/init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-cfargs] src/sys/dev/isa
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:35:57 UTC 2021 Modified Files: src/sys/dev/isa [thorpej-cfargs]: pcppi.c Log Message: pcppi_scan(): No need to pass interface attribute or locators to config_search(). To generate a diff of this commit: cvs rdiff -u -r1.45.22.2 -r1.45.22.3 src/sys/dev/isa/pcppi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/isa/pcppi.c diff -u src/sys/dev/isa/pcppi.c:1.45.22.2 src/sys/dev/isa/pcppi.c:1.45.22.3 --- src/sys/dev/isa/pcppi.c:1.45.22.2 Sun Mar 21 19:06:19 2021 +++ src/sys/dev/isa/pcppi.c Sun Mar 28 20:35:57 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pcppi.c,v 1.45.22.2 2021/03/21 19:06:19 thorpej Exp $ */ +/* $NetBSD: pcppi.c,v 1.45.22.3 2021/03/28 20:35:57 thorpej Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.45.22.2 2021/03/21 19:06:19 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.45.22.3 2021/03/28 20:35:57 thorpej Exp $"); #include "attimer.h" @@ -247,8 +247,6 @@ pcppi_rescan(device_t self, const char * config_search(sc->sc_dv, , CFARG_SUBMATCH, pcppisearch, - CFARG_IATTR, ifattr, - CFARG_LOCATORS, locators, CFARG_EOL); return 0;
CVS commit: [thorpej-cfargs] src/sys/dev/isa
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:35:57 UTC 2021 Modified Files: src/sys/dev/isa [thorpej-cfargs]: pcppi.c Log Message: pcppi_scan(): No need to pass interface attribute or locators to config_search(). To generate a diff of this commit: cvs rdiff -u -r1.45.22.2 -r1.45.22.3 src/sys/dev/isa/pcppi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-cfargs] src/sys/dev/isa
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:34:44 UTC 2021 Modified Files: src/sys/dev/isa [thorpej-cfargs]: isa.c Log Message: - Use designated initializers for the wildcard[] array in isaattach(). - No need to be explicit about interface attribute. To generate a diff of this commit: cvs rdiff -u -r1.138.76.3 -r1.138.76.4 src/sys/dev/isa/isa.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/isa/isa.c diff -u src/sys/dev/isa/isa.c:1.138.76.3 src/sys/dev/isa/isa.c:1.138.76.4 --- src/sys/dev/isa/isa.c:1.138.76.3 Mon Mar 22 16:23:45 2021 +++ src/sys/dev/isa/isa.c Sun Mar 28 20:34:44 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: isa.c,v 1.138.76.3 2021/03/22 16:23:45 thorpej Exp $ */ +/* $NetBSD: isa.c,v 1.138.76.4 2021/03/28 20:34:44 thorpej Exp $ */ /*- * Copyright (c) 1998, 2001, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: isa.c,v 1.138.76.3 2021/03/22 16:23:45 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isa.c,v 1.138.76.4 2021/03/28 20:34:44 thorpej Exp $"); #include #include @@ -86,9 +86,13 @@ isaattach(device_t parent, device_t self struct isa_softc *sc = device_private(self); struct isabus_attach_args *iba = aux; static const int wildcard[ISACF_NLOCS] = { - ISACF_PORT_DEFAULT, ISACF_SIZE_DEFAULT, - ISACF_IOMEM_DEFAULT, ISACF_IOSIZ_DEFAULT, - ISACF_IRQ_DEFAULT, ISACF_DRQ_DEFAULT, ISACF_DRQ2_DEFAULT + [ISACF_PORT] = ISACF_PORT_DEFAULT, + [ISACF_SIZE] = ISACF_SIZE_DEFAULT, + [ISACF_IOMEM] = ISACF_IOMEM_DEFAULT, + [ISACF_IOSIZ] = ISACF_IOSIZ_DEFAULT, + [ISACF_IRQ] = ISACF_IRQ_DEFAULT, + [ISACF_DRQ] = ISACF_DRQ_DEFAULT, + [ISACF_DRQ2] = ISACF_DRQ2_DEFAULT, }; TAILQ_INIT(>sc_knowndevs); @@ -132,7 +136,7 @@ isaattach(device_t parent, device_t self isa_free_knowndevs(sc); /* Attach all indirect-config children. */ - isarescan(self, "isa", wildcard); + isarescan(self, NULL, wildcard); if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, "couldn't establish power handler\n"); @@ -188,7 +192,6 @@ isarescan(device_t self, const char *ifa config_search(self, NULL, CFARG_SUBMATCH, isasearch, - CFARG_IATTR, ifattr, CFARG_LOCATORS, locs, CFARG_EOL); return (0);
CVS commit: [thorpej-cfargs] src/sys/dev/isa
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:34:44 UTC 2021 Modified Files: src/sys/dev/isa [thorpej-cfargs]: isa.c Log Message: - Use designated initializers for the wildcard[] array in isaattach(). - No need to be explicit about interface attribute. To generate a diff of this commit: cvs rdiff -u -r1.138.76.3 -r1.138.76.4 src/sys/dev/isa/isa.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-cfargs] src/sys/dev/ic
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:33:47 UTC 2021 Modified Files: src/sys/dev/ic [thorpej-cfargs]: nvme.c Log Message: - In nvme_rescan(), pass the locators used for matching to config_found() and use config_stdsubmatch(). - No need to be explicit about interface attribute, because we carry only one. To generate a diff of this commit: cvs rdiff -u -r1.54.2.1 -r1.54.2.2 src/sys/dev/ic/nvme.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/nvme.c diff -u src/sys/dev/ic/nvme.c:1.54.2.1 src/sys/dev/ic/nvme.c:1.54.2.2 --- src/sys/dev/ic/nvme.c:1.54.2.1 Sun Mar 21 21:09:12 2021 +++ src/sys/dev/ic/nvme.c Sun Mar 28 20:33:46 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: nvme.c,v 1.54.2.1 2021/03/21 21:09:12 thorpej Exp $ */ +/* $NetBSD: nvme.c,v 1.54.2.2 2021/03/28 20:33:46 thorpej Exp $ */ /* $OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */ /* @@ -18,7 +18,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.54.2.1 2021/03/21 21:09:12 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.54.2.2 2021/03/28 20:33:46 thorpej Exp $"); #include #include @@ -41,6 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.5 #include #include "ioconf.h" +#include "locators.h" #define B4_CHK_RDY_DELAY_MS 2300 /* workaround controller bug */ @@ -447,7 +448,7 @@ nvme_attach(struct nvme_softc *sc) /* probe subdevices */ sc->sc_namespaces = kmem_zalloc(sizeof(*sc->sc_namespaces) * sc->sc_nn, KM_SLEEP); - nvme_rescan(sc->sc_dev, "nvme", ); + nvme_rescan(sc->sc_dev, NULL, NULL); return 0; @@ -467,7 +468,7 @@ free_admin_q: } int -nvme_rescan(device_t self, const char *attr, const int *flags) +nvme_rescan(device_t self, const char *ifattr, const int *locs) { struct nvme_softc *sc = device_private(self); struct nvme_attach_args naa; @@ -475,7 +476,7 @@ nvme_rescan(device_t self, const char *a struct nvme_namespace *ns; uint64_t cap; int ioq_entries = nvme_ioq_size; - int i; + int i, mlocs[NVMECF_NLOCS]; int error; cap = nvme_read8(sc, NVME_CAP); @@ -511,13 +512,18 @@ nvme_rescan(device_t self, const char *a continue; } + mlocs[NVMECF_NSID] = i; + memset(, 0, sizeof(naa)); naa.naa_nsid = i; naa.naa_qentries = (ioq_entries - 1) * sc->sc_nq; naa.naa_maxphys = sc->sc_mdts; naa.naa_typename = sc->sc_modelname; - sc->sc_namespaces[i - 1].dev = config_found(sc->sc_dev, , - nvme_print, CFARG_EOL); + sc->sc_namespaces[i - 1].dev = + config_found(sc->sc_dev, , nvme_print, + CFARG_SUBMATCH, config_stdsubmatch, + CFARG_LOCATORS, mlocs, + CFARG_EOL); } return 0; }
CVS commit: [thorpej-cfargs] src/sys/dev/ic
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:33:47 UTC 2021 Modified Files: src/sys/dev/ic [thorpej-cfargs]: nvme.c Log Message: - In nvme_rescan(), pass the locators used for matching to config_found() and use config_stdsubmatch(). - No need to be explicit about interface attribute, because we carry only one. To generate a diff of this commit: cvs rdiff -u -r1.54.2.1 -r1.54.2.2 src/sys/dev/ic/nvme.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-cfargs] src/sys/dev/ic
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:31:05 UTC 2021 Modified Files: src/sys/dev/ic [thorpej-cfargs]: mfi.c Log Message: No need to pass interface or locators to config_found() in mfi_rescan(). To generate a diff of this commit: cvs rdiff -u -r1.63.10.2 -r1.63.10.3 src/sys/dev/ic/mfi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-cfargs] src/sys/dev/ic
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:31:05 UTC 2021 Modified Files: src/sys/dev/ic [thorpej-cfargs]: mfi.c Log Message: No need to pass interface or locators to config_found() in mfi_rescan(). To generate a diff of this commit: cvs rdiff -u -r1.63.10.2 -r1.63.10.3 src/sys/dev/ic/mfi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/mfi.c diff -u src/sys/dev/ic/mfi.c:1.63.10.2 src/sys/dev/ic/mfi.c:1.63.10.3 --- src/sys/dev/ic/mfi.c:1.63.10.2 Mon Mar 22 16:23:45 2021 +++ src/sys/dev/ic/mfi.c Sun Mar 28 20:31:05 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mfi.c,v 1.63.10.2 2021/03/22 16:23:45 thorpej Exp $ */ +/* $NetBSD: mfi.c,v 1.63.10.3 2021/03/28 20:31:05 thorpej Exp $ */ /* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */ /* @@ -73,7 +73,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.63.10.2 2021/03/22 16:23:45 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.63.10.3 2021/03/28 20:31:05 thorpej Exp $"); #include "bio.h" @@ -909,10 +909,7 @@ mfi_rescan(device_t self, const char *if if (sc->sc_child != NULL) return 0; - sc->sc_child = config_found(self, >sc_chan, scsiprint, - CFARG_IATTR, ifattr, - CFARG_LOCATORS, locators, - CFARG_EOL); + sc->sc_child = config_found(self, >sc_chan, scsiprint, CFARG_EOL); return 0; }
CVS commit: [thorpej-cfargs] src/sys/dev/ic
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:30:14 UTC 2021 Modified Files: src/sys/dev/ic [thorpej-cfargs]: cac.c Log Message: Correct the names of the arguments passed to cac_rescan(), and update a local variable to avoid a name collision. Also, no need to be explcit about our interface attribute, since we carry only one. To generate a diff of this commit: cvs rdiff -u -r1.61.10.2 -r1.61.10.3 src/sys/dev/ic/cac.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-cfargs] src/sys/dev/ic
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:30:14 UTC 2021 Modified Files: src/sys/dev/ic [thorpej-cfargs]: cac.c Log Message: Correct the names of the arguments passed to cac_rescan(), and update a local variable to avoid a name collision. Also, no need to be explcit about our interface attribute, since we carry only one. To generate a diff of this commit: cvs rdiff -u -r1.61.10.2 -r1.61.10.3 src/sys/dev/ic/cac.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/cac.c diff -u src/sys/dev/ic/cac.c:1.61.10.2 src/sys/dev/ic/cac.c:1.61.10.3 --- src/sys/dev/ic/cac.c:1.61.10.2 Mon Mar 22 16:23:45 2021 +++ src/sys/dev/ic/cac.c Sun Mar 28 20:30:14 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cac.c,v 1.61.10.2 2021/03/22 16:23:45 thorpej Exp $ */ +/* $NetBSD: cac.c,v 1.61.10.3 2021/03/28 20:30:14 thorpej Exp $ */ /*- * Copyright (c) 2000, 2006, 2007 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.61.10.2 2021/03/22 16:23:45 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cac.c,v 1.61.10.3 2021/03/28 20:30:14 thorpej Exp $"); #if defined(_KERNEL_OPT) #include "bio.h" @@ -217,11 +217,11 @@ cac_init(struct cac_softc *sc, const cha } int -cac_rescan(device_t self, const char *attr, const int *flags) +cac_rescan(device_t self, const char *attr, const int *locs) { struct cac_softc *sc; struct cac_attach_args caca; - int locs[CACCF_NLOCS]; + int mlocs[CACCF_NLOCS]; int i; sc = device_private(self); @@ -230,12 +230,11 @@ cac_rescan(device_t self, const char *at continue; caca.caca_unit = i; - locs[CACCF_UNIT] = i; + mlocs[CACCF_UNIT] = i; if (config_found(self, , cac_print, CFARG_SUBMATCH, config_stdsubmatch, - CFARG_IATTR, attr, - CFARG_LOCATORS, locs, + CFARG_LOCATORS, mlocs, CFARG_EOL) != NULL) sc->sc_unitmask |= 1 << i; }
CVS commit: [thorpej-cfargs] src/sys/dev/ic
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:25:44 UTC 2021 Modified Files: src/sys/dev/ic [thorpej-cfargs]: apple_smc.c Log Message: This driver only has a single interface attribute, so no need to be expicit about it. That interface attribute has no locators, so don't pass them to config_search(). To generate a diff of this commit: cvs rdiff -u -r1.6.50.1 -r1.6.50.2 src/sys/dev/ic/apple_smc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-cfargs] src/sys/dev/ic
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:25:44 UTC 2021 Modified Files: src/sys/dev/ic [thorpej-cfargs]: apple_smc.c Log Message: This driver only has a single interface attribute, so no need to be expicit about it. That interface attribute has no locators, so don't pass them to config_search(). To generate a diff of this commit: cvs rdiff -u -r1.6.50.1 -r1.6.50.2 src/sys/dev/ic/apple_smc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/apple_smc.c diff -u src/sys/dev/ic/apple_smc.c:1.6.50.1 src/sys/dev/ic/apple_smc.c:1.6.50.2 --- src/sys/dev/ic/apple_smc.c:1.6.50.1 Sat Mar 20 19:33:40 2021 +++ src/sys/dev/ic/apple_smc.c Sun Mar 28 20:25:44 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: apple_smc.c,v 1.6.50.1 2021/03/20 19:33:40 thorpej Exp $ */ +/* $NetBSD: apple_smc.c,v 1.6.50.2 2021/03/28 20:25:44 thorpej Exp $ */ /* * Apple System Management Controller @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: apple_smc.c,v 1.6.50.1 2021/03/20 19:33:40 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: apple_smc.c,v 1.6.50.2 2021/03/28 20:25:44 thorpej Exp $"); #include #include @@ -81,7 +81,7 @@ apple_smc_attach(struct apple_smc_tag *s #endif /* Attach any children. */ -(void)apple_smc_rescan(smc, APPLE_SMC_BUS, NULL); +(void)apple_smc_rescan(smc, NULL, NULL); } int @@ -110,8 +110,6 @@ apple_smc_rescan(struct apple_smc_tag *s /* Let autoconf(9) do the work of finding new children. */ config_search(smc->smc_dev, smc, CFARG_SUBMATCH, apple_smc_search, - CFARG_IATTR, APPLE_SMC_BUS, - CFARG_LOCATORS, locators, CFARG_EOL); return 0; }
CVS commit: [thorpej-cfargs] src/sys/dev/i2c
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:02:29 UTC 2021 Modified Files: src/sys/dev/i2c [thorpej-cfargs]: i2c.c Log Message: "iic" only has a single interface attribute, so no need to be explicit. To generate a diff of this commit: cvs rdiff -u -r1.77.2.4 -r1.77.2.5 src/sys/dev/i2c/i2c.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/i2c/i2c.c diff -u src/sys/dev/i2c/i2c.c:1.77.2.4 src/sys/dev/i2c/i2c.c:1.77.2.5 --- src/sys/dev/i2c/i2c.c:1.77.2.4 Mon Mar 22 16:23:44 2021 +++ src/sys/dev/i2c/i2c.c Sun Mar 28 20:02:29 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: i2c.c,v 1.77.2.4 2021/03/22 16:23:44 thorpej Exp $ */ +/* $NetBSD: i2c.c,v 1.77.2.5 2021/03/28 20:02:29 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.77.2.4 2021/03/22 16:23:44 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.77.2.5 2021/03/28 20:02:29 thorpej Exp $"); #include #include @@ -382,7 +382,6 @@ iic_rescan(device_t self, const char *if { config_search(self, NULL, CFARG_SUBMATCH, iic_search, - CFARG_IATTR, ifattr, CFARG_LOCATORS, locators, CFARG_EOL); return 0;
CVS commit: [thorpej-cfargs] src/sys/dev/i2c
Module Name:src Committed By: thorpej Date: Sun Mar 28 20:02:29 UTC 2021 Modified Files: src/sys/dev/i2c [thorpej-cfargs]: i2c.c Log Message: "iic" only has a single interface attribute, so no need to be explicit. To generate a diff of this commit: cvs rdiff -u -r1.77.2.4 -r1.77.2.5 src/sys/dev/i2c/i2c.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-cfargs] src/sys/dev/eisa
Module Name:src Committed By: thorpej Date: Sun Mar 28 19:57:51 UTC 2021 Modified Files: src/sys/dev/eisa [thorpej-cfargs]: mlx_eisa.c Log Message: Correct names of arguments passed to rescan function. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.27.2.1 src/sys/dev/eisa/mlx_eisa.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-cfargs] src/sys/dev/eisa
Module Name:src Committed By: thorpej Date: Sun Mar 28 19:57:51 UTC 2021 Modified Files: src/sys/dev/eisa [thorpej-cfargs]: mlx_eisa.c Log Message: Correct names of arguments passed to rescan function. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.27.2.1 src/sys/dev/eisa/mlx_eisa.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/eisa/mlx_eisa.c diff -u src/sys/dev/eisa/mlx_eisa.c:1.27 src/sys/dev/eisa/mlx_eisa.c:1.27.2.1 --- src/sys/dev/eisa/mlx_eisa.c:1.27 Wed Jan 27 04:35:15 2021 +++ src/sys/dev/eisa/mlx_eisa.c Sun Mar 28 19:57:50 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mlx_eisa.c,v 1.27 2021/01/27 04:35:15 thorpej Exp $ */ +/* $NetBSD: mlx_eisa.c,v 1.27.2.1 2021/03/28 19:57:50 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mlx_eisa.c,v 1.27 2021/01/27 04:35:15 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mlx_eisa.c,v 1.27.2.1 2021/03/28 19:57:50 thorpej Exp $"); #include #include @@ -190,7 +190,7 @@ mlx_eisa_attach(device_t parent, device_ } static int -mlx_eisa_rescan(device_t self, const char *attr, const int *flag) +mlx_eisa_rescan(device_t self, const char *ifattr, const int *locs) { return mlx_configure(device_private(self), 1);
CVS commit: [thorpej-cfargs] src/sys/dev/audio
Module Name:src Committed By: thorpej Date: Sun Mar 28 19:55:37 UTC 2021 Modified Files: src/sys/dev/audio [thorpej-cfargs]: audio.c Log Message: audio only has one interface attribute, so no need to be explcit about it. audio also doesn't have locators, so don't pass any to config_search(). To generate a diff of this commit: cvs rdiff -u -r1.91.2.3 -r1.91.2.4 src/sys/dev/audio/audio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/audio/audio.c diff -u src/sys/dev/audio/audio.c:1.91.2.3 src/sys/dev/audio/audio.c:1.91.2.4 --- src/sys/dev/audio/audio.c:1.91.2.3 Sun Mar 21 21:09:09 2021 +++ src/sys/dev/audio/audio.c Sun Mar 28 19:55:37 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.91.2.3 2021/03/21 21:09:09 thorpej Exp $ */ +/* $NetBSD: audio.c,v 1.91.2.4 2021/03/28 19:55:37 thorpej Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -138,7 +138,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.91.2.3 2021/03/21 21:09:09 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.91.2.4 2021/03/28 19:55:37 thorpej Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -,7 +,7 @@ audioattach(device_t parent, device_t se audio_mlog_init(); #endif - audiorescan(self, "audio", NULL); + audiorescan(self, NULL, NULL); sc->sc_exlock = 0; return; @@ -1416,8 +1416,6 @@ audiorescan(device_t self, const char *i config_search(sc->sc_dev, NULL, CFARG_SUBMATCH, audiosearch, - CFARG_IATTR, ifattr, - CFARG_LOCATORS, locators, CFARG_EOL); return 0;
CVS commit: [thorpej-cfargs] src/sys/dev/audio
Module Name:src Committed By: thorpej Date: Sun Mar 28 19:55:37 UTC 2021 Modified Files: src/sys/dev/audio [thorpej-cfargs]: audio.c Log Message: audio only has one interface attribute, so no need to be explcit about it. audio also doesn't have locators, so don't pass any to config_search(). To generate a diff of this commit: cvs rdiff -u -r1.91.2.3 -r1.91.2.4 src/sys/dev/audio/audio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: rillig Date: Sun Mar 28 19:53:58 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_init.c src/usr.bin/xlint/lint1: init.c Log Message: lint: add test for assertion failure in initialization The 'cnt = level->bl_type->t_tspec == STRUCT ? 2 : 1;' in initialization_push_struct_or_union is obviously wrong since not every struct has exactly 1 remaining member after the first member that has an initializer with designation. This bug started its life in init.c 1.12 from 2002-10-21, a little over 18 years ago. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/tests/usr.bin/xlint/lint1/d_c99_init.c cvs rdiff -u -r1.172 -r1.173 src/usr.bin/xlint/lint1/init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/d_c99_init.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.18 src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.19 --- src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.18 Sun Mar 28 18:48:32 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_init.c Sun Mar 28 19:53:58 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_init.c,v 1.18 2021/03/28 18:48:32 rillig Exp $ */ +/* $NetBSD: d_c99_init.c,v 1.19 2021/03/28 19:53:58 rillig Exp $ */ # 3 "d_c99_init.c" /* @@ -243,3 +243,24 @@ char message_with_suffix[] = { /* expect+1: too many array initializers */ '\n', }; + +struct ten { + int i0; + int i1; + int i2; + int i3; + int i4; + int i5; + int i6; + int i7; + int i8; + int i9; +}; + +struct ten ten = { + .i3 = 3, + 4, + // FIXME: assertion "level->bl_type->t_tspec == ARRAY" failed in brace_level_extend_if_array_of_unknown_size + // 5, + // 6, +}; Index: src/usr.bin/xlint/lint1/init.c diff -u src/usr.bin/xlint/lint1/init.c:1.172 src/usr.bin/xlint/lint1/init.c:1.173 --- src/usr.bin/xlint/lint1/init.c:1.172 Sun Mar 28 19:30:08 2021 +++ src/usr.bin/xlint/lint1/init.c Sun Mar 28 19:53:58 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.172 2021/03/28 19:30:08 rillig Exp $ */ +/* $NetBSD: init.c,v 1.173 2021/03/28 19:53:58 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: init.c,v 1.172 2021/03/28 19:30:08 rillig Exp $"); +__RCSID("$NetBSD: init.c,v 1.173 2021/03/28 19:53:58 rillig Exp $"); #endif #include @@ -589,8 +589,8 @@ brace_level_look_up_member(const struct /* TODO: merge duplicate code */ static sym_t * -brace_level_look_up_member_named(struct brace_level *level, const char *name, - int *count) +brace_level_look_up_first_member_named(struct brace_level *level, + const char *name, int *count) { sym_t *m; @@ -609,7 +609,7 @@ brace_level_look_up_member_named(struct /* TODO: merge duplicate code */ static sym_t * -brace_level_look_up_member_unnamed(struct brace_level *level, int *count) +brace_level_look_up_first_member_unnamed(struct brace_level *level, int *count) { sym_t *m; @@ -830,10 +830,10 @@ initialization_push_struct_or_union(stru level->bl_seen_named_member ? ", seen named member" : ""); if (in->designation.head != NULL) - m = brace_level_look_up_member_named(level, + m = brace_level_look_up_first_member_named(level, in->designation.head->name, ); else - m = brace_level_look_up_member_unnamed(level, ); + m = brace_level_look_up_first_member_unnamed(level, ); if (in->designation.head != NULL) { if (m == NULL) {
CVS commit: src
Module Name:src Committed By: rillig Date: Sun Mar 28 19:53:58 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_init.c src/usr.bin/xlint/lint1: init.c Log Message: lint: add test for assertion failure in initialization The 'cnt = level->bl_type->t_tspec == STRUCT ? 2 : 1;' in initialization_push_struct_or_union is obviously wrong since not every struct has exactly 1 remaining member after the first member that has an initializer with designation. This bug started its life in init.c 1.12 from 2002-10-21, a little over 18 years ago. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/tests/usr.bin/xlint/lint1/d_c99_init.c cvs rdiff -u -r1.172 -r1.173 src/usr.bin/xlint/lint1/init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-cfargs] src/sys/dev/ata
Module Name:src Committed By: thorpej Date: Sun Mar 28 19:53:09 UTC 2021 Modified Files: src/sys/dev/ata [thorpej-cfargs]: ata_raid.c Log Message: Correct names of arguments passed to rescan function. To generate a diff of this commit: cvs rdiff -u -r1.43.4.2 -r1.43.4.3 src/sys/dev/ata/ata_raid.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/ata/ata_raid.c diff -u src/sys/dev/ata/ata_raid.c:1.43.4.2 src/sys/dev/ata/ata_raid.c:1.43.4.3 --- src/sys/dev/ata/ata_raid.c:1.43.4.2 Mon Mar 22 16:23:44 2021 +++ src/sys/dev/ata/ata_raid.c Sun Mar 28 19:53:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ata_raid.c,v 1.43.4.2 2021/03/22 16:23:44 thorpej Exp $ */ +/* $NetBSD: ata_raid.c,v 1.43.4.3 2021/03/28 19:53:09 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.43.4.2 2021/03/22 16:23:44 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.43.4.3 2021/03/28 19:53:09 thorpej Exp $"); #include #include @@ -114,7 +114,7 @@ ataraidattach(int count) /* ARGSUSED */ static int -ataraid_rescan(device_t self, const char *attr, const int *flags) +ataraid_rescan(device_t self, const char *ifattr, const int *locs) { finalize_done = 0;
CVS commit: [thorpej-cfargs] src/sys/dev/ata
Module Name:src Committed By: thorpej Date: Sun Mar 28 19:53:09 UTC 2021 Modified Files: src/sys/dev/ata [thorpej-cfargs]: ata_raid.c Log Message: Correct names of arguments passed to rescan function. To generate a diff of this commit: cvs rdiff -u -r1.43.4.2 -r1.43.4.3 src/sys/dev/ata/ata_raid.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-cfargs] src/sys/dev
Module Name:src Committed By: thorpej Date: Sun Mar 28 19:50:05 UTC 2021 Modified Files: src/sys/dev [thorpej-cfargs]: spkr.c Log Message: "" is not a valid interface attribute, so don't pass it to spkr_rescan() (luckily it wasn't used anyway). To generate a diff of this commit: cvs rdiff -u -r1.17.14.1 -r1.17.14.2 src/sys/dev/spkr.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/spkr.c diff -u src/sys/dev/spkr.c:1.17.14.1 src/sys/dev/spkr.c:1.17.14.2 --- src/sys/dev/spkr.c:1.17.14.1 Sun Mar 21 21:09:09 2021 +++ src/sys/dev/spkr.c Sun Mar 28 19:50:05 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: spkr.c,v 1.17.14.1 2021/03/21 21:09:09 thorpej Exp $ */ +/* $NetBSD: spkr.c,v 1.17.14.2 2021/03/28 19:50:05 thorpej Exp $ */ /* * Copyright (c) 1990 Eric S. Raymond (e...@snark.thyrsus.com) @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.17.14.1 2021/03/21 21:09:09 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spkr.c,v 1.17.14.2 2021/03/28 19:50:05 thorpej Exp $"); #if defined(_KERNEL_OPT) #include "wsmux.h" @@ -375,7 +375,7 @@ spkr_attach(device_t self, void (*tone)( sc->sc_inbuf = NULL; sc->sc_wsbelldev = NULL; - spkr_rescan(self, "", NULL); + spkr_rescan(self, NULL, NULL); } int
CVS commit: [thorpej-cfargs] src/sys/dev
Module Name:src Committed By: thorpej Date: Sun Mar 28 19:50:05 UTC 2021 Modified Files: src/sys/dev [thorpej-cfargs]: spkr.c Log Message: "" is not a valid interface attribute, so don't pass it to spkr_rescan() (luckily it wasn't used anyway). To generate a diff of this commit: cvs rdiff -u -r1.17.14.1 -r1.17.14.2 src/sys/dev/spkr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [thorpej-cfargs] src/sys/arch/x86/pci/imcsmb
Module Name:src Committed By: thorpej Date: Sun Mar 28 19:42:59 UTC 2021 Modified Files: src/sys/arch/x86/pci/imcsmb [thorpej-cfargs]: imc.c imcsmb.c Log Message: - The third argument passed to the rescan function is a locs array, not a pointer to flags. - imc and imcsmb each carry only a single interface attribute, so no need to be explicit. To generate a diff of this commit: cvs rdiff -u -r1.2.16.1 -r1.2.16.2 src/sys/arch/x86/pci/imcsmb/imc.c cvs rdiff -u -r1.3.10.1 -r1.3.10.2 src/sys/arch/x86/pci/imcsmb/imcsmb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/pci/imcsmb/imc.c diff -u src/sys/arch/x86/pci/imcsmb/imc.c:1.2.16.1 src/sys/arch/x86/pci/imcsmb/imc.c:1.2.16.2 --- src/sys/arch/x86/pci/imcsmb/imc.c:1.2.16.1 Tue Mar 23 07:14:51 2021 +++ src/sys/arch/x86/pci/imcsmb/imc.c Sun Mar 28 19:42:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: imc.c,v 1.2.16.1 2021/03/23 07:14:51 thorpej Exp $ */ +/* $NetBSD: imc.c,v 1.2.16.2 2021/03/28 19:42:59 thorpej Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: imc.c,v 1.2.16.1 2021/03/23 07:14:51 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imc.c,v 1.2.16.2 2021/03/28 19:42:59 thorpej Exp $"); #include #include @@ -206,7 +206,7 @@ imc_attach(device_t parent, device_t sel { struct imc_softc *sc = device_private(self); struct pci_attach_args *pa = aux; - int flags, i; + int i; sc->sc_dev = self; sc->sc_pci_tag = pa->pa_tag; @@ -222,22 +222,19 @@ imc_attach(device_t parent, device_t sel } } - flags = 0; - if (!pmf_device_register(self, NULL, NULL)) aprint_error_dev(self, "couldn't establish power handler\n"); - imc_rescan(self, "imc", ); + imc_rescan(self, NULL, NULL); } /* Create the imcsmbX children */ static int -imc_rescan(device_t self, const char * ifattr, const int *flags) +imc_rescan(device_t self, const char *ifattr, const int *locs) { struct imc_softc *sc = device_private(self); struct imc_attach_args imca; - device_t child; int unit; for (unit = 0; unit < 2; unit++) { @@ -248,13 +245,8 @@ imc_rescan(device_t self, const char * i imca.ia_regs = _regs[unit]; imca.ia_pci_tag = sc->sc_pci_tag; imca.ia_pci_chipset_tag = sc->sc_pci_chipset_tag; - child = config_found(self, , NULL, CFARG_EOL); - - if (child == NULL) { - aprint_debug_dev(self, "Child %d imcsmb not added\n", - unit); - } - sc->sc_smbchild[unit] = child; + sc->sc_smbchild[unit] = + config_found(self, , NULL, CFARG_EOL); } return 0; Index: src/sys/arch/x86/pci/imcsmb/imcsmb.c diff -u src/sys/arch/x86/pci/imcsmb/imcsmb.c:1.3.10.1 src/sys/arch/x86/pci/imcsmb/imcsmb.c:1.3.10.2 --- src/sys/arch/x86/pci/imcsmb/imcsmb.c:1.3.10.1 Tue Mar 23 01:29:32 2021 +++ src/sys/arch/x86/pci/imcsmb/imcsmb.c Sun Mar 28 19:42:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: imcsmb.c,v 1.3.10.1 2021/03/23 01:29:32 thorpej Exp $ */ +/* $NetBSD: imcsmb.c,v 1.3.10.2 2021/03/28 19:42:59 thorpej Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: imcsmb.c,v 1.3.10.1 2021/03/23 01:29:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imcsmb.c,v 1.3.10.2 2021/03/28 19:42:59 thorpej Exp $"); #include #include @@ -138,7 +138,7 @@ imcsmb_attach(device_t parent, device_t } static int -imcsmb_rescan(device_t self, const char *ifattr, const int *flags) +imcsmb_rescan(device_t self, const char *ifattr, const int *locs) { struct imcsmb_softc *sc = device_private(self); struct i2cbus_attach_args iba; @@ -155,7 +155,7 @@ imcsmb_rescan(device_t self, const char memset(, 0, sizeof(iba)); iba.iba_tag = >sc_i2c_tag; - sc->sc_smbus = config_found_ia(self, ifattr, , iicbus_print); + sc->sc_smbus = config_found(self, , iicbus_print, CFARG_EOL); if (sc->sc_smbus == NULL) { aprint_normal_dev(self, "no child found\n");
CVS commit: [thorpej-cfargs] src/sys/arch/x86/pci/imcsmb
Module Name:src Committed By: thorpej Date: Sun Mar 28 19:42:59 UTC 2021 Modified Files: src/sys/arch/x86/pci/imcsmb [thorpej-cfargs]: imc.c imcsmb.c Log Message: - The third argument passed to the rescan function is a locs array, not a pointer to flags. - imc and imcsmb each carry only a single interface attribute, so no need to be explicit. To generate a diff of this commit: cvs rdiff -u -r1.2.16.1 -r1.2.16.2 src/sys/arch/x86/pci/imcsmb/imc.c cvs rdiff -u -r1.3.10.1 -r1.3.10.2 src/sys/arch/x86/pci/imcsmb/imcsmb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Mar 28 19:30:08 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: init.c Log Message: lint: split complicated function for looking up struct members No functional change. To generate a diff of this commit: cvs rdiff -u -r1.171 -r1.172 src/usr.bin/xlint/lint1/init.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/xlint/lint1/init.c diff -u src/usr.bin/xlint/lint1/init.c:1.171 src/usr.bin/xlint/lint1/init.c:1.172 --- src/usr.bin/xlint/lint1/init.c:1.171 Sun Mar 28 18:33:27 2021 +++ src/usr.bin/xlint/lint1/init.c Sun Mar 28 19:30:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.171 2021/03/28 18:33:27 rillig Exp $ */ +/* $NetBSD: init.c,v 1.172 2021/03/28 19:30:08 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: init.c,v 1.171 2021/03/28 18:33:27 rillig Exp $"); +__RCSID("$NetBSD: init.c,v 1.172 2021/03/28 19:30:08 rillig Exp $"); #endif #include @@ -589,8 +589,8 @@ brace_level_look_up_member(const struct /* TODO: merge duplicate code */ static sym_t * -brace_level_look_up_member_bloated(struct brace_level *level, - const struct designator *dr, int *count) +brace_level_look_up_member_named(struct brace_level *level, const char *name, + int *count) { sym_t *m; @@ -598,25 +598,25 @@ brace_level_look_up_member_bloated(struc m != NULL; m = m->s_next) { if (m->s_bitfield && m->s_name == unnamed) continue; - /* - * TODO: split into separate functions: - * - * look_up_array_next - * look_up_array_designator - * look_up_struct_next - * look_up_struct_designator - */ - if (dr != NULL) { - /* XXX: this log entry looks unnecessarily verbose */ - debug_step("have member '%s', want member '%s'", - m->s_name, dr->name); - if (strcmp(m->s_name, dr->name) == 0) { -(*count)++; -break; - } else -continue; - } + if (strcmp(m->s_name, name) != 0) + continue; + (*count)++; + break; + } + return m; +} + +/* TODO: merge duplicate code */ +static sym_t * +brace_level_look_up_member_unnamed(struct brace_level *level, int *count) +{ + sym_t *m; + + for (m = level->bl_type->t_str->sou_first_member; + m != NULL; m = m->s_next) { + if (m->s_bitfield && m->s_name == unnamed) + continue; /* XXX: What is this code for? */ if (++(*count) == 1) { level->bl_next_member = m; @@ -812,10 +812,6 @@ initialization_set_error(struct initiali static bool initialization_push_struct_or_union(struct initialization *in) { - /* - * TODO: remove unnecessary 'const' for variables in functions that - * fit on a single screen. Keep it for larger functions. - */ struct brace_level *level = in->brace_level; int cnt; sym_t *m; @@ -833,8 +829,11 @@ initialization_push_struct_or_union(stru type_name(level->bl_type), level->bl_seen_named_member ? ", seen named member" : ""); - m = brace_level_look_up_member_bloated(level, - in->designation.head, ); + if (in->designation.head != NULL) + m = brace_level_look_up_member_named(level, + in->designation.head->name, ); + else + m = brace_level_look_up_member_unnamed(level, ); if (in->designation.head != NULL) { if (m == NULL) {
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Mar 28 19:30:08 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: init.c Log Message: lint: split complicated function for looking up struct members No functional change. To generate a diff of this commit: cvs rdiff -u -r1.171 -r1.172 src/usr.bin/xlint/lint1/init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Mar 28 18:48:32 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_init.c d_c99_init.exp Log Message: tests/lint: add tests for initialization To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/tests/usr.bin/xlint/lint1/d_c99_init.c cvs rdiff -u -r1.13 -r1.14 src/tests/usr.bin/xlint/lint1/d_c99_init.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/d_c99_init.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.17 src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.18 --- src/tests/usr.bin/xlint/lint1/d_c99_init.c:1.17 Sun Mar 28 14:01:50 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_init.c Sun Mar 28 18:48:32 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_init.c,v 1.17 2021/03/28 14:01:50 rillig Exp $ */ +/* $NetBSD: d_c99_init.c,v 1.18 2021/03/28 18:48:32 rillig Exp $ */ # 3 "d_c99_init.c" /* @@ -34,6 +34,9 @@ struct_initialization_via_assignment(any // See init_using_expr, initstack_string. char static_duration[] = "static duration"; +signed char static_duration_signed[] = "static duration"; +unsigned char static_duration_unsigned[] = "static duration"; +int static_duration_wchar[] = L"static duration"; // See init_using_expr. void @@ -44,13 +47,25 @@ initialization_by_braced_string(void) } void -initialization_with_redundant_braces(any arg) +initialization_by_redundantly_braced_string(void) +{ + any local = "hello" ; + use(); +} + +/* + * Only scalar expressions and string literals may be enclosed by additional + * braces. Since 'arg' is a struct, this is a compile-time error. + */ +void +initialization_with_too_many_braces(any arg) { any local = { arg }; /* expect: 185 */ use(); } -// Some of the following examples are mentioned in init.c. +// Some of the following examples are mentioned in the introduction comment +// in init.c. int number = 12345; @@ -217,4 +232,14 @@ struct ends_with_unnamed_bit_field { 23456, }; -// See d_struct_init_nested.c for a more complicated example. +char prefixed_message[] = { + 'E', ':', ' ', + /* expect+1: illegal combination of integer (char) and pointer */ + "message\n", +}; + +char message_with_suffix[] = { + "message", + /* expect+1: too many array initializers */ + '\n', +}; Index: src/tests/usr.bin/xlint/lint1/d_c99_init.exp diff -u src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.13 src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.14 --- src/tests/usr.bin/xlint/lint1/d_c99_init.exp:1.13 Sun Mar 28 14:01:50 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_init.exp Sun Mar 28 18:48:32 2021 @@ -1,5 +1,7 @@ d_c99_init.c(23): error: too many initializers [174] -d_c99_init.c(49): error: cannot initialize 'pointer to const void' from 'struct any' [185] -d_c99_init.c(65): error: too many array initializers, expected 3 [173] -d_c99_init.c(130): error: syntax error 'named member must only be used with struct/union' [249] -d_c99_init.c(217): error: too many struct/union initializers [172] +d_c99_init.c(63): error: cannot initialize 'pointer to const void' from 'struct any' [185] +d_c99_init.c(80): error: too many array initializers, expected 3 [173] +d_c99_init.c(145): error: syntax error 'named member must only be used with struct/union' [249] +d_c99_init.c(232): error: too many struct/union initializers [172] +d_c99_init.c(238): warning: illegal combination of integer (char) and pointer (pointer to char) [183] +d_c99_init.c(244): error: too many array initializers, expected 8 [173]
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Mar 28 18:48:32 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_init.c d_c99_init.exp Log Message: tests/lint: add tests for initialization To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/tests/usr.bin/xlint/lint1/d_c99_init.c cvs rdiff -u -r1.13 -r1.14 src/tests/usr.bin/xlint/lint1/d_c99_init.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Mar 28 18:33:27 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: init.c Log Message: lint: inline variable in initialization_init_array_using_string No functional change. To generate a diff of this commit: cvs rdiff -u -r1.170 -r1.171 src/usr.bin/xlint/lint1/init.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/xlint/lint1/init.c diff -u src/usr.bin/xlint/lint1/init.c:1.170 src/usr.bin/xlint/lint1/init.c:1.171 --- src/usr.bin/xlint/lint1/init.c:1.170 Sun Mar 28 18:28:22 2021 +++ src/usr.bin/xlint/lint1/init.c Sun Mar 28 18:33:27 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.170 2021/03/28 18:28:22 rillig Exp $ */ +/* $NetBSD: init.c,v 1.171 2021/03/28 18:33:27 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: init.c,v 1.170 2021/03/28 18:28:22 rillig Exp $"); +__RCSID("$NetBSD: init.c,v 1.171 2021/03/28 18:33:27 rillig Exp $"); #endif #include @@ -1179,7 +1179,6 @@ static bool initialization_init_array_using_string(struct initialization *in, tnode_t *tn) { struct brace_level *level; - int len; strg_t *strg; if (tn->tn_op != STRING) @@ -1213,12 +1212,9 @@ initialization_init_array_using_string(s } else goto nope; - /* Get length without trailing NUL character. */ - len = strg->st_len; - if (level->bl_array_of_unknown_size) { level->bl_array_of_unknown_size = false; - level->bl_type->t_dim = len + 1; + level->bl_type->t_dim = (int)(strg->st_len + 1); setcomplete(level->bl_type, true); } else { /* @@ -1226,7 +1222,7 @@ initialization_init_array_using_string(s * initialized */ /* XXX: double-check for off-by-one error */ - if (level->bl_type->t_dim < len) { + if (level->bl_type->t_dim < (int)strg->st_len) { /* non-null byte ignored in string initializer */ warning(187); }
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Mar 28 18:33:27 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: init.c Log Message: lint: inline variable in initialization_init_array_using_string No functional change. To generate a diff of this commit: cvs rdiff -u -r1.170 -r1.171 src/usr.bin/xlint/lint1/init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Mar 28 18:28:22 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: init.c Log Message: lint: clean up initialization_init_array_using_string No functional change. To generate a diff of this commit: cvs rdiff -u -r1.169 -r1.170 src/usr.bin/xlint/lint1/init.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/xlint/lint1/init.c diff -u src/usr.bin/xlint/lint1/init.c:1.169 src/usr.bin/xlint/lint1/init.c:1.170 --- src/usr.bin/xlint/lint1/init.c:1.169 Sun Mar 28 18:21:28 2021 +++ src/usr.bin/xlint/lint1/init.c Sun Mar 28 18:28:22 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.169 2021/03/28 18:21:28 rillig Exp $ */ +/* $NetBSD: init.c,v 1.170 2021/03/28 18:28:22 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: init.c,v 1.169 2021/03/28 18:21:28 rillig Exp $"); +__RCSID("$NetBSD: init.c,v 1.170 2021/03/28 18:28:22 rillig Exp $"); #endif #include @@ -1166,7 +1166,7 @@ is_string_array(const type_t *tp, tspec_ { tspec_t st; - if (tp->t_tspec != ARRAY) + if (tp == NULL || tp->t_tspec != ARRAY) return false; st = tp->t_subt->t_tspec; return t == CHAR @@ -1186,7 +1186,6 @@ initialization_init_array_using_string(s return false; debug_enter(); - initialization_debug(in); level = in->brace_level; strg = tn->tn_string; @@ -1195,42 +1194,24 @@ initialization_init_array_using_string(s * Check if we have an array type which can be initialized by * the string. */ - if (level->bl_subtype != NULL && level->bl_subtype->t_tspec == ARRAY) { + if (is_string_array(level->bl_subtype, strg->st_tspec)) { debug_step("subtype is an array"); - if (!is_string_array(level->bl_subtype, strg->st_tspec)) { - debug_leave(); - return false; - } /* Put the array at top of stack */ initialization_push(in); level = in->brace_level; - /* TODO: what if both bl_type and bl_subtype are ARRAY? */ - - } else if (level->bl_type != NULL && level->bl_type->t_tspec == ARRAY) { + } else if (is_string_array(level->bl_type, strg->st_tspec)) { debug_step("type is an array"); - if (!is_string_array(level->bl_type, strg->st_tspec)) { - debug_leave(); - return false; - } /* - * TODO: is this really not needed in the branch above this - * one? - */ - /* * If the array is already partly initialized, we are * wrong here. */ - if (level->bl_remaining != level->bl_type->t_dim) { - debug_leave(); - return false; - } - } else { - debug_leave(); - return false; - } + if (level->bl_remaining != level->bl_type->t_dim) + goto nope; + } else + goto nope; /* Get length without trailing NUL character. */ len = strg->st_len; @@ -1263,6 +1244,9 @@ initialization_init_array_using_string(s initialization_debug(in); debug_leave(); return true; +nope: + debug_leave(); + return false; } /*
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Mar 28 18:28:22 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: init.c Log Message: lint: clean up initialization_init_array_using_string No functional change. To generate a diff of this commit: cvs rdiff -u -r1.169 -r1.170 src/usr.bin/xlint/lint1/init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sun Mar 28 18:23:56 UTC 2021 Modified Files: src/doc [netbsd-9]: CHANGES-9.2 Log Message: Amment ticket #1237 for additional pullups To generate a diff of this commit: cvs rdiff -u -r1.1.2.61 -r1.1.2.62 src/doc/CHANGES-9.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.2 diff -u src/doc/CHANGES-9.2:1.1.2.61 src/doc/CHANGES-9.2:1.1.2.62 --- src/doc/CHANGES-9.2:1.1.2.61 Sat Mar 27 14:38:15 2021 +++ src/doc/CHANGES-9.2 Sun Mar 28 18:23:56 2021 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.2,v 1.1.2.61 2021/03/27 14:38:15 martin Exp $ +# $NetBSD: CHANGES-9.2,v 1.1.2.62 2021/03/28 18:23:56 martin Exp $ A complete list of changes from the NetBSD 9.1 release to the NetBSD 9.2 release: @@ -2298,6 +2298,572 @@ crypto/external/bsd/openssl/dist/tools/c crypto/external/bsd/openssl/dist/util/libcrypto.num up to 1.1.1.10 crypto/external/bsd/openssl/dist/util/mkrc.pl up to 1.1.1.6 crypto/external/bsd/openssl/dist/util/perl/TLSProxy/Message.pm up to 1.1.1.5 +crypto/external/bsd/openssl/include/openssl/opensslconf.h up to 1.9 +crypto/external/bsd/openssl/lib/libcrypto/crypto.inc up to 1.10 +crypto/external/bsd/openssl/lib/libcrypto/evp.inc up to 1.10 +crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/aesv8-armx.S up to 1.3 +crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/chacha-armv8.S up to 1.3 +crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/crypto.inc up to 1.5 +crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/poly1305-armv8.S up to 1.3 +crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/sha1-armv8.S up to 1.3 +crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64/sha512-armv8.S up to 1.4 +crypto/external/bsd/openssl/lib/libcrypto/arch/alpha/crypto.inc up to 1.3 +crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aesv8-armx.S up to 1.5 +crypto/external/bsd/openssl/lib/libcrypto/arch/arm/chacha-armv8.S up to 1.4 +crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc up to 1.11 +crypto/external/bsd/openssl/lib/libcrypto/arch/arm/ecp_nistz256-armv4.S up to 1.5 +crypto/external/bsd/openssl/lib/libcrypto/arch/arm/modes.inc up to 1.5 +crypto/external/bsd/openssl/lib/libcrypto/arch/arm/poly1305-armv8.S up to 1.4 +crypto/external/bsd/openssl/lib/libcrypto/arch/arm/sha1-armv8.S up to 1.3 +crypto/external/bsd/openssl/lib/libcrypto/arch/arm/sha512-armv8.S up to 1.5 +crypto/external/bsd/openssl/lib/libcrypto/arch/i386/crypto.inc up to 1.3 +crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.S up to 1.4 +crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S up to 1.5 +crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/crypto.inc up to 1.4 +crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/keccak1600p8-ppc.S up to 1.3 +crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc/sha.inc up to 1.5 +crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/crypto.inc up to 1.3 +crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/keccak1600-ppc64.S up to 1.3 +crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/keccak1600p8-ppc.S up to 1.3 +crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64/sha.inc up to 1.3 +crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/aes.inc up to 1.6 +crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc up to 1.2 +crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc up to 1.13 +crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc up to 1.4 +crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64/crypto.inc up to 1.8 +crypto/external/bsd/openssl/lib/libcrypto/arch/vax/crypto.inc up to 1.4 +crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64/crypto.inc up to 1.3 +crypto/external/bsd/openssl/lib/libcrypto/man/ADMISSIONS.3 up to 1.3 +crypto/external/bsd/openssl/lib/libcrypto/man/ASN1_INTEGER_get_int64.3 up to 1.4 +crypto/external/bsd/openssl/lib/libcrypto/man/ASN1_ITEM_lookup.3 up to 1.3 +crypto/external/bsd/openssl/lib/libcrypto/man/ASN1_OBJECT_new.3 up to 1.20 +crypto/external/bsd/openssl/lib/libcrypto/man/ASN1_STRING_TABLE_add.3 up to 1.3 +crypto/external/bsd/openssl/lib/libcrypto/man/ASN1_STRING_length.3 up to 1.20 +crypto/external/bsd/openssl/lib/libcrypto/man/ASN1_STRING_new.3 up to 1.20 +crypto/external/bsd/openssl/lib/libcrypto/man/ASN1_STRING_print_ex.3 up to 1.20 +crypto/external/bsd/openssl/lib/libcrypto/man/ASN1_TIME_set.3 up to 1.5 +crypto/external/bsd/openssl/lib/libcrypto/man/ASN1_TYPE_get.3 up to 1.4 +crypto/external/bsd/openssl/lib/libcrypto/man/ASN1_generate_nconf.3 up to 1.20 +crypto/external/bsd/openssl/lib/libcrypto/man/ASYNC_WAIT_CTX_new.3 up to 1.4 +crypto/external/bsd/openssl/lib/libcrypto/man/ASYNC_start_job.3 up to 1.4 +crypto/external/bsd/openssl/lib/libcrypto/man/BF_encrypt.3 up to 1.4 +crypto/external/bsd/openssl/lib/libcrypto/man/BIO_ADDR.3 up to 1.4 +crypto/external/bsd/openssl/lib/libcrypto/man/BIO_ADDRINFO.3
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sun Mar 28 18:23:56 UTC 2021 Modified Files: src/doc [netbsd-9]: CHANGES-9.2 Log Message: Amment ticket #1237 for additional pullups To generate a diff of this commit: cvs rdiff -u -r1.1.2.61 -r1.1.2.62 src/doc/CHANGES-9.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/crypto/external/bsd/openssl
Module Name:src Committed By: martin Date: Sun Mar 28 18:21:52 UTC 2021 Modified Files: src/crypto/external/bsd/openssl/include/openssl [netbsd-9]: opensslconf.h src/crypto/external/bsd/openssl/lib/libcrypto [netbsd-9]: crypto.inc evp.inc src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64 [netbsd-9]: aesv8-armx.S chacha-armv8.S crypto.inc poly1305-armv8.S sha1-armv8.S sha512-armv8.S src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha [netbsd-9]: crypto.inc src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm [netbsd-9]: aesv8-armx.S chacha-armv8.S crypto.inc ecp_nistz256-armv4.S modes.inc poly1305-armv8.S sha1-armv8.S sha512-armv8.S src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386 [netbsd-9]: crypto.inc src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips [netbsd-9]: mips.S mips64.S src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc [netbsd-9]: crypto.inc keccak1600p8-ppc.S sha.inc src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64 [netbsd-9]: crypto.inc keccak1600-ppc64.S keccak1600p8-ppc.S sha.inc src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc [netbsd-9]: aes.inc bn.inc crypto.inc modes.inc src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64 [netbsd-9]: crypto.inc src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax [netbsd-9]: crypto.inc src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64 [netbsd-9]: crypto.inc src/crypto/external/bsd/openssl/lib/libcrypto/man [netbsd-9]: ADMISSIONS.3 ASN1_INTEGER_get_int64.3 ASN1_ITEM_lookup.3 ASN1_OBJECT_new.3 ASN1_STRING_TABLE_add.3 ASN1_STRING_length.3 ASN1_STRING_new.3 ASN1_STRING_print_ex.3 ASN1_TIME_set.3 ASN1_TYPE_get.3 ASN1_generate_nconf.3 ASYNC_WAIT_CTX_new.3 ASYNC_start_job.3 BF_encrypt.3 BIO_ADDR.3 BIO_ADDRINFO.3 BIO_connect.3 BIO_ctrl.3 BIO_f_base64.3 BIO_f_buffer.3 BIO_f_cipher.3 BIO_f_md.3 BIO_f_null.3 BIO_f_ssl.3 BIO_find_type.3 BIO_get_data.3 BIO_get_ex_new_index.3 BIO_meth_new.3 BIO_new.3 BIO_new_CMS.3 BIO_parse_hostserv.3 BIO_printf.3 BIO_push.3 BIO_read.3 BIO_s_accept.3 BIO_s_bio.3 BIO_s_connect.3 BIO_s_fd.3 BIO_s_file.3 BIO_s_mem.3 BIO_s_null.3 BIO_s_socket.3 BIO_set_callback.3 BIO_should_retry.3 BN_BLINDING_new.3 BN_CTX_new.3 BN_CTX_start.3 BN_add.3 BN_add_word.3 BN_bn2bin.3 BN_cmp.3 BN_copy.3 BN_generate_prime.3 BN_mod_inverse.3 BN_mod_mul_montgomery.3 BN_mod_mul_reciprocal.3 BN_new.3 BN_num_bytes.3 BN_rand.3 BN_security_bits.3 BN_set_bit.3 BN_swap.3 BN_zero.3 BUF_MEM_new.3 CMS_add0_cert.3 CMS_add1_recipient_cert.3 CMS_add1_signer.3 CMS_compress.3 CMS_decrypt.3 CMS_encrypt.3 CMS_final.3 CMS_get0_RecipientInfos.3 CMS_get0_SignerInfos.3 CMS_get0_type.3 CMS_get1_ReceiptRequest.3 CMS_sign.3 CMS_sign_receipt.3 CMS_uncompress.3 CMS_verify.3 CMS_verify_receipt.3 CONF_modules_free.3 CONF_modules_load_file.3 CRYPTO_THREAD_run_once.3 CRYPTO_get_ex_new_index.3 CTLOG_STORE_get0_log_by_id.3 CTLOG_STORE_new.3 CTLOG_new.3 CT_POLICY_EVAL_CTX_new.3 DEFINE_STACK_OF.3 DES_random_key.3 DH_generate_key.3 DH_generate_parameters.3 DH_get0_pqg.3 DH_get_1024_160.3 DH_meth_new.3 DH_new.3 DH_new_by_nid.3 DH_set_method.3 DH_size.3 DSA_SIG_new.3 DSA_do_sign.3 DSA_dup_DH.3 DSA_generate_key.3 DSA_generate_parameters.3 DSA_get0_pqg.3 DSA_meth_new.3 DSA_new.3 DSA_set_method.3 DSA_sign.3 DSA_size.3 DTLS_get_data_mtu.3 DTLS_set_timer_cb.3 DTLSv1_listen.3 ECDSA_SIG_new.3 ECPKParameters_print.3 EC_GFp_simple_method.3 EC_GROUP_copy.3 EC_GROUP_new.3 EC_KEY_get_enc_flags.3 EC_KEY_new.3 EC_POINT_add.3 EC_POINT_new.3 ENGINE_add.3 ERR_GET_LIB.3 ERR_clear_error.3 ERR_error_string.3 ERR_get_error.3 ERR_load_crypto_strings.3 ERR_load_strings.3 ERR_print_errors.3 ERR_put_error.3 ERR_remove_state.3 ERR_set_mark.3 EVP_BytesToKey.3 EVP_CIPHER_CTX_get_cipher_data.3 EVP_CIPHER_meth_new.3 EVP_DigestInit.3 EVP_DigestSignInit.3 EVP_DigestVerifyInit.3 EVP_EncodeInit.3 EVP_EncryptInit.3 EVP_MD_meth_new.3 EVP_OpenInit.3 EVP_PKEY_ASN1_METHOD.3 EVP_PKEY_CTX_ctrl.3 EVP_PKEY_CTX_new.3 EVP_PKEY_CTX_set1_pbe_pass.3 EVP_PKEY_CTX_set_hkdf_md.3 EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 EVP_PKEY_CTX_set_scrypt_N.3 EVP_PKEY_CTX_set_tls1_prf_md.3 EVP_PKEY_asn1_get_count.3 EVP_PKEY_cmp.3 EVP_PKEY_decrypt.3
CVS commit: [netbsd-9] src/crypto/external/bsd/openssl
Module Name:src Committed By: martin Date: Sun Mar 28 18:21:52 UTC 2021 Modified Files: src/crypto/external/bsd/openssl/include/openssl [netbsd-9]: opensslconf.h src/crypto/external/bsd/openssl/lib/libcrypto [netbsd-9]: crypto.inc evp.inc src/crypto/external/bsd/openssl/lib/libcrypto/arch/aarch64 [netbsd-9]: aesv8-armx.S chacha-armv8.S crypto.inc poly1305-armv8.S sha1-armv8.S sha512-armv8.S src/crypto/external/bsd/openssl/lib/libcrypto/arch/alpha [netbsd-9]: crypto.inc src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm [netbsd-9]: aesv8-armx.S chacha-armv8.S crypto.inc ecp_nistz256-armv4.S modes.inc poly1305-armv8.S sha1-armv8.S sha512-armv8.S src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386 [netbsd-9]: crypto.inc src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips [netbsd-9]: mips.S mips64.S src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc [netbsd-9]: crypto.inc keccak1600p8-ppc.S sha.inc src/crypto/external/bsd/openssl/lib/libcrypto/arch/powerpc64 [netbsd-9]: crypto.inc keccak1600-ppc64.S keccak1600p8-ppc.S sha.inc src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc [netbsd-9]: aes.inc bn.inc crypto.inc modes.inc src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc64 [netbsd-9]: crypto.inc src/crypto/external/bsd/openssl/lib/libcrypto/arch/vax [netbsd-9]: crypto.inc src/crypto/external/bsd/openssl/lib/libcrypto/arch/x86_64 [netbsd-9]: crypto.inc src/crypto/external/bsd/openssl/lib/libcrypto/man [netbsd-9]: ADMISSIONS.3 ASN1_INTEGER_get_int64.3 ASN1_ITEM_lookup.3 ASN1_OBJECT_new.3 ASN1_STRING_TABLE_add.3 ASN1_STRING_length.3 ASN1_STRING_new.3 ASN1_STRING_print_ex.3 ASN1_TIME_set.3 ASN1_TYPE_get.3 ASN1_generate_nconf.3 ASYNC_WAIT_CTX_new.3 ASYNC_start_job.3 BF_encrypt.3 BIO_ADDR.3 BIO_ADDRINFO.3 BIO_connect.3 BIO_ctrl.3 BIO_f_base64.3 BIO_f_buffer.3 BIO_f_cipher.3 BIO_f_md.3 BIO_f_null.3 BIO_f_ssl.3 BIO_find_type.3 BIO_get_data.3 BIO_get_ex_new_index.3 BIO_meth_new.3 BIO_new.3 BIO_new_CMS.3 BIO_parse_hostserv.3 BIO_printf.3 BIO_push.3 BIO_read.3 BIO_s_accept.3 BIO_s_bio.3 BIO_s_connect.3 BIO_s_fd.3 BIO_s_file.3 BIO_s_mem.3 BIO_s_null.3 BIO_s_socket.3 BIO_set_callback.3 BIO_should_retry.3 BN_BLINDING_new.3 BN_CTX_new.3 BN_CTX_start.3 BN_add.3 BN_add_word.3 BN_bn2bin.3 BN_cmp.3 BN_copy.3 BN_generate_prime.3 BN_mod_inverse.3 BN_mod_mul_montgomery.3 BN_mod_mul_reciprocal.3 BN_new.3 BN_num_bytes.3 BN_rand.3 BN_security_bits.3 BN_set_bit.3 BN_swap.3 BN_zero.3 BUF_MEM_new.3 CMS_add0_cert.3 CMS_add1_recipient_cert.3 CMS_add1_signer.3 CMS_compress.3 CMS_decrypt.3 CMS_encrypt.3 CMS_final.3 CMS_get0_RecipientInfos.3 CMS_get0_SignerInfos.3 CMS_get0_type.3 CMS_get1_ReceiptRequest.3 CMS_sign.3 CMS_sign_receipt.3 CMS_uncompress.3 CMS_verify.3 CMS_verify_receipt.3 CONF_modules_free.3 CONF_modules_load_file.3 CRYPTO_THREAD_run_once.3 CRYPTO_get_ex_new_index.3 CTLOG_STORE_get0_log_by_id.3 CTLOG_STORE_new.3 CTLOG_new.3 CT_POLICY_EVAL_CTX_new.3 DEFINE_STACK_OF.3 DES_random_key.3 DH_generate_key.3 DH_generate_parameters.3 DH_get0_pqg.3 DH_get_1024_160.3 DH_meth_new.3 DH_new.3 DH_new_by_nid.3 DH_set_method.3 DH_size.3 DSA_SIG_new.3 DSA_do_sign.3 DSA_dup_DH.3 DSA_generate_key.3 DSA_generate_parameters.3 DSA_get0_pqg.3 DSA_meth_new.3 DSA_new.3 DSA_set_method.3 DSA_sign.3 DSA_size.3 DTLS_get_data_mtu.3 DTLS_set_timer_cb.3 DTLSv1_listen.3 ECDSA_SIG_new.3 ECPKParameters_print.3 EC_GFp_simple_method.3 EC_GROUP_copy.3 EC_GROUP_new.3 EC_KEY_get_enc_flags.3 EC_KEY_new.3 EC_POINT_add.3 EC_POINT_new.3 ENGINE_add.3 ERR_GET_LIB.3 ERR_clear_error.3 ERR_error_string.3 ERR_get_error.3 ERR_load_crypto_strings.3 ERR_load_strings.3 ERR_print_errors.3 ERR_put_error.3 ERR_remove_state.3 ERR_set_mark.3 EVP_BytesToKey.3 EVP_CIPHER_CTX_get_cipher_data.3 EVP_CIPHER_meth_new.3 EVP_DigestInit.3 EVP_DigestSignInit.3 EVP_DigestVerifyInit.3 EVP_EncodeInit.3 EVP_EncryptInit.3 EVP_MD_meth_new.3 EVP_OpenInit.3 EVP_PKEY_ASN1_METHOD.3 EVP_PKEY_CTX_ctrl.3 EVP_PKEY_CTX_new.3 EVP_PKEY_CTX_set1_pbe_pass.3 EVP_PKEY_CTX_set_hkdf_md.3 EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 EVP_PKEY_CTX_set_scrypt_N.3 EVP_PKEY_CTX_set_tls1_prf_md.3 EVP_PKEY_asn1_get_count.3 EVP_PKEY_cmp.3 EVP_PKEY_decrypt.3
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Mar 28 18:21:29 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: init.c Log Message: lint: clean up initialization_expr No functional change. To generate a diff of this commit: cvs rdiff -u -r1.168 -r1.169 src/usr.bin/xlint/lint1/init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Mar 28 18:21:29 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: init.c Log Message: lint: clean up initialization_expr No functional change. To generate a diff of this commit: cvs rdiff -u -r1.168 -r1.169 src/usr.bin/xlint/lint1/init.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/xlint/lint1/init.c diff -u src/usr.bin/xlint/lint1/init.c:1.168 src/usr.bin/xlint/lint1/init.c:1.169 --- src/usr.bin/xlint/lint1/init.c:1.168 Sun Mar 28 18:18:22 2021 +++ src/usr.bin/xlint/lint1/init.c Sun Mar 28 18:21:28 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.168 2021/03/28 18:18:22 rillig Exp $ */ +/* $NetBSD: init.c,v 1.169 2021/03/28 18:21:28 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: init.c,v 1.168 2021/03/28 18:18:22 rillig Exp $"); +__RCSID("$NetBSD: init.c,v 1.169 2021/03/28 18:21:28 rillig Exp $"); #endif #include @@ -1354,21 +1354,20 @@ initialization_expr(struct initializatio if (initialization_init_array_using_string(in, tn)) { debug_step("after initializing the string:"); - /* XXX: why not clean up the initstack here already? */ - goto done_initstack; + goto done_debug; } initialization_next_nobrace(in, tn); if (in->initerr || tn == NULL) - goto done_initstack; - - in->brace_level->bl_remaining--; - debug_step("%d elements remaining", in->brace_level->bl_remaining); + goto done_debug; /* Using initsym here is better than nothing. */ check_init_expr(sclass, in->brace_level->bl_type, in->initsym, tn); -done_initstack: + in->brace_level->bl_remaining--; + debug_step("%d elements remaining", in->brace_level->bl_remaining); + +done_debug: initialization_debug(in); done:
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Mar 28 18:18:22 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: init.c Log Message: lint: extract duplicate code to is_string_array No functional change. To generate a diff of this commit: cvs rdiff -u -r1.167 -r1.168 src/usr.bin/xlint/lint1/init.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/xlint/lint1/init.c diff -u src/usr.bin/xlint/lint1/init.c:1.167 src/usr.bin/xlint/lint1/init.c:1.168 --- src/usr.bin/xlint/lint1/init.c:1.167 Sun Mar 28 18:01:57 2021 +++ src/usr.bin/xlint/lint1/init.c Sun Mar 28 18:18:22 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.167 2021/03/28 18:01:57 rillig Exp $ */ +/* $NetBSD: init.c,v 1.168 2021/03/28 18:18:22 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: init.c,v 1.167 2021/03/28 18:01:57 rillig Exp $"); +__RCSID("$NetBSD: init.c,v 1.168 2021/03/28 18:18:22 rillig Exp $"); #endif #include @@ -1161,11 +1161,23 @@ initialization_add_designator_subscript( debug_leave(); } +static bool +is_string_array(const type_t *tp, tspec_t t) +{ + tspec_t st; + + if (tp->t_tspec != ARRAY) + return false; + st = tp->t_subt->t_tspec; + return t == CHAR + ? st == CHAR || st == UCHAR || st == SCHAR + : st == WCHAR; +} + /* Initialize a character array or wchar_t array with a string literal. */ static bool initialization_init_array_using_string(struct initialization *in, tnode_t *tn) { - tspec_t t; struct brace_level *level; int len; strg_t *strg; @@ -1184,15 +1196,11 @@ initialization_init_array_using_string(s * the string. */ if (level->bl_subtype != NULL && level->bl_subtype->t_tspec == ARRAY) { - debug_step("subt array"); - t = level->bl_subtype->t_subt->t_tspec; - if (!((strg->st_tspec == CHAR && - (t == CHAR || t == UCHAR || t == SCHAR)) || - (strg->st_tspec == WCHAR && t == WCHAR))) { + debug_step("subtype is an array"); + if (!is_string_array(level->bl_subtype, strg->st_tspec)) { debug_leave(); return false; } - /* XXX: duplicate code, see below */ /* Put the array at top of stack */ initialization_push(in); @@ -1201,15 +1209,11 @@ initialization_init_array_using_string(s /* TODO: what if both bl_type and bl_subtype are ARRAY? */ } else if (level->bl_type != NULL && level->bl_type->t_tspec == ARRAY) { - debug_step("type array"); - t = level->bl_type->t_subt->t_tspec; - if (!((strg->st_tspec == CHAR && - (t == CHAR || t == UCHAR || t == SCHAR)) || - (strg->st_tspec == WCHAR && t == WCHAR))) { + debug_step("type is an array"); + if (!is_string_array(level->bl_type, strg->st_tspec)) { debug_leave(); return false; } - /* XXX: duplicate code, see above */ /* * TODO: is this really not needed in the branch above this
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Mar 28 18:18:22 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: init.c Log Message: lint: extract duplicate code to is_string_array No functional change. To generate a diff of this commit: cvs rdiff -u -r1.167 -r1.168 src/usr.bin/xlint/lint1/init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Mar 28 18:01:57 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: init.c Log Message: lint: add is_struct_or_union No functional change. To generate a diff of this commit: cvs rdiff -u -r1.166 -r1.167 src/usr.bin/xlint/lint1/init.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/xlint/lint1/init.c diff -u src/usr.bin/xlint/lint1/init.c:1.166 src/usr.bin/xlint/lint1/init.c:1.167 --- src/usr.bin/xlint/lint1/init.c:1.166 Sun Mar 28 16:28:15 2021 +++ src/usr.bin/xlint/lint1/init.c Sun Mar 28 18:01:57 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.166 2021/03/28 16:28:15 rillig Exp $ */ +/* $NetBSD: init.c,v 1.167 2021/03/28 18:01:57 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: init.c,v 1.166 2021/03/28 16:28:15 rillig Exp $"); +__RCSID("$NetBSD: init.c,v 1.167 2021/03/28 18:01:57 rillig Exp $"); #endif #include @@ -321,6 +321,13 @@ debug_leave(const char *func) #endif +static bool +is_struct_or_union(tspec_t t) +{ + return t == STRUCT || t == UNION; +} + + /* In traditional C, bit-fields can be initialized only by integer constants. */ static void check_bit_field_init(const tnode_t *ln, tspec_t lt, tspec_t rt) @@ -568,7 +575,7 @@ brace_level_look_up_member(const struct const type_t *tp = level->bl_type; const sym_t *m; - lint_assert(tp->t_tspec == STRUCT || tp->t_tspec == UNION); + lint_assert(is_struct_or_union(tp->t_tspec)); for (m = tp->t_str->sou_first_member; m != NULL; m = m->s_next) { if (m->s_bitfield && m->s_name == unnamed) @@ -678,7 +685,7 @@ brace_level_check_too_many_initializers( if (t == ARRAY) { /* too many array initializers, expected %d */ error(173, level->bl_type->t_dim); - } else if (t == STRUCT || t == UNION) { + } else if (is_struct_or_union(t)) { /* too many struct/union initializers */ error(172); } else { @@ -940,8 +947,7 @@ initialization_pop_item_named(struct ini */ debug_step("initializing named member '%s'", name); - if (level->bl_type->t_tspec != STRUCT && - level->bl_type->t_tspec != UNION) { + if (!is_struct_or_union(level->bl_type->t_tspec)) { /* syntax error '%s' */ error(249, "named member must only be used with struct/union"); initialization_set_error(in);
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Mar 28 18:01:57 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: init.c Log Message: lint: add is_struct_or_union No functional change. To generate a diff of this commit: cvs rdiff -u -r1.166 -r1.167 src/usr.bin/xlint/lint1/init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/misc
Module Name:src Committed By: nia Date: Sun Mar 28 17:52:09 UTC 2021 Modified Files: src/share/misc: acronyms.comp Log Message: DRM To generate a diff of this commit: cvs rdiff -u -r1.321 -r1.322 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.321 src/share/misc/acronyms.comp:1.322 --- src/share/misc/acronyms.comp:1.321 Fri Feb 12 08:56:04 2021 +++ src/share/misc/acronyms.comp Sun Mar 28 17:52:09 2021 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.321 2021/02/12 08:56:04 leot Exp $ +$NetBSD: acronyms.comp,v 1.322 2021/03/28 17:52:09 nia Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -446,6 +446,7 @@ DRAM dynamic random access memory DRBG deterministic random bit generator DRI direct rendering infrastructure DRM digital rights management +DRM direct rendering manager DRRS display refresh rate switching DS debug store DS differentiated services
CVS commit: src/share/misc
Module Name:src Committed By: nia Date: Sun Mar 28 17:52:09 UTC 2021 Modified Files: src/share/misc: acronyms.comp Log Message: DRM To generate a diff of this commit: cvs rdiff -u -r1.321 -r1.322 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: christos Date: Sun Mar 28 17:30:01 UTC 2021 Modified Files: src/tests/lib/libc/sys: t_sendrecv.c Log Message: yield so we can lose packets To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libc/sys/t_sendrecv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_sendrecv.c diff -u src/tests/lib/libc/sys/t_sendrecv.c:1.7 src/tests/lib/libc/sys/t_sendrecv.c:1.8 --- src/tests/lib/libc/sys/t_sendrecv.c:1.7 Sun Mar 21 12:58:07 2021 +++ src/tests/lib/libc/sys/t_sendrecv.c Sun Mar 28 13:30:01 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: t_sendrecv.c,v 1.7 2021/03/21 16:58:07 christos Exp $ */ +/* $NetBSD: t_sendrecv.c,v 1.8 2021/03/28 17:30:01 christos Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_sendrecv.c,v 1.7 2021/03/21 16:58:07 christos Exp $"); +__RCSID("$NetBSD: t_sendrecv.c,v 1.8 2021/03/28 17:30:01 christos Exp $"); #include #include @@ -40,6 +40,7 @@ __RCSID("$NetBSD: t_sendrecv.c,v 1.7 202 #include #include #include +#include #include #include @@ -94,6 +95,8 @@ receiver(int sd) return; if (p.seq != seq) printf("%ju != %ju\n", p.seq, seq); + if (seq % 10 == 0) +sched_yield(); seq = p.seq + 1; } // printf("<<%zd %d %ju\n", n, errno, seq);
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: christos Date: Sun Mar 28 17:30:01 UTC 2021 Modified Files: src/tests/lib/libc/sys: t_sendrecv.c Log Message: yield so we can lose packets To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libc/sys/t_sendrecv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/atf/dist/tools
Module Name:src Committed By: christos Date: Sun Mar 28 16:35:37 UTC 2021 Modified Files: src/external/bsd/atf/dist/tools: fs.cpp fs.hpp test-program.cpp Log Message: If we are running the test as an unprivileged user, hand ownership of the test directory to that user. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/tools/fs.cpp cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/tools/fs.hpp cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/tools/test-program.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/atf/dist/tools
Module Name:src Committed By: christos Date: Sun Mar 28 16:35:37 UTC 2021 Modified Files: src/external/bsd/atf/dist/tools: fs.cpp fs.hpp test-program.cpp Log Message: If we are running the test as an unprivileged user, hand ownership of the test directory to that user. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/atf/dist/tools/fs.cpp cvs rdiff -u -r1.2 -r1.3 src/external/bsd/atf/dist/tools/fs.hpp cvs rdiff -u -r1.3 -r1.4 src/external/bsd/atf/dist/tools/test-program.cpp 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/atf/dist/tools/fs.cpp diff -u src/external/bsd/atf/dist/tools/fs.cpp:1.4 src/external/bsd/atf/dist/tools/fs.cpp:1.5 --- src/external/bsd/atf/dist/tools/fs.cpp:1.4 Sat Nov 11 09:16:06 2017 +++ src/external/bsd/atf/dist/tools/fs.cpp Sun Mar 28 12:35:37 2021 @@ -683,6 +683,17 @@ impl::rmdir(const path& p) } } +void +impl::change_ownership(const path& p, const std::pair < int, int >& user) +{ +if (::chown(p.c_str(), user.first, user.second) == -1) { +std::stringstream ss; +ss << IMPL_NAME "::chown(" << p.str() << ", " << user.first << ", " + << user.second << ")"; +throw tools::system_error(ss.str(), "chown(2) failed", errno); +} +} + impl::path impl::change_directory(const path& dir) { Index: src/external/bsd/atf/dist/tools/fs.hpp diff -u src/external/bsd/atf/dist/tools/fs.hpp:1.2 src/external/bsd/atf/dist/tools/fs.hpp:1.3 --- src/external/bsd/atf/dist/tools/fs.hpp:1.2 Mon Mar 9 16:34:52 2020 +++ src/external/bsd/atf/dist/tools/fs.hpp Sun Mar 28 12:35:37 2021 @@ -368,6 +368,7 @@ void remove(const path&); void rmdir(const path&); tools::fs::path change_directory(const tools::fs::path&); +void change_ownership(const tools::fs::path&, const std::pair< int, int >&); void cleanup(const tools::fs::path&); tools::fs::path get_current_dir(void); Index: src/external/bsd/atf/dist/tools/test-program.cpp diff -u src/external/bsd/atf/dist/tools/test-program.cpp:1.3 src/external/bsd/atf/dist/tools/test-program.cpp:1.4 --- src/external/bsd/atf/dist/tools/test-program.cpp:1.3 Wed Dec 30 17:23:38 2015 +++ src/external/bsd/atf/dist/tools/test-program.cpp Sun Mar 28 12:35:37 2021 @@ -304,8 +304,10 @@ run_test_case_child(void* raw_params) const std::pair< int, int > user = tools::get_required_user( params->metadata, params->config); -if (user.first != -1 && user.second != -1) +if (user.first != -1 && user.second != -1) { +tools::fs::change_ownership(params->workdir, user); tools::user::drop_privileges(user); +} // The input 'tp' parameter may be relative and become invalid once // we change the current working directory.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Mar 28 16:28:15 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: init.c Log Message: lint: extract brace_level_subtype No functional change. To generate a diff of this commit: cvs rdiff -u -r1.165 -r1.166 src/usr.bin/xlint/lint1/init.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/xlint/lint1/init.c diff -u src/usr.bin/xlint/lint1/init.c:1.165 src/usr.bin/xlint/lint1/init.c:1.166 --- src/usr.bin/xlint/lint1/init.c:1.165 Sun Mar 28 16:19:21 2021 +++ src/usr.bin/xlint/lint1/init.c Sun Mar 28 16:28:15 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.165 2021/03/28 16:19:21 rillig Exp $ */ +/* $NetBSD: init.c,v 1.166 2021/03/28 16:28:15 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: init.c,v 1.165 2021/03/28 16:19:21 rillig Exp $"); +__RCSID("$NetBSD: init.c,v 1.166 2021/03/28 16:28:15 rillig Exp $"); #endif #include @@ -474,13 +474,15 @@ designation_shift_level(struct designati static struct brace_level * -brace_level_new(type_t *type, type_t *subtype, int remaining) +brace_level_new(type_t *type, type_t *subtype, int remaining, + struct brace_level *enclosing) { struct brace_level *level = xcalloc(1, sizeof(*level)); level->bl_type = type; level->bl_subtype = subtype; level->bl_remaining = remaining; + level->bl_enclosing = enclosing; return level; } @@ -526,6 +528,16 @@ brace_level_debug(const struct brace_lev #define brace_level_debug(level) do { } while (false) #endif +static type_t * +brace_level_subtype(struct brace_level *level) +{ + + if (level->bl_subtype != NULL) + return level->bl_subtype; + + return level->bl_type; +} + static void brace_level_set_array_dimension(struct brace_level *level, int dim) { @@ -776,7 +788,7 @@ initialization_init(struct initializatio in->initsym->s_type = duptyp(in->initsym->s_type); /* TODO: does 'duptyp' create a memory leak? */ - in->brace_level = brace_level_new(NULL, in->initsym->s_type, 1); + in->brace_level = brace_level_new(NULL, in->initsym->s_type, 1, NULL); initialization_debug(in); debug_leave(); @@ -867,10 +879,8 @@ initialization_push(struct initializatio level = in->brace_level; lint_assert(level->bl_remaining > 0); - in->brace_level = brace_level_new( - level->bl_subtype != NULL ? level->bl_subtype : level->bl_type, - NULL, 0); - in->brace_level->bl_enclosing = level; + in->brace_level = brace_level_new(brace_level_subtype(level), NULL, 0, + level); lint_assert(in->brace_level->bl_type != NULL); lint_assert(in->brace_level->bl_type->t_tspec != FUNC);