CVS commit: src/doc
Module Name:src Committed By: thorpej Date: Sat Sep 19 03:33:15 UTC 2020 Modified Files: src/doc: CHANGES Log Message: Note several recent Alpha improvements. To generate a diff of this commit: cvs rdiff -u -r1.2739 -r1.2740 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2739 src/doc/CHANGES:1.2740 --- src/doc/CHANGES:1.2739 Wed Sep 16 13:47:00 2020 +++ src/doc/CHANGES Sat Sep 19 03:33:15 2020 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2739 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2740 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -283,3 +283,7 @@ Changes from NetBSD 9.0 to NetBSD 10.0: gcc(1): Install TSan for 64bit CPUs. [kamil 20200913] network: IPv6 Neighor Detection is now address agnostic and is used by ARP. RFC 7048 is included. [roy 20200916] + alpha: Fixed several stability problems with MULTIPROCESSOR + enabled. Improved performance of TLB operations in + pmap module. Implemented fast-soft-interrupts. Enabled + MULTIPROCESSOR in GENERIC. [thorpej 20200918]
CVS commit: src/etc/etc.alpha
Module Name:src Committed By: thorpej Date: Sat Sep 19 03:29:58 UTC 2020 Modified Files: src/etc/etc.alpha: Makefile.inc Log Message: GENERIC.MP is no more. GENERIC defaults to MULTIPROCESSOR now. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/etc/etc.alpha/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.alpha/Makefile.inc diff -u src/etc/etc.alpha/Makefile.inc:1.9 src/etc/etc.alpha/Makefile.inc:1.10 --- src/etc/etc.alpha/Makefile.inc:1.9 Thu Feb 5 21:50:42 2015 +++ src/etc/etc.alpha/Makefile.inc Sat Sep 19 03:29:57 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.9 2015/02/05 21:50:42 snj Exp $ +# $NetBSD: Makefile.inc,v 1.10 2020/09/19 03:29:57 thorpej Exp $ # # etc.alpha/Makefile.inc -- alpha-specific etc Makefile targets # @@ -6,7 +6,7 @@ # If you change the list of distributed kernels, don't forget # to update the release documentation in distrib/notes/common/contents -KERNEL_SETS= GENERIC GENERIC.MP +KERNEL_SETS= GENERIC BUILD_KERNELS+= INSTALL
CVS commit: src/sys/arch/alpha/conf
Module Name:src Committed By: thorpej Date: Sat Sep 19 03:27:42 UTC 2020 Modified Files: src/sys/arch/alpha/conf: INSTALL RAMDISK std.alpha Removed Files: src/sys/arch/alpha/conf: GENERIC.MP Log Message: Enable MULTIPROCESSOR by default, but disable it in the RAMDISK and INSTALL kernels to save some space. To generate a diff of this commit: cvs rdiff -u -r1.4 -r0 src/sys/arch/alpha/conf/GENERIC.MP cvs rdiff -u -r1.115 -r1.116 src/sys/arch/alpha/conf/INSTALL cvs rdiff -u -r1.17 -r1.18 src/sys/arch/alpha/conf/RAMDISK cvs rdiff -u -r1.26 -r1.27 src/sys/arch/alpha/conf/std.alpha 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/alpha/conf/INSTALL diff -u src/sys/arch/alpha/conf/INSTALL:1.115 src/sys/arch/alpha/conf/INSTALL:1.116 --- src/sys/arch/alpha/conf/INSTALL:1.115 Sat Sep 5 01:28:18 2020 +++ src/sys/arch/alpha/conf/INSTALL Sat Sep 19 03:27:42 2020 @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.115 2020/09/05 01:28:18 thorpej Exp $ +# $NetBSD: INSTALL,v 1.116 2020/09/19 03:27:42 thorpej Exp $ # # Alpha INSTALL kernel. @@ -10,6 +10,8 @@ makeoptions COPTS="-Os" # Optimise for maxusers 8 +no options MULTIPROCESSOR # disable MP to save space + # Enable the hooks used for initializing the ram-disk. options MEMORY_DISK_HOOKS options MEMORY_DISK_IS_ROOT # Force root on ram-disk Index: src/sys/arch/alpha/conf/RAMDISK diff -u src/sys/arch/alpha/conf/RAMDISK:1.17 src/sys/arch/alpha/conf/RAMDISK:1.18 --- src/sys/arch/alpha/conf/RAMDISK:1.17 Fri Feb 6 18:50:26 2009 +++ src/sys/arch/alpha/conf/RAMDISK Sat Sep 19 03:27:42 2020 @@ -1,9 +1,11 @@ -# $NetBSD: RAMDISK,v 1.17 2009/02/06 18:50:26 jym Exp $ +# $NetBSD: RAMDISK,v 1.18 2020/09/19 03:27:42 thorpej Exp $ # # Generic Alpha kernel with built-in RAM disk image. include "arch/alpha/conf/GENERIC" +no options MULTIPROCESSOR # disable MP to save space + # Enable the hooks used for initializing the ram-disk. options MEMORY_DISK_HOOKS options MEMORY_DISK_IS_ROOT # Force root on ram-disk Index: src/sys/arch/alpha/conf/std.alpha diff -u src/sys/arch/alpha/conf/std.alpha:1.26 src/sys/arch/alpha/conf/std.alpha:1.27 --- src/sys/arch/alpha/conf/std.alpha:1.26 Wed Apr 7 17:51:16 2010 +++ src/sys/arch/alpha/conf/std.alpha Sat Sep 19 03:27:42 2020 @@ -1,4 +1,4 @@ -# $NetBSD: std.alpha,v 1.26 2010/04/07 17:51:16 jakllsch Exp $ +# $NetBSD: std.alpha,v 1.27 2020/09/19 03:27:42 thorpej Exp $ # # Standard/required configuration info for NetBSD/alpha. @@ -13,5 +13,7 @@ options EXEC_ECOFF # (native) ECOFF bin options EXEC_ELF64 # (native) ELF64 binary support options EXEC_SCRIPT # shell script support +options MULTIPROCESSOR # include multiprocessor support + # Atheros HAL options include "external/isc/atheros_hal/conf/std.ath_hal"
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Sat Sep 19 03:02:07 UTC 2020 Modified Files: src/sys/arch/alpha/alpha: interrupt.c src/sys/arch/alpha/include: types.h Log Message: Enable __HAVE_FAST_SOFTINTS and garbage-collect the #ifdefs. To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/sys/arch/alpha/alpha/interrupt.c cvs rdiff -u -r1.58 -r1.59 src/sys/arch/alpha/include/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/alpha/alpha/interrupt.c diff -u src/sys/arch/alpha/alpha/interrupt.c:1.87 src/sys/arch/alpha/alpha/interrupt.c:1.88 --- src/sys/arch/alpha/alpha/interrupt.c:1.87 Sat Sep 19 01:24:31 2020 +++ src/sys/arch/alpha/alpha/interrupt.c Sat Sep 19 03:02:07 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: interrupt.c,v 1.87 2020/09/19 01:24:31 thorpej Exp $ */ +/* $NetBSD: interrupt.c,v 1.88 2020/09/19 03:02:07 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.87 2020/09/19 01:24:31 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.88 2020/09/19 03:02:07 thorpej Exp $"); #include #include @@ -460,8 +460,6 @@ badaddr_read(void *addr, size_t size, vo #define SOFTINTS_ELIGIBLE(ipl) \ ((ALPHA_ALL_SOFTINTS << ((ipl) << 1)) & ALPHA_ALL_SOFTINTS) -#ifdef __HAVE_FAST_SOFTINTS - /* Validate some assumptions the code makes. */ __CTASSERT(SOFTINT_TO_IPL(SOFTINT_CLOCK) == ALPHA_PSL_IPL_SOFT_LO); __CTASSERT(SOFTINT_TO_IPL(SOFTINT_BIO) == ALPHA_PSL_IPL_SOFT_LO); @@ -516,17 +514,6 @@ softint_init_md(lwp_t * const l, u_int c *machdep = si_bit; } -#else /* ! __HAVE_FAST_SOFTINTS */ - -/* Temporary stub for alpha_softint_switchto(). */ -void -softint_dispatch(struct lwp * const pinned __unused, int const s __unused) -{ - panic("softint_dispatch"); -} - -#endif /* __HAVE_FAST_SOFTINTS */ - /* * Helper macro. * @@ -552,7 +539,6 @@ softint_dispatch(struct lwp * const pinn void alpha_softint_dispatch(int const ipl) { -#ifdef __HAVE_FAST_SOFTINTS struct lwp * const l = curlwp; struct cpu_info * const ci = l->l_cpu; unsigned long ssir; @@ -570,12 +556,8 @@ alpha_softint_dispatch(int const ipl) DOSOFTINT(BIO); DOSOFTINT(CLOCK); } -#else - panic("alpha_softint_dispatch"); -#endif /* __HAVE_FAST_SOFTINTS */ } - /* * spllower: * Index: src/sys/arch/alpha/include/types.h diff -u src/sys/arch/alpha/include/types.h:1.58 src/sys/arch/alpha/include/types.h:1.59 --- src/sys/arch/alpha/include/types.h:1.58 Wed Sep 16 04:07:32 2020 +++ src/sys/arch/alpha/include/types.h Sat Sep 19 03:02:07 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.58 2020/09/16 04:07:32 thorpej Exp $ */ +/* $NetBSD: types.h,v 1.59 2020/09/19 03:02:07 thorpej Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -78,7 +78,7 @@ typedef __register_t register_t; #define __HAVE_MM_MD_DIRECT_MAPPED_IO #define __HAVE_MM_MD_DIRECT_MAPPED_PHYS #define __HAVE_CPU_DATA_FIRST -/* #define __HAVE_FAST_SOFTINTS -- not yet */ +#define __HAVE_FAST_SOFTINTS #define __HAVE_CPU_UAREA_ROUTINES #define __HAVE_CPU_LWP_SETPRIVATE #define __HAVE___LWP_GETPRIVATE_FAST
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Sat Sep 19 01:43:20 UTC 2020 Modified Files: src/share/misc: acronyms.comp Log Message: CDN, CRTP, FTTH To generate a diff of this commit: cvs rdiff -u -r1.311 -r1.312 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.311 src/share/misc/acronyms.comp:1.312 --- src/share/misc/acronyms.comp:1.311 Sat Aug 22 07:24:40 2020 +++ src/share/misc/acronyms.comp Sat Sep 19 01:43:20 2020 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.311 2020/08/22 07:24:40 nia Exp $ +$NetBSD: acronyms.comp,v 1.312 2020/09/19 01:43:20 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -226,6 +226,7 @@ CD compact disc CDDA compact disc digital audio CDL compiler description language CDMA code division multiple access +CDN content delivery network CDP Cisco Discovery Protocol CDRAM cache dynamic random access memory CER canonical encoding rules @@ -307,6 +308,7 @@ CRL carrier recovery loop CRLF carriage return line feed CSU C start up CRT cathode ray tube +CRTP curiously recurring template pattern CRUD create, read, update, and delete CS cable select CS chip select @@ -610,6 +612,7 @@ FTA fault tree analysis FTL flash translation layer FTP File Transfer Protocol FTPS File Transfer Protocol Secure +FTTH fiber to the home FUS fast user switching FWH firmware hub FWS folding white space
CVS commit: src/sys/arch/alpha/alpha
Module Name:src Committed By: thorpej Date: Sat Sep 19 01:32:16 UTC 2020 Modified Files: src/sys/arch/alpha/alpha: locore.s Log Message: - The Alpha fast-soft-intrs implementation supports 2 soft interrupt levels, so in exception_return() ensure we clear ineligible-at-new-IPL softint bits from the SSIR, otherwise we could loop forever in the following scenario: processing softnet -> clock interrupt -> schedule softclock - If the softint thread blocks, it's possible to bounce back through the softint return trampoline at something other than IPL_HIGH. This is not a problem other than it's contrary to what alpha_softint_dispatch() expect, so make alpha_softint_return() go to IPL_HIGH before it does anything else. These two fixes make fast-soft-interrupts work on Alpha. To generate a diff of this commit: cvs rdiff -u -r1.135 -r1.136 src/sys/arch/alpha/alpha/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/alpha/alpha/locore.s diff -u src/sys/arch/alpha/alpha/locore.s:1.135 src/sys/arch/alpha/alpha/locore.s:1.136 --- src/sys/arch/alpha/alpha/locore.s:1.135 Fri Sep 18 00:11:31 2020 +++ src/sys/arch/alpha/alpha/locore.s Sat Sep 19 01:32:16 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.135 2020/09/18 00:11:31 thorpej Exp $ */ +/* $NetBSD: locore.s,v 1.136 2020/09/19 01:32:16 thorpej Exp $ */ /*- * Copyright (c) 1999, 2000, 2019 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.135 2020/09/18 00:11:31 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.136 2020/09/19 01:32:16 thorpej Exp $"); #include "assym.h" @@ -265,9 +265,21 @@ LEAF(exception_return, 1) /* XXX shoul GET_CURLWP mov v0, s0/* s0 = curlwp */ - /* see if a soft interrupt is pending. */ -2: ldq t1, L_CPU(s0) /* t1 = curlwp->l_cpu */ - ldq t1, CPU_INFO_SSIR(t1) /* soft int pending? */ +2: /* + * Check to see if a soft interrupt is pending. We need to only + * check for soft ints eligible to run at the new IPL. We generate + * the mask of elible soft ints to run by masking the ssir with: + * + * (ALPHA_ALL_SOFTINTS << ((ipl) << 1)) + * + * See alpha_softint_dispatch(). + */ + ldq t1, L_CPU(s0) /* t1 = curlwp->l_cpu */ + ldiq t2, ALPHA_ALL_SOFTINTS /* t2 = ALPHA_ALL_SOFTINTS */ + ldq t1, CPU_INFO_SSIR(t1) /* t1 = t1->ci_ssir */ + sll s3, 1, t3 /* t3 = ipl << 1 */ + sll t2, t3, t2 /* t2 <<= t3 */ + and t1, t2, t1 /* t1 &= t2 */ bne t1, 6f/* yes */ /* no */ @@ -743,7 +755,14 @@ NESTED_NOPROFILE(alpha_softint_switchto, LEAF_NOPROFILE(alpha_softint_return, 0) /* - * Step 1: Re-adjust the mutex count after mi_switch(). + * Step 1: Go to IPL_HIGH, which is what the alpha_softint_dispatch() + * expects. We will have arrived here at IPL_SCHED. + */ + ldiq a0, ALPHA_PSL_IPL_HIGH + call_pal PAL_OSF1_swpipl + + /* + * Step 2: Re-adjust the mutex count after mi_switch(). */ GET_CURLWP ldq v0, L_CPU(v0) @@ -752,7 +771,7 @@ LEAF_NOPROFILE(alpha_softint_return, 0) stl t0, CPU_INFO_MTX_COUNT(v0) /* - * Step 2: Pop alpha_softint_switchto()'s stack frame + * Step 3: Pop alpha_softint_switchto()'s stack frame * and return. */ ldq ra, 0(sp) /* restore ra */
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Sat Sep 19 01:24:31 UTC 2020 Modified Files: src/sys/arch/alpha/alpha: genassym.cf interrupt.c src/sys/arch/alpha/include: intr.h Log Message: Move softintr bits into and define ALPHA_ALL_SOFTINTS for locore.s To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/alpha/alpha/genassym.cf cvs rdiff -u -r1.86 -r1.87 src/sys/arch/alpha/alpha/interrupt.c cvs rdiff -u -r1.77 -r1.78 src/sys/arch/alpha/include/intr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/alpha/alpha/genassym.cf diff -u src/sys/arch/alpha/alpha/genassym.cf:1.26 src/sys/arch/alpha/alpha/genassym.cf:1.27 --- src/sys/arch/alpha/alpha/genassym.cf:1.26 Wed Sep 16 04:07:32 2020 +++ src/sys/arch/alpha/alpha/genassym.cf Sat Sep 19 01:24:31 2020 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.26 2020/09/16 04:07:32 thorpej Exp $ +# $NetBSD: genassym.cf,v 1.27 2020/09/19 01:24:31 thorpej Exp $ # # Copyright (c) 1982, 1990, 1993 @@ -133,6 +133,9 @@ define ALPHA_PSL_IPL_SOFT_LO ALPHA_PSL_I define ALPHA_PSL_IPL_SOFT_HI ALPHA_PSL_IPL_SOFT_HI define ALPHA_PSL_IPL_HIGH ALPHA_PSL_IPL_HIGH +# soft interrrupt definitions +define ALPHA_ALL_SOFTINTS ALPHA_ALL_SOFTINTS + # pte bits define ALPHA_PTE_VALID ALPHA_PTE_VALID define ALPHA_PTE_ASM ALPHA_PTE_ASM Index: src/sys/arch/alpha/alpha/interrupt.c diff -u src/sys/arch/alpha/alpha/interrupt.c:1.86 src/sys/arch/alpha/alpha/interrupt.c:1.87 --- src/sys/arch/alpha/alpha/interrupt.c:1.86 Thu Sep 17 00:48:56 2020 +++ src/sys/arch/alpha/alpha/interrupt.c Sat Sep 19 01:24:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: interrupt.c,v 1.86 2020/09/17 00:48:56 thorpej Exp $ */ +/* $NetBSD: interrupt.c,v 1.87 2020/09/19 01:24:31 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.86 2020/09/17 00:48:56 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.87 2020/09/19 01:24:31 thorpej Exp $"); #include #include @@ -454,16 +454,6 @@ badaddr_read(void *addr, size_t size, vo * Fast soft interrupt support. */ -#define SOFTINT_CLOCK_MASK __BIT(SOFTINT_CLOCK) -#define SOFTINT_BIO_MASK __BIT(SOFTINT_BIO) -#define SOFTINT_NET_MASK __BIT(SOFTINT_NET) -#define SOFTINT_SERIAL_MASK __BIT(SOFTINT_SERIAL) - -#define ALPHA_IPL1_SOFTINTS (SOFTINT_CLOCK_MASK | SOFTINT_BIO_MASK) -#define ALPHA_IPL2_SOFTINTS (SOFTINT_NET_MASK | SOFTINT_SERIAL_MASK) - -#define ALPHA_ALL_SOFTINTS (ALPHA_IPL1_SOFTINTS | ALPHA_IPL2_SOFTINTS) - #define SOFTINT_TO_IPL(si) \ (ALPHA_PSL_IPL_SOFT_LO + ((ALPHA_IPL2_SOFTINTS >> (si)) & 1)) Index: src/sys/arch/alpha/include/intr.h diff -u src/sys/arch/alpha/include/intr.h:1.77 src/sys/arch/alpha/include/intr.h:1.78 --- src/sys/arch/alpha/include/intr.h:1.77 Thu Sep 17 00:48:56 2020 +++ src/sys/arch/alpha/include/intr.h Sat Sep 19 01:24:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.77 2020/09/17 00:48:56 thorpej Exp $ */ +/* $NetBSD: intr.h,v 1.78 2020/09/19 01:24:31 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. @@ -118,6 +118,16 @@ struct scbvec { #define IPL_SCHED ALPHA_PSL_IPL_CLOCK #define IPL_HIGH ALPHA_PSL_IPL_HIGH +#define SOFTINT_CLOCK_MASK __BIT(SOFTINT_CLOCK) +#define SOFTINT_BIO_MASK __BIT(SOFTINT_BIO) +#define SOFTINT_NET_MASK __BIT(SOFTINT_NET) +#define SOFTINT_SERIAL_MASK __BIT(SOFTINT_SERIAL) + +#define ALPHA_IPL1_SOFTINTS (SOFTINT_CLOCK_MASK | SOFTINT_BIO_MASK) +#define ALPHA_IPL2_SOFTINTS (SOFTINT_NET_MASK | SOFTINT_SERIAL_MASK) + +#define ALPHA_ALL_SOFTINTS (ALPHA_IPL1_SOFTINTS | ALPHA_IPL2_SOFTINTS) + typedef int ipl_t; typedef struct { uint8_t _psl;
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Fri Sep 18 20:44:20 UTC 2020 Modified Files: src/sys/dev/pci: radeonfb_bios.c Log Message: minor adaptatioons to new radeonfbreg.h To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/radeonfb_bios.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/radeonfb_bios.c diff -u src/sys/dev/pci/radeonfb_bios.c:1.5 src/sys/dev/pci/radeonfb_bios.c:1.6 --- src/sys/dev/pci/radeonfb_bios.c:1.5 Thu Feb 8 09:05:19 2018 +++ src/sys/dev/pci/radeonfb_bios.c Fri Sep 18 20:44:20 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: radeonfb_bios.c,v 1.5 2018/02/08 09:05:19 dholland Exp $ */ +/* $NetBSD: radeonfb_bios.c,v 1.6 2020/09/18 20:44:20 macallan Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: radeonfb_bios.c,v 1.5 2018/02/08 09:05:19 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeonfb_bios.c,v 1.6 2020/09/18 20:44:20 macallan Exp $"); #include #include @@ -305,7 +305,7 @@ rb_wait_mc_busy_mask(struct radeonfb_sof DPRINTF(("WAIT_MC_BUSY_MASK: %d ", count)); while (count--) { if (!(radeonfb_getpll(sc, RADEON_CLK_PWRMGT_CNTL) & - RADEON_MC_BUSY_MASK)) + RADEON_MC_BUSY)) break; } DPRINTF(("%d\n", count)); @@ -330,7 +330,7 @@ rb_wait_dll_ready_mask(struct radeonfb_s DPRINTF(("WAIT_DLL_READY_MASK: %d ", count)); while (count--) { if (radeonfb_getpll(sc, RADEON_CLK_PWRMGT_CNTL) & - RADEON_DLL_READY_MASK) + RADEON_DLL_READY) break; } DPRINTF(("%d\n", count));
CVS commit: src/external/gpl3/gdb/dist/gnulib
Module Name:src Committed By: christos Date: Fri Sep 18 17:46:47 UTC 2020 Modified Files: src/external/gpl3/gdb/dist/gnulib: Makefile.in aclocal.m4 configure src/external/gpl3/gdb/dist/gnulib/import: Makefile.in src/external/gpl3/gdb/dist/gnulib/import/m4: fdopendir.m4 frexp.m4 gettimeofday.m4 lstat.m4 mbrtowc.m4 memchr.m4 mkdir.m4 readlink.m4 rename.m4 rmdir.m4 setenv.m4 stat.m4 Log Message: Provide better guesses for bsd systems, otherwise we end up calling recursively opendir and gettimeofday until we run out of stack... To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gdb/dist/gnulib/Makefile.in \ src/external/gpl3/gdb/dist/gnulib/aclocal.m4 \ src/external/gpl3/gdb/dist/gnulib/configure cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/gpl3/gdb/dist/gnulib/import/Makefile.in cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/gpl3/gdb/dist/gnulib/import/m4/fdopendir.m4 \ src/external/gpl3/gdb/dist/gnulib/import/m4/frexp.m4 \ src/external/gpl3/gdb/dist/gnulib/import/m4/gettimeofday.m4 \ src/external/gpl3/gdb/dist/gnulib/import/m4/lstat.m4 \ src/external/gpl3/gdb/dist/gnulib/import/m4/mbrtowc.m4 \ src/external/gpl3/gdb/dist/gnulib/import/m4/memchr.m4 \ src/external/gpl3/gdb/dist/gnulib/import/m4/mkdir.m4 \ src/external/gpl3/gdb/dist/gnulib/import/m4/readlink.m4 \ src/external/gpl3/gdb/dist/gnulib/import/m4/rename.m4 \ src/external/gpl3/gdb/dist/gnulib/import/m4/rmdir.m4 \ src/external/gpl3/gdb/dist/gnulib/import/m4/setenv.m4 \ src/external/gpl3/gdb/dist/gnulib/import/m4/stat.m4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gdb/dist/gnulib/Makefile.in diff -u src/external/gpl3/gdb/dist/gnulib/Makefile.in:1.1.1.1 src/external/gpl3/gdb/dist/gnulib/Makefile.in:1.2 --- src/external/gpl3/gdb/dist/gnulib/Makefile.in:1.1.1.1 Mon Sep 14 21:43:50 2020 +++ src/external/gpl3/gdb/dist/gnulib/Makefile.in Fri Sep 18 13:46:47 2020 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15.1 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2017 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1615,8 +1615,8 @@ Makefile: $(srcdir)/Makefile.in $(top_bu echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) Index: src/external/gpl3/gdb/dist/gnulib/aclocal.m4 diff -u src/external/gpl3/gdb/dist/gnulib/aclocal.m4:1.1.1.1 src/external/gpl3/gdb/dist/gnulib/aclocal.m4:1.2 --- src/external/gpl3/gdb/dist/gnulib/aclocal.m4:1.1.1.1 Mon Sep 14 21:43:50 2020 +++ src/external/gpl3/gdb/dist/gnulib/aclocal.m4 Fri Sep 18 13:46:47 2020 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.1 -*- Autoconf -*- -# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,461 @@ You have another version of autoconf. I If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2017 Free Software Foundation, Inc. +# po.m4 serial 24 (gettext-0.19) +dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2003. + +AC_PREREQ([2.60]) + +dnl Ch
CVS commit: src/tests/net/arp
Module Name:src Committed By: roy Date: Fri Sep 18 16:33:49 UTC 2020 Modified Files: src/tests/net/arp: t_arp.sh Log Message: arp tests: Delete ARP entry after failed ping test As it might hang around in WAITDELETE for a few seconds. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/tests/net/arp/t_arp.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/arp/t_arp.sh diff -u src/tests/net/arp/t_arp.sh:1.44 src/tests/net/arp/t_arp.sh:1.45 --- src/tests/net/arp/t_arp.sh:1.44 Thu Sep 17 11:51:01 2020 +++ src/tests/net/arp/t_arp.sh Fri Sep 18 16:33:49 2020 @@ -1,4 +1,4 @@ -# $NetBSD: t_arp.sh,v 1.44 2020/09/17 11:51:01 roy Exp $ +# $NetBSD: t_arp.sh,v 1.45 2020/09/18 16:33:49 roy Exp $ # # Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -491,6 +491,8 @@ test_proxy_arp() export RUMP_SERVER=$SOCKSRC atf_check -s not-exit:0 -o ignore -e ignore \ rump.ping -n -w 1 -c 1 $IP4DST_PROXYARP1 + # Remove ARP entry as it may hang around in WAITDELETE a few seconds + atf_check -s ignore rump.arp -d $IP4DST_PROXYARP1 # Flushing extract_new_packets bus1 > ./out @@ -525,6 +527,8 @@ test_proxy_arp() export RUMP_SERVER=$SOCKSRC atf_check -s not-exit:0 -o ignore -e ignore \ rump.ping -n -w 1 -c 1 $IP4DST_PROXYARP2 + # Remove ARP entry as it may hang around in WAITDELETE a few seconds + atf_check -s ignore rump.arp -d $IP4DST_PROXYARP2 extract_new_packets bus1 > ./out $DEBUG && cat ./out
CVS commit: src/sys/dev/scsipi
Module Name:src Committed By: jakllsch Date: Fri Sep 18 15:04:25 UTC 2020 Modified Files: src/sys/dev/scsipi: scsiconf.c Log Message: Revert scsiconf.c 1.288, it only worked for LUN 1. vioscsi(4) now sets PQUIRK_FORCELUNS, which fixes the original issue for all LUNs. To-do: should issue REPORT LUNS and use the information it returns to probe LUNs in an optimized way. To generate a diff of this commit: cvs rdiff -u -r1.289 -r1.290 src/sys/dev/scsipi/scsiconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/scsipi/scsiconf.c diff -u src/sys/dev/scsipi/scsiconf.c:1.289 src/sys/dev/scsipi/scsiconf.c:1.290 --- src/sys/dev/scsipi/scsiconf.c:1.289 Thu Sep 17 01:19:41 2020 +++ src/sys/dev/scsipi/scsiconf.c Fri Sep 18 15:04:25 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: scsiconf.c,v 1.289 2020/09/17 01:19:41 jakllsch Exp $ */ +/* $NetBSD: scsiconf.c,v 1.290 2020/09/18 15:04:25 jakllsch Exp $ */ /*- * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.289 2020/09/17 01:19:41 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.290 2020/09/18 15:04:25 jakllsch Exp $"); #include #include @@ -883,8 +883,6 @@ scsi_probe_device(struct scsibus_softc * break; case SID_QUAL_LU_NOTPRESENT: - docontinue = 1; - /* FALLTHROUGH */ case SID_QUAL_reserved: case SID_QUAL_LU_NOT_SUPP: goto bad;
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jakllsch Date: Fri Sep 18 14:55:28 UTC 2020 Modified Files: src/sys/dev/pci: vioscsi.c Log Message: Probe all LUNs on vioscsi(4) until scsi(4) can do REPORT LUNS. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pci/vioscsi.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/vioscsi.c diff -u src/sys/dev/pci/vioscsi.c:1.22 src/sys/dev/pci/vioscsi.c:1.23 --- src/sys/dev/pci/vioscsi.c:1.22 Sun Jul 12 06:40:11 2020 +++ src/sys/dev/pci/vioscsi.c Fri Sep 18 14:55:28 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: vioscsi.c,v 1.22 2020/07/12 06:40:11 kim Exp $ */ +/* $NetBSD: vioscsi.c,v 1.23 2020/09/18 14:55:28 jakllsch Exp $ */ /* $OpenBSD: vioscsi.c,v 1.3 2015/03/14 03:38:49 jsg Exp $ */ /* @@ -18,7 +18,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.22 2020/07/12 06:40:11 kim Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.23 2020/09/18 14:55:28 jakllsch Exp $"); #include #include @@ -196,6 +196,13 @@ vioscsi_attach(device_t parent, device_t chan->chan_nluns = MIN(max_lun, 1024); /* cap reasonably */ chan->chan_id = max_target; chan->chan_flags = SCSIPI_CHAN_NOSETTLE; + /* + * XXX Remove this when scsipi is REPORT LUNS-aware. + * scsipi(4) insists that LUNs must be contiguous starting from 0. + * This is not true on Linode (circa 2020) and Proxmox 6 hosts + * with more than one disk exported to guest. + */ + chan->chan_defquirks = PQUIRK_FORCELUNS; config_found(self, &sc->sc_channel, scsiprint); return;
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: christos Date: Fri Sep 18 14:19:08 UTC 2020 Modified Files: src/usr.bin/xlint/lint1: cgram.y scan.l Log Message: add optimize attribute To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/usr.bin/xlint/lint1/cgram.y cvs rdiff -u -r1.91 -r1.92 src/usr.bin/xlint/lint1/scan.l Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.104 src/usr.bin/xlint/lint1/cgram.y:1.105 --- src/usr.bin/xlint/lint1/cgram.y:1.104 Mon Mar 4 12:45:16 2019 +++ src/usr.bin/xlint/lint1/cgram.y Fri Sep 18 10:19:08 2020 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.104 2019/03/04 17:45:16 christos Exp $ */ +/* $NetBSD: cgram.y,v 1.105 2020/09/18 14:19:08 christos Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.104 2019/03/04 17:45:16 christos Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.105 2020/09/18 14:19:08 christos Exp $"); #endif #include @@ -228,6 +228,7 @@ anonymize(sym_t *s) %token T_AT_NORETURN %token T_AT_NOTHROW %token T_AT_NO_INSTRUMENT_FUNCTION +%token T_AT_OPTIMIZE %token T_AT_PACKED %token T_AT_PCS %token T_AT_PURE @@ -546,6 +547,7 @@ type_attribute_spec: | T_AT_NONNULL T_LPARN constant T_RPARN | T_AT_MODE T_LPARN T_NAME T_RPARN | T_AT_ALIAS T_LPARN string T_RPARN + | T_AT_OPTIMIZE T_LPARN string T_RPARN | T_AT_PCS T_LPARN string T_RPARN | T_AT_SECTION T_LPARN string T_RPARN | T_AT_TLS_MODEL T_LPARN string T_RPARN Index: src/usr.bin/xlint/lint1/scan.l diff -u src/usr.bin/xlint/lint1/scan.l:1.91 src/usr.bin/xlint/lint1/scan.l:1.92 --- src/usr.bin/xlint/lint1/scan.l:1.91 Sat Nov 9 14:54:09 2019 +++ src/usr.bin/xlint/lint1/scan.l Fri Sep 18 10:19:08 2020 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: scan.l,v 1.91 2019/11/09 19:54:09 christos Exp $ */ +/* $NetBSD: scan.l,v 1.92 2020/09/18 14:19:08 christos Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: scan.l,v 1.91 2019/11/09 19:54:09 christos Exp $"); +__RCSID("$NetBSD: scan.l,v 1.92 2020/09/18 14:19:08 christos Exp $"); #endif #include @@ -265,6 +265,7 @@ static struct kwtab { { "noinline", T_AT_NOINLINE, 0, 0, 0, 0,0,1,1,5 }, { "noreturn", T_AT_NORETURN, 0, 0, 0, 0,0,1,1,5 }, { "nothrow", T_AT_NOTHROW, 0, 0, 0, 0,0,1,1,5 }, + { "optimize", T_AT_OPTIMIZE, 0, 0, 0, 0,0,1,1,5 }, { "packed", T_AT_PACKED, 0, 0, 0, 0,0,1,1,5 }, { "packed", T_PACKED, 0, 0, 0, 0,0,0,0,2 }, { "pcs", T_AT_PCS, 0, 0, 0, 0,0,0,0,5 },
CVS commit: src/lib/libc/gdtoa
Module Name:src Committed By: christos Date: Fri Sep 18 14:19:34 UTC 2020 Modified Files: src/lib/libc/gdtoa: strtod.c Log Message: delint To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/lib/libc/gdtoa/strtod.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gdtoa/strtod.c diff -u src/lib/libc/gdtoa/strtod.c:1.16 src/lib/libc/gdtoa/strtod.c:1.17 --- src/lib/libc/gdtoa/strtod.c:1.16 Fri Sep 18 10:06:45 2020 +++ src/lib/libc/gdtoa/strtod.c Fri Sep 18 10:19:34 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: strtod.c,v 1.16 2020/09/18 14:06:45 christos Exp $ */ +/* $NetBSD: strtod.c,v 1.17 2020/09/18 14:19:34 christos Exp $ */ / @@ -743,7 +743,7 @@ _int_strtod_l(CONST char *s00, char **se /* dval(&adj) = Rounding ? ceil(&adj) : floor(&adj); */ y = adj.d; if (y != adj.d) { - if (!((Rounding>>1) ^ dsign)) + if (!(((unsigned int)Rounding>>1) ^ (unsigned int)dsign)) y++; dval(&adj) = y; } @@ -976,7 +976,7 @@ _int_strtod_l(CONST char *s00, char **se #ifdef Avoid_Underflow if (scale && y <= 2*P*Exp_msk1) { if (aadj <= 0x7fff) { - if ((z = aadj) <= 0) + if ((z = aadj) == 0) z = 1; aadj = z; dval(&aadj1) = dsign ? aadj : -aadj;
CVS commit: src/doc
Module Name:src Committed By: christos Date: Fri Sep 18 14:09:48 UTC 2020 Modified Files: src/doc: HACKS Log Message: mention strtod hack To generate a diff of this commit: cvs rdiff -u -r1.208 -r1.209 src/doc/HACKS Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/HACKS diff -u src/doc/HACKS:1.208 src/doc/HACKS:1.209 --- src/doc/HACKS:1.208 Mon Aug 10 02:46:27 2020 +++ src/doc/HACKS Fri Sep 18 10:09:47 2020 @@ -1,4 +1,4 @@ -# $NetBSD: HACKS,v 1.208 2020/08/10 06:46:27 rin Exp $ +# $NetBSD: HACKS,v 1.209 2020/09/18 14:09:47 christos Exp $ # # This file is intended to document workarounds for currently unsolved # (mostly) compiler bugs. @@ -40,12 +40,20 @@ kcah hack static linking with libpthread mdate 7 May 2019 who maya -file lib/libpthread/Makefile 1.92 -> 1.94 +file src/lib/libpthread/Makefile 1.92 -> 1.94 descr To avoid some libc thread stub functions being picked up in static builds, link pthread as one section. kcah +hack disable optimization for gcc-9.3 in src/lib/libc/gdtoa/strtod.c +mdate 18 Sep 2020 +who christos +filesrc/lib/libc/gdtoa/strtod.c 1.15 -> 1.16 +descr + See PR/55668, the program there causes infinite loop +kcah + hack gcc-5.3 optimizes memset+malloc -> calloc inside calloc mdate 4 May 2016 who christos
CVS commit: src/lib/libc/gdtoa
Module Name:src Committed By: christos Date: Fri Sep 18 14:06:45 UTC 2020 Modified Files: src/lib/libc/gdtoa: strtod.c Log Message: PR/55668: Martin Husemann: Disable optimization to avoid infinite loop. Also bring in a few changes from the most recent gdtoa code (not relevant to the bug). To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/gdtoa/strtod.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gdtoa/strtod.c diff -u src/lib/libc/gdtoa/strtod.c:1.15 src/lib/libc/gdtoa/strtod.c:1.16 --- src/lib/libc/gdtoa/strtod.c:1.15 Wed Jul 31 22:27:43 2019 +++ src/lib/libc/gdtoa/strtod.c Fri Sep 18 10:06:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: strtod.c,v 1.15 2019/08/01 02:27:43 riastradh Exp $ */ +/* $NetBSD: strtod.c,v 1.16 2020/09/18 14:06:45 christos Exp $ */ / @@ -90,16 +90,16 @@ sulp } #endif /*}*/ +#if __GNUC_PREREQ__(9, 3) +__attribute__((__optimize__("O0"))) +#endif static double _int_strtod_l(CONST char *s00, char **se, locale_t loc) { #ifdef Avoid_Underflow int scale; #endif -#ifdef INFNAN_CHECK - int decpt; -#endif - int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign, + int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, decpt, dsign, e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign; CONST char *s, *s0, *s1; double aadj; @@ -133,10 +133,7 @@ _int_strtod_l(CONST char *s00, char **se #endif /*}}*/ #endif /*}*/ -#ifdef INFNAN_CHECK - decpt = 0; -#endif - sign = nz0 = nz = 0; + sign = nz0 = nz = decpt = 0; dval(&rv) = 0.; for(s = s00;;s++) switch(*s) { case '-': @@ -203,7 +200,7 @@ _int_strtod_l(CONST char *s00, char **se for(nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++) if (nd < 9) y = 10*y + c - '0'; - else if (nd < 16) + else if (nd < DBL_DIG + 2) z = 10*z + c - '0'; nd0 = nd; #ifdef USE_LOCALE @@ -217,9 +214,7 @@ _int_strtod_l(CONST char *s00, char **se if (c == '.') { c = *++s; #endif -#ifdef INFNAN_CHECK decpt = 1; -#endif if (!nd) { for(; c == '0'; c = *++s) nz++; @@ -239,11 +234,11 @@ _int_strtod_l(CONST char *s00, char **se for(i = 1; i < nz; i++) if (nd++ < 9) y *= 10; - else if (nd <= DBL_DIG + 1) + else if (nd <= DBL_DIG + 2) z *= 10; if (nd++ < 9) y = 10*y + c; -else if (nd <= DBL_DIG + 1) +else if (nd <= DBL_DIG + 2) z = 10*z + c; nz = 0; } @@ -344,7 +339,7 @@ _int_strtod_l(CONST char *s00, char **se if (!nd0) nd0 = nd; - k = nd < DBL_DIG + 1 ? nd : DBL_DIG + 1; + k = nd < DBL_DIG + 2 ? nd : DBL_DIG + 2; dval(&rv) = y; if (k > 9) { #ifdef SET_INEXACT @@ -555,6 +550,10 @@ _int_strtod_l(CONST char *s00, char **se if (!dval(&rv)) { undfl: dval(&rv) = 0.; +#ifdef Honor_FLT_ROUNDS + if (Rounding == 2) + word1(&rv) = 1; +#endif goto range_err; } #ifndef Avoid_Underflow @@ -977,7 +976,7 @@ _int_strtod_l(CONST char *s00, char **se #ifdef Avoid_Underflow if (scale && y <= 2*P*Exp_msk1) { if (aadj <= 0x7fff) { - if ((z = aadj) == 0) + if ((z = aadj) <= 0) z = 1; aadj = z; dval(&aadj1) = dsign ? aadj : -aadj;
CVS commit: src/sys/net
Module Name:src Committed By: yamaguchi Date: Fri Sep 18 09:53:50 UTC 2020 Modified Files: src/sys/net: if_pppoe.c Log Message: Do pppoe_timeout() in thread context OKed by knakahara@n.o fix port-amd64/55661 To generate a diff of this commit: cvs rdiff -u -r1.150 -r1.151 src/sys/net/if_pppoe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_pppoe.c diff -u src/sys/net/if_pppoe.c:1.150 src/sys/net/if_pppoe.c:1.151 --- src/sys/net/if_pppoe.c:1.150 Fri Sep 18 09:48:56 2020 +++ src/sys/net/if_pppoe.c Fri Sep 18 09:53:50 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_pppoe.c,v 1.150 2020/09/18 09:48:56 yamaguchi Exp $ */ +/* $NetBSD: if_pppoe.c,v 1.151 2020/09/18 09:53:50 yamaguchi Exp $ */ /* * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.150 2020/09/18 09:48:56 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.151 2020/09/18 09:53:50 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "pppoe.h" @@ -41,6 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v #include #include #include +#include #include #include #include @@ -57,6 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v #include #include #include +#include #include #include @@ -173,7 +175,10 @@ struct pppoe_softc { uint8_t *sc_hunique; /* content of host unique we must echo back */ size_t sc_hunique_len; /* length of host unique */ #endif - callout_t sc_timeout; /* timeout while not in session state */ + callout_t sc_timeout; /* timeout while not in session state */ + struct workqueue *sc_timeout_wq; /* workqueue for timeout */ + struct work sc_timeout_wk; + u_int sc_timeout_scheduled; int sc_padi_retried; /* number of PADI retries already done */ int sc_padr_retried; /* number of PADR retries already done */ krwlock_t sc_lock; /* lock of sc_state, sc_session, and sc_eth_if */ @@ -209,7 +214,10 @@ static int pppoe_transmit(struct ifnet * static void pppoe_clear_softc(struct pppoe_softc *, const char *); /* internal timeout handling */ -static void pppoe_timeout(void *); +static void pppoe_timeout_co(void *); +static void pppoe_timeout_co_halt(void *); +static void pppoe_timeout_wk(struct work *, void *); +static void pppoe_timeout(struct pppoe_softc *); /* sending actual protocol controll packets */ static int pppoe_send_padi(struct pppoe_softc *); @@ -349,8 +357,16 @@ pppoe_clone_create(struct if_clone *ifc, /* changed to real address later */ memcpy(&sc->sc_dest, etherbroadcastaddr, sizeof(sc->sc_dest)); + rv = workqueue_create(&sc->sc_timeout_wq, + sc->sc_sppp.pp_if.if_xname, pppoe_timeout_wk, sc, + PRI_SOFTNET, IPL_SOFTNET, 0); + if (rv != 0) { + free(sc, M_DEVBUF); + return rv; + } + callout_init(&sc->sc_timeout, CALLOUT_MPSAFE); - callout_setfunc(&sc->sc_timeout, pppoe_timeout, sc); + callout_setfunc(&sc->sc_timeout, pppoe_timeout_co, sc); sc->sc_sppp.pp_if.if_start = pppoe_start; #ifdef PPPOE_MPSAFE @@ -362,6 +378,7 @@ pppoe_clone_create(struct if_clone *ifc, rv = if_initialize(&sc->sc_sppp.pp_if); if (rv != 0) { + workqueue_destroy(sc->sc_timeout_wq); callout_halt(&sc->sc_timeout, NULL); callout_destroy(&sc->sc_timeout); free(sc, M_DEVBUF); @@ -395,6 +412,8 @@ pppoe_clone_destroy(struct ifnet *ifp) rw_enter(&pppoe_softc_list_lock, RW_WRITER); PPPOE_LOCK(sc, RW_WRITER); + callout_setfunc(&sc->sc_timeout, pppoe_timeout_co_halt, sc); + workqueue_wait(sc->sc_timeout_wq, &sc->sc_timeout_wk); callout_halt(&sc->sc_timeout, NULL); LIST_REMOVE(sc, sc_list); @@ -416,6 +435,7 @@ pppoe_clone_destroy(struct ifnet *ifp) if (sc->sc_relay_sid) free(sc->sc_relay_sid, M_DEVBUF); callout_destroy(&sc->sc_timeout); + workqueue_destroy(sc->sc_timeout_wq); PPPOE_UNLOCK(sc); rw_destroy(&sc->sc_lock); @@ -1411,10 +1431,36 @@ pppoe_send_padi(struct pppoe_softc *sc) } static void -pppoe_timeout(void *arg) +pppoe_timeout_co(void *arg) +{ + struct pppoe_softc *sc = (struct pppoe_softc *)arg; + + if (atomic_swap_uint(&sc->sc_timeout_scheduled, 1) != 0) + return; + + workqueue_enqueue(sc->sc_timeout_wq, &sc->sc_timeout_wk, NULL); +} + +static void +pppoe_timeout_co_halt(void *unused __unused) +{ + + /* do nothing to halt callout safely */ +} + +static void +pppoe_timeout_wk(struct work *wk __unused, void *arg) +{ + struct pppoe_softc *sc = (struct pppoe_softc *)arg; + + atomic_swap_uint(&sc->sc_timeout_scheduled, 0); + pppoe_timeout(sc); +} + +static void +pppoe_timeout(struct pppoe_softc *sc) { int retry_wait, err; - struct pppoe_softc *sc = (struct pppoe_softc*)arg; DECLARE_SPLNET_VARIABLE; #ifdef PPPOE_DEBUG
CVS commit: src/sys/net
Module Name:src Committed By: yamaguchi Date: Fri Sep 18 09:48:56 UTC 2020 Modified Files: src/sys/net: if_pppoe.c Log Message: Use callout_setfunc and callout_schedule To generate a diff of this commit: cvs rdiff -u -r1.149 -r1.150 src/sys/net/if_pppoe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_pppoe.c diff -u src/sys/net/if_pppoe.c:1.149 src/sys/net/if_pppoe.c:1.150 --- src/sys/net/if_pppoe.c:1.149 Mon Feb 10 22:38:10 2020 +++ src/sys/net/if_pppoe.c Fri Sep 18 09:48:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_pppoe.c,v 1.149 2020/02/10 22:38:10 mlelstv Exp $ */ +/* $NetBSD: if_pppoe.c,v 1.150 2020/09/18 09:48:56 yamaguchi Exp $ */ /* * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.149 2020/02/10 22:38:10 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.150 2020/09/18 09:48:56 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "pppoe.h" @@ -350,6 +350,7 @@ pppoe_clone_create(struct if_clone *ifc, memcpy(&sc->sc_dest, etherbroadcastaddr, sizeof(sc->sc_dest)); callout_init(&sc->sc_timeout, CALLOUT_MPSAFE); + callout_setfunc(&sc->sc_timeout, pppoe_timeout, sc); sc->sc_sppp.pp_if.if_start = pppoe_start; #ifdef PPPOE_MPSAFE @@ -913,9 +914,8 @@ breakbreak:; "error=%d\n", sc->sc_sppp.pp_if.if_xname, err); } - callout_reset(&sc->sc_timeout, - PPPOE_DISC_TIMEOUT * (1 + sc->sc_padr_retried), - pppoe_timeout, sc); + callout_schedule(&sc->sc_timeout, + PPPOE_DISC_TIMEOUT * (1 + sc->sc_padr_retried)); PPPOE_UNLOCK(sc); break; @@ -1461,8 +1461,7 @@ pppoe_timeout(void *arg) "error=%d\n", sc->sc_sppp.pp_if.if_xname, err); } - callout_reset(&sc->sc_timeout, retry_wait, - pppoe_timeout, sc); + callout_schedule(&sc->sc_timeout,retry_wait); RELEASE_SPLNET(); break; @@ -1480,9 +1479,8 @@ pppoe_timeout(void *arg) ", error=%d\n", sc->sc_sppp.pp_if.if_xname, err); } - callout_reset(&sc->sc_timeout, - PPPOE_DISC_TIMEOUT * (1 + sc->sc_padi_retried), - pppoe_timeout, sc); + callout_schedule(&sc->sc_timeout, + PPPOE_DISC_TIMEOUT * (1 + sc->sc_padi_retried)); RELEASE_SPLNET(); PPPOE_UNLOCK(sc); return; @@ -1494,9 +1492,8 @@ pppoe_timeout(void *arg) "error=%d\n", sc->sc_sppp.pp_if.if_xname, err); } - callout_reset(&sc->sc_timeout, - PPPOE_DISC_TIMEOUT * (1 + sc->sc_padr_retried), - pppoe_timeout, sc); + callout_schedule(&sc->sc_timeout, + PPPOE_DISC_TIMEOUT * (1 + sc->sc_padr_retried)); RELEASE_SPLNET(); break; case PPPOE_STATE_CLOSING: @@ -1534,7 +1531,7 @@ pppoe_connect(struct pppoe_softc *sc) if (err != 0 && sc->sc_sppp.pp_if.if_flags & IFF_DEBUG) printf("%s: failed to send PADI, error=%d\n", sc->sc_sppp.pp_if.if_xname, err); - callout_reset(&sc->sc_timeout, PPPOE_DISC_TIMEOUT, pppoe_timeout, sc); + callout_schedule(&sc->sc_timeout, PPPOE_DISC_TIMEOUT); RELEASE_SPLNET(); return err; } @@ -1820,7 +1817,7 @@ pppoe_tls(struct sppp *sp) } else { wtime = PPPOE_RECON_IMMEDIATE; } - callout_reset(&sc->sc_timeout, wtime, pppoe_timeout, sc); + callout_schedule(&sc->sc_timeout, wtime); PPPOE_UNLOCK(sc); } @@ -1843,7 +1840,7 @@ pppoe_tlf(struct sppp *sp) */ sc->sc_state = PPPOE_STATE_CLOSING; - callout_reset(&sc->sc_timeout, hz/50, pppoe_timeout, sc); + callout_schedule(&sc->sc_timeout, hz/50); PPPOE_UNLOCK(sc); }
CVS commit: src/bin/sh
Module Name:src Committed By: wiz Date: Fri Sep 18 07:21:26 UTC 2020 Modified Files: src/bin/sh: sh.1 Log Message: Remove superfluous Ed. To generate a diff of this commit: cvs rdiff -u -r1.228 -r1.229 src/bin/sh/sh.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/sh.1 diff -u src/bin/sh/sh.1:1.228 src/bin/sh/sh.1:1.229 --- src/bin/sh/sh.1:1.228 Fri Sep 18 06:48:28 2020 +++ src/bin/sh/sh.1 Fri Sep 18 07:21:26 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: sh.1,v 1.228 2020/09/18 06:48:28 kre Exp $ +.\" $NetBSD: sh.1,v 1.229 2020/09/18 07:21:26 wiz Exp $ .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -2618,7 +2618,6 @@ and also exporting the variables named and .Dq c , which is probably not as intended. -.Ed .Pp With no arguments the export command lists the names of all set exported variables,