CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Thu Jan 31 06:46:52 UTC 2019 Modified Files: src/doc [netbsd-8]: CHANGES-8.1 Log Message: Tickets #1177, #1178, #1179 To generate a diff of this commit: cvs rdiff -u -r1.1.2.99 -r1.1.2.100 src/doc/CHANGES-8.1 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-8.1 diff -u src/doc/CHANGES-8.1:1.1.2.99 src/doc/CHANGES-8.1:1.1.2.100 --- src/doc/CHANGES-8.1:1.1.2.99 Wed Jan 30 13:56:10 2019 +++ src/doc/CHANGES-8.1 Thu Jan 31 06:46:52 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.1,v 1.1.2.99 2019/01/30 13:56:10 martin Exp $ +# $NetBSD: CHANGES-8.1,v 1.1.2.100 2019/01/31 06:46:52 martin Exp $ A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1 release: @@ -2358,3 +2358,51 @@ usr.bin/systat/vmstat.c1.86 Fixe terminal resize handling in some systat(1) screens. [christos, ticket #1176] +sys/dev/mii/rgephy.c1.45 +sys/dev/mii/urlphy.c1.32 + + Pass flags correctly. + [msaitoh, ticket #1177] + +sys/dev/pci/pci.c1.154 + + Clearing PCI_PMCSR_PME_STS(W1C) bit is required to stop asserting PME#. + This change would prevent unexpected rebooting from shutdown -p or + unexpected resuming from suspend. + [msaitoh, ticket #1178] + +sys/dev/pci/if_wm.c1.603-1.605,1.607-1.611,1.613,1.615,1.618-1.620 via patch +sys/dev/pci/if_wmreg.h1.110-1.111 +sys/dev/pci/if_wmvar.h1.40-1.42 +sys/dev/mii/inbmphyreg.h 1.13-1.15 + + - Add some code for suspend/resume: + - Rename wm_smbustopci() to wm_init_phy_workarounds_pchlan(). It will + also called when resume. + - Call wm_phy_resetisblocked() after PHY reset in + wm_init_phy_workarounds_pchlan() to wait for the PHY to quiesce to + an accessible state. + - Add new wm_resume_workarounds_pchlan() function and use it in + wm_resume(). This workaround is only for PCH2 and newer. + - Don't call wm_disable_aspm() neither in wm_attach() nor in + wm_resume() but in wm_reset(). + - Do some initialization in wm_resume() when IFF_UP is NOT set. + - Don't continue when it failed to acquire semaphore in + wm_ulp_disable(). + - Print CLSEM workaround bit correctly. + - Fix availability detection of WoL on some chips. + - Print the WUS (WakeUp Status) register bits when resume. + - Don't setup WoL on non-WoL capable port. + - Setup PHY wakeup feature on PCH and newer. Tested on Thinkpad X220. + - Remove an extra register read in + wm_kmrn_lock_loss_workaround_ich8lan(). + - Don't leave the MDICNFG register modified when the Power Management + capability offset can't get. + - Reduce indent level of wm_linkintr_gmii(). No functional change. + - 80003's SERDES is not the same as 82575's but the same as legacy + devices. Use the old methods on 80003. + - Use __nothing for null DPRINTF(). + - Rename functions. Add comment. + [msaitoh, ticket #1179] + +
CVS commit: src/external/gpl3/gcc/lib/libgcc
Module Name:src Committed By: mrg Date: Thu Jan 31 06:47:22 UTC 2019 Modified Files: src/external/gpl3/gcc/lib/libgcc: Makefile.inc Log Message: don't build the ditf files on x86 anymore. they come from soft-fp now. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/external/gpl3/gcc/lib/libgcc/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/external/gpl3/gcc/lib/libgcc/Makefile.inc diff -u src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.38 src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.39 --- src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.38 Sat Jan 19 17:11:02 2019 +++ src/external/gpl3/gcc/lib/libgcc/Makefile.inc Thu Jan 31 06:47:21 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.38 2019/01/19 17:11:02 mrg Exp $ +# $NetBSD: Makefile.inc,v 1.39 2019/01/31 06:47:21 mrg Exp $ LIBGCC_MACHINE_ARCH?=${MACHINE_ARCH:S/earmv5/earm/} @@ -72,15 +72,21 @@ LIB2FUNCS_ALL+= \ empty(LIBGCC_MACHINE_ARCH:Maarch64*) && \ empty(LIBGCC_MACHINE_ARCH:Mmips64*) +EXTRA_FUNC_SIZES= sf df xf + +.if ${LIBGCC_MACHINE_ARCH} != "x86_64" && ${LIBGCC_MACHINE_ARCH} != "i386" +EXTRA_FUNC_SIZES+= tf +.endif + # non swfloat versions .for _p in _fix _fixuns -. for _m in sf df xf tf +. for _m in ${EXTRA_FUNC_SIZES} LIB2FUNCS_ALL+= ${_p}${_m}di . endfor .endfor .for _p in _float _floatun -. for _m in sf df xf tf +. for _m in ${EXTRA_FUNC_SIZES} LIB2FUNCS_ALL+= ${_p}di${_m} . endfor .endfor
CVS commit: src/external/gpl3/gcc/lib/libgcc/arch
Module Name:src Committed By: mrg Date: Thu Jan 31 06:53:21 UTC 2019 Added Files: src/external/gpl3/gcc/lib/libgcc/arch/aarch64: gthr-defs.mk src/external/gpl3/gcc/lib/libgcc/arch/powerpc: gthr-defs.mk Log Message: add missing files To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ src/external/gpl3/gcc/lib/libgcc/arch/aarch64/gthr-defs.mk cvs rdiff -u -r0 -r1.1 \ src/external/gpl3/gcc/lib/libgcc/arch/powerpc/gthr-defs.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/gpl3/gcc/lib/libgcc/arch/aarch64/gthr-defs.mk diff -u /dev/null src/external/gpl3/gcc/lib/libgcc/arch/aarch64/gthr-defs.mk:1.1 --- /dev/null Thu Jan 31 06:53:21 2019 +++ src/external/gpl3/gcc/lib/libgcc/arch/aarch64/gthr-defs.mk Thu Jan 31 06:53:21 2019 @@ -0,0 +1,9 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-gcc,v 1.96 2019/01/19 20:02:06 mrg Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_enable_execute_stack=enable-execute-stack-mprotect.c +G_unwind_header=unwind-generic.h +G_md_unwind_header=aarch64/aarch64-unwind.h +G_sfp_machine_header=aarch64/sfp-machine.h +G_thread_header=gthr-posix.h Index: src/external/gpl3/gcc/lib/libgcc/arch/powerpc/gthr-defs.mk diff -u /dev/null src/external/gpl3/gcc/lib/libgcc/arch/powerpc/gthr-defs.mk:1.1 --- /dev/null Thu Jan 31 06:53:21 2019 +++ src/external/gpl3/gcc/lib/libgcc/arch/powerpc/gthr-defs.mk Thu Jan 31 06:53:21 2019 @@ -0,0 +1,9 @@ +# This file is automatically generated. DO NOT EDIT! +# Generated from: NetBSD: mknative-gcc,v 1.96 2019/01/19 20:02:06 mrg Exp +# Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp +# +G_enable_execute_stack=enable-execute-stack-mprotect.c +G_unwind_header=unwind-generic.h +G_md_unwind_header=no-unwind.h +G_sfp_machine_header=rs6000/sfp-machine.h +G_thread_header=gthr-posix.h
CVS commit: src/external/gpl3/gcc/dist/gcc
Module Name:src Committed By: mrg Date: Thu Jan 31 06:59:31 UTC 2019 Modified Files: src/external/gpl3/gcc/dist/gcc: config.gcc Log Message: - remove stale comment - remove i386 a.out support - use ${nbsd_tm_file} for all netbsd targets - remove duplicated (old) riscv stuff To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/external/gpl3/gcc/dist/gcc/config.gcc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/config.gcc diff -u src/external/gpl3/gcc/dist/gcc/config.gcc:1.44 src/external/gpl3/gcc/dist/gcc/config.gcc:1.45 --- src/external/gpl3/gcc/dist/gcc/config.gcc:1.44 Sat Jan 19 12:10:04 2019 +++ src/external/gpl3/gcc/dist/gcc/config.gcc Thu Jan 31 06:59:31 2019 @@ -323,8 +323,6 @@ arc*-*-*) ;; arm*-*-*) cpu_type=arm - # XXXMRG -- still need this? - need_64bit_hwint=yes extra_objs="arm-builtins.o aarch-common.o" extra_headers="mmintrin.h arm_neon.h arm_acle.h arm_fp16.h arm_cmse.h" target_type_format_char='%' @@ -1549,15 +1547,8 @@ i[34567]86-*-netbsdelf*) tmake_file="${tmake_file} i386/t-crtstuff" extra_options="${extra_options} netbsd.opt netbsd-elf.opt" ;; -i[34567]86-*-netbsd*) - tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h netbsd.h netbsd-aout.h i386/netbsd.h" - tmake_file="${tmake_file} t-netbsd" - extra_options="${extra_options} netbsd.opt netbsd-elf.opt" - extra_parts="" - use_collect2=yes - ;; x86_64-*-netbsd*) - tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-stdint.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h" + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${nbsd_tm_file} i386/x86-64.h i386/netbsd64.h" tmake_file="${tmake_file} i386/t-netbsd64" extra_options="${extra_options} netbsd.opt netbsd-elf.opt" ;; @@ -2164,7 +2155,7 @@ riscv*-*-elf* | riscv*-*-rtems*) ;; riscv*-*-netbsd*)# NetBSD RISC-V # XXXMRG not ported yet, copied from old config - tm_file="elfos.h ${tm_file} netbsd.h netbsd-elf.h riscv/netbsd.h" + tm_file="elfos.h ${tm_file} ${nbsd_tm_file} riscv/netbsd.h" case ${target} in riscv32*) tm_defines="${tm_defines} TARGET_64BIT_DEFAULT=0" ;; *) tmake_file="${tmake_file} riscv/t-netbsd64" ;; @@ -2480,7 +2471,7 @@ or1k*-*-linux-*) esac ;; or1k*-*-netbsd*) - tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h netbsd-stdint.h or1k/netbsd.h" + tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file} or1k/netbsd.h" extra_options="${extra_options} netbsd.opt netbsd-elf.opt" case ${target} in or1knd-*) tm_defines="${tm_defines} OR1K_DELAY_DEFAULT=OR1K_DELAY_OFF" ;; @@ -4515,30 +4506,6 @@ case "${target}" in fi ;; - riscv*-*-*) - supported_defaults="abi arch arch_32 arch_64 float tune tune_32 tune_64" - - case ${with_float} in - "" | soft | hard) - # OK - ;; - *) - echo "Unknown floating point type used in --with-float=$with_float" 1>&2 - exit 1 - ;; - esac - - case ${with_abi} in - "" | 32 | 64) - # OK - ;; - *) - echo "Unknown ABI used in --with-abi=$with_abi" 1>&2 - exit 1 - ;; - esac - ;; - s390*-*-*) supported_defaults="arch mode tune"
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: mrg Date: Thu Jan 31 06:53:00 UTC 2019 Modified Files: src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64: defs.mk src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64: auto-host.h configargs.h Log Message: regen for new filesystem changes. fix auto-host.h generation. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 \ src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/defs.mk cvs rdiff -u -r1.15 -r1.16 \ src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/auto-host.h cvs rdiff -u -r1.40 -r1.41 \ src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/configargs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/defs.mk diff -u src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/defs.mk:1.11 src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/defs.mk:1.12 --- src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/defs.mk:1.11 Sat Jan 19 20:02:06 2019 +++ src/external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/defs.mk Thu Jan 31 06:53:00 2019 @@ -1,5 +1,5 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-gcc,v 1.95 2019/01/19 17:08:39 mrg Exp +# Generated from: NetBSD: mknative-gcc,v 1.96 2019/01/19 20:02:06 mrg Exp # Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_port_specific_symbol_files=${GNUHOSTDIST}/libstdc++-v3/config/abi/pre/float128.ver @@ -11,6 +11,7 @@ G_SRC_SOURCES=compatibility.cc compatibi G_CPP11_SOURCES=chrono.cc c11-codecvt.cc condition_variable.cc cow-stdexcept.cc ctype.cc debug.cc functexcept.cc functional.cc futex.cc future.cc hash_c++0x.cc hashtable_c++0x.cc ios.cc limits.cc mutex.cc placeholders.cc random.cc regex.cc shared_ptr.cc snprintf_lite.cc system_error.cc thread.cc ctype_configure_char.cc ctype_members.cc ext11-inst.cc fstream-inst.cc ios-inst.cc iostream-inst.cc istream-inst.cc locale-inst.cc ostream-inst.cc sstream-inst.cc streambuf-inst.cc string-inst.cc string-io-inst.cc wlocale-inst.cc wstring-inst.cc wstring-io-inst.cc G_GLIBCXX_ABI_FLAGS= G_CPP98_SOURCES=bitmap_allocator.cc pool_allocator.cc mt_allocator.cc c98-codecvt.cc complex_io.cc globals_io.cc hash_tr1.cc hashtable_tr1.cc ios_failure.cc ios_init.cc ios_locale.cc list.cc list-aux.cc list-aux-2.cc list_associated.cc list_associated-2.cc locale.cc locale_init.cc locale_facets.cc localename.cc math_stubs_float.cc math_stubs_long_double.cc stdexcept.cc strstream.cc tree.cc istream.cc istream-string.cc streambuf.cc valarray.cc atomicity.cc codecvt_members.cc collate_members.cc messages_members.cc monetary_members.cc numeric_members.cc time_members.cc basic_file.cc c++locale.cc allocator-inst.cc concept-inst.cc ext-inst.cc misc-inst.cc parallel_settings.cc +G_FILESYSTEM_SOURCES=dir.cc ops.cc path.cc G_ATOMICITY_SRCDIR=config/cpu/generic/atomicity_builtins G_BASIC_FILE_CC=config/io/basic_file_stdio.cc G_CLOCALE_CC=config/locale/generic/c_locale.cc Index: src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/auto-host.h diff -u src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/auto-host.h:1.15 src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/auto-host.h:1.16 --- src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/auto-host.h:1.15 Sat Jan 19 17:12:04 2019 +++ src/external/gpl3/gcc/usr.bin/gcc/arch/x86_64/auto-host.h Thu Jan 31 06:53:00 2019 @@ -1,5 +1,5 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-gcc,v 1.94 2018/09/04 22:57:25 mrg Exp */ +/* Generated from: NetBSD: mknative-gcc,v 1.96 2019/01/19 20:02:06 mrg Exp */ /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* auto-host.h. Generated from config.in by configure. */ @@ -740,7 +740,7 @@ /* Define if defines clock_t. */ #ifndef USED_FOR_TARGET -/* #undef HAVE_CLOCK_T */ +#define HAVE_CLOCK_T 1 #endif @@ -753,33 +753,33 @@ /* Define to 1 if we found a declaration for 'abort', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_ABORT 0 +#define HAVE_DECL_ABORT 1 #endif /* Define to 1 if we found a declaration for 'asprintf', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_ASPRINTF 0 +#define HAVE_DECL_ASPRINTF 1 #endif /* Define to 1 if we found a declaration for 'atof', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_ATOF 0 +#define HAVE_DECL_ATOF 1 #endif /* Define to 1 if we found a declaration for 'atol', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_ATOL 0 +#define HAVE_DECL_ATOL 1 #endif /* Define to 1 if we found a declaration for 'atoll', otherwise define to 0. */ #ifndef USED_FOR_TARGET -#define HAVE_DECL_ATOLL 0 +#define HAVE_DECL_ATOLL 1 #endif @@ -793,7 +793,7 @@ /* Define to 1 if we found a declaration for 'calloc', otherwise define to 0. */ #ifndef U
CVS commit: src/external/gpl3/gcc/dist/gcc
Module Name:src Committed By: mrg Date: Thu Jan 31 06:58:10 UTC 2019 Modified Files: src/external/gpl3/gcc/dist/gcc: genemit.c Log Message: reduce diff to upstream To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/dist/gcc/genemit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/genemit.c diff -u src/external/gpl3/gcc/dist/gcc/genemit.c:1.7 src/external/gpl3/gcc/dist/gcc/genemit.c:1.8 --- src/external/gpl3/gcc/dist/gcc/genemit.c:1.7 Sat Jan 19 12:10:04 2019 +++ src/external/gpl3/gcc/dist/gcc/genemit.c Thu Jan 31 06:58:10 2019 @@ -188,9 +188,11 @@ gen_exp (rtx x, enum rtx_code subroutine printf ("const_true_rtx"); else { - printf ("GEN_INT (HOST_WIDE_INT_C ("); + printf ("GEN_INT ("); + printf ("HOST_WIDE_INT_C ("); printf (HOST_WIDE_INT_PRINT_DEC, INTVAL (x)); - printf ("))"); + printf (")"); + printf (")"); } return;
CVS commit: src/external/gpl3/gcc/lib
Module Name:src Committed By: mrg Date: Thu Jan 31 06:50:51 UTC 2019 Modified Files: src/external/gpl3/gcc/lib/libstdc++-v3: Makefile src/external/gpl3/gcc/lib/libsupc++: Makefile.common Log Message: - add new filesystem/ sources. - sync paths. - remove -Wno-error, doesn't seem to be needed anymore To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile cvs rdiff -u -r1.10 -r1.11 \ src/external/gpl3/gcc/lib/libsupc++/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/external/gpl3/gcc/lib/libstdc++-v3/Makefile diff -u src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.36 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.37 --- src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.36 Tue Jan 22 23:55:54 2019 +++ src/external/gpl3/gcc/lib/libstdc++-v3/Makefile Thu Jan 31 06:50:51 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.36 2019/01/22 23:55:54 mrg Exp $ +# $NetBSD: Makefile,v 1.37 2019/01/31 06:50:51 mrg Exp $ REQUIRETOOLS= yes NOLINT= # defined @@ -62,6 +62,7 @@ CPPFLAGS+= -D_GLIBCXX_SHARED -DGTHREAD_U #CXXFLAGS+= ${G_SECTION_FLAGS} #CXXFLAGS+= -ffunction-sections -fdata-sections COPTS.bitmap_allocator.cc+= -ffunction-sections -fdata-sections +COPTS.pool_allocator.cc+= -ffunction-sections -fdata-sections CONF= ${DIST}/libstdc++-v3/config @@ -151,18 +152,21 @@ CXX11_ALWAYS= localename.cc \ compatibility-chrono.cc \ compatibility-condvar.cc \ ios_failure.cc + +.for _s in ${G_CPP11_SOURCES:M*.cc} ${CXX11_ALWAYS} +COPTS.${_s}+= -std=gnu++11 +.endfor + +.for _s in ${G_FILESYSTEM_SOURCES:M*.cc} +COPTS.${_s}+= -std=gnu++14 +.endfor + .for _s in ${SRCS:M*.cc} . if empty(COPTS.${_s}:M-std=*) COPTS.${_s}+= -std=gnu++98 . endif .endfor -.for _s in ${G_CPP11_SOURCES:M*.cc} ${CXX11_ALWAYS} -# XXX error: 'template class std::auto_ptr' is deprecated -COPTS.${_s}+= -std=gnu++11 -Wno-error -.endfor -COPTS.del_ops.cc += -Wno-c++14-compat -COPTS.del_opvs.cc += -Wno-c++14-compat COPTS.cp-demangle.c += -Wno-unused-function COPTS.ext-inst.cc+= -Wno-error @@ -182,6 +186,7 @@ COPTS.${f}.cc+= -fimplicit-templates ${G .PATH: ${DIST}/libstdc++-v3/src \ ${DIST}/libstdc++-v3/src/c++98 \ ${DIST}/libstdc++-v3/src/c++11 \ + ${DIST}/libstdc++-v3/src/filesystem \ ${DIST}/libstdc++-v3/libsupc++ \ ${DIST}/libstdc++-v3/config/os/bsd/netbsd \ ${CONF}/locale/generic \ Index: src/external/gpl3/gcc/lib/libsupc++/Makefile.common diff -u src/external/gpl3/gcc/lib/libsupc++/Makefile.common:1.10 src/external/gpl3/gcc/lib/libsupc++/Makefile.common:1.11 --- src/external/gpl3/gcc/lib/libsupc++/Makefile.common:1.10 Tue Jan 22 23:55:54 2019 +++ src/external/gpl3/gcc/lib/libsupc++/Makefile.common Thu Jan 31 06:50:51 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.10 2019/01/22 23:55:54 mrg Exp $ +# $NetBSD: Makefile.common,v 1.11 2019/01/31 06:50:51 mrg Exp $ DIST= ${GCCDIST} GNUHOSTDIST= ${DIST} @@ -12,7 +12,7 @@ LIBSTDCXX_MACHINE_ARCH=${MLIBDIR} LIBSTDCXX_MACHINE_ARCH=${GCC_MACHINE_ARCH} .endif -LIBSTDCXXSRCS= ${G_SRC_SOURCES} ${G_CPP98_SOURCES} ${G_CPP11_SOURCES} +LIBSTDCXXSRCS= ${G_SRC_SOURCES} ${G_CPP98_SOURCES} ${G_CPP11_SOURCES} ${G_FILESYSTEM_SOURCES} LIBSUPCXXSRCS= ${G_LIBSUPCXX_SOURCES} ${G_LIBSUPCXX_C_SOURCES} CPPFLAGS+= -I${DIST}/gcc @@ -24,25 +24,44 @@ CPPFLAGS+= -DHAVE_STDLIB_H -DHAVE_STRING CPPFLAGS.cp-demangle.c=-DIN_GLIBCPP_V3 -STD_GNU11= bad_array_length bad_array_new \ - eh_aux_runtime eh_ptr eh_terminate eh_throw \ - guard atexit_thread nested_exception \ - new_handler new_op new_opnt +STD_GNU11= \ + bad_array_length \ + bad_array_new \ + eh_aux_runtime \ + eh_ptr \ + eh_terminate \ + eh_throw \ + guard \ + atexit_thread \ + nested_exception \ + new_handler \ + new_op \ + new_opnt + .for _f in ${STD_GNU11} COPTS.${_f}.cc= -std=gnu++11 .endfor -STD_GNU14= del_ops del_opvs +STD_GNU14= \ + del_ops \ + del_opvs + .for _f in ${STD_GNU14} COPTS.${_f}.cc= -std=gnu++14 -Wno-sized-deallocation .endfor -STD_GNU1Z= new_opa new_opant \ - new_opva new_opvant \ - del_opa del_opant del_opsa \ - del_opva del_opvant del_opvsa +STD_GNU1Z= \ + new_opa \ + new_opant \ + new_opva \ + new_opvant \ + del_opa \ + del_opant \ + del_opsa \ + del_opva \ + del_opvant \ + del_opvsa .for _f in ${STD_GNU1Z} COPTS.${_f}.cc= -std=gnu++1z .endfor -
CVS commit: [netbsd-8] src/sys/dev
Module Name:src Committed By: martin Date: Thu Jan 31 06:43:48 UTC 2019 Modified Files: src/sys/dev/mii [netbsd-8]: inbmphyreg.h src/sys/dev/pci [netbsd-8]: if_wm.c if_wmreg.h if_wmvar.h Log Message: Pull up the following, requested by msaitoh in ticket #1179: sys/dev/pci/if_wm.c 1.603-1.605,1.607-1.611, 1.613,1.615,1.618-1.620 via patch sys/dev/pci/if_wmreg.h 1.110-1.111 sys/dev/pci/if_wmvar.h 1.40-1.42 sys/dev/mii/inbmphyreg.h1.13-1.15 - Add some code for suspend/resume: - Rename wm_smbustopci() to wm_init_phy_workarounds_pchlan(). It will also called when resume. - Call wm_phy_resetisblocked() after PHY reset in wm_init_phy_workarounds_pchlan() to wait for the PHY to quiesce to an accessible state. - Add new wm_resume_workarounds_pchlan() function and use it in wm_resume(). This workaround is only for PCH2 and newer. - Don't call wm_disable_aspm() neither in wm_attach() nor in wm_resume() but in wm_reset(). - Do some initialization in wm_resume() when IFF_UP is NOT set. - Don't continue when it failed to acquire semaphore in wm_ulp_disable(). - Print CLSEM workaround bit correctly. - Fix availability detection of WoL on some chips. - Print the WUS (WakeUp Status) register bits when resume. - Don't setup WoL on non-WoL capable port. - Setup PHY wakeup feature on PCH and newer. Tested on Thinkpad X220. - Remove an extra register read in wm_kmrn_lock_loss_workaround_ich8lan(). - Don't leave the MDICNFG register modified when the Power Management capability offset can't get. - Reduce indent level of wm_linkintr_gmii(). No functional change. - 80003's SERDES is not the same as 82575's but the same as legacy devices. Use the old methods on 80003. - Use __nothing for null DPRINTF(). - Rename functions. Add comment. To generate a diff of this commit: cvs rdiff -u -r1.9.8.3 -r1.9.8.4 src/sys/dev/mii/inbmphyreg.h cvs rdiff -u -r1.508.4.28 -r1.508.4.29 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.98.6.6 -r1.98.6.7 src/sys/dev/pci/if_wmreg.h cvs rdiff -u -r1.33.6.3 -r1.33.6.4 src/sys/dev/pci/if_wmvar.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/mii/inbmphyreg.h diff -u src/sys/dev/mii/inbmphyreg.h:1.9.8.3 src/sys/dev/mii/inbmphyreg.h:1.9.8.4 --- src/sys/dev/mii/inbmphyreg.h:1.9.8.3 Tue Dec 4 11:21:32 2018 +++ src/sys/dev/mii/inbmphyreg.h Thu Jan 31 06:43:48 2019 @@ -1,6 +1,6 @@ -/* $NetBSD: inbmphyreg.h,v 1.9.8.3 2018/12/04 11:21:32 martin Exp $ */ +/* $NetBSD: inbmphyreg.h,v 1.9.8.4 2019/01/31 06:43:48 martin Exp $ */ /*** -Copyright (c) 2001-2005, Intel Corporation +Copyright (c) 2001-2015, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -39,12 +39,16 @@ POSSIBILITY OF SUCH DAMAGE. #define _DEV_MII_INBMPHYREG_H_ /* Bits... - * 15-5: page - * 4-0: register offset + * 31-16: register offset (high) + * 15-5: page + * 4-0: register offset (low) */ -#define BME1000_PAGE_SHIFT5 +#define BME1000_PAGE_SHIFT 5 +#define BM_PHY_UPPER_SHIFT 21 #define BME1000_REG(page, reg)\ -(((page) << BME1000_PAGE_SHIFT) | ((reg) & MII_ADDRMASK)) +(((reg) & MII_ADDRMASK) | \ + (((page) & 0x) << BME1000_PAGE_SHIFT) | \ + (((reg) & ~MII_ADDRMASK) << (BM_PHY_UPPER_SHIFT - BME1000_PAGE_SHIFT))) #define BME1000_MAX_MULTI_PAGE_REG 0xf /* Registers equal on all pages */ @@ -52,7 +56,7 @@ POSSIBILITY OF SUCH DAMAGE. ((uint16_t)(((offset) >> BME1000_PAGE_SHIFT) & 0x)) #define BM_PHY_REG_NUM(offset)\ ((uint16_t)((offset) & MII_ADDRMASK) \ - | (((offset) >> (21 - BME1000_PAGE_SHIFT)) & ~MII_ADDRMASK)) + | (((offset) >> (BM_PHY_UPPER_SHIFT - BME1000_PAGE_SHIFT)) & ~MII_ADDRMASK)) /* BME1000 Specific Registers */ #define BME1000_PHY_SPEC_CTRL BME1000_REG(0, 16) /* PHY Specific Control */ @@ -126,6 +130,20 @@ POSSIBILITY OF SUCH DAMAGE. #define IGP3_KMRN_DIAG BME1000_REG(770, 19) #define IGP3_KMRN_DIAG_PCS_LOCK_LOSS (1 << 1) +#define I217_LPI_GPIO_CTRL BME1000_REG(772, 18) +#define I217_LPI_GPIO_CTRL_AUTO_EN_LPI __BIT(11) + +#define I82579_LPI_CTRL BME1000_REG(772, 20) +#define I82579_LPI_CTRL_ENABLE __BITS(14, 13) +#define I82579_LPI_CTRL_EN_100 __BIT(13) +#define I82579_LPI_CTRL_EN_1000 __BIT(14) + +#define I217_MEMPWR BME1000_REG(772, 26) +#define I217_MEMPWR_DISABLE_SMB_RELEASE 0x0010 + +#define I217_CFGREG BME1000_REG(772, 29) +#define I217_CGFREG_ENABLE_MTA_RESET 0x0002 + #define HV_MUX_DATA_CTRL BME1000_REG(776, 16) #define HV_MUX_DATA_CTRL_FORCE_SPEED (1 << 2) #define HV_MUX_DATA_CTRL_GEN_TO_MAC (1 << 10) @@ -142,6 +160,16 @@ POSSIBILIT
CVS commit: [netbsd-8] src/sys/dev/pci
Module Name:src Committed By: martin Date: Thu Jan 31 06:02:50 UTC 2019 Modified Files: src/sys/dev/pci [netbsd-8]: pci.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1178): sys/dev/pci/pci.c: revision 1.154 Clearing PCI_PMCSR_PME_STS(W1C) bit is required to stop asserting PME#. This change would prevent unexpected rebooting from shutdown -p or unexpected resuming from suspend. To generate a diff of this commit: cvs rdiff -u -r1.152.6.1 -r1.152.6.2 src/sys/dev/pci/pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pci.c diff -u src/sys/dev/pci/pci.c:1.152.6.1 src/sys/dev/pci/pci.c:1.152.6.2 --- src/sys/dev/pci/pci.c:1.152.6.1 Fri Dec 7 13:27:19 2018 +++ src/sys/dev/pci/pci.c Thu Jan 31 06:02:50 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pci.c,v 1.152.6.1 2018/12/07 13:27:19 martin Exp $ */ +/* $NetBSD: pci.c,v 1.152.6.2 2019/01/31 06:02:50 martin Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 1998 @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.152.6.1 2018/12/07 13:27:19 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.152.6.2 2019/01/31 06:02:50 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_pci.h" @@ -1221,16 +1221,36 @@ pci_child_suspend(device_t dv, const pmf return true; } +static void +pci_pme_check_and_clear(device_t dv, pci_chipset_tag_t pc, pcitag_t tag, +int off) +{ + pcireg_t pmcsr; + + pmcsr = pci_conf_read(pc, tag, off + PCI_PMCSR); + + if (pmcsr & PCI_PMCSR_PME_STS) { + /* Clear W1C bit */ + pmcsr |= PCI_PMCSR_PME_STS; + pci_conf_write(pc, tag, off + PCI_PMCSR, pmcsr); + aprint_verbose_dev(dv, "Clear PME# now\n"); + } +} + static bool pci_child_resume(device_t dv, const pmf_qual_t *qual) { struct pci_child_power *priv = device_pmf_bus_private(dv); - if (priv->p_has_pm && - pci_set_powerstate_int(priv->p_pc, priv->p_tag, - PCI_PMCSR_STATE_D0, priv->p_pm_offset, priv->p_pm_cap)) { - aprint_error_dev(dv, "unsupported state, continuing.\n"); - return false; + if (priv->p_has_pm) { + if (pci_set_powerstate_int(priv->p_pc, priv->p_tag, + PCI_PMCSR_STATE_D0, priv->p_pm_offset, priv->p_pm_cap)) { + aprint_error_dev(dv, + "unsupported state, continuing.\n"); + return false; + } + pci_pme_check_and_clear(dv, priv->p_pc, priv->p_tag, + priv->p_pm_offset); } pci_conf_restore(priv->p_pc, priv->p_tag, &priv->p_pciconf); @@ -1286,6 +1306,7 @@ pci_child_register(device_t child) priv->p_has_pm = true; priv->p_pm_offset = off; priv->p_pm_cap = reg; + pci_pme_check_and_clear(child, priv->p_pc, priv->p_tag, off); } else { priv->p_has_pm = false; priv->p_pm_offset = -1;
CVS commit: [netbsd-8] src/sys/dev/mii
Module Name:src Committed By: martin Date: Thu Jan 31 05:59:55 UTC 2019 Modified Files: src/sys/dev/mii [netbsd-8]: rgephy.c urlphy.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1177): sys/dev/mii/rgephy.c: revision 1.45 sys/dev/mii/urlphy.c: revision 1.32 Pass flags correctly. See also: http://mail-index.netbsd.org/source-changes/2002/03/25/msg100515.html To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.40.10.1 src/sys/dev/mii/rgephy.c cvs rdiff -u -r1.31 -r1.31.10.1 src/sys/dev/mii/urlphy.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/mii/rgephy.c diff -u src/sys/dev/mii/rgephy.c:1.40 src/sys/dev/mii/rgephy.c:1.40.10.1 --- src/sys/dev/mii/rgephy.c:1.40 Fri Aug 21 12:22:22 2015 +++ src/sys/dev/mii/rgephy.c Thu Jan 31 05:59:55 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rgephy.c,v 1.40 2015/08/21 12:22:22 jmcneill Exp $ */ +/* $NetBSD: rgephy.c,v 1.40.10.1 2019/01/31 05:59:55 martin Exp $ */ /* * Copyright (c) 2003 @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.40 2015/08/21 12:22:22 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.40.10.1 2019/01/31 05:59:55 martin Exp $"); /* @@ -131,7 +131,7 @@ rgephy_attach(device_t parent, device_t sc->mii_mpd_model = MII_MODEL(ma->mii_id2); sc->mii_mpd_rev = MII_REV(ma->mii_id2); sc->mii_pdata = mii; - sc->mii_flags = mii->mii_flags; + sc->mii_flags = ma->mii_flags; sc->mii_anegticks = MII_ANEGTICKS_GIGE; sc->mii_funcs = &rgephy_funcs; Index: src/sys/dev/mii/urlphy.c diff -u src/sys/dev/mii/urlphy.c:1.31 src/sys/dev/mii/urlphy.c:1.31.10.1 --- src/sys/dev/mii/urlphy.c:1.31 Thu Jul 7 06:55:41 2016 +++ src/sys/dev/mii/urlphy.c Thu Jan 31 05:59:55 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: urlphy.c,v 1.31 2016/07/07 06:55:41 msaitoh Exp $ */ +/* $NetBSD: urlphy.c,v 1.31.10.1 2019/01/31 05:59:55 martin Exp $ */ /* * Copyright (c) 2001, 2002 * Shingo WATANABE . All rights reserved. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: urlphy.c,v 1.31 2016/07/07 06:55:41 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: urlphy.c,v 1.31.10.1 2019/01/31 05:59:55 martin Exp $"); #include #include @@ -110,7 +110,7 @@ urlphy_attach(device_t parent, device_t sc->mii_phy = ma->mii_phyno; sc->mii_funcs = &urlphy_funcs; sc->mii_pdata = mii; - sc->mii_flags = mii->mii_flags; + sc->mii_flags = ma->mii_flags; sc->mii_anegticks = MII_ANEGTICKS_GIGE; /* Don't do loopback on this PHY. */
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Jan 31 05:48:32 UTC 2019 Modified Files: src/sys/dev/pci: if_wm.c Log Message: We now have IFM_2500_KX and IFM_1000_KX, so use them. To generate a diff of this commit: cvs rdiff -u -r1.621 -r1.622 src/sys/dev/pci/if_wm.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_wm.c diff -u src/sys/dev/pci/if_wm.c:1.621 src/sys/dev/pci/if_wm.c:1.622 --- src/sys/dev/pci/if_wm.c:1.621 Thu Jan 31 05:20:49 2019 +++ src/sys/dev/pci/if_wm.c Thu Jan 31 05:48:32 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.621 2019/01/31 05:20:49 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.622 2019/01/31 05:48:32 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -83,7 +83,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.621 2019/01/31 05:20:49 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.622 2019/01/31 05:48:32 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -12186,9 +12186,9 @@ wm_serdes_mediastatus(struct ifnet *ifp, status = CSR_READ(sc, WMREG_STATUS); if (((status & STATUS_2P5_SKU) != 0) && ((status & STATUS_2P5_SKU_OVER) == 0)) { - ifmr->ifm_active |= IFM_2500_SX; /* XXX KX */ + ifmr->ifm_active |= IFM_2500_KX; } else - ifmr->ifm_active |= IFM_1000_SX; /* XXX KX */ + ifmr->ifm_active |= IFM_1000_KX; } else { switch (__SHIFTOUT(reg, PCS_LSTS_SPEED)) { case PCS_LSTS_SPEED_10:
CVS commit: src/sys/dev/usb
Module Name:src Committed By: rin Date: Thu Jan 31 05:25:48 UTC 2019 Modified Files: src/sys/dev/usb: if_mue.c Log Message: Add missing callout_destroy() in mue_detach(). To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/dev/usb/if_mue.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_mue.c diff -u src/sys/dev/usb/if_mue.c:1.29 src/sys/dev/usb/if_mue.c:1.30 --- src/sys/dev/usb/if_mue.c:1.29 Wed Jan 30 11:11:45 2019 +++ src/sys/dev/usb/if_mue.c Thu Jan 31 05:25:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_mue.c,v 1.29 2019/01/30 11:11:45 rin Exp $ */ +/* $NetBSD: if_mue.c,v 1.30 2019/01/31 05:25:48 rin Exp $ */ /* $OpenBSD: if_mue.c,v 1.3 2018/08/04 16:42:46 jsg Exp $ */ /* @@ -20,7 +20,7 @@ /* Driver for Microchip LAN7500/LAN7800 chipsets. */ #include -__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.29 2019/01/30 11:11:45 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.30 2019/01/31 05:25:48 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1077,6 +1077,7 @@ mue_detach(device_t self, int flags) if (ifp->if_flags & IFF_RUNNING) mue_stop(ifp, 1); + callout_destroy(&sc->mue_stat_ch); rnd_detach_source(&sc->mue_rnd_source); mii_detach(&sc->mue_mii, MII_PHY_ANY, MII_OFFSET_ANY); ifmedia_delete_instance(&sc->mue_mii.mii_media, IFM_INST_ANY);
CVS commit: src/sys/dev/usb
Module Name:src Committed By: rin Date: Thu Jan 31 05:25:07 UTC 2019 Modified Files: src/sys/dev/usb: if_muevar.h Log Message: Make MUE_[TR]X_LIST_CNT configurable for debugging. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/usb/if_muevar.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/if_muevar.h diff -u src/sys/dev/usb/if_muevar.h:1.4 src/sys/dev/usb/if_muevar.h:1.5 --- src/sys/dev/usb/if_muevar.h:1.4 Sat Jan 5 07:56:07 2019 +++ src/sys/dev/usb/if_muevar.h Thu Jan 31 05:25:07 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_muevar.h,v 1.4 2019/01/05 07:56:07 mlelstv Exp $ */ +/* $NetBSD: if_muevar.h,v 1.5 2019/01/31 05:25:07 rin Exp $ */ /* $OpenBSD: if_muereg.h,v 1.1 2018/08/03 01:50:15 kevlo Exp $ */ /* @@ -31,9 +31,13 @@ struct mue_chain { }; struct mue_cdata { +#ifndef MUE_TX_LIST_CNT #define MUE_TX_LIST_CNT 4 +#endif struct mue_chain mue_tx_chain[MUE_TX_LIST_CNT]; +#ifndef MUE_RX_LIST_CNT #define MUE_RX_LIST_CNT 4 +#endif struct mue_chain mue_rx_chain[MUE_RX_LIST_CNT]; int mue_tx_prod; int mue_tx_cons;
CVS commit: src/sys/dev
Module Name:src Committed By: msaitoh Date: Thu Jan 31 05:20:49 UTC 2019 Modified Files: src/sys/dev/mii: inbmphyreg.h src/sys/dev/pci: if_wm.c if_wmreg.h Log Message: Add some workarounds which use EMI register or EEE related: - PCH only: Add workaround for link disconnects on a busy hub in half duplex. - PCH and PCH2 only: Set MSE higher to enable link to stay up when noise is high. - PCH2 only: Drop link after 5 times MSE threshold was reached. - PCH2 only: Set EEE LPI Update Timer to 200usec. - For PCH2 and newer: When connected at 10Mbps half-duplex, some parts are excessively aggressive resulting in many collisions. To avoid this, increase the IPG and reduce Rx latency in the PHY. - For I21[789] and if EEE is enabled: Disable LPLU if both link partners support 100BaseT EEE and 100Full is advertised on both ends of the link, and enable Auto Enable LPI since there will be no driver to enable LPI while in Sx. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/dev/mii/inbmphyreg.h cvs rdiff -u -r1.620 -r1.621 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.111 -r1.112 src/sys/dev/pci/if_wmreg.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/mii/inbmphyreg.h diff -u src/sys/dev/mii/inbmphyreg.h:1.16 src/sys/dev/mii/inbmphyreg.h:1.17 --- src/sys/dev/mii/inbmphyreg.h:1.16 Mon Jan 7 01:43:22 2019 +++ src/sys/dev/mii/inbmphyreg.h Thu Jan 31 05:20:49 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: inbmphyreg.h,v 1.16 2019/01/07 01:43:22 msaitoh Exp $ */ +/* $NetBSD: inbmphyreg.h,v 1.17 2019/01/31 05:20:49 msaitoh Exp $ */ /*** Copyright (c) 2001-2015, Intel Corporation All rights reserved. @@ -81,15 +81,21 @@ POSSIBILITY OF SUCH DAMAGE. /* Extended Management Interface (EMI) Registers */ #define I82579_EMI_ADDR 0x10 #define I82579_EMI_DATA 0x11 +#define I82579_LPI_UPDATE_TIMER 0x4805 /* in 40ns units + 40 ns base value */ +#define I82579_MSE_THRESHOLD 0x084F /* 82579 Mean Square Error Threshold */ +#define I82577_MSE_THRESHOLD 0x0887 /* 82577 Mean Square Error Threshold */ +#define I82579_MSE_LINK_DOWN 0x2411 /* MSE count before dropping link */ #define I82579_EEE_ADVERTISEMENT 0x040e /* IEEE MMD Register 7.60 */ #define I82579_EEE_LP_ABILITY 0x040f /* IEEE MMD Register 7.61 */ #define I82579_EEE_PCS_STATUS 0x182e +#define I82579_RX_CONFIG 0x3412 /* Receive configuration */ #define I82579_LPI_PLL_SHUT 0x4412 -#define I82579_LPI_PLL_SHUT_100 __BIT(2) /* 100M LPI PLL Shut Enable */ +#define I82579_LPI_PLL_SHUT_100 __BIT(2) /* 100M LPI PLL Shut Enable */ #define I217_EEE_PCS_STATUS 0x9401 /* IEEE MMD Register 3.1 */ #define I217_EEE_CAPABILITY 0x8000 /* IEEE MMD Register 3.20 */ #define I217_EEE_ADVERTISEMENT 0x8001 /* IEEE MMD Register 7.60 */ #define I217_EEE_LP_ABILITY 0x8002 /* IEEE MMD Register 7.61 */ +#define I217_RX_CONFIG 0xb20c /* Receive configuration */ /* BM PHY Copper Specific Status */ #define BM_CS_STATUS BME1000_REG(0, 17) @@ -134,6 +140,7 @@ POSSIBILITY OF SUCH DAMAGE. #define CV_SMB_CTRL_FORCE_SMBUS __BIT(0) #define HV_PM_CTRL BME1000_REG(770, 17) +#define HV_PM_CTRL_K1_CLK_REQ __BIT(9) #define HV_PM_CTRL_K1_ENA __BIT(14) #define I217_INBAND_CTRL BME1000_REG(770, 18) @@ -154,6 +161,9 @@ POSSIBILITY OF SUCH DAMAGE. #define I217_MEMPWR BME1000_REG(772, 26) #define I217_MEMPWR_DISABLE_SMB_RELEASE 0x0010 +#define I217_PLL_CLOCK_GATE_REG BME1000_REG(772, 28) +#define I217_PLL_CLOCK_GATE_MASK 0x07FF + #define I217_CFGREG BME1000_REG(772, 29) #define I217_CGFREG_ENABLE_MTA_RESET 0x0002 @@ -161,6 +171,8 @@ POSSIBILITY OF SUCH DAMAGE. #define HV_MUX_DATA_CTRL_FORCE_SPEED (1 << 2) #define HV_MUX_DATA_CTRL_GEN_TO_MAC (1 << 10) +#define I219_UNKNOWN1 BME1000_REG(776, 20) + #define I218_ULP_CONFIG1 BME1000_REG(779, 16) #define I218_ULP_CONFIG1_START __BIT(0) #define I218_ULP_CONFIG1_IND __BIT(2) Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.620 src/sys/dev/pci/if_wm.c:1.621 --- src/sys/dev/pci/if_wm.c:1.620 Fri Jan 25 08:04:07 2019 +++ src/sys/dev/pci/if_wm.c Thu Jan 31 05:20:49 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.620 2019/01/25 08:04:07 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.621 2019/01/31 05:20:49 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -83,7 +83,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.620 2019/01/25 08:04:07 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.621 2019/01/31 05:20:49 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -4008,6 +4008,7 @@ wm_get_cfg_done(struct wm_softc *sc) int wm_phy_post_reset(struct wm_softc *sc) { + device_t dev = sc->sc_dev; uint16_t reg; int rv = 0; @@ -4017,7 +4018,7 @@ wm_phy_post_reset(struct wm_softc *sc) if (wm_phy_resetisblo
CVS commit: src/doc
Module Name:src Committed By: pgoyette Date: Thu Jan 31 03:25:29 UTC 2019 Modified Files: src/doc: TODO.compat-module Log Message: Fix reference to "above-mentioned build break". Since the details of the build break are no longer relevant and no longer mentioned, just refer to "a build break." To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/doc/TODO.compat-module Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/TODO.compat-module diff -u src/doc/TODO.compat-module:1.2 src/doc/TODO.compat-module:1.3 --- src/doc/TODO.compat-module:1.2 Sun Jan 27 02:08:33 2019 +++ src/doc/TODO.compat-module Thu Jan 31 03:25:29 2019 @@ -1,12 +1,11 @@ -/* $NetBSD: TODO.compat-module,v 1.2 2019/01/27 02:08:33 pgoyette Exp $ */ +/* $NetBSD: TODO.compat-module,v 1.3 2019/01/31 03:25:29 pgoyette Exp $ */ DONE 1. Removed the building of the compat library - it is no longer needed. 2. Reverted some intentional auto-load breakage for loading the sysv_ipc -module; the breakage was introduced as the fix for the above-mentioned -build breakage. +module; the breakage was introduced as the fix for a build break. 3. Split the sysv_ipc compat routines into their own compat_sysv module.
CVS commit: src/sys/kern
Module Name:src Committed By: manu Date: Thu Jan 31 02:27:06 UTC 2019 Modified Files: src/sys/kern: vfs_syscalls.c Log Message: Do not resolve fdat for openat(2) if path is absolute Opengroup says "The openat() function shall be equivalent to the open() function except in the case where path specifies a relative path", but says nothing about fdat usage when path is absolute; https://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html We used to always reslove fdat, leading to error if it was invalid (e.g.: -1). That caused portability problem with other systems that just ignore it. See discussion in a pull request to work around that problem with MariaDB: https://github.com/MariaDB/server/pull/838 We fix the problem by ignoring fdat when path is absolute. To generate a diff of this commit: cvs rdiff -u -r1.520 -r1.521 src/sys/kern/vfs_syscalls.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/vfs_syscalls.c diff -u src/sys/kern/vfs_syscalls.c:1.520 src/sys/kern/vfs_syscalls.c:1.521 --- src/sys/kern/vfs_syscalls.c:1.520 Tue Jan 29 09:28:50 2019 +++ src/sys/kern/vfs_syscalls.c Thu Jan 31 02:27:06 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.c,v 1.520 2019/01/29 09:28:50 pgoyette Exp $ */ +/* $NetBSD: vfs_syscalls.c,v 1.521 2019/01/31 02:27:06 manu Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.520 2019/01/29 09:28:50 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.521 2019/01/31 02:27:06 manu Exp $"); #ifdef _KERNEL_OPT #include "opt_fileassoc.h" @@ -1631,6 +1631,7 @@ do_sys_openat(lwp_t *l, int fdat, const file_t *dfp = NULL; struct vnode *dvp = NULL; struct pathbuf *pb; + const char *pathstring = NULL; int error; if (path == NULL) { @@ -1643,7 +1644,14 @@ do_sys_openat(lwp_t *l, int fdat, const return error; } - if (fdat != AT_FDCWD) { + pathstring = pathbuf_stringcopy_get(pb); + + /* + * fdat is ignored if: + * 1) if fdat is AT_FDCWD, which means use current directory as base. + * 2) if path is absolute, then fdat is useless. + */ + if (fdat != AT_FDCWD && pathstring[0] != '/') { /* fd_getvnode() will use the descriptor for us */ if ((error = fd_getvnode(fdat, &dfp)) != 0) goto out; @@ -1656,6 +1664,7 @@ do_sys_openat(lwp_t *l, int fdat, const if (dfp != NULL) fd_putfile(fdat); out: + pathbuf_stringcopy_put(pb, pathstring); pathbuf_destroy(pb); return error; }
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Thu Jan 31 01:49:28 UTC 2019 Modified Files: src/sys/arch/arm/sunxi: sun8i_h3_ccu.c sunxi_de2_ccu.c sunxi_drm.c sunxi_dwhdmi.c sunxi_hdmiphy.c sunxi_lcdc.c sunxi_mixer.c Log Message: Add support for Allwinner H3/H5 display pipeline. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/sunxi/sun8i_h3_ccu.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sunxi_de2_ccu.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sunxi/sunxi_drm.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sunxi/sunxi_dwhdmi.c \ src/sys/arch/arm/sunxi/sunxi_hdmiphy.c \ src/sys/arch/arm/sunxi/sunxi_lcdc.c src/sys/arch/arm/sunxi/sunxi_mixer.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/sunxi/sun8i_h3_ccu.c diff -u src/sys/arch/arm/sunxi/sun8i_h3_ccu.c:1.15 src/sys/arch/arm/sunxi/sun8i_h3_ccu.c:1.16 --- src/sys/arch/arm/sunxi/sun8i_h3_ccu.c:1.15 Fri Jan 12 18:22:35 2018 +++ src/sys/arch/arm/sunxi/sun8i_h3_ccu.c Thu Jan 31 01:49:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sun8i_h3_ccu.c,v 1.15 2018/01/12 18:22:35 jakllsch Exp $ */ +/* $NetBSD: sun8i_h3_ccu.c,v 1.16 2019/01/31 01:49:28 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -29,7 +29,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: sun8i_h3_ccu.c,v 1.15 2018/01/12 18:22:35 jakllsch Exp $"); +__KERNEL_RCSID(1, "$NetBSD: sun8i_h3_ccu.c,v 1.16 2019/01/31 01:49:28 jmcneill Exp $"); #include #include @@ -43,13 +43,16 @@ __KERNEL_RCSID(1, "$NetBSD: sun8i_h3_ccu #define PLL_CPUX_CTRL_REG 0x000 #define PLL_AUDIO_CTRL_REG 0x008 +#define PLL_VIDEO_CTRL_REG 0x010 #define PLL_PERIPH0_CTRL_REG 0x028 +#define PLL_DE_CTRL_REG 0x048 #define AHB1_APB1_CFG_REG 0x054 #define APB2_CFG_REG 0x058 #define AHB2_CFG_REG 0x05c #define AHB2_CLK_CFG __BITS(1,0) #define AHB2_CLK_CFG_PLL_PERIPH0_2 1 #define BUS_CLK_GATING_REG0 0x060 +#define BUS_CLK_GATING_REG1 0x064 #define BUS_CLK_GATING_REG2 0x068 #define BUS_CLK_GATING_REG3 0x06c #define BUS_CLK_GATING_REG4 0x070 @@ -61,7 +64,11 @@ __KERNEL_RCSID(1, "$NetBSD: sun8i_h3_ccu #define SPI1_CLK_REG 0x0a4 #define USBPHY_CFG_REG 0x0cc #define MBUS_RST_REG 0x0fc +#define DE_CLK_REG 0x104 +#define TCON0_CLK_REG 0x118 #define AC_DIG_CLK_REG 0x140 +#define HDMI_CLK_REG 0x150 +#define HDMI_SLOW_CLK_REG 0x154 #define BUS_SOFT_RST_REG0 0x2c0 #define BUS_SOFT_RST_REG1 0x2c4 #define BUS_SOFT_RST_REG2 0x2c8 @@ -149,6 +156,9 @@ static const char *apb1_parents[] = { "a static const char *apb2_parents[] = { "losc", "hosc", "pll_periph0" }; static const char *mod_parents[] = { "hosc", "pll_periph0", "pll_periph1" }; static const char *ths_parents[] = { "hosc" }; +static const char *de_parents[] = { "pll_periph0_2x", "pll_de" }; +static const char *hdmi_parents[] = { "pll_video" }; +static const char *tcon0_parents[] = { "pll_video" }; static const struct sunxi_ccu_nkmp_tbl sun8i_h3_cpux_table[] = { { 6000, 9, 0, 0, 2 }, @@ -250,6 +260,21 @@ static struct sunxi_ccu_clk sun8i_h3_ccu __BIT(31), /* enable */ SUNXI_CCU_NKMP_DIVIDE_BY_TWO), + SUNXI_CCU_FIXED_FACTOR(H3_CLK_PLL_PERIPH0_2X, "pll_periph0_2x", "pll_periph0", 1, 2), + + SUNXI_CCU_FRACTIONAL(H3_CLK_PLL_VIDEO, "pll_video", "hosc", + PLL_VIDEO_CTRL_REG, /* reg */ + __BITS(14,8), /* m */ + 16,/* m_min */ + 50,/* m_max */ + __BIT(24), /* div_en */ + __BIT(25), /* frac_sel */ + 27000, 29700, /* frac values */ + __BITS(3,0), /* prediv */ + 4,/* prediv_val */ + __BIT(31), /* enable */ + SUNXI_CCU_FRACTIONAL_PLUSONE | SUNXI_CCU_FRACTIONAL_SET_ENABLE), + SUNXI_CCU_NKMP_TABLE(H3_CLK_PLL_AUDIO_BASE, "pll_audio", "hosc", PLL_AUDIO_CTRL_REG, /* reg */ __BITS(14,8), /* n */ @@ -261,6 +286,19 @@ static struct sunxi_ccu_clk sun8i_h3_ccu sun8i_h3_ac_dig_table, /* table */ 0), + SUNXI_CCU_FRACTIONAL(H3_CLK_PLL_DE, "pll_de", "hosc", + PLL_DE_CTRL_REG, /* reg */ + __BITS(14,8), /* m */ + 16,/* m_min */ + 50,/* m_max */ + __BIT(24), /* div_en */ + __BIT(25), /* frac_sel */ + 27000, 29700, /* frac values */ + __BITS(3,0), /* prediv */ + 2,/* prediv_val */ + __BIT(31), /* enable */ + SUNXI_CCU_FRACTIONAL_PLUSONE | SUNXI_CCU_FRACTIONAL_SET_ENABLE), + SUNXI_CCU_PREDIV(H3_CLK_AHB1, "ahb1", ahb1_parents, AHB1_APB1_CFG_REG, /* reg */ __BITS(7,6), /* prediv */ @@ -298,6 +336,13 @@ static struct sunxi_ccu_clk sun8i_h3_ccu __BIT(31), /* enable */ SUNXI_CCU_DIV_TIMES_TWO), + SUNXI_CCU_DIV_GATE(H3_CLK_DE, "de", de_parents, + DE_CLK_REG, /* reg */ + __BITS(3,0), /* div */ + __BITS(26,24), /* sel */ + __BIT(31), /* enable */ + 0), + SUNXI_CCU_NM(H3_CLK_MMC0, "mmc0", mod_parents, SDMMC0_CLK_REG, __BITS(17, 16), __BITS(3,0), __BITS(25, 2
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Thu Jan 31 01:49:12 UTC 2019 Modified Files: src/sys/arch/arm/sunxi: sunxi_sramc.c Log Message: Match H3 system control To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sunxi_sramc.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/sunxi/sunxi_sramc.c diff -u src/sys/arch/arm/sunxi/sunxi_sramc.c:1.2 src/sys/arch/arm/sunxi/sunxi_sramc.c:1.3 --- src/sys/arch/arm/sunxi/sunxi_sramc.c:1.2 Tue Jan 22 16:35:48 2019 +++ src/sys/arch/arm/sunxi/sunxi_sramc.c Thu Jan 31 01:49:12 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_sramc.c,v 1.2 2019/01/22 16:35:48 jmcneill Exp $ */ +/* $NetBSD: sunxi_sramc.c,v 1.3 2019/01/31 01:49:12 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_sramc.c,v 1.2 2019/01/22 16:35:48 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_sramc.c,v 1.3 2019/01/31 01:49:12 jmcneill Exp $"); #include #include @@ -44,6 +44,7 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_sramc. static const char * compatible[] = { "allwinner,sun4i-a10-sram-controller", + "allwinner,sun8i-h3-system-control", "allwinner,sun50i-a64-system-control", "allwinner,sun50i-h6-system-control", NULL
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Thu Jan 31 00:27:52 UTC 2019 Modified Files: src/sys/arch/arm/sunxi: sun8i_h3_gpio.c Log Message: Update function name s_twi to s_i2c To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sun8i_h3_gpio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sunxi/sun8i_h3_gpio.c diff -u src/sys/arch/arm/sunxi/sun8i_h3_gpio.c:1.2 src/sys/arch/arm/sunxi/sun8i_h3_gpio.c:1.3 --- src/sys/arch/arm/sunxi/sun8i_h3_gpio.c:1.2 Tue Apr 3 16:01:25 2018 +++ src/sys/arch/arm/sunxi/sun8i_h3_gpio.c Thu Jan 31 00:27:52 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sun8i_h3_gpio.c,v 1.2 2018/04/03 16:01:25 bouyer Exp $ */ +/* $NetBSD: sun8i_h3_gpio.c,v 1.3 2019/01/31 00:27:52 jmcneill Exp $ */ /*- * Copyright (c) 2016 Emmanuel Vadot @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sun8i_h3_gpio.c,v 1.2 2018/04/03 16:01:25 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sun8i_h3_gpio.c,v 1.3 2019/01/31 00:27:52 jmcneill Exp $"); #include #include @@ -140,8 +140,8 @@ static const struct sunxi_gpio_pins h3_p }; static const struct sunxi_gpio_pins h3_r_pins[] = { - {"PL0", 0, 0, {"gpio_in", "gpio_out", "s_twi", NULL, NULL, NULL, "irq", NULL}, 6, 0}, - {"PL1", 0, 1, {"gpio_in", "gpio_out", "s_twi", NULL, NULL, NULL, "irq", NULL}, 6, 1}, + {"PL0", 0, 0, {"gpio_in", "gpio_out", "s_i2c", NULL, NULL, NULL, "irq", NULL}, 6, 0}, + {"PL1", 0, 1, {"gpio_in", "gpio_out", "s_i2c", NULL, NULL, NULL, "irq", NULL}, 6, 1}, {"PL2", 0, 2, {"gpio_in", "gpio_out", "s_uart", NULL, NULL, NULL, "irq", NULL}, 6, 2}, {"PL3", 0, 3, {"gpio_in", "gpio_out", "s_uart", NULL, NULL, NULL, "irq", NULL}, 6, 3}, {"PL4", 0, 4, {"gpio_in", "gpio_out", "s_jtag", NULL, NULL, NULL, "irq", NULL}, 6, 4},
CVS commit: src/sys/arch/ia64
Module Name:src Committed By: scole Date: Wed Jan 30 22:53:22 UTC 2019 Modified Files: src/sys/arch/ia64: TODO Log Message: RUMP building on ia64 now To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/TODO 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/ia64/TODO diff -u src/sys/arch/ia64/TODO:1.3 src/sys/arch/ia64/TODO:1.4 --- src/sys/arch/ia64/TODO:1.3 Tue Jan 29 19:44:03 2019 +++ src/sys/arch/ia64/TODO Wed Jan 30 22:53:22 2019 @@ -61,7 +61,6 @@ Tasks remaining, first couple seem most - write console and/or X framebuffer driver. freebsd has vgapci device that may be portable - add ia32 emulation, port from freebsd -- add rump stuff/MKRUMP - create install EFI/cdrom/netbsd - fix ski to run on other archs beside i386, or at least amd64
CVS commit: src/share/mk
Module Name:src Committed By: scole Date: Wed Jan 30 22:51:33 UTC 2019 Modified Files: src/share/mk: bsd.own.mk Log Message: don't disable MKRUMP by default for ia64 as it can at least build now To generate a diff of this commit: cvs rdiff -u -r1.1096 -r1.1097 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1096 src/share/mk/bsd.own.mk:1.1097 --- src/share/mk/bsd.own.mk:1.1096 Tue Jan 29 19:40:42 2019 +++ src/share/mk/bsd.own.mk Wed Jan 30 22:51:33 2019 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1096 2019/01/29 19:40:42 scole Exp $ +# $NetBSD: bsd.own.mk,v 1.1097 2019/01/30 22:51:33 scole Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -1105,11 +1105,6 @@ USE_LIBCSANITIZER?= undefined # Exceptions to the above: # -# Rump doesn't work yet on ia64 -.if ${MACHINE} == "ia64" -MKRUMP= no -.endif - # RUMP uses -nostdinc which coverity does not like # It also does not use many new files, so disable it .if defined(COVERITY_TOP_CONFIG)
CVS commit: src/lib/libexecinfo
Module Name:src Committed By: mrg Date: Wed Jan 30 22:46:49 UTC 2019 Modified Files: src/lib/libexecinfo: unwind.c Log Message: make the backtrace()'s tracer() return _URC_FOREIGN_EXCEPTION_CAUGHT when the array is full. it won't be able to do any more work if so, and avoids infinite loops in unwinding as seen on arm64. XXX: lack of signal support here means that backtrace() is useless XXX: from a signal handler, such as attempting to display the stack XXX: when handling a SIGSEGV. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libexecinfo/unwind.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/libexecinfo/unwind.c diff -u src/lib/libexecinfo/unwind.c:1.2 src/lib/libexecinfo/unwind.c:1.3 --- src/lib/libexecinfo/unwind.c:1.2 Mon Mar 24 21:26:01 2014 +++ src/lib/libexecinfo/unwind.c Wed Jan 30 22:46:49 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: unwind.c,v 1.2 2014/03/24 21:26:01 joerg Exp $ */ +/* $NetBSD: unwind.c,v 1.3 2019/01/30 22:46:49 mrg Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -52,6 +52,8 @@ tracer(struct _Unwind_Context *ctx, void } if (t->n < t->len) t->arr[t->n++] = (void *)_Unwind_GetIP(ctx); + else + return _URC_FOREIGN_EXCEPTION_CAUGHT; return 0; }
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: christos Date: Wed Jan 30 20:20:37 UTC 2019 Modified Files: src/sys/dev/acpi: ipmi_acpi.c Log Message: don't print resources twice. It is automagically done in acpi_res_parse_fini. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/acpi/ipmi_acpi.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/acpi/ipmi_acpi.c diff -u src/sys/dev/acpi/ipmi_acpi.c:1.2 src/sys/dev/acpi/ipmi_acpi.c:1.3 --- src/sys/dev/acpi/ipmi_acpi.c:1.2 Wed Dec 26 01:45:58 2018 +++ src/sys/dev/acpi/ipmi_acpi.c Wed Jan 30 15:20:36 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ipmi_acpi.c,v 1.2 2018/12/26 06:45:58 mlelstv Exp $ */ +/* $NetBSD: ipmi_acpi.c,v 1.3 2019/01/30 20:20:36 christos Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipmi_acpi.c,v 1.2 2018/12/26 06:45:58 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipmi_acpi.c,v 1.3 2019/01/30 20:20:36 christos Exp $"); #include #include @@ -122,8 +122,6 @@ ipmi_acpi_attach(device_t parent, device return; } - acpi_resource_print(self, &res); - io = acpi_res_io(&res, 0); mem = acpi_res_mem(&res, 0); if (io == NULL && mem == NULL) {
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jakllsch Date: Wed Jan 30 19:57:48 UTC 2019 Modified Files: src/sys/dev/usb: usb_quirks.c Log Message: add the no-uhidev quirk for all X-Rite and GretagMacbeth devices To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/sys/dev/usb/usb_quirks.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/usb_quirks.c diff -u src/sys/dev/usb/usb_quirks.c:1.90 src/sys/dev/usb/usb_quirks.c:1.91 --- src/sys/dev/usb/usb_quirks.c:1.90 Thu Nov 15 02:35:23 2018 +++ src/sys/dev/usb/usb_quirks.c Wed Jan 30 19:57:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: usb_quirks.c,v 1.90 2018/11/15 02:35:23 manu Exp $ */ +/* $NetBSD: usb_quirks.c,v 1.91 2019/01/30 19:57:48 jakllsch Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.30 2003/01/02 04:15:55 imp Exp $ */ /* @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usb_quirks.c,v 1.90 2018/11/15 02:35:23 manu Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb_quirks.c,v 1.91 2019/01/30 19:57:48 jakllsch Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -186,6 +186,8 @@ Static const struct usbd_quirk_entry { { UQ_HID_IGNORE, NULL }}, { USB_VENDOR_CYBERPOWER, USB_PRODUCT_CYBERPOWER_UPS, ANY, { UQ_HID_IGNORE, NULL }}, + { USB_VENDOR_GRETAGMACBETH, ANY, ANY, + { UQ_HID_IGNORE, NULL }}, { USB_VENDOR_MGE, USB_PRODUCT_MGE_UPS1, ANY, { UQ_HID_IGNORE, NULL }}, { USB_VENDOR_MGE, USB_PRODUCT_MGE_UPS2, ANY, @@ -202,6 +204,8 @@ Static const struct usbd_quirk_entry { { UQ_HID_IGNORE, NULL }}, { USB_VENDOR_TI, USB_PRODUCT_TI_MSP430, ANY, { UQ_HID_IGNORE, NULL }}, + { USB_VENDOR_XRITE, ANY, ANY, + { UQ_HID_IGNORE, NULL }}, { USB_VENDOR_KYE, USB_PRODUCT_KYE_NICHE, 0x100, { UQ_NO_SET_PROTO, NULL }}, { USB_VENDOR_INSIDEOUT, USB_PRODUCT_INSIDEOUT_EDGEPORT4, 0x094,
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jakllsch Date: Wed Jan 30 19:51:28 UTC 2019 Modified Files: src/sys/dev/usb: usbdevs Log Message: Add HP LP2[24]75w hub ids. (ID strings are missing from device.) To generate a diff of this commit: cvs rdiff -u -r1.769 -r1.770 src/sys/dev/usb/usbdevs 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/usbdevs diff -u src/sys/dev/usb/usbdevs:1.769 src/sys/dev/usb/usbdevs:1.770 --- src/sys/dev/usb/usbdevs:1.769 Wed Jan 30 19:36:30 2019 +++ src/sys/dev/usb/usbdevs Wed Jan 30 19:51:28 2019 @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.769 2019/01/30 19:36:30 jakllsch Exp $ +$NetBSD: usbdevs,v 1.770 2019/01/30 19:51:28 jakllsch Exp $ /*- * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -1812,6 +1812,8 @@ product HP 930C 0x1204 DeskJet 930c product HP P2000U 0x1801 Inkjet P-2000U product HP RNDIS 0x1c1d Generic RNDIS product HP 640C 0x2004 DeskJet 640c +product HP LP2275W 0x2e24 LP2275w hub +product HP LP2475W 0x2f24 LP2475w hub product HP 4670V 0x3005 ScanJet 4670v product HP P1100 0x3102 Photosmart P1100 product HP V125W 0x3307 v125w
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jakllsch Date: Wed Jan 30 19:36:30 UTC 2019 Modified Files: src/sys/dev/usb: usbdevs Log Message: make whitespace much more consistent To generate a diff of this commit: cvs rdiff -u -r1.768 -r1.769 src/sys/dev/usb/usbdevs 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/usbdevs diff -u src/sys/dev/usb/usbdevs:1.768 src/sys/dev/usb/usbdevs:1.769 --- src/sys/dev/usb/usbdevs:1.768 Wed Jan 30 19:15:12 2019 +++ src/sys/dev/usb/usbdevs Wed Jan 30 19:36:30 2019 @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.768 2019/01/30 19:15:12 jakllsch Exp $ +$NetBSD: usbdevs,v 1.769 2019/01/30 19:36:30 jakllsch Exp $ /*- * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -158,7 +158,7 @@ vendor SAMSUNG 0x04e8 Samsung Electroni vendor ANNABOOKS 0x04ed Annabooks vendor JVC 0x04f1 JVC vendor CHICONY 0x04f2 Chicony Electronics -vendor ELAN 0x04f3 ELAN Microelectronics +vendor ELAN 0x04f3 ELAN Microelectronics vendor BROTHER 0x04f9 Brother Industries vendor DALLAS 0x04fa Dallas Semiconductor vendor AIPTEK2 0x04fc AIPTEK International @@ -287,7 +287,7 @@ vendor MADCATZ 0x0738 Mad Catz, Inc. vendor DIGITALSTREAM 0x074e Digital Stream vendor AUREAL 0x0755 Aureal Semiconductor vendor MIDIMAN 0x0763 Midiman -vendor CYBERPOWER 0x0764 CyberPower Systems, Inc. +vendor CYBERPOWER 0x0764 CyberPower Systems, Inc. vendor XRITE 0x0765 X-Rite vendor SURECOM 0x0769 Surecom Technology vendor LINKSYS2 0x077b Linksys @@ -399,7 +399,7 @@ vendor CSR 0x0a12 Cambridge Silicon Rad vendor TREK 0x0a16 Trek Technology vendor ASAHIOPTICAL 0x0a17 Asahi Optical vendor BOCASYSTEMS 0x0a43 Boca Systems -vendor SHANTOU 0x0a46 ShanTou +vendor SHANTOU 0x0a46 ShanTou vendor MEDIAGEAR 0x0a48 MediaGear vendor BROADCOM 0x0a5c Broadcom vendor GREENHOUSE 0x0a6b GREENHOUSE @@ -434,7 +434,7 @@ vendor SEALEVEL 0x0c52 Sealevel System vendor LUWEN 0x0c76 EasyDisk vendor QUALCOMM_K 0x0c88 Qualcomm Kyocera vendor ZCOM 0x0cde Z-Com -vendor ATHEROS2 0x0cf3 Atheros Communications +vendor ATHEROS2 0x0cf3 Atheros Communications vendor TANGTOP 0x0d3d Tangtop vendor SMC3 0x0d5c Standard Microsystems vendor PEN 0x0d7d Pen Drive @@ -465,7 +465,7 @@ vendor LG 0x1004 LG Electronics vendor MOTOROLA4 0x100d Motorola vendor HP3 0x103c Hewlett Packard vendor GIGABYTE 0x1044 GIGABYTE -vendor YUBICO 0x1050 Yubico.se +vendor YUBICO 0x1050 Yubico.se vendor WESTERN 0x1058 Western Digital vendor MOTOROLA 0x1063 Motorola vendor CCYU 0x1065 CCYU Technology @@ -515,7 +515,7 @@ vendor ABOCOM2 0x1482 AboCom Systems vendor SILICOM 0x1485 Silicom vendor RALINK 0x148f Ralink Technology vendor CONCEPTRONIC 0x14b2 Conceptronic -vendor SUPERTOP 0x14cd SuperTop +vendor SUPERTOP 0x14cd SuperTop vendor PLANEX3 0x14ea Planex Communications vendor SILICONPORTALS 0x1527 Silicon Portals vendor JMICRON 0x152d JMicron @@ -557,7 +557,7 @@ vendor LONGCHEER 0x1c9e Longcheer Techno vendor MPMAN 0x1cae MPMan vendor PEGATRON 0x1d4d Pegatron vendor FUTUREBITS 0x1d50 Future Bits -vendor LINUXFOUNDATION 0x1d6b Linux Foundation +vendor LINUXFOUNDATION 0x1d6b Linux Foundation vendor CINTERION 0x1e2d Cinterion vendor AIRTIES 0x1eda AirTies vendor DLINK 0x2001 D-Link @@ -567,7 +567,7 @@ vendor HAUPPAUGE2 0x2040 Hauppauge Compu vendor PARA 0x20b8 PARA Industrial vendor TRENDNET 0x20f4 TRENDnet vendor RTSYS 0x2100 RT Systems -vendor DLINK3 0x2101 D-Link +vendor DLINK3 0x2101 D-Link vendor INTENSO 0x2109 INTENSO vendor VIALABS 0x2109 VIA Labs vendor ERICSSON 0x2282 Ericsson @@ -596,7 +596,7 @@ vendor AVERATEC 0x50c2 Averatec vendor SWEEX 0x5173 Sweex vendor ONSPEC2 0x55aa OnSpec Electronic Inc. vendor ZINWELL 0x5a57 Zinwell -vendor INGENIC 0x601a Ingenic Semiconductor Ltd. +vendor INGENIC 0x601a Ingenic Semiconductor Ltd. vendor SITECOM 0x6189 Sitecom vendor SPRINGERDESIGN 0x6400 Springer Design, Inc. vendor ARKMICROCHIPS 0x6547 ArkMicroChips @@ -607,7 +607,7 @@ vendor INTEL2 0x8087 Intel vendor ALLWIN 0x8516 ALLWIN Tech vendor MOSCHIP 0x9710 MosChip Semiconductor vendor NETGEAR4 0x9846 Netgear -vendor xxFTDI 0x9e88 FTDI +vendor xxFTDI 0x9e88 FTDI vendor CACE 0xcace CACE Technologies vendor COMPARE 0xcdab Compare vendor DATAAPEX 0xdaae DataApex @@ -938,7 +938,7 @@ product ASUSTEK WL167G_2 0x1723 WL-167g product ASUSTEK WL167G_3 0x1724 WL-167g USB2.0 WLAN Adapter (version 2) product ASUSTEK RT2870_1 0x1731 RT2870 product ASUSTEK RT2870_2 0x1732 RT2870 -product ASUSTEK U3100 0x173f My Cinema U3100 Mini DVB-T +product ASUSTEK U3100 0x173f My Cinema U3100 Mini DVB-T product ASUSTEK RT2870_3 0x1742 RT2870 product ASUSTEK RT2870_4 0x1760 RT2870 product ASUSTEK RT2870_5 0x1761 RT2870 @@ -1048,7 +1048,7 @@ product BALTECH CARDREADER 0x Card r product BBELECTRONICS USOTL4 0xAC01 uLinks RS-422/485 /* Beceem Communications produ
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jakllsch Date: Wed Jan 30 19:15:12 UTC 2019 Modified Files: src/sys/dev/usb: usbdevs Log Message: Add Gretag Macbeth/X-Rite Huey device ids To generate a diff of this commit: cvs rdiff -u -r1.767 -r1.768 src/sys/dev/usb/usbdevs 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/usbdevs diff -u src/sys/dev/usb/usbdevs:1.767 src/sys/dev/usb/usbdevs:1.768 --- src/sys/dev/usb/usbdevs:1.767 Sat Dec 29 06:29:29 2018 +++ src/sys/dev/usb/usbdevs Wed Jan 30 19:15:12 2019 @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.767 2018/12/29 06:29:29 maya Exp $ +$NetBSD: usbdevs,v 1.768 2019/01/30 19:15:12 jakllsch Exp $ /*- * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -288,6 +288,7 @@ vendor DIGITALSTREAM 0x074e Digital Stre vendor AUREAL 0x0755 Aureal Semiconductor vendor MIDIMAN 0x0763 Midiman vendor CYBERPOWER 0x0764 CyberPower Systems, Inc. +vendor XRITE 0x0765 X-Rite vendor SURECOM 0x0769 Surecom Technology vendor LINKSYS2 0x077b Linksys vendor GRIFFIN 0x077d Griffin Technology @@ -374,6 +375,7 @@ vendor AGILENT 0x0957 Agilent Technolog vendor GUDE 0x0959 Gude ADS vendor PORTSMITH 0x095a Portsmith vendor ACERW 0x0967 Acer +vendor GRETAGMACBETH 0x0971 GretagMacbeth vendor ADIRONDACK 0x0976 Adirondack Wire & Cable vendor BECKHOFF 0x0978 Beckhoff vendor MINDSATWORK 0x097a Minds At Work @@ -1702,6 +1704,9 @@ product GRAVIS GAMEPADPRO 0x4001 GamePad /* GREENHOUSE products */ product GREENHOUSE KANA21 0x0001 CF-writer with Portable MP3 Player +/* GretagMacbeth products */ +product GRETAGMACBETH HUEY 0x2005 Huey + /* Griffin Technology */ product GRIFFIN IMATE 0x0405 iMate, ADB adapter product GRIFFIN POWERMATE 0x0410 PowerMate Assignable Controller @@ -3498,6 +3503,10 @@ product WISTRONNEWEB AR5523_2_NF 0x0829 product XIRLINK IMAGING 0x800d IMAGING DEVICE product XIRLINK PCCAM 0x8080 IBM PC Camera +/* X-Rite products */ +product XRITE HUEY_1 0x5001 Huey +product XRITE HUEY_2 0x5010 Huey + /* Conexant */ product CONEXANT MODEM_1 0x1329 USB Modem product CONEXANT PRISM_GT_1 0x2000 PrismGT USB 2.0 WLAN
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Wed Jan 30 13:56:10 UTC 2019 Modified Files: src/doc [netbsd-8]: CHANGES-8.1 Log Message: Ticket #1176 To generate a diff of this commit: cvs rdiff -u -r1.1.2.98 -r1.1.2.99 src/doc/CHANGES-8.1 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-8.1 diff -u src/doc/CHANGES-8.1:1.1.2.98 src/doc/CHANGES-8.1:1.1.2.99 --- src/doc/CHANGES-8.1:1.1.2.98 Tue Jan 29 08:29:52 2019 +++ src/doc/CHANGES-8.1 Wed Jan 30 13:56:10 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.1,v 1.1.2.98 2019/01/29 08:29:52 martin Exp $ +# $NetBSD: CHANGES-8.1,v 1.1.2.99 2019/01/30 13:56:10 martin Exp $ A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1 release: @@ -2347,3 +2347,14 @@ sys/netnatm/natm.cpatch sendoob() functions are expected to free both passed mbuf chains. [martin, ticket #1175] + +usr.bin/systat/extern.h1.47 +usr.bin/systat/iostat.c1.39 +usr.bin/systat/main.c1.55 +usr.bin/systat/syscall.c 1.10 +usr.bin/systat/vmstat.c1.85 +usr.bin/systat/vmstat.c1.86 + + Fixe terminal resize handling in some systat(1) screens. + [christos, ticket #1176] +
CVS commit: [netbsd-8] src/usr.bin/systat
Module Name:src Committed By: martin Date: Wed Jan 30 13:46:25 UTC 2019 Modified Files: src/usr.bin/systat [netbsd-8]: extern.h iostat.c main.c syscall.c vmstat.c Log Message: Pull up following revision(s) (requested by christos in ticket #1176): usr.bin/systat/main.c: revision 1.55 usr.bin/systat/extern.h: revision 1.47 usr.bin/systat/syscall.c: revision 1.10 usr.bin/systat/iostat.c: revision 1.39 usr.bin/systat/vmstat.c: revision 1.85 usr.bin/systat/vmstat.c: revision 1.86 no need for curses.h - PR/53906: Paul Ripke: systat(1) vmstat & syscall get "alternate system clock has died" on terminal resize (SIGWINCH) To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.46.6.1 src/usr.bin/systat/extern.h cvs rdiff -u -r1.37.38.1 -r1.37.38.2 src/usr.bin/systat/iostat.c cvs rdiff -u -r1.51 -r1.51.6.1 src/usr.bin/systat/main.c cvs rdiff -u -r1.9 -r1.9.18.1 src/usr.bin/systat/syscall.c cvs rdiff -u -r1.81.8.1 -r1.81.8.2 src/usr.bin/systat/vmstat.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/systat/extern.h diff -u src/usr.bin/systat/extern.h:1.46 src/usr.bin/systat/extern.h:1.46.6.1 --- src/usr.bin/systat/extern.h:1.46 Sat Oct 22 22:02:55 2016 +++ src/usr.bin/systat/extern.h Wed Jan 30 13:46:25 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.46 2016/10/22 22:02:55 christos Exp $ */ +/* $NetBSD: extern.h,v 1.46.6.1 2019/01/30 13:46:25 martin Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -33,10 +33,12 @@ #include #include +#include #include #define ADJINETCTR(c, o, n, e) (c.e = n.e - o.e) #define xADJINETCTR(c, o, n, e) (c[e] = n[e] - o[e]) +#define MAXFAIL 5 extern struct command global_commands[]; extern struct mode *curmode; @@ -60,6 +62,8 @@ extern char *memf; extern int allflag; extern int turns; extern gid_t egid; +extern float hertz; +extern double etime; struct inpcb; #ifdef INET6 @@ -210,6 +214,7 @@ void tcp_boot(char *); void tcp_run(char *); void tcp_time(char *); void tcp_zero(char *); +bool toofast(int *); void vmstat_boot(char *); void vmstat_run(char *); void vmstat_time(char *); Index: src/usr.bin/systat/iostat.c diff -u src/usr.bin/systat/iostat.c:1.37.38.1 src/usr.bin/systat/iostat.c:1.37.38.2 --- src/usr.bin/systat/iostat.c:1.37.38.1 Tue Jul 25 01:43:37 2017 +++ src/usr.bin/systat/iostat.c Wed Jan 30 13:46:25 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: iostat.c,v 1.37.38.1 2017/07/25 01:43:37 snj Exp $ */ +/* $NetBSD: iostat.c,v 1.37.38.2 2019/01/30 13:46:25 martin Exp $ */ /* * Copyright (c) 1980, 1992, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)iostat.c 8.1 (Berkeley) 6/6/93"; #endif -__RCSID("$NetBSD: iostat.c,v 1.37.38.1 2017/07/25 01:43:37 snj Exp $"); +__RCSID("$NetBSD: iostat.c,v 1.37.38.2 2019/01/30 13:46:25 martin Exp $"); #endif /* not lint */ #include @@ -46,7 +46,6 @@ __RCSID("$NetBSD: iostat.c,v 1.37.38.1 2 #include "drvstats.h" static int linesperregion; -static double etime; static int numbers = 0; /* default display bar graphs */ static int secs = 0; /* default seconds shown */ static int read_write = 0; /* default read/write shown */ Index: src/usr.bin/systat/main.c diff -u src/usr.bin/systat/main.c:1.51 src/usr.bin/systat/main.c:1.51.6.1 --- src/usr.bin/systat/main.c:1.51 Sat Dec 3 03:26:27 2016 +++ src/usr.bin/systat/main.c Wed Jan 30 13:46:25 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.51 2016/12/03 03:26:27 mrg Exp $ */ +/* $NetBSD: main.c,v 1.51.6.1 2019/01/30 13:46:25 martin Exp $ */ /*- * Copyright (c) 1980, 1992, 1993 @@ -36,7 +36,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #endif -__RCSID("$NetBSD: main.c,v 1.51 2016/12/03 03:26:27 mrg Exp $"); +__RCSID("$NetBSD: main.c,v 1.51.6.1 2019/01/30 13:46:25 martin Exp $"); #endif /* not lint */ #include @@ -57,6 +57,7 @@ __RCSID("$NetBSD: main.c,v 1.51 2016/12/ #include "systat.h" #include "extern.h" +#include "drvstats.h" static int dellave; @@ -78,6 +79,8 @@ int turns = 2; /* stay how many refr int allflag; int allcounter; sig_atomic_t needsredraw = 0; +float hertz; +double etime; static WINDOW *wload; /* one line window for load average */ @@ -329,7 +332,6 @@ display(int signo) void redraw(void) { - resizeterm(LINES, COLS); CMDLINE = LINES - 1; labels(); @@ -415,3 +417,30 @@ nlisterr(struct nlist name_list[]) endwin(); exit(1); } + +bool +toofast(int *failcnt) +{ + static char pigs[] = "pigs"; + etime = cur.cp_etime; + /* < 1 ticks - sleep for a tick */ + /* this is often triggered by repeated SIGWINCH */ + if ((etime * hertz) >= 1.0) + return false; + + if ((*failcnt)++ <= MAXFAIL) { + struct timespec interval = { 0, 10L / hertz }; + while (nanosleep(&interval, &interval) == -1) + continue; + return true; + } + c
CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: martin Date: Wed Jan 30 13:33:34 UTC 2019 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.3 Log Message: Ticket #1677 To generate a diff of this commit: cvs rdiff -u -r1.1.2.132 -r1.1.2.133 src/doc/CHANGES-7.0.3 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-7.0.3 diff -u src/doc/CHANGES-7.0.3:1.1.2.132 src/doc/CHANGES-7.0.3:1.1.2.133 --- src/doc/CHANGES-7.0.3:1.1.2.132 Tue Jan 29 08:32:36 2019 +++ src/doc/CHANGES-7.0.3 Wed Jan 30 13:33:34 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0.3,v 1.1.2.132 2019/01/29 08:32:36 martin Exp $ +# $NetBSD: CHANGES-7.0.3,v 1.1.2.133 2019/01/30 13:33:34 martin Exp $ A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3 release: @@ -5707,3 +5707,23 @@ sys/netnatm/natm.cpatch sendoob() functions are expected to free both passed mbuf chains. [martin, ticket #1676] + +sys/arch/alpha/alpha/machdep.c 1.352 +sys/arch/amd64/amd64/netbsd32_machdep.c 1.117 +sys/arch/arm/arm/sig_machdep.c 1.51 +sys/arch/hppa/hppa/sig_machdep.c 1.26 +sys/arch/i386/i386/machdep.c 1.813 +sys/arch/m68k/m68k/sig_machdep.c 1.50 +sys/arch/mips/mips/netbsd32_machdep.c 1.16 +sys/arch/mips/mips/sig_machdep.c 1.24 +sys/arch/powerpc/powerpc/sig_machdep.c 1.46 +sys/arch/sh3/sh3/sh3_machdep.c 1.106 +sys/arch/sparc64/sparc64/machdep.c 1.289 +sys/arch/sparc64/sparc64/netbsd32_machdep.c 1.111 +sys/arch/usermode/target/i386/cpu_i386.c 1.8 +sys/arch/usermode/target/x86_64/cpu_x86_64.c 1.7 +sys/arch/vax/vax/sig_machdep.c 1.23 + + Fix widespread leak in the sendsig_siginfo() functions. + [maxv, ticket #1677] +
CVS commit: [netbsd-7-0] src/sys/arch
Module Name:src Committed By: martin Date: Wed Jan 30 13:32:58 UTC 2019 Modified Files: src/sys/arch/alpha/alpha [netbsd-7-0]: machdep.c src/sys/arch/amd64/amd64 [netbsd-7-0]: netbsd32_machdep.c src/sys/arch/arm/arm [netbsd-7-0]: sig_machdep.c src/sys/arch/hppa/hppa [netbsd-7-0]: sig_machdep.c src/sys/arch/i386/i386 [netbsd-7-0]: machdep.c src/sys/arch/m68k/m68k [netbsd-7-0]: sig_machdep.c src/sys/arch/mips/mips [netbsd-7-0]: netbsd32_machdep.c sig_machdep.c src/sys/arch/powerpc/powerpc [netbsd-7-0]: sig_machdep.c src/sys/arch/sh3/sh3 [netbsd-7-0]: sh3_machdep.c src/sys/arch/sparc64/sparc64 [netbsd-7-0]: machdep.c netbsd32_machdep.c src/sys/arch/usermode/target/i386 [netbsd-7-0]: cpu_i386.c src/sys/arch/usermode/target/x86_64 [netbsd-7-0]: cpu_x86_64.c src/sys/arch/vax/vax [netbsd-7-0]: sig_machdep.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1677): sys/arch/hppa/hppa/sig_machdep.c: revision 1.26 sys/arch/arm/arm/sig_machdep.c: revision 1.51 sys/arch/i386/i386/machdep.c: revision 1.813 sys/arch/alpha/alpha/machdep.c: revision 1.352 sys/arch/m68k/m68k/sig_machdep.c: revision 1.50 sys/arch/usermode/target/i386/cpu_i386.c: revision 1.8 sys/arch/sparc64/sparc64/machdep.c: revision 1.289 sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.111 sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.46 sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.117 sys/arch/sh3/sh3/sh3_machdep.c: revision 1.106 sys/arch/mips/mips/netbsd32_machdep.c: revision 1.16 sys/arch/mips/mips/sig_machdep.c: revision 1.24 sys/arch/usermode/target/x86_64/cpu_x86_64.c: revision 1.7 sys/arch/vax/vax/sig_machdep.c: revision 1.23 Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo has padding, so zero it out properly. While here I'm also zeroing out some other things in several ports, for safety. Same problem in netbsd32, so fix that too. I can't compile-test on each architecture, but there should be no breakage (tm). Overall this fixes at least 14 info leaks. Prompted by the discovery by KLEAK of a leak in amd64's sendsig_siginfo. To generate a diff of this commit: cvs rdiff -u -r1.345.4.1 -r1.345.4.2 src/sys/arch/alpha/alpha/machdep.c cvs rdiff -u -r1.92 -r1.92.8.1 src/sys/arch/amd64/amd64/netbsd32_machdep.c cvs rdiff -u -r1.47 -r1.47.6.1 src/sys/arch/arm/arm/sig_machdep.c cvs rdiff -u -r1.25 -r1.25.34.1 src/sys/arch/hppa/hppa/sig_machdep.c cvs rdiff -u -r1.752.8.2 -r1.752.8.3 src/sys/arch/i386/i386/machdep.c cvs rdiff -u -r1.49 -r1.49.18.1 src/sys/arch/m68k/m68k/sig_machdep.c cvs rdiff -u -r1.11 -r1.11.8.1 src/sys/arch/mips/mips/netbsd32_machdep.c cvs rdiff -u -r1.23 -r1.23.32.1 src/sys/arch/mips/mips/sig_machdep.c cvs rdiff -u -r1.43.14.1 -r1.43.14.1.2.1 \ src/sys/arch/powerpc/powerpc/sig_machdep.c cvs rdiff -u -r1.102.8.1 -r1.102.8.2 src/sys/arch/sh3/sh3/sh3_machdep.c cvs rdiff -u -r1.278.2.3 -r1.278.2.3.2.1 \ src/sys/arch/sparc64/sparc64/machdep.c cvs rdiff -u -r1.103.8.1 -r1.103.8.2 \ src/sys/arch/sparc64/sparc64/netbsd32_machdep.c cvs rdiff -u -r1.4 -r1.4.20.1 src/sys/arch/usermode/target/i386/cpu_i386.c cvs rdiff -u -r1.2 -r1.2.28.1 \ src/sys/arch/usermode/target/x86_64/cpu_x86_64.c cvs rdiff -u -r1.21 -r1.21.32.1 src/sys/arch/vax/vax/sig_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/alpha/alpha/machdep.c diff -u src/sys/arch/alpha/alpha/machdep.c:1.345.4.1 src/sys/arch/alpha/alpha/machdep.c:1.345.4.2 --- src/sys/arch/alpha/alpha/machdep.c:1.345.4.1 Tue Nov 1 20:27:51 2016 +++ src/sys/arch/alpha/alpha/machdep.c Wed Jan 30 13:32:57 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.345.4.1 2016/11/01 20:27:51 snj Exp $ */ +/* $NetBSD: machdep.c,v 1.345.4.2 2019/01/30 13:32:57 martin Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.345.4.1 2016/11/01 20:27:51 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.345.4.2 2019/01/30 13:32:57 martin Exp $"); #include #include @@ -1465,12 +1465,11 @@ sendsig_siginfo(const ksiginfo_t *ksi, c #endif /* Build stack frame for signal trampoline. */ - + memset(&frame, 0, sizeof(frame)); frame.sf_si._info = ksi->ksi_info; frame.sf_uc.uc_flags = _UC_SIGMASK; frame.sf_uc.uc_sigmask = *mask; frame.sf_uc.uc_link = l->l_ctxlink; - memset(&frame.sf_uc.uc_stack, 0, sizeof(frame.sf_uc.uc_stack)); sendsig_reset(l, sig); mutex_exit(p->p_lock); cpu_getmcontext(l, &frame.sf_uc.uc_mcontext, &frame.sf_uc.uc_flags); Index: src/sys/arch/amd64/amd64/netbsd32_machdep.c diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1
CVS commit: [netbsd-7-1] src/doc
Module Name:src Committed By: martin Date: Wed Jan 30 13:30:16 UTC 2019 Modified Files: src/doc [netbsd-7-1]: CHANGES-7.1.3 Log Message: Ticket #1677 To generate a diff of this commit: cvs rdiff -u -r1.1.2.39 -r1.1.2.40 src/doc/CHANGES-7.1.3 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-7.1.3 diff -u src/doc/CHANGES-7.1.3:1.1.2.39 src/doc/CHANGES-7.1.3:1.1.2.40 --- src/doc/CHANGES-7.1.3:1.1.2.39 Tue Jan 29 08:32:01 2019 +++ src/doc/CHANGES-7.1.3 Wed Jan 30 13:30:16 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.1.3,v 1.1.2.39 2019/01/29 08:32:01 martin Exp $ +# $NetBSD: CHANGES-7.1.3,v 1.1.2.40 2019/01/30 13:30:16 martin Exp $ A complete list of changes from the NetBSD 7.1.2 release to the NetBSD 7.1.3 release: @@ -399,3 +399,23 @@ sys/netnatm/natm.cpatch sendoob() functions are expected to free both passed mbuf chains. [martin, ticket #1676] + +sys/arch/alpha/alpha/machdep.c 1.352 +sys/arch/amd64/amd64/netbsd32_machdep.c 1.117 +sys/arch/arm/arm/sig_machdep.c 1.51 +sys/arch/hppa/hppa/sig_machdep.c 1.26 +sys/arch/i386/i386/machdep.c 1.813 +sys/arch/m68k/m68k/sig_machdep.c 1.50 +sys/arch/mips/mips/netbsd32_machdep.c 1.16 +sys/arch/mips/mips/sig_machdep.c 1.24 +sys/arch/powerpc/powerpc/sig_machdep.c 1.46 +sys/arch/sh3/sh3/sh3_machdep.c 1.106 +sys/arch/sparc64/sparc64/machdep.c 1.289 +sys/arch/sparc64/sparc64/netbsd32_machdep.c 1.111 +sys/arch/usermode/target/i386/cpu_i386.c 1.8 +sys/arch/usermode/target/x86_64/cpu_x86_64.c 1.7 +sys/arch/vax/vax/sig_machdep.c 1.23 + + Fix widespread leak in the sendsig_siginfo() functions. + [maxv, ticket #1677] +
CVS commit: [netbsd-7-1] src/sys/arch
Module Name:src Committed By: martin Date: Wed Jan 30 13:29:52 UTC 2019 Modified Files: src/sys/arch/alpha/alpha [netbsd-7-1]: machdep.c src/sys/arch/amd64/amd64 [netbsd-7-1]: netbsd32_machdep.c src/sys/arch/arm/arm [netbsd-7-1]: sig_machdep.c src/sys/arch/hppa/hppa [netbsd-7-1]: sig_machdep.c src/sys/arch/i386/i386 [netbsd-7-1]: machdep.c src/sys/arch/m68k/m68k [netbsd-7-1]: sig_machdep.c src/sys/arch/mips/mips [netbsd-7-1]: netbsd32_machdep.c sig_machdep.c src/sys/arch/powerpc/powerpc [netbsd-7-1]: sig_machdep.c src/sys/arch/sh3/sh3 [netbsd-7-1]: sh3_machdep.c src/sys/arch/sparc64/sparc64 [netbsd-7-1]: machdep.c netbsd32_machdep.c src/sys/arch/usermode/target/i386 [netbsd-7-1]: cpu_i386.c src/sys/arch/usermode/target/x86_64 [netbsd-7-1]: cpu_x86_64.c src/sys/arch/vax/vax [netbsd-7-1]: sig_machdep.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1677): sys/arch/hppa/hppa/sig_machdep.c: revision 1.26 sys/arch/arm/arm/sig_machdep.c: revision 1.51 sys/arch/i386/i386/machdep.c: revision 1.813 sys/arch/alpha/alpha/machdep.c: revision 1.352 sys/arch/m68k/m68k/sig_machdep.c: revision 1.50 sys/arch/usermode/target/i386/cpu_i386.c: revision 1.8 sys/arch/sparc64/sparc64/machdep.c: revision 1.289 sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.111 sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.46 sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.117 sys/arch/sh3/sh3/sh3_machdep.c: revision 1.106 sys/arch/mips/mips/netbsd32_machdep.c: revision 1.16 sys/arch/mips/mips/sig_machdep.c: revision 1.24 sys/arch/usermode/target/x86_64/cpu_x86_64.c: revision 1.7 sys/arch/vax/vax/sig_machdep.c: revision 1.23 Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo has padding, so zero it out properly. While here I'm also zeroing out some other things in several ports, for safety. Same problem in netbsd32, so fix that too. I can't compile-test on each architecture, but there should be no breakage (tm). Overall this fixes at least 14 info leaks. Prompted by the discovery by KLEAK of a leak in amd64's sendsig_siginfo. To generate a diff of this commit: cvs rdiff -u -r1.345.2.1 -r1.345.2.1.2.1 src/sys/arch/alpha/alpha/machdep.c cvs rdiff -u -r1.92 -r1.92.12.1 src/sys/arch/amd64/amd64/netbsd32_machdep.c cvs rdiff -u -r1.47 -r1.47.10.1 src/sys/arch/arm/arm/sig_machdep.c cvs rdiff -u -r1.25 -r1.25.42.1 src/sys/arch/hppa/hppa/sig_machdep.c cvs rdiff -u -r1.752.12.2 -r1.752.12.3 src/sys/arch/i386/i386/machdep.c cvs rdiff -u -r1.49 -r1.49.26.1 src/sys/arch/m68k/m68k/sig_machdep.c cvs rdiff -u -r1.11 -r1.11.12.1 src/sys/arch/mips/mips/netbsd32_machdep.c cvs rdiff -u -r1.23 -r1.23.40.1 src/sys/arch/mips/mips/sig_machdep.c cvs rdiff -u -r1.43.14.1 -r1.43.14.1.6.1 \ src/sys/arch/powerpc/powerpc/sig_machdep.c cvs rdiff -u -r1.102.4.1 -r1.102.4.1.4.1 src/sys/arch/sh3/sh3/sh3_machdep.c cvs rdiff -u -r1.278.2.3 -r1.278.2.3.6.1 \ src/sys/arch/sparc64/sparc64/machdep.c cvs rdiff -u -r1.103.4.1 -r1.103.4.1.4.1 \ src/sys/arch/sparc64/sparc64/netbsd32_machdep.c cvs rdiff -u -r1.4 -r1.4.28.1 src/sys/arch/usermode/target/i386/cpu_i386.c cvs rdiff -u -r1.2 -r1.2.36.1 \ src/sys/arch/usermode/target/x86_64/cpu_x86_64.c cvs rdiff -u -r1.21 -r1.21.40.1 src/sys/arch/vax/vax/sig_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/alpha/alpha/machdep.c diff -u src/sys/arch/alpha/alpha/machdep.c:1.345.2.1 src/sys/arch/alpha/alpha/machdep.c:1.345.2.1.2.1 --- src/sys/arch/alpha/alpha/machdep.c:1.345.2.1 Tue Nov 1 20:28:32 2016 +++ src/sys/arch/alpha/alpha/machdep.c Wed Jan 30 13:29:51 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.345.2.1 2016/11/01 20:28:32 snj Exp $ */ +/* $NetBSD: machdep.c,v 1.345.2.1.2.1 2019/01/30 13:29:51 martin Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.345.2.1 2016/11/01 20:28:32 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.345.2.1.2.1 2019/01/30 13:29:51 martin Exp $"); #include #include @@ -1465,12 +1465,11 @@ sendsig_siginfo(const ksiginfo_t *ksi, c #endif /* Build stack frame for signal trampoline. */ - + memset(&frame, 0, sizeof(frame)); frame.sf_si._info = ksi->ksi_info; frame.sf_uc.uc_flags = _UC_SIGMASK; frame.sf_uc.uc_sigmask = *mask; frame.sf_uc.uc_link = l->l_ctxlink; - memset(&frame.sf_uc.uc_stack, 0, sizeof(frame.sf_uc.uc_stack)); sendsig_reset(l, sig); mutex_exit(p->p_lock); cpu_getmcontext(l, &frame.sf_uc.uc_mcontext, &frame.sf_uc.uc_flags); Index: src/sys/arch/amd64/amd64/netbsd32_machdep.c diff -u src/sys/arch/amd
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Wed Jan 30 13:28:09 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1677 To generate a diff of this commit: cvs rdiff -u -r1.1.2.37 -r1.1.2.38 src/doc/CHANGES-7.3 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-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.37 src/doc/CHANGES-7.3:1.1.2.38 --- src/doc/CHANGES-7.3:1.1.2.37 Tue Jan 29 08:31:23 2019 +++ src/doc/CHANGES-7.3 Wed Jan 30 13:28:09 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.37 2019/01/29 08:31:23 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.38 2019/01/30 13:28:09 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -418,3 +418,23 @@ sys/netnatm/natm.cpatch sendoob() functions are expected to free both passed mbuf chains. [martin, ticket #1676] + +sys/arch/alpha/alpha/machdep.c 1.352 +sys/arch/amd64/amd64/netbsd32_machdep.c 1.117 +sys/arch/arm/arm/sig_machdep.c 1.51 +sys/arch/hppa/hppa/sig_machdep.c 1.26 +sys/arch/i386/i386/machdep.c 1.813 +sys/arch/m68k/m68k/sig_machdep.c 1.50 +sys/arch/mips/mips/netbsd32_machdep.c 1.16 +sys/arch/mips/mips/sig_machdep.c 1.24 +sys/arch/powerpc/powerpc/sig_machdep.c 1.46 +sys/arch/sh3/sh3/sh3_machdep.c 1.106 +sys/arch/sparc64/sparc64/machdep.c 1.289 +sys/arch/sparc64/sparc64/netbsd32_machdep.c 1.111 +sys/arch/usermode/target/i386/cpu_i386.c 1.8 +sys/arch/usermode/target/x86_64/cpu_x86_64.c 1.7 +sys/arch/vax/vax/sig_machdep.c 1.23 + + Fix widespread leak in the sendsig_siginfo() functions. + [maxv, ticket #1677] +
CVS commit: [netbsd-7] src/sys/arch
Module Name:src Committed By: martin Date: Wed Jan 30 13:27:28 UTC 2019 Modified Files: src/sys/arch/alpha/alpha [netbsd-7]: machdep.c src/sys/arch/amd64/amd64 [netbsd-7]: netbsd32_machdep.c src/sys/arch/arm/arm [netbsd-7]: sig_machdep.c src/sys/arch/hppa/hppa [netbsd-7]: sig_machdep.c src/sys/arch/i386/i386 [netbsd-7]: machdep.c src/sys/arch/m68k/m68k [netbsd-7]: sig_machdep.c src/sys/arch/mips/mips [netbsd-7]: netbsd32_machdep.c sig_machdep.c src/sys/arch/powerpc/powerpc [netbsd-7]: sig_machdep.c src/sys/arch/sh3/sh3 [netbsd-7]: sh3_machdep.c src/sys/arch/sparc64/sparc64 [netbsd-7]: machdep.c netbsd32_machdep.c src/sys/arch/usermode/target/i386 [netbsd-7]: cpu_i386.c src/sys/arch/usermode/target/x86_64 [netbsd-7]: cpu_x86_64.c src/sys/arch/vax/vax [netbsd-7]: sig_machdep.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1677): sys/arch/hppa/hppa/sig_machdep.c: revision 1.26 sys/arch/arm/arm/sig_machdep.c: revision 1.51 sys/arch/i386/i386/machdep.c: revision 1.813 sys/arch/alpha/alpha/machdep.c: revision 1.352 sys/arch/m68k/m68k/sig_machdep.c: revision 1.50 sys/arch/usermode/target/i386/cpu_i386.c: revision 1.8 sys/arch/sparc64/sparc64/machdep.c: revision 1.289 sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.111 sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.46 sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.117 sys/arch/sh3/sh3/sh3_machdep.c: revision 1.106 sys/arch/mips/mips/netbsd32_machdep.c: revision 1.16 sys/arch/mips/mips/sig_machdep.c: revision 1.24 sys/arch/usermode/target/x86_64/cpu_x86_64.c: revision 1.7 sys/arch/vax/vax/sig_machdep.c: revision 1.23 Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo has padding, so zero it out properly. While here I'm also zeroing out some other things in several ports, for safety. Same problem in netbsd32, so fix that too. I can't compile-test on each architecture, but there should be no breakage (tm). Overall this fixes at least 14 info leaks. Prompted by the discovery by KLEAK of a leak in amd64's sendsig_siginfo. To generate a diff of this commit: cvs rdiff -u -r1.345.2.1 -r1.345.2.2 src/sys/arch/alpha/alpha/machdep.c cvs rdiff -u -r1.92 -r1.92.4.1 src/sys/arch/amd64/amd64/netbsd32_machdep.c cvs rdiff -u -r1.47 -r1.47.4.1 src/sys/arch/arm/arm/sig_machdep.c cvs rdiff -u -r1.25 -r1.25.30.1 src/sys/arch/hppa/hppa/sig_machdep.c cvs rdiff -u -r1.752.4.2 -r1.752.4.3 src/sys/arch/i386/i386/machdep.c cvs rdiff -u -r1.49 -r1.49.14.1 src/sys/arch/m68k/m68k/sig_machdep.c cvs rdiff -u -r1.11 -r1.11.4.1 src/sys/arch/mips/mips/netbsd32_machdep.c cvs rdiff -u -r1.23 -r1.23.28.1 src/sys/arch/mips/mips/sig_machdep.c cvs rdiff -u -r1.43.14.1 -r1.43.14.2 \ src/sys/arch/powerpc/powerpc/sig_machdep.c cvs rdiff -u -r1.102.4.1 -r1.102.4.2 src/sys/arch/sh3/sh3/sh3_machdep.c cvs rdiff -u -r1.278.2.3 -r1.278.2.4 src/sys/arch/sparc64/sparc64/machdep.c cvs rdiff -u -r1.103.4.1 -r1.103.4.2 \ src/sys/arch/sparc64/sparc64/netbsd32_machdep.c cvs rdiff -u -r1.4 -r1.4.16.1 src/sys/arch/usermode/target/i386/cpu_i386.c cvs rdiff -u -r1.2 -r1.2.24.1 \ src/sys/arch/usermode/target/x86_64/cpu_x86_64.c cvs rdiff -u -r1.21 -r1.21.28.1 src/sys/arch/vax/vax/sig_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/alpha/alpha/machdep.c diff -u src/sys/arch/alpha/alpha/machdep.c:1.345.2.1 src/sys/arch/alpha/alpha/machdep.c:1.345.2.2 --- src/sys/arch/alpha/alpha/machdep.c:1.345.2.1 Tue Nov 1 20:28:32 2016 +++ src/sys/arch/alpha/alpha/machdep.c Wed Jan 30 13:27:27 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.345.2.1 2016/11/01 20:28:32 snj Exp $ */ +/* $NetBSD: machdep.c,v 1.345.2.2 2019/01/30 13:27:27 martin Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.345.2.1 2016/11/01 20:28:32 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.345.2.2 2019/01/30 13:27:27 martin Exp $"); #include #include @@ -1465,12 +1465,11 @@ sendsig_siginfo(const ksiginfo_t *ksi, c #endif /* Build stack frame for signal trampoline. */ - + memset(&frame, 0, sizeof(frame)); frame.sf_si._info = ksi->ksi_info; frame.sf_uc.uc_flags = _UC_SIGMASK; frame.sf_uc.uc_sigmask = *mask; frame.sf_uc.uc_link = l->l_ctxlink; - memset(&frame.sf_uc.uc_stack, 0, sizeof(frame.sf_uc.uc_stack)); sendsig_reset(l, sig); mutex_exit(p->p_lock); cpu_getmcontext(l, &frame.sf_uc.uc_mcontext, &frame.sf_uc.uc_flags); Index: src/sys/arch/amd64/amd64/netbsd32_machdep.c diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.92 src/sys/arch/amd64/amd64/netbsd32_ma
CVS commit: src/tests/lib/csu
Module Name:src Committed By: martin Date: Wed Jan 30 12:42:53 UTC 2019 Modified Files: src/tests/lib/csu: t_ifunc_static.sh Log Message: Move from uname -m to uname -p when checking if this target does support ifunc - someone with a powerpc machine please double check! To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/csu/t_ifunc_static.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/lib/csu/t_ifunc_static.sh diff -u src/tests/lib/csu/t_ifunc_static.sh:1.1 src/tests/lib/csu/t_ifunc_static.sh:1.2 --- src/tests/lib/csu/t_ifunc_static.sh:1.1 Fri Mar 9 20:20:47 2018 +++ src/tests/lib/csu/t_ifunc_static.sh Wed Jan 30 12:42:53 2019 @@ -1,4 +1,4 @@ -# $NetBSD: t_ifunc_static.sh,v 1.1 2018/03/09 20:20:47 joerg Exp $ +# $NetBSD: t_ifunc_static.sh,v 1.2 2019/01/30 12:42:53 martin Exp $ # # Copyright (c) 2018 The NetBSD Foundation, Inc. # All rights reserved. @@ -32,8 +32,8 @@ ifunc_static_head() } ifunc_static_body() { - case `uname -m` in - i386|amd64|*ppc*|*sparc*|*arm*) + case `uname -p` in + i386|x86_64|powerpc|*sparc*|*arm*) ;; *) atf_skip "ifunc is supposed only on ARM, i386, PowerPC, SPARC and x86-64"
CVS commit: src/tests
Module Name:src Committed By: martin Date: Wed Jan 30 12:16:28 UTC 2019 Modified Files: src/tests/kernel: h_segv.c src/tests/lib/libc/gen: t_fpsetmask.c t_siginfo.c src/tests/lib/libm: t_fenv.c Log Message: Clean up terminology: modern arm CPUs do properly implement IEEE 754 floating point exceptions - but some (actually all currently know ones) do not implement sending traps when these exceptions are raised. Pointed out by Peter Maydell. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/tests/kernel/h_segv.c cvs rdiff -u -r1.18 -r1.19 src/tests/lib/libc/gen/t_fpsetmask.c cvs rdiff -u -r1.34 -r1.35 src/tests/lib/libc/gen/t_siginfo.c cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libm/t_fenv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/kernel/h_segv.c diff -u src/tests/kernel/h_segv.c:1.12 src/tests/kernel/h_segv.c:1.13 --- src/tests/kernel/h_segv.c:1.12 Sun Jan 27 16:29:56 2019 +++ src/tests/kernel/h_segv.c Wed Jan 30 12:16:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: h_segv.c,v 1.12 2019/01/27 16:29:56 christos Exp $ */ +/* $NetBSD: h_segv.c,v 1.13 2019/01/30 12:16:28 martin Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: h_segv.c,v 1.12 2019/01/27 16:29:56 christos Exp $"); +__RCSID("$NetBSD: h_segv.c,v 1.13 2019/01/30 12:16:28 martin Exp $"); #define __TEST_FENV @@ -113,12 +113,12 @@ check_fpe(void) { #if (__arm__ && !__SOFTFP__) || __aarch64__ /* - * Some NEON fpus do not implement IEEE exception handling, - * skip these tests if running on them and compiled for + * Some NEON fpus do not trap on IEEE 754 FP excpeptions. + * Skip these tests if running on them and compiled for * hard float. */ if (0 == fpsetmask(fpsetmask(FP_X_INV))) { - printf("FPU does not implement exception handling\n"); + printf("FPU does not implement traps on FP exceptions\n"); exit(EXIT_FAILURE); } #endif Index: src/tests/lib/libc/gen/t_fpsetmask.c diff -u src/tests/lib/libc/gen/t_fpsetmask.c:1.18 src/tests/lib/libc/gen/t_fpsetmask.c:1.19 --- src/tests/lib/libc/gen/t_fpsetmask.c:1.18 Wed Jan 23 17:36:01 2019 +++ src/tests/lib/libc/gen/t_fpsetmask.c Wed Jan 30 12:16:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_fpsetmask.c,v 1.18 2019/01/23 17:36:01 martin Exp $ */ +/* $NetBSD: t_fpsetmask.c,v 1.19 2019/01/30 12:16:28 martin Exp $ */ /*- * Copyright (c) 1995 The NetBSD Foundation, Inc. @@ -60,13 +60,13 @@ ATF_TC_BODY(no_test, tc) #if (__arm__ && !__SOFTFP__) || __aarch64__ /* - * Some NEON fpus do not implement IEEE exception handling, + * Some NEON fpus do not trap on IEEE 754 FP excpeptions. * skip these tests if running on them and compiled for * hard float. */ #define FPU_PREREQ() \ if (0 == fpsetmask(fpsetmask(FP_X_INV))) \ - atf_tc_skip("FPU does not implement exception handling"); + atf_tc_skip("FPU does not implement traps on FP exceptions"); #endif #ifndef FPU_PREREQ Index: src/tests/lib/libc/gen/t_siginfo.c diff -u src/tests/lib/libc/gen/t_siginfo.c:1.34 src/tests/lib/libc/gen/t_siginfo.c:1.35 --- src/tests/lib/libc/gen/t_siginfo.c:1.34 Sat Jan 26 15:46:27 2019 +++ src/tests/lib/libc/gen/t_siginfo.c Wed Jan 30 12:16:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_siginfo.c,v 1.34 2019/01/26 15:46:27 martin Exp $ */ +/* $NetBSD: t_siginfo.c,v 1.35 2019/01/30 12:16:28 martin Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -311,12 +311,12 @@ ATF_TC_BODY(sigfpe_flt, tc) atf_tc_skip("Test does not run correctly under QEMU"); #if (__arm__ && !__SOFTFP__) || __aarch64__ /* - * Some NEON fpus do not implement IEEE exception handling, + * Some NEON fpus do not trap on IEEE 754 FP excpeptions. * skip these tests if running on them and compiled for * hard float. */ if (0 == fpsetmask(fpsetmask(FP_X_INV))) - atf_tc_skip("FPU does not implement exception handling"); + atf_tc_skip("FPU does not implement traps on FP exceptions"); #endif if (sigsetjmp(sigfpe_flt_env, 0) == 0) { sa.sa_flags = SA_SIGINFO; Index: src/tests/lib/libm/t_fenv.c diff -u src/tests/lib/libm/t_fenv.c:1.4 src/tests/lib/libm/t_fenv.c:1.5 --- src/tests/lib/libm/t_fenv.c:1.4 Wed Jan 23 17:36:01 2019 +++ src/tests/lib/libm/t_fenv.c Wed Jan 30 12:16:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: t_fenv.c,v 1.4 2019/01/23 17:36:01 martin Exp $ */ +/* $NetBSD: t_fenv.c,v 1.5 2019/01/30 12:16:28 martin Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fenv.c,v 1.4 2019/01/23 17:36:01 martin Exp $"); +__RCSID("$NetBSD: t_fenv.c,v 1.5 2019/01/30 12:16:28 martin Exp $"); #include @@ -42,13 +42,13 @@ __RCSID("$NetBSD: t_fenv.c,v 1.4 2019/01 #if (__arm__ && !__SOFTFP__) || __aarch64__ /* - * Some NEON fpus do not implement
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Wed Jan 30 11:36:42 UTC 2019 Modified Files: src/sys/arch/arm/sunxi: sunxi_sid.c Log Message: Match allwinner,sun50i-a64-sid To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sunxi_sid.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/sunxi/sunxi_sid.c diff -u src/sys/arch/arm/sunxi/sunxi_sid.c:1.2 src/sys/arch/arm/sunxi/sunxi_sid.c:1.3 --- src/sys/arch/arm/sunxi/sunxi_sid.c:1.2 Wed Jan 2 19:32:18 2019 +++ src/sys/arch/arm/sunxi/sunxi_sid.c Wed Jan 30 11:36:42 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_sid.c,v 1.2 2019/01/02 19:32:18 jmcneill Exp $ */ +/* $NetBSD: sunxi_sid.c,v 1.3 2019/01/30 11:36:42 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_sid.c,v 1.2 2019/01/02 19:32:18 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_sid.c,v 1.3 2019/01/30 11:36:42 jmcneill Exp $"); #include #include @@ -59,6 +59,7 @@ static const struct of_compat_data compa { "allwinner,sun7i-a20-sid", (uintptr_t)&sun4i_a10_sid_config }, { "allwinner,sun8i-h3-sid", (uintptr_t)&sun8i_h3_sid_config }, { "allwinner,sun8i-a83t-sid", (uintptr_t)&sun8i_h3_sid_config }, + { "allwinner,sun50i-a64-sid", (uintptr_t)&sun8i_h3_sid_config }, { NULL } };
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Wed Jan 30 11:25:40 UTC 2019 Modified Files: src/sys/arch/evbarm/conf: GENERIC64 Log Message: Enable Allwinner A64 display pipeline To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/arch/evbarm/conf/GENERIC64 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/evbarm/conf/GENERIC64 diff -u src/sys/arch/evbarm/conf/GENERIC64:1.76 src/sys/arch/evbarm/conf/GENERIC64:1.77 --- src/sys/arch/evbarm/conf/GENERIC64:1.76 Wed Jan 30 01:26:18 2019 +++ src/sys/arch/evbarm/conf/GENERIC64 Wed Jan 30 11:25:40 2019 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC64,v 1.76 2019/01/30 01:26:18 jmcneill Exp $ +# $NetBSD: GENERIC64,v 1.77 2019/01/30 11:25:40 jmcneill Exp $ # # GENERIC ARM (aarch64) kernel # @@ -359,14 +359,14 @@ tegracec0 at fdt? # NVIDIA Tegra HDMI hdmicec* at hdmicecbus? # Display -#dispcon* at fdt? # Display connector devices -#dwhdmi* at fdt? # Designware HDMI TX -#sunxide2bus* at fdt? pass 4 # Allwinner DE2 bus -#sunxidrm* at fdt? pass 5 # Allwinner Display Pipeline -#sunxifb* at sunxidrm? # Allwinner DRM framebuffer -#sunxihdmiphy* at fdt? pass 9 # Allwinner HDMI TX PHY -#sunxilcdc* at fdt? # Allwinner DE2 timing controller -#sunximixer* at fdt? # Allwinner DE2 mixer +dispcon* at fdt? # Display connector devices +dwhdmi* at fdt? # Designware HDMI TX +sunxide2bus* at fdt? pass 4 # Allwinner DE2 bus +sunxidrm* at fdt? pass 5 # Allwinner Display Pipeline +sunxifb* at sunxidrm? # Allwinner DRM framebuffer +sunxihdmiphy* at fdt? pass 9 # Allwinner HDMI TX PHY +sunxilcdc* at fdt? # Allwinner DE2 timing controller +sunximixer* at fdt? # Allwinner DE2 mixer #tegradrm* at fdt? # NVIDIA Tegra Display #tegrafb* at tegrafbbus? genfb* at fdt? # Simple Framebuffer
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: jmcneill Date: Wed Jan 30 11:24:48 UTC 2019 Modified Files: src/sys/dev/wscons: wsdisplay.c wsdisplay_vcons_util.c wsdisplayvar.h Log Message: Suspend multicons output to the old console device while replaying the vcons msgbuf. To generate a diff of this commit: cvs rdiff -u -r1.151 -r1.152 src/sys/dev/wscons/wsdisplay.c cvs rdiff -u -r1.2 -r1.3 src/sys/dev/wscons/wsdisplay_vcons_util.c cvs rdiff -u -r1.54 -r1.55 src/sys/dev/wscons/wsdisplayvar.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/wscons/wsdisplay.c diff -u src/sys/dev/wscons/wsdisplay.c:1.151 src/sys/dev/wscons/wsdisplay.c:1.152 --- src/sys/dev/wscons/wsdisplay.c:1.151 Wed Jan 30 10:54:52 2019 +++ src/sys/dev/wscons/wsdisplay.c Wed Jan 30 11:24:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay.c,v 1.151 2019/01/30 10:54:52 jmcneill Exp $ */ +/* $NetBSD: wsdisplay.c,v 1.152 2019/01/30 11:24:48 jmcneill Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.151 2019/01/30 10:54:52 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.152 2019/01/30 11:24:48 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "opt_wsdisplay_compat.h" @@ -74,6 +74,7 @@ __KERNEL_RCSID(0, "$NetBSD: wsdisplay.c, #ifdef WSDISPLAY_MULTICONS static bool wsdisplay_multicons_enable = true; +static bool wsdisplay_multicons_suspended = false; #endif /* Console device before replaced by wsdisplay */ @@ -2301,7 +2302,8 @@ wsdisplay_cnputc(dev_t dev, int i) (*dc->wsemul->output)(dc->wsemulcookie, &c, 1, 1); #ifdef WSDISPLAY_MULTICONS - if (wsdisplay_multicons_enable && wsdisplay_ocn && wsdisplay_ocn->cn_putc) + if (!wsdisplay_multicons_suspended && + wsdisplay_multicons_enable && wsdisplay_ocn && wsdisplay_ocn->cn_putc) wsdisplay_ocn->cn_putc(wsdisplay_ocn->cn_dev, i); #endif } @@ -2318,7 +2320,8 @@ wsdisplay_getc(dev_t dev) } #ifdef WSDISPLAY_MULTICONS - if (wsdisplay_multicons_enable && wsdisplay_ocn && wsdisplay_ocn->cn_getc) { + if (!wsdisplay_multicons_suspended && + wsdisplay_multicons_enable && wsdisplay_ocn && wsdisplay_ocn->cn_getc) { c = wsdisplay_ocn->cn_getc(wsdisplay_ocn->cn_dev); if (c >= 0) return c; @@ -2345,7 +2348,8 @@ wsdisplay_pollc(dev_t dev, int on) #ifdef WSDISPLAY_MULTICONS /* notify to old console driver */ - if (wsdisplay_multicons_enable && wsdisplay_ocn && wsdisplay_ocn->cn_pollc) + if (!wsdisplay_multicons_suspended && + wsdisplay_multicons_enable && wsdisplay_ocn && wsdisplay_ocn->cn_pollc) wsdisplay_ocn->cn_pollc(wsdisplay_ocn->cn_dev, on); #endif } @@ -2368,6 +2372,14 @@ wsdisplay_unset_cons_kbd(void) } #ifdef WSDISPLAY_MULTICONS +void +wsdisplay_multicons_suspend(bool suspend) +{ + wsdisplay_multicons_suspended = suspend; +} +#endif + +#ifdef WSDISPLAY_MULTICONS SYSCTL_SETUP(sysctl_hw_wsdisplay_setup, "sysctl hw.wsdisplay subtree setup") { const struct sysctlnode *wsdisplay_node; Index: src/sys/dev/wscons/wsdisplay_vcons_util.c diff -u src/sys/dev/wscons/wsdisplay_vcons_util.c:1.2 src/sys/dev/wscons/wsdisplay_vcons_util.c:1.3 --- src/sys/dev/wscons/wsdisplay_vcons_util.c:1.2 Wed May 25 06:01:39 2011 +++ src/sys/dev/wscons/wsdisplay_vcons_util.c Wed Jan 30 11:24:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay_vcons_util.c,v 1.2 2011/05/25 06:01:39 macallan Exp $ */ +/* $NetBSD: wsdisplay_vcons_util.c,v 1.3 2019/01/30 11:24:48 jmcneill Exp $ */ /*- * Copyright (c) 2009 Michael Lorenz @@ -26,6 +26,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifdef _KERNEL_OPT +#include "opt_wsdisplay_compat.h" +#endif + /* some utility functions for use with vcons */ #include #include @@ -48,6 +52,10 @@ vcons_replay_msgbuf(struct vcons_screen int status = scr->scr_status; int rptr = msgbufp->msg_bufr; +#ifdef WSDISPLAY_MULTICONS + wsdisplay_multicons_suspend(true); +#endif + scr->scr_status &= ~VCONS_IS_VISIBLE; while (rptr != msgbufp->msg_bufx) { cnputc(msgbufp->msg_bufc[rptr]); @@ -57,4 +65,8 @@ vcons_replay_msgbuf(struct vcons_screen } scr->scr_status = status; vcons_update_screen(scr); + +#ifdef WSDISPLAY_MULTICONS + wsdisplay_multicons_suspend(false); +#endif } Index: src/sys/dev/wscons/wsdisplayvar.h diff -u src/sys/dev/wscons/wsdisplayvar.h:1.54 src/sys/dev/wscons/wsdisplayvar.h:1.55 --- src/sys/dev/wscons/wsdisplayvar.h:1.54 Tue Dec 4 09:27:59 2018 +++ src/sys/dev/wscons/wsdisplayvar.h Wed Jan 30 11:24:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplayvar.h,v 1.54 2018/12/04 09:27:59 mlelstv Exp $ */ +/* $NetBSD: wsdisplayvar.h,v 1.55 2019/01/30 11:24:48 jmcneill Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -173,6 +173,7 @@ void wsdisplay_cnattach(const struct wss void wsdisplay_preattach(const struct wsscreen_descr *, void *, int, int,
CVS commit: src/sys/dev/usb
Module Name:src Committed By: rin Date: Wed Jan 30 11:13:26 UTC 2019 Modified Files: src/sys/dev/usb: if_axen.c if_axenreg.h Log Message: Fix HW checksum offloading. - Enable ones specified in if_capenable and remove AXEN_TOE macro. - Check correct bit and set appropriate csum_flags. - Pass packets of wrong checksum to upper layer instead of dropping them. - Fix value of AXEN_RXHDR_L3_TYPE_MASK. Tested on ASIX Elec. Corp. (0xb95) AX88179 (0x1790). To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/dev/usb/if_axen.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/usb/if_axenreg.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/if_axen.c diff -u src/sys/dev/usb/if_axen.c:1.18 src/sys/dev/usb/if_axen.c:1.19 --- src/sys/dev/usb/if_axen.c:1.18 Tue Jan 22 03:42:28 2019 +++ src/sys/dev/usb/if_axen.c Wed Jan 30 11:13:25 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_axen.c,v 1.18 2019/01/22 03:42:28 msaitoh Exp $ */ +/* $NetBSD: if_axen.c,v 1.19 2019/01/30 11:13:25 rin Exp $ */ /* $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */ /* @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.18 2019/01/22 03:42:28 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.19 2019/01/30 11:13:25 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -70,8 +70,6 @@ int axendebug = 0; #define DPRINTFN(n,x) #endif -#define AXEN_TOE /* enable checksum offload function */ - /* * Various supported device vendors/products. */ @@ -98,6 +96,7 @@ static int axen_rx_list_init(struct axen static struct mbuf *axen_newbuf(void); static int axen_encap(struct axen_softc *, struct mbuf *, int); static void axen_rxeof(struct usbd_xfer *, void *, usbd_status); +static int axen_csum_flags_rx(struct ifnet *, uint32_t); static void axen_txeof(struct usbd_xfer *, void *, usbd_status); static void axen_tick(void *); static void axen_tick_task(void *); @@ -122,6 +121,7 @@ static void axen_lock_mii(struct axen_so static void axen_unlock_mii(struct axen_softc *); static void axen_ax88179_init(struct axen_softc *); +static void axen_setcoe(struct axen_softc *); /* Get exclusive access to the MII registers */ static void @@ -569,21 +569,7 @@ axen_ax88179_init(struct axen_softc *sc) /* Set RX/TX configuration. */ /* Offloadng enable */ -#ifdef AXEN_TOE - val = AXEN_RXCOE_IPv4 | AXEN_RXCOE_TCPv4 | AXEN_RXCOE_UDPv4 | - AXEN_RXCOE_TCPv6 | AXEN_RXCOE_UDPv6; -#else - val = AXEN_RXCOE_OFF; -#endif - axen_cmd(sc, AXEN_CMD_MAC_WRITE, 1, AXEN_RX_COE, &val); - -#ifdef AXEN_TOE - val = AXEN_TXCOE_IPv4 | AXEN_TXCOE_TCPv4 | AXEN_TXCOE_UDPv4 | - AXEN_TXCOE_TCPv6 | AXEN_TXCOE_UDPv6; -#else - val = AXEN_TXCOE_OFF; -#endif - axen_cmd(sc, AXEN_CMD_MAC_WRITE, 1, AXEN_TX_COE, &val); + axen_setcoe(sc); /* Set RX control register */ ctl = AXEN_RXCTL_IPE | AXEN_RXCTL_DROPCRCERR | AXEN_RXCTL_AUTOB; @@ -633,6 +619,50 @@ axen_ax88179_init(struct axen_softc *sc) #endif } +static void +axen_setcoe(struct axen_softc *sc) +{ + struct ifnet *ifp = GET_IFP(sc); + uint64_t enabled = ifp->if_capenable; + uint8_t val; + + if (enabled & (IFCAP_CSUM_IPv4_Rx | + IFCAP_CSUM_TCPv4_Rx | IFCAP_CSUM_UDPv4_Rx | + IFCAP_CSUM_TCPv6_Rx | IFCAP_CSUM_UDPv6_Rx)) { + val = 0; + if (enabled & IFCAP_CSUM_IPv4_Rx) + val |= AXEN_RXCOE_IPv4; + if (enabled & IFCAP_CSUM_TCPv4_Rx) + val |= AXEN_RXCOE_TCPv4; + if (enabled & IFCAP_CSUM_UDPv4_Rx) + val |= AXEN_RXCOE_UDPv4; + if (enabled & IFCAP_CSUM_TCPv6_Rx) + val |= AXEN_RXCOE_TCPv6; + if (enabled & IFCAP_CSUM_UDPv6_Rx) + val |= AXEN_RXCOE_UDPv6; + } else + val = AXEN_RXCOE_OFF; + axen_cmd(sc, AXEN_CMD_MAC_WRITE, 1, AXEN_RX_COE, &val); + + if (enabled & (IFCAP_CSUM_IPv4_Tx | + IFCAP_CSUM_TCPv4_Tx | IFCAP_CSUM_UDPv4_Tx | + IFCAP_CSUM_TCPv6_Tx | IFCAP_CSUM_UDPv6_Tx)) { + val = 0; + if (enabled & IFCAP_CSUM_IPv4_Tx) + val |= AXEN_TXCOE_IPv4; + if (enabled & IFCAP_CSUM_TCPv4_Tx) + val |= AXEN_TXCOE_TCPv4; + if (enabled & IFCAP_CSUM_UDPv4_Tx) + val |= AXEN_TXCOE_UDPv4; + if (enabled & IFCAP_CSUM_TCPv6_Tx) + val |= AXEN_TXCOE_TCPv6; + if (enabled & IFCAP_CSUM_UDPv6_Tx) + val |= AXEN_TXCOE_UDPv6; + } else + val = AXEN_TXCOE_OFF; + axen_cmd(sc, AXEN_CMD_MAC_WRITE, 1, AXEN_TX_COE, &val); +} + static int axen_match(device_t parent, cfdata_t match, void *aux) { @@ -767,13 +797,11 @@ axen_attach(device_t parent, device_t se IFQ_SET_READY(&ifp->if_snd); sc->axen_ec.ec_capabilities = ETHERCAP_VLAN_MTU; -#ifdef AXEN_TOE ifp->if_capabilities |= IFCAP_CSUM_IPv4_Rx | IFCAP_CSUM_IPv4_Tx | IFCAP_CSUM_TCPv4_Rx | IFCAP_CSUM_TCPv4_Tx | IFCAP_CSUM_UDPv4_Rx | IFCAP_CSUM_UDPv4_Tx | IFCAP_CSUM_TCPv6_Rx | IFCAP_CSUM_TCPv6_Tx | IFCAP_CSUM_UDPv6_Rx | IFCAP_CSUM_UDPv6_Tx; -#endif /* Initialize MII/media info. */ mii = &sc->axen_mii; @@ -1079,27 +1107,7 @@ axen_rxeof(struct
CVS commit: src/sys/dev/usb
Module Name:src Committed By: rin Date: Wed Jan 30 11:11:45 UTC 2019 Modified Files: src/sys/dev/usb: if_mue.c Log Message: Fix mue_sethwcsum(): - Check appropriate flags to enable RX checksum offloading. - We don't support ICMP/IGMP checksum offloading. Tested both on LAN7800 and 7500. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/usb/if_mue.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_mue.c diff -u src/sys/dev/usb/if_mue.c:1.28 src/sys/dev/usb/if_mue.c:1.29 --- src/sys/dev/usb/if_mue.c:1.28 Tue Jan 22 03:42:28 2019 +++ src/sys/dev/usb/if_mue.c Wed Jan 30 11:11:45 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_mue.c,v 1.28 2019/01/22 03:42:28 msaitoh Exp $ */ +/* $NetBSD: if_mue.c,v 1.29 2019/01/30 11:11:45 rin Exp $ */ /* $OpenBSD: if_mue.c,v 1.3 2018/08/04 16:42:46 jsg Exp $ */ /* @@ -20,7 +20,7 @@ /* Driver for Microchip LAN7500/LAN7800 chipsets. */ #include -__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.28 2019/01/22 03:42:28 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.29 2019/01/30 11:11:45 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1402,17 +1402,23 @@ mue_sethwcsum(struct mue_softc *sc) reg = (sc->mue_flags & LAN7500) ? MUE_7500_RFE_CTL : MUE_7800_RFE_CTL; val = mue_csr_read(sc, reg); - if (ifp->if_capenable & (IFCAP_CSUM_TCPv4_Rx|IFCAP_CSUM_UDPv4_Rx)) { - DPRINTF(sc, "enabled\n"); - val |= MUE_RFE_CTL_IGMP_COE | MUE_RFE_CTL_ICMP_COE; - val |= MUE_RFE_CTL_TCPUDP_COE | MUE_RFE_CTL_IP_COE; + if (ifp->if_capenable & IFCAP_CSUM_IPv4_Rx) { + DPRINTF(sc, "RX IPv4 hwcsum enabled\n"); + val |= MUE_RFE_CTL_IP_COE; } else { - DPRINTF(sc, "disabled\n"); - val &= - ~(MUE_RFE_CTL_IGMP_COE | MUE_RFE_CTL_ICMP_COE); - val &= - ~(MUE_RFE_CTL_TCPUDP_COE | MUE_RFE_CTL_IP_COE); -} + DPRINTF(sc, "RX IPv4 hwcsum disabled\n"); + val &= ~MUE_RFE_CTL_IP_COE; + } + + if (ifp->if_capenable & + (IFCAP_CSUM_TCPv4_Rx | IFCAP_CSUM_UDPv4_Rx | + IFCAP_CSUM_TCPv6_Rx | IFCAP_CSUM_UDPv6_Rx)) { + DPRINTF(sc, "RX L4 hwcsum enabled\n"); + val |= MUE_RFE_CTL_TCPUDP_COE; + } else { + DPRINTF(sc, "RX L4 hwcsum disabled\n"); + val &= ~MUE_RFE_CTL_TCPUDP_COE; + } val &= ~MUE_RFE_CTL_VLAN_FILTER;
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Wed Jan 30 10:55:44 UTC 2019 Modified Files: src/sys/arch/arm/sunxi: sunxi_drm.c sunxi_fb.c Log Message: Revert previous To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sunxi_drm.c \ src/sys/arch/arm/sunxi/sunxi_fb.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/sunxi/sunxi_drm.c diff -u src/sys/arch/arm/sunxi/sunxi_drm.c:1.2 src/sys/arch/arm/sunxi/sunxi_drm.c:1.3 --- src/sys/arch/arm/sunxi/sunxi_drm.c:1.2 Wed Jan 30 02:44:19 2019 +++ src/sys/arch/arm/sunxi/sunxi_drm.c Wed Jan 30 10:55:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_drm.c,v 1.2 2019/01/30 02:44:19 jmcneill Exp $ */ +/* $NetBSD: sunxi_drm.c,v 1.3 2019/01/30 10:55:44 jmcneill Exp $ */ /*- * Copyright (c) 2019 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.2 2019/01/30 02:44:19 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.3 2019/01/30 10:55:44 jmcneill Exp $"); #include #include @@ -58,6 +58,11 @@ static const char * const compatible[] = NULL }; +static const char * fb_compatible[] = { + "allwinner,simple-framebuffer", + NULL +}; + static int sunxi_drm_match(device_t, cfdata_t, void *); static void sunxi_drm_attach(device_t, device_t, void *); @@ -135,6 +140,8 @@ sunxi_drm_attach(device_t parent, device sc->sc_ddev->dmat = sc->sc_ddev->bus_dmat; sc->sc_ddev->dmat_subregion_p = false; + fdt_remove_bycompat(fb_compatible); + config_defer(self, sunxi_drm_init); } Index: src/sys/arch/arm/sunxi/sunxi_fb.c diff -u src/sys/arch/arm/sunxi/sunxi_fb.c:1.2 src/sys/arch/arm/sunxi/sunxi_fb.c:1.3 --- src/sys/arch/arm/sunxi/sunxi_fb.c:1.2 Wed Jan 30 02:44:19 2019 +++ src/sys/arch/arm/sunxi/sunxi_fb.c Wed Jan 30 10:55:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_fb.c,v 1.2 2019/01/30 02:44:19 jmcneill Exp $ */ +/* $NetBSD: sunxi_fb.c,v 1.3 2019/01/30 10:55:44 jmcneill Exp $ */ /*- * Copyright (c) 2015-2019 Jared McNeill @@ -29,7 +29,7 @@ #include "opt_wsdisplay_compat.h" #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_fb.c,v 1.2 2019/01/30 02:44:19 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_fb.c,v 1.3 2019/01/30 10:55:44 jmcneill Exp $"); #include #include @@ -37,8 +37,6 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_fb.c,v #include -#include - #include #include @@ -96,7 +94,6 @@ sunxi_fb_attach(device_t parent, device_ prop_dictionary_t dict = device_properties(self); const bool is_console = true; prop_dictionary_set_bool(dict, "is_console", is_console); - wsdisplay_cndetach(); #endif const struct drmfb_attach_args da = {
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: jmcneill Date: Wed Jan 30 10:54:52 UTC 2019 Modified Files: src/sys/dev/wscons: wsdisplay.c Log Message: Revert previous as it does not completely solve the problem of detaching a wsdisplay device To generate a diff of this commit: cvs rdiff -u -r1.150 -r1.151 src/sys/dev/wscons/wsdisplay.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/wscons/wsdisplay.c diff -u src/sys/dev/wscons/wsdisplay.c:1.150 src/sys/dev/wscons/wsdisplay.c:1.151 --- src/sys/dev/wscons/wsdisplay.c:1.150 Wed Jan 30 02:43:47 2019 +++ src/sys/dev/wscons/wsdisplay.c Wed Jan 30 10:54:52 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: wsdisplay.c,v 1.150 2019/01/30 02:43:47 jmcneill Exp $ */ +/* $NetBSD: wsdisplay.c,v 1.151 2019/01/30 10:54:52 jmcneill Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.150 2019/01/30 02:43:47 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.151 2019/01/30 10:54:52 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "opt_wsdisplay_compat.h" @@ -966,12 +966,10 @@ wsdisplay_preattach(const struct wsscree void wsdisplay_cndetach(void) { - if (wsdisplay_console_initted > 0) { - cn_tab = wsdisplay_ocn; - wsdisplay_console_initted = 0; - wsdisplay_console_attached = 0; - wsdisplay_console_device = NULL; - } + KASSERT(wsdisplay_console_initted == 2); + + cn_tab = wsdisplay_ocn; + wsdisplay_console_initted = 0; } /*
CVS commit: src/bin/dd
Module Name:src Committed By: wiz Date: Wed Jan 30 10:28:50 UTC 2019 Modified Files: src/bin/dd: dd.1 Log Message: Fix typos; use American spelling consistently. Remove an unnecessary macro. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/bin/dd/dd.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/dd/dd.1 diff -u src/bin/dd/dd.1:1.35 src/bin/dd/dd.1:1.36 --- src/bin/dd/dd.1:1.35 Wed Jan 30 01:40:02 2019 +++ src/bin/dd/dd.1 Wed Jan 30 10:28:50 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: dd.1,v 1.35 2019/01/30 01:40:02 mrg Exp $ +.\" $NetBSD: dd.1,v 1.36 2019/01/30 10:28:50 wiz Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -484,13 +484,13 @@ Use Alternative I/O. .It Cm async Use .Dv SIGIO -signalling for I/O. +signaling for I/O. .It Cm cloexec Set the close-on-exec flag. .It Cm direct Directly access the data, skipping any caches. .It Cm directory -Not avaiable for +Not available for .Nm . .It Cm exlock Atomically obtain an exclusive lock. @@ -508,7 +508,7 @@ instead of raising .It Cm shlock Atomically obtain a shared lock. .It Cm sync -All I/O will be performed with full synchronisation. +All I/O will be performed with full synchronization. .El .Pp The flags that apply to only input are: @@ -518,7 +518,7 @@ Set the read-only flag. .It Cm rdwr Set the read and write flags. .It Cm rsync -Enable read synchronisation, if the +Enable read synchronization, if the .Cm sync option is also set. .El @@ -530,14 +530,13 @@ Append to the output by default. .It Cm creat Create the output file. .It Cm dsync -Wait for all data to be syncronously written. +Wait for all data to be synchronously written. .It Cm excl Ensure that output is to a new file. .It Cm trunc Truncate the output file before writing. .It Cm wronly Set the write-only flag. -.Pp .El See .Xr open 2
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: hannken Date: Wed Jan 30 10:11:11 UTC 2019 Modified Files: src/sys/arch/sparc64/sparc64: netbsd32_machdep_13.c Log Message: Make this compile with "options DEBUG". To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sparc64/sparc64/netbsd32_machdep_13.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/sparc64/sparc64/netbsd32_machdep_13.c diff -u src/sys/arch/sparc64/sparc64/netbsd32_machdep_13.c:1.2 src/sys/arch/sparc64/sparc64/netbsd32_machdep_13.c:1.3 --- src/sys/arch/sparc64/sparc64/netbsd32_machdep_13.c:1.2 Sun Jan 27 02:08:38 2019 +++ src/sys/arch/sparc64/sparc64/netbsd32_machdep_13.c Wed Jan 30 10:11:11 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep_13.c,v 1.2 2019/01/27 02:08:38 pgoyette Exp $ */ +/* $NetBSD: netbsd32_machdep_13.c,v 1.3 2019/01/30 10:11:11 hannken Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_13.c,v 1.2 2019/01/27 02:08:38 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_13.c,v 1.3 2019/01/30 10:11:11 hannken Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -83,6 +83,10 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_mac #include #include +#ifdef DEBUG +#include +#endif + int compat_13_netbsd32_sigreturn(struct lwp *l, const struct compat_13_netbsd32_sigreturn_args *uap, register_t *retval) { @@ -108,7 +112,7 @@ compat_13_netbsd32_sigreturn(struct lwp } #ifdef DEBUG if (sigdebug & SDB_FOLLOW) { - printf("%s: %s[%d], sigcntxp %p\n", __func__, + printf("%s: %s[%d], sigcntxp %u\n", __func__, p->p_comm, p->p_pid, SCARG(uap, sigcntxp)); if (sigdebug & SDB_DDB) Debugger(); } @@ -133,7 +137,7 @@ compat_13_netbsd32_sigreturn(struct lwp if (((sc.sc_pc | sc.sc_npc) & 3) != 0) #ifdef DEBUG { - printf("%s: pc %p or npc %p invalid\n", + printf("%s: pc %d or npc %d invalid\n", __func__, sc.sc_pc, sc.sc_npc); Debugger(); return (EINVAL); @@ -150,7 +154,7 @@ compat_13_netbsd32_sigreturn(struct lwp tf->tf_out[6] = (int64_t)sc.sc_sp; #ifdef DEBUG if (sigdebug & SDB_FOLLOW) { - printf("%s: return trapframe pc=%p sp=%p tstate=%x\n", __func__, + printf("%s: return trapframe pc=%d sp=%d tstate=%x\n", __func__, (int)tf->tf_pc, (int)tf->tf_out[6], (int)tf->tf_tstate); if (sigdebug & SDB_DDB) Debugger(); }