CVS commit: src/sys/dev/pci
Module Name:src Committed By: knakahara Date: Tue Mar 2 07:55:16 UTC 2021 Modified Files: src/sys/dev/pci: if_rge.c Log Message: Fix build failure for options NET_MPSAFE. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/if_rge.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_rge.c diff -u src/sys/dev/pci/if_rge.c:1.17 src/sys/dev/pci/if_rge.c:1.18 --- src/sys/dev/pci/if_rge.c:1.17 Mon Mar 1 17:48:52 2021 +++ src/sys/dev/pci/if_rge.c Tue Mar 2 07:55:16 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_rge.c,v 1.17 2021/03/01 17:48:52 jakllsch Exp $ */ +/* $NetBSD: if_rge.c,v 1.18 2021/03/02 07:55:16 knakahara Exp $ */ /* $OpenBSD: if_rge.c,v 1.9 2020/12/12 11:48:53 jan Exp $ */ /* @@ -18,7 +18,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.17 2021/03/01 17:48:52 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.18 2021/03/02 07:55:16 knakahara Exp $"); #include @@ -324,7 +324,7 @@ rge_attach(device_t parent, device_t sel strlcpy(ifp->if_xname, device_xname(sc->sc_dev), IFNAMSIZ); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; #ifdef RGE_MPSAFE - ifp->if_xflags = IFEF_MPSAFE; + ifp->if_extflags = IFEF_MPSAFE; #endif ifp->if_ioctl = rge_ioctl; ifp->if_stop = rge_stop;
CVS commit: src/sys/arch/evbppc/explora
Module Name:src Committed By: rin Date: Tue Mar 2 07:44:08 UTC 2021 Modified Files: src/sys/arch/evbppc/explora: explora_start.S machdep.c Log Message: Establish kernel MMU context before turning on MMU. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbppc/explora/explora_start.S cvs rdiff -u -r1.40 -r1.41 src/sys/arch/evbppc/explora/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/evbppc/explora/explora_start.S diff -u src/sys/arch/evbppc/explora/explora_start.S:1.11 src/sys/arch/evbppc/explora/explora_start.S:1.12 --- src/sys/arch/evbppc/explora/explora_start.S:1.11 Thu Oct 3 22:28:38 2013 +++ src/sys/arch/evbppc/explora/explora_start.S Tue Mar 2 07:44:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: explora_start.S,v 1.11 2013/10/03 22:28:38 matt Exp $ */ +/* $NetBSD: explora_start.S,v 1.12 2021/03/02 07:44:08 rin Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -186,6 +186,11 @@ stage2: cmpw 7,4 bne+ 1b +/* Set kernel MMU context. */ + li 0,KERNEL_PID + mtpid 0 + sync + INIT_CPUINFO(4,1,9,0) lis 3,__start@h Index: src/sys/arch/evbppc/explora/machdep.c diff -u src/sys/arch/evbppc/explora/machdep.c:1.40 src/sys/arch/evbppc/explora/machdep.c:1.41 --- src/sys/arch/evbppc/explora/machdep.c:1.40 Thu Jun 11 19:20:43 2020 +++ src/sys/arch/evbppc/explora/machdep.c Tue Mar 2 07:44:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.40 2020/06/11 19:20:43 ad Exp $ */ +/* $NetBSD: machdep.c,v 1.41 2021/03/02 07:44:08 rin Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.40 2020/06/11 19:20:43 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.41 2021/03/02 07:44:08 rin Exp $"); #include "opt_explora.h" #include "opt_modular.h" @@ -117,11 +117,6 @@ initppc(vaddr_t startkernel, vaddr_t end avail_mem[0].start = startkernel; avail_mem[0].size = size-startkernel; - __asm volatile( - " mtpid %0 \n" - " sync \n" - : : "r" (KERNEL_PID) ); - /* * Setup initial tlbs. * Kernel memory and console device are
CVS commit: src/sys/arch/evbppc/explora
Module Name:src Committed By: rin Date: Tue Mar 2 07:38:48 UTC 2021 Modified Files: src/sys/arch/evbppc/explora: autoconf.c Log Message: Switch to genppc_cpu_configure(). To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbppc/explora/autoconf.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/evbppc/explora/autoconf.c diff -u src/sys/arch/evbppc/explora/autoconf.c:1.13 src/sys/arch/evbppc/explora/autoconf.c:1.14 --- src/sys/arch/evbppc/explora/autoconf.c:1.13 Sun Jul 29 18:05:42 2012 +++ src/sys/arch/evbppc/explora/autoconf.c Tue Mar 2 07:38:48 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.13 2012/07/29 18:05:42 mlelstv Exp $ */ +/* $NetBSD: autoconf.c,v 1.14 2021/03/02 07:38:48 rin Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.13 2012/07/29 18:05:42 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.14 2021/03/02 07:38:48 rin Exp $"); #include #include @@ -48,10 +48,7 @@ cpu_configure(void) if (config_rootfound("elb", NULL) == NULL) panic("configure: elb not configured"); - printf("biomask %x netmask %x ttymask %x\n", - imask[IPL_BIO], imask[IPL_NET], imask[IPL_TTY]); - - (void)spl0(); + genppc_cpu_configure(); } void
CVS commit: src/sys/arch/powerpc
Module Name:src Committed By: rin Date: Tue Mar 2 07:37:27 UTC 2021 Modified Files: src/sys/arch/powerpc/include: intr.h src/sys/arch/powerpc/pic: intr.c Log Message: Turn imask into static. XXX Other macro etc. in powerpc/intr.h should also be moved into powerpc/pic/intr.c, or protected by __INTR_PRIVATE. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/powerpc/include/intr.h cvs rdiff -u -r1.29 -r1.30 src/sys/arch/powerpc/pic/intr.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/powerpc/include/intr.h diff -u src/sys/arch/powerpc/include/intr.h:1.17 src/sys/arch/powerpc/include/intr.h:1.18 --- src/sys/arch/powerpc/include/intr.h:1.17 Thu Apr 16 23:29:52 2020 +++ src/sys/arch/powerpc/include/intr.h Tue Mar 2 07:37:27 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.17 2020/04/16 23:29:52 rin Exp $ */ +/* $NetBSD: intr.h,v 1.18 2021/03/02 07:37:27 rin Exp $ */ /*- * Copyright (c) 2007 Michael Lorenz @@ -28,7 +28,7 @@ #ifndef _LOCORE #include -__KERNEL_RCSID(0, "$NetBSD: intr.h,v 1.17 2020/04/16 23:29:52 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.h,v 1.18 2021/03/02 07:37:27 rin Exp $"); #endif #ifndef _POWERPC_INTR_MACHDEP_H_ @@ -103,8 +103,6 @@ typedef __IMASK_T imask_t; typedef uint32_t imask_t; #endif -extern imask_t imask[]; - #define NVIRQ (sizeof(imask_t)*8) /* 32 virtual IRQs */ #ifndef NIRQ #define NIRQ 256 /* up to 256 HW IRQs */ Index: src/sys/arch/powerpc/pic/intr.c diff -u src/sys/arch/powerpc/pic/intr.c:1.29 src/sys/arch/powerpc/pic/intr.c:1.30 --- src/sys/arch/powerpc/pic/intr.c:1.29 Mon Jul 6 10:31:23 2020 +++ src/sys/arch/powerpc/pic/intr.c Tue Mar 2 07:37:27 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.29 2020/07/06 10:31:23 rin Exp $ */ +/* $NetBSD: intr.c,v 1.30 2021/03/02 07:37:27 rin Exp $ */ /*- * Copyright (c) 2007 Michael Lorenz @@ -29,7 +29,7 @@ #define __INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.29 2020/07/06 10:31:23 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.30 2021/03/02 07:37:27 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_interrupt.h" @@ -75,7 +75,7 @@ int num_pics = 0; int max_base = 0; uint8_t virq_map[NIRQ]; imask_t virq_mask = HWIRQ_MASK; -imask_t imask[NIPL]; +static imask_t imask[NIPL]; int primary_pic = 0; static int fakeintr(void *);
CVS commit: src/sys/arch/evbppc/obs405
Module Name:src Committed By: rin Date: Tue Mar 2 07:27:24 UTC 2021 Modified Files: src/sys/arch/evbppc/obs405: obs600_autoconf.c obs600_machdep.c Log Message: Invoke calc_delayconst() before read_eeprom(), which uses delay(9). Fix unintended looong waiting time during boot. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbppc/obs405/obs600_autoconf.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbppc/obs405/obs600_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/evbppc/obs405/obs600_autoconf.c diff -u src/sys/arch/evbppc/obs405/obs600_autoconf.c:1.9 src/sys/arch/evbppc/obs405/obs600_autoconf.c:1.10 --- src/sys/arch/evbppc/obs405/obs600_autoconf.c:1.9 Tue Mar 2 07:21:01 2021 +++ src/sys/arch/evbppc/obs405/obs600_autoconf.c Tue Mar 2 07:27:24 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: obs600_autoconf.c,v 1.9 2021/03/02 07:21:01 rin Exp $ */ +/* $NetBSD: obs600_autoconf.c,v 1.10 2021/03/02 07:27:24 rin Exp $ */ /* * Copyright 2004 Shigeyuki Fukushima. @@ -33,7 +33,7 @@ * DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: obs600_autoconf.c,v 1.9 2021/03/02 07:21:01 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: obs600_autoconf.c,v 1.10 2021/03/02 07:27:24 rin Exp $"); #include "dwctwo.h" @@ -101,8 +101,6 @@ cpu_configure(void) pic_add(_uic1); pic_add(_uic2); - calc_delayconst(); - /* Make sure that timers run at CPU frequency */ mtdcr(DCR_CPC0_CR1, mfdcr(DCR_CPC0_CR1) & ~CPC0_CR1_CETE); Index: src/sys/arch/evbppc/obs405/obs600_machdep.c diff -u src/sys/arch/evbppc/obs405/obs600_machdep.c:1.10 src/sys/arch/evbppc/obs405/obs600_machdep.c:1.11 --- src/sys/arch/evbppc/obs405/obs600_machdep.c:1.10 Sun Jul 15 05:16:42 2018 +++ src/sys/arch/evbppc/obs405/obs600_machdep.c Tue Mar 2 07:27:24 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: obs600_machdep.c,v 1.10 2018/07/15 05:16:42 maxv Exp $ */ +/* $NetBSD: obs600_machdep.c,v 1.11 2021/03/02 07:27:24 rin Exp $ */ /* Original: md_machdep.c,v 1.3 2005/01/24 18:47:37 shige Exp $ */ /* @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: obs600_machdep.c,v 1.10 2018/07/15 05:16:42 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: obs600_machdep.c,v 1.11 2021/03/02 07:27:24 rin Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -206,10 +206,6 @@ cpu_startup(void) */ board_info_init(); - read_eeprom(sizeof(buf), buf); - macaddr = [0]; - macaddr1 = [8]; - /* * Now that we have VM, malloc()s are OK in bus_space. */ @@ -228,8 +224,14 @@ cpu_startup(void) panic("setting mem-size"); prop_object_release(pn); + calc_delayconst(); /* required by read_eeprom() */ + #define ETHER_ADDR_LEN 6 + read_eeprom(sizeof(buf), buf); + macaddr = [0]; + macaddr1 = [8]; + pd = prop_data_create_data_nocopy(macaddr, ETHER_ADDR_LEN); KASSERT(pd != NULL); if (prop_dictionary_set(board_properties, "emac0-mac-addr", pd) ==
CVS commit: src/sys/arch/evbppc/obs405
Module Name:src Committed By: rin Date: Tue Mar 2 07:23:22 UTC 2021 Modified Files: src/sys/arch/evbppc/obs405: obs600_locore.S Log Message: Do not forcibly turn off PPC_4XX_NOCACHE option. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbppc/obs405/obs600_locore.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/evbppc/obs405/obs600_locore.S diff -u src/sys/arch/evbppc/obs405/obs600_locore.S:1.6 src/sys/arch/evbppc/obs405/obs600_locore.S:1.7 --- src/sys/arch/evbppc/obs405/obs600_locore.S:1.6 Tue Aug 5 16:28:39 2014 +++ src/sys/arch/evbppc/obs405/obs600_locore.S Tue Mar 2 07:23:22 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: obs600_locore.S,v 1.6 2014/08/05 16:28:39 joerg Exp $ */ +/* $NetBSD: obs600_locore.S,v 1.7 2021/03/02 07:23:22 rin Exp $ */ /* * Copyright (c) 2009 KIYOHARA Takashi @@ -26,8 +26,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#undef PPC_4XX_NOCACHE - #include "opt_ddb.h" #include "opt_ppcarch.h" #include "opt_ppcparam.h"
CVS commit: src/sys/arch/evbppc/obs405
Module Name:src Committed By: rin Date: Tue Mar 2 07:21:01 UTC 2021 Modified Files: src/sys/arch/evbppc/obs405: obs200_autoconf.c obs266_autoconf.c obs600_autoconf.c Log Message: Use genppc_cpu_configure() instead of calling spl0() directly (and optionally printing out imask). To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbppc/obs405/obs200_autoconf.c \ src/sys/arch/evbppc/obs405/obs266_autoconf.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbppc/obs405/obs600_autoconf.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/evbppc/obs405/obs200_autoconf.c diff -u src/sys/arch/evbppc/obs405/obs200_autoconf.c:1.7 src/sys/arch/evbppc/obs405/obs200_autoconf.c:1.8 --- src/sys/arch/evbppc/obs405/obs200_autoconf.c:1.7 Mon Dec 12 11:23:57 2011 +++ src/sys/arch/evbppc/obs405/obs200_autoconf.c Tue Mar 2 07:21:01 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: obs200_autoconf.c,v 1.7 2011/12/12 11:23:57 kiyohara Exp $ */ +/* $NetBSD: obs200_autoconf.c,v 1.8 2021/03/02 07:21:01 rin Exp $ */ /* * Copyright 2004 Shigeyuki Fukushima. @@ -33,7 +33,7 @@ * DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: obs200_autoconf.c,v 1.7 2011/12/12 11:23:57 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: obs200_autoconf.c,v 1.8 2021/03/02 07:21:01 rin Exp $"); #include #include @@ -63,10 +63,7 @@ cpu_configure(void) if (config_rootfound("plb", NULL) == NULL) panic("configure: mainbus not configured"); - printf("biomask %x netmask %x ttymask %x\n", - imask[IPL_BIO], imask[IPL_NET], imask[IPL_TTY]); - - (void)spl0(); + genppc_cpu_configure(); } void device_register(device_t dev, void *aux) Index: src/sys/arch/evbppc/obs405/obs266_autoconf.c diff -u src/sys/arch/evbppc/obs405/obs266_autoconf.c:1.7 src/sys/arch/evbppc/obs405/obs266_autoconf.c:1.8 --- src/sys/arch/evbppc/obs405/obs266_autoconf.c:1.7 Mon Dec 12 11:23:57 2011 +++ src/sys/arch/evbppc/obs405/obs266_autoconf.c Tue Mar 2 07:21:01 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: obs266_autoconf.c,v 1.7 2011/12/12 11:23:57 kiyohara Exp $ */ +/* $NetBSD: obs266_autoconf.c,v 1.8 2021/03/02 07:21:01 rin Exp $ */ /* * Copyright 2004 Shigeyuki Fukushima. @@ -33,7 +33,7 @@ * DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: obs266_autoconf.c,v 1.7 2011/12/12 11:23:57 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: obs266_autoconf.c,v 1.8 2021/03/02 07:21:01 rin Exp $"); #include #include @@ -62,7 +62,7 @@ cpu_configure(void) if (config_rootfound("plb", NULL) == NULL) panic("configure: mainbus not configured"); - (void)spl0(); + genppc_cpu_configure(); } void Index: src/sys/arch/evbppc/obs405/obs600_autoconf.c diff -u src/sys/arch/evbppc/obs405/obs600_autoconf.c:1.8 src/sys/arch/evbppc/obs405/obs600_autoconf.c:1.9 --- src/sys/arch/evbppc/obs405/obs600_autoconf.c:1.8 Mon Feb 18 06:27:10 2019 +++ src/sys/arch/evbppc/obs405/obs600_autoconf.c Tue Mar 2 07:21:01 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: obs600_autoconf.c,v 1.8 2019/02/18 06:27:10 msaitoh Exp $ */ +/* $NetBSD: obs600_autoconf.c,v 1.9 2021/03/02 07:21:01 rin Exp $ */ /* * Copyright 2004 Shigeyuki Fukushima. @@ -33,7 +33,7 @@ * DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: obs600_autoconf.c,v 1.8 2019/02/18 06:27:10 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: obs600_autoconf.c,v 1.9 2021/03/02 07:21:01 rin Exp $"); #include "dwctwo.h" @@ -111,10 +111,7 @@ cpu_configure(void) pic_finish_setup(); - printf("biomask %x netmask %x ttymask %x\n", - imask[IPL_BIO], imask[IPL_NET], imask[IPL_TTY]); - - (void)spl0(); + genppc_cpu_configure(); } void
CVS commit: src/tests/net/if_wg
Module Name:src Committed By: simonb Date: Tue Mar 2 07:16:24 UTC 2021 Modified Files: src/tests/net/if_wg: t_basic.sh Log Message: Revert previous, 11th time failed after commit. Problem must be elsewhere. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/net/if_wg/t_basic.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_wg/t_basic.sh diff -u src/tests/net/if_wg/t_basic.sh:1.3 src/tests/net/if_wg/t_basic.sh:1.4 --- src/tests/net/if_wg/t_basic.sh:1.3 Tue Mar 2 07:02:14 2021 +++ src/tests/net/if_wg/t_basic.sh Tue Mar 2 07:16:24 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_basic.sh,v 1.3 2021/03/02 07:02:14 simonb Exp $ +# $NetBSD: t_basic.sh,v 1.4 2021/03/02 07:16:24 simonb Exp $ # # Copyright (c) 2018 Ryota Ozaki # All rights reserved. @@ -93,13 +93,13 @@ test_common() setup_common shmif0 $outer_proto $ip_local $outer_prefix setup_wg_common wg0 $inner_proto $ip_wg_local $inner_prefix $port "$key_priv_local" add_peer wg0 peer0 $key_pub_peer $ip_peer:$port $ip_wg_peer/$inner_prefixall - $ifconfig -w 20 + $ifconfig -w 10 export RUMP_SERVER=$SOCK_PEER setup_common shmif0 $outer_proto $ip_peer $outer_prefix setup_wg_common wg0 $inner_proto $ip_wg_peer $inner_prefix $port "$key_priv_peer" add_peer wg0 peer0 $key_pub_local $ip_local:$port $ip_wg_local/$inner_prefixall - $ifconfig -w 20 + $ifconfig -w 10 if [ $type = basic ]; then export RUMP_SERVER=$SOCK_LOCAL @@ -327,19 +327,19 @@ wg_multiple_interfaces_body() setup_wg_common wg1 inet $ip_wg_local2 24 $port2 "$key_priv_local" add_peer wg0 peer0 $key_pub_peer $ip_peer:$port $ip_wg_peer/32 add_peer wg1 peer0 $key_pub_peer2 $ip_peer2:$port2 $ip_wg_peer2/32 - $ifconfig -w 20 + $ifconfig -w 10 export RUMP_SERVER=$SOCK_PEER setup_common shmif0 inet $ip_peer 24 setup_wg_common wg0 inet $ip_wg_peer 24 $port "$key_priv_peer" add_peer wg0 peer0 $key_pub_local $ip_local:$port $ip_wg_local/32 - $ifconfig -w 20 + $ifconfig -w 10 export RUMP_SERVER=$SOCK_PEER2 setup_common shmif0 inet $ip_peer2 24 setup_wg_common wg0 inet $ip_wg_peer2 24 $port2 "$key_priv_peer2" add_peer wg0 peer0 $key_pub_local $ip_local2:$port2 $ip_wg_local2/32 - $ifconfig -w 20 + $ifconfig -w 10 export RUMP_SERVER=$SOCK_LOCAL @@ -412,19 +412,19 @@ wg_multiple_peers_body() setup_wg_common wg0 inet $ip_wg_local 24 $port "$key_priv_local" add_peer wg0 peer0 $key_pub_peer $ip_peer:$port $ip_wg_peer/32 add_peer wg0 peer1 $key_pub_peer2 $ip_peer2:$port $ip_wg_peer2/32 - $ifconfig -w 20 + $ifconfig -w 10 export RUMP_SERVER=$SOCK_PEER setup_common shmif0 inet $ip_peer 24 setup_wg_common wg0 inet $ip_wg_peer 24 $port "$key_priv_peer" add_peer wg0 peer0 $key_pub_local $ip_local:$port $ip_wg_local/32 - $ifconfig -w 20 + $ifconfig -w 10 export RUMP_SERVER=$SOCK_PEER2 setup_common shmif0 inet $ip_peer2 24 setup_wg_common wg0 inet $ip_wg_peer2 24 $port "$key_priv_peer2" add_peer wg0 peer0 $key_pub_local $ip_local:$port $ip_wg_local/32 - $ifconfig -w 20 + $ifconfig -w 10 export RUMP_SERVER=$SOCK_LOCAL
CVS commit: src/tests/net/if_wg
Module Name:src Committed By: simonb Date: Tue Mar 2 07:02:15 UTC 2021 Modified Files: src/tests/net/if_wg: t_basic.sh Log Message: Bump tentative flag timeout (-w) from 10 to 20 seconds. Changes this test from failing roughly half the time to working 100% over 10 tests on evbmips er4. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/net/if_wg/t_basic.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_wg/t_basic.sh diff -u src/tests/net/if_wg/t_basic.sh:1.2 src/tests/net/if_wg/t_basic.sh:1.3 --- src/tests/net/if_wg/t_basic.sh:1.2 Fri Oct 16 16:17:23 2020 +++ src/tests/net/if_wg/t_basic.sh Tue Mar 2 07:02:14 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_basic.sh,v 1.2 2020/10/16 16:17:23 roy Exp $ +# $NetBSD: t_basic.sh,v 1.3 2021/03/02 07:02:14 simonb Exp $ # # Copyright (c) 2018 Ryota Ozaki # All rights reserved. @@ -93,13 +93,13 @@ test_common() setup_common shmif0 $outer_proto $ip_local $outer_prefix setup_wg_common wg0 $inner_proto $ip_wg_local $inner_prefix $port "$key_priv_local" add_peer wg0 peer0 $key_pub_peer $ip_peer:$port $ip_wg_peer/$inner_prefixall - $ifconfig -w 10 + $ifconfig -w 20 export RUMP_SERVER=$SOCK_PEER setup_common shmif0 $outer_proto $ip_peer $outer_prefix setup_wg_common wg0 $inner_proto $ip_wg_peer $inner_prefix $port "$key_priv_peer" add_peer wg0 peer0 $key_pub_local $ip_local:$port $ip_wg_local/$inner_prefixall - $ifconfig -w 10 + $ifconfig -w 20 if [ $type = basic ]; then export RUMP_SERVER=$SOCK_LOCAL @@ -327,19 +327,19 @@ wg_multiple_interfaces_body() setup_wg_common wg1 inet $ip_wg_local2 24 $port2 "$key_priv_local" add_peer wg0 peer0 $key_pub_peer $ip_peer:$port $ip_wg_peer/32 add_peer wg1 peer0 $key_pub_peer2 $ip_peer2:$port2 $ip_wg_peer2/32 - $ifconfig -w 10 + $ifconfig -w 20 export RUMP_SERVER=$SOCK_PEER setup_common shmif0 inet $ip_peer 24 setup_wg_common wg0 inet $ip_wg_peer 24 $port "$key_priv_peer" add_peer wg0 peer0 $key_pub_local $ip_local:$port $ip_wg_local/32 - $ifconfig -w 10 + $ifconfig -w 20 export RUMP_SERVER=$SOCK_PEER2 setup_common shmif0 inet $ip_peer2 24 setup_wg_common wg0 inet $ip_wg_peer2 24 $port2 "$key_priv_peer2" add_peer wg0 peer0 $key_pub_local $ip_local2:$port2 $ip_wg_local2/32 - $ifconfig -w 10 + $ifconfig -w 20 export RUMP_SERVER=$SOCK_LOCAL @@ -412,19 +412,19 @@ wg_multiple_peers_body() setup_wg_common wg0 inet $ip_wg_local 24 $port "$key_priv_local" add_peer wg0 peer0 $key_pub_peer $ip_peer:$port $ip_wg_peer/32 add_peer wg0 peer1 $key_pub_peer2 $ip_peer2:$port $ip_wg_peer2/32 - $ifconfig -w 10 + $ifconfig -w 20 export RUMP_SERVER=$SOCK_PEER setup_common shmif0 inet $ip_peer 24 setup_wg_common wg0 inet $ip_wg_peer 24 $port "$key_priv_peer" add_peer wg0 peer0 $key_pub_local $ip_local:$port $ip_wg_local/32 - $ifconfig -w 10 + $ifconfig -w 20 export RUMP_SERVER=$SOCK_PEER2 setup_common shmif0 inet $ip_peer2 24 setup_wg_common wg0 inet $ip_wg_peer2 24 $port "$key_priv_peer2" add_peer wg0 peer0 $key_pub_local $ip_local:$port $ip_wg_local/32 - $ifconfig -w 10 + $ifconfig -w 20 export RUMP_SERVER=$SOCK_LOCAL
CVS commit: src/sys
Module Name:src Committed By: skrll Date: Tue Mar 2 07:02:06 UTC 2021 Modified Files: src/sys/arch/arm/fdt: arm_simplefb.c src/sys/dev/fdt: simplefb.c Log Message: Sanity check size vs width x height x depth. Buggy firmware exists. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/fdt/arm_simplefb.c cvs rdiff -u -r1.12 -r1.13 src/sys/dev/fdt/simplefb.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/fdt/arm_simplefb.c diff -u src/sys/arch/arm/fdt/arm_simplefb.c:1.8 src/sys/arch/arm/fdt/arm_simplefb.c:1.9 --- src/sys/arch/arm/fdt/arm_simplefb.c:1.8 Wed Jan 27 03:10:19 2021 +++ src/sys/arch/arm/fdt/arm_simplefb.c Tue Mar 2 07:02:05 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: arm_simplefb.c,v 1.8 2021/01/27 03:10:19 thorpej Exp $ */ +/* $NetBSD: arm_simplefb.c,v 1.9 2021/03/02 07:02:05 skrll Exp $ */ /*- * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #include "opt_vcons.h" #include -__KERNEL_RCSID(0, "$NetBSD: arm_simplefb.c,v 1.8 2021/01/27 03:10:19 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arm_simplefb.c,v 1.9 2021/03/02 07:02:05 skrll Exp $"); #include #include @@ -237,6 +237,9 @@ arm_simplefb_preattach(void) return; } + if (size < width * height * depth) + return; + if (bus_space_map(bst, addr, size, BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE, ) != 0) return; Index: src/sys/dev/fdt/simplefb.c diff -u src/sys/dev/fdt/simplefb.c:1.12 src/sys/dev/fdt/simplefb.c:1.13 --- src/sys/dev/fdt/simplefb.c:1.12 Wed Jan 27 03:10:21 2021 +++ src/sys/dev/fdt/simplefb.c Tue Mar 2 07:02:06 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: simplefb.c,v 1.12 2021/01/27 03:10:21 thorpej Exp $ */ +/* $NetBSD: simplefb.c,v 1.13 2021/03/02 07:02:06 skrll Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -29,7 +29,7 @@ #include "opt_wsdisplay_compat.h" #include -__KERNEL_RCSID(0, "$NetBSD: simplefb.c,v 1.12 2021/01/27 03:10:21 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: simplefb.c,v 1.13 2021/03/02 07:02:06 skrll Exp $"); #include #include @@ -169,6 +169,11 @@ simplefb_attach_genfb(struct simplefb_so return ENXIO; } + if (size < width * height * depth) { + aprint_error(": incorrect size\n"); + return ENXIO; + } + /* Device may have been reconfigured. MD code will tell us. */ if (prop_dictionary_get_uint64(dict, "simplefb-physaddr", _addr) && sfb_addr != 0) {
CVS commit: src/sys/arch/macppc/conf
Module Name:src Committed By: macallan Date: Tue Mar 2 06:31:25 UTC 2021 Modified Files: src/sys/arch/macppc/conf: POWERMAC_G5 Log Message: add gffb tested on 20" 1.8GHz iMac G5 To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/macppc/conf/POWERMAC_G5 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/macppc/conf/POWERMAC_G5 diff -u src/sys/arch/macppc/conf/POWERMAC_G5:1.43 src/sys/arch/macppc/conf/POWERMAC_G5:1.44 --- src/sys/arch/macppc/conf/POWERMAC_G5:1.43 Sat Apr 4 15:56:25 2020 +++ src/sys/arch/macppc/conf/POWERMAC_G5 Tue Mar 2 06:31:25 2021 @@ -192,6 +192,7 @@ ums* at uhidev? reportid ?# USB Mice wsmouse* at ums? genfb* at pci? dev ? function ? # Generic Open Firmware Framebuffer +gffb* at pci? dev ? function ? # some iMacs have nvidia graphics chips radeonfb* at pci? dev ? function ? options RADEONFB_ALWAYS_ACCEL_PUTCHAR
CVS commit: src/sys/arch/powerpc
Module Name:src Committed By: thorpej Date: Tue Mar 2 02:28:45 UTC 2021 Modified Files: src/sys/arch/powerpc/include: ofw_machdep.h src/sys/arch/powerpc/powerpc: ofw_machdep.c Log Message: - Add a boolean "ofwbootcons_suppress" that, when true, suppresses ofwbootcons I/O (i.e. "doesn't call into OFW"). This allows platform code to ensure that early console I/O doesn't occur in certain critical sections. - When printing the translations, put phys next to virt for easier visual comparisons. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/include/ofw_machdep.h cvs rdiff -u -r1.29 -r1.30 src/sys/arch/powerpc/powerpc/ofw_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/powerpc/include/ofw_machdep.h diff -u src/sys/arch/powerpc/include/ofw_machdep.h:1.3 src/sys/arch/powerpc/include/ofw_machdep.h:1.4 --- src/sys/arch/powerpc/include/ofw_machdep.h:1.3 Sun Feb 28 20:31:32 2021 +++ src/sys/arch/powerpc/include/ofw_machdep.h Tue Mar 2 02:28:45 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ofw_machdep.h,v 1.3 2021/02/28 20:31:32 thorpej Exp $ */ +/* $NetBSD: ofw_machdep.h,v 1.4 2021/03/02 02:28:45 thorpej Exp $ */ /*- * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -54,6 +54,8 @@ struct OF_translation { #define OFW_MAX_TRANSLATIONS 48 +extern bool ofwbootcons_suppress; /* supporess OF console I/O */ + extern int ofw_chosen; /* cached handle for "/chosen" */ extern struct OF_translation ofw_translations[OFW_MAX_TRANSLATIONS]; Index: src/sys/arch/powerpc/powerpc/ofw_machdep.c diff -u src/sys/arch/powerpc/powerpc/ofw_machdep.c:1.29 src/sys/arch/powerpc/powerpc/ofw_machdep.c:1.30 --- src/sys/arch/powerpc/powerpc/ofw_machdep.c:1.29 Sat Feb 20 01:57:54 2021 +++ src/sys/arch/powerpc/powerpc/ofw_machdep.c Tue Mar 2 02:28:45 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ofw_machdep.c,v 1.29 2021/02/20 01:57:54 thorpej Exp $ */ +/* $NetBSD: ofw_machdep.c,v 1.30 2021/03/02 02:28:45 thorpej Exp $ */ /*- * Copyright (c) 2007, 2021 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.29 2021/02/20 01:57:54 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.30 2021/03/02 02:28:45 thorpej Exp $"); #include #include @@ -99,6 +99,8 @@ bool ofw_real_mode; int console_node = -1, console_instance = -1; int ofw_stdin, ofw_stdout; +bool ofwbootcons_suppress; + int ofw_address_cells; int ofw_size_cells; @@ -108,6 +110,10 @@ ofwbootcons_cngetc(dev_t dev) unsigned char ch = '\0'; int l; + if (ofwbootcons_suppress) { + return ch; + } + while ((l = OF_read(ofw_stdin, , 1)) != 1) { if (l != -2 && l != 0) { return -1; @@ -121,6 +127,10 @@ ofwbootcons_cnputc(dev_t dev, int c) { char ch = c; + if (ofwbootcons_suppress) { + return; + } + OF_write(ofw_stdout, , 1); } @@ -394,8 +404,8 @@ ofw_bootstrap_get_translations(void) } aprint_normal("translation %d virt=%#"PRIx32 - " size=%#"PRIx32" phys=%#"PRIx64" mode=%#"PRIx32"\n", - idx, virt, size, phys, mode); + " phys=%#"PRIx64" size=%#"PRIx32" mode=%#"PRIx32"\n", + idx, virt, phys, size, mode); if (sizeof(paddr_t) < 8 && phys >= 0x1ULL) { panic("translation phys out of range");
CVS commit: src/sys/arch/powerpc
Module Name:src Committed By: thorpej Date: Tue Mar 2 01:47:45 UTC 2021 Modified Files: src/sys/arch/powerpc/include/oea: pmap.h src/sys/arch/powerpc/oea: pmap.c pmap_kernel.c Log Message: Complete the pmap symbol renaming shenanigans for pmap_bootstrap[12](). To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/powerpc/include/oea/pmap.h cvs rdiff -u -r1.100 -r1.101 src/sys/arch/powerpc/oea/pmap.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/oea/pmap_kernel.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/powerpc/include/oea/pmap.h diff -u src/sys/arch/powerpc/include/oea/pmap.h:1.33 src/sys/arch/powerpc/include/oea/pmap.h:1.34 --- src/sys/arch/powerpc/include/oea/pmap.h:1.33 Mon Mar 1 01:53:46 2021 +++ src/sys/arch/powerpc/include/oea/pmap.h Tue Mar 2 01:47:44 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.33 2021/03/01 01:53:46 thorpej Exp $ */ +/* $NetBSD: pmap.h,v 1.34 2021/03/02 01:47:44 thorpej Exp $ */ /*- * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -107,6 +107,8 @@ struct pmap_ops { void (*pmapop_pvo_verify)(void); vaddr_t (*pmapop_steal_memory)(vsize_t, vaddr_t *, vaddr_t *); void (*pmapop_bootstrap)(paddr_t, paddr_t); + void (*pmapop_bootstrap1)(paddr_t, paddr_t); + void (*pmapop_bootstrap2)(void); }; #ifdef _KERNEL Index: src/sys/arch/powerpc/oea/pmap.c diff -u src/sys/arch/powerpc/oea/pmap.c:1.100 src/sys/arch/powerpc/oea/pmap.c:1.101 --- src/sys/arch/powerpc/oea/pmap.c:1.100 Tue Mar 2 00:28:55 2021 +++ src/sys/arch/powerpc/oea/pmap.c Tue Mar 2 01:47:44 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.100 2021/03/02 00:28:55 rin Exp $ */ +/* $NetBSD: pmap.c,v 1.101 2021/03/02 01:47:44 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.100 2021/03/02 00:28:55 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.101 2021/03/02 01:47:44 thorpej Exp $"); #define PMAP_NOOPNAMES @@ -284,6 +284,8 @@ const struct pmap_ops PMAPNAME(ops) = { #endif .pmapop_steal_memory = pmap_steal_memory, .pmapop_bootstrap = pmap_bootstrap, + .pmapop_bootstrap1 = pmap_bootstrap1, + .pmapop_bootstrap2 = pmap_bootstrap2, }; #endif /* !PMAPNAME */ Index: src/sys/arch/powerpc/oea/pmap_kernel.c diff -u src/sys/arch/powerpc/oea/pmap_kernel.c:1.11 src/sys/arch/powerpc/oea/pmap_kernel.c:1.12 --- src/sys/arch/powerpc/oea/pmap_kernel.c:1.11 Mon Jul 6 09:34:17 2020 +++ src/sys/arch/powerpc/oea/pmap_kernel.c Tue Mar 2 01:47:44 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_kernel.c,v 1.11 2020/07/06 09:34:17 rin Exp $ */ +/* $NetBSD: pmap_kernel.c,v 1.12 2021/03/02 01:47:44 thorpej Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -30,7 +30,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: pmap_kernel.c,v 1.11 2020/07/06 09:34:17 rin Exp $"); +__KERNEL_RCSID(1, "$NetBSD: pmap_kernel.c,v 1.12 2021/03/02 01:47:44 thorpej Exp $"); #ifdef _KERNEL_OPT #include "opt_altivec.h" @@ -109,6 +109,8 @@ void pmap_pvo_verify(void) __stub; #endif vaddr_t pmap_steal_memory(vsize_t, vaddr_t *, vaddr_t *) __stub; void pmap_bootstrap(paddr_t, paddr_t) __stub; +void pmap_bootstrap1(paddr_t, paddr_t) __stub; +void pmap_bootstrap2(void) __stub; int pmap_pte_spill(struct pmap *pm, vaddr_t va, bool exec) @@ -300,4 +302,16 @@ pmap_bootstrap(paddr_t startkernel, padd { (*pmapops->pmapop_bootstrap)(startkernel, endkernel); } + +void +pmap_bootstrap1(paddr_t startkernel, paddr_t endkernel) +{ + (*pmapops->pmapop_bootstrap1)(startkernel, endkernel); +} + +void +pmap_bootstrap2(void) +{ + (*pmapops->pmapop_bootstrap2)(); +} #endif
CVS commit: src/sys/kern
Module Name:src Committed By: rin Date: Tue Mar 2 01:20:35 UTC 2021 Modified Files: src/sys/kern: subr_lockdebug.c Log Message: KNF. No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/kern/subr_lockdebug.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/kern/subr_lockdebug.c diff -u src/sys/kern/subr_lockdebug.c:1.79 src/sys/kern/subr_lockdebug.c:1.80 --- src/sys/kern/subr_lockdebug.c:1.79 Fri Jan 1 14:08:33 2021 +++ src/sys/kern/subr_lockdebug.c Tue Mar 2 01:20:35 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_lockdebug.c,v 1.79 2021/01/01 14:08:33 riastradh Exp $ */ +/* $NetBSD: subr_lockdebug.c,v 1.80 2021/03/02 01:20:35 rin Exp $ */ /*- * Copyright (c) 2006, 2007, 2008, 2020 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_lockdebug.c,v 1.79 2021/01/01 14:08:33 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_lockdebug.c,v 1.80 2021/03/02 01:20:35 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -851,7 +851,8 @@ static void lockdebug_show_trace(const void *ptr, void (*pr)(const char *, ...) __printflike(1, 2)) { -db_stack_trace_print((db_expr_t)(intptr_t)ptr, true, 32, "a", pr); + + db_stack_trace_print((db_expr_t)(intptr_t)ptr, true, 32, "a", pr); } static void
CVS commit: src/sys/kern
Module Name:src Committed By: rin Date: Tue Mar 2 01:15:15 UTC 2021 Modified Files: src/sys/kern: kern_mutex.c Log Message: Consistently right-justify backslash in macro definition. No binary changes. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/kern/kern_mutex.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/kern/kern_mutex.c diff -u src/sys/kern/kern_mutex.c:1.95 src/sys/kern/kern_mutex.c:1.96 --- src/sys/kern/kern_mutex.c:1.95 Tue Dec 15 08:35:52 2020 +++ src/sys/kern/kern_mutex.c Tue Mar 2 01:15:15 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_mutex.c,v 1.95 2020/12/15 08:35:52 skrll Exp $ */ +/* $NetBSD: kern_mutex.c,v 1.96 2021/03/02 01:15:15 rin Exp $ */ /*- * Copyright (c) 2002, 2006, 2007, 2008, 2019 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ #define __MUTEX_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.95 2020/12/15 08:35:52 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.96 2021/03/02 01:15:15 rin Exp $"); #include #include @@ -160,7 +160,7 @@ do { \ struct cpu_info *x__ci = curcpu();\ int s = x__ci->ci_mtx_oldspl; \ __insn_barrier(); \ - if (++(x__ci->ci_mtx_count) == 0) \ + if (++(x__ci->ci_mtx_count) == 0)\ splx(s); \ } while (/* CONSTCOND */ 0)
CVS commit: src/usr.bin/netstat
Module Name:src Committed By: simonb Date: Tue Mar 2 01:02:12 UTC 2021 Modified Files: src/usr.bin/netstat: vtw.c Log Message: Don't show any of the completely and utterly undocumented VTW info if the feature isn't enabled (by checking net.inet.tcp.vtw.enable). To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/netstat/vtw.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/netstat/vtw.c diff -u src/usr.bin/netstat/vtw.c:1.10 src/usr.bin/netstat/vtw.c:1.11 --- src/usr.bin/netstat/vtw.c:1.10 Thu May 3 07:13:48 2018 +++ src/usr.bin/netstat/vtw.c Tue Mar 2 01:02:12 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: vtw.c,v 1.10 2018/05/03 07:13:48 maxv Exp $ */ +/* $NetBSD: vtw.c,v 1.11 2021/03/02 01:02:12 simonb Exp $ */ /* * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ #if 0 static char sccsid[] = "from: @(#)inet.c 8.4 (Berkeley) 4/20/94"; #else -__RCSID("$NetBSD: vtw.c,v 1.10 2018/05/03 07:13:48 maxv Exp $"); +__RCSID("$NetBSD: vtw.c,v 1.11 2021/03/02 01:02:12 simonb Exp $"); #endif #endif /* not lint */ @@ -115,10 +115,28 @@ __RCSID("$NetBSD: vtw.c,v 1.10 2018/05/0 #include "vtw.h" #include "prog_ops.h" +static bool vtw_enabled(void); static void snarf(const void *, void *, size_t); static void *lookup(const char *); static void process_vtw(const vtw_ctl_t *, void (*)(const vtw_t *)); +static bool +vtw_enabled(void) +{ + + if (use_sysctl) { + int enabled; + size_t size = sizeof(enabled); + + if (prog_sysctlbyname("net.inet.tcp.vtw.enable", + , , NULL, 0) == -1) + return true; + return enabled ? true : false; + } else { + return true; + } +} + static void snarf(const void *addr, void *buf, size_t len) { @@ -172,6 +190,11 @@ timebase(struct timeval *tv) void *p; struct bintime timebasebin; + if (!vtw_enabled()) { + memset(tv, 0, sizeof(*tv)); + return; + } + p = lookup("timebasebin"); if (!p) return; @@ -209,6 +232,9 @@ show_vtw_stats(void) if (!Vflag) return; + if (!vtw_enabled()) + return; + if ((p = lookup("vtw_stats")) == NULL) return; snarf(p, , sizeof(stats)); @@ -248,6 +274,9 @@ show_vtw_v4(void (*print)(const vtw_t *) int mem = 0; void *p; + if (!vtw_enabled()) + return; + if ((p = lookup("fat_tcpv4")) == NULL) return; snarf(p, _tcpv4, sizeof(fat_tcpv4)); @@ -350,6 +379,9 @@ show_vtw_v6(void (*print)(const vtw_t *) int mem = 0; void *p; + if (!vtw_enabled()) + return; + if ((p = lookup("fat_tcpv6")) == NULL) return; snarf(p, _tcpv6, sizeof(fat_tcpv6));
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: rin Date: Tue Mar 2 00:28:55 UTC 2021 Modified Files: src/sys/arch/powerpc/oea: pmap.c Log Message: Apply PMAPNAME() to pmap_bootstrap[12](); fix build for ofppc, which has both pmap32 and pmap64bridge in a single kernel. To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/sys/arch/powerpc/oea/pmap.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/powerpc/oea/pmap.c diff -u src/sys/arch/powerpc/oea/pmap.c:1.99 src/sys/arch/powerpc/oea/pmap.c:1.100 --- src/sys/arch/powerpc/oea/pmap.c:1.99 Mon Mar 1 01:53:46 2021 +++ src/sys/arch/powerpc/oea/pmap.c Tue Mar 2 00:28:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.99 2021/03/01 01:53:46 thorpej Exp $ */ +/* $NetBSD: pmap.c,v 1.100 2021/03/02 00:28:55 rin Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.99 2021/03/01 01:53:46 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.100 2021/03/02 00:28:55 rin Exp $"); #define PMAP_NOOPNAMES @@ -191,6 +191,8 @@ static u_int mem_cnt, avail_cnt; #endif #define pmap_steal_memory PMAPNAME(steal_memory) #define pmap_bootstrap PMAPNAME(bootstrap) +#define pmap_bootstrap1 PMAPNAME(bootstrap1) +#define pmap_bootstrap2 PMAPNAME(bootstrap2) #else #define STATIC /* nothing */ #endif /* PMAPNAME */ @@ -234,6 +236,8 @@ STATIC void pmap_pvo_verify(void); #endif STATIC vaddr_t pmap_steal_memory(vsize_t, vaddr_t *, vaddr_t *); STATIC void pmap_bootstrap(paddr_t, paddr_t); +STATIC void pmap_bootstrap1(paddr_t, paddr_t); +STATIC void pmap_bootstrap2(void); #ifdef PMAPNAME const struct pmap_ops PMAPNAME(ops) = {
CVS commit: src/sys/dev/usb
Module Name:src Committed By: gdt Date: Tue Mar 2 00:18:22 UTC 2021 Modified Files: src/sys/dev/usb: ukbd.c Log Message: ukbd: GC some 20 year old code (NFC) Long ago, code was improved to allow detaching keyboards that were the console, but the old commen and panic() were #if 0'd instead of removed. To generate a diff of this commit: cvs rdiff -u -r1.148 -r1.149 src/sys/dev/usb/ukbd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/ukbd.c diff -u src/sys/dev/usb/ukbd.c:1.148 src/sys/dev/usb/ukbd.c:1.149 --- src/sys/dev/usb/ukbd.c:1.148 Tue Mar 2 00:01:27 2021 +++ src/sys/dev/usb/ukbd.c Tue Mar 2 00:18:22 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ukbd.c,v 1.148 2021/03/02 00:01:27 gdt Exp $*/ +/* $NetBSD: ukbd.c,v 1.149 2021/03/02 00:18:22 gdt Exp $*/ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.148 2021/03/02 00:01:27 gdt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.149 2021/03/02 00:18:22 gdt Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -555,17 +555,6 @@ ukbd_detach(device_t self, int flags) pmf_device_deregister(self); if (sc->sc_console_keyboard) { -#if 0 - /* - * XXX Should probably disconnect our consops, - * XXX and either notify some other keyboard that - * XXX it can now be the console, or if there aren't - * XXX any more USB keyboards, set ukbd_is_console - * XXX back to 1 so that the next USB keyboard attached - * XXX to the system will get it. - */ - panic("ukbd_detach: console keyboard"); -#else /* * Disconnect our consops and set ukbd_is_console * back to 1 so that the next USB keyboard attached @@ -577,7 +566,6 @@ ukbd_detach(device_t self, int flags) device_xname(sc->sc_hdev.sc_dev)); wskbd_cndetach(); ukbd_is_console = 1; -#endif } /* No need to do reference counting of ukbd, wskbd has all the goo. */ if (sc->sc_wskbddev != NULL)
CVS commit: src/sys/dev/usb
Module Name:src Committed By: gdt Date: Tue Mar 2 00:01:27 UTC 2021 Modified Files: src/sys/dev/usb: ukbd.c Log Message: ukbd: Condition probe-time verbosity on USBVERBOSE Previously, this driver switched on more verbose messages based on DIAGNOSTIC. But, the messages weren't about an impossible-to-reach condition, just extra keys. Change the condition to USBVERBOSE, documented as serving this purpose. To generate a diff of this commit: cvs rdiff -u -r1.147 -r1.148 src/sys/dev/usb/ukbd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/ukbd.c diff -u src/sys/dev/usb/ukbd.c:1.147 src/sys/dev/usb/ukbd.c:1.148 --- src/sys/dev/usb/ukbd.c:1.147 Sat Sep 12 18:10:37 2020 +++ src/sys/dev/usb/ukbd.c Tue Mar 2 00:01:27 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ukbd.c,v 1.147 2020/09/12 18:10:37 macallan Exp $*/ +/* $NetBSD: ukbd.c,v 1.148 2021/03/02 00:01:27 gdt Exp $*/ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.147 2020/09/12 18:10:37 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.148 2021/03/02 00:01:27 gdt Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -435,7 +435,7 @@ ukbd_attach(device_t parent, device_t se sc->sc_flags = FLAG_GDIUM_FN; #endif -#ifdef DIAGNOSTIC +#ifdef USBVERBOSE aprint_normal(": %d Variable keys, %d Array codes", sc->sc_nkeyloc, sc->sc_nkeycode); if (sc->sc_flags & FLAG_APPLE_FN)
CVS commit: src/etc/rc.d
Module Name:src Committed By: christos Date: Mon Mar 1 23:02:30 UTC 2021 Modified Files: src/etc/rc.d: amd Log Message: require NETWORKING otherwise amd can come up before the network is up and it needs to be able to do DNS. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/etc/rc.d/amd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.d/amd diff -u src/etc/rc.d/amd:1.17 src/etc/rc.d/amd:1.18 --- src/etc/rc.d/amd:1.17 Sat Feb 22 06:55:43 2020 +++ src/etc/rc.d/amd Mon Mar 1 18:02:30 2021 @@ -1,10 +1,10 @@ #!/bin/sh # -# $NetBSD: amd,v 1.17 2020/02/22 11:55:43 roy Exp $ +# $NetBSD: amd,v 1.18 2021/03/01 23:02:30 christos Exp $ # # PROVIDE: amd -# REQUIRE: rpcbind mountall ypbind +# REQUIRE: NETWORKING rpcbind mountall ypbind # BEFORE: DAEMON $_rc_subr_loaded . /etc/rc.subr
CVS commit: src/sys/dev/usb
Module Name:src Committed By: mrg Date: Mon Mar 1 22:59:52 UTC 2021 Modified Files: src/sys/dev/usb: usbnet.h Log Message: note that "enum usbnet_ep un_ed" member is the wrong type, and should be "uByte un_ed", and fix when we version this next. noticed by martin@ To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/dev/usb/usbnet.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/usbnet.h diff -u src/sys/dev/usb/usbnet.h:1.19 src/sys/dev/usb/usbnet.h:1.20 --- src/sys/dev/usb/usbnet.h:1.19 Wed Oct 28 01:51:45 2020 +++ src/sys/dev/usb/usbnet.h Mon Mar 1 22:59:52 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: usbnet.h,v 1.19 2020/10/28 01:51:45 mrg Exp $ */ +/* $NetBSD: usbnet.h,v 1.20 2021/03/01 22:59:52 mrg Exp $ */ /* * Copyright (c) 2019 Matthew R. Green @@ -261,6 +261,9 @@ struct usbnet { /* * This section should be filled in before calling * usbnet_attach_ifp(). + * + * XXX This should be of type "uByte". enum usbnet_ep + * is the index. Fix this in a kernel version bump. */ enum usbnet_ep un_ed[USBNET_ENDPT_MAX];
CVS commit: src/doc
Module Name:src Committed By: christos Date: Mon Mar 1 22:07:58 UTC 2021 Modified Files: src/doc: 3RDPARTY Log Message: update some versions To generate a diff of this commit: cvs rdiff -u -r1.1782 -r1.1783 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1782 src/doc/3RDPARTY:1.1783 --- src/doc/3RDPARTY:1.1782 Sun Feb 28 23:43:54 2021 +++ src/doc/3RDPARTY Mon Mar 1 17:07:58 2021 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1782 2021/03/01 04:43:54 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.1783 2021/03/01 22:07:58 christos Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -440,7 +440,7 @@ Current Vers: 2.6.4 Maintainer: Will Estes Archive Site: https://github.com/westes/flex/releases Home Page: https://github.com/westes/flex -Date: 2020-06-13 +Date: 2021-03-01 Mailing List: http://lists.sourceforge.net/mailman/listinfo/flex-announce Responsible: License: BSD-like @@ -545,9 +545,9 @@ Package: heimdal Version: 7.7.0 Current Vers: 7.7.0 Maintainer: Heimdal -Archive Site: https://github.com/heimdal/heimdal/releases/download/ +Archive Site: https://github.com/heimdal/heimdal/releases/ Home Page: http://www.h5l.org/ -Date: 2020-06-13 +Date: 2021-03-01 Mailing List: heimdal-disc...@sics.se Responsible: joda, lha License: BSD @@ -616,7 +616,7 @@ Current Vers: 5.2.1 Maintainer: Jason Evans Archive Site: https://github.com/jemalloc/jemalloc Home Page: https://jemalloc.net -Date: 2020-06-13 +Date: 2021-03-01 Mailing List: Responsible: christos License: BSD @@ -711,12 +711,12 @@ for importation. Run ./configure before Talk to mrg before importing any new version. Package: libarchive -Version: 3.4.0 +Version: 3.5.1 Current Vers: 3.4.3 Maintainer: kient...@freebsd.org, jo...@netbsd.org Archive Site: https://github.com/libarchive/libarchive/releases Home Page: http://www.libarchive.org -Date: 2020-06-13 +Date: 2021-03-01 Responsible: joerg License: BSD (2-clause) Location: external/bsd/libarchive/dist @@ -739,11 +739,11 @@ repository. See the lvm2tools Notes for Package: libevent Version: 2.1.8-stable -Current Vers: 2.1.11-stable +Current Vers: 2.1.12-stable Maintainer: Niels Provos Archive Site: http://www.monkey.org/~provos/libevent/ Home Page: http://www.monkey.org/~provos/libevent/ -Date: 2020-06-13 +Date: 2021-03-01 Responsible: License: BSD (3/4-clause) Location: external/bsd/libevent/dist @@ -789,7 +789,7 @@ Current Vers: 1.9.1 Maintainer: tcpdump-work...@tcpdump.org Archive Site: http://www.tcpdump.org/release/ Home Page: http://www.tcpdump.org/ -Date: 2019-10-01 +Date: 2021-03-01 Mailing List: tcpdump-work...@tcpdump.org Responsible: dyoung License: BSD (3/4-clause) @@ -804,7 +804,7 @@ Current Vers: 4.9.3 Maintainer: tcpdump-work...@lists.tcpdump.org Archive Site: http://www.tcpdump.org/release/ Home Page: http://www.tcpdump.org/ -Date: 2020-06-13 +Date: 2021-03-01 Mailing List: tcpdump-work...@lists.tcpdump.org Responsible: License: BSD (3-clause) @@ -892,7 +892,7 @@ Current Vers: 1.14.5 Maintainer: Kristaps Džonsons/Ingo Schwarze Archive Site: http://mandoc.bsd.lv/snapshots/ Home Page: http://mandoc.bsd.lv/ -Date: 2020-06-13 +Date: 2021-03-01 Mailing List: Responsible: joerg License: BSD (2-clause) @@ -994,7 +994,7 @@ Current Vers: 4.2.8p14 Maintainer: David L. Mills Archive Site: http://www.ntp.org/ Home Page: http://www.ntp.org/, http://support.ntp.org/ -Date: 2020-06-13 +Date: 2021-03-01 Mailing List: Responsible: simonb, jonathan, kardel License: BSD-like @@ -1018,11 +1018,11 @@ We have lots of local fixes. Package: OpenLDAP Version: 2.4.50 -Current Vers: 2.4.50 +Current Vers: 2.4.57 Maintainer: OpenLDAP Foundation Archive Site: http://www.openldap.org/ Home Page: http://www.openldap.org/ -Date: 2020-08-11 +Date: 2021-03-01 Mailing List: Responsible: License: BSD (3-clause) @@ -1035,7 +1035,7 @@ Current Vers: 20190224 (Tabebuia) Maintainer: Dag-Erling Smørgrav Archive Site: http://www.openpam.org/ Home Page: http://www.openpam.org/ -Date: 2020-06-13 +Date: 2021-03-01 Mailing List: Responsible: christos License: BSD (3-clause) @@ -1075,7 +1075,7 @@ Current Vers: 8.4 / portable 8.4p1 Maintainer: OpenSSH Archive Site: http://www.openssh.com/ftp.html Home Page: http://www.openssh.com/portable.html -Date: 2020-12-04 +Date: 2021-03-01 Mailing List: openssh-unix-annou...@mindrot.org Responsible: thorpej, christos, elric License: BSD. See src/crypto/external/bsd/openssh/dist/LICENSE @@ -1221,12 +1221,12 @@ and more. Vern's ping is gone. We are to now to do a new import. Package: Postfix -Version: 3.5.2 +Version: 3.5.9 Current Vers: 3.5.2 Maintainer: Wietse Venema Archive Site: Home Page: http://www.postfix.org/ -Date: 2020-06-13
CVS commit: src/usr.bin/newsyslog
Module Name:src Committed By: wiz Date: Mon Mar 1 21:43:00 UTC 2021 Modified Files: src/usr.bin/newsyslog: newsyslog.8 Log Message: Sort options in synopsis To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/usr.bin/newsyslog/newsyslog.8 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/newsyslog/newsyslog.8 diff -u src/usr.bin/newsyslog/newsyslog.8:1.42 src/usr.bin/newsyslog/newsyslog.8:1.43 --- src/usr.bin/newsyslog/newsyslog.8:1.42 Mon Mar 1 21:37:10 2021 +++ src/usr.bin/newsyslog/newsyslog.8 Mon Mar 1 21:43:00 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: newsyslog.8,v 1.42 2021/03/01 21:37:10 otis Exp $ +.\" $NetBSD: newsyslog.8,v 1.43 2021/03/01 21:43:00 wiz Exp $ .\" .\" Copyright (c) 1999, 2000 Andrew Doran .\" All rights reserved. @@ -49,7 +49,7 @@ .Nd maintain system log files to manageable sizes .Sh SYNOPSIS .Nm newsyslog -.Op Fl nrsvF +.Op Fl Fnrsv .Op Fl f Ar config_file .Op Pa file ... .Sh DESCRIPTION
CVS commit: src/usr.bin/newsyslog
Module Name:src Committed By: otis Date: Mon Mar 1 21:37:10 UTC 2021 Modified Files: src/usr.bin/newsyslog: newsyslog.8 newsyslog.c Log Message: Implement 'E' flag that prevents newsyslog from rotating empty log files. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/usr.bin/newsyslog/newsyslog.8 cvs rdiff -u -r1.61 -r1.62 src/usr.bin/newsyslog/newsyslog.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/newsyslog/newsyslog.8 diff -u src/usr.bin/newsyslog/newsyslog.8:1.41 src/usr.bin/newsyslog/newsyslog.8:1.42 --- src/usr.bin/newsyslog/newsyslog.8:1.41 Mon Oct 23 01:06:52 2017 +++ src/usr.bin/newsyslog/newsyslog.8 Mon Mar 1 21:37:10 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: newsyslog.8,v 1.41 2017/10/23 01:06:52 wiz Exp $ +.\" $NetBSD: newsyslog.8,v 1.42 2021/03/01 21:37:10 otis Exp $ .\" .\" Copyright (c) 1999, 2000 Andrew Doran .\" All rights reserved. @@ -40,7 +40,7 @@ .\" .\" from FreeBSD: newsyslog.8,v 1.14.2.1 1999/02/25 18:38:33 wollman Exp .\" -.Dd June 16, 2012 +.Dd March 1, 2021 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -313,6 +313,13 @@ format: the ASCII message which inserts to indicate that the logs have been trimmed should not be included. .It Sy c Create an empty log file if none currently exists. +.It Sy e +Do not rotate log file with zero size (empty). +This flag is mostly usable in conjunction with +.Ar b +flag that prevents +.Nm +from inserting an ASCII informational message. .It Sy n No signal should be sent when the log is trimmed. .It Sy p Index: src/usr.bin/newsyslog/newsyslog.c diff -u src/usr.bin/newsyslog/newsyslog.c:1.61 src/usr.bin/newsyslog/newsyslog.c:1.62 --- src/usr.bin/newsyslog/newsyslog.c:1.61 Thu Sep 5 11:34:40 2013 +++ src/usr.bin/newsyslog/newsyslog.c Mon Mar 1 21:37:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: newsyslog.c,v 1.61 2013/09/05 11:34:40 prlw1 Exp $ */ +/* $NetBSD: newsyslog.c,v 1.62 2021/03/01 21:37:10 otis Exp $ */ /* * Copyright (c) 1999, 2000 Andrew Doran @@ -55,7 +55,7 @@ #include #ifndef lint -__RCSID("$NetBSD: newsyslog.c,v 1.61 2013/09/05 11:34:40 prlw1 Exp $"); +__RCSID("$NetBSD: newsyslog.c,v 1.62 2021/03/01 21:37:10 otis Exp $"); #endif /* not lint */ #include @@ -94,6 +94,7 @@ __RCSID("$NetBSD: newsyslog.c,v 1.61 201 #define CE_PLAIN0 0x10 /* Do not compress zero'th history file */ #define CE_SYSLPROTOCOL 0x20 /* log in syslog-protocol format, not configurable but detected at runtime */ +#define CE_NOEMPTY 0x40 /* Do not rotate empty log file */ struct conf_entry { uid_t uid; /* Owner of log */ @@ -372,6 +373,9 @@ parse_cfgline(struct conf_entry *log, FI case 'C': log->flags |= CE_CREATE; break; + case 'E': + log->flags |= CE_NOEMPTY; + break; case 'N': log->flags |= CE_NOSIGNAL; break; @@ -462,6 +466,14 @@ log_examine(struct conf_entry *log, int return; } + /* Skip rotation of empty log file when flag + * E is specified + */ + if (sb.st_size == 0 && (log->flags & CE_NOEMPTY) != 0) { + PRHDRINFO(("empty file --> skip log\n")); + return; + } + /* Size of the log file in kB. */ size = ((size_t)sb.st_blocks * S_BLKSIZE) >> 10;
CVS commit: src/distrib/sets/lists/man
Module Name:src Committed By: jakllsch Date: Mon Mar 1 21:01:39 UTC 2021 Modified Files: src/distrib/sets/lists/man: mi Log Message: and the html for rge(4)... To generate a diff of this commit: cvs rdiff -u -r1.1715 -r1.1716 src/distrib/sets/lists/man/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/man/mi diff -u src/distrib/sets/lists/man/mi:1.1715 src/distrib/sets/lists/man/mi:1.1716 --- src/distrib/sets/lists/man/mi:1.1715 Mon Mar 1 18:01:05 2021 +++ src/distrib/sets/lists/man/mi Mon Mar 1 21:01:39 2021 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1715 2021/03/01 18:01:05 jakllsch Exp $ +# $NetBSD: mi,v 1.1716 2021/03/01 21:01:39 jakllsch Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -4814,6 +4814,7 @@ ./usr/share/man/html4/rcons.html man-sys-htmlman html ./usr/share/man/html4/rdcphy.html man-sys-htmlman html ./usr/share/man/html4/re.html man-sys-htmlman html +./usr/share/man/html4/rge.html man-sys-htmlman html ./usr/share/man/html4/rgephy.html man-sys-htmlman html ./usr/share/man/html4/rlphy.html man-sys-htmlman html ./usr/share/man/html4/rmidi.html man-sys-htmlman html
CVS commit: src/sys/dev
Module Name:src Committed By: jakllsch Date: Mon Mar 1 18:18:39 UTC 2021 Modified Files: src/sys/dev: DEVNAMES Log Message: add rge To generate a diff of this commit: cvs rdiff -u -r1.329 -r1.330 src/sys/dev/DEVNAMES 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/DEVNAMES diff -u src/sys/dev/DEVNAMES:1.329 src/sys/dev/DEVNAMES:1.330 --- src/sys/dev/DEVNAMES:1.329 Wed Sep 9 05:23:26 2020 +++ src/sys/dev/DEVNAMES Mon Mar 1 18:18:39 2021 @@ -1,4 +1,4 @@ -# $NetBSD: DEVNAMES,v 1.329 2020/09/09 05:23:26 yamaguchi Exp $ +# $NetBSD: DEVNAMES,v 1.330 2021/03/01 18:18:39 jakllsch Exp $ # # This file contains all used device names and defined attributes in # alphabetical order. New devices added to the system somewhere should first @@ -1146,6 +1146,7 @@ rbox hp300 rd hp300 rd vax re MI +rge MI repulse amiga repulse amigappc rf MI
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Mon Mar 1 18:14:05 UTC 2021 Modified Files: src/share/man/man4: rge.4 Log Message: Fix Dd, comment out OpenBSD-only page. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/rge.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/rge.4 diff -u src/share/man/man4/rge.4:1.2 src/share/man/man4/rge.4:1.3 --- src/share/man/man4/rge.4:1.2 Mon Mar 1 17:58:33 2021 +++ src/share/man/man4/rge.4 Mon Mar 1 18:14:05 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: rge.4,v 1.2 2021/03/01 17:58:33 jakllsch Exp $ +.\" $NetBSD: rge.4,v 1.3 2021/03/01 18:14:05 wiz Exp $ .\" $OpenBSD: rge.4,v 1.4 2020/10/12 02:11:10 kevlo Exp $ .\" .\" Copyright (c) 2019, 2020 Kevin Lo @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: October 12 2020 $ +.Dd March 1, 2021 .Dt RGE 4 .Os .Sh NAME @@ -44,7 +44,7 @@ TP-LINK TL-NG421 Adapter (2500baseT) .Xr intro 4 , .Xr netintro 4 , .Xr pci 4 , -.Xr hostname.if 5 , +.\".Xr hostname.if 5 , .Xr ifconfig 8 .Sh HISTORY The
CVS commit: src/sys/arch
Module Name:src Committed By: jakllsch Date: Mon Mar 1 18:12:58 UTC 2021 Modified Files: src/sys/arch/amd64/conf: GENERIC src/sys/arch/evbarm/conf: GENERIC64 src/sys/arch/i386/conf: GENERIC Log Message: enable rge(4) on x86 and evbarm64 To generate a diff of this commit: cvs rdiff -u -r1.583 -r1.584 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.176 -r1.177 src/sys/arch/evbarm/conf/GENERIC64 cvs rdiff -u -r1.1234 -r1.1235 src/sys/arch/i386/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/conf/GENERIC diff -u src/sys/arch/amd64/conf/GENERIC:1.583 src/sys/arch/amd64/conf/GENERIC:1.584 --- src/sys/arch/amd64/conf/GENERIC:1.583 Sun Jan 24 16:33:48 2021 +++ src/sys/arch/amd64/conf/GENERIC Mon Mar 1 18:12:58 2021 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.583 2021/01/24 16:33:48 jmcneill Exp $ +# $NetBSD: GENERIC,v 1.584 2021/03/01 18:12:58 jakllsch Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.583 $" +#ident "GENERIC-$Revision: 1.584 $" maxusers 64 # estimated number of users @@ -833,6 +833,7 @@ ntwoc* at pci? dev ? function ? # Riscom pcn* at pci? dev ? function ? # AMD PCnet-PCI Ethernet ral* at pci? dev ? function ? # Ralink Technology RT25x0 802.11a/b/g re* at pci? dev ? function ? # Realtek 8139C+/8169/8169S/8110S +rge* at pci? dev ? function ? # Realtek 8125 rtk* at pci? dev ? function ? # Realtek 8129/8139 rtw* at pci? dev ? function ? # Realtek 8180L (802.11) rtwn* at pci? dev ? function ? # Realtek 8188CE/8192CE 802.11b/g/n Index: src/sys/arch/evbarm/conf/GENERIC64 diff -u src/sys/arch/evbarm/conf/GENERIC64:1.176 src/sys/arch/evbarm/conf/GENERIC64:1.177 --- src/sys/arch/evbarm/conf/GENERIC64:1.176 Wed Jan 27 15:52:46 2021 +++ src/sys/arch/evbarm/conf/GENERIC64 Mon Mar 1 18:12:58 2021 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC64,v 1.176 2021/01/27 15:52:46 skrll Exp $ +# $NetBSD: GENERIC64,v 1.177 2021/03/01 18:12:58 jakllsch Exp $ # # GENERIC ARM (aarch64) kernel # @@ -256,6 +256,7 @@ mcx* at pci? dev ? function ? # Mellano mskc* at pci? dev ? function ? # Marvell Yukon 2 Gigabit Ethernet msk* at mskc? re* at pci? dev ? function ? # Realtek RTL8111GS +rge* at pci? dev ? function ? # Realtek 8125 vmx* at pci? dev ? function ? # VMware VMXNET3 wm* at pci? dev ? function ? # Intel Gigabit Ethernet Index: src/sys/arch/i386/conf/GENERIC diff -u src/sys/arch/i386/conf/GENERIC:1.1234 src/sys/arch/i386/conf/GENERIC:1.1235 --- src/sys/arch/i386/conf/GENERIC:1.1234 Wed Jan 20 13:22:08 2021 +++ src/sys/arch/i386/conf/GENERIC Mon Mar 1 18:12:58 2021 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.1234 2021/01/20 13:22:08 nia Exp $ +# $NetBSD: GENERIC,v 1.1235 2021/03/01 18:12:58 jakllsch Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/i386/conf/std.i386" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.1234 $" +#ident "GENERIC-$Revision: 1.1235 $" maxusers 64 # estimated number of users @@ -1001,6 +1001,7 @@ ntwoc* at pci? dev ? function ? # Riscom pcn* at pci? dev ? function ? # AMD PCnet-PCI Ethernet ral* at pci? dev ? function ? # Ralink Technology RT25x0 802.11a/b/g re* at pci? dev ? function ? # Realtek 8139C+/8169/8169S/8110S +rge* at pci? dev ? function ? # Realtek 8125 rtk* at pci? dev ? function ? # Realtek 8129/8139 rtw* at pci? dev ? function ? # Realtek 8180L (802.11) rtwn* at pci? dev ? function ? # Realtek 8188CE/8192CE 802.11b/g/n
CVS commit: src/share/man/man4
Module Name:src Committed By: jakllsch Date: Mon Mar 1 18:08:36 UTC 2021 Modified Files: src/share/man/man4: pci.4 Log Message: link to rge(4) from pci(4) To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/share/man/man4/pci.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/pci.4 diff -u src/share/man/man4/pci.4:1.104 src/share/man/man4/pci.4:1.105 --- src/share/man/man4/pci.4:1.104 Sat Feb 27 11:06:32 2021 +++ src/share/man/man4/pci.4 Mon Mar 1 18:08:36 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: pci.4,v 1.104 2021/02/27 11:06:32 nia Exp $ +.\" $NetBSD: pci.4,v 1.105 2021/03/01 18:08:36 jakllsch Exp $ .\" .\" Copyright (c) 1997 Jason R. Thorpe. All rights reserved. .\" Copyright (c) 1997 Jonathan Stone @@ -29,7 +29,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 27, 2021 +.Dd March 1, 2021 .Dt PCI 4 .Os .Sh NAME @@ -287,6 +287,11 @@ interfaces. Ralink Technology RT2500/RT2600-based 802.11a/b/g wireless network interfaces. .It re Realtek 10/100/1000 Ethernet adapters. +.It rge +.Tn Realtek +RTL8125-based +.Tn Ethernet +interfaces. .It rtk Realtek 8129/8139 based .Tn Ethernet
CVS commit: src
Module Name:src Committed By: jakllsch Date: Mon Mar 1 18:01:05 UTC 2021 Modified Files: src/distrib/sets/lists/man: mi src/share/man/man4: Makefile Log Message: install rge(4) manual To generate a diff of this commit: cvs rdiff -u -r1.1714 -r1.1715 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.711 -r1.712 src/share/man/man4/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/man/mi diff -u src/distrib/sets/lists/man/mi:1.1714 src/distrib/sets/lists/man/mi:1.1715 --- src/distrib/sets/lists/man/mi:1.1714 Fri Feb 26 11:05:33 2021 +++ src/distrib/sets/lists/man/mi Mon Mar 1 18:01:05 2021 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1714 2021/02/26 11:05:33 nia Exp $ +# $NetBSD: mi,v 1.1715 2021/03/01 18:01:05 jakllsch Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -7879,6 +7879,7 @@ ./usr/share/man/man4/rcons.4 man-sys-man .man ./usr/share/man/man4/rdcphy.4 man-sys-man .man ./usr/share/man/man4/re.4 man-sys-man .man +./usr/share/man/man4/rge.4 man-sys-man .man ./usr/share/man/man4/rgephy.4 man-sys-man .man ./usr/share/man/man4/rl.4 man-obsolete obsolete ./usr/share/man/man4/rlphy.4 man-sys-man .man Index: src/share/man/man4/Makefile diff -u src/share/man/man4/Makefile:1.711 src/share/man/man4/Makefile:1.712 --- src/share/man/man4/Makefile:1.711 Tue Oct 27 08:57:10 2020 +++ src/share/man/man4/Makefile Mon Mar 1 18:01:05 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.711 2020/10/27 08:57:10 ryo Exp $ +# $NetBSD: Makefile,v 1.712 2021/03/01 18:01:05 jakllsch Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \ @@ -52,7 +52,7 @@ MAN= aac.4 ac97.4 acardide.4 aceride.4 a pppoe.4 \ pseye.4 ptcd.4 ptm.4 pty.4 puc.4 pud.4 puffs.4 pwdog.4 px.4 pxagpio.4 \ pxaip.4 pxg.4 qat.4 qe.4 qec.4 qemufwcfg.4 qsphy.4 \ - raid.4 ral.4 ray.4 rcons.4 rdcphy.4 re.4 rgephy.4 rlphy.4 \ + raid.4 ral.4 ray.4 rcons.4 rdcphy.4 re.4 rge.4 rgephy.4 rlphy.4 \ rnd.4 route.4 rs5c372rtc.4 rtk.4 rtsx.4 rtw.4 rtwn.4 rum.4 run.4 \ s390rtc.4 satalink.4 sbus.4 schide.4 \ scsi.4 sctp.4 sd.4 se.4 seeprom.4 sem.4 \
CVS commit: src/share/man/man4
Module Name:src Committed By: jakllsch Date: Mon Mar 1 17:58:33 UTC 2021 Modified Files: src/share/man/man4: rge.4 Log Message: update rge(4) manual page from OpenBSD To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/rge.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/rge.4 diff -u src/share/man/man4/rge.4:1.1 src/share/man/man4/rge.4:1.2 --- src/share/man/man4/rge.4:1.1 Sat Jan 11 20:56:50 2020 +++ src/share/man/man4/rge.4 Mon Mar 1 17:58:33 2021 @@ -1,7 +1,7 @@ -.\" $NetBSD: rge.4,v 1.1 2020/01/11 20:56:50 sevan Exp $ -.\" $OpenBSD: rge.4,v 1.2 2019/11/18 22:09:59 jmc Exp $ +.\" $NetBSD: rge.4,v 1.2 2021/03/01 17:58:33 jakllsch Exp $ +.\" $OpenBSD: rge.4,v 1.4 2020/10/12 02:11:10 kevlo Exp $ .\" -.\" Copyright (c) 2019 Kevin Lo +.\" Copyright (c) 2019, 2020 Kevin Lo .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above @@ -15,25 +15,28 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: November 18 2019 $ +.Dd $Mdocdate: October 12 2020 $ .Dt RGE 4 .Os .Sh NAME .Nm rge -.Nd Realtek 8125 PCI Express 2.5Gb Ethernet device +.Nd Realtek 8125/8125B PCI Express 2.5Gb Ethernet device .Sh SYNOPSIS .Cd "rge* at pci?" .Sh DESCRIPTION The .Nm driver provides support for PCI Express 2.5Gb Ethernet adapters based -on the Realtek RTL8125 Ethernet controller, including the following: +on the Realtek RTL8125 and RTL8125B Ethernet controllers, +including the following: .Pp .Bl -bullet -offset indent -compact .It -Realtek RTL8125 2.5GbE Adapter (2500baseT) +Realtek 8125/8125B 2.5GbE Adapter (2500baseT) .It Rivet Networks Killer E3000 Adapter (2500baseT) +.It +TP-LINK TL-NG421 Adapter (2500baseT) .El .Sh SEE ALSO .Xr arp 4 ,
CVS commit: src/sys/arch
Module Name:src Committed By: jakllsch Date: Mon Mar 1 17:53:29 UTC 2021 Modified Files: src/sys/arch/amd64/conf: ALL src/sys/arch/i386/conf: ALL Log Message: add rge(4) to x86 ALL kernels To generate a diff of this commit: cvs rdiff -u -r1.165 -r1.166 src/sys/arch/amd64/conf/ALL cvs rdiff -u -r1.497 -r1.498 src/sys/arch/i386/conf/ALL Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/conf/ALL diff -u src/sys/arch/amd64/conf/ALL:1.165 src/sys/arch/amd64/conf/ALL:1.166 --- src/sys/arch/amd64/conf/ALL:1.165 Sun Dec 13 08:23:52 2020 +++ src/sys/arch/amd64/conf/ALL Mon Mar 1 17:53:29 2021 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.165 2020/12/13 08:23:52 martin Exp $ +# $NetBSD: ALL,v 1.166 2021/03/01 17:53:29 jakllsch Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "ALL-$Revision: 1.165 $" +#ident "ALL-$Revision: 1.166 $" maxusers 64 # estimated number of users @@ -1002,6 +1002,7 @@ ntwoc* at pci? dev ? function ? # Riscom pcn* at pci? dev ? function ? # AMD PCnet-PCI Ethernet ral* at pci? dev ? function ? # Ralink Technology RT25x0 802.11a/b/g re* at pci? dev ? function ? # Realtek 8139C+/8169/8169S/8110S +rge* at pci? dev ? function ? # Realtek 8125 rtk* at pci? dev ? function ? # Realtek 8129/8139 rtw* at pci? dev ? function ? # Realtek 8180L (802.11) rtwn* at pci? dev ? function ? # Realtek 8188CE/8192CE 802.11b/g/n Index: src/sys/arch/i386/conf/ALL diff -u src/sys/arch/i386/conf/ALL:1.497 src/sys/arch/i386/conf/ALL:1.498 --- src/sys/arch/i386/conf/ALL:1.497 Sun Sep 27 13:48:51 2020 +++ src/sys/arch/i386/conf/ALL Mon Mar 1 17:53:29 2021 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.497 2020/09/27 13:48:51 roy Exp $ +# $NetBSD: ALL,v 1.498 2021/03/01 17:53:29 jakllsch Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ include "arch/i386/conf/std.i386" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "ALL-$Revision: 1.497 $" +#ident "ALL-$Revision: 1.498 $" maxusers 64 # estimated number of users @@ -1081,6 +1081,7 @@ ntwoc* at pci? dev ? function ? # Riscom pcn* at pci? dev ? function ? # AMD PCnet-PCI Ethernet ral* at pci? dev ? function ? # Ralink Technology RT25x0 802.11a/b/g re* at pci? dev ? function ? # Realtek 8139C+/8169/8169S/8110S +rge* at pci? dev ? function ? # Realtek 8125 rtk* at pci? dev ? function ? # Realtek 8129/8139 rtw* at pci? dev ? function ? # Realtek 8180L (802.11) sf* at pci? dev ? function ? # Adaptec AIC-6915 Ethernet
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jakllsch Date: Mon Mar 1 17:48:52 UTC 2021 Modified Files: src/sys/dev/pci: files.pci if_rge.c if_rgereg.h Log Message: Update rge(4) from older OpenBSD, finish porting. Should consider merging this all into re(4) and rgephy(4) someday. Some cleanup tasks remain here. To generate a diff of this commit: cvs rdiff -u -r1.434 -r1.435 src/sys/dev/pci/files.pci cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pci/if_rge.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/if_rgereg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/files.pci diff -u src/sys/dev/pci/files.pci:1.434 src/sys/dev/pci/files.pci:1.435 --- src/sys/dev/pci/files.pci:1.434 Wed Feb 17 08:15:43 2021 +++ src/sys/dev/pci/files.pci Mon Mar 1 17:48:52 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.pci,v 1.434 2021/02/17 08:15:43 knakahara Exp $ +# $NetBSD: files.pci,v 1.435 2021/03/01 17:48:52 jakllsch Exp $ # # Config file and device description for machine-independent PCI code. # Included by ports that need it. Requires that the SCSI files be @@ -1183,3 +1183,8 @@ device vmx: ether, ifnet, arp attach vmx at pci file dev/pci/if_vmx.c vmx +# Realtek RTL8125 2.5GBASE-T Ethernet +device rge: ether, ifnet, arp, mii +attach rge at pci +file dev/pci/if_rge.c rge + Index: src/sys/dev/pci/if_rge.c diff -u src/sys/dev/pci/if_rge.c:1.16 src/sys/dev/pci/if_rge.c:1.17 --- src/sys/dev/pci/if_rge.c:1.16 Wed Jan 27 14:25:22 2021 +++ src/sys/dev/pci/if_rge.c Mon Mar 1 17:48:52 2021 @@ -1,8 +1,8 @@ -/* $NetBSD: if_rge.c,v 1.16 2021/01/27 14:25:22 jakllsch Exp $ */ -/* $OpenBSD: if_rge.c,v 1.4 2020/07/10 13:26:38 patrick Exp $ */ +/* $NetBSD: if_rge.c,v 1.17 2021/03/01 17:48:52 jakllsch Exp $ */ +/* $OpenBSD: if_rge.c,v 1.9 2020/12/12 11:48:53 jan Exp $ */ /* - * Copyright (c) 2019 Kevin Lo + * Copyright (c) 2019, 2020 Kevin Lo * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -18,9 +18,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.16 2021/01/27 14:25:22 jakllsch Exp $"); - -/* #include "vlan.h" Sevan */ +__KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1.17 2021/03/01 17:48:52 jakllsch Exp $"); #include @@ -46,9 +44,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1 #include #include -#if NBPFILTER > 0 #include -#endif #include #include @@ -64,16 +60,10 @@ __KERNEL_RCSID(0, "$NetBSD: if_rge.c,v 1 #ifdef __NetBSD__ #define letoh32 htole32 #define nitems(x) __arraycount(x) -#define MBUF_LIST_INITIALIZER() { NULL, NULL, 0 } -struct mbuf_list { - struct mbuf *ml_head; - struct mbuf *ml_tail; - u_int ml_len; -}; static struct mbuf * -MCLGETI(struct rge_softc *sc __unused, int how, -struct ifnet *ifp __unused, u_int size) +MCLGETL(struct rge_softc *sc __unused, int how, +u_int size) { struct mbuf *m; @@ -97,6 +87,13 @@ MCLGETI(struct rge_softc *sc __unused, i #endif #endif +#ifdef RGE_DEBUG +#define DPRINTF(x) do { if (rge_debug > 0) printf x; } while (0) +int rge_debug = 0; +#else +#define DPRINTF(x) +#endif + static int rge_match(device_t, cfdata_t, void *); static void rge_attach(device_t, device_t, void *); int rge_intr(void *); @@ -105,7 +102,7 @@ int rge_ioctl(struct ifnet *, u_long, v void rge_start(struct ifnet *); void rge_watchdog(struct ifnet *); int rge_init(struct ifnet *); -void rge_stop(struct ifnet *); +void rge_stop(struct ifnet *, int); int rge_ifmedia_upd(struct ifnet *); void rge_ifmedia_sts(struct ifnet *, struct ifmediareq *); int rge_allocmem(struct rge_softc *); @@ -119,6 +116,11 @@ void rge_reset(struct rge_softc *); void rge_iff(struct rge_softc *); void rge_set_phy_power(struct rge_softc *, int); void rge_phy_config(struct rge_softc *); +void rge_phy_config_mac_cfg2(struct rge_softc *); +void rge_phy_config_mac_cfg3(struct rge_softc *); +void rge_phy_config_mac_cfg4(struct rge_softc *); +void rge_phy_config_mac_cfg5(struct rge_softc *); +void rge_phy_config_mcu(struct rge_softc *, uint16_t); void rge_set_macaddr(struct rge_softc *, const uint8_t *); void rge_get_macaddr(struct rge_softc *, uint8_t *); void rge_hw_init(struct rge_softc *); @@ -126,6 +128,7 @@ void rge_disable_phy_ocp_pwrsave(struct void rge_patch_phy_mcu(struct rge_softc *, int); void rge_add_media_types(struct rge_softc *); void rge_config_imtype(struct rge_softc *, int); +void rge_disable_hw_im(struct rge_softc *); void rge_disable_sim_im(struct rge_softc *); void rge_setup_sim_im(struct rge_softc *); void rge_setup_intr(struct rge_softc *, int); @@ -135,7 +138,9 @@ uint32_t rge_read_csi(struct rge_softc * void rge_write_mac_ocp(struct rge_softc *, uint16_t, uint16_t); uint16_t rge_read_mac_ocp(struct rge_softc *, uint16_t); void rge_write_ephy(struct rge_softc *, uint16_t, uint16_t); +uint16_t
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jakllsch Date: Mon Mar 1 17:41:44 UTC 2021 Modified Files: src/sys/dev/usb: usbnet.c Log Message: reduce aprint_error(9) abuse To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/dev/usb/usbnet.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/usbnet.c diff -u src/sys/dev/usb/usbnet.c:1.39 src/sys/dev/usb/usbnet.c:1.40 --- src/sys/dev/usb/usbnet.c:1.39 Fri Aug 28 17:05:32 2020 +++ src/sys/dev/usb/usbnet.c Mon Mar 1 17:41:44 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: usbnet.c,v 1.39 2020/08/28 17:05:32 riastradh Exp $ */ +/* $NetBSD: usbnet.c,v 1.40 2021/03/01 17:41:44 jakllsch Exp $ */ /* * Copyright (c) 2019 Matthew R. Green @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.39 2020/08/28 17:05:32 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.40 2021/03/01 17:41:44 jakllsch Exp $"); #include #include @@ -350,7 +350,7 @@ usbnet_rxeof(struct usbd_xfer *xfer, voi if (status != USBD_NORMAL_COMPLETION) { if (usbd_ratecheck(>unp_rx_notice)) - aprint_error_dev(un->un_dev, "usb errors on rx: %s\n", + device_printf(un->un_dev, "usb errors on rx: %s\n", usbd_errstr(status)); if (status == USBD_STALLED) usbd_clear_endpoint_stall_async(unp->unp_ep[USBNET_ENDPT_RX]); @@ -422,7 +422,7 @@ usbnet_txeof(struct usbd_xfer *xfer, voi if_statinc(ifp, if_oerrors); if (usbd_ratecheck(>unp_tx_notice)) - aprint_error_dev(un->un_dev, "usb error on tx: %s\n", + device_printf(un->un_dev, "usb error on tx: %s\n", usbd_errstr(status)); if (status == USBD_STALLED) usbd_clear_endpoint_stall_async(unp->unp_ep[USBNET_ENDPT_TX]); @@ -1139,13 +1139,13 @@ usbnet_watchdog(struct ifnet *ifp) usbd_status err; if_statinc(ifp, if_oerrors); - aprint_error_dev(un->un_dev, "watchdog timeout\n"); + device_printf(un->un_dev, "watchdog timeout\n"); if (cd->uncd_tx_cnt > 0) { DPRINTF("uncd_tx_cnt=%ju non zero, aborting pipe", 0, 0, 0, 0); err = usbd_abort_pipe(unp->unp_ep[USBNET_ENDPT_TX]); if (err) - aprint_error_dev(un->un_dev, "pipe abort failed: %s\n", + device_printf(un->un_dev, "pipe abort failed: %s\n", usbd_errstr(err)); if (cd->uncd_tx_cnt != 0) DPRINTF("uncd_tx_cnt now %ju", cd->uncd_tx_cnt, 0, 0, 0);
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jakllsch Date: Mon Mar 1 17:41:00 UTC 2021 Modified Files: src/sys/dev/usb: if_axe.c Log Message: reduce aprint_error(9) abuse To generate a diff of this commit: cvs rdiff -u -r1.131 -r1.132 src/sys/dev/usb/if_axe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/if_axe.c diff -u src/sys/dev/usb/if_axe.c:1.131 src/sys/dev/usb/if_axe.c:1.132 --- src/sys/dev/usb/if_axe.c:1.131 Fri Mar 27 18:04:45 2020 +++ src/sys/dev/usb/if_axe.c Mon Mar 1 17:41:00 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_axe.c,v 1.131 2020/03/27 18:04:45 nisimura Exp $ */ +/* $NetBSD: if_axe.c,v 1.132 2021/03/01 17:41:00 jakllsch Exp $ */ /* $OpenBSD: if_axe.c,v 1.137 2016/04/13 11:03:37 mpi Exp $ */ /* @@ -87,7 +87,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.131 2020/03/27 18:04:45 nisimura Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.132 2021/03/01 17:41:00 jakllsch Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -335,7 +335,7 @@ axe_uno_mii_read_reg(struct usbnet *un, axe_cmd(sc, AXE_CMD_MII_OPMODE_HW, 0, 0, NULL); if (err) { - aprint_error_dev(un->un_dev, "read PHY failed\n"); + device_printf(un->un_dev, "read PHY failed\n"); return EIO; } @@ -422,7 +422,7 @@ axe_uno_mii_statchg(struct ifnet *ifp) DPRINTF("val=%#jx", val, 0, 0, 0); err = axe_cmd(sc, AXE_CMD_WRITE_MEDIA, 0, val, NULL); if (err) - aprint_error_dev(un->un_dev, "media change failed\n"); + device_printf(un->un_dev, "media change failed\n"); } static void @@ -442,7 +442,7 @@ axe_rcvfilt_locked(struct usbnet *un) return; if (axe_cmd(sc, AXE_CMD_RXCTL_READ, 0, 0, )) { - aprint_error_dev(un->un_dev, "can't read rxmode"); + device_printf(un->un_dev, "can't read rxmode"); return; } rxmode = le16toh(rxmode);
CVS commit: src/distrib/sun2/ramdisk
Module Name:src Committed By: martin Date: Mon Mar 1 16:50:01 UTC 2021 Modified Files: src/distrib/sun2/ramdisk: Makefile Log Message: Drop IEEE802.11 support from the ramdisk's ifconfig(8) To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/distrib/sun2/ramdisk/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/sun2/ramdisk/Makefile diff -u src/distrib/sun2/ramdisk/Makefile:1.25 src/distrib/sun2/ramdisk/Makefile:1.26 --- src/distrib/sun2/ramdisk/Makefile:1.25 Tue Jan 24 18:04:05 2017 +++ src/distrib/sun2/ramdisk/Makefile Mon Mar 1 16:50:01 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2017/01/24 18:04:05 christos Exp $ +# $NetBSD: Makefile,v 1.26 2021/03/01 16:50:01 martin Exp $ .include .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" @@ -9,7 +9,7 @@ IMAGESIZE= 600k MAKEFS_FLAGS+= -f 15 -o density=2048 WARNS= 1 -DBG= -Os +DBG= -Os -fno-unwind-tables CRUNCHBIN= rd_bin LISTS= ${.CURDIR}/list @@ -25,6 +25,7 @@ MDSET_RELEASEDIR= binary/kernel # Use stubs to eliminate some large stuff from libc HACKSRC= ${DISTRIBDIR}/utils/libhack +.MAKEFLAGS+= NOIEEE80211=1 .include "${HACKSRC}/Makefile.inc" ${CRUNCHBIN}: libhack.o
CVS commit: src/distrib/sun2/miniroot
Module Name:src Committed By: martin Date: Mon Mar 1 16:49:08 UTC 2021 Modified Files: src/distrib/sun2/miniroot: list Log Message: Now that we use the "hacked" (non-widechar) curses, drop -lcurses To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/distrib/sun2/miniroot/list Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sun2/miniroot/list diff -u src/distrib/sun2/miniroot/list:1.23 src/distrib/sun2/miniroot/list:1.24 --- src/distrib/sun2/miniroot/list:1.23 Tue Oct 6 13:32:41 2020 +++ src/distrib/sun2/miniroot/list Mon Mar 1 16:49:07 2021 @@ -1,5 +1,5 @@ # -# $NetBSD: list,v 1.23 2020/10/06 13:32:41 rin Exp $ +# $NetBSD: list,v 1.24 2021/03/01 16:49:07 martin Exp $ # # The PROM provides a default kernel name of "vmunix" @@ -155,4 +155,4 @@ SPECIAL edlabel srcdir distrib/utils/ed ARGVLN sh -sh LIBS libhack.o -LIBS -lrmt -ledit -lutil -lcurses -lterminfo -lcrypt -ll -lm -lkvm -lz -lprop +LIBS -lrmt -ledit -lutil -lterminfo -lcrypt -ll -lm -lkvm -lz -lprop
CVS commit: src/sbin/ifconfig
Module Name:src Committed By: martin Date: Mon Mar 1 16:47:48 UTC 2021 Modified Files: src/sbin/ifconfig: Makefile.common Log Message: Make IEEE802.11 support optional To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sbin/ifconfig/Makefile.common Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/ifconfig/Makefile.common diff -u src/sbin/ifconfig/Makefile.common:1.5 src/sbin/ifconfig/Makefile.common:1.6 --- src/sbin/ifconfig/Makefile.common:1.5 Tue May 2 20:12:27 2017 +++ src/sbin/ifconfig/Makefile.common Mon Mar 1 16:47:48 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.5 2017/05/02 20:12:27 christos Exp $ +# $NetBSD: Makefile.common,v 1.6 2021/03/01 16:47:48 martin Exp $ # shared stuff with src/distrib/utils/x_ifconfig for install media. # stuff not required by install media should be into Makefile. @@ -11,8 +11,11 @@ DPADD+= ${LIBUTIL} ${LIBPROP} LDADD+= -lutil -lprop INCS+= af_inetany.h env.h extern.h media.h parse.h util.h -SRCS+= af_inet.c af_inetany.c env.c ether.c ieee80211.c \ +SRCS+= af_inet.c af_inetany.c env.c ether.c \ ifconfig.c media.c parse.c tunnel.c util.c vlan.c +.ifndef NOIEEE80211 +SRCS+= ieee80211.c +.endif .ifndef SMALLPROG SRCS+= agr.c l2tp.c .endif
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Mon Mar 1 16:01:06 UTC 2021 Modified Files: src/doc [netbsd-9]: CHANGES-9.2 Log Message: Ticket #1219 To generate a diff of this commit: cvs rdiff -u -r1.1.2.52 -r1.1.2.53 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.52 src/doc/CHANGES-9.2:1.1.2.53 --- src/doc/CHANGES-9.2:1.1.2.52 Sun Feb 28 07:09:00 2021 +++ src/doc/CHANGES-9.2 Mon Mar 1 16:01:06 2021 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.2,v 1.1.2.52 2021/02/28 07:09:00 martin Exp $ +# $NetBSD: CHANGES-9.2,v 1.1.2.53 2021/03/01 16:01:06 martin Exp $ A complete list of changes from the NetBSD 9.1 release to the NetBSD 9.2 release: @@ -1726,3 +1726,9 @@ sys/dev/audio/audio.c1.84 Fix return value of audiopoll(). [isaki, ticket #1218] +sys/dev/audio/audio.c1.89-1.91 + + audio(4): avoid a race condition between audio{,bell}open + and audiodetach. Refactor code around audio_unlink(). + [isaki, ticket #1219] +
CVS commit: [netbsd-9] src/sys/dev/audio
Module Name:src Committed By: martin Date: Mon Mar 1 16:00:08 UTC 2021 Modified Files: src/sys/dev/audio [netbsd-9]: audio.c Log Message: Pull up following revision(s) (requested by isaki in ticket #1219): sys/dev/audio/audio.c: revision 1.89 sys/dev/audio/audio.c: revision 1.90 sys/dev/audio/audio.c: revision 1.91 Change the lock conditions to call audio_unlink(). This can remove a different copy of audio_exlock_enter() in audio_unlink() and can use normal one. Also, in audiodetach(), this can set the exlock at more natual order (before calling audio_unlink()). No noticeable functional changes are intended. Thanks for comments, riastradh@. Protect also audioopen() and audiobellopen() from audiodetach() with psref(9), as well as others(audioread, audiowrite, etc..). - Rename audio_file_enter to audio_sc_acquire_fromfile, audio_file_exit to audio_sc_release, for clarify. These are the reference counter for this sc. - Introduce audio_sc_acquire_foropen for audio{,bell}open. - audio_open needs to examine sc_dying again before inserting it into sc_files, in order to keep sc_files consistency. The race between audiodetach and audioopen is pointed out by riastradh@. Thank you for many advices. Add missing curlwp_bindx() corresponding to curlwp_bind(). Pointed out by riastradh@. To generate a diff of this commit: cvs rdiff -u -r1.28.2.20 -r1.28.2.21 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.28.2.20 src/sys/dev/audio/audio.c:1.28.2.21 --- src/sys/dev/audio/audio.c:1.28.2.20 Sun Feb 28 07:07:38 2021 +++ src/sys/dev/audio/audio.c Mon Mar 1 16:00:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.28.2.20 2021/02/28 07:07:38 martin Exp $ */ +/* $NetBSD: audio.c,v 1.28.2.21 2021/03/01 16:00:08 martin Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -138,7 +138,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.28.2.20 2021/02/28 07:07:38 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.28.2.21 2021/03/01 16:00:08 martin Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -524,8 +524,10 @@ static int audio_exlock_mutex_enter(stru static void audio_exlock_mutex_exit(struct audio_softc *); static int audio_exlock_enter(struct audio_softc *); static void audio_exlock_exit(struct audio_softc *); -static struct audio_softc *audio_file_enter(audio_file_t *, struct psref *); -static void audio_file_exit(struct audio_softc *, struct psref *); +static void audio_sc_acquire_foropen(struct audio_softc *, struct psref *); +static struct audio_softc *audio_sc_acquire_fromfile(audio_file_t *, + struct psref *); +static void audio_sc_release(struct audio_softc *, struct psref *); static int audio_track_waitio(struct audio_softc *, audio_track_t *); static int audioclose(struct file *); @@ -1295,7 +1297,10 @@ audiodetach(device_t self, int flags) if (error) return error; - /* delete sysctl nodes */ + /* + * This waits currently running sysctls to finish if exists. + * After this, no more new sysctls will come. + */ sysctl_teardown(>sc_log); mutex_enter(sc->sc_lock); @@ -1327,9 +1332,10 @@ audiodetach(device_t self, int flags) * that hold sc, and any new calls with files that were for sc will * fail. Thus, we now have exclusive access to the softc. */ + sc->sc_exlock = 1; /* - * Nuke all open instances. + * Clean up all open instances. * Here, we no longer need any locks to traverse sc_files. */ while ((file = SLIST_FIRST(>sc_files)) != NULL) { @@ -1352,7 +1358,6 @@ audiodetach(device_t self, int flags) pmf_device_deregister(self); /* Free resources */ - sc->sc_exlock = 1; if (sc->sc_pmixer) { audio_mixer_destroy(sc, sc->sc_pmixer); kmem_free(sc->sc_pmixer, sizeof(*sc->sc_pmixer)); @@ -1524,18 +1529,41 @@ audio_exlock_exit(struct audio_softc *sc } /* - * Acquire sc from file, and increment the psref count. + * Increment reference counter for this sc. + * This is intended to be used for open. + */ +void +audio_sc_acquire_foropen(struct audio_softc *sc, struct psref *refp) +{ + int s; + + /* Block audiodetach while we acquire a reference */ + s = pserialize_read_enter(); + + /* + * We don't examine sc_dying here. However, all open methods + * call audio_exlock_enter() right after this, so we can examine + * sc_dying in it. + */ + + /* Acquire a reference */ + psref_acquire(refp, >sc_psref, audio_psref_class); + + /* Now sc won't go away until we drop the reference count */ + pserialize_read_exit(s); +} + +/* + * Get sc from file, and increment reference counter for this sc. + * This is intended to be used for methods other than open. * If successful, returns sc. Otherwise returns NULL. */ struct audio_softc * -audio_file_enter(audio_file_t *file, struct psref *refp)
CVS commit: src/external/mit/ctwm/libexec
Module Name:src Committed By: nia Date: Mon Mar 1 15:40:40 UTC 2021 Modified Files: src/external/mit/ctwm/libexec: ctwm_app_menu Log Message: Make this work with a non-standard LOCALBASE. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/mit/ctwm/libexec/ctwm_app_menu Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/ctwm/libexec/ctwm_app_menu diff -u src/external/mit/ctwm/libexec/ctwm_app_menu:1.2 src/external/mit/ctwm/libexec/ctwm_app_menu:1.3 --- src/external/mit/ctwm/libexec/ctwm_app_menu:1.2 Mon Oct 12 11:07:24 2020 +++ src/external/mit/ctwm/libexec/ctwm_app_menu Mon Mar 1 15:40:40 2021 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: ctwm_app_menu,v 1.2 2020/10/12 11:07:24 nia Exp $ +# $NetBSD: ctwm_app_menu,v 1.3 2021/03/01 15:40:40 nia Exp $ # # Copyright (c) 2020 The NetBSD Foundation, Inc. # All rights reserved. @@ -28,13 +28,14 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # +LOCALBASE=$(pkg_info -Q LOCALBASE pkg_install 2>/dev/null || echo /usr/pkg) OFS=$IFS IFS=' ' printf 'menu "appmenu"\n' printf '{\n' printf '\t"Applications"\tf.title\n' -for app in $(find /usr/pkg/share/applications -name '*.desktop'); +for app in $(find $LOCALBASE/share/applications -name '*.desktop'); do name="" exec=""
CVS commit: src/sys/arch/amd64/conf
Module Name:src Committed By: gdt Date: Mon Mar 1 13:52:50 UTC 2021 Modified Files: src/sys/arch/amd64/conf: XEN3_DOM0 Log Message: amd64/conf/XEN3_DOM0: Add comment This commit merely adds a comment explaining how XEN3_DOM0 ought to relate to GENERIC. To generate a diff of this commit: cvs rdiff -u -r1.186 -r1.187 src/sys/arch/amd64/conf/XEN3_DOM0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/conf/XEN3_DOM0 diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.186 src/sys/arch/amd64/conf/XEN3_DOM0:1.187 --- src/sys/arch/amd64/conf/XEN3_DOM0:1.186 Wed Jan 20 13:22:08 2021 +++ src/sys/arch/amd64/conf/XEN3_DOM0 Mon Mar 1 13:52:50 2021 @@ -1,4 +1,14 @@ -# $NetBSD: XEN3_DOM0,v 1.186 2021/01/20 13:22:08 nia Exp $ +# $NetBSD: XEN3_DOM0,v 1.187 2021/03/01 13:52:50 gdt Exp $ + +# XEN3_DOM0 machine description file +# +# This machine description file is used to generate a kernel to be +# used as a PV dom0 under Xen. It is similar to GENERIC in that it is +# intended to be useful for most applications. Generally, besides +# changes that are specifically required for Xen (e.g., XENPV), it +# should be similar to GENERIC. Some differences are currently +# necessary, such as drivers that fail under Xen but work in GENERIC, +# for reasons that do not follow from Xen architecture. include "arch/amd64/conf/std.xen" @@ -12,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed con #options UVMHIST_PRINT #options SYSCALL_DEBUG -#ident "XEN3_DOM0-$Revision: 1.186 $" +#ident "XEN3_DOM0-$Revision: 1.187 $" maxusers 32 # estimated number of users
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: jmcneill Date: Mon Mar 1 11:37:31 UTC 2021 Modified Files: src/sys/arch/aarch64/aarch64: vm_machdep.c Log Message: cpu_lwp_fork: KASSERT -> KASSERTMSG to print the actual value of DAIF if it is not 0 in cpu_lwp_fork To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/aarch64/aarch64/vm_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/vm_machdep.c diff -u src/sys/arch/aarch64/aarch64/vm_machdep.c:1.9 src/sys/arch/aarch64/aarch64/vm_machdep.c:1.10 --- src/sys/arch/aarch64/aarch64/vm_machdep.c:1.9 Thu Oct 15 22:52:08 2020 +++ src/sys/arch/aarch64/aarch64/vm_machdep.c Mon Mar 1 11:37:31 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.9 2020/10/15 22:52:08 rin Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.10 2021/03/01 11:37:31 jmcneill Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #include "opt_ddb.h" #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.9 2020/10/15 22:52:08 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.10 2021/03/01 11:37:31 jmcneill Exp $"); #include #include @@ -163,7 +163,7 @@ cpu_lwp_fork(struct lwp *l1, struct lwp ktf->tf_reg[27] = (uint64_t)func; ktf->tf_reg[28] = (uint64_t)arg; ktf->tf_reg[29] = 0; - KASSERT(reg_daif_read() == 0); + KASSERTMSG(reg_daif_read() == 0, "DAIF=0x%lx", reg_daif_read()); ktf->tf_lr = (uintptr_t)lwp_trampoline; #ifdef DDB ktf->tf_pc = (uint64_t)&_here;
CVS commit: src/sys/arch
Module Name:src Committed By: jmcneill Date: Mon Mar 1 11:29:14 UTC 2021 Modified Files: src/sys/arch/aarch64/include: locore.h src/sys/arch/arm/include: cpufunc.h src/sys/arch/arm/pic: pic_splfuncs.c Log Message: Add DISABLE_INTERRUPT_SAVE(), like DISABLE_INTERRUPT() but also returns the previous state. Use DISABLE_INTERRUPT_SAVE()/ENABLE_INTERRUPT() in pic_splfuncs instead of cpsid()/cpsie(). The difference here is the caller no longer specifies which bits to disable and enable; on arm32 we continue to use I32_bit and on aarch64 we now consistently toggle both IRQ and FIQ state. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/aarch64/include/locore.h cvs rdiff -u -r1.87 -r1.88 src/sys/arch/arm/include/cpufunc.h cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/pic/pic_splfuncs.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/include/locore.h diff -u src/sys/arch/aarch64/include/locore.h:1.8 src/sys/arch/aarch64/include/locore.h:1.9 --- src/sys/arch/aarch64/include/locore.h:1.8 Sat Feb 20 19:27:35 2021 +++ src/sys/arch/aarch64/include/locore.h Mon Mar 1 11:29:14 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.h,v 1.8 2021/02/20 19:27:35 jmcneill Exp $ */ +/* $NetBSD: locore.h,v 1.9 2021/03/01 11:29:14 jmcneill Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -58,11 +58,12 @@ #define cpsie(psw) daif_enable((psw)) #define cpsid(psw) daif_disable((psw)) - -#define ENABLE_INTERRUPT() \ +#define ENABLE_INTERRUPT() \ reg_daifclr_write((DAIF_I|DAIF_F) >> DAIF_SETCLR_SHIFT) -#define DISABLE_INTERRUPT() \ +#define DISABLE_INTERRUPT() \ reg_daifset_write((DAIF_I|DAIF_F) >> DAIF_SETCLR_SHIFT) +#define DISABLE_INTERRUPT_SAVE() \ + daif_disable(DAIF_I|DAIF_F) #define DAIF_MASK (DAIF_D|DAIF_A|DAIF_I|DAIF_F) Index: src/sys/arch/arm/include/cpufunc.h diff -u src/sys/arch/arm/include/cpufunc.h:1.87 src/sys/arch/arm/include/cpufunc.h:1.88 --- src/sys/arch/arm/include/cpufunc.h:1.87 Sun Feb 7 21:15:40 2021 +++ src/sys/arch/arm/include/cpufunc.h Mon Mar 1 11:29:14 2021 @@ -353,8 +353,9 @@ enable_interrupts(uint32_t mask) #define restore_interrupts(old_cpsr) \ (__set_cpsr_c((I32_bit | F32_bit), (old_cpsr) & (I32_bit | F32_bit))) -#define ENABLE_INTERRUPT() cpsie(I32_bit) -#define DISABLE_INTERRUPT() cpsid(I32_bit) +#define ENABLE_INTERRUPT() cpsie(I32_bit) +#define DISABLE_INTERRUPT() cpsid(I32_bit) +#define DISABLE_INTERRUPT_SAVE() cpsid(I32_bit) static inline void cpsie(register_t psw) __attribute__((__unused__)); static inline register_t cpsid(register_t psw) __attribute__((__unused__)); Index: src/sys/arch/arm/pic/pic_splfuncs.c diff -u src/sys/arch/arm/pic/pic_splfuncs.c:1.18 src/sys/arch/arm/pic/pic_splfuncs.c:1.19 --- src/sys/arch/arm/pic/pic_splfuncs.c:1.18 Mon Feb 22 21:16:25 2021 +++ src/sys/arch/arm/pic/pic_splfuncs.c Mon Mar 1 11:29:14 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pic_splfuncs.c,v 1.18 2021/02/22 21:16:25 jmcneill Exp $ */ +/* $NetBSD: pic_splfuncs.c,v 1.19 2021/03/01 11:29:14 jmcneill Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. @@ -28,7 +28,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: pic_splfuncs.c,v 1.18 2021/02/22 21:16:25 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pic_splfuncs.c,v 1.19 2021/03/01 11:29:14 jmcneill Exp $"); #define _INTR_PRIVATE #include @@ -75,12 +75,13 @@ _spllower(int newipl) const int oldipl = ci->ci_cpl; KDASSERT(panicstr || newipl <= ci->ci_cpl); if (newipl < ci->ci_cpl) { - register_t psw = cpsid(I32_bit); + register_t psw = DISABLE_INTERRUPT_SAVE(); ci->ci_intr_depth++; pic_do_pending_ints(psw, newipl, NULL); ci->ci_intr_depth--; - if ((psw & I32_bit) == 0 || newipl == IPL_NONE) - cpsie(I32_bit); + if ((psw & I32_bit) == 0 || newipl == IPL_NONE) { + ENABLE_INTERRUPT(); + } cpu_dosoftints(); } return oldipl; @@ -113,7 +114,7 @@ splx(int savedipl) static void __noinline splx_dopendingints(struct cpu_info *ci, const int savedipl) { - const register_t psw = cpsid(I32_bit); + const register_t psw = DISABLE_INTERRUPT_SAVE(); ci->ci_intr_depth++; while ((ci->ci_pending_ipls & ~__BIT(savedipl)) > __BIT(savedipl)) { KASSERT(ci->ci_pending_ipls < __BIT(NIPL)); @@ -131,7 +132,7 @@ splx_dopendingints(struct cpu_info *ci, } ci->ci_intr_depth--; if ((psw & I32_bit) == 0) { - cpsie(I32_bit); + ENABLE_INTERRUPT(); } } #endif
CVS commit: src/distrib/sun2/miniroot
Module Name:src Committed By: martin Date: Mon Mar 1 09:24:27 UTC 2021 Modified Files: src/distrib/sun2/miniroot: Makefile Log Message: Drop wide char support to save space To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/distrib/sun2/miniroot/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/sun2/miniroot/Makefile diff -u src/distrib/sun2/miniroot/Makefile:1.38 src/distrib/sun2/miniroot/Makefile:1.39 --- src/distrib/sun2/miniroot/Makefile:1.38 Sun Dec 29 18:26:18 2019 +++ src/distrib/sun2/miniroot/Makefile Mon Mar 1 09:24:27 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.38 2019/12/29 18:26:18 christos Exp $ +# $NetBSD: Makefile,v 1.39 2021/03/01 09:24:27 martin Exp $ .include .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" @@ -13,6 +13,7 @@ KERNEL= ${KERNOBJDIR}/INSTALL/netbsd WARNS= 1 DBG= -Os -fno-unwind-tables +USE_WIDECHAR= no CRUNCHBIN= instbin @@ -45,6 +46,13 @@ IMAGE_RELEASEDIR= installation/miniroot # Use stubs to eliminate some large stuff from libc HACKSRC= ${DISTRIBDIR}/utils/libhack +HACK_CURSES= yes +.MAKEFLAGS+= USE_WIDECHAR=no +.include "${HACKSRC}/Makefile.inc" +${CRUNCHBIN}: libhack.o + +# Use stubs to eliminate some large stuff from libc +HACKSRC= ${DISTRIBDIR}/utils/libhack .include "${HACKSRC}/Makefile.inc" ${CRUNCHBIN}: libhack.o