CVS commit: src/distrib/sets/lists
Module Name:src Committed By: pgoyette Date: Thu Oct 1 02:00:04 UTC 2020 Modified Files: src/distrib/sets/lists/debug: mi src/distrib/sets/lists/tests: mi Log Message: Fix up the debug stuff for if_tap and if_vether To generate a diff of this commit: cvs rdiff -u -r1.340 -r1.341 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.933 -r1.934 src/distrib/sets/lists/tests/mi 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/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.340 src/distrib/sets/lists/debug/mi:1.341 --- src/distrib/sets/lists/debug/mi:1.340 Tue Sep 29 18:33:23 2020 +++ src/distrib/sets/lists/debug/mi Thu Oct 1 02:00:04 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.340 2020/09/29 18:33:23 roy Exp $ +# $NetBSD: mi,v 1.341 2020/10/01 02:00:04 pgoyette Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib comp-sys-usr compatdir ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile @@ -2387,6 +2387,7 @@ ./usr/libdata/debug/usr/tests/net/if/ifconf.debug tests-net-debug debug,atf,rump ./usr/libdata/debug/usr/tests/net/if/t_compat.debug tests-net-debug debug,atf,rump ./usr/libdata/debug/usr/tests/net/if_loop/t_pr.debug tests-net-debug debug,atf,rump +./usr/libdata/debug/usr/tests/net/if_tap/rump_open_tap.debug tests-net-debug debug,atf,rump ./usr/libdata/debug/usr/tests/net/if_vlan/siocXmulti.debug tests-net-debug debug,atf,rump ./usr/libdata/debug/usr/tests/net/in_cksum/in_cksum.debug tests-net-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/net/ipsec/natt_terminator.debug tests-net-debug debug,atf,rump Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.933 src/distrib/sets/lists/tests/mi:1.934 --- src/distrib/sets/lists/tests/mi:1.933 Wed Sep 30 14:54:33 2020 +++ src/distrib/sets/lists/tests/mi Thu Oct 1 02:00:04 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.933 2020/09/30 14:54:33 roy Exp $ +# $NetBSD: mi,v 1.934 2020/10/01 02:00:04 pgoyette Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -167,6 +167,8 @@ ./usr/libdata/debug/usr/tests/net/icmp tests-net-debug compattestfile,atf ./usr/libdata/debug/usr/tests/net/if tests-net-debug compattestfile,atf ./usr/libdata/debug/usr/tests/net/if_loop tests-net-debug compattestfile,atf +./usr/libdata/debug/usr/tests/net/if_tap tests-net-debug compattestfile,atf +./usr/libdata/debug/usr/tests/net/if_vether tests-net-debug compattestfile,atf ./usr/libdata/debug/usr/tests/net/if_vlan tests-net-debug compattestfile,atf ./usr/libdata/debug/usr/tests/net/in_cksum tests-net-debug compattestfile,atf ./usr/libdata/debug/usr/tests/net/ipsec tests-net-debug compattestfile,atf
CVS commit: src/sys/arch/arm/broadcom
Module Name:src Committed By: jmcneill Date: Wed Sep 30 23:58:13 UTC 2020 Modified Files: src/sys/arch/arm/broadcom: bcm2835_dmac.c Log Message: Fix off-by-one in channel count, from Mark Millard. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/broadcom/bcm2835_dmac.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/broadcom/bcm2835_dmac.c diff -u src/sys/arch/arm/broadcom/bcm2835_dmac.c:1.16 src/sys/arch/arm/broadcom/bcm2835_dmac.c:1.17 --- src/sys/arch/arm/broadcom/bcm2835_dmac.c:1.16 Sun Dec 10 21:38:26 2017 +++ src/sys/arch/arm/broadcom/bcm2835_dmac.c Wed Sep 30 23:58:13 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm2835_dmac.c,v 1.16 2017/12/10 21:38:26 skrll Exp $ */ +/* $NetBSD: bcm2835_dmac.c,v 1.17 2020/09/30 23:58:13 jmcneill Exp $ */ /*- * Copyright (c) 2014 Jared D. McNeill @@ -29,7 +29,7 @@ #include "opt_ddb.h" #include -__KERNEL_RCSID(0, "$NetBSD: bcm2835_dmac.c,v 1.16 2017/12/10 21:38:26 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bcm2835_dmac.c,v 1.17 2020/09/30 23:58:13 jmcneill Exp $"); #include #include @@ -142,7 +142,7 @@ bcm_dmac_attach(device_t parent, device_ mutex_init(>sc_lock, MUTEX_DEFAULT, IPL_SCHED); - sc->sc_nchannels = 31 - __builtin_clz(sc->sc_channelmask); + sc->sc_nchannels = 32 - __builtin_clz(sc->sc_channelmask); sc->sc_channels = kmem_alloc( sizeof(*sc->sc_channels) * sc->sc_nchannels, KM_SLEEP);
CVS commit: src/etc/mtree
Module Name:src Committed By: roy Date: Wed Sep 30 20:20:53 UTC 2020 Modified Files: src/etc/mtree: NetBSD.dist.tests Log Message: Add if_tap directory for DEBUG builds. To generate a diff of this commit: cvs rdiff -u -r1.179 -r1.180 src/etc/mtree/NetBSD.dist.tests Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/NetBSD.dist.tests diff -u src/etc/mtree/NetBSD.dist.tests:1.179 src/etc/mtree/NetBSD.dist.tests:1.180 --- src/etc/mtree/NetBSD.dist.tests:1.179 Wed Sep 30 08:32:00 2020 +++ src/etc/mtree/NetBSD.dist.tests Wed Sep 30 20:20:53 2020 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.tests,v 1.179 2020/09/30 08:32:00 martin Exp $ +# $NetBSD: NetBSD.dist.tests,v 1.180 2020/09/30 20:20:53 roy Exp $ ./usr/libdata/debug/usr/tests ./usr/libdata/debug/usr/tests/atf @@ -147,6 +147,8 @@ ./usr/libdata/debug/usr/tests/net/icmp ./usr/libdata/debug/usr/tests/net/if ./usr/libdata/debug/usr/tests/net/if_loop +./usr/libdata/debug/usr/tests/net/if_tap +./usr/libdata/debug/usr/tests/net/if_vether ./usr/libdata/debug/usr/tests/net/if_vlan ./usr/libdata/debug/usr/tests/net/in_cksum ./usr/libdata/debug/usr/tests/net/ipsec
CVS commit: src/bin/csh
Module Name:src Committed By: christos Date: Wed Sep 30 17:51:10 UTC 2020 Modified Files: src/bin/csh: lex.c Log Message: Fix % set x='a/b c/d.e' % echo $x:q:h To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/bin/csh/lex.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/csh/lex.c diff -u src/bin/csh/lex.c:1.36 src/bin/csh/lex.c:1.37 --- src/bin/csh/lex.c:1.36 Sat Aug 8 20:34:21 2020 +++ src/bin/csh/lex.c Wed Sep 30 13:51:10 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: lex.c,v 1.36 2020/08/09 00:34:21 dholland Exp $ */ +/* $NetBSD: lex.c,v 1.37 2020/09/30 17:51:10 christos Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)lex.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: lex.c,v 1.36 2020/08/09 00:34:21 dholland Exp $"); +__RCSID("$NetBSD: lex.c,v 1.37 2020/09/30 17:51:10 christos Exp $"); #endif #endif /* not lint */ @@ -998,28 +998,26 @@ domod(Char *cp, int type) return (wp); case 'h': case 't': - if (!any(short2str(cp), '/')) - return (type == 't' ? Strsave(cp) : 0); - wp = Strend(cp); - while (*--wp != '/') - continue; - if (type == 'h') - xp = Strsave(cp), xp[wp - cp] = 0; - else + wp = Strrchr(cp, '/'); + if (wp == NULL) + return Strsave(type == 't' ? cp : STRNULL); + if (type == 't') xp = Strsave(wp + 1); + else + xp = Strsave(cp), xp[wp - cp] = 0; return (xp); + case 'e': case 'r': - wp = Strend(cp); - for (wp--; wp >= cp && *wp != '/'; wp--) - if (*wp == '.') { - if (type == 'e') - xp = Strsave(wp + 1); - else - xp = Strsave(cp), xp[wp - cp] = 0; - return (xp); - } - return (Strsave(type == 'e' ? STRNULL : cp)); + wp = Strrchr(cp, '.'); + if (wp == NULL) + return Strsave(type == 'r' ? cp : STRNULL); + if (type == 'e') + xp = Strsave(wp + 1); + else + xp = Strsave(cp), xp[wp - cp] = 0; + return (xp); + default: break; }
CVS commit: src/tests/net/if_tap
Module Name:src Committed By: roy Date: Wed Sep 30 17:14:11 UTC 2020 Modified Files: src/tests/net/if_tap: Makefile Log Message: Be like other tests and speciy the binary name we install To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/net/if_tap/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/if_tap/Makefile diff -u src/tests/net/if_tap/Makefile:1.4 src/tests/net/if_tap/Makefile:1.5 --- src/tests/net/if_tap/Makefile:1.4 Wed Sep 30 17:05:59 2020 +++ src/tests/net/if_tap/Makefile Wed Sep 30 17:14:11 2020 @@ -1,15 +1,15 @@ -# $NetBSD: Makefile,v 1.4 2020/09/30 17:05:59 roy Exp $ +# $NetBSD: Makefile,v 1.5 2020/09/30 17:14:11 roy Exp $ # .include -PROG= rump_open_tap -MAN= # empty -DPADD= ${LIBRUMPRES} -LDADD= -lrumpres -BINDIR= ${TESTSDIR} +PROG= rump_open_tap +MAN= # empty +DPADD= ${LIBRUMPRES} +LDADD= -lrumpres +BINDIR.rump_open_tap= ${TESTSDIR} -TESTSDIR= ${TESTSBASE}/net/if_tap +TESTSDIR= ${TESTSBASE}/net/if_tap .for name in tap TESTS_SH+= t_${name}
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: christos Date: Wed Sep 30 17:11:31 UTC 2020 Modified Files: src/distrib/sets/lists/comp: md.amd64 Log Message: Add missing lint library To generate a diff of this commit: cvs rdiff -u -r1.283 -r1.284 src/distrib/sets/lists/comp/md.amd64 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/md.amd64 diff -u src/distrib/sets/lists/comp/md.amd64:1.283 src/distrib/sets/lists/comp/md.amd64:1.284 --- src/distrib/sets/lists/comp/md.amd64:1.283 Sat Sep 26 13:49:49 2020 +++ src/distrib/sets/lists/comp/md.amd64 Wed Sep 30 13:11:31 2020 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.283 2020/09/26 17:49:49 jmcneill Exp $ +# $NetBSD: md.amd64,v 1.284 2020/09/30 17:11:31 christos Exp $ ./usr/include/amd64comp-c-include ./usr/include/amd64/ansi.h comp-c-include ./usr/include/amd64/aout_machdep.h comp-c-include @@ -1269,6 +1269,7 @@ ./usr/libdata/ldscripts/i386nbsd.xn comp-obsolete obsolete ./usr/libdata/ldscripts/i386nbsd.xr comp-obsolete obsolete ./usr/libdata/ldscripts/i386nbsd.xu comp-obsolete obsolete +./usr/libdata/lint/llib-lx86_64.ln comp-c-lintlib lint ./usr/share/ldscripts/elf_i386.x comp-obsolete obsolete ./usr/share/ldscripts/elf_i386.xbn comp-obsolete obsolete ./usr/share/ldscripts/elf_i386.xc comp-obsolete obsolete
CVS commit: src/tests/net/if_tap
Module Name:src Committed By: roy Date: Wed Sep 30 17:05:59 UTC 2020 Modified Files: src/tests/net/if_tap: Makefile Log Message: Fix prior To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/net/if_tap/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/if_tap/Makefile diff -u src/tests/net/if_tap/Makefile:1.3 src/tests/net/if_tap/Makefile:1.4 --- src/tests/net/if_tap/Makefile:1.3 Wed Sep 30 14:43:15 2020 +++ src/tests/net/if_tap/Makefile Wed Sep 30 17:05:59 2020 @@ -1,12 +1,13 @@ -# $NetBSD: Makefile,v 1.3 2020/09/30 14:43:15 roy Exp $ +# $NetBSD: Makefile,v 1.4 2020/09/30 17:05:59 roy Exp $ # .include PROG= rump_open_tap -MAN= +MAN= # empty DPADD= ${LIBRUMPRES} LDADD= -lrumpres +BINDIR= ${TESTSDIR} TESTSDIR= ${TESTSBASE}/net/if_tap
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: skrll Date: Wed Sep 30 16:47:55 UTC 2020 Modified Files: src/sys/arch/aarch64/aarch64: aarch64_machdep.c Log Message: Improve a comment To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/arch/aarch64/aarch64/aarch64_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/aarch64_machdep.c diff -u src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.48 src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.49 --- src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.48 Wed Sep 16 18:26:15 2020 +++ src/sys/arch/aarch64/aarch64/aarch64_machdep.c Wed Sep 30 16:47:55 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: aarch64_machdep.c,v 1.48 2020/09/16 18:26:15 skrll Exp $ */ +/* $NetBSD: aarch64_machdep.c,v 1.49 2020/09/30 16:47:55 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.48 2020/09/16 18:26:15 skrll Exp $"); +__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.49 2020/09/30 16:47:55 skrll Exp $"); #include "opt_arm_debug.h" #include "opt_cpuoptions.h" @@ -251,11 +251,10 @@ initarm_common(vaddr_t kvm_base, vsize_t #ifdef MODULAR /* - * aarch64 compiler (gcc & llvm) uses R_AARCH_CALL26/R_AARCH_JUMP26 - * for function calling/jumping. - * (at this time, both compilers doesn't support -mlong-calls) - * therefore kernel modules should be loaded within maximum 26bit word, - * or +-128MB from kernel. + * The aarch64 compilers (gcc & llvm) use R_AARCH_CALL26/R_AARCH_JUMP26 + * for function calls (bl)/jumps(b). At this time, neither compiler + * supports -mlong-calls therefore the kernel modules should be loaded + * within the maximum range of +/-128MB from kernel text. */ #define MODULE_RESERVED_MAX (1024 * 1024 * 128) #define MODULE_RESERVED_SIZE (1024 * 1024 * 32) /* good enough? */
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: skrll Date: Wed Sep 30 16:35:49 UTC 2020 Modified Files: src/sys/arch/aarch64/aarch64: cpuswitch.S vectors.S Log Message: Move el[01]_trap_exit into vectors.S where the callers exist To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/aarch64/aarch64/cpuswitch.S cvs rdiff -u -r1.18 -r1.19 src/sys/arch/aarch64/aarch64/vectors.S 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/aarch64/aarch64/cpuswitch.S diff -u src/sys/arch/aarch64/aarch64/cpuswitch.S:1.27 src/sys/arch/aarch64/aarch64/cpuswitch.S:1.28 --- src/sys/arch/aarch64/aarch64/cpuswitch.S:1.27 Sat Sep 26 06:09:33 2020 +++ src/sys/arch/aarch64/aarch64/cpuswitch.S Wed Sep 30 16:35:49 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuswitch.S,v 1.27 2020/09/26 06:09:33 skrll Exp $ */ +/* $NetBSD: cpuswitch.S,v 1.28 2020/09/30 16:35:49 skrll Exp $ */ /*- * Copyright (c) 2014, 2020 The NetBSD Foundation, Inc. @@ -31,6 +31,7 @@ #include #include + #include "assym.h" #include "opt_compat_netbsd32.h" @@ -38,7 +39,7 @@ #include "opt_ddb.h" #include "opt_kasan.h" -RCSID("$NetBSD: cpuswitch.S,v 1.27 2020/09/26 06:09:33 skrll Exp $") +RCSID("$NetBSD: cpuswitch.S,v 1.28 2020/09/30 16:35:49 skrll Exp $") ARMV8_DEFINE_OPTIONS @@ -304,143 +305,6 @@ ENTRY_NP(lwp_trampoline) br x16 /* call function with arg */ END(lwp_trampoline) - .macro unwind_x0_x2 - ldp x0, x1, [sp, #TF_X0] - ldr x2, [sp, #TF_X2] - .endm - - .macro unwind_x3_x30 - ldp x3, x4, [sp, #TF_X3] - ldp x5, x6, [sp, #TF_X5] - ldp x7, x8, [sp, #TF_X7] - ldp x9, x10, [sp, #TF_X9] - ldp x11, x12, [sp, #TF_X11] - ldp x13, x14, [sp, #TF_X13] - ldp x15, x16, [sp, #TF_X15] - ldp x17, x18, [sp, #TF_X17] - ldp x19, x20, [sp, #TF_X19] - ldp x21, x22, [sp, #TF_X21] - ldp x23, x24, [sp, #TF_X23] - ldp x25, x26, [sp, #TF_X25] - ldp x27, x28, [sp, #TF_X27] - ldp x29, x30, [sp, #TF_X29] - .endm - -/* - * EL1 exception return for trap and interrupt. - */ -#ifdef DDB -ENTRY_NP(el1_trap) - nop/* dummy for DDB backtrace (for lr-4) */ -#endif -ENTRY_NP(el1_trap_exit) - DISABLE_INTERRUPT /* make sure I|F marked */ - - unwind_x3_x30 - -#if TF_PC + 8 == TF_SPSR - ldp x0, x1, [sp, #TF_PC] -#else - ldr x0, [sp, #TF_PC] - ldr x1, [sp, #TF_SPSR] -#endif - msr elr_el1, x0 /* exception pc */ - msr spsr_el1, x1 /* exception pstate */ - - /* - * cpu_jump_onfault() modify tf->tf_sp, therefore - * we need to restore sp from trapframe, - * and unwind x0-x2 without sp. - */ - mov x0, sp - ldr x1, [x0, #TF_SP] - mov sp, x1 - ldp x1, x2, [x0, #TF_X1] - ldr x0, [x0, #TF_X0] - - ERET -END(el1_trap_exit) -#ifdef DDB -END(el1_trap) -#endif - -/* - * EL0 exception return for trap, interrupt and syscall with - * possible AST processing. - */ -#ifdef DDB -ENTRY_NP(el0_trap) - nop/* dummy for DDB backtrace (for lr-4) */ -#endif -ENTRY_NP(el0_trap_exit) - DISABLE_INTERRUPT /* make sure I|F marked */ -1: - /* while (curlwp->l_md.md_astpending != 0) { */ - mrs x8, tpidr_el1 - ldr w9, [x8, #L_MD_ASTPENDING] - cbz w9, 9f - - /* curlwp->l_md.md_astpending = 0; */ - str xzr, [x8, #L_MD_ASTPENDING] - - /* trap_doast(tf); */ - ENABLE_INTERRUPT - mov x0, sp - bl _C_LABEL(trap_doast) - DISABLE_INTERRUPT - b 1b - /* } */ -9: - - mrs x9, tpidr_el1 - ldr x23, [x9, #L_MD_CPACR] - msr cpacr_el1, x23 /* FP unit EL0 handover */ - isb/* necessary? */ - - ldr x0, [x9, #L_PRIVATE] /* tpidr_el0 = curlwp->l_private */ - msr tpidr_el0, x0 -#ifdef COMPAT_NETBSD32 - msr tpidrro_el0, x0 -#endif - -#ifdef ARMV83_PAC - /* Switch to the user PAC key. */ - adrl x4, _C_LABEL(aarch64_pac_enabled) - ldr w4, [x4] - cbz w4, 1f - ldp x5, x6, [x9, #L_MD_IA_USER] - msr APIAKeyLo_EL1, x5 - msr APIAKeyHi_EL1, x6 -1: -#endif - - unwind_x3_x30 - -#if TF_PC + 8 == TF_SPSR - ldp x0, x1, [sp, #TF_PC] -#else - ldr x0, [sp, #TF_PC] - ldr x1, [sp, #TF_SPSR] -#endif - ldr x2, [sp, #TF_SP] - msr elr_el1, x0 /* exception pc */ - msr spsr_el1, x1 /* exception pstate */ - msr sp_el0, x2 /* restore EL0 stack */ - - /* if the process is traced, enable MDSCR_EL1.SS */ - tbz x1, #SPSR_SS_SHIFT, 1f - mrs x0, mdscr_el1 - orr x0, x0, #MDSCR_SS - msr mdscr_el1, x0 -1: - unwind_x0_x2 - - /* leave sp at l_md.md_utf, return back to EL0 user process */ - ERET -END(el0_trap_exit) -#ifdef DDB -END(el0_trap) -#endif #ifdef DDB ENTRY_NP(cpu_Debugger) Index: src/sys/arch/aarch64/aarch64/vectors.S diff -u src/sys/arch/aarch64/aarch64/vectors.S:1.18 src/sys/arch/aarch64/aarch64/vectors.S:1.19 --- src/sys/arch/aarch64/aarch64/vectors.S:1.18 Wed Aug 12 13:19:35 2020 +++ src/sys/arch/aarch64/aarch64/vectors.S Wed Sep 30 16:35:49 2020 @@ -1,11 +1,16 @@ -/* $NetBSD: vectors.S,v 1.18 2020/08/12 13:19:35 skrll Exp $ */ +/* $NetBSD: vectors.S,v 1.19 2020/09/30 16:35:49 skrll Exp $ */ #include +#include + #include "assym.h" + #include "opt_cpuoptions.h" #include "opt_ddb.h" #include
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Wed Sep 30 14:56:34 UTC 2020 Modified Files: src/sys/dev/ic: com.c Log Message: Set sc_fifolen=1 for the no fifo case To generate a diff of this commit: cvs rdiff -u -r1.360 -r1.361 src/sys/dev/ic/com.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/com.c diff -u src/sys/dev/ic/com.c:1.360 src/sys/dev/ic/com.c:1.361 --- src/sys/dev/ic/com.c:1.360 Mon Sep 28 11:33:15 2020 +++ src/sys/dev/ic/com.c Wed Sep 30 14:56:34 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: com.c,v 1.360 2020/09/28 11:33:15 jmcneill Exp $ */ +/* $NetBSD: com.c,v 1.361 2020/09/30 14:56:34 jmcneill Exp $ */ /*- * Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.360 2020/09/28 11:33:15 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.361 2020/09/30 14:56:34 jmcneill Exp $"); #include "opt_com.h" #include "opt_ddb.h" @@ -543,6 +543,7 @@ com_attach_subr(struct com_softc *sc) DW_APB_UART_CPR); sc->sc_fifolen = __SHIFTOUT(cpr, UART_CPR_FIFO_MODE) * 16; if (sc->sc_fifolen == 0) { + sc->sc_fifolen = 1; fifo_msg = "DesignWare APB UART, no fifo"; CSR_WRITE_1(regsp, COM_REG_FIFO, 0); } else {
CVS commit: src/distrib/sets/lists/tests
Module Name:src Committed By: roy Date: Wed Sep 30 14:54:33 UTC 2020 Modified Files: src/distrib/sets/lists/tests: mi Log Message: Add rump_open_tap To generate a diff of this commit: cvs rdiff -u -r1.932 -r1.933 src/distrib/sets/lists/tests/mi 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/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.932 src/distrib/sets/lists/tests/mi:1.933 --- src/distrib/sets/lists/tests/mi:1.932 Tue Sep 29 19:41:48 2020 +++ src/distrib/sets/lists/tests/mi Wed Sep 30 14:54:33 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.932 2020/09/29 19:41:48 roy Exp $ +# $NetBSD: mi,v 1.933 2020/09/30 14:54:33 roy Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -3857,6 +3857,7 @@ ./usr/tests/net/if_tap tests-net-tests compattestfile,atf ./usr/tests/net/if_tap/Atffiletests-net-tests atf,rump ./usr/tests/net/if_tap/Kyuafiletests-net-tests atf,rump,kyua +./usr/tests/net/if_tap/rump_open_tap tests-net-tests atf,rump ./usr/tests/net/if_tap/t_taptests-net-tests atf,rump ./usr/tests/net/if_tun tests-net-tests compattestfile,atf ./usr/tests/net/if_tun/Atffiletests-net-tests atf,rump
CVS commit: src/tests/net/if_tap
Module Name:src Committed By: roy Date: Wed Sep 30 14:43:15 UTC 2020 Modified Files: src/tests/net/if_tap: Makefile t_tap.sh Added Files: src/tests/net/if_tap: rump_open_tap.c Log Message: tap(4): update the test so that we can open the tap to ping across a bridge ping with tap closed to ensure it fails ping with tap open to ensure it works To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/net/if_tap/Makefile cvs rdiff -u -r0 -r1.1 src/tests/net/if_tap/rump_open_tap.c cvs rdiff -u -r1.10 -r1.11 src/tests/net/if_tap/t_tap.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/if_tap/Makefile diff -u src/tests/net/if_tap/Makefile:1.2 src/tests/net/if_tap/Makefile:1.3 --- src/tests/net/if_tap/Makefile:1.2 Fri Nov 25 08:51:16 2016 +++ src/tests/net/if_tap/Makefile Wed Sep 30 14:43:15 2020 @@ -1,8 +1,13 @@ -# $NetBSD: Makefile,v 1.2 2016/11/25 08:51:16 ozaki-r Exp $ +# $NetBSD: Makefile,v 1.3 2020/09/30 14:43:15 roy Exp $ # .include +PROG= rump_open_tap +MAN= +DPADD= ${LIBRUMPRES} +LDADD= -lrumpres + TESTSDIR= ${TESTSBASE}/net/if_tap .for name in tap Index: src/tests/net/if_tap/t_tap.sh diff -u src/tests/net/if_tap/t_tap.sh:1.10 src/tests/net/if_tap/t_tap.sh:1.11 --- src/tests/net/if_tap/t_tap.sh:1.10 Mon Aug 19 03:22:05 2019 +++ src/tests/net/if_tap/t_tap.sh Wed Sep 30 14:43:15 2020 @@ -1,4 +1,4 @@ -# $NetBSD: t_tap.sh,v 1.10 2019/08/19 03:22:05 ozaki-r Exp $ +# $NetBSD: t_tap.sh,v 1.11 2020/09/30 14:43:15 roy Exp $ # # Copyright (c) 2016 Internet Initiative Japan Inc. # All rights reserved. @@ -34,6 +34,7 @@ IP4_REMOTE=10.0.0.3 IP6_LOCAL=fc00::1 IP6_TAP=fc00::2 IP6_REMOTE=fc00::3 +TAP_PID=./.__tap.pid DEBUG=${DEBUG:-false} TIMEOUT=1 @@ -130,6 +131,7 @@ tap_bridged_head() tap_bridged_body() { + local src="$(atf_get_srcdir)" rump_server_fs_start $SOCK_LOCAL netinet6 tap bridge rump_server_fs_start $SOCK_REMOTE netinet6 tap @@ -146,7 +148,6 @@ tap_bridged_body() atf_check -s exit:0 rump.ifconfig tap0 $IP4_TAP atf_check -s exit:0 rump.ifconfig tap0 inet6 $IP6_TAP atf_check -s exit:0 rump.ifconfig tap0 up - atf_check -s exit:0 rump.ifconfig -w 10 rump_server_add_iface $SOCK_LOCAL bridge0 atf_check -s exit:0 rump.ifconfig bridge0 up @@ -155,6 +156,8 @@ tap_bridged_body() atf_check -s exit:0 brconfig bridge0 add tap0 unset LD_PRELOAD + atf_check -s exit:0 rump.ifconfig -w 10 + export RUMP_SERVER=${SOCK_REMOTE} atf_check -s exit:0 rump.ifconfig shmif0 $IP4_REMOTE @@ -162,10 +165,22 @@ tap_bridged_body() atf_check -s exit:0 rump.ifconfig shmif0 up atf_check -s exit:0 rump.ifconfig -w 10 + # shmif0 on the server bridge is active, we expect this to work atf_check -s exit:0 -o ignore rump.ping -n -w $TIMEOUT -c 1 $IP4_LOCAL - atf_check -s exit:0 -o ignore rump.ping -n -w $TIMEOUT -c 1 $IP4_TAP - atf_check -s exit:0 -o ignore rump.ping6 -n -X $TIMEOUT -c 1 $IP6_LOCAL + + # The tap is not open, we expect this to fail + atf_check -s not-exit:0 -o ignore rump.ping -n -w $TIMEOUT -c 1 $IP4_TAP + atf_check -s not-exit:0 -o ignore rump.ping6 -n -X $TIMEOUT -c 1 $IP6_TAP + + # Open the tap on the server + export RUMP_SERVER=${SOCK_LOCAL} + atf_check -s exit:0 "$src"/rump_open_tap /dev/tap0 $TAP_PID + atf_check -s exit:0 rump.ifconfig -w 10 + + # Now we can ping the tap address + export RUMP_SERVER=${SOCK_LOCAL} + atf_check -s exit:0 -o ignore rump.ping -n -w $TIMEOUT -c 1 $IP4_TAP atf_check -s exit:0 -o ignore rump.ping6 -n -X $TIMEOUT -c 1 $IP6_TAP rump_server_destroy_ifaces @@ -174,6 +189,11 @@ tap_bridged_body() tap_bridged_cleanup() { +if [ -f $TAP_PID ]; then + kill -9 $(cat $TAP_PID) + rm -f $TAP_PID + sleep 1 + fi $DEBUG && dump cleanup } Added files: Index: src/tests/net/if_tap/rump_open_tap.c diff -u /dev/null src/tests/net/if_tap/rump_open_tap.c:1.1 --- /dev/null Wed Sep 30 14:43:15 2020 +++ src/tests/net/if_tap/rump_open_tap.c Wed Sep 30 14:43:15 2020 @@ -0,0 +1,79 @@ +/* $NetBSD: rump_open_tap.c,v 1.1 2020/09/30 14:43:15 roy Exp $ */ + +/* + * Copyright (c) 2020 The NetBSD Foundation, Inc. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Roy Marples. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: ryo Date: Wed Sep 30 08:43:47 UTC 2020 Modified Files: src/sys/arch/aarch64/aarch64: procfs_machdep.c Log Message: add linux compatible /proc/cpuinfo To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/aarch64/aarch64/procfs_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/procfs_machdep.c diff -u src/sys/arch/aarch64/aarch64/procfs_machdep.c:1.1 src/sys/arch/aarch64/aarch64/procfs_machdep.c:1.2 --- src/sys/arch/aarch64/aarch64/procfs_machdep.c:1.1 Sun Aug 10 05:47:37 2014 +++ src/sys/arch/aarch64/aarch64/procfs_machdep.c Wed Sep 30 08:43:47 2020 @@ -1,12 +1,9 @@ -/* $NetBSD: procfs_machdep.c,v 1.1 2014/08/10 05:47:37 matt Exp $ */ +/* $NetBSD: procfs_machdep.c,v 1.2 2020/09/30 08:43:47 ryo Exp $ */ /*- - * Copyright (c) 2014 The NetBSD Foundation, Inc. + * Copyright (c) 2020 Ryo Shimizu * All rights reserved. * - * This code is derived from software contributed to The NetBSD Foundation - * by Matt Thomas of 3am Software Foundry. - * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -16,39 +13,202 @@ *notice, this list of conditions and the following disclaimer in the *documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 THE FOUNDATION 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 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.1 2014/08/10 05:47:37 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.2 2020/09/30 08:43:47 ryo Exp $"); #include -#include -#include -#include -#include -#include - #include +#include + + +/* use variables named 'buf', 'left', 'total' */ +#define FORWARD_BUF(_len) \ + do { \ + total += _len; \ + if (_len < left) {\ + buf += _len;\ + left -= _len;\ + } else { \ + buf += left;\ + left = 0;\ + } \ + } while (0 /*CONSTCOND*/) + +#define OUTPUT_BUF(fmt, args...)\ + do { \ + size_t l = snprintf(buf, left, fmt, ## args); \ + FORWARD_BUF(l); \ + } while (0/*CONSTCOND*/) + +static int +procfs_cpuinfo_features(struct cpu_info *ci, char *buf, int buflen) +{ + uint64_t isar0, isar1, mmfr2, pfr0, pfr1; + size_t left, total; + + isar0 = ci->ci_id.ac_aa64isar0; + isar1 = ci->ci_id.ac_aa64isar1; + mmfr2 = ci->ci_id.ac_aa64mmfr2; + pfr0 = ci->ci_id.ac_aa64pfr0; + pfr1 = ci->ci_id.ac_aa64pfr1; + + left = buflen; + total = 0; + + /* + * I don't know if we need to mimic the order of HWCAP in linux + */ + OUTPUT_BUF("Features\t:"); +#define SO_EQ(reg, mask, val) (__SHIFTOUT((reg), (mask)) == (val)) + if (SO_EQ(pfr0, ID_AA64PFR0_EL1_FP, ID_AA64PFR0_EL1_FP_IMPL)) + OUTPUT_BUF(" fp"); + if (SO_EQ(pfr0, ID_AA64PFR0_EL1_ADVSIMD, ID_AA64PFR0_EL1_ADV_SIMD_IMPL)) + OUTPUT_BUF(" asimd"); + /* notyet: " evtstrm" */ + if (SO_EQ(isar0, ID_AA64ISAR0_EL1_AES, ID_AA64ISAR0_EL1_AES_AES)) + OUTPUT_BUF(" aes"); + if (SO_EQ(isar0, ID_AA64ISAR0_EL1_AES, ID_AA64ISAR0_EL1_AES_PMUL)) + OUTPUT_BUF(" pmull"); + if (SO_EQ(isar0, ID_AA64ISAR0_EL1_SHA1, + ID_AA64ISAR0_EL1_SHA1_SHA1CPMHSU)) + OUTPUT_BUF(" sha1"); + if (SO_EQ(isar0, ID_AA64ISAR0_EL1_SHA2, + ID_AA64ISAR0_EL1_SHA2_SHA256HSU)) + OUTPUT_BUF(" sha2"); + if (SO_EQ(isar0, ID_AA64ISAR0_EL1_CRC32, ID_AA64ISAR0_EL1_CRC32_CRC32X)) + OUTPUT_BUF(" crc32"); + if
CVS commit: src/sys/arch/aarch64/include
Module Name:src Committed By: ryo Date: Wed Sep 30 08:40:49 UTC 2020 Modified Files: src/sys/arch/aarch64/include: armreg.h Log Message: add some fields of ID_AA64ISAR1_EL1 definition (ARMv8.6) To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/arch/aarch64/include/armreg.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/aarch64/include/armreg.h diff -u src/sys/arch/aarch64/include/armreg.h:1.53 src/sys/arch/aarch64/include/armreg.h:1.54 --- src/sys/arch/aarch64/include/armreg.h:1.53 Tue Sep 15 09:28:21 2020 +++ src/sys/arch/aarch64/include/armreg.h Wed Sep 30 08:40:49 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: armreg.h,v 1.53 2020/09/15 09:28:21 ryo Exp $ */ +/* $NetBSD: armreg.h,v 1.54 2020/09/30 08:40:49 ryo Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -307,6 +307,15 @@ AARCH64REG_READ_INLINE(id_aa64isar0_el1) AARCH64REG_READ_INLINE(id_aa64isar1_el1) +#define ID_AA64ISAR1_EL1_I8MM __BITS(55,52) +#define ID_AA64ISAR1_EL1_I8MM_NONE 0 +#define ID_AA64ISAR1_EL1_I8MM_SUPPORTED 1 +#define ID_AA64ISAR1_EL1_DGH __BITS(51,48) +#define ID_AA64ISAR1_EL1_DGH_NONE 0 +#define ID_AA64ISAR1_EL1_DGH_SUPPORTED 1 +#define ID_AA64ISAR1_EL1_BF16 __BITS(47,44) +#define ID_AA64ISAR1_EL1_BF16_NONE 0 +#define ID_AA64ISAR1_EL1_BF16_BFDOT 1 #define ID_AA64ISAR1_EL1_SPECRES __BITS(43,40) #define ID_AA64ISAR1_EL1_SPECRES_NONE 0 #define ID_AA64ISAR1_EL1_SPECRES_SUPPORTED 1
CVS commit: src/etc/mtree
Module Name:src Committed By: martin Date: Wed Sep 30 08:32:00 UTC 2020 Modified Files: src/etc/mtree: NetBSD.dist.tests Log Message: Revert previous - test is a shell script, no debug info installed To generate a diff of this commit: cvs rdiff -u -r1.178 -r1.179 src/etc/mtree/NetBSD.dist.tests Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/NetBSD.dist.tests diff -u src/etc/mtree/NetBSD.dist.tests:1.178 src/etc/mtree/NetBSD.dist.tests:1.179 --- src/etc/mtree/NetBSD.dist.tests:1.178 Wed Sep 30 08:21:27 2020 +++ src/etc/mtree/NetBSD.dist.tests Wed Sep 30 08:32:00 2020 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.tests,v 1.178 2020/09/30 08:21:27 martin Exp $ +# $NetBSD: NetBSD.dist.tests,v 1.179 2020/09/30 08:32:00 martin Exp $ ./usr/libdata/debug/usr/tests ./usr/libdata/debug/usr/tests/atf @@ -147,7 +147,6 @@ ./usr/libdata/debug/usr/tests/net/icmp ./usr/libdata/debug/usr/tests/net/if ./usr/libdata/debug/usr/tests/net/if_loop -./usr/libdata/debug/usr/tests/net/if_vether ./usr/libdata/debug/usr/tests/net/if_vlan ./usr/libdata/debug/usr/tests/net/in_cksum ./usr/libdata/debug/usr/tests/net/ipsec
CVS commit: src/etc/mtree
Module Name:src Committed By: martin Date: Wed Sep 30 08:21:27 UTC 2020 Modified Files: src/etc/mtree: NetBSD.dist.tests Log Message: Add if_vether debug dir To generate a diff of this commit: cvs rdiff -u -r1.177 -r1.178 src/etc/mtree/NetBSD.dist.tests Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/NetBSD.dist.tests diff -u src/etc/mtree/NetBSD.dist.tests:1.177 src/etc/mtree/NetBSD.dist.tests:1.178 --- src/etc/mtree/NetBSD.dist.tests:1.177 Wed Sep 30 07:55:31 2020 +++ src/etc/mtree/NetBSD.dist.tests Wed Sep 30 08:21:27 2020 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.tests,v 1.177 2020/09/30 07:55:31 mrg Exp $ +# $NetBSD: NetBSD.dist.tests,v 1.178 2020/09/30 08:21:27 martin Exp $ ./usr/libdata/debug/usr/tests ./usr/libdata/debug/usr/tests/atf @@ -147,6 +147,7 @@ ./usr/libdata/debug/usr/tests/net/icmp ./usr/libdata/debug/usr/tests/net/if ./usr/libdata/debug/usr/tests/net/if_loop +./usr/libdata/debug/usr/tests/net/if_vether ./usr/libdata/debug/usr/tests/net/if_vlan ./usr/libdata/debug/usr/tests/net/in_cksum ./usr/libdata/debug/usr/tests/net/ipsec
CVS commit: src/etc/mtree
Module Name:src Committed By: mrg Date: Wed Sep 30 07:55:31 UTC 2020 Modified Files: src/etc/mtree: NetBSD.dist.tests Log Message: add missing new if_vether subdir. To generate a diff of this commit: cvs rdiff -u -r1.176 -r1.177 src/etc/mtree/NetBSD.dist.tests Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/NetBSD.dist.tests diff -u src/etc/mtree/NetBSD.dist.tests:1.176 src/etc/mtree/NetBSD.dist.tests:1.177 --- src/etc/mtree/NetBSD.dist.tests:1.176 Wed Aug 26 16:03:41 2020 +++ src/etc/mtree/NetBSD.dist.tests Wed Sep 30 07:55:31 2020 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.tests,v 1.176 2020/08/26 16:03:41 riastradh Exp $ +# $NetBSD: NetBSD.dist.tests,v 1.177 2020/09/30 07:55:31 mrg Exp $ ./usr/libdata/debug/usr/tests ./usr/libdata/debug/usr/tests/atf @@ -357,6 +357,7 @@ ./usr/tests/net/if_pppoe ./usr/tests/net/if_tap ./usr/tests/net/if_tun +./usr/tests/net/if_vether ./usr/tests/net/if_vlan ./usr/tests/net/if_wg ./usr/tests/net/in_cksum
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Wed Sep 30 06:46:43 UTC 2020 Modified Files: src/usr.bin/make: var.c Log Message: make(1): extract ApplyModifier_Quote into separate function To generate a diff of this commit: cvs rdiff -u -r1.554 -r1.555 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.554 src/usr.bin/make/var.c:1.555 --- src/usr.bin/make/var.c:1.554 Wed Sep 30 05:58:22 2020 +++ src/usr.bin/make/var.c Wed Sep 30 06:46:43 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.554 2020/09/30 05:58:22 rillig Exp $ */ +/* $NetBSD: var.c,v 1.555 2020/09/30 06:46:43 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -121,7 +121,7 @@ #include"metachar.h" /* "@(#)var.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: var.c,v 1.554 2020/09/30 05:58:22 rillig Exp $"); +MAKE_RCSID("$NetBSD: var.c,v 1.555 2020/09/30 06:46:43 rillig Exp $"); #define VAR_DEBUG1(fmt, arg1) DEBUG1(VAR, fmt, arg1) #define VAR_DEBUG2(fmt, arg1, arg2) DEBUG2(VAR, fmt, arg1, arg2) @@ -2426,6 +2426,18 @@ ApplyModifier_Regex(const char **pp, App } #endif +/* :Q, :q */ +static ApplyModifierResult +ApplyModifier_Quote(const char **pp, ApplyModifiersState *st) +{ +if ((*pp)[1] == st->endc || (*pp)[1] == ':') { + st->newVal = VarQuote(st->val, **pp == 'q'); + (*pp)++; + return AMR_OK; +} else + return AMR_UNKNOWN; +} + static void ModifyWord_Copy(const char *word, SepBuf *buf, void *data MAKE_ATTR_UNUSED) { @@ -3074,12 +3086,7 @@ ApplyModifier(const char **pp, ApplyModi #endif case 'q': case 'Q': - if ((*pp)[1] == st->endc || (*pp)[1] == ':') { - st->newVal = VarQuote(st->val, **pp == 'q'); - (*pp)++; - return AMR_OK; - } else - return AMR_UNKNOWN; +return ApplyModifier_Quote(pp, st); case 'T': return ApplyModifier_WordFunc(pp, st, ModifyWord_Tail); case 'H':
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Wed Sep 30 06:27:02 UTC 2020 Modified Files: src/usr.bin/make: lst.c Log Message: make(1): remove redundant assertions in lst.c These pointers are dereferenced shortly after the assertion, which reliably leads to a SIGSEGV. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/usr.bin/make/lst.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/lst.c diff -u src/usr.bin/make/lst.c:1.73 src/usr.bin/make/lst.c:1.74 --- src/usr.bin/make/lst.c:1.73 Sun Sep 27 21:35:16 2020 +++ src/usr.bin/make/lst.c Wed Sep 30 06:27:02 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: lst.c,v 1.73 2020/09/27 21:35:16 rillig Exp $ */ +/* $NetBSD: lst.c,v 1.74 2020/09/30 06:27:02 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -34,7 +34,7 @@ #include "make.h" -MAKE_RCSID("$NetBSD: lst.c,v 1.73 2020/09/27 21:35:16 rillig Exp $"); +MAKE_RCSID("$NetBSD: lst.c,v 1.74 2020/09/30 06:27:02 rillig Exp $"); /* Allocate and initialize a list node. * @@ -79,8 +79,6 @@ Lst_Copy(List *list, LstCopyProc copyPro List *newList; ListNode *node; -assert(list != NULL); - newList = Lst_Init(); for (node = list->first; node != NULL; node = node->next) { @@ -98,8 +96,6 @@ Lst_Free(List *list) ListNode *node; ListNode *next; -assert(list != NULL); - for (node = list->first; node != NULL; node = next) { next = node->next; free(node); @@ -116,9 +112,6 @@ Lst_Destroy(List *list, LstFreeProc free ListNode *node; ListNode *next; -assert(list != NULL); -assert(freeProc != NULL); - for (node = list->first; node != NULL; node = next) { next = node->next; freeProc(node->datum); @@ -139,9 +132,7 @@ Lst_InsertBefore(List *list, ListNode *n { ListNode *newNode; -assert(list != NULL); assert(!LstIsEmpty(list)); -assert(node != NULL); assert(datum != NULL); newNode = LstNodeNew(datum); @@ -164,7 +155,6 @@ Lst_Prepend(List *list, void *datum) { ListNode *node; -assert(list != NULL); assert(datum != NULL); node = LstNodeNew(datum); @@ -186,7 +176,6 @@ Lst_Append(List *list, void *datum) { ListNode *node; -assert(list != NULL); assert(datum != NULL); node = LstNodeNew(datum); @@ -207,9 +196,6 @@ Lst_Append(List *list, void *datum) void Lst_Remove(List *list, ListNode *node) { -assert(list != NULL); -assert(node != NULL); - /* * unlink it from the list */ @@ -259,18 +245,16 @@ Lst_Remove(List *list, ListNode *node) void LstNode_Set(ListNode *node, void *datum) { -assert(node != NULL); assert(datum != NULL); node->datum = datum; } -/* Replace the datum in the given node to NULL. */ +/* Replace the datum in the given node to NULL. + * Having NULL values in a list is unusual though. */ void LstNode_SetNull(ListNode *node) { -assert(node != NULL); - node->datum = NULL; } @@ -313,7 +297,6 @@ Lst_FindDatum(List *list, const void *da { ListNode *node; -assert(list != NULL); assert(datum != NULL); for (node = list->first; node != NULL; node = node->next) { @@ -358,7 +341,7 @@ Lst_ForEachUntil(List *list, LstActionUn Boolean done = next == NULL; tln->priv_useCount++; - result = (*proc)(tln->datum, procData); + result = proc(tln->datum, procData); tln->priv_useCount--; /* @@ -387,9 +370,6 @@ Lst_ForEachUntil(List *list, LstActionUn void Lst_MoveAll(List *list1, List *list2) { -assert(list1 != NULL); -assert(list2 != NULL); - if (list2->first != NULL) { list2->first->prev = list1->last; if (list1->last != NULL) { @@ -435,7 +415,6 @@ Lst_AppendAll(List *dst, List *src) void Lst_Open(List *list) { -assert(list != NULL); assert(!list->priv_isOpen); list->priv_isOpen = TRUE; @@ -450,7 +429,6 @@ Lst_Next(List *list) { ListNode *node; -assert(list != NULL); assert(list->priv_isOpen); list->priv_prev = list->priv_curr; @@ -492,7 +470,6 @@ Lst_Next(List *list) void Lst_Close(List *list) { -assert(list != NULL); assert(list->priv_isOpen); list->priv_isOpen = FALSE; @@ -515,14 +492,9 @@ Lst_Enqueue(List *list, void *datum) void * Lst_Dequeue(List *list) { -void *datum; - -assert(list != NULL); -assert(!LstIsEmpty(list)); - -datum = list->first->datum; +void *datum = list->first->datum; Lst_Remove(list, list->first); -assert(datum != NULL); +assert(datum != NULL); /* since NULL would mean end of the list */ return datum; }
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Wed Sep 30 06:15:43 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: varmod-l-name-to-value.mk Log Message: make(1): fix typos in test for the :L variable modifier To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/usr.bin/make/unit-tests/varmod-l-name-to-value.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/unit-tests/varmod-l-name-to-value.mk diff -u src/usr.bin/make/unit-tests/varmod-l-name-to-value.mk:1.4 src/usr.bin/make/unit-tests/varmod-l-name-to-value.mk:1.5 --- src/usr.bin/make/unit-tests/varmod-l-name-to-value.mk:1.4 Wed Sep 30 05:42:06 2020 +++ src/usr.bin/make/unit-tests/varmod-l-name-to-value.mk Wed Sep 30 06:15:43 2020 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-l-name-to-value.mk,v 1.4 2020/09/30 05:42:06 rillig Exp $ +# $NetBSD: varmod-l-name-to-value.mk,v 1.5 2020/09/30 06:15:43 rillig Exp $ # # Tests for the :L modifier, which returns the variable name as the new value. @@ -27,10 +27,10 @@ .error .endif -# Between 2020-09-22 (var.c 1.527) and 2020-09-30 (var.c 1.554), there was -# a bug in the evaluation of variable expression. Indirect modifiers like -# this :L did not update the definedness of the enclosing expression. -# This resulted in a wrong "Malformed variable". +# Between 2020-09-22 (var.c 1.527) and 2020-09-30 (var.c 1.553), there was +# a bug in the evaluation of variable expressions. Indirect modifiers like +# the below :L did not update the definedness of the enclosing expression. +# This resulted in a wrong "Malformed conditional". .if ${value:${:UL}} == "" .endif