CVS commit: src/usr.bin/calendar/calendars
Module Name:src Committed By: jnemeth Date: Sat Jun 2 05:55:47 UTC 2018 Modified Files: src/usr.bin/calendar/calendars: calendar.christian calendar.holiday calendar.judaic calendar.netbsd calendar.usholiday Log Message: Update calendar files for the upcoming NetBSD 8.0 release. I'm assuming that it will be released by August 1, which is two months from now. Thus I used 2018 dates for all holidays between Aug. 1st and Dec. 31st, and 2019 dates for all holidays between Jan. 1st and Jul. 31st. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/calendar/calendars/calendar.christian \ src/usr.bin/calendar/calendars/calendar.judaic cvs rdiff -u -r1.28 -r1.29 src/usr.bin/calendar/calendars/calendar.holiday cvs rdiff -u -r1.38 -r1.39 src/usr.bin/calendar/calendars/calendar.netbsd cvs rdiff -u -r1.7 -r1.8 src/usr.bin/calendar/calendars/calendar.usholiday Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/calendar/calendars
Module Name:src Committed By: jnemeth Date: Sat Jun 2 05:55:47 UTC 2018 Modified Files: src/usr.bin/calendar/calendars: calendar.christian calendar.holiday calendar.judaic calendar.netbsd calendar.usholiday Log Message: Update calendar files for the upcoming NetBSD 8.0 release. I'm assuming that it will be released by August 1, which is two months from now. Thus I used 2018 dates for all holidays between Aug. 1st and Dec. 31st, and 2019 dates for all holidays between Jan. 1st and Jul. 31st. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/calendar/calendars/calendar.christian \ src/usr.bin/calendar/calendars/calendar.judaic cvs rdiff -u -r1.28 -r1.29 src/usr.bin/calendar/calendars/calendar.holiday cvs rdiff -u -r1.38 -r1.39 src/usr.bin/calendar/calendars/calendar.netbsd cvs rdiff -u -r1.7 -r1.8 src/usr.bin/calendar/calendars/calendar.usholiday 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/calendar/calendars/calendar.christian diff -u src/usr.bin/calendar/calendars/calendar.christian:1.6 src/usr.bin/calendar/calendars/calendar.christian:1.7 --- src/usr.bin/calendar/calendars/calendar.christian:1.6 Tue Dec 6 04:54:00 2016 +++ src/usr.bin/calendar/calendars/calendar.christian Sat Jun 2 05:55:47 2018 @@ -1,17 +1,17 @@ 01/06* Epiphany -02/28* Shrove Tuesday / Mardi Gras (day before Ash Wednesday) -03/01* Ash Wednesday (First day of Lent) -04/09* Palm Sunday (7 days before Easter) -04/13* Maundy Thursday (3 days before Easter) -04/14* Good Friday (2 days before Easter) -04/16* Easter Sunday -05/21* Rogation Sunday -05/25* Ascension Day (10 days before Pentecost) -06/04* Pentecost (Whitsunday) -06/05* Whitmonday -06/11* Trinity Sunday (7 days after Pentecost) -06/15* Corpus Christi (11 days after Pentecost) +03/05* Shrove Tuesday / Mardi Gras (day before Ash Wednesday) +03/06* Ash Wednesday (First day of Lent) +04/14* Palm Sunday (7 days before Easter) +04/17* Maundy Thursday (3 days before Easter) +04/18* Good Friday (2 days before Easter) +04/20* Easter Sunday +05/26* Rogation Sunday +05/30* Ascension Day (10 days before Pentecost) +06/09* Pentecost (Whitsunday) +06/10* Whitmonday +06/16* Trinity Sunday (7 days after Pentecost) +06/20* Corpus Christi (11 days after Pentecost) 10/18 Feast Day of St. Luke -12/03* First Sunday of Advent (4th Sunday before Christmas) +12/02* First Sunday of Advent (4th Sunday before Christmas) 12/06 St. Nicholas' Day 12/25 Feast of the Nativity (Christmas) Index: src/usr.bin/calendar/calendars/calendar.judaic diff -u src/usr.bin/calendar/calendars/calendar.judaic:1.6 src/usr.bin/calendar/calendars/calendar.judaic:1.7 --- src/usr.bin/calendar/calendars/calendar.judaic:1.6 Tue Dec 6 04:54:00 2016 +++ src/usr.bin/calendar/calendars/calendar.judaic Sat Jun 2 05:55:47 2018 @@ -1,27 +1,27 @@ -02/11* Tu B'Shvat (Feast of Trees) -03/10* Fast of Esther (Battle of Purim; 1 day before Purim; fast day) -03/11* Purim (Feast of Lots; 30 days before Pesach) -04/10* Pesach (First Day of Passover; sabbatical) -04/11* Pesach (sabbatical) -04/12* Pesach (sabbatical) -04/13* Pesach (Last Day of Passover; 8th day of Pesach; sabbatical) -05/02* Yom HaAtzma'ut (Israel Independence Day) -05/13* Lag B'Omer (Commemoration of the Great Rebellion) -05/24* Yom Yerushalayim (Reunification of Jerusalem) -05/30* Shavuot (Festival of Weeks; 50 days after Pesach; sabbatical) -07/11* Fast of Shiv'a Asar B'Tammuz (Tzom Tammuz) (Romans breach Wall of Jerusalem; +01/21* Tu B'Shvat (Feast of Trees) +03/19* Fast of Esther (Battle of Purim; 1 day before Purim; fast day) +03/20* Purim (Feast of Lots; 30 days before Pesach) +04/19* Pesach (First Day of Passover; sabbatical) +04/20* Pesach (sabbatical) +04/21* Pesach (sabbatical) +04/26* Pesach (Last Day of Passover; 8th day of Pesach; sabbatical) +05/09* Yom HaAtzma'ut (Israel Independence Day) +05/23* Lag B'Omer (Commemoration of the Great Rebellion) +06/01* Yom Yerushalayim (Reunification of Jerusalem) +06/08* Shavuot (Festival of Weeks; 50 days after Pesach; sabbatical) +07/20* Fast of Shiv'a Asar B'Tammuz (Tzom Tammuz) (Romans breach Wall of Jerusalem; fast day) -08/01* Fast of Tish'a B'Av (Babylon/Rome destroys Holy Temple; fast day) -09/21* First Day of Rosh Hashanah (Jewish Lunar New Year; 5778 == 2017; +07/21* Fast of Tish'a B'Av (Babylon/Rome destroys Holy Temple; fast day) +09/09* First Day of Rosh Hashanah (Jewish Lunar New Year; 5778 == 2017; sabbatical) -09/21* Rosh Hashanah (sabbatical) -09/22* Fast of Gedalya (Murder of Gedalya and subsequent Exile; 1 day +09/09* Rosh Hashanah (sabbatical) +09/10* Fast of Gedalya (Murder of Gedalya and subsequent Exile; 1 day after Rosh Hashanah; fast day) -09/30* Yom Kippur (Day of Atonement; 9 days after Rosh Hashanah; +09/18* Yom Kippur (Day of Atonement; 9 days after Rosh Hashanah; sabbatical, fast day) -10/05* Succos (Festival of
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sat Jun 2 03:02:30 UTC 2018 Modified Files: src/share/mk: bsd.sys.mk Log Message: Move the RELRO and the SANITIZER stuff outside of the WARNS conditional! To generate a diff of this commit: cvs rdiff -u -r1.278 -r1.279 src/share/mk/bsd.sys.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.sys.mk diff -u src/share/mk/bsd.sys.mk:1.278 src/share/mk/bsd.sys.mk:1.279 --- src/share/mk/bsd.sys.mk:1.278 Fri Jun 1 21:41:49 2018 +++ src/share/mk/bsd.sys.mk Fri Jun 1 23:02:30 2018 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.sys.mk,v 1.278 2018/06/02 01:41:49 christos Exp $ +# $NetBSD: bsd.sys.mk,v 1.279 2018/06/02 03:02:30 christos Exp $ # # Build definitions used for NetBSD source tree builds. @@ -70,13 +70,6 @@ CFLAGS+= ${${ACTIVE_CC} == "gcc" :? -Wno CFLAGS+= ${${ACTIVE_CC} == "gcc" :? -Wa,--fatal-warnings :} .endif -.if ${MKRELRO:Uno} != "no" -LDFLAGS+= -Wl,-z,relro -.endif -.if ${MKRELRO:Uno} == "full" -LDFLAGS+= -Wl,-z,now -.endif - # Set linker warnings to be fatal # XXX no proper way to avoid "FOO is a patented algorithm" warnings # XXX on linking static libs @@ -89,12 +82,6 @@ LDFLAGS+= -Wl,--fatal-warnings .endif .endif -.if ${MKSANITIZER:Uno} == "yes" -CFLAGS+= -fsanitize=${USE_SANITIZER} -CXXFLAGS+= -fsanitize=${USE_SANITIZER} -LDFLAGS+= -fsanitize=${USE_SANITIZER} -.endif - LDFLAGS+= -Wl,--warn-shared-textrel .if ${WARNS} > 1 @@ -135,6 +122,20 @@ CFLAGS+= -Wno-maybe-uninitialized .endif .endif +.if ${MKRELRO:Uno} != "no" +LDFLAGS+= -Wl,-z,relro +.endif +.if ${MKRELRO:Uno} == "full" +LDFLAGS+= -Wl,-z,now +.endif + +.if ${MKSANITIZER:Uno} == "yes" +CFLAGS+= -fsanitize=${USE_SANITIZER} +CXXFLAGS+= -fsanitize=${USE_SANITIZER} +LDFLAGS+= -fsanitize=${USE_SANITIZER} +.endif + + CWARNFLAGS+= ${CWARNFLAGS.${ACTIVE_CC}} CPPFLAGS+= ${AUDIT:D-D__AUDIT__}
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sat Jun 2 03:02:30 UTC 2018 Modified Files: src/share/mk: bsd.sys.mk Log Message: Move the RELRO and the SANITIZER stuff outside of the WARNS conditional! To generate a diff of this commit: cvs rdiff -u -r1.278 -r1.279 src/share/mk/bsd.sys.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sat Jun 2 01:41:49 UTC 2018 Modified Files: src/share/mk: bsd.README bsd.own.mk bsd.sys.mk Log Message: Add build glue to build all the code with sanitizers: MKSANITIZE. To generate a diff of this commit: cvs rdiff -u -r1.372 -r1.373 src/share/mk/bsd.README cvs rdiff -u -r1.1062 -r1.1063 src/share/mk/bsd.own.mk cvs rdiff -u -r1.277 -r1.278 src/share/mk/bsd.sys.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.README diff -u src/share/mk/bsd.README:1.372 src/share/mk/bsd.README:1.373 --- src/share/mk/bsd.README:1.372 Thu May 31 01:27:46 2018 +++ src/share/mk/bsd.README Fri Jun 1 21:41:49 2018 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.372 2018/05/31 05:27:46 mrg Exp $ +# $NetBSD: bsd.README,v 1.373 2018/06/02 01:41:49 christos Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the make "include" files for the NetBSD @@ -387,6 +387,18 @@ MKREPRO If "yes", create reprodu result in the same build results. Default: no +MKSANITIZER if "yes", use the selected sanitizer to compile userland + programs as defined in USE_SANITIZER, which defaults to + "memory". Available sanitizers are: + address: A memory error detector (default) + thread: A data race detector + memory: An uninitializer read detector + undefined: An undefined behavior detector + dataflow: A general data flow analysis + cfi: A control flow detector + safe-stack: Protect against stack-based corruption + Only "address" is currently available for gcc(1) + MKSHARE If "no", act as "MKCATPAGES=no MKDOC=no MKHTML=no MKINFO=no MKMAN=no MKNLS=no". I.e, don't build catman pages, documentation, Info Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1062 src/share/mk/bsd.own.mk:1.1063 --- src/share/mk/bsd.own.mk:1.1062 Thu May 31 01:27:46 2018 +++ src/share/mk/bsd.own.mk Fri Jun 1 21:41:49 2018 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1062 2018/05/31 05:27:46 mrg Exp $ +# $NetBSD: bsd.own.mk,v 1.1063 2018/06/02 01:41:49 christos Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -939,7 +939,7 @@ dependall: .NOTMAIN realdepend .MAKE # .for var in \ NOCRYPTO NODOC NOHTML NOINFO NOLINKLIB NOLINT NOMAN NONLS NOOBJ NOPIC \ - NOPICINSTALL NOPROFILE NOSHARE NOSTATICLIB NODEBUGLIB + NOPICINSTALL NOPROFILE NOSHARE NOSTATICLIB NODEBUGLIB NOSANITIZER .if defined(${var}) MK${var:S/^NO//}:= no .endif @@ -1091,6 +1091,12 @@ _MKVARS.yes += MKGCCCMDS MKGCCCMDS?= ${MKGCC} # +# Sanitizers, only "address" and "undefined" are supported by gcc +# +MKSANITIZER?= no +USE_SANITIZER?= address + +# # Exceptions to the above: # Index: src/share/mk/bsd.sys.mk diff -u src/share/mk/bsd.sys.mk:1.277 src/share/mk/bsd.sys.mk:1.278 --- src/share/mk/bsd.sys.mk:1.277 Wed May 23 22:06:31 2018 +++ src/share/mk/bsd.sys.mk Fri Jun 1 21:41:49 2018 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.sys.mk,v 1.277 2018/05/24 02:06:31 christos Exp $ +# $NetBSD: bsd.sys.mk,v 1.278 2018/06/02 01:41:49 christos Exp $ # # Build definitions used for NetBSD source tree builds. @@ -89,6 +89,12 @@ LDFLAGS+= -Wl,--fatal-warnings .endif .endif +.if ${MKSANITIZER:Uno} == "yes" +CFLAGS+= -fsanitize=${USE_SANITIZER} +CXXFLAGS+= -fsanitize=${USE_SANITIZER} +LDFLAGS+= -fsanitize=${USE_SANITIZER} +.endif + LDFLAGS+= -Wl,--warn-shared-textrel .if ${WARNS} > 1
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Sat Jun 2 01:41:49 UTC 2018 Modified Files: src/share/mk: bsd.README bsd.own.mk bsd.sys.mk Log Message: Add build glue to build all the code with sanitizers: MKSANITIZE. To generate a diff of this commit: cvs rdiff -u -r1.372 -r1.373 src/share/mk/bsd.README cvs rdiff -u -r1.1062 -r1.1063 src/share/mk/bsd.own.mk cvs rdiff -u -r1.277 -r1.278 src/share/mk/bsd.sys.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/public-domain/xz/lib
Module Name:src Committed By: christos Date: Sat Jun 2 01:40:52 UTC 2018 Modified Files: src/external/public-domain/xz/lib: Makefile Log Message: Don't warn about undefined symbols when we sanitize, since we are not linking against the sanitizers. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/public-domain/xz/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/public-domain/xz/lib/Makefile diff -u src/external/public-domain/xz/lib/Makefile:1.8 src/external/public-domain/xz/lib/Makefile:1.9 --- src/external/public-domain/xz/lib/Makefile:1.8 Thu Jan 19 06:10:38 2017 +++ src/external/public-domain/xz/lib/Makefile Fri Jun 1 21:40:52 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2017/01/19 11:10:38 maya Exp $ +# $NetBSD: Makefile,v 1.9 2018/06/02 01:40:52 christos Exp $ .include @@ -15,7 +15,9 @@ INCS+= base.h bcj.h block.h check.h cont INCSDIR_lzma.h= /usr/include INCSDIR= /usr/include/lzma +.if ${MKSANITIZER} != "yes" LDFLAGS+= -Wl,-z,defs +.endif CPPFLAGS+= -I${XZSRCDIR}/src/liblzma/check CPPFLAGS+= -I${XZSRCDIR}/src/liblzma/common
CVS commit: src/external/public-domain/xz/lib
Module Name:src Committed By: christos Date: Sat Jun 2 01:40:52 UTC 2018 Modified Files: src/external/public-domain/xz/lib: Makefile Log Message: Don't warn about undefined symbols when we sanitize, since we are not linking against the sanitizers. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/public-domain/xz/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc/dist/gcc
Module Name:src Committed By: christos Date: Sat Jun 2 01:40:02 UTC 2018 Modified Files: src/external/gpl3/gcc/dist/gcc: gcc.c src/external/gpl3/gcc/dist/gcc/config: netbsd-elf.h Log Message: Don't add a dynamic dependency to the sanitizer shared libaries in other shared libraries. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gcc/dist/gcc/gcc.c cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/gcc.c diff -u src/external/gpl3/gcc/dist/gcc/gcc.c:1.16 src/external/gpl3/gcc/dist/gcc/gcc.c:1.17 --- src/external/gpl3/gcc/dist/gcc/gcc.c:1.16 Thu Feb 1 22:41:03 2018 +++ src/external/gpl3/gcc/dist/gcc/gcc.c Fri Jun 1 21:40:02 2018 @@ -964,20 +964,20 @@ proper position among the other output f /* Linker command line options for -fsanitize= early on the command line. */ #ifndef SANITIZER_EARLY_SPEC #define SANITIZER_EARLY_SPEC "\ -%{!nostdlib:%{!nodefaultlibs:%{%:sanitize(address):" LIBASAN_EARLY_SPEC "} \ +%{!shared:%{!nostdlib:%{!nodefaultlibs:%{%:sanitize(address):" LIBASAN_EARLY_SPEC "} \ %{%:sanitize(thread):" LIBTSAN_EARLY_SPEC "} \ -%{%:sanitize(leak):" LIBLSAN_EARLY_SPEC "}}}" +%{%:sanitize(leak):" LIBLSAN_EARLY_SPEC "" #endif /* Linker command line options for -fsanitize= late on the command line. */ #ifndef SANITIZER_SPEC #define SANITIZER_SPEC "\ -%{!nostdlib:%{!nodefaultlibs:%{%:sanitize(address):" LIBASAN_SPEC "\ +%{!shared:%{!nostdlib:%{!nodefaultlibs:%{%:sanitize(address):" LIBASAN_SPEC "\ %{static:%ecannot specify -static with -fsanitize=address}}\ %{%:sanitize(thread):" LIBTSAN_SPEC "\ %{static:%ecannot specify -static with -fsanitize=thread}}\ %{%:sanitize(undefined):" LIBUBSAN_SPEC "}\ -%{%:sanitize(leak):" LIBLSAN_SPEC "}}}" +%{%:sanitize(leak):" LIBLSAN_SPEC "" #endif #ifndef POST_LINK_SPEC Index: src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h diff -u src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h:1.13 src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h:1.14 --- src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h:1.13 Thu Feb 1 22:41:04 2018 +++ src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h Fri Jun 1 21:40:02 2018 @@ -90,9 +90,9 @@ along with GCC; see the file COPYING3. %(netbsd_link_ld_elf_so)} \ %{static:-static \ %{pie: %(netbsd_link_ld_elf_so)}}} \ - %{!nostdlib:%{!nodefaultlibs:\ + %{!shared:%{!nostdlib:%{!nodefaultlibs:\ %{%:sanitize(address): -lasan } \ - %{%:sanitize(undefined): -lubsan}}}" + %{%:sanitize(undefined): -lubsan" /* Provide the standard list of subtarget extra specs for NetBSD targets. */ #define NETBSD_SUBTARGET_EXTRA_SPECS \
CVS commit: src/external/gpl3/gcc/dist/gcc
Module Name:src Committed By: christos Date: Sat Jun 2 01:40:02 UTC 2018 Modified Files: src/external/gpl3/gcc/dist/gcc: gcc.c src/external/gpl3/gcc/dist/gcc/config: netbsd-elf.h Log Message: Don't add a dynamic dependency to the sanitizer shared libaries in other shared libraries. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gcc/dist/gcc/gcc.c cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc/dist/gcc/config/netbsd-elf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc/lib/libasan
Module Name:src Committed By: christos Date: Sat Jun 2 01:38:41 UTC 2018 Modified Files: src/external/gpl3/gcc/lib/libasan: Makefile Log Message: Don't sanitize the sanitizer. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/external/gpl3/gcc/lib/libasan/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc/lib/libasan
Module Name:src Committed By: christos Date: Sat Jun 2 01:38:41 UTC 2018 Modified Files: src/external/gpl3/gcc/lib/libasan: Makefile Log Message: Don't sanitize the sanitizer. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/external/gpl3/gcc/lib/libasan/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/lib/libasan/Makefile diff -u src/external/gpl3/gcc/lib/libasan/Makefile:1.22 src/external/gpl3/gcc/lib/libasan/Makefile:1.23 --- src/external/gpl3/gcc/lib/libasan/Makefile:1.22 Mon Apr 2 18:35:26 2018 +++ src/external/gpl3/gcc/lib/libasan/Makefile Fri Jun 1 21:38:41 2018 @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.22 2018/04/02 22:35:26 mrg Exp $ +# $NetBSD: Makefile,v 1.23 2018/06/02 01:38:41 christos Exp $ UNSUPPORTED_COMPILER.clang= # defined +NOSANITIZER=yes .include
CVS commit: src/external/cddl/osnet/dist/lib/libdtrace/common
Module Name:src Committed By: christos Date: Sat Jun 2 01:19:46 UTC 2018 Modified Files: src/external/cddl/osnet/dist/lib/libdtrace/common: dt_module.c Log Message: Use a constant to prevent dynamic array allocation which messes up SSP. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 \ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.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/cddl/osnet/dist/lib/libdtrace/common/dt_module.c diff -u src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c:1.16 src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c:1.17 --- src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c:1.16 Mon May 28 17:05:05 2018 +++ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c Fri Jun 1 21:19:46 2018 @@ -1268,8 +1268,8 @@ dt_module_update(dtrace_hdl_t *dtp, stru #ifdef __NetBSD__ mapbase = 0; if (ismod) { - int maxmodules = 512; - modstat_t modstat_buf[maxmodules], *ms; +#define MAXMODULES 512 + modstat_t modstat_buf[MAXMODULES], *ms; struct iovec iov = { modstat_buf, sizeof(modstat_buf) }; if (modctl(MODCTL_STAT, ) < 0) { @@ -1278,14 +1278,14 @@ dt_module_update(dtrace_hdl_t *dtp, stru return; } - for (i = 0; i < maxmodules; i++) { + for (i = 0; i < MAXMODULES; i++) { ms = _buf[i]; if (!strcmp(name, ms->ms_name)) { mapbase = ms->ms_addr; break; } } - if (i == maxmodules) { + if (i == MAXMODULES) { dt_dprintf("module %s not found\n", name); return; }
CVS commit: src/external/cddl/osnet/dist/lib/libdtrace/common
Module Name:src Committed By: christos Date: Sat Jun 2 01:19:46 UTC 2018 Modified Files: src/external/cddl/osnet/dist/lib/libdtrace/common: dt_module.c Log Message: Use a constant to prevent dynamic array allocation which messes up SSP. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 \ src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: jmcneill Date: Fri Jun 1 22:11:54 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: files.sunxi src/sys/dev/fdt: files.fdt Log Message: Move simplefb declaration to files.fdt To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/arch/arm/sunxi/files.sunxi cvs rdiff -u -r1.27 -r1.28 src/sys/dev/fdt/files.fdt 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/files.sunxi diff -u src/sys/arch/arm/sunxi/files.sunxi:1.56 src/sys/arch/arm/sunxi/files.sunxi:1.57 --- src/sys/arch/arm/sunxi/files.sunxi:1.56 Sun May 27 17:14:23 2018 +++ src/sys/arch/arm/sunxi/files.sunxi Fri Jun 1 22:11:54 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.sunxi,v 1.56 2018/05/27 17:14:23 jmcneill Exp $ +# $NetBSD: files.sunxi,v 1.57 2018/06/01 22:11:54 jmcneill Exp $ # # Configuration info for Allwinner sunxi family SoCs # @@ -224,10 +224,6 @@ device sunxii2s: auconv, mulaw, aurateco attach sunxii2s at fdt with sunxi_i2s file arch/arm/sunxi/sunxi_i2s.c sunxi_i2s -# Display controller -attach genfb at fdt with simplefb -file dev/fdt/simplefb.c simplefb - # A10/A20 LCD/TV timing controller (TCON) device sunxitcon attach sunxitcon at fdt with sunxi_tcon Index: src/sys/dev/fdt/files.fdt diff -u src/sys/dev/fdt/files.fdt:1.27 src/sys/dev/fdt/files.fdt:1.28 --- src/sys/dev/fdt/files.fdt:1.27 Sun May 27 17:14:23 2018 +++ src/sys/dev/fdt/files.fdt Fri Jun 1 22:11:53 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.fdt,v 1.27 2018/05/27 17:14:23 jmcneill Exp $ +# $NetBSD: files.fdt,v 1.28 2018/06/01 22:11:53 jmcneill Exp $ include "external/bsd/libfdt/conf/files.libfdt" @@ -80,6 +80,10 @@ file dev/fdt/ausoc.causoc define fdt_display_timing file dev/fdt/display_timing.c fdt_display_timing +# Display controller +attach genfb at fdt with simplefb +file dev/fdt/simplefb.c simplefb + # Designware APB UART attach com at fdt with dw_apb_uart file dev/fdt/dw_apb_uart.c dw_apb_uart
CVS commit: src/sys
Module Name:src Committed By: jmcneill Date: Fri Jun 1 22:11:54 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: files.sunxi src/sys/dev/fdt: files.fdt Log Message: Move simplefb declaration to files.fdt To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/arch/arm/sunxi/files.sunxi cvs rdiff -u -r1.27 -r1.28 src/sys/dev/fdt/files.fdt Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/lgpl3/gmp
Module Name:src Committed By: mrg Date: Fri Jun 1 21:46:19 UTC 2018 Modified Files: src/external/lgpl3/gmp: README Log Message: commit some note updates i wrote last august. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/lgpl3/gmp/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/lgpl3/gmp/README diff -u src/external/lgpl3/gmp/README:1.7 src/external/lgpl3/gmp/README:1.8 --- src/external/lgpl3/gmp/README:1.7 Thu Aug 17 23:00:38 2017 +++ src/external/lgpl3/gmp/README Fri Jun 1 21:46:18 2018 @@ -1,4 +1,4 @@ -$NetBSD: README,v 1.7 2017/08/17 23:00:38 mrg Exp $ +$NetBSD: README,v 1.8 2018/06/01 21:46:18 mrg Exp $ GMP in NetBSD. We need GMP for GCC >= 4.2. @@ -25,11 +25,11 @@ There are a few steps to this: some of these files might have src/obj references. in particular fix GMP_MPARAM_H_SUGGEST to start from ./mpn/... and make sure - we #define __GMP_CC to "gcc -std=gnu99", and make sure that + we #define __GMP_CC to just "gcc", and make sure that CONFIG_TOP_SRCDIR is not defined in config.m4 - XXX make this automatic - + the "Makefile.netbsd-gmp" has a "copy-files" target that performs + these tasks. - parse the ./configure output and note all created symlinks for mpn. these need to be converted into a new Makefile.inc. @@ -43,12 +43,15 @@ There are a few steps to this: used is m4 to parse, and we and create .s files from the .asm files that we then we feed into $CC. -The amd64 port is a good reference to compare. + this part needs to be automated, but requires that the first + part's ./configure output be stored for it. this is not done. -This mips64* ports need some minor hacks to the generated gmp*.h -files to fix their library builds for compat issues. See these -files in: - http://mail-index.netbsd.org/source-changes/2011/07/10/msg024467.html + it would be good to convert the Makefile.inc into a pair of + files -- srcs.mk generated from build-gmp-Makefile.inc.awk, and + the remaining static part of the Makefile.inc left with the + include of srcs.mk. + +The amd64 port is a good reference to compare. This is still a work in progress and methods used to build may be @@ -56,4 +59,4 @@ changed at any time. m...@netbsd.org -- 2011/06/22 +- 2017/08/22
CVS commit: src/external/lgpl3/gmp
Module Name:src Committed By: mrg Date: Fri Jun 1 21:46:19 UTC 2018 Modified Files: src/external/lgpl3/gmp: README Log Message: commit some note updates i wrote last august. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/lgpl3/gmp/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/footbridge
Module Name:src Committed By: mrg Date: Fri Jun 1 21:22:43 UTC 2018 Modified Files: src/sys/arch/arm/footbridge: footbridge_intr.h Log Message: include for the cddl proc.h vs our lwp.h. this fixes build issues with cats/netwinder since the zfs/dtrace update. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/footbridge/footbridge_intr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/footbridge/footbridge_intr.h diff -u src/sys/arch/arm/footbridge/footbridge_intr.h:1.19 src/sys/arch/arm/footbridge/footbridge_intr.h:1.20 --- src/sys/arch/arm/footbridge/footbridge_intr.h:1.19 Mon Jan 25 21:54:14 2016 +++ src/sys/arch/arm/footbridge/footbridge_intr.h Fri Jun 1 21:22:43 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: footbridge_intr.h,v 1.19 2016/01/25 21:54:14 christos Exp $ */ +/* $NetBSD: footbridge_intr.h,v 1.20 2018/06/01 21:22:43 mrg Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -46,6 +46,7 @@ typedef struct { #include #endif +#include #include #include
CVS commit: src/sys/arch/arm/footbridge
Module Name:src Committed By: mrg Date: Fri Jun 1 21:22:43 UTC 2018 Modified Files: src/sys/arch/arm/footbridge: footbridge_intr.h Log Message: include for the cddl proc.h vs our lwp.h. this fixes build issues with cats/netwinder since the zfs/dtrace update. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/footbridge/footbridge_intr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: nat Date: Fri Jun 1 19:19:54 UTC 2018 Modified Files: src/sys/dev/usb: if_urtwn.c Log Message: Fix support for 8192eu, notably TPLINK TL-WN823NV2, by using the right registers when setting receiver gain. Ok christos@. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/dev/usb/if_urtwn.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_urtwn.c diff -u src/sys/dev/usb/if_urtwn.c:1.57 src/sys/dev/usb/if_urtwn.c:1.58 --- src/sys/dev/usb/if_urtwn.c:1.57 Thu Feb 8 09:05:20 2018 +++ src/sys/dev/usb/if_urtwn.c Fri Jun 1 19:19:54 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urtwn.c,v 1.57 2018/02/08 09:05:20 dholland Exp $ */ +/* $NetBSD: if_urtwn.c,v 1.58 2018/06/01 19:19:54 nat Exp $ */ /* $OpenBSD: if_urtwn.c,v 1.42 2015/02/10 23:25:46 mpi Exp $ */ /*- @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.57 2018/02/08 09:05:20 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.58 2018/06/01 19:19:54 nat Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -3800,12 +3800,19 @@ urtwn_bb_init(struct urtwn_softc *sc) DELAY(1); urtwn_bb_write(sc, R92C_OFDM0_AGCCORE1(0), 0x69553420); DELAY(1); + } - if (ISSET(sc->chip, URTWN_CHIP_92EU)) { - urtwn_write_2(sc, R92C_AFE_CTRL3, urtwn_read_2(sc, - R92C_AFE_CTRL3)); - } - + if (ISSET(sc->chip, URTWN_CHIP_92EU)) { + crystalcap = sc->r88e_rom[0xb9]; + if (crystalcap == 0x00) + crystalcap = 0x20; + crystalcap &= 0x3f; + reg = urtwn_bb_read(sc, R92C_AFE_CTRL3); + urtwn_bb_write(sc, R92C_AFE_CTRL3, + RW(reg, R92C_AFE_XTAL_CTRL_ADDR, + crystalcap | crystalcap << 6)); + urtwn_write_4(sc, R92C_AFE_XTAL_CTRL, 0xf81fb); + } else if (ISSET(sc->chip, URTWN_CHIP_88E)) { crystalcap = sc->r88e_rom[0xb9]; if (crystalcap == 0xff) crystalcap = 0x20;
CVS commit: src/sys/dev/usb
Module Name:src Committed By: nat Date: Fri Jun 1 19:19:54 UTC 2018 Modified Files: src/sys/dev/usb: if_urtwn.c Log Message: Fix support for 8192eu, notably TPLINK TL-WN823NV2, by using the right registers when setting receiver gain. Ok christos@. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/dev/usb/if_urtwn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: nat Date: Fri Jun 1 19:17:04 UTC 2018 Modified Files: src/sys/dev/usb: if_urtwnreg.h Log Message: Add another register as found on 8192eu. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/dev/usb/if_urtwnreg.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_urtwnreg.h diff -u src/sys/dev/usb/if_urtwnreg.h:1.10 src/sys/dev/usb/if_urtwnreg.h:1.11 --- src/sys/dev/usb/if_urtwnreg.h:1.10 Wed Oct 12 03:23:29 2016 +++ src/sys/dev/usb/if_urtwnreg.h Fri Jun 1 19:17:04 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urtwnreg.h,v 1.10 2016/10/12 03:23:29 nat Exp $ */ +/* $NetBSD: if_urtwnreg.h,v 1.11 2018/06/01 19:17:04 nat Exp $ */ /* $OpenBSD: if_urtwnreg.h,v 1.3 2010/11/16 18:02:59 damien Exp $ */ /*- @@ -83,6 +83,7 @@ #define R92C_FSISR 0x054 #define R92C_HSIMR 0x058 #define R92C_HSISR 0x05c +#define R92C_PAD_CTRL 0x064 #define R92C_AFE_CTRL4 0x078 #define R92C_MCUFWDL 0x080 #define R92C_HMEBOX_EXT(idx) (0x088 + (idx) * 2)
CVS commit: src/sys/dev/usb
Module Name:src Committed By: nat Date: Fri Jun 1 19:17:04 UTC 2018 Modified Files: src/sys/dev/usb: if_urtwnreg.h Log Message: Add another register as found on 8192eu. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/dev/usb/if_urtwnreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/powerpc/include/oea
Module Name:src Committed By: macallan Date: Fri Jun 1 18:18:11 UTC 2018 Modified Files: src/sys/arch/powerpc/include/oea: spr.h Log Message: add functions to access SCOM registers on 970 CPUs To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/include/oea/spr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/include/oea/spr.h diff -u src/sys/arch/powerpc/include/oea/spr.h:1.5 src/sys/arch/powerpc/include/oea/spr.h:1.6 --- src/sys/arch/powerpc/include/oea/spr.h:1.5 Fri May 4 16:57:14 2018 +++ src/sys/arch/powerpc/include/oea/spr.h Fri Jun 1 18:18:11 2018 @@ -1,8 +1,17 @@ -/* $NetBSD: spr.h,v 1.5 2018/05/04 16:57:14 macallan Exp $ */ +/* $NetBSD: spr.h,v 1.6 2018/06/01 18:18:11 macallan Exp $ */ #ifndef _POWERPC_OEA_SPR_H_ #define _POWERPC_OEA_SPR_H_ +#if !defined(_LOCORE) && defined(_KERNEL) +#if defined(PPC_OEA64_BRIDGE) || defined (_ARCH_PPC64) + +#include +#include + +#endif +#endif + /* * Special Purpose Register declarations. * @@ -299,4 +308,50 @@ #define PMCN_TBLTRANS 3 /* TBL bit transitions */ #define PCMN_IDISPATCH 4 /* Instructions dispatched */ +#if !defined(_LOCORE) && defined(_KERNEL) + +#if defined(PPC_OEA64_BRIDGE) || defined (_ARCH_PPC64) + +static inline uint64_t +scom_read(register_t address) +{ + register_t msr; + uint64_t ret; + + msr = mfmsr(); + mtmsr(msr & ~PSL_EE); + __asm volatile("isync;"); + + mtspr(SPR_SCOMC, address | SCOMC_READ); + __asm volatile("isync;"); + + ret = mfspr(SPR_SCOMD); + mtmsr(msr); + __asm volatile("isync;"); + + return ret; +} + +static inline void +scom_write(register_t address, uint64_t data) +{ + register_t msr; + + msr = mfmsr(); + mtmsr(msr & ~PSL_EE); + __asm volatile("isync;"); + + mtspr(SPR_SCOMD, data); + __asm volatile("isync;"); + mtspr(SPR_SCOMC, address | SCOMC_WRITE); + __asm volatile("isync;"); + + mtmsr(msr); + __asm volatile("isync;"); +} + +#endif /* defined(PPC_OEA64_BRIDGE) || defined (_ARCH_PPC64) */ + +#endif /* !defined(_LOCORE) && defined(_KERNEL) */ + #endif /* !_POWERPC_SPR_H_ */
CVS commit: src/sys/arch/powerpc/include/oea
Module Name:src Committed By: macallan Date: Fri Jun 1 18:18:11 UTC 2018 Modified Files: src/sys/arch/powerpc/include/oea: spr.h Log Message: add functions to access SCOM registers on 970 CPUs To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/include/oea/spr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Fri Jun 1 18:14:33 UTC 2018 Modified Files: src/sys/dev/pci: svwsata.c Log Message: set ATACH_DMA_BEFORE_CMD To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/pci/svwsata.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/svwsata.c diff -u src/sys/dev/pci/svwsata.c:1.21 src/sys/dev/pci/svwsata.c:1.22 --- src/sys/dev/pci/svwsata.c:1.21 Fri Jun 1 16:12:01 2018 +++ src/sys/dev/pci/svwsata.c Fri Jun 1 18:14:33 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: svwsata.c,v 1.21 2018/06/01 16:12:01 macallan Exp $ */ +/* $NetBSD: svwsata.c,v 1.22 2018/06/01 18:14:33 macallan Exp $ */ /* * Copyright (c) 2005 Mark Kettenis @@ -17,7 +17,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: svwsata.c,v 1.21 2018/06/01 16:12:01 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svwsata.c,v 1.22 2018/06/01 18:14:33 macallan Exp $"); #include #include @@ -322,9 +322,8 @@ svwsata_mapchan(struct pciide_channel *c bus_space_write_4(sc->sc_ba5_st, sc->sc_ba5_sh, (wdc_cp->ch_channel << 8) + SVWSATA_SIM, 0); -#ifndef notyet cp->ata_channel.ch_flags |= ATACH_DMA_BEFORE_CMD; -#endif + wdcattach(wdc_cp); return;
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Fri Jun 1 18:14:33 UTC 2018 Modified Files: src/sys/dev/pci: svwsata.c Log Message: set ATACH_DMA_BEFORE_CMD To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/pci/svwsata.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ata
Module Name:src Committed By: macallan Date: Fri Jun 1 18:13:30 UTC 2018 Modified Files: src/sys/dev/ata: ata_wdc.c atavar.h Log Message: add a flag to start DMA before issuing commands - needed to work around a bug in some SATA chips which get confused if the disk responds too fast Mostly for K2 SATA / svwsata found in G5 Macs adapted from OpenBSD To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/sys/dev/ata/ata_wdc.c cvs rdiff -u -r1.96 -r1.97 src/sys/dev/ata/atavar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ata
Module Name:src Committed By: macallan Date: Fri Jun 1 18:13:30 UTC 2018 Modified Files: src/sys/dev/ata: ata_wdc.c atavar.h Log Message: add a flag to start DMA before issuing commands - needed to work around a bug in some SATA chips which get confused if the disk responds too fast Mostly for K2 SATA / svwsata found in G5 Macs adapted from OpenBSD To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/sys/dev/ata/ata_wdc.c cvs rdiff -u -r1.96 -r1.97 src/sys/dev/ata/atavar.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/ata/ata_wdc.c diff -u src/sys/dev/ata/ata_wdc.c:1.109 src/sys/dev/ata/ata_wdc.c:1.110 --- src/sys/dev/ata/ata_wdc.c:1.109 Tue Oct 17 18:52:50 2017 +++ src/sys/dev/ata/ata_wdc.c Fri Jun 1 18:13:30 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ata_wdc.c,v 1.109 2017/10/17 18:52:50 jdolecek Exp $ */ +/* $NetBSD: ata_wdc.c,v 1.110 2018/06/01 18:13:30 macallan Exp $ */ /* * Copyright (c) 1998, 2001, 2003 Manuel Bouyer. @@ -54,7 +54,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.109 2017/10/17 18:52:50 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.110 2018/06/01 18:13:30 macallan Exp $"); #include "opt_ata.h" #include "opt_wdc.h" @@ -455,6 +455,10 @@ _wdc_ata_bio_start(struct ata_channel *c case WDCWAIT_THR: return ATASTART_TH; } + /* start the DMA channel before */ + if ((chp->ch_flags & ATACH_DMA_BEFORE_CMD) != 0) +(*wdc->dma_start)(wdc->dma_arg, +chp->ch_channel, xfer->c_drive); if (ata_bio->flags & ATA_LBA48) { uint8_t device = WDSD_LBA; cmd = atacmd_to48(cmd); @@ -468,9 +472,10 @@ _wdc_ata_bio_start(struct ata_channel *c wdccommand(chp, xfer->c_drive, cmd, cyl, head, sect, count, features); } - /* start the DMA channel */ - (*wdc->dma_start)(wdc->dma_arg, - chp->ch_channel, xfer->c_drive); + /* start the DMA channel after */ + if ((chp->ch_flags & ATACH_DMA_BEFORE_CMD) == 0) +(*wdc->dma_start)(wdc->dma_arg, +chp->ch_channel, xfer->c_drive); chp->ch_flags |= ATACH_DMA_WAIT; /* start timeout machinery */ if ((xfer->c_flags & C_POLL) == 0) Index: src/sys/dev/ata/atavar.h diff -u src/sys/dev/ata/atavar.h:1.96 src/sys/dev/ata/atavar.h:1.97 --- src/sys/dev/ata/atavar.h:1.96 Mon Apr 16 22:33:28 2018 +++ src/sys/dev/ata/atavar.h Fri Jun 1 18:13:30 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: atavar.h,v 1.96 2018/04/16 22:33:28 jdolecek Exp $ */ +/* $NetBSD: atavar.h,v 1.97 2018/06/01 18:13:30 macallan Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. @@ -407,6 +407,7 @@ struct ata_channel { #define ATACH_TH_RESET 0x200 /* someone ask the thread to reset */ #define ATACH_TH_RESCAN 0x400 /* rescan requested */ #define ATACH_NCQ 0x800 /* channel executing NCQ commands */ +#define ATACH_DMA_BEFORE_CMD 0x1000 /* start DMA first */ /* for the reset callback */ int ch_reset_flags;
CVS commit: src/sys/arch/powerpc
Module Name:src Committed By: macallan Date: Fri Jun 1 18:06:58 UTC 2018 Modified Files: src/sys/arch/powerpc/conf: files.powerpc src/sys/arch/powerpc/oea: cpu_subr.c Added Files: src/sys/arch/powerpc/oea: cpu_speedctl.c Log Message: add clock speed control for 970MP CPUs To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.90 src/sys/arch/powerpc/conf/files.powerpc cvs rdiff -u -r0 -r1.1 src/sys/arch/powerpc/oea/cpu_speedctl.c cvs rdiff -u -r1.94 -r1.95 src/sys/arch/powerpc/oea/cpu_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/conf/files.powerpc diff -u src/sys/arch/powerpc/conf/files.powerpc:1.89 src/sys/arch/powerpc/conf/files.powerpc:1.90 --- src/sys/arch/powerpc/conf/files.powerpc:1.89 Tue Mar 4 08:25:11 2014 +++ src/sys/arch/powerpc/conf/files.powerpc Fri Jun 1 18:06:58 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.powerpc,v 1.89 2014/03/04 08:25:11 matt Exp $ +# $NetBSD: files.powerpc,v 1.90 2018/06/01 18:06:58 macallan Exp $ defflag opt_altivec.h ALTIVEC K_ALTIVEC PPC_HAVE_SPE defflag opt_openpic.h OPENPIC_DISTRIBUTE @@ -51,6 +51,7 @@ file arch/powerpc/ibm4xx/copyoutstr.c p defparam opt_oea.h EXTMAP_RANGES=20 file arch/powerpc/oea/altivec.c (ppc_oea |ppc_oea64 | ppc_oea64_bridge) & altivec file arch/powerpc/oea/cpu_subr.c ppc_oea | ppc_oea64 | ppc_oea64_bridge | ppc_oea601 +file arch/powerpc/oea/cpu_speedctl.c ppc_oea64 | ppc_oea64_bridge file arch/powerpc/oea/oea_machdep.c ppc_oea | ppc_oea64 | ppc_oea64_bridge | ppc_oea601 file arch/powerpc/oea/pmap.cppc_oea | ppc_oea601 file arch/powerpc/oea/pmap64.c ppc_oea64 Index: src/sys/arch/powerpc/oea/cpu_subr.c diff -u src/sys/arch/powerpc/oea/cpu_subr.c:1.94 src/sys/arch/powerpc/oea/cpu_subr.c:1.95 --- src/sys/arch/powerpc/oea/cpu_subr.c:1.94 Fri May 25 23:00:34 2018 +++ src/sys/arch/powerpc/oea/cpu_subr.c Fri Jun 1 18:06:58 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_subr.c,v 1.94 2018/05/25 23:00:34 macallan Exp $ */ +/* $NetBSD: cpu_subr.c,v 1.95 2018/06/01 18:06:58 macallan Exp $ */ /*- * Copyright (c) 2001 Matt Thomas. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.94 2018/05/25 23:00:34 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.95 2018/06/01 18:06:58 macallan Exp $"); #include "opt_ppcparam.h" #include "opt_ppccache.h" @@ -73,6 +73,8 @@ static void cpu_tau_setup(struct cpu_inf static void cpu_tau_refresh(struct sysmon_envsys *, envsys_data_t *); #endif +extern void init_scom_speedctl(void); + int cpu = -1; int ncpus; @@ -757,6 +759,11 @@ cpu_setup(device_t self, struct cpu_info cpu_tau_setup(ci); #endif +#if defined(PPC_OEA64) || defined(PPC_OEA64_BRIDGE) + if (vers == IBM970MP) + init_scom_speedctl(); +#endif + evcnt_attach_dynamic(>ci_ev_clock, EVCNT_TYPE_INTR, NULL, xname, "clock"); evcnt_attach_dynamic(>ci_ev_traps, EVCNT_TYPE_TRAP, @@ -1319,7 +1326,6 @@ cpu_spinup(device_t self, struct cpu_inf h->hatch_hid1 = mfspr(SPR_HID1); h->hatch_hid4 = mfspr(SPR_HID4); h->hatch_hid5 = mfspr(SPR_HID5); - printf("HIDs: %016llx %016llx\n", h->hatch_hid4, h->hatch_hid5); #endif __asm volatile ("mfsdr1 %0" : "=r"(h->hatch_sdr1)); Added files: Index: src/sys/arch/powerpc/oea/cpu_speedctl.c diff -u /dev/null src/sys/arch/powerpc/oea/cpu_speedctl.c:1.1 --- /dev/null Fri Jun 1 18:06:58 2018 +++ src/sys/arch/powerpc/oea/cpu_speedctl.c Fri Jun 1 18:06:58 2018 @@ -0,0 +1,183 @@ +/* $NetBSD: cpu_speedctl.c,v 1.1 2018/06/01 18:06:58 macallan Exp $ */ + +/*- + * Copyright (c) 2006 Michael Lorenz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
CVS commit: src/sys/arch/powerpc
Module Name:src Committed By: macallan Date: Fri Jun 1 18:06:58 UTC 2018 Modified Files: src/sys/arch/powerpc/conf: files.powerpc src/sys/arch/powerpc/oea: cpu_subr.c Added Files: src/sys/arch/powerpc/oea: cpu_speedctl.c Log Message: add clock speed control for 970MP CPUs To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.90 src/sys/arch/powerpc/conf/files.powerpc cvs rdiff -u -r0 -r1.1 src/sys/arch/powerpc/oea/cpu_speedctl.c cvs rdiff -u -r1.94 -r1.95 src/sys/arch/powerpc/oea/cpu_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: bouyer Date: Fri Jun 1 17:18:44 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sunxi_debe.c sunxi_display.h sunxi_hdmi.c sunxi_tcon.c Log Message: Defer display hardware reset to pipeline activation. This way, if we have a pipeline setup which we can't manage, the simple framebuffer will keep working. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/sunxi/sunxi_debe.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sunxi_display.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sunxi/sunxi_hdmi.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/sunxi/sunxi_tcon.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_debe.c diff -u src/sys/arch/arm/sunxi/sunxi_debe.c:1.8 src/sys/arch/arm/sunxi/sunxi_debe.c:1.9 --- src/sys/arch/arm/sunxi/sunxi_debe.c:1.8 Sat Apr 7 18:09:33 2018 +++ src/sys/arch/arm/sunxi/sunxi_debe.c Fri Jun 1 17:18:44 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_debe.c,v 1.8 2018/04/07 18:09:33 bouyer Exp $ */ +/* $NetBSD: sunxi_debe.c,v 1.9 2018/06/01 17:18:44 bouyer Exp $ */ /*- * Copyright (c) 2018 Manuel Bouyer @@ -38,7 +38,7 @@ #define SUNXI_DEBE_CURMAX 64 #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_debe.c,v 1.8 2018/04/07 18:09:33 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_debe.c,v 1.9 2018/06/01 17:18:44 bouyer Exp $"); #include #include @@ -77,6 +77,8 @@ struct sunxi_debe_softc { struct clk *sc_clk_mod; struct clk *sc_clk_ram; + struct fdtbus_reset *sc_rst; + bus_dma_segment_t sc_dmasegs[1]; bus_size_t sc_dmasize; bus_dmamap_t sc_dmamap; @@ -152,7 +154,6 @@ sunxi_debe_attach(device_t parent, devic const int phandle = faa->faa_phandle; bus_addr_t addr; bus_size_t size; - struct fdtbus_reset *rst; int error; sc->sc_dev = self; @@ -171,21 +172,6 @@ sunxi_debe_attach(device_t parent, devic sc->sc_clk_mod = fdtbus_clock_get(phandle, "mod"); sc->sc_clk_ram = fdtbus_clock_get(phandle, "ram"); - rst = fdtbus_reset_get_index(phandle, 0); - if (rst == NULL) { - aprint_error(": couldn't get reset\n"); - return; - } - if (fdtbus_reset_assert(rst) != 0) { - aprint_error(": couldn't assert reset\n"); - return; - } - delay(1); - if (fdtbus_reset_deassert(rst) != 0) { - aprint_error(": couldn't de-assert reset\n"); - return; - } - if (sc->sc_clk_ahb == NULL || sc->sc_clk_mod == NULL || sc->sc_clk_ram == NULL) { aprint_error(": couldn't get clocks\n"); @@ -196,20 +182,11 @@ sunxi_debe_attach(device_t parent, devic return; } - error = clk_set_rate(sc->sc_clk_mod, 3); - if (error) { - aprint_error("couln't set mod clock rate (%d)\n", error); - return; - } - - if (clk_enable(sc->sc_clk_ahb) != 0 || - clk_enable(sc->sc_clk_mod) != 0) { - aprint_error(": couldn't enable clocks\n"); + sc->sc_rst = fdtbus_reset_get_index(phandle, 0); + if (sc->sc_rst == NULL) { + aprint_error(": couldn't get reset\n"); return; } - if (clk_disable(sc->sc_clk_ram) != 0) { - aprint_error(": couldn't disable ram clock\n"); - } sc->sc_type = of_search_compatible(faa->faa_phandle, compat_data)->data; @@ -218,16 +195,8 @@ sunxi_debe_attach(device_t parent, devic fdtbus_get_string(phandle, "name")); - for (unsigned int reg = 0x800; reg < 0x1000; reg += 4) { - DEBE_WRITE(sc, reg, 0); - } - - DEBE_WRITE(sc, SUNXI_DEBE_MODCTL_REG, SUNXI_DEBE_MODCTL_EN); - sc->sc_dmasize = SUNXI_DEBE_VIDEOMEM; - DEBE_WRITE(sc, SUNXI_DEBE_HWC_PALETTE_TABLE, 0); - error = sunxi_debe_alloc_videomem(sc); if (error) { aprint_error_dev(sc->sc_dev, @@ -239,11 +208,61 @@ sunxi_debe_attach(device_t parent, devic sc->sc_ports.dp_ep_connect = sunxi_debe_ep_connect; sc->sc_ports.dp_ep_enable = sunxi_debe_ep_enable; fdt_ports_register(>sc_ports, self, phandle, EP_OTHER); +} - if (clk_disable(sc->sc_clk_ahb) != 0 || - clk_disable(sc->sc_clk_mod) != 0) { - aprint_error(": couldn't disable clocks\n"); - return; +static void +sunxi_debe_doreset(void) +{ + device_t dev; + struct sunxi_debe_softc *sc; + int error; + + for (int i = 0;;i++) { + dev = device_find_by_driver_unit("sunxidebe", i); + if (dev == NULL) + return; + sc = device_private(dev); + + if (fdtbus_reset_assert(sc->sc_rst) != 0) { + aprint_error_dev(dev, ": couldn't assert reset\n"); + return; + } + delay(1); + if (fdtbus_reset_deassert(sc->sc_rst) != 0) { + aprint_error_dev(dev, ": couldn't de-assert reset\n"); + return; + } + + + error = clk_set_rate(sc->sc_clk_mod, 3); + if (error) { + aprint_error_dev(dev, + "couln't set mod clock rate (%d)\n", error); + return; + } + + if (clk_enable(sc->sc_clk_ahb) != 0 || + clk_enable(sc->sc_clk_mod) != 0) { + aprint_error_dev(dev, ": couldn't enable clocks\n"); + return; + } + if (clk_disable(sc->sc_clk_ram) != 0) { + aprint_error_dev(dev, ": couldn't disable ram clock\n"); + }
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: bouyer Date: Fri Jun 1 17:18:44 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sunxi_debe.c sunxi_display.h sunxi_hdmi.c sunxi_tcon.c Log Message: Defer display hardware reset to pipeline activation. This way, if we have a pipeline setup which we can't manage, the simple framebuffer will keep working. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/sunxi/sunxi_debe.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sunxi_display.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sunxi/sunxi_hdmi.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/sunxi/sunxi_tcon.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/macppc/conf
Module Name:src Committed By: macallan Date: Fri Jun 1 16:13:08 UTC 2018 Modified Files: src/sys/arch/macppc/conf: POWERMAC_G5_11_2 Log Message: enable svwsata now that it works properly To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/macppc/conf/POWERMAC_G5_11_2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/macppc/conf/POWERMAC_G5_11_2 diff -u src/sys/arch/macppc/conf/POWERMAC_G5_11_2:1.11 src/sys/arch/macppc/conf/POWERMAC_G5_11_2:1.12 --- src/sys/arch/macppc/conf/POWERMAC_G5_11_2:1.11 Mon May 28 05:27:51 2018 +++ src/sys/arch/macppc/conf/POWERMAC_G5_11_2 Fri Jun 1 16:13:08 2018 @@ -154,7 +154,7 @@ wsmouse* at ums? genfb* at pci? dev ? function ? wdc* at pci? dev ? function ? # Kauai ATA -#svwsata* at pci? dev ? function ? # ServerWorks SATA controllers +svwsata* at pci? dev ? function ? # ServerWorks SATA controllers obio* at pci? dev ? function ? zsc* at obio? zstty* at zsc? channel ?
CVS commit: src/sys/arch/macppc/conf
Module Name:src Committed By: macallan Date: Fri Jun 1 16:13:08 UTC 2018 Modified Files: src/sys/arch/macppc/conf: POWERMAC_G5_11_2 Log Message: enable svwsata now that it works properly To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/macppc/conf/POWERMAC_G5_11_2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Fri Jun 1 16:12:01 UTC 2018 Modified Files: src/sys/dev/pci: svwsata.c Log Message: another G5-specific fix - do a 32bit read of the status register before checking for channel interrupts. No more interrupt storms. Adapted from FreeBSD To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/svwsata.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/svwsata.c diff -u src/sys/dev/pci/svwsata.c:1.20 src/sys/dev/pci/svwsata.c:1.21 --- src/sys/dev/pci/svwsata.c:1.20 Sat Oct 7 16:05:33 2017 +++ src/sys/dev/pci/svwsata.c Fri Jun 1 16:12:01 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: svwsata.c,v 1.20 2017/10/07 16:05:33 jdolecek Exp $ */ +/* $NetBSD: svwsata.c,v 1.21 2018/06/01 16:12:01 macallan Exp $ */ /* * Copyright (c) 2005 Mark Kettenis @@ -17,7 +17,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: svwsata.c,v 1.20 2017/10/07 16:05:33 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svwsata.c,v 1.21 2018/06/01 16:12:01 macallan Exp $"); #include #include @@ -39,6 +39,7 @@ static void svwsata_chip_map(struct pcii static void svwsata_mapreg_dma(struct pciide_softc *, const struct pci_attach_args *); static void svwsata_mapchan(struct pciide_channel *); +int svwsata_intr(void *); CFATTACH_DECL_NEW(svwsata, sizeof(struct pciide_softc), svwsata_match, svwsata_attach, pciide_detach, NULL); @@ -161,7 +162,7 @@ svwsata_chip_map(struct pciide_softc *sc } intrstr = pci_intr_string(pa->pa_pc, intrhandle, intrbuf, sizeof(intrbuf)); sc->sc_pci_ih = pci_intr_establish(pa->pa_pc, intrhandle, IPL_BIO, - pciide_pci_intr, sc); + svwsata_intr, sc); if (sc->sc_pci_ih != NULL) { aprint_normal_dev(sc->sc_wdcdev.sc_atac.atac_dev, "using %s for native-PCI interrupt\n", @@ -178,7 +179,6 @@ svwsata_chip_map(struct pciide_softc *sc interface = PCIIDE_INTERFACE_BUS_MASTER_DMA | PCIIDE_INTERFACE_PCI(0) | PCIIDE_INTERFACE_PCI(1); - for (channel = 0; channel < sc->sc_wdcdev.sc_atac.atac_nchannels; channel++) { cp = >pciide_channels[channel]; @@ -322,9 +322,62 @@ svwsata_mapchan(struct pciide_channel *c bus_space_write_4(sc->sc_ba5_st, sc->sc_ba5_sh, (wdc_cp->ch_channel << 8) + SVWSATA_SIM, 0); +#ifndef notyet + cp->ata_channel.ch_flags |= ATACH_DMA_BEFORE_CMD; +#endif wdcattach(wdc_cp); return; bad: cp->ata_channel.ch_flags |= ATACH_DISABLED; } + +int +svwsata_intr(void *arg) +{ + struct pciide_softc *sc = arg; + struct pciide_channel *cp; + struct ata_channel *wdc_cp; + struct wdc_regs *wdr; + int i, rv, crv; + uint8_t dmastat; + + rv = 0; + for (i = 0; i < sc->sc_wdcdev.sc_atac.atac_nchannels; i++) { + volatile uint32_t status; + cp = >pciide_channels[i]; + wdc_cp = >ata_channel; + wdr = CHAN_TO_WDC_REGS(wdc_cp); + + /* + * from FreeBSD's ata-serverworks.c: + * We need to do a 4-byte read on the status reg before the + * values will report correctly + */ + bus_space_read_4(wdr->cmd_iot, + wdr->cmd_iohs[wd_status], 0); + __USE(status); + + dmastat = bus_space_read_1(sc->sc_dma_iot, + cp->dma_iohs[IDEDMA_CTL], 0); + + /* If a compat channel skip. */ + if (cp->compat) + continue; + + /* if this channel not waiting for intr, skip */ + if ((wdc_cp->ch_flags & ATACH_IRQ_WAIT) == 0) { + continue; + } + crv = wdcintr(wdc_cp); + if ((crv == 0)) { + bus_space_write_1(sc->sc_dma_iot, + cp->dma_iohs[IDEDMA_CTL], 0, dmastat); + } + else if (crv == 1) + rv = 1; /* claim the intr */ + else if (rv == 0) /* crv should be -1 in this case */ + rv = crv; /* if we've done no better, take it */ + } + return (rv); +}
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Fri Jun 1 16:12:01 UTC 2018 Modified Files: src/sys/dev/pci: svwsata.c Log Message: another G5-specific fix - do a 32bit read of the status register before checking for channel interrupts. No more interrupt storms. Adapted from FreeBSD To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/svwsata.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/gpio
Module Name:src Committed By: thorpej Date: Fri Jun 1 13:42:14 UTC 2018 Modified Files: src/sys/dev/gpio: gpiopps.c Log Message: Fix a paste-o that prevented the 2-pin interrupt messages from being printed correctly (but no other harmful effects). Pointed out by Brad Spencer. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/gpio/gpiopps.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/gpio
Module Name:src Committed By: thorpej Date: Fri Jun 1 13:42:14 UTC 2018 Modified Files: src/sys/dev/gpio: gpiopps.c Log Message: Fix a paste-o that prevented the 2-pin interrupt messages from being printed correctly (but no other harmful effects). Pointed out by Brad Spencer. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/gpio/gpiopps.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/gpio/gpiopps.c diff -u src/sys/dev/gpio/gpiopps.c:1.1 src/sys/dev/gpio/gpiopps.c:1.2 --- src/sys/dev/gpio/gpiopps.c:1.1 Sun May 20 14:08:33 2018 +++ src/sys/dev/gpio/gpiopps.c Fri Jun 1 13:42:14 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: gpiopps.c,v 1.1 2018/05/20 14:08:33 thorpej Exp $ */ +/* $NetBSD: gpiopps.c,v 1.2 2018/06/01 13:42:14 thorpej Exp $ */ /* * Copyright (c) 2016 Brad Spencer @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gpiopps.c,v 1.1 2018/05/20 14:08:33 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gpiopps.c,v 1.2 2018/06/01 13:42:14 thorpej Exp $"); /* * GPIO interface to the pps subsystem for ntp support. @@ -213,9 +213,9 @@ gpiopps_attach(device_t parent, device_t return; } sc->sc_intrs[1].sc_irqmode = clear_edge; - if (!gpio_intr_str(sc->sc_gpio, >sc_map, 0, - sc->sc_intrs[0].sc_irqmode, - sc->sc_intrs[0].sc_intrstr, + if (!gpio_intr_str(sc->sc_gpio, >sc_map, 1, + sc->sc_intrs[1].sc_irqmode, + sc->sc_intrs[1].sc_intrstr, sizeof(sc->sc_intrs[1].sc_intrstr))) { aprint_error_dev(self, "failed to decode CLEAR interrupt\n");
Re: CVS commit: src/sys/arch/usermode/dev
In article <20180601072615.462e4f...@cvs.netbsd.org>, Reinoud Zandijk wrote: >-=-=-=-=-=- > >Module Name: src >Committed By: reinoud >Date: Fri Jun 1 07:26:15 UTC 2018 > >Modified Files: > src/sys/arch/usermode/dev: cpu.c > >Log Message: >Pass the address of the array, this fixes issues with i386 compilation If you remove & from both is probably better (if they are both arrays) :-) christos
Re: CVS commit: src/sys/arch/usermode/conf
In article <20180601072234.060dcf...@cvs.netbsd.org>, Reinoud Zandijk wrote: >-=-=-=-=-=- > >Module Name: src >Committed By: reinoud >Date: Fri Jun 1 07:22:33 UTC 2018 > >Modified Files: > src/sys/arch/usermode/conf: Makefile.usermode > >Log Message: >Compile NetBSD/userland without CTF for the linker doesn't allow for a single >file compiled without CTF That should be probably done with NOCTF=, but really you probably have a partial build without CTF that makes it bitch. If you start clean, it should not happen. christos
Re: CVS commit: src/external/gpl2/gmake/dist
Le 2018-06-01 11:05, Kamil Rytarowski a écrit : On 01.06.2018 10:33, Frédéric Fauberteau wrote: Le 2018-05-01 03:23, Kamil Rytarowski a écrit : On 01.05.2018 02:55, Christos Zoulas wrote: In article , Kimihiro Nonaka wrote: 2018-05-01 8:53 GMT+09:00 Kamil Rytarowski : This is polling GPLv3 code into GPLv2 gmake - these licenses are incompatible. You mean pulling here? There is no pulling GPLv3 code unless the code is copied from GPLv3. It was cherry-picked from GPLv3+. Thanks to the following patch, I can cross-build a toolset on my Arch box. When I look at the make.git tree: http://git.savannah.gnu.org/cgit/make.git/tree/ I don't see any 'configure' file. In which way this patch breaks the license? Index: configure === RCS file: /cvsroot/src/external/gpl2/gmake/dist/configure,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 configure --- configure 18 Aug 2014 06:46:54 - 1.1.1.1 +++ configure 1 Jun 2018 08:05:31 - @@ -13619,10 +13619,9 @@ #include #include -#define GLOB_INTERFACE_VERSION 1 #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 # include -# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION +# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 gnu glob # endif #endif http://git.savannah.gnu.org/cgit/make.git/tree/configure.ac#n6 # GNU Make is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; either version 3 of the License, or (at your option) any later # version. GPL2 and GPL3 are incompatible for some reasons.. we could just upgrade gmake to GPLv3. It's used for building GCC only. I am not sure to understand correctly. If we modify GNU Make 3.81 (by applying a patch) that is distributed in our sources, we redistribute it under the terms of GPLv2. No? Do you mean that this line: # if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 is GPLv3 licensed? And therefore we should redistribute the whole GNU Make code under the terms of GPLv3? This line can be found here: https://git.busybox.net/buildroot/tree/package/make/0001-configure.ac-Support-GLIBC-glob-interface-version-2.patch?id=157231405d219e484aa3829acff23569f6a60d00 in a project that is GPLv2 distributed. I don't want to be too many insistent. Could we imagine putting GNU Make 4.2.1 under external/gpl3/gmake/dist?
CVS commit: src/sys/dev/pci
Module Name:src Committed By: maxv Date: Fri Jun 1 09:34:39 UTC 2018 Modified Files: src/sys/dev/pci: if_age.c if_alc.c if_ena.c Log Message: Fix M_PKTHDR use in if_alc, if_age and if_ena. if_alc and if_age always put in _rxhead a M_PKTHDR-flagged mbuf, so the flag must always be present. Instead of manually adding the flag, add a KASSERT to ensure it is already there. If it weren't, there would be memory corruptions. Same in if_ena, but this one does not compile so we don't really care. Also, use m_remove_pkthdr to remove the flag, instead of doing it manually. This ensures the tags get freed (even though these drivers don't seem to be using mtags). To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pci/if_age.c cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/if_alc.c cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/if_ena.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_age.c diff -u src/sys/dev/pci/if_age.c:1.51 src/sys/dev/pci/if_age.c:1.52 --- src/sys/dev/pci/if_age.c:1.51 Tue Sep 26 07:42:06 2017 +++ src/sys/dev/pci/if_age.c Fri Jun 1 09:34:39 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_age.c,v 1.51 2017/09/26 07:42:06 knakahara Exp $ */ +/* $NetBSD: if_age.c,v 1.52 2018/06/01 09:34:39 maxv Exp $ */ /* $OpenBSD: if_age.c,v 1.1 2009/01/16 05:00:34 kevlo Exp $ */ /*- @@ -31,7 +31,7 @@ /* Driver for Attansic Technology Corp. L1 Gigabit Ethernet. */ #include -__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.51 2017/09/26 07:42:06 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.52 2018/06/01 09:34:39 maxv Exp $"); #include "vlan.h" @@ -1430,7 +1430,7 @@ age_rxeof(struct age_softc *sc, struct r sc->age_cdata.age_rxhead = mp; sc->age_cdata.age_rxtail = mp; } else { - mp->m_flags &= ~M_PKTHDR; + m_remove_pkthdr(mp); sc->age_cdata.age_rxprev_tail = sc->age_cdata.age_rxtail; sc->age_cdata.age_rxtail->m_next = mp; @@ -1459,7 +1459,7 @@ age_rxeof(struct age_softc *sc, struct r } m = sc->age_cdata.age_rxhead; - m->m_flags |= M_PKTHDR; + KASSERT(m->m_flags & M_PKTHDR); m_set_rcvif(m, ifp); m->m_pkthdr.len = sc->age_cdata.age_rxlen; /* Set the first mbuf length. */ Index: src/sys/dev/pci/if_alc.c diff -u src/sys/dev/pci/if_alc.c:1.25 src/sys/dev/pci/if_alc.c:1.26 --- src/sys/dev/pci/if_alc.c:1.25 Tue Sep 26 07:42:06 2017 +++ src/sys/dev/pci/if_alc.c Fri Jun 1 09:34:39 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_alc.c,v 1.25 2017/09/26 07:42:06 knakahara Exp $ */ +/* $NetBSD: if_alc.c,v 1.26 2018/06/01 09:34:39 maxv Exp $ */ /* $OpenBSD: if_alc.c,v 1.1 2009/08/08 09:31:13 kevlo Exp $ */ /*- * Copyright (c) 2009, Pyun YongHyeon @@ -2537,7 +2537,7 @@ alc_rxeof(struct alc_softc *sc, struct r sc->alc_cdata.alc_rxhead = mp; sc->alc_cdata.alc_rxtail = mp; } else { - mp->m_flags &= ~M_PKTHDR; + m_remove_pkthdr(mp); sc->alc_cdata.alc_rxprev_tail = sc->alc_cdata.alc_rxtail; sc->alc_cdata.alc_rxtail->m_next = mp; @@ -2547,7 +2547,7 @@ alc_rxeof(struct alc_softc *sc, struct r if (count == nsegs - 1) { /* Last desc. for this frame. */ m = sc->alc_cdata.alc_rxhead; - m->m_flags |= M_PKTHDR; + KASSERT(m->m_flags & M_PKTHDR); /* * It seems that L1C/L2C controller has no way * to tell hardware to strip CRC bytes. Index: src/sys/dev/pci/if_ena.c diff -u src/sys/dev/pci/if_ena.c:1.2 src/sys/dev/pci/if_ena.c:1.3 --- src/sys/dev/pci/if_ena.c:1.2 Sat May 19 09:32:55 2018 +++ src/sys/dev/pci/if_ena.c Fri Jun 1 09:34:39 2018 @@ -31,7 +31,7 @@ #if 0 __FBSDID("$FreeBSD: head/sys/dev/ena/ena.c 333456 2018-05-10 09:37:54Z mw $"); #endif -__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.2 2018/05/19 09:32:55 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ena.c,v 1.3 2018/06/01 09:34:39 maxv Exp $"); #include #include @@ -1441,7 +1441,7 @@ ena_rx_mbuf(struct ena_ring *rx_ring, st rx_info, rx_info->mbuf, (uintmax_t)rx_info->ena_buf.paddr); mbuf = rx_info->mbuf; - mbuf->m_flags |= M_PKTHDR; + KASSERT(mbuf->m_flags & M_PKTHDR); mbuf->m_pkthdr.len = len; mbuf->m_len = len; mbuf->m_pkthdr.rcvif = rx_ring->que->adapter->ifp;
CVS commit: src/sys/dev/pci
Module Name:src Committed By: maxv Date: Fri Jun 1 09:34:39 UTC 2018 Modified Files: src/sys/dev/pci: if_age.c if_alc.c if_ena.c Log Message: Fix M_PKTHDR use in if_alc, if_age and if_ena. if_alc and if_age always put in _rxhead a M_PKTHDR-flagged mbuf, so the flag must always be present. Instead of manually adding the flag, add a KASSERT to ensure it is already there. If it weren't, there would be memory corruptions. Same in if_ena, but this one does not compile so we don't really care. Also, use m_remove_pkthdr to remove the flag, instead of doing it manually. This ensures the tags get freed (even though these drivers don't seem to be using mtags). To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pci/if_age.c cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/if_alc.c cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/if_ena.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: maxv Date: Fri Jun 1 09:10:52 UTC 2018 Modified Files: src/sys/dev/ic: rtl8169.c Log Message: Use m_remove_pkthdr() instead of "&= ~M_PKTHDR", to ensure the tags get freed. Several other drivers have this problem it seems... To generate a diff of this commit: cvs rdiff -u -r1.152 -r1.153 src/sys/dev/ic/rtl8169.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/rtl8169.c diff -u src/sys/dev/ic/rtl8169.c:1.152 src/sys/dev/ic/rtl8169.c:1.153 --- src/sys/dev/ic/rtl8169.c:1.152 Tue Sep 26 07:42:06 2017 +++ src/sys/dev/ic/rtl8169.c Fri Jun 1 09:10:52 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: rtl8169.c,v 1.152 2017/09/26 07:42:06 knakahara Exp $ */ +/* $NetBSD: rtl8169.c,v 1.153 2018/06/01 09:10:52 maxv Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.152 2017/09/26 07:42:06 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.153 2018/06/01 09:10:52 maxv Exp $"); /* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */ /* @@ -1189,7 +1189,7 @@ re_rxeof(struct rtk_softc *sc) if (sc->re_head == NULL) sc->re_head = sc->re_tail = m; else { -m->m_flags &= ~M_PKTHDR; +m_remove_pkthdr(m); sc->re_tail->m_next = m; sc->re_tail = m; } @@ -1276,7 +1276,7 @@ re_rxeof(struct rtk_softc *sc) m_freem(m); } else { m->m_len -= ETHER_CRC_LEN; -m->m_flags &= ~M_PKTHDR; +m_remove_pkthdr(m); sc->re_tail->m_next = m; } m = sc->re_head;
CVS commit: src/sys/dev/ic
Module Name:src Committed By: maxv Date: Fri Jun 1 09:10:52 UTC 2018 Modified Files: src/sys/dev/ic: rtl8169.c Log Message: Use m_remove_pkthdr() instead of "&= ~M_PKTHDR", to ensure the tags get freed. Several other drivers have this problem it seems... To generate a diff of this commit: cvs rdiff -u -r1.152 -r1.153 src/sys/dev/ic/rtl8169.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/external/gpl2/gmake/dist
On 01.06.2018 10:33, Frédéric Fauberteau wrote: > Le 2018-05-01 03:23, Kamil Rytarowski a écrit : >> On 01.05.2018 02:55, Christos Zoulas wrote: >>> In article >>> , >>> Kimihiro Nonaka wrote: 2018-05-01 8:53 GMT+09:00 Kamil Rytarowski : > This is polling GPLv3 code into GPLv2 gmake - these licenses are > incompatible. >>> >>> You mean pulling here? There is no pulling GPLv3 code unless the code >>> is copied from GPLv3. >>> >> >> It was cherry-picked from GPLv3+. > > Thanks to the following patch, I can cross-build a toolset on my Arch > box. When I look at the make.git tree: > http://git.savannah.gnu.org/cgit/make.git/tree/ > I don't see any 'configure' file. In which way this patch breaks the > license? > > Index: configure > === > RCS file: /cvsroot/src/external/gpl2/gmake/dist/configure,v > retrieving revision 1.1.1.1 > diff -u -r1.1.1.1 configure > --- configure 18 Aug 2014 06:46:54 - 1.1.1.1 > +++ configure 1 Jun 2018 08:05:31 - > @@ -13619,10 +13619,9 @@ > #include > #include > > -#define GLOB_INTERFACE_VERSION 1 > #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 > # include > -# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION > +# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 > gnu glob > # endif > #endif http://git.savannah.gnu.org/cgit/make.git/tree/configure.ac#n6 # GNU Make is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; either version 3 of the License, or (at your option) any later # version. GPL2 and GPL3 are incompatible for some reasons.. we could just upgrade gmake to GPLv3. It's used for building GCC only. signature.asc Description: OpenPGP digital signature
CVS commit: src/sys
Module Name:src Committed By: maxv Date: Fri Jun 1 08:56:01 UTC 2018 Modified Files: src/sys/arch/powerpc/booke/dev: pq3etsec.c src/sys/arch/x86/pci: if_vmx.c src/sys/dev/marvell: if_mvxpe.c src/sys/dev/pci: if_jme.c if_wm.c src/sys/netinet6: in6_offload.c ip6_output.c src/sys/sys: mbuf.h Log Message: Rename M_CSUM_DATA_IPv6_HL -> M_CSUM_DATA_IPv6_IPHL M_CSUM_DATA_IPv6_HL_SET -> M_CSUM_DATA_IPv6_SET Reduces the diff against IPv4. Also, clarify the definitions. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/powerpc/booke/dev/pq3etsec.c cvs rdiff -u -r1.24 -r1.25 src/sys/arch/x86/pci/if_vmx.c cvs rdiff -u -r1.17 -r1.18 src/sys/dev/marvell/if_mvxpe.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/pci/if_jme.c cvs rdiff -u -r1.580 -r1.581 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.7 -r1.8 src/sys/netinet6/in6_offload.c cvs rdiff -u -r1.210 -r1.211 src/sys/netinet6/ip6_output.c cvs rdiff -u -r1.206 -r1.207 src/sys/sys/mbuf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/booke/dev/pq3etsec.c diff -u src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.32 src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.33 --- src/sys/arch/powerpc/booke/dev/pq3etsec.c:1.32 Mon Oct 23 09:23:48 2017 +++ src/sys/arch/powerpc/booke/dev/pq3etsec.c Fri Jun 1 08:56:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pq3etsec.c,v 1.32 2017/10/23 09:23:48 msaitoh Exp $ */ +/* $NetBSD: pq3etsec.c,v 1.33 2018/06/01 08:56:00 maxv Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -41,7 +41,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.32 2017/10/23 09:23:48 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.33 2018/06/01 08:56:00 maxv Exp $"); #include #include @@ -2063,7 +2063,7 @@ pq3etsec_tx_offload( if (csum_flags & M_CSUM_IPv4) fcb.txfcb_l4os = M_CSUM_DATA_IPv4_IPHL(m->m_pkthdr.csum_data); else - fcb.txfcb_l4os = M_CSUM_DATA_IPv6_HL(m->m_pkthdr.csum_data); + fcb.txfcb_l4os = M_CSUM_DATA_IPv6_IPHL(m->m_pkthdr.csum_data); fcb.txfcb_l3os = ETHER_HDR_LEN; fcb.txfcb_phcs = 0; fcb.txfcb_vlctl = vtag; Index: src/sys/arch/x86/pci/if_vmx.c diff -u src/sys/arch/x86/pci/if_vmx.c:1.24 src/sys/arch/x86/pci/if_vmx.c:1.25 --- src/sys/arch/x86/pci/if_vmx.c:1.24 Mon Apr 16 09:12:52 2018 +++ src/sys/arch/x86/pci/if_vmx.c Fri Jun 1 08:56:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vmx.c,v 1.24 2018/04/16 09:12:52 nonaka Exp $ */ +/* $NetBSD: if_vmx.c,v 1.25 2018/06/01 08:56:00 maxv Exp $ */ /* $OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.24 2018/04/16 09:12:52 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.25 2018/06/01 08:56:00 maxv Exp $"); #include #include @@ -2536,7 +2536,7 @@ vmxnet3_txq_offload_ctx(struct vmxnet3_t iphl = M_CSUM_DATA_IPv4_IPHL(m->m_pkthdr.csum_data); v4 = true; } else { - iphl = M_CSUM_DATA_IPv6_HL(m->m_pkthdr.csum_data); + iphl = M_CSUM_DATA_IPv6_IPHL(m->m_pkthdr.csum_data); v4 = false; } *start = offset + iphl; Index: src/sys/dev/marvell/if_mvxpe.c diff -u src/sys/dev/marvell/if_mvxpe.c:1.17 src/sys/dev/marvell/if_mvxpe.c:1.18 --- src/sys/dev/marvell/if_mvxpe.c:1.17 Thu Dec 15 09:28:05 2016 +++ src/sys/dev/marvell/if_mvxpe.c Fri Jun 1 08:56:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_mvxpe.c,v 1.17 2016/12/15 09:28:05 ozaki-r Exp $ */ +/* $NetBSD: if_mvxpe.c,v 1.18 2018/06/01 08:56:00 maxv Exp $ */ /* * Copyright (c) 2015 Internet Initiative Japan Inc. * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: if_mvxpe.c,v 1.17 2016/12/15 09:28:05 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_mvxpe.c,v 1.18 2018/06/01 08:56:00 maxv Exp $"); #include "opt_multiprocessor.h" @@ -2239,7 +2239,7 @@ mvxpe_tx_set_csumflag(struct ifnet *ifp, t->command |= MVXPE_TX_CMD_L3_IP4; } else if (csum_flags & (M_CSUM_TCPv6|M_CSUM_UDPv6)) { - iphl = M_CSUM_DATA_IPv6_HL(m->m_pkthdr.csum_data); + iphl = M_CSUM_DATA_IPv6_IPHL(m->m_pkthdr.csum_data); t->command |= MVXPE_TX_CMD_L3_IP6; } else { Index: src/sys/dev/pci/if_jme.c diff -u src/sys/dev/pci/if_jme.c:1.32 src/sys/dev/pci/if_jme.c:1.33 --- src/sys/dev/pci/if_jme.c:1.32 Tue Sep 26 07:42:06 2017 +++ src/sys/dev/pci/if_jme.c Fri Jun 1 08:56:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_jme.c,v 1.32 2017/09/26 07:42:06 knakahara Exp $ */ +/* $NetBSD: if_jme.c,v 1.33 2018/06/01 08:56:00 maxv Exp $ */ /* * Copyright (c) 2008 Manuel Bouyer. All rights reserved. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_jme.c,v 1.32 2017/09/26 07:42:06 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_jme.c,v 1.33 2018/06/01 08:56:00 maxv Exp $"); #include @@ -1361,7 +1361,7 @@
CVS commit: src/sys
Module Name:src Committed By: maxv Date: Fri Jun 1 08:56:01 UTC 2018 Modified Files: src/sys/arch/powerpc/booke/dev: pq3etsec.c src/sys/arch/x86/pci: if_vmx.c src/sys/dev/marvell: if_mvxpe.c src/sys/dev/pci: if_jme.c if_wm.c src/sys/netinet6: in6_offload.c ip6_output.c src/sys/sys: mbuf.h Log Message: Rename M_CSUM_DATA_IPv6_HL -> M_CSUM_DATA_IPv6_IPHL M_CSUM_DATA_IPv6_HL_SET -> M_CSUM_DATA_IPv6_SET Reduces the diff against IPv4. Also, clarify the definitions. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/powerpc/booke/dev/pq3etsec.c cvs rdiff -u -r1.24 -r1.25 src/sys/arch/x86/pci/if_vmx.c cvs rdiff -u -r1.17 -r1.18 src/sys/dev/marvell/if_mvxpe.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/pci/if_jme.c cvs rdiff -u -r1.580 -r1.581 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.7 -r1.8 src/sys/netinet6/in6_offload.c cvs rdiff -u -r1.210 -r1.211 src/sys/netinet6/ip6_output.c cvs rdiff -u -r1.206 -r1.207 src/sys/sys/mbuf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/external/gpl2/gmake/dist
Le 2018-05-01 03:23, Kamil Rytarowski a écrit : On 01.05.2018 02:55, Christos Zoulas wrote: In article , Kimihiro Nonaka wrote: 2018-05-01 8:53 GMT+09:00 Kamil Rytarowski : This is polling GPLv3 code into GPLv2 gmake - these licenses are incompatible. You mean pulling here? There is no pulling GPLv3 code unless the code is copied from GPLv3. It was cherry-picked from GPLv3+. Thanks to the following patch, I can cross-build a toolset on my Arch box. When I look at the make.git tree: http://git.savannah.gnu.org/cgit/make.git/tree/ I don't see any 'configure' file. In which way this patch breaks the license? Index: configure === RCS file: /cvsroot/src/external/gpl2/gmake/dist/configure,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 configure --- configure 18 Aug 2014 06:46:54 - 1.1.1.1 +++ configure 1 Jun 2018 08:05:31 - @@ -13619,10 +13619,9 @@ #include #include -#define GLOB_INTERFACE_VERSION 1 #if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1 # include -# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION +# if _GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 gnu glob # endif #endif
CVS commit: src/sys/arch/usermode
Module Name:src Committed By: reinoud Date: Fri Jun 1 08:04:57 UTC 2018 Modified Files: src/sys/arch/usermode/include: thunk.h src/sys/arch/usermode/usermode: thunk.c Log Message: Pretend we already included the To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/arch/usermode/include/thunk.h cvs rdiff -u -r1.88 -r1.89 src/sys/arch/usermode/usermode/thunk.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/usermode/include/thunk.h diff -u src/sys/arch/usermode/include/thunk.h:1.63 src/sys/arch/usermode/include/thunk.h:1.64 --- src/sys/arch/usermode/include/thunk.h:1.63 Fri May 18 20:24:57 2018 +++ src/sys/arch/usermode/include/thunk.h Fri Jun 1 08:04:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: thunk.h,v 1.63 2018/05/18 20:24:57 reinoud Exp $ */ +/* $NetBSD: thunk.h,v 1.64 2018/06/01 08:04:57 reinoud Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill @@ -29,7 +29,7 @@ #ifndef _ARCH_USERMODE_INCLUDE_THUNK_H #define _ARCH_USERMODE_INCLUDE_THUNK_H -#include "types.h" +#include #include #include #include Index: src/sys/arch/usermode/usermode/thunk.c diff -u src/sys/arch/usermode/usermode/thunk.c:1.88 src/sys/arch/usermode/usermode/thunk.c:1.89 --- src/sys/arch/usermode/usermode/thunk.c:1.88 Fri May 18 05:51:23 2018 +++ src/sys/arch/usermode/usermode/thunk.c Fri Jun 1 08:04:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: thunk.c,v 1.88 2018/05/18 05:51:23 reinoud Exp $ */ +/* $NetBSD: thunk.c,v 1.89 2018/06/01 08:04:57 reinoud Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill @@ -28,9 +28,13 @@ #include #ifdef __NetBSD__ -__RCSID("$NetBSD: thunk.c,v 1.88 2018/05/18 05:51:23 reinoud Exp $"); +__RCSID("$NetBSD: thunk.c,v 1.89 2018/06/01 08:04:57 reinoud Exp $"); #endif +#define _KMEMUSER +#define _X86_64_MACHTYPES_H_ +#define _I386_MACHTYPES_H_ + #include "../include/types.h" #include #include @@ -42,7 +46,6 @@ __RCSID("$NetBSD: thunk.c,v 1.88 2018/05 #include #include -#define _KMEMUSER #include #include @@ -70,6 +73,7 @@ __RCSID("$NetBSD: thunk.c,v 1.88 2018/05 #include #include #include +#include #include "../include/thunk.h"
CVS commit: src/sys/arch/usermode
Module Name:src Committed By: reinoud Date: Fri Jun 1 08:04:57 UTC 2018 Modified Files: src/sys/arch/usermode/include: thunk.h src/sys/arch/usermode/usermode: thunk.c Log Message: Pretend we already included the To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/arch/usermode/include/thunk.h cvs rdiff -u -r1.88 -r1.89 src/sys/arch/usermode/usermode/thunk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/usermode/dev
Module Name:src Committed By: reinoud Date: Fri Jun 1 07:26:15 UTC 2018 Modified Files: src/sys/arch/usermode/dev: cpu.c Log Message: Pass the address of the array, this fixes issues with i386 compilation To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/arch/usermode/dev/cpu.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/usermode/dev/cpu.c diff -u src/sys/arch/usermode/dev/cpu.c:1.79 src/sys/arch/usermode/dev/cpu.c:1.80 --- src/sys/arch/usermode/dev/cpu.c:1.79 Tue May 29 09:25:01 2018 +++ src/sys/arch/usermode/dev/cpu.c Fri Jun 1 07:26:15 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.79 2018/05/29 09:25:01 reinoud Exp $ */ +/* $NetBSD: cpu.c,v 1.80 2018/06/01 07:26:15 reinoud Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -30,7 +30,7 @@ #include "opt_hz.h" #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.79 2018/05/29 09:25:01 reinoud Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.80 2018/06/01 07:26:15 reinoud Exp $"); #include #include @@ -353,9 +353,9 @@ cpu_setmcontext(struct lwp *l, const mco thunk_printf_debug("cpu_setmcontext\n"); #endif if ((flags & _UC_CPU) != 0) - memcpy(>uc_mcontext.__gregs, mcp->__gregs, sizeof(__gregset_t)); + memcpy(>uc_mcontext.__gregs, >__gregs, sizeof(__gregset_t)); if ((flags & _UC_FPU) != 0) - memcpy(>uc_mcontext.__fpregs, mcp->__fpregs, sizeof(__fpregset_t)); + memcpy(>uc_mcontext.__fpregs, >__fpregs, sizeof(__fpregset_t)); if ((flags & _UC_TLSBASE) != 0) lwp_setprivate(l, (void *) (uintptr_t) mcp->_mc_tlsbase);
CVS commit: src/sys/arch/usermode/dev
Module Name:src Committed By: reinoud Date: Fri Jun 1 07:26:15 UTC 2018 Modified Files: src/sys/arch/usermode/dev: cpu.c Log Message: Pass the address of the array, this fixes issues with i386 compilation To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/arch/usermode/dev/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/usermode/conf
Module Name:src Committed By: reinoud Date: Fri Jun 1 07:22:33 UTC 2018 Modified Files: src/sys/arch/usermode/conf: Makefile.usermode Log Message: Compile NetBSD/userland without CTF for the linker doesn't allow for a single file compiled without CTF To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/usermode/conf/Makefile.usermode Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/usermode/conf
Module Name:src Committed By: reinoud Date: Fri Jun 1 07:22:33 UTC 2018 Modified Files: src/sys/arch/usermode/conf: Makefile.usermode Log Message: Compile NetBSD/userland without CTF for the linker doesn't allow for a single file compiled without CTF To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/usermode/conf/Makefile.usermode 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/usermode/conf/Makefile.usermode diff -u src/sys/arch/usermode/conf/Makefile.usermode:1.41 src/sys/arch/usermode/conf/Makefile.usermode:1.42 --- src/sys/arch/usermode/conf/Makefile.usermode:1.41 Sat Jan 13 16:20:33 2018 +++ src/sys/arch/usermode/conf/Makefile.usermode Fri Jun 1 07:22:33 2018 @@ -1,5 +1,6 @@ -# $NetBSD: Makefile.usermode,v 1.41 2018/01/13 16:20:33 reinoud Exp $ +# $NetBSD: Makefile.usermode,v 1.42 2018/06/01 07:22:33 reinoud Exp $ +MKCTF?=no USETOOLS?= no NEED_OWN_INSTALL_TARGET?= no .include
CVS commit: src/sys/arch/usermode/include
Module Name:src Committed By: reinoud Date: Fri Jun 1 07:19:50 UTC 2018 Modified Files: src/sys/arch/usermode/include: types.h Log Message: Fix compilation errors so NetBSD/usermode compiles under ./build.sh To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/usermode/include/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/usermode/include/types.h diff -u src/sys/arch/usermode/include/types.h:1.13 src/sys/arch/usermode/include/types.h:1.14 --- src/sys/arch/usermode/include/types.h:1.13 Tue May 29 07:35:39 2018 +++ src/sys/arch/usermode/include/types.h Fri Jun 1 07:19:50 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.13 2018/05/29 07:35:39 reinoud Exp $ */ +/* $NetBSD: types.h,v 1.14 2018/06/01 07:19:50 reinoud Exp $ */ /*- * Copyright (c) 2007 Jared D. McNeill @@ -40,9 +40,31 @@ typedef struct label_t { #endif #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || defined(_STANDALONE) +#if defined(__i386__) || defined(__arm__) typedef unsigned long paddr_t; typedef unsigned long psize_t; -typedef unsigned long vaddr_t; +typedef unsigned long __vaddr_t; +typedef unsigned long vsize_t; +typedef int register_t; + +#ifndef __x86_64__ +// XXX hack to allow for amd64->i386 crosscompile, why? +#define PRIxPADDR "lx" +#define PRIxPSIZE "lx" +#define PRIuPSIZE "lu" +#else +#define PRIxPADDR "llx" +#define PRIxPSIZE "llx" +#define PRIuPSIZE "llu" +#endif +#define PRIxVADDR "lx" +#define PRIxVSIZE "lx" +#define PRIuVSIZE "lu" +#define PRIxREGISTER "lx" +#elif defined(__x86_64__) +typedef unsigned long paddr_t; +typedef unsigned long psize_t; +typedef unsigned long __vaddr_t; typedef unsigned long vsize_t; typedef long int register_t; #define PRIxPADDR "lx" @@ -53,9 +75,11 @@ typedef long int register_t; #define PRIuVSIZE "lu" #define PRIxREGISTER "lx" #endif +#endif +typedef __vaddr_t vaddr_t; typedef unsigned char __cpu_simple_lock_nv_t; -typedef long int __register_t; +typedef register_t __register_t; #define __CPU_SIMPLE_LOCK_PAD
CVS commit: src/sys/arch/usermode/include
Module Name:src Committed By: reinoud Date: Fri Jun 1 07:19:50 UTC 2018 Modified Files: src/sys/arch/usermode/include: types.h Log Message: Fix compilation errors so NetBSD/usermode compiles under ./build.sh To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/usermode/include/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Fri Jun 1 07:16:24 UTC 2018 Modified Files: src/sys/net: if.c Log Message: Make sure to remove all AF_LINK addresses in if_detach To generate a diff of this commit: cvs rdiff -u -r1.426 -r1.427 src/sys/net/if.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Fri Jun 1 07:16:24 UTC 2018 Modified Files: src/sys/net: if.c Log Message: Make sure to remove all AF_LINK addresses in if_detach To generate a diff of this commit: cvs rdiff -u -r1.426 -r1.427 src/sys/net/if.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if.c diff -u src/sys/net/if.c:1.426 src/sys/net/if.c:1.427 --- src/sys/net/if.c:1.426 Fri Jun 1 07:14:13 2018 +++ src/sys/net/if.c Fri Jun 1 07:16:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.426 2018/06/01 07:14:13 ozaki-r Exp $ */ +/* $NetBSD: if.c,v 1.427 2018/06/01 07:16:23 ozaki-r Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.426 2018/06/01 07:14:13 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.427 2018/06/01 07:16:23 ozaki-r Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -1405,6 +1405,14 @@ again: if_free_sadl(ifp, 1); +restart: + IFADDR_WRITER_FOREACH(ifa, ifp) { + family = ifa->ifa_addr->sa_family; + KASSERT(family == AF_LINK); + ifa_remove(ifp, ifa); + goto restart; + } + /* Delete stray routes from the routing table. */ for (i = 0; i <= AF_MAX; i++) rt_delete_matched_entries(i, if_delroute_matcher, ifp);
CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Fri Jun 1 07:14:14 UTC 2018 Modified Files: src/sys/net: if.c Log Message: Make sure to not change if_hwdl once set To generate a diff of this commit: cvs rdiff -u -r1.425 -r1.426 src/sys/net/if.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if.c diff -u src/sys/net/if.c:1.425 src/sys/net/if.c:1.426 --- src/sys/net/if.c:1.425 Thu May 31 02:10:23 2018 +++ src/sys/net/if.c Fri Jun 1 07:14:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.425 2018/05/31 02:10:23 ozaki-r Exp $ */ +/* $NetBSD: if.c,v 1.426 2018/06/01 07:14:13 ozaki-r Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.425 2018/05/31 02:10:23 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.426 2018/06/01 07:14:13 ozaki-r Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -202,7 +202,7 @@ static void if_detach_queues(struct ifne static void sysctl_sndq_setup(struct sysctllog **, const char *, struct ifaltq *); static void if_slowtimo(void *); -static void if_free_sadl(struct ifnet *); +static void if_free_sadl(struct ifnet *, int); static void if_attachdomain1(struct ifnet *); static int ifconf(u_long, void *); static int if_transmit(struct ifnet *, struct mbuf *); @@ -425,6 +425,7 @@ if_set_sadl(struct ifnet *ifp, const voi (void)sockaddr_dl_setaddr(sdl, sdl->sdl_len, lla, ifp->if_addrlen); if (factory) { + KASSERT(ifp->if_hwdl == NULL); ifp->if_hwdl = ifp->if_dl; ifaref(ifp->if_hwdl); } @@ -492,7 +493,7 @@ if_alloc_sadl(struct ifnet *ifp) * link types, and thus switch link names often. */ if (ifp->if_sadl != NULL) - if_free_sadl(ifp); + if_free_sadl(ifp, 0); ifa = if_dl_create(ifp, ); @@ -568,11 +569,17 @@ if_activate_sadl(struct ifnet *ifp, stru * a detach helper. This is called from if_detach(). */ static void -if_free_sadl(struct ifnet *ifp) +if_free_sadl(struct ifnet *ifp, int factory) { struct ifaddr *ifa; int s; + if (factory && ifp->if_hwdl != NULL) { + ifa = ifp->if_hwdl; + ifp->if_hwdl = NULL; + ifafree(ifa); + } + ifa = ifp->if_dl; if (ifa == NULL) { KASSERT(ifp->if_sadl == NULL); @@ -585,10 +592,6 @@ if_free_sadl(struct ifnet *ifp) rtinit(ifa, RTM_DELETE, 0); ifa_remove(ifp, ifa); if_deactivate_sadl(ifp); - if (ifp->if_hwdl == ifa) { - ifafree(ifa); - ifp->if_hwdl = NULL; - } splx(s); } @@ -1400,7 +1403,7 @@ again: goto again; } - if_free_sadl(ifp); + if_free_sadl(ifp, 1); /* Delete stray routes from the routing table. */ for (i = 0; i <= AF_MAX; i++)
CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Fri Jun 1 07:14:14 UTC 2018 Modified Files: src/sys/net: if.c Log Message: Make sure to not change if_hwdl once set To generate a diff of this commit: cvs rdiff -u -r1.425 -r1.426 src/sys/net/if.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: ozaki-r Date: Fri Jun 1 07:13:35 UTC 2018 Modified Files: src/sys/net: route.c src/sys/netinet: ip_icmp.c src/sys/netinet6: icmp6.c Log Message: Fix _rt_free via rtrequest(RTM_DELETE) hangs in rt_timer handlers A rt_timer handler is passed a rtentry with an extra reference that avoids the rtentry is accidentally released. So rt_timer handers must release the reference of a passed rtentry by themselves (but they didn't). To generate a diff of this commit: cvs rdiff -u -r1.209 -r1.210 src/sys/net/route.c cvs rdiff -u -r1.170 -r1.171 src/sys/netinet/ip_icmp.c cvs rdiff -u -r1.237 -r1.238 src/sys/netinet6/icmp6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/route.c diff -u src/sys/net/route.c:1.209 src/sys/net/route.c:1.210 --- src/sys/net/route.c:1.209 Thu Apr 12 04:38:13 2018 +++ src/sys/net/route.c Fri Jun 1 07:13:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: route.c,v 1.209 2018/04/12 04:38:13 ozaki-r Exp $ */ +/* $NetBSD: route.c,v 1.210 2018/06/01 07:13:35 ozaki-r Exp $ */ /*- * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.209 2018/04/12 04:38:13 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.210 2018/06/01 07:13:35 ozaki-r Exp $"); #include #ifdef RTFLUSH_DEBUG @@ -1959,7 +1959,12 @@ rt_timer_work(struct work *wk, void *arg (r->rtt_time + rtq->rtq_timeout) < time_uptime) { LIST_REMOVE(r, rtt_link); TAILQ_REMOVE(>rtq_head, r, rtt_next); - rt_ref(r->rtt_rt); /* XXX */ + /* + * Take a reference to avoid the rtentry is freed + * accidentally after RT_UNLOCK. The callback + * (rtt_func) must rt_unref it by itself. + */ + rt_ref(r->rtt_rt); RT_REFCNT_TRACE(r->rtt_rt); RT_UNLOCK(); (*r->rtt_func)(r->rtt_rt, r); Index: src/sys/netinet/ip_icmp.c diff -u src/sys/netinet/ip_icmp.c:1.170 src/sys/netinet/ip_icmp.c:1.171 --- src/sys/netinet/ip_icmp.c:1.170 Fri May 11 14:38:28 2018 +++ src/sys/netinet/ip_icmp.c Fri Jun 1 07:13:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_icmp.c,v 1.170 2018/05/11 14:38:28 maxv Exp $ */ +/* $NetBSD: ip_icmp.c,v 1.171 2018/06/01 07:13:35 ozaki-r Exp $ */ /* * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -94,7 +94,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.170 2018/05/11 14:38:28 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.171 2018/06/01 07:13:35 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_ipsec.h" @@ -1265,6 +1265,7 @@ ip_next_mtu(u_int mtu, int dir) /* XXX u static void icmp_mtudisc_timeout(struct rtentry *rt, struct rttimer *r) { + struct rtentry *retrt; KASSERT(rt != NULL); rt_assert_referenced(rt); @@ -1272,7 +1273,9 @@ icmp_mtudisc_timeout(struct rtentry *rt, if ((rt->rt_flags & (RTF_DYNAMIC | RTF_HOST)) == (RTF_DYNAMIC | RTF_HOST)) { rtrequest(RTM_DELETE, rt_getkey(rt), - rt->rt_gateway, rt_mask(rt), rt->rt_flags, NULL); + rt->rt_gateway, rt_mask(rt), rt->rt_flags, ); + rt_unref(rt); + rt_free(retrt); } else { if ((rt->rt_rmx.rmx_locks & RTV_MTU) == 0) { rt->rt_rmx.rmx_mtu = 0; @@ -1283,6 +1286,7 @@ icmp_mtudisc_timeout(struct rtentry *rt, static void icmp_redirect_timeout(struct rtentry *rt, struct rttimer *r) { + struct rtentry *retrt; KASSERT(rt != NULL); rt_assert_referenced(rt); @@ -1290,7 +1294,9 @@ icmp_redirect_timeout(struct rtentry *rt if ((rt->rt_flags & (RTF_DYNAMIC | RTF_HOST)) == (RTF_DYNAMIC | RTF_HOST)) { rtrequest(RTM_DELETE, rt_getkey(rt), - rt->rt_gateway, rt_mask(rt), rt->rt_flags, NULL); + rt->rt_gateway, rt_mask(rt), rt->rt_flags, ); + rt_unref(rt); + rt_free(retrt); } } Index: src/sys/netinet6/icmp6.c diff -u src/sys/netinet6/icmp6.c:1.237 src/sys/netinet6/icmp6.c:1.238 --- src/sys/netinet6/icmp6.c:1.237 Mon May 7 10:21:08 2018 +++ src/sys/netinet6/icmp6.c Fri Jun 1 07:13:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: icmp6.c,v 1.237 2018/05/07 10:21:08 maxv Exp $ */ +/* $NetBSD: icmp6.c,v 1.238 2018/06/01 07:13:35 ozaki-r Exp $ */ /* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.237 2018/05/07 10:21:08 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.238 2018/06/01 07:13:35 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -2834,6 +2834,7 @@ icmp6_mtudisc_clone(struct sockaddr *dst static void icmp6_mtudisc_timeout(struct rtentry *rt, struct rttimer *r) { + struct rtentry *retrt; KASSERT(rt != NULL); rt_assert_referenced(rt); @@ -2841,7 +2842,9 @@ icmp6_mtudisc_timeout(struct rtentry *rt if ((rt->rt_flags & (RTF_DYNAMIC | RTF_HOST)) == (RTF_DYNAMIC | RTF_HOST)) { rtrequest(RTM_DELETE, rt_getkey(rt), - rt->rt_gateway, rt_mask(rt), rt->rt_flags, NULL); +
CVS commit: src/sys
Module Name:src Committed By: ozaki-r Date: Fri Jun 1 07:13:35 UTC 2018 Modified Files: src/sys/net: route.c src/sys/netinet: ip_icmp.c src/sys/netinet6: icmp6.c Log Message: Fix _rt_free via rtrequest(RTM_DELETE) hangs in rt_timer handlers A rt_timer handler is passed a rtentry with an extra reference that avoids the rtentry is accidentally released. So rt_timer handers must release the reference of a passed rtentry by themselves (but they didn't). To generate a diff of this commit: cvs rdiff -u -r1.209 -r1.210 src/sys/net/route.c cvs rdiff -u -r1.170 -r1.171 src/sys/netinet/ip_icmp.c cvs rdiff -u -r1.237 -r1.238 src/sys/netinet6/icmp6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.