CVS commit: src/sys/external/bsd/drm2/drm
Module Name:src Committed By: mrg Date: Mon Sep 23 05:54:31 UTC 2019 Modified Files: src/sys/external/bsd/drm2/drm: drm_module.c Log Message: when "boot -x", don't turn on *all* drm debug, just the core, driver and kms messages, eliding the vblank, atomic and prime messages, which are the truly noisy ones (and may result in impossibly slow to use systems.) XXX: pullup-all. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/external/bsd/drm2/drm/drm_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/sys/external/bsd/drm2/drm/drm_module.c diff -u src/sys/external/bsd/drm2/drm/drm_module.c:1.15 src/sys/external/bsd/drm2/drm/drm_module.c:1.16 --- src/sys/external/bsd/drm2/drm/drm_module.c:1.15 Tue Aug 28 03:41:39 2018 +++ src/sys/external/bsd/drm2/drm/drm_module.c Mon Sep 23 05:54:31 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_module.c,v 1.15 2018/08/28 03:41:39 riastradh Exp $ */ +/* $NetBSD: drm_module.c,v 1.16 2019/09/23 05:54:31 mrg Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: drm_module.c,v 1.15 2018/08/28 03:41:39 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: drm_module.c,v 1.16 2019/09/23 05:54:31 mrg Exp $"); #include #include @@ -115,7 +115,7 @@ drm_init(void) #endif if (ISSET(boothowto, AB_DEBUG)) - drm_debug = ~(unsigned int)0; + drm_debug = DRM_UT_CORE | DRM_UT_DRIVER | DRM_UT_KMS; spin_lock_init(_minor_lock); idr_init(_minors_idr);
CVS commit: src/sys/external/bsd/drm2/drm
Module Name:src Committed By: mrg Date: Mon Sep 23 05:54:31 UTC 2019 Modified Files: src/sys/external/bsd/drm2/drm: drm_module.c Log Message: when "boot -x", don't turn on *all* drm debug, just the core, driver and kms messages, eliding the vblank, atomic and prime messages, which are the truly noisy ones (and may result in impossibly slow to use systems.) XXX: pullup-all. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/external/bsd/drm2/drm/drm_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/kern
Module Name:src Committed By: skrll Date: Mon Sep 23 05:39:59 UTC 2019 Modified Files: src/sys/kern: subr_pool.c Log Message: Enable POOL_REDZONE with DIAGNOSTIC. The bug in the arm pmap was fixed long ago. To generate a diff of this commit: cvs rdiff -u -r1.258 -r1.259 src/sys/kern/subr_pool.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_pool.c diff -u src/sys/kern/subr_pool.c:1.258 src/sys/kern/subr_pool.c:1.259 --- src/sys/kern/subr_pool.c:1.258 Fri Sep 6 09:19:06 2019 +++ src/sys/kern/subr_pool.c Mon Sep 23 05:39:59 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_pool.c,v 1.258 2019/09/06 09:19:06 maxv Exp $ */ +/* $NetBSD: subr_pool.c,v 1.259 2019/09/23 05:39:59 skrll Exp $ */ /* * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010, 2014, 2015, 2018 @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.258 2019/09/06 09:19:06 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.259 2019/09/23 05:39:59 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -83,7 +83,7 @@ static struct pool phpool[PHPOOL_MAX]; #define PHPOOL_FREELIST_NELEM(idx) \ (((idx) == 0) ? BITMAP_MIN_SIZE : BITMAP_SIZE * (1 << (idx))) -#if defined(KASAN) +#if defined(DIAGNOSTIC) || defined(KASAN) #define POOL_REDZONE #endif
CVS commit: src/sys/kern
Module Name:src Committed By: skrll Date: Mon Sep 23 05:39:59 UTC 2019 Modified Files: src/sys/kern: subr_pool.c Log Message: Enable POOL_REDZONE with DIAGNOSTIC. The bug in the arm pmap was fixed long ago. To generate a diff of this commit: cvs rdiff -u -r1.258 -r1.259 src/sys/kern/subr_pool.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: rin Date: Mon Sep 23 05:00:20 UTC 2019 Modified Files: src/sys/net: route.c Log Message: Stop passing a large const structure by value, in order to avoid possible kernel stack overflow; const pointer is suffice here. Pointed out by the lgtm bot and kamil. OK ozaki-r XXX pullup to netbsd-9 To generate a diff of this commit: cvs rdiff -u -r1.221 -r1.222 src/sys/net/route.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: rin Date: Mon Sep 23 05:00:20 UTC 2019 Modified Files: src/sys/net: route.c Log Message: Stop passing a large const structure by value, in order to avoid possible kernel stack overflow; const pointer is suffice here. Pointed out by the lgtm bot and kamil. OK ozaki-r XXX pullup to netbsd-9 To generate a diff of this commit: cvs rdiff -u -r1.221 -r1.222 src/sys/net/route.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.221 src/sys/net/route.c:1.222 --- src/sys/net/route.c:1.221 Thu Sep 19 04:46:29 2019 +++ src/sys/net/route.c Mon Sep 23 05:00:20 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: route.c,v 1.221 2019/09/19 04:46:29 ozaki-r Exp $ */ +/* $NetBSD: route.c,v 1.222 2019/09/23 05:00:20 rin Exp $ */ /*- * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.221 2019/09/19 04:46:29 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.222 2019/09/23 05:00:20 rin Exp $"); #include #ifdef RTFLUSH_DEBUG @@ -1387,47 +1387,48 @@ rt_setgate(struct rtentry *rt, const str } static struct ifaddr * -rt_update_get_ifa(const struct rt_addrinfo info, const struct rtentry *rt, +rt_update_get_ifa(const struct rt_addrinfo *info, const struct rtentry *rt, struct ifnet **ifp, struct psref *psref_ifp, struct psref *psref) { struct ifaddr *ifa = NULL; *ifp = NULL; - if (info.rti_info[RTAX_IFP] != NULL) { - ifa = ifa_ifwithnet_psref(info.rti_info[RTAX_IFP], psref); + if (info->rti_info[RTAX_IFP] != NULL) { + ifa = ifa_ifwithnet_psref(info->rti_info[RTAX_IFP], psref); if (ifa == NULL) goto next; *ifp = ifa->ifa_ifp; if_acquire(*ifp, psref_ifp); - if (info.rti_info[RTAX_IFA] == NULL && - info.rti_info[RTAX_GATEWAY] == NULL) + if (info->rti_info[RTAX_IFA] == NULL && + info->rti_info[RTAX_GATEWAY] == NULL) goto next; ifa_release(ifa, psref); - if (info.rti_info[RTAX_IFA] == NULL) { + if (info->rti_info[RTAX_IFA] == NULL) { /* route change -ifp */ - ifa = ifaof_ifpforaddr_psref(info.rti_info[RTAX_GATEWAY], - *ifp, psref); + ifa = ifaof_ifpforaddr_psref( + info->rti_info[RTAX_GATEWAY], *ifp, psref); } else { /* route change -ifp -ifa */ - ifa = ifa_ifwithaddr_psref(info.rti_info[RTAX_IFA], psref); + ifa = ifa_ifwithaddr_psref(info->rti_info[RTAX_IFA], + psref); if (ifa != NULL) goto out; - ifa = ifaof_ifpforaddr_psref(info.rti_info[RTAX_IFA], + ifa = ifaof_ifpforaddr_psref(info->rti_info[RTAX_IFA], *ifp, psref); } goto out; } next: - if (info.rti_info[RTAX_IFA] != NULL) { + if (info->rti_info[RTAX_IFA] != NULL) { /* route change -ifa */ - ifa = ifa_ifwithaddr_psref(info.rti_info[RTAX_IFA], psref); + ifa = ifa_ifwithaddr_psref(info->rti_info[RTAX_IFA], psref); if (ifa != NULL) goto out; } - if (info.rti_info[RTAX_GATEWAY] != NULL) { + if (info->rti_info[RTAX_GATEWAY] != NULL) { /* route change */ ifa = ifa_ifwithroute_psref(rt->rt_flags, rt_getkey(rt), - info.rti_info[RTAX_GATEWAY], psref); + info->rti_info[RTAX_GATEWAY], psref); } out: if (ifa != NULL && *ifp == NULL) { @@ -1487,7 +1488,7 @@ rt_update(struct rtentry *rt, struct rt_ * flags may also be different; ifp may be specified * by ll sockaddr when protocol address is ambiguous */ - new_ifa = rt_update_get_ifa(*info, rt, _ifp, _new_ifp, + new_ifa = rt_update_get_ifa(info, rt, _ifp, _new_ifp, _new_ifa); if (new_ifa != NULL) { ifa_release(ifa, _ifa);
Re: CVS commit: src/sys/net
Hi, On 2019/09/22 18:30, Kamil Rytarowski wrote: On 12.04.2018 06:38, Ryota Ozaki wrote: Module Name:src Committed By: ozaki-r Date: Thu Apr 12 04:38:13 UTC 2018 Modified Files: src/sys/net: if.h route.c route.h rtsock.c Log Message: Resolve tangled lock dependencies in route.c This change sweeps remaining lock decisions based on if locked or not by moving utility functions of rtentry updates from rtsock.c and ensuring holding the rt_lock. It also improves the atomicity of a update of a rtentry. +static struct ifaddr * +rt_update_get_ifa(const struct rt_addrinfo info, const struct rtentry *rt, +struct ifnet **ifp, struct psref *psref_ifp, struct psref *psref) +{ Do we need to pass info as a value? It is pretty large here (1024 bytes). Yeah, we were just discussing on this alert of LGTM bot. We can use const pointer here. I will commit the fix soon. Thanks, rin
CVS commit: src/external/gpl3/gcc/dist/gcc
Module Name:src Committed By: kamil Date: Sun Sep 22 23:34:13 UTC 2019 Modified Files: src/external/gpl3/gcc/dist/gcc: cppbuiltin.c Log Message: Add LSan and UBSan specific preprocessor macros __SANITIZE_LEAK__ patch: https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01270.html __SANITIZE_UNDEFINED__ https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01286.html GCC upstream does not see value in feature parity with LLVM sanitizers. For the time being this will be a NetBSD specific extension. __SANITIZE_LEAK__ is needed for __NO_LEAKS in __SANITIZE_UNDEFINED__ is planned to be reused in the kernel headers. To generate a diff of this commit: cvs rdiff -u -r1.1.1.4 -r1.2 src/external/gpl3/gcc/dist/gcc/cppbuiltin.c 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: kamil Date: Sun Sep 22 23:34:13 UTC 2019 Modified Files: src/external/gpl3/gcc/dist/gcc: cppbuiltin.c Log Message: Add LSan and UBSan specific preprocessor macros __SANITIZE_LEAK__ patch: https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01270.html __SANITIZE_UNDEFINED__ https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01286.html GCC upstream does not see value in feature parity with LLVM sanitizers. For the time being this will be a NetBSD specific extension. __SANITIZE_LEAK__ is needed for __NO_LEAKS in __SANITIZE_UNDEFINED__ is planned to be reused in the kernel headers. To generate a diff of this commit: cvs rdiff -u -r1.1.1.4 -r1.2 src/external/gpl3/gcc/dist/gcc/cppbuiltin.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/cppbuiltin.c diff -u src/external/gpl3/gcc/dist/gcc/cppbuiltin.c:1.1.1.4 src/external/gpl3/gcc/dist/gcc/cppbuiltin.c:1.2 --- src/external/gpl3/gcc/dist/gcc/cppbuiltin.c:1.1.1.4 Sat Jan 19 10:14:18 2019 +++ src/external/gpl3/gcc/dist/gcc/cppbuiltin.c Sun Sep 22 23:34:13 2019 @@ -93,6 +93,12 @@ define_builtin_macros_for_compilation_fl if (flag_sanitize & SANITIZE_ADDRESS) cpp_define (pfile, "__SANITIZE_ADDRESS__"); + if (flag_sanitize & SANITIZE_UNDEFINED) +cpp_define (pfile, "__SANITIZE_UNDEFINED__"); + + if (flag_sanitize & SANITIZE_LEAK) +cpp_define (pfile, "__SANITIZE_LEAK__"); + if (flag_sanitize & SANITIZE_THREAD) cpp_define (pfile, "__SANITIZE_THREAD__");
CVS commit: src/sys/sys
Module Name:src Committed By: kamil Date: Sun Sep 22 23:23:12 UTC 2019 Modified Files: src/sys/sys: cdefs.h Log Message: Handle LSan/LLVM and LSan/GCC in __NO_LEAKS __has_feature(leak_sanitizer) was merged with Clang/LLVM today: https://reviews.llvm.org/D67719 GCC specific ifdef __SANITIZE_LEAK__ is pending in upstream review... https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01270.html and can be rejected as GCC upstream does not see value in feature parity with LLVM sanitizers. For the time being this will be a NetBSD specific extension. To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sys/sys/cdefs.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/sys/cdefs.h diff -u src/sys/sys/cdefs.h:1.145 src/sys/sys/cdefs.h:1.146 --- src/sys/sys/cdefs.h:1.145 Sun Sep 22 23:13:10 2019 +++ src/sys/sys/cdefs.h Sun Sep 22 23:23:12 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs.h,v 1.145 2019/09/22 23:13:10 kamil Exp $ */ +/* $NetBSD: cdefs.h,v 1.146 2019/09/22 23:23:12 kamil Exp $ */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. @@ -345,7 +345,8 @@ #endif #if defined(__COVERITY__) || \ -__has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__) +__has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__) ||\ +__has_feature(leak_sanitizer) || defined(__SANITIZE_LEAK__) #define __NO_LEAKS #endif
CVS commit: src/sys/sys
Module Name:src Committed By: kamil Date: Sun Sep 22 23:23:12 UTC 2019 Modified Files: src/sys/sys: cdefs.h Log Message: Handle LSan/LLVM and LSan/GCC in __NO_LEAKS __has_feature(leak_sanitizer) was merged with Clang/LLVM today: https://reviews.llvm.org/D67719 GCC specific ifdef __SANITIZE_LEAK__ is pending in upstream review... https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01270.html and can be rejected as GCC upstream does not see value in feature parity with LLVM sanitizers. For the time being this will be a NetBSD specific extension. To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sys/sys/cdefs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/compat/sys
Module Name:src Committed By: christos Date: Sun Sep 22 23:18:53 UTC 2019 Added Files: src/sys/compat/sys: statvfs.h Log Message: new files for statvfs90 To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/compat/sys/statvfs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/compat/sys
Module Name:src Committed By: christos Date: Sun Sep 22 23:18:53 UTC 2019 Added Files: src/sys/compat/sys: statvfs.h Log Message: new files for statvfs90 To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/compat/sys/statvfs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/compat/sys/statvfs.h diff -u /dev/null src/sys/compat/sys/statvfs.h:1.1 --- /dev/null Sun Sep 22 19:18:53 2019 +++ src/sys/compat/sys/statvfs.h Sun Sep 22 19:18:53 2019 @@ -0,0 +1,161 @@ +/* $NetBSD: statvfs.h,v 1.1 2019/09/22 23:18:53 christos Exp $ */ + +/*- + * Copyright (c) 2019 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _COMPAT_SYS_STATVFS_H_ +#define _COMPAT_SYS_STATVFS_H_ + +#include + +struct statvfs90 { + unsigned long f_flag; /* copy of mount exported flags */ + unsigned long f_bsize; /* file system block size */ + unsigned long f_frsize; /* fundamental file system block size */ + unsigned long f_iosize; /* optimal file system block size */ + + /* The following are in units of f_frsize */ + fsblkcnt_t f_blocks; /* number of blocks in file system, */ + fsblkcnt_t f_bfree; /* free blocks avail in file system */ + fsblkcnt_t f_bavail; /* free blocks avail to non-root */ + fsblkcnt_t f_bresvd; /* blocks reserved for root */ + + fsfilcnt_t f_files; /* total file nodes in file system */ + fsfilcnt_t f_ffree; /* free file nodes in file system */ + fsfilcnt_t f_favail; /* free file nodes avail to non-root */ + fsfilcnt_t f_fresvd; /* file nodes reserved for root */ + + uint64_t f_syncreads; /* count of sync reads since mount */ + uint64_t f_syncwrites; /* count of sync writes since mount */ + + uint64_t f_asyncreads; /* count of async reads since mount */ + uint64_t f_asyncwrites; /* count of async writes since mount */ + + fsid_t f_fsidx; /* NetBSD compatible fsid */ + unsigned long f_fsid; /* Posix compatible fsid */ + unsigned long f_namemax; /* maximum filename length */ + uid_t f_owner; /* user that mounted the file system */ + + uint32_t f_spare[4]; /* spare space */ + + char f_fstypename[_VFS_NAMELEN]; /* fs type name */ + char f_mntonname[_VFS_MNAMELEN]; /* directory on which mounted */ + char f_mntfromname[_VFS_MNAMELEN]; /* mounted file system */ +}; + +__BEGIN_DECLS +#ifndef _KERNEL +#include +#endif + +static __inline void +statvfs_to_statvfs90(const struct statvfs *s, struct statvfs90 *s90) +{ + s90->f_flag = s->f_flag; + s90->f_bsize = s->f_bsize; + s90->f_frsize = s->f_frsize; + s90->f_iosize = s->f_iosize; + + s90->f_blocks = s->f_blocks; + s90->f_bfree = s->f_bfree; + s90->f_bavail = s->f_bavail; + s90->f_bresvd = s->f_bresvd; + + s90->f_files = s->f_files; + s90->f_ffree = s->f_ffree; + s90->f_favail = s->f_favail; + s90->f_fresvd = s->f_fresvd; + + s90->f_syncreads = s->f_syncreads; + s90->f_syncwrites = s->f_syncwrites; + + s90->f_asyncreads = s->f_asyncreads; + s90->f_asyncwrites = s->f_asyncwrites; + + s90->f_fsidx = s->f_fsidx; + s90->f_fsid = s->f_fsid; + s90->f_namemax = s->f_namemax; + s90->f_owner = s->f_owner; + + memcpy(s90->f_fstypename, s->f_fstypename, sizeof(s90->f_fstypename)); + memcpy(s90->f_mntonname, s->f_mntonname, sizeof(s90->f_mntonname)); + memcpy(s90->f_mntfromname, s->f_mntfromname, sizeof(s90->f_mntfromname)); +} + +#ifdef _KERNEL +static __inline int +statvfs_to_statvfs90_copy(const void *vs, void *vs90, size_t l) +{ + struct statvfs90 *s90 = STATVFSBUF_GET(); + int error; + + statvfs_to_statvfs90(vs, s90);
CVS commit: src/sys/sys
Module Name:src Committed By: kamil Date: Sun Sep 22 23:13:10 UTC 2019 Modified Files: src/sys/sys: cdefs.h Log Message: Make __CTASSERT static assert again Today GCC/Clang allow to specify typedef char[] with the dynamic VLA property (as introduced in C99). This means that __CTASSERT(), when misused with run-time semantics, was a dummy check generating either 1 or -1 size of typedef char[]. It was caught in runtime by kUBSan as -1 is size of VLA with unspecified semantics in runtime (Undefined Behavior). Use bit-field to enforce compile-time constant. This approach has been inspired by the Perl variation of static_assert(). To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/sys/sys/cdefs.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/sys/cdefs.h diff -u src/sys/sys/cdefs.h:1.144 src/sys/sys/cdefs.h:1.145 --- src/sys/sys/cdefs.h:1.144 Wed Sep 18 15:06:03 2019 +++ src/sys/sys/cdefs.h Sun Sep 22 23:13:10 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs.h,v 1.144 2019/09/18 15:06:03 kamil Exp $ */ +/* $NetBSD: cdefs.h,v 1.145 2019/09/22 23:13:10 kamil Exp $ */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. @@ -172,8 +172,11 @@ #define __CTASSERT99(x, a, b) __CTASSERT0(x, __CONCAT(__ctassert,a), \ __CONCAT(_,b)) #endif -#define __CTASSERT0(x, y, z) __CTASSERT1(x, y, z) -#define __CTASSERT1(x, y, z) typedef char y ## z[/*CONSTCOND*/(x) ? 1 : -1] __unused +#define __CTASSERT0(x, y, z) __CTASSERT1(x, y, z) +#define __CTASSERT1(x, y, z) \ + typedef struct { \ + unsigned int y ## z : /*CONSTCOND*/(x) ? 1 : -1; \ + } y ## z ## _struct __unused /* * The following macro is used to remove const cast-away warnings
CVS commit: src/sys/sys
Module Name:src Committed By: kamil Date: Sun Sep 22 23:13:10 UTC 2019 Modified Files: src/sys/sys: cdefs.h Log Message: Make __CTASSERT static assert again Today GCC/Clang allow to specify typedef char[] with the dynamic VLA property (as introduced in C99). This means that __CTASSERT(), when misused with run-time semantics, was a dummy check generating either 1 or -1 size of typedef char[]. It was caught in runtime by kUBSan as -1 is size of VLA with unspecified semantics in runtime (Undefined Behavior). Use bit-field to enforce compile-time constant. This approach has been inspired by the Perl variation of static_assert(). To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/sys/sys/cdefs.h 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: christos Date: Sun Sep 22 23:03:21 UTC 2019 Modified Files: src/sys/compat/netbsd32: netbsd32_syscall.h netbsd32_syscallargs.h netbsd32_syscalls.c netbsd32_syscalls_autoload.c netbsd32_sysent.c netbsd32_systrace_args.c src/sys/kern: init_sysent.c syscalls.c syscalls_autoload.c systrace_args.c src/sys/rump: rump.sysmap src/sys/rump/include/rump: rump_syscalls.h src/sys/rump/librump/rumpkern: rump_syscalls.c rumpkern_syscalls.c src/sys/rump/librump/rumpnet: rumpnet_syscalls.c src/sys/rump/librump/rumpvfs: rumpvfs_syscalls.c src/sys/sys: syscall.h syscallargs.h Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.142 -r1.143 src/sys/compat/netbsd32/netbsd32_syscall.h cvs rdiff -u -r1.141 -r1.142 src/sys/compat/netbsd32/netbsd32_syscallargs.h \ src/sys/compat/netbsd32/netbsd32_syscalls.c cvs rdiff -u -r1.21 -r1.22 \ src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c cvs rdiff -u -r1.140 -r1.141 src/sys/compat/netbsd32/netbsd32_sysent.c cvs rdiff -u -r1.32 -r1.33 src/sys/compat/netbsd32/netbsd32_systrace_args.c cvs rdiff -u -r1.324 -r1.325 src/sys/kern/init_sysent.c cvs rdiff -u -r1.313 -r1.314 src/sys/kern/syscalls.c cvs rdiff -u -r1.30 -r1.31 src/sys/kern/syscalls_autoload.c cvs rdiff -u -r1.32 -r1.33 src/sys/kern/systrace_args.c cvs rdiff -u -r1.5 -r1.6 src/sys/rump/rump.sysmap cvs rdiff -u -r1.111 -r1.112 src/sys/rump/include/rump/rump_syscalls.h cvs rdiff -u -r1.141 -r1.142 src/sys/rump/librump/rumpkern/rump_syscalls.c cvs rdiff -u -r1.4 -r1.5 src/sys/rump/librump/rumpkern/rumpkern_syscalls.c cvs rdiff -u -r1.4 -r1.5 src/sys/rump/librump/rumpnet/rumpnet_syscalls.c cvs rdiff -u -r1.5 -r1.6 src/sys/rump/librump/rumpvfs/rumpvfs_syscalls.c cvs rdiff -u -r1.307 -r1.308 src/sys/sys/syscall.h cvs rdiff -u -r1.291 -r1.292 src/sys/sys/syscallargs.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/compat/netbsd32/netbsd32_syscall.h diff -u src/sys/compat/netbsd32/netbsd32_syscall.h:1.142 src/sys/compat/netbsd32/netbsd32_syscall.h:1.143 --- src/sys/compat/netbsd32/netbsd32_syscall.h:1.142 Tue Jun 18 12:24:32 2019 +++ src/sys/compat/netbsd32/netbsd32_syscall.h Sun Sep 22 19:03:20 2019 @@ -1,10 +1,10 @@ -/* $NetBSD: netbsd32_syscall.h,v 1.142 2019/06/18 16:24:32 christos Exp $ */ +/* $NetBSD: netbsd32_syscall.h,v 1.143 2019/09/22 23:03:20 christos Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.127 2019/06/18 16:23:24 christos Exp + * created from NetBSD: syscalls.master,v 1.128 2019/09/22 22:59:38 christos Exp */ #ifndef _NETBSD32_SYS_SYSCALL_H_ @@ -927,16 +927,16 @@ /* syscall: "netbsd32_uuidgen" ret: "int" args: "netbsd32_uuidp_t" "int" */ #define NETBSD32_SYS_netbsd32_uuidgen 355 -/* syscall: "netbsd32_getvfsstat" ret: "int" args: "netbsd32_statvfsp_t" "netbsd32_size_t" "int" */ -#define NETBSD32_SYS_netbsd32_getvfsstat 356 +/* syscall: "compat_90_netbsd32_getvfsstat" ret: "int" args: "netbsd32_statvfs90p_t" "netbsd32_size_t" "int" */ +#define NETBSD32_SYS_compat_90_netbsd32_getvfsstat 356 -/* syscall: "netbsd32_statvfs1" ret: "int" args: "netbsd32_charp" "netbsd32_statvfsp_t" "int" */ -#define NETBSD32_SYS_netbsd32_statvfs1 357 +/* syscall: "compat_90_netbsd32_statvfs1" ret: "int" args: "netbsd32_charp" "netbsd32_statvfs90p_t" "int" */ +#define NETBSD32_SYS_compat_90_netbsd32_statvfs1 357 -/* syscall: "netbsd32_fstatvfs1" ret: "int" args: "int" "netbsd32_statvfsp_t" "int" */ -#define NETBSD32_SYS_netbsd32_fstatvfs1 358 +/* syscall: "compat_90_netbsd32_fstatvfs1" ret: "int" args: "int" "netbsd32_statvfs90p_t" "int" */ +#define NETBSD32_SYS_compat_90_netbsd32_fstatvfs1 358 -/* syscall: "compat_30_netbsd32_fhstatvfs1" ret: "int" args: "netbsd32_fhandlep_t" "netbsd32_statvfsp_t" "int" */ +/* syscall: "compat_30_netbsd32_fhstatvfs1" ret: "int" args: "netbsd32_fhandlep_t" "netbsd32_statvfs90p_t" "int" */ #define NETBSD32_SYS_compat_30_netbsd32_fhstatvfs1 359 /* syscall: "netbsd32_extattrctl" ret: "int" args: "netbsd32_charp" "int" "netbsd32_charp" "int" "netbsd32_charp" */ @@ -1048,8 +1048,8 @@ /* syscall: "netbsd32___fhopen40" ret: "int" args: "netbsd32_pointer_t" "netbsd32_size_t" "int" */ #define NETBSD32_SYS_netbsd32___fhopen40 396 -/* syscall: "netbsd32___fhstatvfs140" ret: "int" args: "netbsd32_pointer_t" "netbsd32_size_t" "netbsd32_statvfsp_t" "int" */ -#define NETBSD32_SYS_netbsd32___fhstatvfs140 397 +/* syscall: "compat_90_netbsd32_fhstatvfs1" ret: "int" args: "netbsd32_pointer_t" "netbsd32_size_t" "netbsd32_statvfs90p_t" "int" */ +#define NETBSD32_SYS_compat_90_netbsd32_fhstatvfs1 397 /* syscall: "compat_50_netbsd32___fhstat40" ret: "int" args: "netbsd32_pointer_t" "netbsd32_size_t" "netbsd32_stat50p_t" */ #define
CVS commit: src/sys
Module Name:src Committed By: christos Date: Sun Sep 22 23:03:21 UTC 2019 Modified Files: src/sys/compat/netbsd32: netbsd32_syscall.h netbsd32_syscallargs.h netbsd32_syscalls.c netbsd32_syscalls_autoload.c netbsd32_sysent.c netbsd32_systrace_args.c src/sys/kern: init_sysent.c syscalls.c syscalls_autoload.c systrace_args.c src/sys/rump: rump.sysmap src/sys/rump/include/rump: rump_syscalls.h src/sys/rump/librump/rumpkern: rump_syscalls.c rumpkern_syscalls.c src/sys/rump/librump/rumpnet: rumpnet_syscalls.c src/sys/rump/librump/rumpvfs: rumpvfs_syscalls.c src/sys/sys: syscall.h syscallargs.h Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.142 -r1.143 src/sys/compat/netbsd32/netbsd32_syscall.h cvs rdiff -u -r1.141 -r1.142 src/sys/compat/netbsd32/netbsd32_syscallargs.h \ src/sys/compat/netbsd32/netbsd32_syscalls.c cvs rdiff -u -r1.21 -r1.22 \ src/sys/compat/netbsd32/netbsd32_syscalls_autoload.c cvs rdiff -u -r1.140 -r1.141 src/sys/compat/netbsd32/netbsd32_sysent.c cvs rdiff -u -r1.32 -r1.33 src/sys/compat/netbsd32/netbsd32_systrace_args.c cvs rdiff -u -r1.324 -r1.325 src/sys/kern/init_sysent.c cvs rdiff -u -r1.313 -r1.314 src/sys/kern/syscalls.c cvs rdiff -u -r1.30 -r1.31 src/sys/kern/syscalls_autoload.c cvs rdiff -u -r1.32 -r1.33 src/sys/kern/systrace_args.c cvs rdiff -u -r1.5 -r1.6 src/sys/rump/rump.sysmap cvs rdiff -u -r1.111 -r1.112 src/sys/rump/include/rump/rump_syscalls.h cvs rdiff -u -r1.141 -r1.142 src/sys/rump/librump/rumpkern/rump_syscalls.c cvs rdiff -u -r1.4 -r1.5 src/sys/rump/librump/rumpkern/rumpkern_syscalls.c cvs rdiff -u -r1.4 -r1.5 src/sys/rump/librump/rumpnet/rumpnet_syscalls.c cvs rdiff -u -r1.5 -r1.6 src/sys/rump/librump/rumpvfs/rumpvfs_syscalls.c cvs rdiff -u -r1.307 -r1.308 src/sys/sys/syscall.h cvs rdiff -u -r1.291 -r1.292 src/sys/sys/syscallargs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: christos Date: Sun Sep 22 22:59:40 UTC 2019 Modified Files: src/bin/df: df.c src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/debug: shl.mi src/distrib/sets/lists/modules: ad.arm ad.mips md.amd64 md.sparc64 mi src/lib/libc: shlib_version src/lib/libc/compat/gen: Makefile.inc compat_opendir.c src/lib/libc/compat/sys: Makefile.inc compat_fhstatvfs.c compat_fhstatvfs1.c compat_statfs.c src/lib/libc/include: namespace.h src/lib/libc/sys: Makefile.inc statvfs.c src/share/man/man5: statvfs.5 src/sys/compat/common: compat_mod.h files.common vfs_syscalls_20.c vfs_syscalls_30.c src/sys/compat/netbsd32: files.netbsd32 netbsd32.h netbsd32_conv.h netbsd32_fs.c syscalls.conf syscalls.master src/sys/conf: files src/sys/kern: init_sysent.c syscalls.conf syscalls.master vfs_subr.c vfs_syscalls.c src/sys/miscfs/specfs: spec_vnops.c src/sys/modules: Makefile src/sys/sys: param.h statvfs.h src/usr.bin/ktruss: dump.c Added Files: src/lib/libc/compat/gen: compat___getmntinfo13.c src/lib/libc/compat/sys: compat___fhstatvfs140.c compat___fhstatvfs40.c compat_statvfs.c src/sys/compat/common: compat_90_mod.c vfs_syscalls_90.c src/sys/compat/netbsd32: netbsd32_compat_90.c src/sys/conf: compat_netbsd90.config src/sys/modules/compat_90: Makefile src/sys/modules/compat_netbsd32_90: Makefile Log Message: Add a new member to struct vfsstat and grow the unused members The new member is caled f_mntfromlabel and it is the dkw_wname of the corresponding wedge. This is now used by df -W to display the mountpoint name as NAME= To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/bin/df/df.c cvs rdiff -u -r1.871 -r1.872 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.228 -r1.229 src/distrib/sets/lists/debug/shl.mi cvs rdiff -u -r1.12 -r1.13 src/distrib/sets/lists/modules/ad.arm \ src/distrib/sets/lists/modules/ad.mips cvs rdiff -u -r1.80 -r1.81 src/distrib/sets/lists/modules/md.amd64 cvs rdiff -u -r1.7 -r1.8 src/distrib/sets/lists/modules/md.sparc64 cvs rdiff -u -r1.125 -r1.126 src/distrib/sets/lists/modules/mi cvs rdiff -u -r1.284 -r1.285 src/lib/libc/shlib_version cvs rdiff -u -r1.17 -r1.18 src/lib/libc/compat/gen/Makefile.inc cvs rdiff -u -r0 -r1.1 src/lib/libc/compat/gen/compat___getmntinfo13.c cvs rdiff -u -r1.1 -r1.2 src/lib/libc/compat/gen/compat_opendir.c cvs rdiff -u -r1.9 -r1.10 src/lib/libc/compat/sys/Makefile.inc cvs rdiff -u -r0 -r1.1 src/lib/libc/compat/sys/compat___fhstatvfs140.c \ src/lib/libc/compat/sys/compat___fhstatvfs40.c \ src/lib/libc/compat/sys/compat_statvfs.c cvs rdiff -u -r1.3 -r1.4 src/lib/libc/compat/sys/compat_fhstatvfs.c \ src/lib/libc/compat/sys/compat_fhstatvfs1.c cvs rdiff -u -r1.7 -r1.8 src/lib/libc/compat/sys/compat_statfs.c cvs rdiff -u -r1.196 -r1.197 src/lib/libc/include/namespace.h cvs rdiff -u -r1.241 -r1.242 src/lib/libc/sys/Makefile.inc cvs rdiff -u -r1.6 -r1.7 src/lib/libc/sys/statvfs.c cvs rdiff -u -r1.14 -r1.15 src/share/man/man5/statvfs.5 cvs rdiff -u -r0 -r1.1 src/sys/compat/common/compat_90_mod.c \ src/sys/compat/common/vfs_syscalls_90.c cvs rdiff -u -r1.5 -r1.6 src/sys/compat/common/compat_mod.h cvs rdiff -u -r1.4 -r1.5 src/sys/compat/common/files.common cvs rdiff -u -r1.41 -r1.42 src/sys/compat/common/vfs_syscalls_20.c cvs rdiff -u -r1.38 -r1.39 src/sys/compat/common/vfs_syscalls_30.c cvs rdiff -u -r1.48 -r1.49 src/sys/compat/netbsd32/files.netbsd32 cvs rdiff -u -r1.123 -r1.124 src/sys/compat/netbsd32/netbsd32.h cvs rdiff -u -r0 -r1.1 src/sys/compat/netbsd32/netbsd32_compat_90.c cvs rdiff -u -r1.38 -r1.39 src/sys/compat/netbsd32/netbsd32_conv.h cvs rdiff -u -r1.83 -r1.84 src/sys/compat/netbsd32/netbsd32_fs.c cvs rdiff -u -r1.16 -r1.17 src/sys/compat/netbsd32/syscalls.conf cvs rdiff -u -r1.127 -r1.128 src/sys/compat/netbsd32/syscalls.master cvs rdiff -u -r0 -r1.1 src/sys/conf/compat_netbsd90.config cvs rdiff -u -r1.1239 -r1.1240 src/sys/conf/files cvs rdiff -u -r1.323 -r1.324 src/sys/kern/init_sysent.c cvs rdiff -u -r1.29 -r1.30 src/sys/kern/syscalls.conf cvs rdiff -u -r1.295 -r1.296 src/sys/kern/syscalls.master cvs rdiff -u -r1.471 -r1.472 src/sys/kern/vfs_subr.c cvs rdiff -u -r1.535 -r1.536 src/sys/kern/vfs_syscalls.c cvs rdiff -u -r1.175 -r1.176 src/sys/miscfs/specfs/spec_vnops.c cvs rdiff -u -r1.226 -r1.227 src/sys/modules/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/compat_90/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/compat_netbsd32_90/Makefile cvs rdiff -u -r1.612 -r1.613 src/sys/sys/param.h cvs rdiff -u -r1.18 -r1.19 src/sys/sys/statvfs.h cvs rdiff -u -r1.43 -r1.44 src/usr.bin/ktruss/dump.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index:
CVS commit: src
Module Name:src Committed By: christos Date: Sun Sep 22 22:59:40 UTC 2019 Modified Files: src/bin/df: df.c src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/debug: shl.mi src/distrib/sets/lists/modules: ad.arm ad.mips md.amd64 md.sparc64 mi src/lib/libc: shlib_version src/lib/libc/compat/gen: Makefile.inc compat_opendir.c src/lib/libc/compat/sys: Makefile.inc compat_fhstatvfs.c compat_fhstatvfs1.c compat_statfs.c src/lib/libc/include: namespace.h src/lib/libc/sys: Makefile.inc statvfs.c src/share/man/man5: statvfs.5 src/sys/compat/common: compat_mod.h files.common vfs_syscalls_20.c vfs_syscalls_30.c src/sys/compat/netbsd32: files.netbsd32 netbsd32.h netbsd32_conv.h netbsd32_fs.c syscalls.conf syscalls.master src/sys/conf: files src/sys/kern: init_sysent.c syscalls.conf syscalls.master vfs_subr.c vfs_syscalls.c src/sys/miscfs/specfs: spec_vnops.c src/sys/modules: Makefile src/sys/sys: param.h statvfs.h src/usr.bin/ktruss: dump.c Added Files: src/lib/libc/compat/gen: compat___getmntinfo13.c src/lib/libc/compat/sys: compat___fhstatvfs140.c compat___fhstatvfs40.c compat_statvfs.c src/sys/compat/common: compat_90_mod.c vfs_syscalls_90.c src/sys/compat/netbsd32: netbsd32_compat_90.c src/sys/conf: compat_netbsd90.config src/sys/modules/compat_90: Makefile src/sys/modules/compat_netbsd32_90: Makefile Log Message: Add a new member to struct vfsstat and grow the unused members The new member is caled f_mntfromlabel and it is the dkw_wname of the corresponding wedge. This is now used by df -W to display the mountpoint name as NAME= To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/bin/df/df.c cvs rdiff -u -r1.871 -r1.872 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.228 -r1.229 src/distrib/sets/lists/debug/shl.mi cvs rdiff -u -r1.12 -r1.13 src/distrib/sets/lists/modules/ad.arm \ src/distrib/sets/lists/modules/ad.mips cvs rdiff -u -r1.80 -r1.81 src/distrib/sets/lists/modules/md.amd64 cvs rdiff -u -r1.7 -r1.8 src/distrib/sets/lists/modules/md.sparc64 cvs rdiff -u -r1.125 -r1.126 src/distrib/sets/lists/modules/mi cvs rdiff -u -r1.284 -r1.285 src/lib/libc/shlib_version cvs rdiff -u -r1.17 -r1.18 src/lib/libc/compat/gen/Makefile.inc cvs rdiff -u -r0 -r1.1 src/lib/libc/compat/gen/compat___getmntinfo13.c cvs rdiff -u -r1.1 -r1.2 src/lib/libc/compat/gen/compat_opendir.c cvs rdiff -u -r1.9 -r1.10 src/lib/libc/compat/sys/Makefile.inc cvs rdiff -u -r0 -r1.1 src/lib/libc/compat/sys/compat___fhstatvfs140.c \ src/lib/libc/compat/sys/compat___fhstatvfs40.c \ src/lib/libc/compat/sys/compat_statvfs.c cvs rdiff -u -r1.3 -r1.4 src/lib/libc/compat/sys/compat_fhstatvfs.c \ src/lib/libc/compat/sys/compat_fhstatvfs1.c cvs rdiff -u -r1.7 -r1.8 src/lib/libc/compat/sys/compat_statfs.c cvs rdiff -u -r1.196 -r1.197 src/lib/libc/include/namespace.h cvs rdiff -u -r1.241 -r1.242 src/lib/libc/sys/Makefile.inc cvs rdiff -u -r1.6 -r1.7 src/lib/libc/sys/statvfs.c cvs rdiff -u -r1.14 -r1.15 src/share/man/man5/statvfs.5 cvs rdiff -u -r0 -r1.1 src/sys/compat/common/compat_90_mod.c \ src/sys/compat/common/vfs_syscalls_90.c cvs rdiff -u -r1.5 -r1.6 src/sys/compat/common/compat_mod.h cvs rdiff -u -r1.4 -r1.5 src/sys/compat/common/files.common cvs rdiff -u -r1.41 -r1.42 src/sys/compat/common/vfs_syscalls_20.c cvs rdiff -u -r1.38 -r1.39 src/sys/compat/common/vfs_syscalls_30.c cvs rdiff -u -r1.48 -r1.49 src/sys/compat/netbsd32/files.netbsd32 cvs rdiff -u -r1.123 -r1.124 src/sys/compat/netbsd32/netbsd32.h cvs rdiff -u -r0 -r1.1 src/sys/compat/netbsd32/netbsd32_compat_90.c cvs rdiff -u -r1.38 -r1.39 src/sys/compat/netbsd32/netbsd32_conv.h cvs rdiff -u -r1.83 -r1.84 src/sys/compat/netbsd32/netbsd32_fs.c cvs rdiff -u -r1.16 -r1.17 src/sys/compat/netbsd32/syscalls.conf cvs rdiff -u -r1.127 -r1.128 src/sys/compat/netbsd32/syscalls.master cvs rdiff -u -r0 -r1.1 src/sys/conf/compat_netbsd90.config cvs rdiff -u -r1.1239 -r1.1240 src/sys/conf/files cvs rdiff -u -r1.323 -r1.324 src/sys/kern/init_sysent.c cvs rdiff -u -r1.29 -r1.30 src/sys/kern/syscalls.conf cvs rdiff -u -r1.295 -r1.296 src/sys/kern/syscalls.master cvs rdiff -u -r1.471 -r1.472 src/sys/kern/vfs_subr.c cvs rdiff -u -r1.535 -r1.536 src/sys/kern/vfs_syscalls.c cvs rdiff -u -r1.175 -r1.176 src/sys/miscfs/specfs/spec_vnops.c cvs rdiff -u -r1.226 -r1.227 src/sys/modules/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/compat_90/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/compat_netbsd32_90/Makefile cvs rdiff -u -r1.612 -r1.613 src/sys/sys/param.h cvs rdiff -u -r1.18 -r1.19 src/sys/sys/statvfs.h cvs rdiff -u -r1.43 -r1.44 src/usr.bin/ktruss/dump.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/examples/npf
Module Name:src Committed By: sevan Date: Sun Sep 22 19:51:18 UTC 2019 Modified Files: src/share/examples/npf: soho_gw-npf.conf Log Message: Add support for blacklistd To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/share/examples/npf/soho_gw-npf.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/examples/npf
Module Name:src Committed By: sevan Date: Sun Sep 22 19:51:18 UTC 2019 Modified Files: src/share/examples/npf: soho_gw-npf.conf Log Message: Add support for blacklistd To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/share/examples/npf/soho_gw-npf.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/examples/npf/soho_gw-npf.conf diff -u src/share/examples/npf/soho_gw-npf.conf:1.18 src/share/examples/npf/soho_gw-npf.conf:1.19 --- src/share/examples/npf/soho_gw-npf.conf:1.18 Sun Sep 22 19:30:15 2019 +++ src/share/examples/npf/soho_gw-npf.conf Sun Sep 22 19:51:18 2019 @@ -1,4 +1,4 @@ -# $NetBSD: soho_gw-npf.conf,v 1.18 2019/09/22 19:30:15 sevan Exp $ +# $NetBSD: soho_gw-npf.conf,v 1.19 2019/09/22 19:51:18 sevan Exp $ # # SOHO border # @@ -42,6 +42,9 @@ group "external" on $ext_if { # Block inbound traffic from those on the block table block in from + # Placeholder for blacklistd (configuration separate) to add blocked hosts + ruleset "blacklistd" + # Allow inbound SSH and log all connection attempts pass stateful in family inet4 proto tcp to $ext_v4 port ssh \ apply "log"
CVS commit: src/share/examples/npf
Module Name:src Committed By: sevan Date: Sun Sep 22 19:30:16 UTC 2019 Modified Files: src/share/examples/npf: soho_gw-npf.conf Log Message: Passive FTP works as a client without this and we're not hosting an FTP server (port are not listed in services_tcp) To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/share/examples/npf/soho_gw-npf.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/examples/npf/soho_gw-npf.conf diff -u src/share/examples/npf/soho_gw-npf.conf:1.17 src/share/examples/npf/soho_gw-npf.conf:1.18 --- src/share/examples/npf/soho_gw-npf.conf:1.17 Sat Sep 21 23:55:01 2019 +++ src/share/examples/npf/soho_gw-npf.conf Sun Sep 22 19:30:15 2019 @@ -1,4 +1,4 @@ -# $NetBSD: soho_gw-npf.conf,v 1.17 2019/09/21 23:55:01 sevan Exp $ +# $NetBSD: soho_gw-npf.conf,v 1.18 2019/09/22 19:30:15 sevan Exp $ # # SOHO border # @@ -52,9 +52,6 @@ group "external" on $ext_if { # Allow inbound traffic for services hosted on UDP pass stateful in proto udp to $ext_addrs port $services_udp - # Passive FTP - pass stateful in proto tcp to $ext_addrs port 49151-65535 - # Allow being tracerouted pass stateful in proto udp to $ext_addrs port 33434-33600 }
CVS commit: src/share/examples/npf
Module Name:src Committed By: sevan Date: Sun Sep 22 19:30:16 UTC 2019 Modified Files: src/share/examples/npf: soho_gw-npf.conf Log Message: Passive FTP works as a client without this and we're not hosting an FTP server (port are not listed in services_tcp) To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/share/examples/npf/soho_gw-npf.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: brad Date: Sun Sep 22 18:45:20 UTC 2019 Modified Files: src/distrib/sets/lists/base: shl.mi src/external/cddl/osnet/lib/libavl: Makefile src/external/cddl/osnet/lib/libnvpair: Makefile src/external/cddl/osnet/lib/libumem: Makefile src/external/cddl/osnet/lib/libuutil: Makefile src/external/cddl/osnet/lib/libzfs: Makefile src/external/cddl/osnet/lib/libzfs_core: Makefile src/external/cddl/osnet/lib/libzpool: Makefile src/lib/libpthread: Makefile Log Message: Add USE_SHLIBDIR=yes to a number of Makefiles for the libraries used by /sbin/{zfs,zpool,mount_zfs}. The general effect is to move them from /usr/lib to /lib. Compatibility links are installed in /usr/lib and nothing that is installed, say in /usr/pkg, appears to break. With this, it is possible to have a /var and /usr mount using ZFS legacy mounting early on in the boot process. Run tested on amd64 and i386 and compile tested on evbarm. To generate a diff of this commit: cvs rdiff -u -r1.870 -r1.871 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/lib/libavl/Makefile cvs rdiff -u -r1.10 -r1.11 src/external/cddl/osnet/lib/libnvpair/Makefile cvs rdiff -u -r1.6 -r1.7 src/external/cddl/osnet/lib/libumem/Makefile cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/lib/libuutil/Makefile cvs rdiff -u -r1.9 -r1.10 src/external/cddl/osnet/lib/libzfs/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/lib/libzfs_core/Makefile cvs rdiff -u -r1.12 -r1.13 src/external/cddl/osnet/lib/libzpool/Makefile cvs rdiff -u -r1.94 -r1.95 src/lib/libpthread/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: brad Date: Sun Sep 22 18:45:20 UTC 2019 Modified Files: src/distrib/sets/lists/base: shl.mi src/external/cddl/osnet/lib/libavl: Makefile src/external/cddl/osnet/lib/libnvpair: Makefile src/external/cddl/osnet/lib/libumem: Makefile src/external/cddl/osnet/lib/libuutil: Makefile src/external/cddl/osnet/lib/libzfs: Makefile src/external/cddl/osnet/lib/libzfs_core: Makefile src/external/cddl/osnet/lib/libzpool: Makefile src/lib/libpthread: Makefile Log Message: Add USE_SHLIBDIR=yes to a number of Makefiles for the libraries used by /sbin/{zfs,zpool,mount_zfs}. The general effect is to move them from /usr/lib to /lib. Compatibility links are installed in /usr/lib and nothing that is installed, say in /usr/pkg, appears to break. With this, it is possible to have a /var and /usr mount using ZFS legacy mounting early on in the boot process. Run tested on amd64 and i386 and compile tested on evbarm. To generate a diff of this commit: cvs rdiff -u -r1.870 -r1.871 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/lib/libavl/Makefile cvs rdiff -u -r1.10 -r1.11 src/external/cddl/osnet/lib/libnvpair/Makefile cvs rdiff -u -r1.6 -r1.7 src/external/cddl/osnet/lib/libumem/Makefile cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/lib/libuutil/Makefile cvs rdiff -u -r1.9 -r1.10 src/external/cddl/osnet/lib/libzfs/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/lib/libzfs_core/Makefile cvs rdiff -u -r1.12 -r1.13 src/external/cddl/osnet/lib/libzpool/Makefile cvs rdiff -u -r1.94 -r1.95 src/lib/libpthread/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.870 src/distrib/sets/lists/base/shl.mi:1.871 --- src/distrib/sets/lists/base/shl.mi:1.870 Fri Sep 6 11:12:06 2019 +++ src/distrib/sets/lists/base/shl.mi Sun Sep 22 18:45:19 2019 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.870 2019/09/06 11:12:06 christos Exp $ +# $NetBSD: shl.mi,v 1.871 2019/09/22 18:45:19 brad Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -13,6 +13,9 @@ # # Note: libtermcap and libtermlib are hardlinked and share the same version. # +./lib/libavl.so base-zfs-shlib dynamicroot,zfs +./lib/libavl.so.0base-zfs-shlib dynamicroot,zfs +./lib/libavl.so.0.0 base-zfs-shlib dynamicroot,zfs ./lib/libblacklist.sobase-sys-shlib dynamicroot ./lib/libblacklist.so.0base-sys-shlib dynamicroot ./lib/libblacklist.so.0.0 base-sys-shlib dynamicroot @@ -60,6 +63,9 @@ ./lib/libnpf.so base-npf-shlib dynamicroot,npf ./lib/libnpf.so.0base-npf-shlib dynamicroot,npf ./lib/libnpf.so.0.1base-npf-shlib dynamicroot,npf +./lib/libnvpair.sobase-zfs-shlib dynamicroot,zfs +./lib/libnvpair.so.0base-zfs-shlib dynamicroot,zfs +./lib/libnvpair.so.0.0base-zfs-shlib dynamicroot,zfs ./lib/libpcap.sobase-sys-shlib dynamicroot ./lib/libpcap.so.7base-sys-shlib dynamicroot ./lib/libpcap.so.7.0base-sys-shlib dynamicroot @@ -69,6 +75,9 @@ ./lib/libprop.sobase-sys-shlib dynamicroot ./lib/libprop.so.1base-sys-shlib dynamicroot ./lib/libprop.so.1.1base-sys-shlib dynamicroot +./lib/libpthread.sobase-sys-shlib dynamicroot +./lib/libpthread.so.1base-sys-shlib dynamicroot +./lib/libpthread.so.1.4base-sys-shlib dynamicroot ./lib/libradius.sobase-sys-shlib dynamicroot ./lib/libradius.so.4base-sys-shlib dynamicroot ./lib/libradius.so.4.0base-sys-shlib dynamicroot @@ -87,12 +96,27 @@ ./lib/libtermlib.sobase-sys-shlib dynamicroot ./lib/libtermlib.so.0base-sys-shlib dynamicroot ./lib/libtermlib.so.0.6base-sys-shlib dynamicroot +./lib/libumem.sobase-zfs-shlib dynamicroot,zfs +./lib/libumem.so.0base-zfs-shlib dynamicroot,zfs +./lib/libumem.so.0.0base-zfs-shlib dynamicroot,zfs ./lib/libutil.sobase-sys-shlib dynamicroot ./lib/libutil.so.7base-sys-shlib dynamicroot ./lib/libutil.so.7.24base-sys-shlib dynamicroot +./lib/libuutil.sobase-zfs-shlib dynamicroot,zfs +./lib/libuutil.so.0base-zfs-shlib dynamicroot,zfs +./lib/libuutil.so.0.0base-zfs-shlib dynamicroot,zfs ./lib/libz.so base-sys-shlib dynamicroot ./lib/libz.so.1 base-sys-shlib dynamicroot ./lib/libz.so.1.0base-sys-shlib dynamicroot +./lib/libzfs.so base-zfs-shlib dynamicroot,zfs +./lib/libzfs.so.0base-zfs-shlib dynamicroot,zfs +./lib/libzfs.so.0.0base-zfs-shlib dynamicroot,zfs +./lib/libzfs_core.sobase-zfs-shlib dynamicroot,zfs +./lib/libzfs_core.so.0base-zfs-shlib dynamicroot,zfs +./lib/libzfs_core.so.0.0 base-zfs-shlib dynamicroot,zfs +./lib/libzpool.sobase-zfs-shlib dynamicroot,zfs +./lib/libzpool.so.0
CVS commit: src/sys/arch/arm/acpi
Module Name:src Committed By: jmcneill Date: Sun Sep 22 18:31:59 UTC 2019 Modified Files: src/sys/arch/arm/acpi: acpi_platform.c files.acpi Added Files: src/sys/arch/arm/acpi: acpi_simplefb.c acpi_simplefb.h Log Message: Use vcons for simplefb preattach to speed up early console messages. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/acpi/acpi_platform.c cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/acpi/acpi_simplefb.c \ src/sys/arch/arm/acpi/acpi_simplefb.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/acpi/files.acpi 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/acpi/acpi_platform.c diff -u src/sys/arch/arm/acpi/acpi_platform.c:1.17 src/sys/arch/arm/acpi/acpi_platform.c:1.18 --- src/sys/arch/arm/acpi/acpi_platform.c:1.17 Mon Aug 19 10:53:31 2019 +++ src/sys/arch/arm/acpi/acpi_platform.c Sun Sep 22 18:31:59 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_platform.c,v 1.17 2019/08/19 10:53:31 jmcneill Exp $ */ +/* $NetBSD: acpi_platform.c,v 1.18 2019/09/22 18:31:59 jmcneill Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: acpi_platform.c,v 1.17 2019/08/19 10:53:31 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_platform.c,v 1.18 2019/09/22 18:31:59 jmcneill Exp $"); #include #include @@ -73,12 +73,8 @@ __KERNEL_RCSID(0, "$NetBSD: acpi_platfor #include #endif -#if NWSDISPLAY > 0 -#include -#include -#include -#include -#include +#if NWSDISPLAY > 0 && NGENFB > 0 +#include #endif #ifdef EFI_RUNTIME @@ -134,107 +130,6 @@ acpi_platform_bootstrap(void) acpi_coherent_dma_tag._nranges = __arraycount(acpi_coherent_ranges); } -#if NWSDISPLAY > 0 && NGENFB > 0 -static struct wsscreen_descr acpi_platform_stdscreen = { - .name = "std", - .ncols = 0, - .nrows = 0, - .textops = NULL, - .fontwidth = 0, - .fontheight = 0, - .capabilities = 0, - .modecookie = NULL -}; - -static struct vcons_screen acpi_platform_screen; - -static int -acpi_platform_find_simplefb(void) -{ - static const char * simplefb_compatible[] = { "simple-framebuffer", NULL }; - int chosen_phandle, child; - - chosen_phandle = OF_finddevice("/chosen"); - if (chosen_phandle == -1) - return -1; - - for (child = OF_child(chosen_phandle); child; child = OF_peer(child)) { - if (!fdtbus_status_okay(child)) - continue; - if (!of_match_compatible(child, simplefb_compatible)) - continue; - - return child; - } - - return -1; -} - -static void -acpi_platform_wsdisplay_preattach(void) -{ - struct rasops_info *ri = _platform_screen.scr_ri; - bus_space_tag_t bst = _generic_bs_tag; - bus_space_handle_t bsh; - uint32_t width, height, stride; - const char *format; - bus_addr_t addr; - bus_size_t size; - uint16_t depth; - long defattr; - - memset(_platform_screen, 0, sizeof(acpi_platform_screen)); - - const int phandle = acpi_platform_find_simplefb(); - if (phandle == -1) - return; - - if (fdtbus_get_reg(phandle, 0, , ) != 0 || size == 0) - return; - - if (of_getprop_uint32(phandle, "width", ) != 0 || - of_getprop_uint32(phandle, "height", ) != 0 || - of_getprop_uint32(phandle, "stride", ) != 0 || - (format = fdtbus_get_string(phandle, "format")) == NULL) - return; - - if (strcmp(format, "a8b8g8r8") == 0 || - strcmp(format, "x8r8g8b8") == 0) { - depth = 32; - } else if (strcmp(format, "r5g6b5") == 0) { - depth = 16; - } else { - return; - } - - if (bus_space_map(bst, addr, size, - BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE, ) != 0) - return; - - wsfont_init(); - - ri->ri_width = width; - ri->ri_height = height; - ri->ri_depth = depth; - ri->ri_stride = stride; - ri->ri_bits = bus_space_vaddr(bst, bsh); - ri->ri_flg = RI_CENTER | RI_FULLCLEAR | RI_CLEAR; - rasops_init(ri, ri->ri_height / 8, ri->ri_width / 8); - ri->ri_caps = WSSCREEN_WSCOLORS; - rasops_reconfig(ri, ri->ri_height / ri->ri_font->fontheight, - ri->ri_width / ri->ri_font->fontwidth); - - acpi_platform_stdscreen.nrows = ri->ri_rows; - acpi_platform_stdscreen.ncols = ri->ri_cols; - acpi_platform_stdscreen.textops = >ri_ops; - acpi_platform_stdscreen.capabilities = ri->ri_caps; - - ri->ri_ops.allocattr(ri, 0, 0, 0, ); - - wsdisplay_preattach(_platform_stdscreen, ri, 0, 0, defattr); -} -#endif - static void acpi_platform_startup(void) { @@ -309,13 +204,6 @@ acpi_platform_startup(void) } /* - * Setup framebuffer console, if present. - */ -#if NWSDISPLAY > 0 && NGENFB > 0 - acpi_platform_wsdisplay_preattach(); -#endif - - /* * Initialize PSCI 0.2+ if implemented */ if (ACPI_SUCCESS(acpi_table_find(ACPI_SIG_FADT, (void ** { @@ -361,6 +249,15 @@ acpi_platform_init_attach_args(struct fd static void acpi_platform_device_register(device_t self, void *aux) { +#if NWSDISPLAY > 0 && NGENFB > 0 + if (device_is_a(self, "armfdt")) { + /* + * Setup
CVS commit: src/sys/arch/arm/acpi
Module Name:src Committed By: jmcneill Date: Sun Sep 22 18:31:59 UTC 2019 Modified Files: src/sys/arch/arm/acpi: acpi_platform.c files.acpi Added Files: src/sys/arch/arm/acpi: acpi_simplefb.c acpi_simplefb.h Log Message: Use vcons for simplefb preattach to speed up early console messages. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/acpi/acpi_platform.c cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/acpi/acpi_simplefb.c \ src/sys/arch/arm/acpi/acpi_simplefb.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/acpi/files.acpi 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: ryo Date: Sun Sep 22 16:41:19 UTC 2019 Modified Files: src/sys/dev/ic: rtl8169.c rtl81x9var.h Log Message: 8168H model didn't link up well. some models seems to require to enable TX/RX after configuration. RTKQ_TXRXEN_LATER quirk flag added. it may be able to unify with RTKQ_RXDV_GATED flag? To generate a diff of this commit: cvs rdiff -u -r1.159 -r1.160 src/sys/dev/ic/rtl8169.c cvs rdiff -u -r1.56 -r1.57 src/sys/dev/ic/rtl81x9var.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/ic/rtl8169.c diff -u src/sys/dev/ic/rtl8169.c:1.159 src/sys/dev/ic/rtl8169.c:1.160 --- src/sys/dev/ic/rtl8169.c:1.159 Thu May 30 02:32:18 2019 +++ src/sys/dev/ic/rtl8169.c Sun Sep 22 16:41:19 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rtl8169.c,v 1.159 2019/05/30 02:32:18 msaitoh Exp $ */ +/* $NetBSD: rtl8169.c,v 1.160 2019/09/22 16:41:19 ryo Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.159 2019/05/30 02:32:18 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.160 2019/09/22 16:41:19 ryo Exp $"); /* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */ /* @@ -607,12 +607,16 @@ re_attach(struct rtk_softc *sc) sc->sc_quirk |= RTKQ_NOJUMBO; break; case RTK_HWREV_8168E: - case RTK_HWREV_8168H: case RTK_HWREV_8168H_SPIN1: sc->sc_quirk |= RTKQ_DESCV2 | RTKQ_NOEECMD | RTKQ_MACSTAT | RTKQ_CMDSTOP | RTKQ_PHYWAKE_PM | RTKQ_NOJUMBO; break; + case RTK_HWREV_8168H: + sc->sc_quirk |= RTKQ_DESCV2 | RTKQ_NOEECMD | + RTKQ_MACSTAT | RTKQ_CMDSTOP | RTKQ_PHYWAKE_PM | + RTKQ_NOJUMBO | RTKQ_RXDV_GATED | RTKQ_TXRXEN_LATER; + break; case RTK_HWREV_8168E_VL: case RTK_HWREV_8168F: sc->sc_quirk |= RTKQ_DESCV2 | RTKQ_NOEECMD | @@ -1873,7 +1877,8 @@ re_init(struct ifnet *ifp) /* * Enable transmit and receive. */ - CSR_WRITE_1(sc, RTK_COMMAND, RTK_CMD_TX_ENB | RTK_CMD_RX_ENB); + if ((sc->sc_quirk & RTKQ_TXRXEN_LATER) == 0) + CSR_WRITE_1(sc, RTK_COMMAND, RTK_CMD_TX_ENB | RTK_CMD_RX_ENB); /* * Set the initial TX and RX configuration. @@ -1915,6 +1920,12 @@ re_init(struct ifnet *ifp) rtk_setmulti(sc); /* + * some chips require to enable TX/RX *AFTER* TX/RX configuration + */ + if ((sc->sc_quirk & RTKQ_TXRXEN_LATER) != 0) + CSR_WRITE_1(sc, RTK_COMMAND, RTK_CMD_TX_ENB | RTK_CMD_RX_ENB); + + /* * Enable interrupts. */ if (sc->re_testmode) Index: src/sys/dev/ic/rtl81x9var.h diff -u src/sys/dev/ic/rtl81x9var.h:1.56 src/sys/dev/ic/rtl81x9var.h:1.57 --- src/sys/dev/ic/rtl81x9var.h:1.56 Wed Apr 19 00:20:02 2017 +++ src/sys/dev/ic/rtl81x9var.h Sun Sep 22 16:41:19 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rtl81x9var.h,v 1.56 2017/04/19 00:20:02 jmcneill Exp $ */ +/* $NetBSD: rtl81x9var.h,v 1.57 2019/09/22 16:41:19 ryo Exp $ */ /* * Copyright (c) 1997, 1998 @@ -194,6 +194,7 @@ struct rtk_softc { #define RTKQ_PHYWAKE_PM 0x0400 /* wake PHY from power down */ #define RTKQ_RXDV_GATED 0x0800 #define RTKQ_IM_HW 0x1000 /* HW interrupt mitigation */ +#define RTKQ_TXRXEN_LATER 0x2000 /* TX/RX enable timing */ bus_dma_tag_t sc_dmat;
CVS commit: src/sys/dev/ic
Module Name:src Committed By: ryo Date: Sun Sep 22 16:41:19 UTC 2019 Modified Files: src/sys/dev/ic: rtl8169.c rtl81x9var.h Log Message: 8168H model didn't link up well. some models seems to require to enable TX/RX after configuration. RTKQ_TXRXEN_LATER quirk flag added. it may be able to unify with RTKQ_RXDV_GATED flag? To generate a diff of this commit: cvs rdiff -u -r1.159 -r1.160 src/sys/dev/ic/rtl8169.c cvs rdiff -u -r1.56 -r1.57 src/sys/dev/ic/rtl81x9var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sun Sep 22 14:29:48 UTC 2019 Modified Files: src/doc [netbsd-9]: CHANGES-9.0 Log Message: Tickets #210 - #228 To generate a diff of this commit: cvs rdiff -u -r1.1.2.54 -r1.1.2.55 src/doc/CHANGES-9.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.0 diff -u src/doc/CHANGES-9.0:1.1.2.54 src/doc/CHANGES-9.0:1.1.2.55 --- src/doc/CHANGES-9.0:1.1.2.54 Wed Sep 18 16:10:18 2019 +++ src/doc/CHANGES-9.0 Sun Sep 22 14:29:48 2019 @@ -1,4 +1,5 @@ -# $NetBSD: CHANGES-9.0,v 1.1.2.54 2019/09/18 16:10:18 martin Exp $ + +# $NetBSD: CHANGES-9.0,v 1.1.2.55 2019/09/22 14:29:48 martin Exp $ A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30 until the 9.0 release: @@ -3752,3 +3753,110 @@ libexec/ld.elf_so/rtld.c 1.198 dl_iterate_phdr(3): do not skip the ELF loader dl_phdr_info. [kamil, ticket #209] +usr.sbin/installboot/evboards.c 1.3 +usr.sbin/installboot/evboards.h 1.2 + + Add support for additional install step directives to enable using + installboot(8) to write u-boot images to SPI NOR and other types of + raw flash devices. + Add the ability to create aliases for install objects. + [thorpej, ticket #210] + +etc/MAKEDEV.tmpl1.208 + + Create the character device for spiflash, in addition to the + block device. + [thorpej, ticket #211] + +sys/netinet6/nd6_nbr.c1.173 + + nd6: remove extra pserialize_read_exit. + [ozaki-r, ticket #212] + +sys/arch/aarch64/aarch64/cpufunc_asm_armv8.S 1.4 + + Add missing isb after tlbi op, it is required even for + non-MULTIPROCESSOR kernels. + [ryo, ticket #213] + +sys/arch/aarch64/aarch64/pmap.c 1.44,1.46 + + Remove incorrect KASSERT and fix updating page reference flags + when only PROT_WRITE or PROT_EXECUTE are specified. + [ryo, ticket #214] + +sys/arch/aarch64/aarch64/aarch64_machdep.c 1.29-1.31 + + Do not assume that DRAM is linear when creating KSEG mappings. + Use L1-L3 blocks/pages to fit dramblocks exactly. + [ryo, ticket #215] + +sys/dev/pci/if_age.c1.61 + + Fix increment/decrement mistake in a for() loop. + [maxv, ticket #216] + +sys/dev/ic/i82557.c1.155 + + Fix increment vs. decrement mistake in a for() loop. + [maxv, ticket #217] + +sys/dev/ic/nvme.c1.45 + + Don't set Phase Tag bit of Completion Queue entry at nvme_poll_done(), + fixing PR kern/54275, PR kern/54503 and PR kern/54532. + [nonaka, ticket #218] + +share/man/man5/mk.conf.5 1.79 + + MKZFS is no longer the default on i386. + [gson, ticket #219] + +sys/arch/arm/amlogic/meson8b_clkc.c 1.5 + + Use correct register for mpll2_div clock. + [jmcneill, ticket #220] + +sys/arch/aarch64/aarch64/cpufunc.c 1.6 + + Do not attempt to change coherency_unit at runtime. + [jmcneill, ticket #221] + +sys/arch/arm/cortex/gicv3.c 1.21 + + Use pic_do_pending_ints in intr handler, sprinkle isb and + fix PMR bits detection on eMAG. + [jmcneill, ticket #222] + +sys/external/bsd/drm/dist/shared-core/savage_state.c 1.5 + + Mark FALLTHROUGH case labels so this can be compiled with newer gcc + versions. + [hauke, ticket #223] + +sys/arch/evbarm/conf/std.generic64 1.11 + + Add __HAVE_GENERIC_CPU_INITCLOCKS. + [jmcneill, ticket #224] + +sys/stand/efiboot/efiblock.c 1.6 + + Honour block device's IO alignment requirements. + [jmcneill, ticket #225] + +sys/arch/aarch64/aarch64/locore.S 1.40 + + Map device memory for early console XN. + [jmcneill, ticket #226] + +sys/arch/arm/acpi/gicv3_acpi.c 1.4 + + Redistributors with virtual LPI support have larger register spaces. + Take this into consideration when scanning LPI regions. + [jmcneill, ticket #227] + +external/mit/expat/lib/libexpat/expat_config.h 1.7 + + Actually define BYTEORDER since it is used. + [maya, ticket #228] +
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sun Sep 22 14:29:48 UTC 2019 Modified Files: src/doc [netbsd-9]: CHANGES-9.0 Log Message: Tickets #210 - #228 To generate a diff of this commit: cvs rdiff -u -r1.1.2.54 -r1.1.2.55 src/doc/CHANGES-9.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: jmcneill Date: Sun Sep 22 13:57:55 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64: pmap.c Log Message: Disable translation table walks using TTBR0 while changing its value and when deactivating a pmap. Fixes stability issues on Ampere eMAG CPUs. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/arch/aarch64/aarch64/pmap.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/aarch64/aarch64
Module Name:src Committed By: jmcneill Date: Sun Sep 22 13:57:55 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64: pmap.c Log Message: Disable translation table walks using TTBR0 while changing its value and when deactivating a pmap. Fixes stability issues on Ampere eMAG CPUs. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/arch/aarch64/aarch64/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/pmap.c diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.46 src/sys/arch/aarch64/aarch64/pmap.c:1.47 --- src/sys/arch/aarch64/aarch64/pmap.c:1.46 Fri Sep 20 05:35:27 2019 +++ src/sys/arch/aarch64/aarch64/pmap.c Sun Sep 22 13:57:55 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.46 2019/09/20 05:35:27 ryo Exp $ */ +/* $NetBSD: pmap.c,v 1.47 2019/09/22 13:57:55 jmcneill Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.46 2019/09/20 05:35:27 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.47 2019/09/22 13:57:55 jmcneill Exp $"); #include "opt_arm_debug.h" #include "opt_ddb.h" @@ -1274,7 +1274,7 @@ void pmap_activate(struct lwp *l) { struct pmap *pm = l->l_proc->p_vmspace->vm_map.pmap; - uint64_t ttbr0; + uint64_t ttbr0, tcr; UVMHIST_FUNC(__func__); UVMHIST_CALLED(pmaphist); @@ -1288,6 +1288,11 @@ pmap_activate(struct lwp *l) UVMHIST_LOG(pmaphist, "lwp=%p (pid=%d)", l, l->l_proc->p_pid, 0, 0); + /* Disable translation table walks using TTBR0 */ + tcr = reg_tcr_el1_read(); + reg_tcr_el1_write(tcr | TCR_EPD0); + __asm __volatile("isb" ::: "memory"); + /* XXX */ CTASSERT(PID_MAX <= 65535); /* 16bit ASID */ if (pm->pm_asid == -1) @@ -1296,6 +1301,11 @@ pmap_activate(struct lwp *l) ttbr0 = ((uint64_t)pm->pm_asid << 48) | pm->pm_l0table_pa; cpu_set_ttbr0(ttbr0); + /* Re-enable translation table walks using TTBR0 */ + tcr = reg_tcr_el1_read(); + reg_tcr_el1_write(tcr & ~TCR_EPD0); + __asm __volatile("isb" ::: "memory"); + pm->pm_activated = true; PMAP_COUNT(activate); @@ -1305,6 +1315,7 @@ void pmap_deactivate(struct lwp *l) { struct pmap *pm = l->l_proc->p_vmspace->vm_map.pmap; + uint64_t tcr; UVMHIST_FUNC(__func__); UVMHIST_CALLED(pmaphist); @@ -1314,6 +1325,11 @@ pmap_deactivate(struct lwp *l) UVMHIST_LOG(pmaphist, "lwp=%p, asid=%d", l, pm->pm_asid, 0, 0); + /* Disable translation table walks using TTBR0 */ + tcr = reg_tcr_el1_read(); + reg_tcr_el1_write(tcr | TCR_EPD0); + __asm __volatile("isb" ::: "memory"); + /* XXX */ pm->pm_activated = false;
CVS commit: src/etc
Module Name:src Committed By: gson Date: Sun Sep 22 13:08:10 UTC 2019 Modified Files: src/etc: Makefile Log Message: Don't mix tabs and spaces To generate a diff of this commit: cvs rdiff -u -r1.439 -r1.440 src/etc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc
Module Name:src Committed By: gson Date: Sun Sep 22 13:08:10 UTC 2019 Modified Files: src/etc: Makefile Log Message: Don't mix tabs and spaces To generate a diff of this commit: cvs rdiff -u -r1.439 -r1.440 src/etc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/Makefile diff -u src/etc/Makefile:1.439 src/etc/Makefile:1.440 --- src/etc/Makefile:1.439 Wed Jul 31 18:35:58 2019 +++ src/etc/Makefile Sun Sep 22 13:08:10 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.439 2019/07/31 18:35:58 martin Exp $ +# $NetBSD: Makefile,v 1.440 2019/09/22 13:08:10 gson Exp $ # from: @(#)Makefile 8.7 (Berkeley) 5/25/95 # Environment variables without default values: @@ -343,7 +343,7 @@ install-etc-files: .PHONY .MAKE check_DE ${_MKMSG_INSTALL} ${DESTDIR}${file} if [ ! -e ${DESTDIR}${file} -o -s ${DESTDIR}${file} ]; then \ ${ETC_INSTALL_FILE} -o ${owner} -g ${group} -m ${mode} \ - /dev/null ${DESTDIR}${file}; \ + /dev/null ${DESTDIR}${file}; \ else true; fi .endfor .for subdir in . defaults autofs bluetooth iscsi mtree namedb pam.d powerd rc.d root skel ssh
CVS commit: src/sys/ddb
Module Name:src Committed By: mrg Date: Sun Sep 22 12:57:34 UTC 2019 Modified Files: src/sys/ddb: db_command.c Log Message: fix "show kernhist". set addr = 0 if we don't have_addr and avoid using random garbage in addr. To generate a diff of this commit: cvs rdiff -u -r1.160 -r1.161 src/sys/ddb/db_command.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/ddb
Module Name:src Committed By: mrg Date: Sun Sep 22 12:57:34 UTC 2019 Modified Files: src/sys/ddb: db_command.c Log Message: fix "show kernhist". set addr = 0 if we don't have_addr and avoid using random garbage in addr. To generate a diff of this commit: cvs rdiff -u -r1.160 -r1.161 src/sys/ddb/db_command.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/ddb/db_command.c diff -u src/sys/ddb/db_command.c:1.160 src/sys/ddb/db_command.c:1.161 --- src/sys/ddb/db_command.c:1.160 Mon Sep 17 01:49:54 2018 +++ src/sys/ddb/db_command.c Sun Sep 22 12:57:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: db_command.c,v 1.160 2018/09/17 01:49:54 kre Exp $ */ +/* $NetBSD: db_command.c,v 1.161 2019/09/22 12:57:34 mrg Exp $ */ /* * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.160 2018/09/17 01:49:54 kre Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.161 2019/09/22 12:57:34 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_aio.h" @@ -1241,6 +1241,8 @@ db_kernhist_print_cmd(db_expr_t addr, bo db_expr_t count, const char *modif) { + if (!have_addr) + addr = 0; kernhist_print((void *)(uintptr_t)addr, count, modif, db_printf); } #endif
CVS commit: [netbsd-9] src/external/mit/expat/lib/libexpat
Module Name:src Committed By: martin Date: Sun Sep 22 12:44:05 UTC 2019 Modified Files: src/external/mit/expat/lib/libexpat [netbsd-9]: expat_config.h Log Message: Pull up following revision(s) (requested by maya in ticket #228): external/mit/expat/lib/libexpat/expat_config.h: revision 1.7 Actually define BYTEORDER since it is used. To generate a diff of this commit: cvs rdiff -u -r1.4.14.1 -r1.4.14.2 \ src/external/mit/expat/lib/libexpat/expat_config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/external/mit/expat/lib/libexpat
Module Name:src Committed By: martin Date: Sun Sep 22 12:44:05 UTC 2019 Modified Files: src/external/mit/expat/lib/libexpat [netbsd-9]: expat_config.h Log Message: Pull up following revision(s) (requested by maya in ticket #228): external/mit/expat/lib/libexpat/expat_config.h: revision 1.7 Actually define BYTEORDER since it is used. To generate a diff of this commit: cvs rdiff -u -r1.4.14.1 -r1.4.14.2 \ src/external/mit/expat/lib/libexpat/expat_config.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/mit/expat/lib/libexpat/expat_config.h diff -u src/external/mit/expat/lib/libexpat/expat_config.h:1.4.14.1 src/external/mit/expat/lib/libexpat/expat_config.h:1.4.14.2 --- src/external/mit/expat/lib/libexpat/expat_config.h:1.4.14.1 Tue Sep 17 19:51:15 2019 +++ src/external/mit/expat/lib/libexpat/expat_config.h Sun Sep 22 12:44:05 2019 @@ -4,6 +4,10 @@ /* Define if building universal (internal helper macro) */ /* #undef AC_APPLE_UNIVERSAL_BUILD */ +/* 1234 = LILENDIAN, 4321 = BIGENDIAN */ +#include +#define BYTEORDER _BYTE_ORDER + /* Define to 1 if you have the `arc4random' function. */ /* #undef HAVE_ARC4RANDOM */
CVS commit: [netbsd-9] src/sys/arch/arm/acpi
Module Name:src Committed By: martin Date: Sun Sep 22 12:42:12 UTC 2019 Modified Files: src/sys/arch/arm/acpi [netbsd-9]: gicv3_acpi.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #227): sys/arch/arm/acpi/gicv3_acpi.c: revision 1.4 Redistributors with virtual LPI support have larger register spaces. Take this into consideration when scanning LPI regions. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.8.1 src/sys/arch/arm/acpi/gicv3_acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/acpi/gicv3_acpi.c diff -u src/sys/arch/arm/acpi/gicv3_acpi.c:1.3 src/sys/arch/arm/acpi/gicv3_acpi.c:1.3.8.1 --- src/sys/arch/arm/acpi/gicv3_acpi.c:1.3 Mon Nov 12 12:56:05 2018 +++ src/sys/arch/arm/acpi/gicv3_acpi.c Sun Sep 22 12:42:12 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: gicv3_acpi.c,v 1.3 2018/11/12 12:56:05 jmcneill Exp $ */ +/* $NetBSD: gicv3_acpi.c,v 1.3.8.1 2019/09/22 12:42:12 martin Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #define _INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: gicv3_acpi.c,v 1.3 2018/11/12 12:56:05 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gicv3_acpi.c,v 1.3.8.1 2019/09/22 12:42:12 martin Exp $"); #include #include @@ -200,6 +200,10 @@ gicv3_acpi_map_gicr(ACPI_SUBTABLE_HEADER const uint32_t typer = bus_space_read_4(sc->sc_gic.sc_bst, sc->sc_gic.sc_bsh_r[redist], GICR_TYPER); if (typer & GICR_TYPER_Last) break; + + /* If the redistributor supports virtual LPIs, skip the VLPI register region */ + if (typer & GICR_TYPER_VLPIS) + off += GICR_SIZE; } return AE_OK;
CVS commit: [netbsd-9] src/sys/arch/arm/acpi
Module Name:src Committed By: martin Date: Sun Sep 22 12:42:12 UTC 2019 Modified Files: src/sys/arch/arm/acpi [netbsd-9]: gicv3_acpi.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #227): sys/arch/arm/acpi/gicv3_acpi.c: revision 1.4 Redistributors with virtual LPI support have larger register spaces. Take this into consideration when scanning LPI regions. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.8.1 src/sys/arch/arm/acpi/gicv3_acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/aarch64/aarch64
Module Name:src Committed By: martin Date: Sun Sep 22 12:39:36 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64 [netbsd-9]: locore.S Log Message: Pull up following revision(s) (requested by jmcneill in ticket #226): sys/arch/aarch64/aarch64/locore.S: revision 1.40 Map device memory for early console XN To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.39.2.1 src/sys/arch/aarch64/aarch64/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/locore.S diff -u src/sys/arch/aarch64/aarch64/locore.S:1.39 src/sys/arch/aarch64/aarch64/locore.S:1.39.2.1 --- src/sys/arch/aarch64/aarch64/locore.S:1.39 Wed Jul 17 08:39:03 2019 +++ src/sys/arch/aarch64/aarch64/locore.S Sun Sep 22 12:39:36 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.39 2019/07/17 08:39:03 skrll Exp $ */ +/* $NetBSD: locore.S,v 1.39.2.1 2019/09/22 12:39:36 martin Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu @@ -38,7 +38,7 @@ #include #include "assym.h" -RCSID("$NetBSD: locore.S,v 1.39 2019/07/17 08:39:03 skrll Exp $") +RCSID("$NetBSD: locore.S,v 1.39.2.1 2019/09/22 12:39:36 martin Exp $") /*#define DEBUG_LOCORE /* debug print */ @@ -766,6 +766,7 @@ init_mmutable: adr x6, bootpage_alloc /* allocator */ mov x5, xzr/* flags = 0 */ mov x4, #LX_BLKPAG_ATTR_DEVICE_MEM|LX_BLKPAG_AP_RW /* attr */ + orr x4, x4, #LX_BLKPAG_UXN|LX_BLKPAG_PXN mov x3, #L2_SIZE /* blocksize */ mov x2, #L2_SIZE /* size */ ldr x1, =CONSADDR /* pa */ @@ -779,6 +780,7 @@ init_mmutable: adr x6, bootpage_alloc /* allocator */ mov x5, xzr/* flags = 0 */ mov x4, #LX_BLKPAG_ATTR_DEVICE_MEM|LX_BLKPAG_AP_RW /* attr */ + orr x4, x4, #LX_BLKPAG_UXN|LX_BLKPAG_PXN mov x3, #L2_SIZE /* blocksize */ mov x2, #(1024*1024*1024*4) /* size */ mov x1, xzr/* pa */
CVS commit: [netbsd-9] src/sys/arch/aarch64/aarch64
Module Name:src Committed By: martin Date: Sun Sep 22 12:39:36 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64 [netbsd-9]: locore.S Log Message: Pull up following revision(s) (requested by jmcneill in ticket #226): sys/arch/aarch64/aarch64/locore.S: revision 1.40 Map device memory for early console XN To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.39.2.1 src/sys/arch/aarch64/aarch64/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/stand/efiboot
Module Name:src Committed By: martin Date: Sun Sep 22 12:37:39 UTC 2019 Modified Files: src/sys/stand/efiboot [netbsd-9]: efiblock.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #225): sys/stand/efiboot/efiblock.c: revision 1.6 Honour block device's IO alignment requirements. Patch from Simon South in PR# 54554 To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.6.1 src/sys/stand/efiboot/efiblock.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/stand/efiboot/efiblock.c diff -u src/sys/stand/efiboot/efiblock.c:1.5 src/sys/stand/efiboot/efiblock.c:1.5.6.1 --- src/sys/stand/efiboot/efiblock.c:1.5 Sat Mar 9 13:16:42 2019 +++ src/sys/stand/efiboot/efiblock.c Sun Sep 22 12:37:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: efiblock.c,v 1.5 2019/03/09 13:16:42 jmcneill Exp $ */ +/* $NetBSD: efiblock.c,v 1.5.6.1 2019/09/22 12:37:39 martin Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -98,6 +98,23 @@ efi_block_generate_hash_mbr(struct efi_b MD5Final(bpart->hash, ); } +static void * +efi_block_allocate_device_buffer(struct efi_block_dev *bdev, UINTN size, + void **buf_start) +{ + void *buf; + + if (bdev->bio->Media->IoAlign <= 1) + *buf_start = buf = AllocatePool(size); + else { + buf = AllocatePool(size + bdev->bio->Media->IoAlign - 1); + *buf_start = (buf == NULL) ? NULL : (void *)(((intptr_t)buf + + bdev->bio->Media->IoAlign - 1) & ~(bdev->bio->Media->IoAlign - 1)); + } + + return buf; +} + static int efi_block_find_partitions_disklabel(struct efi_block_dev *bdev, struct mbr_sector *mbr, uint32_t start, uint32_t size) { @@ -106,19 +123,19 @@ efi_block_find_partitions_disklabel(stru struct partition *p; EFI_STATUS status; EFI_LBA lba; - uint8_t *buf; + void *buf, *buf_start; UINT32 sz; int n; sz = __MAX(sizeof(d), bdev->bio->Media->BlockSize); sz = roundup(sz, bdev->bio->Media->BlockSize); - buf = AllocatePool(sz); - if (!buf) + if ((buf = efi_block_allocate_device_buffer(bdev, sz, _start)) == NULL) return ENOMEM; lba = (((EFI_LBA)start + LABELSECTOR) * DEV_BSIZE) / bdev->bio->Media->BlockSize; - status = uefi_call_wrapper(bdev->bio->ReadBlocks, 5, bdev->bio, bdev->media_id, lba, sz, buf); - if (EFI_ERROR(status) || getdisklabel(buf, ) != NULL) { + status = uefi_call_wrapper(bdev->bio->ReadBlocks, 5, bdev->bio, bdev->media_id, + lba, sz, buf_start); + if (EFI_ERROR(status) || getdisklabel(buf_start, ) != NULL) { FreePool(buf); return EIO; } @@ -159,22 +176,22 @@ efi_block_find_partitions_mbr(struct efi struct mbr_sector mbr; struct mbr_partition *mbr_part; EFI_STATUS status; - uint8_t *buf; + void *buf, *buf_start; UINT32 sz; int n; sz = __MAX(sizeof(mbr), bdev->bio->Media->BlockSize); sz = roundup(sz, bdev->bio->Media->BlockSize); - buf = AllocatePool(sz); - if (!buf) + if ((buf = efi_block_allocate_device_buffer(bdev, sz, _start)) == NULL) return ENOMEM; - status = uefi_call_wrapper(bdev->bio->ReadBlocks, 5, bdev->bio, bdev->media_id, 0, sz, buf); + status = uefi_call_wrapper(bdev->bio->ReadBlocks, 5, bdev->bio, bdev->media_id, + 0, sz, buf_start); if (EFI_ERROR(status)) { FreePool(buf); return EIO; } - memcpy(, buf, sizeof(mbr)); + memcpy(, buf_start, sizeof(mbr)); FreePool(buf); if (le32toh(mbr.mbr_magic) != MBR_MAGIC) @@ -240,21 +257,21 @@ efi_block_find_partitions_gpt(struct efi struct gpt_hdr hdr; struct gpt_ent ent; EFI_STATUS status; + void *buf, *buf_start; UINT32 sz, entry; - uint8_t *buf; sz = __MAX(sizeof(hdr), bdev->bio->Media->BlockSize); sz = roundup(sz, bdev->bio->Media->BlockSize); - buf = AllocatePool(sz); - if (!buf) + if ((buf = efi_block_allocate_device_buffer(bdev, sz, _start)) == NULL) return ENOMEM; - status = uefi_call_wrapper(bdev->bio->ReadBlocks, 5, bdev->bio, bdev->media_id, GPT_HDR_BLKNO, sz, buf); + status = uefi_call_wrapper(bdev->bio->ReadBlocks, 5, bdev->bio, bdev->media_id, + GPT_HDR_BLKNO, sz, buf_start); if (EFI_ERROR(status)) { FreePool(buf); return EIO; } - memcpy(, buf, sizeof(hdr)); + memcpy(, buf_start, sizeof(hdr)); FreePool(buf); if (memcmp(hdr.hdr_sig, GPT_HDR_SIG, sizeof(hdr.hdr_sig)) != 0) @@ -264,18 +281,19 @@ efi_block_find_partitions_gpt(struct efi sz = __MAX(le32toh(hdr.hdr_entsz) * le32toh(hdr.hdr_entries), bdev->bio->Media->BlockSize); sz = roundup(sz, bdev->bio->Media->BlockSize); - buf = AllocatePool(sz); - if (!buf) + if ((buf = efi_block_allocate_device_buffer(bdev, sz, _start)) == NULL) return ENOMEM; - status = uefi_call_wrapper(bdev->bio->ReadBlocks, 5, bdev->bio, bdev->media_id, le64toh(hdr.hdr_lba_table), sz, buf); + status = uefi_call_wrapper(bdev->bio->ReadBlocks, 5, bdev->bio, bdev->media_id, + le64toh(hdr.hdr_lba_table), sz, buf_start); if (EFI_ERROR(status)) { FreePool(buf); return EIO; } for (entry = 0; entry <
CVS commit: [netbsd-9] src/sys/stand/efiboot
Module Name:src Committed By: martin Date: Sun Sep 22 12:37:39 UTC 2019 Modified Files: src/sys/stand/efiboot [netbsd-9]: efiblock.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #225): sys/stand/efiboot/efiblock.c: revision 1.6 Honour block device's IO alignment requirements. Patch from Simon South in PR# 54554 To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.6.1 src/sys/stand/efiboot/efiblock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/evbarm/conf
Module Name:src Committed By: martin Date: Sun Sep 22 12:35:56 UTC 2019 Modified Files: src/sys/arch/evbarm/conf [netbsd-9]: std.generic64 Log Message: Pull up following revision(s) (requested by jmcneill in ticket #224): sys/arch/evbarm/conf/std.generic64: revision 1.11 Add __HAVE_GENERIC_CPU_INITCLOCKS To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.2.1 src/sys/arch/evbarm/conf/std.generic64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/evbarm/conf
Module Name:src Committed By: martin Date: Sun Sep 22 12:35:56 UTC 2019 Modified Files: src/sys/arch/evbarm/conf [netbsd-9]: std.generic64 Log Message: Pull up following revision(s) (requested by jmcneill in ticket #224): sys/arch/evbarm/conf/std.generic64: revision 1.11 Add __HAVE_GENERIC_CPU_INITCLOCKS To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.2.1 src/sys/arch/evbarm/conf/std.generic64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/std.generic64 diff -u src/sys/arch/evbarm/conf/std.generic64:1.10 src/sys/arch/evbarm/conf/std.generic64:1.10.2.1 --- src/sys/arch/evbarm/conf/std.generic64:1.10 Wed Jul 3 19:45:14 2019 +++ src/sys/arch/evbarm/conf/std.generic64 Sun Sep 22 12:35:56 2019 @@ -1,4 +1,4 @@ -# $NetBSD: std.generic64,v 1.10 2019/07/03 19:45:14 jmcneill Exp $ +# $NetBSD: std.generic64,v 1.10.2.1 2019/09/22 12:35:56 martin Exp $ # # generic NetBSD/evbarm64 with FDT support @@ -20,6 +20,7 @@ options MODULAR options MODULAR_DEFAULT_AUTOLOAD options PCI_NETBSD_CONFIGURE options _ARM32_NEED_BUS_DMA_BOUNCE +options __HAVE_GENERIC_CPU_INITCLOCKS options __HAVE_PCI_CONF_HOOK options __HAVE_PCI_MSI_MSIX
CVS commit: [netbsd-9] src/sys/external/bsd/drm/dist/shared-core
Module Name:src Committed By: martin Date: Sun Sep 22 12:34:06 UTC 2019 Modified Files: src/sys/external/bsd/drm/dist/shared-core [netbsd-9]: savage_state.c Log Message: Pull up following revision(s) (requested by hauke in ticket #223): sys/external/bsd/drm/dist/shared-core/savage_state.c: revision 1.5 Deal with gcc's "warning: this statement may fall through [-Wimplicit-fallthrough=3D]" by adding the missing KNF FALLTHROUGH comments. christos@ approved. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.68.1 \ src/sys/external/bsd/drm/dist/shared-core/savage_state.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/external/bsd/drm/dist/shared-core/savage_state.c diff -u src/sys/external/bsd/drm/dist/shared-core/savage_state.c:1.4 src/sys/external/bsd/drm/dist/shared-core/savage_state.c:1.4.68.1 --- src/sys/external/bsd/drm/dist/shared-core/savage_state.c:1.4 Tue Jun 23 04:42:01 2009 +++ src/sys/external/bsd/drm/dist/shared-core/savage_state.c Sun Sep 22 12:34:06 2019 @@ -297,6 +297,7 @@ static int savage_dispatch_dma_prim(drm_ case SAVAGE_PRIM_TRILIST_201: reorder = 1; prim = SAVAGE_PRIM_TRILIST; + /* FALLTHROUGH */ case SAVAGE_PRIM_TRILIST: if (n % 3 != 0) { DRM_ERROR("wrong number of vertices %u in TRILIST\n", @@ -434,6 +435,7 @@ static int savage_dispatch_vb_prim(drm_s case SAVAGE_PRIM_TRILIST_201: reorder = 1; prim = SAVAGE_PRIM_TRILIST; + /* FALLTHROUGH */ case SAVAGE_PRIM_TRILIST: if (n % 3 != 0) { DRM_ERROR("wrong number of vertices %u in TRILIST\n", @@ -555,6 +557,7 @@ static int savage_dispatch_dma_idx(drm_s case SAVAGE_PRIM_TRILIST_201: reorder = 1; prim = SAVAGE_PRIM_TRILIST; + /* FALLTHROUGH */ case SAVAGE_PRIM_TRILIST: if (n % 3 != 0) { DRM_ERROR("wrong number of indices %u in TRILIST\n", n); @@ -693,6 +696,7 @@ static int savage_dispatch_vb_idx(drm_sa case SAVAGE_PRIM_TRILIST_201: reorder = 1; prim = SAVAGE_PRIM_TRILIST; + /* FALLTHROUGH */ case SAVAGE_PRIM_TRILIST: if (n % 3 != 0) { DRM_ERROR("wrong number of indices %u in TRILIST\n", n); @@ -1060,7 +1064,7 @@ int savage_bci_cmdbuf(struct drm_device DMA_FLUSH(); return -EINVAL; } - /* fall through */ + /* FALLTHROUGH */ case SAVAGE_CMD_DMA_PRIM: case SAVAGE_CMD_VB_PRIM: if (!first_draw_cmd)
CVS commit: [netbsd-9] src/sys/external/bsd/drm/dist/shared-core
Module Name:src Committed By: martin Date: Sun Sep 22 12:34:06 UTC 2019 Modified Files: src/sys/external/bsd/drm/dist/shared-core [netbsd-9]: savage_state.c Log Message: Pull up following revision(s) (requested by hauke in ticket #223): sys/external/bsd/drm/dist/shared-core/savage_state.c: revision 1.5 Deal with gcc's "warning: this statement may fall through [-Wimplicit-fallthrough=3D]" by adding the missing KNF FALLTHROUGH comments. christos@ approved. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.68.1 \ src/sys/external/bsd/drm/dist/shared-core/savage_state.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/arm/cortex
Module Name:src Committed By: martin Date: Sun Sep 22 12:30:15 UTC 2019 Modified Files: src/sys/arch/arm/cortex [netbsd-9]: gicv3.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #222): sys/arch/arm/cortex/gicv3.c: revision 1.21 - Use pic_do_pending_ints in intr handler - Sprinkle isb - Fix PMR bits detection on eMAG, from OpenBSD To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.20.2.1 src/sys/arch/arm/cortex/gicv3.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/arm/cortex
Module Name:src Committed By: martin Date: Sun Sep 22 12:30:15 UTC 2019 Modified Files: src/sys/arch/arm/cortex [netbsd-9]: gicv3.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #222): sys/arch/arm/cortex/gicv3.c: revision 1.21 - Use pic_do_pending_ints in intr handler - Sprinkle isb - Fix PMR bits detection on eMAG, from OpenBSD To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.20.2.1 src/sys/arch/arm/cortex/gicv3.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/cortex/gicv3.c diff -u src/sys/arch/arm/cortex/gicv3.c:1.20 src/sys/arch/arm/cortex/gicv3.c:1.20.2.1 --- src/sys/arch/arm/cortex/gicv3.c:1.20 Sun Jun 30 11:11:38 2019 +++ src/sys/arch/arm/cortex/gicv3.c Sun Sep 22 12:30:15 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: gicv3.c,v 1.20 2019/06/30 11:11:38 jmcneill Exp $ */ +/* $NetBSD: gicv3.c,v 1.20.2.1 2019/09/22 12:30:15 martin Exp $ */ /*- * Copyright (c) 2018 Jared McNeill @@ -31,7 +31,7 @@ #define _INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.20 2019/06/30 11:11:38 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.20.2.1 2019/09/22 12:30:15 martin Exp $"); #include #include @@ -213,6 +213,7 @@ gicv3_set_priority(struct pic_softc *pic struct gicv3_softc * const sc = PICTOSOFTC(pic); icc_pmr_write(IPL_TO_PMR(sc, ipl)); + arm_isb(); } static void @@ -437,14 +438,17 @@ gicv3_ipi_send(struct pic_softc *pic, co if ((ci->ci_gic_sgir & ICC_SGIR_EL1_Aff) != aff) { if (targets != 0) { icc_sgi1r_write(intid | aff | targets); + arm_isb(); targets = 0; } aff = (ci->ci_gic_sgir & ICC_SGIR_EL1_Aff); } targets |= (ci->ci_gic_sgir & ICC_SGIR_EL1_TargetList); } - if (targets != 0) + if (targets != 0) { icc_sgi1r_write(intid | aff | targets); + arm_isb(); + } } } @@ -715,6 +719,7 @@ gicv3_irq_handler(void *frame) for (;;) { const uint32_t iar = icc_iar1_read(); + arm_dsb(); const uint32_t irq = __SHIFTOUT(iar, ICC_IAR_INTID); if (irq == ICC_IAR_INTID_SPURIOUS) break; @@ -726,26 +731,39 @@ gicv3_irq_handler(void *frame) struct intrsource * const is = pic->pic_sources[irq - pic->pic_irqbase]; KASSERT(is != NULL); + const bool early_eoi = irq < GIC_LPI_BASE && is->is_type == IST_EDGE; + const int ipl = is->is_ipl; - if (ci->ci_cpl < ipl) - pic_set_priority(ci, ipl); + if (__predict_false(ipl < ci->ci_cpl)) { + pic_do_pending_ints(I32_bit, ipl, frame); + } else { + gicv3_set_priority(pic, ipl); + ci->ci_cpl = ipl; + } + + if (early_eoi) { + icc_eoi1r_write(iar); + arm_isb(); + } cpsie(I32_bit); pic_dispatch(is, frame); cpsid(I32_bit); - icc_eoi1r_write(iar); + if (!early_eoi) { + icc_eoi1r_write(iar); + arm_isb(); + } } - if (ci->ci_cpl != oldipl) - pic_set_priority(ci, oldipl); + pic_do_pending_ints(I32_bit, oldipl, frame); } static int gicv3_detect_pmr_bits(struct gicv3_softc *sc) { const uint32_t opmr = icc_pmr_read(); - icc_pmr_write(0xff); + icc_pmr_write(0xbf); const uint32_t npmr = icc_pmr_read(); icc_pmr_write(opmr);
CVS commit: [netbsd-9] src/sys/arch/aarch64/aarch64
Module Name:src Committed By: martin Date: Sun Sep 22 12:27:22 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64 [netbsd-9]: cpufunc.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #221): sys/arch/aarch64/aarch64/cpufunc.c: revision 1.6 Do not attempt to change coherency_unit at runtime. Instead, if the required coherency unit is greater than COHERENCY_UNIT in a MULTIPROCESSOR kernel, just panic instead. This makes non-MULTIPROCESSOR kernels work again. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.4.1 src/sys/arch/aarch64/aarch64/cpufunc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/aarch64/aarch64
Module Name:src Committed By: martin Date: Sun Sep 22 12:27:22 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64 [netbsd-9]: cpufunc.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #221): sys/arch/aarch64/aarch64/cpufunc.c: revision 1.6 Do not attempt to change coherency_unit at runtime. Instead, if the required coherency unit is greater than COHERENCY_UNIT in a MULTIPROCESSOR kernel, just panic instead. This makes non-MULTIPROCESSOR kernels work again. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.4.1 src/sys/arch/aarch64/aarch64/cpufunc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/cpufunc.c diff -u src/sys/arch/aarch64/aarch64/cpufunc.c:1.5 src/sys/arch/aarch64/aarch64/cpufunc.c:1.5.4.1 --- src/sys/arch/aarch64/aarch64/cpufunc.c:1.5 Fri Dec 21 08:01:01 2018 +++ src/sys/arch/aarch64/aarch64/cpufunc.c Sun Sep 22 12:27:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.c,v 1.5 2018/12/21 08:01:01 ryo Exp $ */ +/* $NetBSD: cpufunc.c,v 1.5.4.1 2019/09/22 12:27:22 martin Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu @@ -26,8 +26,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include "opt_multiprocessor.h" + #include -__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.5 2018/12/21 08:01:01 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.5.4.1 2019/09/22 12:27:22 martin Exp $"); #include #include @@ -135,9 +137,12 @@ aarch64_getcacheinfo(void) arm_dcache_align = sizeof(int) << arm_dcache_maxline; arm_dcache_align_mask = arm_dcache_align - 1; } - /* update coherency_unit (in param.h) */ + +#ifdef MULTIPROCESSOR if (coherency_unit < arm_dcache_align) - coherency_unit = arm_dcache_align; + panic("coherency_unit %ld < arm_dcache_align %d; increase COHERENCY_UNIT", + coherency_unit, arm_dcache_align); +#endif /* * CLIDR - Cache Level ID Register
CVS commit: [netbsd-9] src/sys/arch/arm/amlogic
Module Name:src Committed By: martin Date: Sun Sep 22 12:25:26 UTC 2019 Modified Files: src/sys/arch/arm/amlogic [netbsd-9]: meson8b_clkc.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #220): sys/arch/arm/amlogic/meson8b_clkc.c: revision 1.5 Use correct register for mpll2_div clock To generate a diff of this commit: cvs rdiff -u -r1.3.6.1 -r1.3.6.2 src/sys/arch/arm/amlogic/meson8b_clkc.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/amlogic/meson8b_clkc.c diff -u src/sys/arch/arm/amlogic/meson8b_clkc.c:1.3.6.1 src/sys/arch/arm/amlogic/meson8b_clkc.c:1.3.6.2 --- src/sys/arch/arm/amlogic/meson8b_clkc.c:1.3.6.1 Thu Aug 15 09:49:49 2019 +++ src/sys/arch/arm/amlogic/meson8b_clkc.c Sun Sep 22 12:25:25 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: meson8b_clkc.c,v 1.3.6.1 2019/08/15 09:49:49 martin Exp $ */ +/* $NetBSD: meson8b_clkc.c,v 1.3.6.2 2019/09/22 12:25:25 martin Exp $ */ /*- * Copyright (c) 2019 Jared McNeill @@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: meson8b_clkc.c,v 1.3.6.1 2019/08/15 09:49:49 martin Exp $"); +__KERNEL_RCSID(1, "$NetBSD: meson8b_clkc.c,v 1.3.6.2 2019/09/22 12:25:25 martin Exp $"); #include #include @@ -268,9 +268,9 @@ static struct meson_clk_clk meson8b_clkc MESON_CLK_PLL_REG_INVALID,/* ssen */ 0), MESON_CLK_MPLL(MESON8B_CLOCK_MPLL2_DIV, "mpll2_div", "mpll_prediv", - MESON_CLK_PLL_REG(HHI_MPLL_CNTL8, __BITS(13,0)), /* sdm */ - MESON_CLK_PLL_REG(HHI_MPLL_CNTL8, __BIT(15)), /* sdm_enable */ - MESON_CLK_PLL_REG(HHI_MPLL_CNTL8, __BITS(24,16)), /* n2 */ + MESON_CLK_PLL_REG(HHI_MPLL_CNTL9, __BITS(13,0)), /* sdm */ + MESON_CLK_PLL_REG(HHI_MPLL_CNTL9, __BIT(15)), /* sdm_enable */ + MESON_CLK_PLL_REG(HHI_MPLL_CNTL9, __BITS(24,16)), /* n2 */ MESON_CLK_PLL_REG_INVALID,/* ssen */ 0),
CVS commit: [netbsd-9] src/sys/arch/arm/amlogic
Module Name:src Committed By: martin Date: Sun Sep 22 12:25:26 UTC 2019 Modified Files: src/sys/arch/arm/amlogic [netbsd-9]: meson8b_clkc.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #220): sys/arch/arm/amlogic/meson8b_clkc.c: revision 1.5 Use correct register for mpll2_div clock To generate a diff of this commit: cvs rdiff -u -r1.3.6.1 -r1.3.6.2 src/sys/arch/arm/amlogic/meson8b_clkc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/share/man/man5
Module Name:src Committed By: martin Date: Sun Sep 22 12:22:23 UTC 2019 Modified Files: src/share/man/man5 [netbsd-9]: mk.conf.5 Log Message: Pull up following revision(s) (requested by gson in ticket #219): share/man/man5/mk.conf.5: revision 1.79 MKZFS is no longer the default on i386; it was disabled in 2015 in bsd.own.mk 1.846. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.78.2.1 src/share/man/man5/mk.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man5/mk.conf.5 diff -u src/share/man/man5/mk.conf.5:1.78 src/share/man/man5/mk.conf.5:1.78.2.1 --- src/share/man/man5/mk.conf.5:1.78 Wed Feb 20 17:48:31 2019 +++ src/share/man/man5/mk.conf.5 Sun Sep 22 12:22:23 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: mk.conf.5,v 1.78 2019/02/20 17:48:31 wiz Exp $ +.\" $NetBSD: mk.conf.5,v 1.78.2.1 2019/09/22 12:22:23 martin Exp $ .\" .\" Copyright (c) 1999-2003 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 19, 2019 +.Dd September 16, 2019 .Dt MK.CONF 5 .Os .\" turn off hyphenation @@ -852,7 +852,7 @@ Indicates whether the YP (NIS) infrastru Indicates whether the ZFS kernel module and the utilities and libraries used to manage the ZFS system are to be built. .DFLTy -on i386 and amd64, +on amd64, .Dq no on other architectures. .
CVS commit: [netbsd-9] src/share/man/man5
Module Name:src Committed By: martin Date: Sun Sep 22 12:22:23 UTC 2019 Modified Files: src/share/man/man5 [netbsd-9]: mk.conf.5 Log Message: Pull up following revision(s) (requested by gson in ticket #219): share/man/man5/mk.conf.5: revision 1.79 MKZFS is no longer the default on i386; it was disabled in 2015 in bsd.own.mk 1.846. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.78.2.1 src/share/man/man5/mk.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/ic
Module Name:src Committed By: martin Date: Sun Sep 22 12:18:56 UTC 2019 Modified Files: src/sys/dev/ic [netbsd-9]: nvme.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #218): sys/dev/ic/nvme.c: revision 1.45 Don't set Phase Tag bit of Completion Queue entry at nvme_poll_done(). A new completion queue entry check incorrectly determined that there was a Completion Queue entry for a command that was not submitted. Fix PR kern/54275, PR kern/54503, PR kern/54532. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.44.2.1 src/sys/dev/ic/nvme.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/ic
Module Name:src Committed By: martin Date: Sun Sep 22 12:18:56 UTC 2019 Modified Files: src/sys/dev/ic [netbsd-9]: nvme.c Log Message: Pull up following revision(s) (requested by nonaka in ticket #218): sys/dev/ic/nvme.c: revision 1.45 Don't set Phase Tag bit of Completion Queue entry at nvme_poll_done(). A new completion queue entry check incorrectly determined that there was a Completion Queue entry for a command that was not submitted. Fix PR kern/54275, PR kern/54503, PR kern/54532. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.44.2.1 src/sys/dev/ic/nvme.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/nvme.c diff -u src/sys/dev/ic/nvme.c:1.44 src/sys/dev/ic/nvme.c:1.44.2.1 --- src/sys/dev/ic/nvme.c:1.44 Fri Jun 28 15:08:47 2019 +++ src/sys/dev/ic/nvme.c Sun Sep 22 12:18:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nvme.c,v 1.44 2019/06/28 15:08:47 jmcneill Exp $ */ +/* $NetBSD: nvme.c,v 1.44.2.1 2019/09/22 12:18:56 martin Exp $ */ /* $OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */ /* @@ -18,7 +18,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.44 2019/06/28 15:08:47 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.44.2.1 2019/09/22 12:18:56 martin Exp $"); #include #include @@ -1302,8 +1302,8 @@ nvme_poll_done(struct nvme_queue *q, str { struct nvme_poll_state *state = ccb->ccb_cookie; - SET(cqe->flags, htole16(NVME_CQE_PHASE)); state->c = *cqe; + SET(state->c.flags, htole16(NVME_CQE_PHASE)); ccb->ccb_cookie = state->cookie; state->done(q, ccb, >c);
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sun Sep 22 12:15:28 UTC 2019 Modified Files: src/sys/dev/pci [netbsd-9]: if_age.c Log Message: Pull up following revision(s) (requested by maxv in ticket #216): sys/dev/pci/if_age.c: revision 1.61 Fix direction of the loop. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.60.2.1 src/sys/dev/pci/if_age.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.60 src/sys/dev/pci/if_age.c:1.60.2.1 --- src/sys/dev/pci/if_age.c:1.60 Tue Jul 9 08:46:58 2019 +++ src/sys/dev/pci/if_age.c Sun Sep 22 12:15:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_age.c,v 1.60 2019/07/09 08:46:58 msaitoh Exp $ */ +/* $NetBSD: if_age.c,v 1.60.2.1 2019/09/22 12:15:28 martin 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.60 2019/07/09 08:46:58 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.60.2.1 2019/09/22 12:15:28 martin Exp $"); #include "vlan.h" @@ -575,7 +575,7 @@ age_get_macaddr(struct age_softc *sc, ui */ CSR_WRITE_4(sc, AGE_TWSI_CTRL, CSR_READ_4(sc, AGE_TWSI_CTRL) | TWSI_CTRL_SW_LD_START); - for (i = 100; i > 0; i++) { + for (i = 100; i > 0; i--) { DELAY(1000); reg = CSR_READ_4(sc, AGE_TWSI_CTRL); if ((reg & TWSI_CTRL_SW_LD_START) == 0)
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sun Sep 22 12:15:28 UTC 2019 Modified Files: src/sys/dev/pci [netbsd-9]: if_age.c Log Message: Pull up following revision(s) (requested by maxv in ticket #216): sys/dev/pci/if_age.c: revision 1.61 Fix direction of the loop. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.60.2.1 src/sys/dev/pci/if_age.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/ic
Module Name:src Committed By: martin Date: Sun Sep 22 12:13:33 UTC 2019 Modified Files: src/sys/dev/ic [netbsd-9]: i82557.c Log Message: Pull up following revision(s) (requested by maxv in ticket #217): sys/dev/ic/i82557.c: revision 1.155 Fix direction of the loop. To generate a diff of this commit: cvs rdiff -u -r1.154 -r1.154.2.1 src/sys/dev/ic/i82557.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/ic
Module Name:src Committed By: martin Date: Sun Sep 22 12:13:33 UTC 2019 Modified Files: src/sys/dev/ic [netbsd-9]: i82557.c Log Message: Pull up following revision(s) (requested by maxv in ticket #217): sys/dev/ic/i82557.c: revision 1.155 Fix direction of the loop. To generate a diff of this commit: cvs rdiff -u -r1.154 -r1.154.2.1 src/sys/dev/ic/i82557.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/i82557.c diff -u src/sys/dev/ic/i82557.c:1.154 src/sys/dev/ic/i82557.c:1.154.2.1 --- src/sys/dev/ic/i82557.c:1.154 Tue Jul 9 08:46:58 2019 +++ src/sys/dev/ic/i82557.c Sun Sep 22 12:13:33 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: i82557.c,v 1.154 2019/07/09 08:46:58 msaitoh Exp $ */ +/* $NetBSD: i82557.c,v 1.154.2.1 2019/09/22 12:13:33 martin Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.154 2019/07/09 08:46:58 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.154.2.1 2019/09/22 12:13:33 martin Exp $"); #include #include @@ -1892,7 +1892,7 @@ fxp_init(struct ifnet *ifp) CSR_WRITE_4(sc, FXP_CSR_SCB_GENERAL, sc->sc_cddma + FXP_CDIASOFF); fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_START); /* ...and wait for it to complete. */ - for (i = 1000; i > 0; i++) { + for (i = 1000; i > 0; i--) { FXP_CDIASSYNC(sc, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); status = le16toh(cb_ias->cb_status);
CVS commit: [netbsd-9] src/sys/arch/aarch64/aarch64
Module Name:src Committed By: martin Date: Sun Sep 22 10:36:30 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64 [netbsd-9]: aarch64_machdep.c Log Message: Pull up following revision(s) (requested by ryo in ticket #215): sys/arch/aarch64/aarch64/aarch64_machdep.c: revision 1.30 sys/arch/aarch64/aarch64/aarch64_machdep.c: revision 1.31 sys/arch/aarch64/aarch64/aarch64_machdep.c: revision 1.29 Do not assume that DRAM is linear when creating KSEG mappings. Instead, create L2 blocks to cover all ranges specified in the memory map. - use L1-L3 blocks/pages for KSEG mappings to fit dramblocks exactly. r1.29 and this changes avoid over cache prefetch problem (perhaps) with PMAP_MAP_POOLPAGE/KSEG on CortexA72, and be more stable for rockpro64. - used L3 even if L2 could cover the range. fix to use larger block if possible good enough. pointed out by jmcneill@. thanks. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.28.4.1 src/sys/arch/aarch64/aarch64/aarch64_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/aarch64_machdep.c diff -u src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.28 src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.28.4.1 --- src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.28 Sun Jan 27 02:08:36 2019 +++ src/sys/arch/aarch64/aarch64/aarch64_machdep.c Sun Sep 22 10:36:30 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: aarch64_machdep.c,v 1.28 2019/01/27 02:08:36 pgoyette Exp $ */ +/* $NetBSD: aarch64_machdep.c,v 1.28.4.1 2019/09/22 10:36:30 martin Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.28 2019/01/27 02:08:36 pgoyette Exp $"); +__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.28.4.1 2019/09/22 10:36:30 martin Exp $"); #include "opt_arm_debug.h" #include "opt_ddb.h" @@ -112,12 +112,13 @@ int dumpsize = 0; /* also longdumplo = 0; void -cpu_kernel_vm_init(uint64_t memory_start, uint64_t memory_size) +cpu_kernel_vm_init(uint64_t memory_start __unused, uint64_t memory_size __unused) { extern char __kernel_text[]; extern char _end[]; extern char __data_start[]; extern char __rodata_start[]; + u_int blk; vaddr_t kernstart = trunc_page((vaddr_t)__kernel_text); vaddr_t kernend = round_page((vaddr_t)_end); @@ -127,16 +128,84 @@ cpu_kernel_vm_init(uint64_t memory_start vaddr_t rodata_start = (vaddr_t)__rodata_start; /* add KSEG mappings of whole memory */ - VPRINTF("Creating KSEG tables for 0x%016lx-0x%016lx\n", - memory_start, memory_start + memory_size); const pt_entry_t ksegattr = LX_BLKPAG_ATTR_NORMAL_WB | LX_BLKPAG_AP_RW | LX_BLKPAG_PXN | LX_BLKPAG_UXN; - pmapboot_enter(AARCH64_PA_TO_KVA(memory_start), memory_start, - memory_size, L1_SIZE, ksegattr, PMAPBOOT_ENTER_NOOVERWRITE, - bootpage_alloc, NULL); + for (blk = 0; blk < bootconfig.dramblocks; blk++) { + uint64_t start, end, left, mapsize, nblocks; + + start = trunc_page(bootconfig.dram[blk].address); + end = round_page(bootconfig.dram[blk].address + + (uint64_t)bootconfig.dram[blk].pages * PAGE_SIZE); + left = end - start; + + /* align the start address to L2 blocksize */ + nblocks = ulmin(left / L3_SIZE, + Ln_ENTRIES - __SHIFTOUT(start, L3_ADDR_BITS)); + if (((start & L3_ADDR_BITS) != 0) && (nblocks > 0)) { + mapsize = nblocks * L3_SIZE; + VPRINTF("Creating KSEG tables for %016lx-%016lx (L3)\n", + start, start + mapsize - 1); + pmapboot_enter(AARCH64_PA_TO_KVA(start), start, + mapsize, L3_SIZE, ksegattr, + PMAPBOOT_ENTER_NOOVERWRITE, bootpage_alloc, NULL); + + start += mapsize; + left -= mapsize; + } + + /* align the start address to L1 blocksize */ + nblocks = ulmin(left / L2_SIZE, + Ln_ENTRIES - __SHIFTOUT(start, L2_ADDR_BITS)); + if (((start & L2_ADDR_BITS) != 0) && (nblocks > 0)) { + mapsize = nblocks * L2_SIZE; + VPRINTF("Creating KSEG tables for %016lx-%016lx (L2)\n", + start, start + mapsize - 1); + pmapboot_enter(AARCH64_PA_TO_KVA(start), start, + mapsize, L2_SIZE, ksegattr, + PMAPBOOT_ENTER_NOOVERWRITE, bootpage_alloc, NULL); + start += mapsize; + left -= mapsize; + } + + nblocks = left / L1_SIZE; + if (nblocks > 0) { + mapsize = nblocks * L1_SIZE; + VPRINTF("Creating KSEG tables for %016lx-%016lx (L1)\n", + start, start + mapsize - 1); + pmapboot_enter(AARCH64_PA_TO_KVA(start), start, + mapsize, L1_SIZE, ksegattr, + PMAPBOOT_ENTER_NOOVERWRITE, bootpage_alloc, NULL); + start += mapsize; + left -= mapsize; + } + + if ((left & L2_ADDR_BITS) != 0) { + nblocks = left / L2_SIZE; + mapsize = nblocks * L2_SIZE; + VPRINTF("Creating KSEG tables for %016lx-%016lx (L2)\n", + start, start + mapsize - 1); +
CVS commit: [netbsd-9] src/sys/arch/aarch64/aarch64
Module Name:src Committed By: martin Date: Sun Sep 22 10:36:30 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64 [netbsd-9]: aarch64_machdep.c Log Message: Pull up following revision(s) (requested by ryo in ticket #215): sys/arch/aarch64/aarch64/aarch64_machdep.c: revision 1.30 sys/arch/aarch64/aarch64/aarch64_machdep.c: revision 1.31 sys/arch/aarch64/aarch64/aarch64_machdep.c: revision 1.29 Do not assume that DRAM is linear when creating KSEG mappings. Instead, create L2 blocks to cover all ranges specified in the memory map. - use L1-L3 blocks/pages for KSEG mappings to fit dramblocks exactly. r1.29 and this changes avoid over cache prefetch problem (perhaps) with PMAP_MAP_POOLPAGE/KSEG on CortexA72, and be more stable for rockpro64. - used L3 even if L2 could cover the range. fix to use larger block if possible good enough. pointed out by jmcneill@. thanks. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.28.4.1 src/sys/arch/aarch64/aarch64/aarch64_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: maxv Date: Sun Sep 22 10:35:13 UTC 2019 Modified Files: src/sys/arch/amd64/include: types.h src/sys/kern: subr_asan.c src/sys/sys: bus_proto.h Log Message: Fix KASAN on aarch64: the bus_space_* functions are macros, so we can't redefine them. Introduce __HAVE_KASAN_INSTR_BUS, which indicates whether to instrument the bus functions. Defined on amd64 only. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/arch/amd64/include/types.h cvs rdiff -u -r1.13 -r1.14 src/sys/kern/subr_asan.c cvs rdiff -u -r1.8 -r1.9 src/sys/sys/bus_proto.h 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: maxv Date: Sun Sep 22 10:35:13 UTC 2019 Modified Files: src/sys/arch/amd64/include: types.h src/sys/kern: subr_asan.c src/sys/sys: bus_proto.h Log Message: Fix KASAN on aarch64: the bus_space_* functions are macros, so we can't redefine them. Introduce __HAVE_KASAN_INSTR_BUS, which indicates whether to instrument the bus functions. Defined on amd64 only. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/arch/amd64/include/types.h cvs rdiff -u -r1.13 -r1.14 src/sys/kern/subr_asan.c cvs rdiff -u -r1.8 -r1.9 src/sys/sys/bus_proto.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/amd64/include/types.h diff -u src/sys/arch/amd64/include/types.h:1.60 src/sys/arch/amd64/include/types.h:1.61 --- src/sys/arch/amd64/include/types.h:1.60 Sat Apr 6 03:06:24 2019 +++ src/sys/arch/amd64/include/types.h Sun Sep 22 10:35:12 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.60 2019/04/06 03:06:24 thorpej Exp $ */ +/* $NetBSD: types.h,v 1.61 2019/09/22 10:35:12 maxv Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -103,6 +103,9 @@ typedef unsigned char __cpu_simple_lock #include "opt_xen.h" #include "opt_kasan.h" +#ifdef KASAN +#define __HAVE_KASAN_INSTR_BUS +#endif #if defined(__x86_64__) && !defined(XENPV) #if !defined(KASAN) #define __HAVE_PCPU_AREA 1 Index: src/sys/kern/subr_asan.c diff -u src/sys/kern/subr_asan.c:1.13 src/sys/kern/subr_asan.c:1.14 --- src/sys/kern/subr_asan.c:1.13 Sat Sep 7 10:24:01 2019 +++ src/sys/kern/subr_asan.c Sun Sep 22 10:35:12 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_asan.c,v 1.13 2019/09/07 10:24:01 maxv Exp $ */ +/* $NetBSD: subr_asan.c,v 1.14 2019/09/22 10:35:12 maxv Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_asan.c,v 1.13 2019/09/07 10:24:01 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_asan.c,v 1.14 2019/09/22 10:35:12 maxv Exp $"); #include #include @@ -781,6 +781,8 @@ ASAN_ATOMIC_FUNC_INC(ptr, void *, void); /* -- */ +#ifdef __HAVE_KASAN_INSTR_BUS + #include #undef bus_space_read_multi_1 @@ -926,6 +928,8 @@ ASAN_BUS_WRITE_FUNC(2, 16) ASAN_BUS_WRITE_FUNC(4, 32) ASAN_BUS_WRITE_FUNC(8, 64) +#endif /* __HAVE_KASAN_INSTR_BUS */ + /* -- */ void __asan_register_globals(struct __asan_global *, size_t); Index: src/sys/sys/bus_proto.h diff -u src/sys/sys/bus_proto.h:1.8 src/sys/sys/bus_proto.h:1.9 --- src/sys/sys/bus_proto.h:1.8 Sat Sep 7 10:24:01 2019 +++ src/sys/sys/bus_proto.h Sun Sep 22 10:35:12 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_proto.h,v 1.8 2019/09/07 10:24:01 maxv Exp $ */ +/* $NetBSD: bus_proto.h,v 1.9 2019/09/22 10:35:12 maxv Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001, 2007 The NetBSD Foundation, Inc. @@ -132,7 +132,7 @@ uint64_t bus_space_read_8(bus_space_tag_ uint64_t bus_space_read_stream_8(bus_space_tag_t, bus_space_handle_t, bus_size_t); -#ifdef KASAN +#if defined(KASAN) && defined(__HAVE_KASAN_INSTR_BUS) #define BUS_SPACE_READ_MEM_PROTOS(bytes, bits) \ void kasan_bus_space_read_multi_##bytes(bus_space_tag_t, bus_space_handle_t, \ bus_size_t, uint##bits##_t *, bus_size_t); \ @@ -195,7 +195,7 @@ void bus_space_write_8(bus_space_tag_t, void bus_space_write_stream_8(bus_space_tag_t, bus_space_handle_t, bus_size_t, uint64_t); -#ifdef KASAN +#if defined(KASAN) && defined(__HAVE_KASAN_INSTR_BUS) #define BUS_SPACE_WRITE_MEM_PROTOS(bytes, bits) \ void kasan_bus_space_write_multi_##bytes(bus_space_tag_t, bus_space_handle_t, \ bus_size_t, const uint##bits##_t *, bus_size_t);\
CVS commit: [netbsd-9] src/sys/arch/aarch64/aarch64
Module Name:src Committed By: martin Date: Sun Sep 22 10:32:38 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64 [netbsd-9]: pmap.c Log Message: Pull up following revision(s) (requested by ryo in ticket #214): sys/arch/aarch64/aarch64/pmap.c: revision 1.44 sys/arch/aarch64/aarch64/pmap.c: revision 1.46 - remove incorrect KASSERT. mmap(2) with prot=PROT_WRITE calls pmap_enter(..., PROT_WRITE) internally. - fix to update page reference flags when only PROT_WRITE or PROT_EXECUTE specified ref/mod bit should be set according to 'flags' argument, not 'prot'. r1.44 was incomplete. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.41.2.1 src/sys/arch/aarch64/aarch64/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/pmap.c diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.41 src/sys/arch/aarch64/aarch64/pmap.c:1.41.2.1 --- src/sys/arch/aarch64/aarch64/pmap.c:1.41 Fri May 17 06:05:07 2019 +++ src/sys/arch/aarch64/aarch64/pmap.c Sun Sep 22 10:32:38 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.41 2019/05/17 06:05:07 mrg Exp $ */ +/* $NetBSD: pmap.c,v 1.41.2.1 2019/09/22 10:32:38 martin Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.41 2019/05/17 06:05:07 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.41.2.1 2019/09/22 10:32:38 martin Exp $"); #include "opt_arm_debug.h" #include "opt_ddb.h" @@ -1718,10 +1718,11 @@ _pmap_enter(struct pmap *pm, vaddr_t va, /* * read permission is treated as an access permission internally. * require to add PROT_READ even if only PROT_WRITE or PROT_EXEC - * for wired mapping. */ - if ((flags & PMAP_WIRED) && (prot & (VM_PROT_WRITE|VM_PROT_EXECUTE))) + if (prot & (VM_PROT_WRITE|VM_PROT_EXECUTE)) prot |= VM_PROT_READ; + if (flags & (VM_PROT_WRITE|VM_PROT_EXECUTE)) + flags |= VM_PROT_READ; mdattr = VM_PROT_READ | VM_PROT_WRITE; if (need_update_pv) { @@ -1818,8 +1819,6 @@ _pmap_enter(struct pmap *pm, vaddr_t va, int pmap_enter(struct pmap *pm, vaddr_t va, paddr_t pa, vm_prot_t prot, u_int flags) { - KASSERT((prot & VM_PROT_READ) || !(prot & VM_PROT_WRITE)); - return _pmap_enter(pm, va, pa, prot, flags, false); }
CVS commit: [netbsd-9] src/sys/arch/aarch64/aarch64
Module Name:src Committed By: martin Date: Sun Sep 22 10:32:38 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64 [netbsd-9]: pmap.c Log Message: Pull up following revision(s) (requested by ryo in ticket #214): sys/arch/aarch64/aarch64/pmap.c: revision 1.44 sys/arch/aarch64/aarch64/pmap.c: revision 1.46 - remove incorrect KASSERT. mmap(2) with prot=PROT_WRITE calls pmap_enter(..., PROT_WRITE) internally. - fix to update page reference flags when only PROT_WRITE or PROT_EXECUTE specified ref/mod bit should be set according to 'flags' argument, not 'prot'. r1.44 was incomplete. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.41.2.1 src/sys/arch/aarch64/aarch64/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch/aarch64/aarch64
Module Name:src Committed By: martin Date: Sun Sep 22 10:29:44 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64 [netbsd-9]: cpufunc_asm_armv8.S Log Message: Pull up following revision(s) (requested by ryo in ticket #213): sys/arch/aarch64/aarch64/cpufunc_asm_armv8.S: revision 1.4 even if "no options MULTIPROCESSOR" requires isb after tlbi op. since it should be harmless, dsb is also added. fixed a problem that rockpro64 doesn't boot without MULTIPROCESSOR. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.4.1 src/sys/arch/aarch64/aarch64/cpufunc_asm_armv8.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/cpufunc_asm_armv8.S diff -u src/sys/arch/aarch64/aarch64/cpufunc_asm_armv8.S:1.3 src/sys/arch/aarch64/aarch64/cpufunc_asm_armv8.S:1.3.4.1 --- src/sys/arch/aarch64/aarch64/cpufunc_asm_armv8.S:1.3 Fri Dec 21 08:01:01 2018 +++ src/sys/arch/aarch64/aarch64/cpufunc_asm_armv8.S Sun Sep 22 10:29:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc_asm_armv8.S,v 1.3 2018/12/21 08:01:01 ryo Exp $ */ +/* $NetBSD: cpufunc_asm_armv8.S,v 1.3.4.1 2019/09/22 10:29:44 martin Exp $ */ /*- * Copyright (c) 2014 Robin Randhawa @@ -243,16 +243,14 @@ ENTRY(aarch64_tlbi_by_asid_va) /* x8 = bit 63[ASID]48, 47[RES0]44, 43[VA(55:12)]0 */ lsl x8, x0, #48 bfxil x8, x1, #12, #44 -#ifdef MULTIPROCESSOR - /* need dsb and isb for inner shareable? */ dsb ishst +#ifdef MULTIPROCESSOR tlbi vae1is, x8 - dsb ish - isb #else - /* no need dsb and isb for single entry */ tlbi vae1, x8 #endif + dsb ish + isb ret END(aarch64_tlbi_by_asid_va) @@ -261,15 +259,13 @@ ENTRY(aarch64_tlbi_by_asid_va_ll) /* x8 = bit 63[ASID]48, 47[RES0]44, 43[VA(55:12)]0 */ lsl x8, x0, #48 bfxil x8, x1, #12, #44 -#ifdef MULTIPROCESSOR - /* need dsb and isb for inner shareable? */ dsb ishst +#ifdef MULTIPROCESSOR tlbi vale1is, x8 - dsb ish - isb #else - /* no need dsb and isb for single entry */ tlbi vale1, x8 #endif + dsb ish + isb ret END(aarch64_tlbi_by_asid_va_ll)
CVS commit: [netbsd-9] src/sys/arch/aarch64/aarch64
Module Name:src Committed By: martin Date: Sun Sep 22 10:29:44 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64 [netbsd-9]: cpufunc_asm_armv8.S Log Message: Pull up following revision(s) (requested by ryo in ticket #213): sys/arch/aarch64/aarch64/cpufunc_asm_armv8.S: revision 1.4 even if "no options MULTIPROCESSOR" requires isb after tlbi op. since it should be harmless, dsb is also added. fixed a problem that rockpro64 doesn't boot without MULTIPROCESSOR. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.4.1 src/sys/arch/aarch64/aarch64/cpufunc_asm_armv8.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/netinet6
Module Name:src Committed By: martin Date: Sun Sep 22 10:24:09 UTC 2019 Modified Files: src/sys/netinet6 [netbsd-9]: nd6_nbr.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #212): sys/netinet6/nd6_nbr.c: revision 1.173 nd6: remove extra pserialize_read_exit To generate a diff of this commit: cvs rdiff -u -r1.166.2.2 -r1.166.2.3 src/sys/netinet6/nd6_nbr.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/netinet6/nd6_nbr.c diff -u src/sys/netinet6/nd6_nbr.c:1.166.2.2 src/sys/netinet6/nd6_nbr.c:1.166.2.3 --- src/sys/netinet6/nd6_nbr.c:1.166.2.2 Thu Sep 5 08:28:06 2019 +++ src/sys/netinet6/nd6_nbr.c Sun Sep 22 10:24:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_nbr.c,v 1.166.2.2 2019/09/05 08:28:06 martin Exp $ */ +/* $NetBSD: nd6_nbr.c,v 1.166.2.3 2019/09/22 10:24:09 martin Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.166.2.2 2019/09/05 08:28:06 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.166.2.3 2019/09/22 10:24:09 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -494,7 +494,6 @@ nd6_ns_output(struct ifnet *ifp, const s "determined: dst=%s, error=%d\n", IN6_PRINT(ip6buf, _sa.sin6_addr), error); -pserialize_read_exit(s); goto bad; } src = _in;
CVS commit: [netbsd-9] src/sys/netinet6
Module Name:src Committed By: martin Date: Sun Sep 22 10:24:09 UTC 2019 Modified Files: src/sys/netinet6 [netbsd-9]: nd6_nbr.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #212): sys/netinet6/nd6_nbr.c: revision 1.173 nd6: remove extra pserialize_read_exit To generate a diff of this commit: cvs rdiff -u -r1.166.2.2 -r1.166.2.3 src/sys/netinet6/nd6_nbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/etc
Module Name:src Committed By: martin Date: Sun Sep 22 10:22:15 UTC 2019 Modified Files: src/etc [netbsd-9]: MAKEDEV.tmpl Log Message: Pull up following revision(s) (requested by thorpej in ticket #211): etc/MAKEDEV.tmpl: revision 1.208 Create the character device for spiflash, in addition to the block device. This is needed for getdiskrawname() to DTRT (for installboot(8)). XXX pullup-9 To generate a diff of this commit: cvs rdiff -u -r1.205 -r1.205.2.1 src/etc/MAKEDEV.tmpl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/etc
Module Name:src Committed By: martin Date: Sun Sep 22 10:22:15 UTC 2019 Modified Files: src/etc [netbsd-9]: MAKEDEV.tmpl Log Message: Pull up following revision(s) (requested by thorpej in ticket #211): etc/MAKEDEV.tmpl: revision 1.208 Create the character device for spiflash, in addition to the block device. This is needed for getdiskrawname() to DTRT (for installboot(8)). XXX pullup-9 To generate a diff of this commit: cvs rdiff -u -r1.205 -r1.205.2.1 src/etc/MAKEDEV.tmpl Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/MAKEDEV.tmpl diff -u src/etc/MAKEDEV.tmpl:1.205 src/etc/MAKEDEV.tmpl:1.205.2.1 --- src/etc/MAKEDEV.tmpl:1.205 Mon Jul 29 17:53:20 2019 +++ src/etc/MAKEDEV.tmpl Sun Sep 22 10:22:15 2019 @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: MAKEDEV.tmpl,v 1.205 2019/07/29 17:53:20 gdt Exp $ +# $NetBSD: MAKEDEV.tmpl,v 1.205.2.1 2019/09/22 10:22:15 martin Exp $ # # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -1218,6 +1218,7 @@ spiflash[0-9]*) unit=${i#spiflash} spiflash=spiflash$unit mkdev spiflash$unit b %spiflash_blk% $unit + mkdev rspiflash$unit c %spiflash_chr% $unit ;; altmem[0-9]*)
CVS commit: [netbsd-9] src/usr.sbin/installboot
Module Name:src Committed By: martin Date: Sun Sep 22 10:20:16 UTC 2019 Modified Files: src/usr.sbin/installboot [netbsd-9]: evboards.c evboards.h Log Message: Pull up following revision(s) (requested by thorpej in ticket #210): usr.sbin/installboot/evboards.h: revision 1.2 usr.sbin/installboot/evboards.c: revision 1.3 Add support for additional install step directives to enable using installboot(8) to write u-boot images to SPI NOR and other types of raw flash devices: input-block-size, input-pad-size, output-size, and output-block-size. Add the ability to create aliases for install objects, useful for when e.g. sdmmc and emmc share the same steps. Tested on an A20-OLinuXino-LIME2-e16Gs16M by bouyer@. XXX pullup netbsd-9 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.4.1 src/usr.sbin/installboot/evboards.c cvs rdiff -u -r1.1 -r1.1.4.1 src/usr.sbin/installboot/evboards.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/installboot/evboards.c diff -u src/usr.sbin/installboot/evboards.c:1.2 src/usr.sbin/installboot/evboards.c:1.2.4.1 --- src/usr.sbin/installboot/evboards.c:1.2 Sun May 12 13:47:09 2019 +++ src/usr.sbin/installboot/evboards.c Sun Sep 22 10:20:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: evboards.c,v 1.2 2019/05/12 13:47:09 maya Exp $ */ +/* $NetBSD: evboards.c,v 1.2.4.1 2019/09/22 10:20:16 martin Exp $ */ /*- * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -35,10 +35,11 @@ #include #if !defined(__lint) -__RCSID("$NetBSD: evboards.c,v 1.2 2019/05/12 13:47:09 maya Exp $"); +__RCSID("$NetBSD: evboards.c,v 1.2.4.1 2019/09/22 10:20:16 martin Exp $"); #endif /* !__lint */ #include +#include /* for roundup() */ #include #include #include @@ -199,6 +200,7 @@ __RCSID("$NetBSD: evboards.c,v 1.2 2019/ * -- "u-boot-install-sdmmc" (for SD cards) * -- "u-boot-install-emmc" (for eMMC modules) * -- "u-boot-install-usb" (for USB block storage) + * -- "u-boot-install-spi" (for SPI NOR flash) * -- * -- These installation steps will be selectable using * -- the "media=..." option to installboot(8). @@ -324,6 +326,91 @@ __RCSID("$NetBSD: evboards.c,v 1.2 2019/ * 512 * * + * + * There are some addditional directives for installing on raw flash devices: + * + * u-boot-install-spi + * + * + * input-block-size + * 2048 + * + * + * input-pad-size + * 2048 + * + * + * output-size + * 2097152 + * + * <-- Key: "output-block-size" + * -- Value: an integer specifying the size of + * --the blocks used to write to the + * --output device. If the output device + * --simulates a disk block storage device, + * --then this value must be a multiple of + * --the reported sector size. + * -- (optional) + * --> + * output-block-size + * 65536 + * + * + * + * For boards that require a media specification to be provided, it + * may be the case that two media types have identical steps. It + * could be confusing for users to see a list of media types that does + * not include the media type on which they are installing, so there + * is an alias capability: + * + * u-boot-install-spi + * + * . + * . + * . + * + * u-boot-install-sdmmc + * + * . + * . + * . + * + * <-- Steps for eMMC are identical to SDMMC on this board. --> + * u-boot-install-emmc + * u-boot-install-sdmmc */ /* @@ -466,6 +553,10 @@ static const char step_file_name_key[] = static const char step_file_offset_key[] = "file-offset"; static const char step_file_size_key[] = "file-size"; static const char step_image_offset_key[] = "image-offset"; +static const char step_input_block_size_key[] = "input-block-size"; +static const char step_input_pad_size_key[] = "input-pad-size"; +static const char step_output_size_key[] = "output-size"; +static const char step_output_block_size_key[] = "output-block-size"; static const char step_preserve_key[] = "preserve"; static bool @@ -474,11 +565,15 @@ validate_ubstep_object(evb_ubstep obj) /* * evb_ubstep is a dictionary with the following keys: * - * "file-name" (string) (required) - * "file-offset" (number) (optional) - * "file-size" (number) (optional) - * "image-offset" (number) (optional) - * "preserve" (bool) (optional) + * "file-name" (string) (required) + * "file-offset" (number) (optional) + * "file-size" (number) (optional) + * "image-offset" (number) (optional) + * "input-block-size" (number) (optional) + * "input-pad-size"(number) (optional) + * "output-size" (number) (optional) + * "output-block-size" (number) (optional) + * "preserve" (bool) (optional) */ if (prop_object_type(obj) != PROP_TYPE_DICTIONARY) return false; @@ -505,6 +600,37 @@ validate_ubstep_object(evb_ubstep obj) prop_object_type(v) !=
CVS commit: [netbsd-9] src/usr.sbin/installboot
Module Name:src Committed By: martin Date: Sun Sep 22 10:20:16 UTC 2019 Modified Files: src/usr.sbin/installboot [netbsd-9]: evboards.c evboards.h Log Message: Pull up following revision(s) (requested by thorpej in ticket #210): usr.sbin/installboot/evboards.h: revision 1.2 usr.sbin/installboot/evboards.c: revision 1.3 Add support for additional install step directives to enable using installboot(8) to write u-boot images to SPI NOR and other types of raw flash devices: input-block-size, input-pad-size, output-size, and output-block-size. Add the ability to create aliases for install objects, useful for when e.g. sdmmc and emmc share the same steps. Tested on an A20-OLinuXino-LIME2-e16Gs16M by bouyer@. XXX pullup netbsd-9 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.4.1 src/usr.sbin/installboot/evboards.c cvs rdiff -u -r1.1 -r1.1.4.1 src/usr.sbin/installboot/evboards.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: jmcneill Date: Sun Sep 22 09:54:57 UTC 2019 Modified Files: src/sys/dev/pci: files.pci Log Message: Correct mcx comment, drop mii dependency To generate a diff of this commit: cvs rdiff -u -r1.414 -r1.415 src/sys/dev/pci/files.pci Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/files.pci diff -u src/sys/dev/pci/files.pci:1.414 src/sys/dev/pci/files.pci:1.415 --- src/sys/dev/pci/files.pci:1.414 Sun Sep 22 08:21:35 2019 +++ src/sys/dev/pci/files.pci Sun Sep 22 09:54:56 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.pci,v 1.414 2019/09/22 08:21:35 mrg Exp $ +# $NetBSD: files.pci,v 1.415 2019/09/22 09:54:56 jmcneill Exp $ # # Config file and device description for machine-independent PCI code. # Included by ports that need it. Requires that the SCSI files be @@ -701,8 +701,8 @@ defparam opt_if_wm.h WM_RX_PROCESS_LIMIT WM_DISABLE_MSI WM_DISABLE_MSIX -# Mellanox ConnectX-4 Lx EN Network Adapter -device mcx: ether, ifnet, arp, mii +# Mellanox 5th generation Ethernet devices +device mcx: ether, ifnet, arp attach mcx at pci file dev/pci/if_mcx.c mcx
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jmcneill Date: Sun Sep 22 09:54:57 UTC 2019 Modified Files: src/sys/dev/pci: files.pci Log Message: Correct mcx comment, drop mii dependency To generate a diff of this commit: cvs rdiff -u -r1.414 -r1.415 src/sys/dev/pci/files.pci Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/dev/ic
Date:Sun, 22 Sep 2019 07:23:00 +0100 From:Nick Hudson Message-ID: <793d2380-8d1a-78ab-3682-0468aea0d...@gmx.co.uk> | I was merely pointing out that it exists already. Understood, and thanks - at a minimum that will avoid adding it with a different name. | I'm happy to help adding it to other ports. There's certainly no harm in that, for future use, but for right now there's no real need. kre
Re: CVS commit: src/sys/net
On 12.04.2018 06:38, Ryota Ozaki wrote: > Module Name: src > Committed By: ozaki-r > Date: Thu Apr 12 04:38:13 UTC 2018 > > Modified Files: > src/sys/net: if.h route.c route.h rtsock.c > > Log Message: > Resolve tangled lock dependencies in route.c > > This change sweeps remaining lock decisions based on if locked or not by > moving > utility functions of rtentry updates from rtsock.c and ensuring holding the > rt_lock. It also improves the atomicity of a update of a rtentry. > > +static struct ifaddr * > +rt_update_get_ifa(const struct rt_addrinfo info, const struct rtentry *rt, > +struct ifnet **ifp, struct psref *psref_ifp, struct psref *psref) > +{ Do we need to pass info as a value? It is pretty large here (1024 bytes). signature.asc Description: OpenPGP digital signature
CVS commit: src/sys/dev/ic
Module Name:src Committed By: kamil Date: Sun Sep 22 09:03:07 UTC 2019 Modified Files: src/sys/dev/ic: malo.c Log Message: Reduce always true comparison in malo_cmd_set_txpower() powerlevel is already checked for >=30 in the previous condition. Found by the lgtm bot. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/dev/ic/malo.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/malo.c diff -u src/sys/dev/ic/malo.c:1.15 src/sys/dev/ic/malo.c:1.16 --- src/sys/dev/ic/malo.c:1.15 Fri Dec 14 21:23:43 2018 +++ src/sys/dev/ic/malo.c Sun Sep 22 09:03:07 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: malo.c,v 1.15 2018/12/14 21:23:43 jakllsch Exp $ */ +/* $NetBSD: malo.c,v 1.16 2019/09/22 09:03:07 kamil Exp $ */ /* $OpenBSD: malo.c,v 1.92 2010/08/27 17:08:00 jsg Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: malo.c,v 1.15 2018/12/14 21:23:43 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: malo.c,v 1.16 2019/09/22 09:03:07 kamil Exp $"); #include #include @@ -2156,7 +2156,7 @@ malo_cmd_set_txpower(struct malo_softc * body->action = htole16(1); if (powerlevel < 30) body->supportpowerlvl = htole16(5); /* LOW */ - else if (powerlevel >= 30 && powerlevel < 60) + else if (powerlevel < 60) body->supportpowerlvl = htole16(10); /* MEDIUM */ else body->supportpowerlvl = htole16(15); /* HIGH */
CVS commit: src/sys/dev/ic
Module Name:src Committed By: kamil Date: Sun Sep 22 09:03:07 UTC 2019 Modified Files: src/sys/dev/ic: malo.c Log Message: Reduce always true comparison in malo_cmd_set_txpower() powerlevel is already checked for >=30 in the previous condition. Found by the lgtm bot. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/dev/ic/malo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
re: CVS commit: src/usr.sbin/usbdevs
> On further thought, I think your patch won't work correctly in cases > where USB controllers are detached. For example, if you attach usb0 > and usb1, and then detach usb0, getusbcount_device() will return 1, > and usbdevs will try to list devices only on the detached usb0, and > not on the still attached usb1. good point. i'll re-think...including your suggestion about notifying the user about missing devices. thanks! .mrg.
re: CVS commit: src/usr.sbin/usbdevs
Matthew, On further thought, I think your patch won't work correctly in cases where USB controllers are detached. For example, if you attach usb0 and usb1, and then detach usb0, getusbcount_device() will return 1, and usbdevs will try to list devices only on the detached usb0, and not on the still attached usb1. -- Andreas Gustafsson, g...@netbsd.org
CVS commit: src/sys/dev/pci
Module Name:src Committed By: mrg Date: Sun Sep 22 08:21:35 UTC 2019 Modified Files: src/sys/dev/pci: files.pci Log Message: add mcx attachment. To generate a diff of this commit: cvs rdiff -u -r1.413 -r1.414 src/sys/dev/pci/files.pci 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: mrg Date: Sun Sep 22 08:21:35 UTC 2019 Modified Files: src/sys/dev/pci: files.pci Log Message: add mcx attachment. To generate a diff of this commit: cvs rdiff -u -r1.413 -r1.414 src/sys/dev/pci/files.pci Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/files.pci diff -u src/sys/dev/pci/files.pci:1.413 src/sys/dev/pci/files.pci:1.414 --- src/sys/dev/pci/files.pci:1.413 Wed May 8 13:40:18 2019 +++ src/sys/dev/pci/files.pci Sun Sep 22 08:21:35 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files.pci,v 1.413 2019/05/08 13:40:18 isaki Exp $ +# $NetBSD: files.pci,v 1.414 2019/09/22 08:21:35 mrg Exp $ # # Config file and device description for machine-independent PCI code. # Included by ports that need it. Requires that the SCSI files be @@ -701,6 +701,11 @@ defparam opt_if_wm.h WM_RX_PROCESS_LIMIT WM_DISABLE_MSI WM_DISABLE_MSIX +# Mellanox ConnectX-4 Lx EN Network Adapter +device mcx: ether, ifnet, arp, mii +attach mcx at pci +file dev/pci/if_mcx.c mcx + # Broadcom 570x Gigabit Ethernet device bge: ether, ifnet, arp, mii, mii_bitbang attach bge at pci
re: CVS commit: src/usr.sbin/usbdevs
Hi mrg You wrote: > > Look for up to 16 USB controllers, to match the number of device nodes > > now created by MAKEDEV. > > thanks for doing this. you inspired me to get usbdevs to get the > count from drvctl(8) if available, so next time we don't have to > patch it again. based upon the code in drvctl(8). > > what do you think? > >https://www.netbsd.org/~mrg/usbdevs.anycount.diff Thanks for improving on my commit. Your patch looks correct as far as I can see, but rather complicated for what it does. Couldn't we get the same end result simply by looping until opening /dev/usbN yields ENOENT? Or alternatively, if we do spend the effort to walk the device tree, we should use the information gained from that to full advantage by issuing warnings about missing /dev/usbN device nodes rather than just silently ignoring the affected controllers. -- Andreas Gustafsson, g...@netbsd.org
CVS commit: src/share/man/man4
Module Name:src Committed By: dsainty Date: Sun Sep 22 07:42:28 UTC 2019 Modified Files: src/share/man/man4: ustir.4 Log Message: Purge an ancient email address, use dsai...@netbsd.org instead To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/ustir.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: dsainty Date: Sun Sep 22 07:42:28 UTC 2019 Modified Files: src/share/man/man4: ustir.4 Log Message: Purge an ancient email address, use dsai...@netbsd.org instead To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/ustir.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/ustir.4 diff -u src/share/man/man4/ustir.4:1.5 src/share/man/man4/ustir.4:1.6 --- src/share/man/man4/ustir.4:1.5 Tue Mar 18 18:20:39 2014 +++ src/share/man/man4/ustir.4 Sun Sep 22 07:42:28 2019 @@ -1,10 +1,10 @@ -.\" $NetBSD: ustir.4,v 1.5 2014/03/18 18:20:39 riastradh Exp $ +.\" $NetBSD: ustir.4,v 1.6 2019/09/22 07:42:28 dsainty Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation -.\" by David Sainty +.\" by David Sainty .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -64,7 +64,7 @@ appeared in The .Nm driver was written by -.An David Sainty Aq Mt david.sai...@dtsp.co.nz . +.An David Sainty Aq Mt dsai...@netbsd.org . .Sh BUGS The STIr4200 cannot notify the driver when it has received data, instead it has to be continuously polled. This driver polls (when idle) at a fairly low
CVS commit: src/usr.bin/usbhidctl
Module Name:src Committed By: dsainty Date: Sun Sep 22 07:34:33 UTC 2019 Modified Files: src/usr.bin/usbhidctl: usbhid.c usbhidctl.1 Log Message: Purge an ancient email address, use dsai...@netbsd.org instead To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/usr.bin/usbhidctl/usbhid.c cvs rdiff -u -r1.25 -r1.26 src/usr.bin/usbhidctl/usbhidctl.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/usbhidctl
Module Name:src Committed By: dsainty Date: Sun Sep 22 07:34:33 UTC 2019 Modified Files: src/usr.bin/usbhidctl: usbhid.c usbhidctl.1 Log Message: Purge an ancient email address, use dsai...@netbsd.org instead To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/usr.bin/usbhidctl/usbhid.c cvs rdiff -u -r1.25 -r1.26 src/usr.bin/usbhidctl/usbhidctl.1 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/usbhidctl/usbhid.c diff -u src/usr.bin/usbhidctl/usbhid.c:1.37 src/usr.bin/usbhidctl/usbhid.c:1.38 --- src/usr.bin/usbhidctl/usbhid.c:1.37 Sun Dec 10 20:38:14 2017 +++ src/usr.bin/usbhidctl/usbhid.c Sun Sep 22 07:34:33 2019 @@ -1,11 +1,11 @@ -/* $NetBSD: usbhid.c,v 1.37 2017/12/10 20:38:14 bouyer Exp $ */ +/* $NetBSD: usbhid.c,v 1.38 2019/09/22 07:34:33 dsainty Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation - * by David Sainty + * by David Sainty * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: usbhid.c,v 1.37 2017/12/10 20:38:14 bouyer Exp $"); +__RCSID("$NetBSD: usbhid.c,v 1.38 2019/09/22 07:34:33 dsainty Exp $"); #endif #include Index: src/usr.bin/usbhidctl/usbhidctl.1 diff -u src/usr.bin/usbhidctl/usbhidctl.1:1.25 src/usr.bin/usbhidctl/usbhidctl.1:1.26 --- src/usr.bin/usbhidctl/usbhidctl.1:1.25 Tue Mar 18 18:20:45 2014 +++ src/usr.bin/usbhidctl/usbhidctl.1 Sun Sep 22 07:34:33 2019 @@ -1,10 +1,10 @@ -.\" $NetBSD: usbhidctl.1,v 1.25 2014/03/18 18:20:45 riastradh Exp $ +.\" $NetBSD: usbhidctl.1,v 1.26 2019/09/22 07:34:33 dsainty Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" This code is derived from software contributed to The NetBSD Foundation -.\" by David Sainty +.\" by David Sainty .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -250,4 +250,4 @@ The command first appeared in .Nx 1.4 . .Sh AUTHORS -.An David Sainty Aq Mt david.sai...@dtsp.co.nz +.An David Sainty Aq Mt dsai...@netbsd.org
CVS commit: src/sys/dev/usb
Module Name:src Committed By: dsainty Date: Sun Sep 22 07:29:16 UTC 2019 Modified Files: src/sys/dev/usb: ubt.c udsir.c Log Message: Purge an ancient email address, use dsai...@netbsd.org instead To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/dev/usb/ubt.c cvs rdiff -u -r1.8 -r1.9 src/sys/dev/usb/udsir.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/ubt.c diff -u src/sys/dev/usb/ubt.c:1.62 src/sys/dev/usb/ubt.c:1.63 --- src/sys/dev/usb/ubt.c:1.62 Sun May 5 03:17:54 2019 +++ src/sys/dev/usb/ubt.c Sun Sep 22 07:29:16 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ubt.c,v 1.62 2019/05/05 03:17:54 mrg Exp $ */ +/* $NetBSD: ubt.c,v 1.63 2019/09/22 07:29:16 dsainty Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -36,7 +36,7 @@ * * This code is derived from software contributed to The NetBSD Foundation * by Lennart Augustsson (lenn...@augustsson.net) and - * David Sainty (david.sai...@dtsp.co.nz). + * David Sainty (dsai...@netbsd.org). * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.62 2019/05/05 03:17:54 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.63 2019/09/22 07:29:16 dsainty Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" Index: src/sys/dev/usb/udsir.c diff -u src/sys/dev/usb/udsir.c:1.8 src/sys/dev/usb/udsir.c:1.9 --- src/sys/dev/usb/udsir.c:1.8 Mon Jul 22 06:24:57 2019 +++ src/sys/dev/usb/udsir.c Sun Sep 22 07:29:16 2019 @@ -1,11 +1,11 @@ -/* $NetBSD: udsir.c,v 1.8 2019/07/22 06:24:57 skrll Exp $ */ +/* $NetBSD: udsir.c,v 1.9 2019/09/22 07:29:16 dsainty Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation - * by David Sainty + * by David Sainty * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: udsir.c,v 1.8 2019/07/22 06:24:57 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udsir.c,v 1.9 2019/09/22 07:29:16 dsainty Exp $"); #include #include
CVS commit: src/sys/dev/usb
Module Name:src Committed By: dsainty Date: Sun Sep 22 07:29:16 UTC 2019 Modified Files: src/sys/dev/usb: ubt.c udsir.c Log Message: Purge an ancient email address, use dsai...@netbsd.org instead To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/dev/usb/ubt.c cvs rdiff -u -r1.8 -r1.9 src/sys/dev/usb/udsir.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: dsainty Date: Sun Sep 22 07:28:35 UTC 2019 Modified Files: src/sys/dev/usb: ustir.c ustirreg.h Log Message: Purge an ancient email address, use dsai...@netbsd.org instead To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/dev/usb/ustir.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/usb/ustirreg.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/ustir.c diff -u src/sys/dev/usb/ustir.c:1.41 src/sys/dev/usb/ustir.c:1.42 --- src/sys/dev/usb/ustir.c:1.41 Sat Sep 14 15:21:19 2019 +++ src/sys/dev/usb/ustir.c Sun Sep 22 07:28:35 2019 @@ -1,11 +1,11 @@ -/* $NetBSD: ustir.c,v 1.41 2019/09/14 15:21:19 maxv Exp $ */ +/* $NetBSD: ustir.c,v 1.42 2019/09/22 07:28:35 dsainty Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation - * by David Sainty + * by David Sainty * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ustir.c,v 1.41 2019/09/14 15:21:19 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ustir.c,v 1.42 2019/09/22 07:28:35 dsainty Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" Index: src/sys/dev/usb/ustirreg.h diff -u src/sys/dev/usb/ustirreg.h:1.4 src/sys/dev/usb/ustirreg.h:1.5 --- src/sys/dev/usb/ustirreg.h:1.4 Mon Apr 28 20:24:01 2008 +++ src/sys/dev/usb/ustirreg.h Sun Sep 22 07:28:35 2019 @@ -1,11 +1,11 @@ -/* $NetBSD: ustirreg.h,v 1.4 2008/04/28 20:24:01 martin Exp $ */ +/* $NetBSD: ustirreg.h,v 1.5 2019/09/22 07:28:35 dsainty Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation - * by David Sainty + * by David Sainty * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions
CVS commit: src/sys/dev/usb
Module Name:src Committed By: dsainty Date: Sun Sep 22 07:28:35 UTC 2019 Modified Files: src/sys/dev/usb: ustir.c ustirreg.h Log Message: Purge an ancient email address, use dsai...@netbsd.org instead To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/dev/usb/ustir.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/usb/ustirreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/dev/ic
On 21/09/2019 20:19, Robert Elz wrote: Date:Sun, 22 Sep 2019 01:23:41 +0700 From:Robert Elz Message-ID: <8235.1569090...@jinx.noi.kre.to> | we'd need it in all the other ports before it can be used in MD code. I meant MI code of course... Sure. I was merely pointing out that it exists already. I'm happy to help adding it to other ports. Nick
CVS commit: src/sys/arch/luna68k/dev
Module Name:src Committed By: rin Date: Sun Sep 22 06:06:01 UTC 2019 Modified Files: src/sys/arch/luna68k/dev: lunafb.c Log Message: Correct size of framebuffer; page offset appears only once, not every color depths. Pointed out by Araki Ken. Thanks! To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/arch/luna68k/dev/lunafb.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/luna68k/dev
Module Name:src Committed By: rin Date: Sun Sep 22 06:06:01 UTC 2019 Modified Files: src/sys/arch/luna68k/dev: lunafb.c Log Message: Correct size of framebuffer; page offset appears only once, not every color depths. Pointed out by Araki Ken. Thanks! To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/arch/luna68k/dev/lunafb.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/luna68k/dev/lunafb.c diff -u src/sys/arch/luna68k/dev/lunafb.c:1.40 src/sys/arch/luna68k/dev/lunafb.c:1.41 --- src/sys/arch/luna68k/dev/lunafb.c:1.40 Tue Jul 23 14:34:11 2019 +++ src/sys/arch/luna68k/dev/lunafb.c Sun Sep 22 06:06:01 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: lunafb.c,v 1.40 2019/07/23 14:34:11 rin Exp $ */ +/* $NetBSD: lunafb.c,v 1.41 2019/09/22 06:06:01 rin Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: lunafb.c,v 1.40 2019/07/23 14:34:11 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lunafb.c,v 1.41 2019/09/22 06:06:01 rin Exp $"); #include #include @@ -308,8 +308,8 @@ omfbmmap(void *v, void *vs, off_t offset #endif case WSDISPLAYIO_MODE_DUMBFB: if (offset >= 0 && - offset < (m68k_page_offset(OMFB_FB_RADDR) + - dc->dc_rowbytes * dc->dc_ht) * dc->dc_depth) + offset < m68k_page_offset(OMFB_FB_RADDR) + + dc->dc_rowbytes * dc->dc_ht * dc->dc_depth) cookie = m68k_btop(m68k_trunc_page(OMFB_FB_RADDR) + offset); break;