CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: christos Date: Thu Sep 22 03:43:08 UTC 2016 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_platform_limits_posix.h Log Message: Avoid definining a prototype for signal(3) from because the INTERCEPTOR macro cannot handle function returns easily. TODO: fix to avoid this kind of name pollution. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1.7 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1.8 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1.7 Wed Sep 21 19:18:42 2016 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h Wed Sep 21 23:43:07 2016 @@ -14,7 +14,9 @@ #define SANITIZER_PLATFORM_LIMITS_POSIX_H #ifdef __NetBSD__ +#define _SYS_SIGNAL_H_ #include +#undef _SYS_SIGNAL_H_ #endif #include "sanitizer_internal_defs.h" #include "sanitizer_platform.h"
CVS commit: src/external/gpl3/binutils/usr.sbin/mdsetimage
Module Name:src Committed By: christos Date: Thu Sep 22 01:53:39 UTC 2016 Modified Files: src/external/gpl3/binutils/usr.sbin/mdsetimage: Makefile Log Message: Find bin.h To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 \ src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile diff -u src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile:1.12 src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile:1.13 --- src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile:1.12 Wed Sep 21 12:26:18 2016 +++ src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile Wed Sep 21 21:53:39 2016 @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.12 2016/09/21 16:26:18 christos Exp $ +# $NetBSD: Makefile,v 1.13 2016/09/22 01:53:39 christos Exp $ .include -.PATH: ${NETBSDSRCDIR}/usr.sbin/mdsetimage +MDSETIMAGE=${NETBSDSRCDIR}/usr.sbin/mdsetimage +.PATH: ${MDSETIMAGE} .if (defined(HOSTPROG) && \ (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN))) || \ @@ -13,7 +14,7 @@ PROG= mdsetimage SRCS= mdsetimage.c bin_bfd.c MAN= mdsetimage.8 -CPPFLAGS+= -I${DIST}/bfd -I${DIST}/binutils -I${DIST}/include +CPPFLAGS+= -I${DIST}/bfd -I${DIST}/binutils -I${DIST}/include -I${MDSETIMAGE} .if !defined(HOSTPROG) PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd
CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: christos Date: Wed Sep 21 23:18:42 UTC 2016 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_platform_limits_posix.h Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1.6 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1.7 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1.6 Wed Sep 21 17:30:56 2016 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h Wed Sep 21 19:18:42 2016 @@ -13,6 +13,9 @@ #ifndef SANITIZER_PLATFORM_LIMITS_POSIX_H #define SANITIZER_PLATFORM_LIMITS_POSIX_H +#ifdef __NetBSD__ +#include +#endif #include "sanitizer_internal_defs.h" #include "sanitizer_platform.h"
CVS commit: xsrc/external/mit
Module Name:xsrc Committed By: christos Date: Wed Sep 21 22:11:16 UTC 2016 Modified Files: xsrc/external/mit/xfs/dist/os: xfstrans.c xsrc/external/mit/xorg-server.old/include: dix-config.h xorg-server.h xsrc/external/mit/xorg-server/include: dix-config.h xorg-server.h Log Message: PR/51494: Rin Okuyama: Fix MKINET6=no build. To generate a diff of this commit: cvs rdiff -u -r1.1.1.4 -r1.2 xsrc/external/mit/xfs/dist/os/xfstrans.c cvs rdiff -u -r1.1.1.1 -r1.2 \ xsrc/external/mit/xorg-server.old/include/dix-config.h \ xsrc/external/mit/xorg-server.old/include/xorg-server.h cvs rdiff -u -r1.23 -r1.24 xsrc/external/mit/xorg-server/include/dix-config.h cvs rdiff -u -r1.13 -r1.14 \ xsrc/external/mit/xorg-server/include/xorg-server.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xfs/dist/os/xfstrans.c diff -u xsrc/external/mit/xfs/dist/os/xfstrans.c:1.1.1.4 xsrc/external/mit/xfs/dist/os/xfstrans.c:1.2 --- xsrc/external/mit/xfs/dist/os/xfstrans.c:1.1.1.4 Wed Feb 25 15:02:39 2015 +++ xsrc/external/mit/xfs/dist/os/xfstrans.c Wed Sep 21 18:11:16 2016 @@ -45,7 +45,7 @@ TRANS(GetInetdListenInfo) (int fd) /* Fill in correct address/portnum */ TRANS(SocketINETGetAddr)(inetdCI); -#ifdef AF_INET6 +#if defined(IPv6) && defined(AF_INET6) if ( ((struct sockaddr *)(inetdCI->addr))->sa_family == AF_INET6 ) portnum = ntohs(((struct sockaddr_in6 *)(inetdCI->addr))->sin6_port); else Index: xsrc/external/mit/xorg-server.old/include/dix-config.h diff -u xsrc/external/mit/xorg-server.old/include/dix-config.h:1.1.1.1 xsrc/external/mit/xorg-server.old/include/dix-config.h:1.2 --- xsrc/external/mit/xorg-server.old/include/dix-config.h:1.1.1.1 Thu Jun 9 05:08:01 2016 +++ xsrc/external/mit/xorg-server.old/include/dix-config.h Wed Sep 21 18:11:16 2016 @@ -248,7 +248,9 @@ #define HAVE_VASPRINTF 1 /* Support IPv6 for TCP connections */ -#define IPv6 1 +#ifndef __NetBSD__ /* Defined by the build */ +# define IPv6 1 +#endif /* Support os-specific local connections */ /* #undef LOCALCONN */ Index: xsrc/external/mit/xorg-server.old/include/xorg-server.h diff -u xsrc/external/mit/xorg-server.old/include/xorg-server.h:1.1.1.1 xsrc/external/mit/xorg-server.old/include/xorg-server.h:1.2 --- xsrc/external/mit/xorg-server.old/include/xorg-server.h:1.1.1.1 Thu Jun 9 05:08:01 2016 +++ xsrc/external/mit/xorg-server.old/include/xorg-server.h Wed Sep 21 18:11:16 2016 @@ -39,7 +39,9 @@ #define HAS_SHM 1 /* Support IPv6 for TCP connections */ -#define IPv6 1 +#ifndef __NetBSD__ /* Defined by the build */ +# define IPv6 1 +#endif /* Support MIT-SHM Extension */ #define MITSHM 1 Index: xsrc/external/mit/xorg-server/include/dix-config.h diff -u xsrc/external/mit/xorg-server/include/dix-config.h:1.23 xsrc/external/mit/xorg-server/include/dix-config.h:1.24 --- xsrc/external/mit/xorg-server/include/dix-config.h:1.23 Tue Aug 30 04:35:24 2016 +++ xsrc/external/mit/xorg-server/include/dix-config.h Wed Sep 21 18:11:16 2016 @@ -251,7 +251,9 @@ #define HAVE_VASPRINTF 1 /* Support IPv6 for TCP connections */ -#define IPv6 1 +#ifndef __NetBSD__ /* Defined by the build */ +# define IPv6 1 +#endif /* Support os-specific local connections */ /* #undef LOCALCONN */ Index: xsrc/external/mit/xorg-server/include/xorg-server.h diff -u xsrc/external/mit/xorg-server/include/xorg-server.h:1.13 xsrc/external/mit/xorg-server/include/xorg-server.h:1.14 --- xsrc/external/mit/xorg-server/include/xorg-server.h:1.13 Tue Aug 30 04:35:24 2016 +++ xsrc/external/mit/xorg-server/include/xorg-server.h Wed Sep 21 18:11:16 2016 @@ -70,7 +70,9 @@ #define HAVE_STRNDUP 1 /* Support IPv6 for TCP connections */ -#define IPv6 1 +#ifndef __NetBSD__ /* Defined by the build */ +# define IPv6 1 +#endif /* Support MIT-SHM Extension */ #define MITSHM 1
CVS commit: src/usr.sbin/mdsetimage
Module Name:src Committed By: christos Date: Wed Sep 21 21:53:03 UTC 2016 Removed Files: src/usr.sbin/mdsetimage: bin_bfd.c Log Message: moved to /usr/src/external/gpl3/binutils/usr.sbin/mdsetimage To generate a diff of this commit: cvs rdiff -u -r1.1 -r0 src/usr.sbin/mdsetimage/bin_bfd.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/binutils/usr.sbin/mdsetimage
Module Name:src Committed By: christos Date: Wed Sep 21 21:52:26 UTC 2016 Added Files: src/external/gpl3/binutils/usr.sbin/mdsetimage: bin_bfd.c Log Message: move from /usr/src/usr.sbin/mdsetimage To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ src/external/gpl3/binutils/usr.sbin/mdsetimage/bin_bfd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/gpl3/binutils/usr.sbin/mdsetimage/bin_bfd.c diff -u /dev/null src/external/gpl3/binutils/usr.sbin/mdsetimage/bin_bfd.c:1.1 --- /dev/null Wed Sep 21 17:52:26 2016 +++ src/external/gpl3/binutils/usr.sbin/mdsetimage/bin_bfd.c Wed Sep 21 17:52:26 2016 @@ -0,0 +1,149 @@ +/* $NetBSD: bin_bfd.c,v 1.1 2016/09/21 21:52:26 christos Exp $ */ + +/* + * Copyright (c) 1996, 2002 Christopher G. Demetriou + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + *derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + * + * <> + */ + +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#endif + +#include +__RCSID("$NetBSD: bin_bfd.c,v 1.1 2016/09/21 21:52:26 christos Exp $"); + +#include +#include +#include +#include +#include +#include "bin.h" + +void * +bin_open(int kfd, const char *kfile, const char *bfdname) +{ + bfd *abfd; + bfd_init(); + if ((abfd = bfd_fdopenr(kfile, bfdname, kfd)) == NULL) { + bfd_perror("open"); + exit(1); + } + if (!bfd_check_format(abfd, bfd_object)) { + bfd_perror("check format"); + exit(1); + } + return abfd; +} + +int +bin_find_md_root(void *bin, const char *mappedkfile, off_t size, +unsigned long text_start, +const char *root_name, const char *size_name, size_t *md_root_offset, +size_t *md_root_size_offset, uint32_t *md_root_size, int verbose) +{ + bfd *abfd = bin; + long i; + long storage_needed; + long number_of_symbols; + asymbol **symbol_table = NULL; + struct symbols { + const char *name; + size_t offset; + } *s, symbols[3]; + + symbols[0].name = root_name; + symbols[1].name = size_name; + symbols[2].name = NULL; + + storage_needed = bfd_get_symtab_upper_bound(abfd); + if (storage_needed <= 0) { + warnx("bfd storage needed error"); + return 1; + } + + symbol_table = malloc(storage_needed); + if (symbol_table == NULL) { + warn("symbol table"); + return 1; + } + + number_of_symbols = bfd_canonicalize_symtab(abfd, symbol_table); + if (number_of_symbols <= 0) { + warnx("can't canonicalize symbol table"); + free(symbol_table); + return 1; + } + + for (i = 0; i < number_of_symbols; i++) { + for (s = symbols; s->name != NULL; s++) { + const char *sym = symbol_table[i]->name; + + /* + * match symbol prefix '_' or ''. + */ + if (!strcmp(s->name, sym) || + !strcmp(s->name + 1, sym)) { +s->offset = +(size_t)(symbol_table[i]->section->filepos ++ symbol_table[i]->value); + } + } + } + + free(symbol_table); + + for (s = symbols; s->name != NULL; s++) { + if (s->offset == 0) { + warnx("missing offset for `%s'", s->name); + return 1; + } + } + + *md_root_offset = symbols[0].offset; + *md_root_size_offset = symbols[1].offset; + *md_root_size = bfd_get_32(abfd, [*md_root_size_offset]); + + return 0; +} + +void +bin_put_32(void *bin, off_t size, char *buf) +{ + bfd_put_32((struct bfd *)bin, size, buf); +} + +void +bin_close(void *bin) +{ + bfd_close_all_done((struct bfd *)bin); +} + +const char ** +bin_supported_targets(void) +{ + return bfd_target_list(); +}
CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: christos Date: Wed Sep 21 21:30:56 UTC 2016 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_platform_limits_posix.h Log Message: Check the NetBSD version To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1.5 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1.6 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1.5 Wed Sep 21 15:18:01 2016 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h Wed Sep 21 17:30:56 2016 @@ -338,9 +338,11 @@ namespace __sanitizer { # endif void *ifa_dstaddr; // (struct sockaddr *) void *ifa_data; -#ifdef __NetBSD__ +# ifdef __NetBSD__ +# if __NetBSD_Prereq__(7, 99, 39) unsigned int ifa_addrflags; -#endif +# endif +# endif }; #endif // !SANITIZER_ANDROID
CVS commit: src/usr.sbin/ifwatchd
Module Name:src Committed By: roy Date: Wed Sep 21 21:07:29 UTC 2016 Modified Files: src/usr.sbin/ifwatchd: ifwatchd.c Log Message: Check address is not tentative, duplicated or detached before running scripts. XXX Do we want new script actions for detached or duplicated addresses? To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/usr.sbin/ifwatchd/ifwatchd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ifwatchd/ifwatchd.c diff -u src/usr.sbin/ifwatchd/ifwatchd.c:1.32 src/usr.sbin/ifwatchd/ifwatchd.c:1.33 --- src/usr.sbin/ifwatchd/ifwatchd.c:1.32 Wed Sep 21 20:31:31 2016 +++ src/usr.sbin/ifwatchd/ifwatchd.c Wed Sep 21 21:07:29 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ifwatchd.c,v 1.32 2016/09/21 20:31:31 roy Exp $ */ +/* $NetBSD: ifwatchd.c,v 1.33 2016/09/21 21:07:29 roy Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -48,6 +48,7 @@ #endif #include #include +#include #include #include @@ -61,10 +62,12 @@ #include enum event { ARRIVAL, DEPARTURE, UP, DOWN, CARRIER, NO_CARRIER }; +enum addrflag { NOTREADY, DETACHED, READY }; /* local functions */ __dead static void usage(void); static void dispatch(const void *, size_t); +static enum addrflag check_addrflags(int af, int addrflags); static void check_addrs(const struct ifa_msghdr *ifam); static void invoke_script(const struct sockaddr *sa, const struct sockaddr *dst, enum event ev, int ifindex, const char *ifname_hint); @@ -293,6 +296,27 @@ dispatch(const void *msg, size_t len) } } +static enum addrflag +check_addrflags(int af, int addrflags) +{ + + switch (af) { + case AF_INET: + if (addrflags & IN_IFF_NOTREADY) + return NOTREADY; + if (addrflags & IN_IFF_DETACHED) + return DETACHED; + break; + case AF_INET6: + if (addrflags & IN6_IFF_NOTREADY) + return NOTREADY; + if (addrflags & IN6_IFF_DETACHED) + return DETACHED; + break; + } + return READY; +} + static void check_addrs(const struct ifa_msghdr *ifam) { @@ -300,6 +324,7 @@ check_addrs(const struct ifa_msghdr *ifa const struct sockaddr *sa, *ifa = NULL, *brd = NULL; unsigned i; struct interface_data *ifd = NULL; + int aflag; enum event ev; if (ifam->ifam_addrs == 0) @@ -327,6 +352,13 @@ check_addrs(const struct ifa_msghdr *ifa } if (ifa != NULL && ifd != NULL) { ev = ifam->ifam_type == RTM_DELADDR ? DOWN : UP; + aflag = check_addrflags(ifa->sa_family, ifam->ifam_addrflags); + if (ev == UP) { + if (aflag == NOTREADY) +return; + if (aflag == DETACHED) +return; /* XXX set ev to DOWN? */ + } if ((ev == UP && if_is_connected(ifd->ifname)) || (ev == DOWN && if_is_not_connected(ifd->ifname))) invoke_script(ifa, brd, ev, ifd->index, ifd->ifname); @@ -540,7 +572,8 @@ run_initial_ups(void) { struct interface_data * ifd; struct ifaddrs *res = NULL, *p; - int s; + struct sockaddr *ifa; + int s, aflag; s = socket(AF_INET, SOCK_DGRAM, 0); if (s < 0) @@ -557,15 +590,16 @@ run_initial_ups(void) if (ifd == NULL) continue; - if (p->ifa_addr && p->ifa_addr->sa_family == AF_LINK) + ifa = p->ifa_addr; + if (ifa != NULL && ifa->sa_family == AF_LINK) invoke_script(NULL, NULL, ARRIVAL, ifd->index, NULL); if ((p->ifa_flags & IFF_UP) == 0) continue; - if (p->ifa_addr == NULL) + if (ifa == NULL) continue; - if (p->ifa_addr->sa_family == AF_LINK) { + if (ifa->sa_family == AF_LINK) { struct ifmediareq ifmr; memset(, 0, sizeof(ifmr)); @@ -581,8 +615,11 @@ run_initial_ups(void) } continue; } + aflag = check_addrflags(ifa->sa_family, p->ifa_addrflags); + if (aflag != READY) + continue; if (if_is_connected(ifd->ifname)) - invoke_script(p->ifa_addr, p->ifa_dstaddr, UP, + invoke_script(ifa, p->ifa_dstaddr, UP, ifd->index, ifd->ifname); } freeifaddrs(res);
CVS commit: src/doc/roadmaps
Module Name:src Committed By: jdolecek Date: Wed Sep 21 20:32:47 UTC 2016 Modified Files: src/doc/roadmaps: storage Log Message: update nvme entry to current reality To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/doc/roadmaps/storage Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/roadmaps/storage diff -u src/doc/roadmaps/storage:1.17 src/doc/roadmaps/storage:1.18 --- src/doc/roadmaps/storage:1.17 Fri Sep 16 15:02:23 2016 +++ src/doc/roadmaps/storage Wed Sep 21 20:32:47 2016 @@ -1,4 +1,4 @@ -$NetBSD: storage,v 1.17 2016/09/16 15:02:23 jdolecek Exp $ +$NetBSD: storage,v 1.18 2016/09/21 20:32:47 jdolecek Exp $ NetBSD Storage Roadmap == @@ -211,13 +211,12 @@ more drivers. nvme ("NVM Express") is a hardware interface standard for PCI-attached -SSDs. NetBSD now has a driver for these; however, it was ported from -OpenBSD and is not (yet) MPSAFE. This is, unfortunately, a fairly -serious limitation given the point and nature of nvme devices. - -Relatedly, the I/O path needs to be restructured to avoid software -bottlenecks on the way to an nvme device: they are fast enough that -things like disksort() do not make sense. +SSDs. NetBSD now has a driver for these. + +Driver is now MPSAFE and uses bufq fcfs (i.e. no disksort()) already, +so the most obvious software bottlenecks were treated. It still needs +more testing on real hardware, and it may be good to investigate some further +optimizations, such as DragonFly pbuf(9) or something similar. Semi-relatedly, it is also time for scsipi to become MPSAFE. @@ -226,6 +225,14 @@ Semi-relatedly, it is also time for scsi - The nvme driver is a backend to ld(4) which is MPSAFE, but we still need to attend to I/O path bottlenecks. Better instrumentation is needed. + - Flush cache commands via DIOCCACHESYNC is currently implemented using polled + commands for simplicity, limiting speed to about 10 milliseconds due to use + of delay(9); investigate if it's worth changing this to a cv to avoid + the delay, especially for journalled/heavy fsync scenarios + - NVMe controllers supports write cache administration via GET/SET FEATURE, but + driver doesn't currently implement the cache ioctls, leading to somewhat + ugly dkctl(1) output; it would be fairly simple to add this, but would + require small changes to ld(4) attachment code - There is no clear timeframe or release target for these points. - Contact msaitoh or agc for further information.
CVS commit: src/usr.sbin/ifwatchd
Module Name:src Committed By: roy Date: Wed Sep 21 20:31:32 UTC 2016 Modified Files: src/usr.sbin/ifwatchd: ifwatchd.c Log Message: We should always know the interface the address message was for. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/usr.sbin/ifwatchd/ifwatchd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ifwatchd/ifwatchd.c diff -u src/usr.sbin/ifwatchd/ifwatchd.c:1.31 src/usr.sbin/ifwatchd/ifwatchd.c:1.32 --- src/usr.sbin/ifwatchd/ifwatchd.c:1.31 Wed Sep 21 18:18:10 2016 +++ src/usr.sbin/ifwatchd/ifwatchd.c Wed Sep 21 20:31:31 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ifwatchd.c,v 1.31 2016/09/21 18:18:10 roy Exp $ */ +/* $NetBSD: ifwatchd.c,v 1.32 2016/09/21 20:31:31 roy Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ static void check_announce(const struct static void check_carrier(const struct if_msghdr *ifm); static void rescan_interfaces(void); static void free_interfaces(void); -static int find_interface(int index); +static struct interface_data * find_interface(int index); static void run_initial_ups(void); #ifdef SPPP_IF_SUPPORT @@ -298,10 +298,8 @@ check_addrs(const struct ifa_msghdr *ifa { const char *cp = (const char *)(ifam + 1); const struct sockaddr *sa, *ifa = NULL, *brd = NULL; - char ifname_buf[IFNAMSIZ]; - const char *ifname; - int ifndx = 0; unsigned i; + struct interface_data *ifd = NULL; enum event ev; if (ifam->ifam_addrs == 0) @@ -314,10 +312,11 @@ check_addrs(const struct ifa_msghdr *ifa const struct sockaddr_dl *li; li = (const struct sockaddr_dl *)sa; - ifndx = li->sdl_index; - if (!find_interface(ifndx)) { + if ((ifd = find_interface(li->sdl_index)) == NULL) { if (verbose) - printf("ignoring change on interface #%d\n", ifndx); + printf("ignoring change" + " on interface #%d\n", + li->sdl_index); return; } } else if (i == RTA_IFA) @@ -326,18 +325,11 @@ check_addrs(const struct ifa_msghdr *ifa brd = sa; RT_ADVANCE(cp, sa); } - if (ifa != NULL) { + if (ifa != NULL && ifd != NULL) { ev = ifam->ifam_type == RTM_DELADDR ? DOWN : UP; - ifname = if_indextoname(ifndx, ifname_buf); - if (ifname == NULL) - invoke_script(ifa, brd, ev, ifndx, ifname); - else if (ev == UP) { - if (if_is_connected(ifname)) -invoke_script(ifa, brd, ev, ifndx, ifname); - } else if (ev == DOWN) { - if (if_is_not_connected(ifname)) -invoke_script(ifa, brd, ev, ifndx, ifname); - } + if ((ev == UP && if_is_connected(ifd->ifname)) || + (ev == DOWN && if_is_not_connected(ifd->ifname))) + invoke_script(ifa, brd, ev, ifd->index, ifd->ifname); } } @@ -532,15 +524,15 @@ free_interfaces(void) } } -static int +static struct interface_data * find_interface(int idx) { struct interface_data * p; SLIST_FOREACH(p, , next) if (p->index == idx) - return 1; - return 0; + return p; + return NULL; } static void
CVS commit: src/doc
Module Name:src Committed By: jdolecek Date: Wed Sep 21 20:19:08 UTC 2016 Modified Files: src/doc: CHANGES Log Message: mention the ext2fs and nvme(4) work To generate a diff of this commit: cvs rdiff -u -r1.2185 -r1.2186 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2185 src/doc/CHANGES:1.2186 --- src/doc/CHANGES:1.2185 Fri Sep 16 17:13:06 2016 +++ src/doc/CHANGES Wed Sep 21 20:19:08 2016 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2185 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2186 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -325,10 +325,14 @@ Changes from NetBSD 7.0 to NetBSD 8.0: there [christos 20160527] zoneinfo: Import tzdata2016d. [agc 20160531] ntp: Import ntp 4.2.8p8. [christos 20160603] + ext2fs: Add ext4 extent support from FreeBSD, ported and contributed by + Hrishikesh Goyal (GSoc 2016) [christos 20160603] sys_info: Import a script to return version information for system libraries and utilities [agc 20160604] nvmectl(8): Added NVM Express control utility. [nonaka 20160604] dhcpcd(8): Import dhcpcd-6.11.1. [roy 20160617] + ext2fs: Add ext4 htree index support from FreeBSD, ported and + contributed by Hrishikesh Goyal (GSoc 2016). [christos 20160624] mdocml: Import 1.13.4. [christos 20160715] acpi(4): Updated ACPICA to 20160527. [christos 20160718] kernel: Use fine-grained permissions for kernel modules segments @@ -344,12 +348,21 @@ Changes from NetBSD 7.0 to NetBSD 8.0: OpenSSH: Imported 7.3. [christos 20160802] xen: Map the kernel image segments independently with fine-grained permissions (W^X). [maxv 20160802] + ext2fs: Add ext4 extra_inode support. [jdolecek 20160603] kernel: Provide an efficient way to prevent NULL from being mappable in userland processes. [maxv 20160806] + ext2fs: Actually fill file type for readdir(4) and friends. + [jdolecek 20160615] zoneinfo: Import tzdata2016f. [kre 20160807] + ext2fs: Add read-only ext4 extended attribute support. + [jdolecek 20160612] dhcpcd(8): Import dhcpcd-6.11.3. [roy 20160815] + ext2fs: Add ext4 dir_nlink support, supporting up to 64000 file hard + links, and unlimited directory links. [jdolecek 20160615] unbound: Import 1.5.9. [christos 20160820] + ext2fs: Add ext4 gdt_csum/uninit_bg support. [jdolecek 20160615] tmux(1): Import of tmux 2.2 [christos 20160831] lua: updated to 5.3.3 and applied all three patches from http://lua.org/bugs.html [salazar 20160908] libc: Update to tzcode2016f. [christos 20160916] + nvme(4): NVMe driver is now MPSAFE. [jdolecek 20160918]
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Wed Sep 21 20:12:12 UTC 2016 Modified Files: src/share/man/man4: nvme.4 Log Message: Various fixes: wording, sections, sort order, articles. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/nvme.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/nvme.4 diff -u src/share/man/man4/nvme.4:1.5 src/share/man/man4/nvme.4:1.6 --- src/share/man/man4/nvme.4:1.5 Wed Sep 21 20:01:03 2016 +++ src/share/man/man4/nvme.4 Wed Sep 21 20:12:12 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: nvme.4,v 1.5 2016/09/21 20:01:03 jdolecek Exp $ +.\" $NetBSD: nvme.4,v 1.6 2016/09/21 20:12:12 wiz Exp $ .\" $OpenBSD: nvme.4,v 1.2 2016/04/14 11:53:37 jmc Exp $ .\" .\" Copyright (c) 2016 David Gwynne@@ -30,64 +30,65 @@ driver provides support for NVMe, or NVM storage controllers conforming to the Non-Volatile Memory Host Controller Interface specification. Controllers complying to specification version 1.1 and 1.2 are known to work. -Other versions should too for normal operation with exception of some -passthrough commands. +Other versions should work too for normal operation with the exception of some +pass-through commands. .Pp -Driver supports following features: +The driver supports the following features: .Bl -bullet -compact -offset indent .It controller and namespace configuration and management using -.Xr nvmectl 1 +.Xr nvmectl 8 .It highly parallel I/O using per-CPU I/O queues .It PCI MSI/MSI-X attachment, and INTx for legacy systems .El .Pp -On systems supporting MSI/MSI-X, +On systems supporting MSI/MSI-X, the .Nm driver uses per-CPU IO queue pairs for lockless and highly parallelized I/O. Interrupt handlers are scheduled on distinct CPUs. -Driver allocates as many interrupt vectors as available, up to number +The driver allocates as many interrupt vectors as available, up to number of CPUs + 1. MSI supports up to 32 interrupt vectors within the system, MSI-X can have up to 2k. -Each I/O queue pair has separate command circular buffer. +Each I/O queue pair has a separate command circular buffer. +The .Nm -specification allows up to 64k commands per queue, driver currently allocates +specification allows up to 64k commands per queue, the driver currently allocates 1024 items per queue by default. -Command submissions are done always on current CPU, command completion -interrupt is handled on CPU according to I/O queue ID - first I/O queue on CPU0, -second I/O queue on CPU1 etc. +Command submissions are done always on the current CPU, the command completion +interrupt is handled on the CPU corresponding to the I/O queue ID +- first I/O queue on CPU0, second I/O queue on CPU1, etc. Admin queue command completion is not tied to any CPU, it's handled by any CPU. -To keep lock contention to minimum, it's recommended to keep this assignment, -even thought it is possible to reassign the interrupt handlers differently, +To keep lock contention to minimum, it is recommended to keep this assignment, +even though it is possible to reassign the interrupt handlers differently using -.Xr intrctl 1 . -Driver also uses soft interrupts to process command completions, in order to -increase total system I/O capacity and throughput. +.Xr intrctl 8 . +The driver also uses soft interrupts to process command completions, in order to +increase the total system I/O capacity and throughput. .Pp -On systems without MSI, driver uses single HW interrupt handler, for +On systems without MSI, the driver uses a single HW interrupt handler for both admin and standard I/O commands. -Command submissions are done on current CPU, command completion interrupt -is handled on any available CPU. This leads to some lock contention, -especially on command ccbs. +Command submissions are done on the current CPU, the command completion interrupt +is handled on any available CPU. +This leads to some lock contention, especially on command ccbs. Also, command completion handling must be done within the HW interrupt handler. .Sh FILES .Bl -tag -width /dev/nvmeX -compact .It Pa /dev/nvme* nvme device special files used by -.Xr nvmectl 1 . +.Xr nvmectl 8 . .El .Sh SEE ALSO .Xr intro 4 , .Xr ld 4 , .Xr pci 4 , -.Xr nvmectl 1 , +.Xr intrctl 8 , .Xr MAKEDEV 8 , -.Xr intrctl 1 +.Xr nvmectl 8 .Rs .%A NVM Express, Inc. .%T "NVM Express \- scalable, efficient, and industry standard" @@ -130,23 +131,24 @@ At least some .Nm adapter cards are known to require .Tn PCIe -Generation 3 slot. Such cards do not even probe when plugged +Generation 3 slot. +Such cards do not even probe when plugged into older generation slot. .Pp -Driver attaches and works fine also for emulated +The driver also attaches and works fine for emulated .Nm -device under QEMU and +devices under QEMU and .Tn Oracle .Tn VirtualBox . -However, -there seems
CVS commit: src/share/man/man4
Module Name:src Committed By: jdolecek Date: Wed Sep 21 20:01:03 UTC 2016 Modified Files: src/share/man/man4: nvme.4 Log Message: expand driver description To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/nvme.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/nvme.4 diff -u src/share/man/man4/nvme.4:1.4 src/share/man/man4/nvme.4:1.5 --- src/share/man/man4/nvme.4:1.4 Fri Sep 16 12:43:37 2016 +++ src/share/man/man4/nvme.4 Wed Sep 21 20:01:03 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: nvme.4,v 1.4 2016/09/16 12:43:37 wiz Exp $ +.\" $NetBSD: nvme.4,v 1.5 2016/09/21 20:01:03 jdolecek Exp $ .\" $OpenBSD: nvme.4,v 1.2 2016/04/14 11:53:37 jmc Exp $ .\" .\" Copyright (c) 2016 David Gwynne@@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd September 16, 2016 +.Dd September 21, 2016 .Dt NVME 4 .Os .Sh NAME @@ -29,10 +29,77 @@ The driver provides support for NVMe, or NVM Express, storage controllers conforming to the Non-Volatile Memory Host Controller Interface specification. +Controllers complying to specification version 1.1 and 1.2 are known to work. +Other versions should too for normal operation with exception of some +passthrough commands. +.Pp +Driver supports following features: +.Bl -bullet -compact -offset indent +.It +controller and namespace configuration and management using +.Xr nvmectl 1 +.It +highly parallel I/O using per-CPU I/O queues +.It +PCI MSI/MSI-X attachment, and INTx for legacy systems +.El +.Pp +On systems supporting MSI/MSI-X, +.Nm +driver uses per-CPU IO queue pairs for lockless and highly parallelized I/O. +Interrupt handlers are scheduled on distinct CPUs. +Driver allocates as many interrupt vectors as available, up to number +of CPUs + 1. +MSI supports up to 32 interrupt vectors within the system, +MSI-X can have up to 2k. +Each I/O queue pair has separate command circular buffer. +.Nm +specification allows up to 64k commands per queue, driver currently allocates +1024 items per queue by default. +Command submissions are done always on current CPU, command completion +interrupt is handled on CPU according to I/O queue ID - first I/O queue on CPU0, +second I/O queue on CPU1 etc. +Admin queue command completion is not tied to any CPU, it's handled by +any CPU. +To keep lock contention to minimum, it's recommended to keep this assignment, +even thought it is possible to reassign the interrupt handlers differently, +using +.Xr intrctl 1 . +Driver also uses soft interrupts to process command completions, in order to +increase total system I/O capacity and throughput. +.Pp +On systems without MSI, driver uses single HW interrupt handler, for +both admin and standard I/O commands. +Command submissions are done on current CPU, command completion interrupt +is handled on any available CPU. This leads to some lock contention, +especially on command ccbs. +Also, command completion handling must be done within the HW interrupt +handler. +.Sh FILES +.Bl -tag -width /dev/nvmeX -compact +.It Pa /dev/nvme* +nvme device special files used by +.Xr nvmectl 1 . +.El .Sh SEE ALSO .Xr intro 4 , .Xr ld 4 , -.Xr pci 4 +.Xr pci 4 , +.Xr nvmectl 1 , +.Xr MAKEDEV 8 , +.Xr intrctl 1 +.Rs +.%A NVM Express, Inc. +.%T "NVM Express \- scalable, efficient, and industry standard" +.%D 2016-06-12 +.%U http://nvmexpress.org/ +.Re +.Rs +.%A NVM Express, Inc. +.%T "NVM Express Revision 1.2.1" +.%D 2016-06-05 +.%U http://www.nvmexpress.org/wp-content/uploads/NVM_Express_1_2_1_Gold_20160603.pdf +.Re .Sh HISTORY The .Nm @@ -54,24 +121,32 @@ and ported to by .An NONAKA Kimihiro .Aq Mt non...@netbsd.org . -.Sh BUGS -Emulated -.Nm -device under QEMU doesn't currently work - controller identify command times -out. +.An Jaromir Dolecek +.Aq Mt jdole...@netbsd.org +contributed to making this driver MPSAFE. +.Sh NOTES +At least some +.Tn Intel +.Nm +adapter cards are known to require +.Tn PCIe +Generation 3 slot. Such cards do not even probe when plugged +into older generation slot. .Pp -Emulated +Driver attaches and works fine also for emulated .Nm -device under +device under QEMU and .Tn Oracle +.Tn VirtualBox . +However, +there seems to be some broken interaction between .Tn VirtualBox -attaches and works fine, but sometimes after reboot device no longer works. -When this happens, controller fails to properly disable/enable during probe, -so the -.Xr ld 4 -is not attached. -Virtual machine must be completely powered off and started -again to get the device working again. +5.1.6 +and the driver, emulated +.Nm +controller responds to commands only first time it's attached, after reboot or +module reload stops responding. Virtual machine must be completely powered off +(or even killed) to fix. .Pp .Nm kernel
CVS commit: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common
Module Name:src Committed By: christos Date: Wed Sep 21 19:18:01 UTC 2016 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_platform_limits_posix.h Log Message: add new field To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1.4 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1.5 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1.4 Thu Jun 9 03:38:45 2016 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h Wed Sep 21 15:18:01 2016 @@ -338,6 +338,9 @@ namespace __sanitizer { # endif void *ifa_dstaddr; // (struct sockaddr *) void *ifa_data; +#ifdef __NetBSD__ +unsigned int ifa_addrflags; +#endif }; #endif // !SANITIZER_ANDROID
CVS commit: src/usr.sbin/ifwatchd
Module Name:src Committed By: roy Date: Wed Sep 21 18:18:10 UTC 2016 Modified Files: src/usr.sbin/ifwatchd: ifwatchd.c Log Message: Add some consistency for dispatching always send the whole message. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/usr.sbin/ifwatchd/ifwatchd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ifwatchd/ifwatchd.c diff -u src/usr.sbin/ifwatchd/ifwatchd.c:1.30 src/usr.sbin/ifwatchd/ifwatchd.c:1.31 --- src/usr.sbin/ifwatchd/ifwatchd.c:1.30 Wed Sep 21 16:47:35 2016 +++ src/usr.sbin/ifwatchd/ifwatchd.c Wed Sep 21 18:18:10 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ifwatchd.c,v 1.30 2016/09/21 16:47:35 roy Exp $ */ +/* $NetBSD: ifwatchd.c,v 1.31 2016/09/21 18:18:10 roy Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -65,12 +65,12 @@ enum event { ARRIVAL, DEPARTURE, UP, DOW /* local functions */ __dead static void usage(void); static void dispatch(const void *, size_t); -static void check_addrs(const char *cp, int addrs, enum event ev); +static void check_addrs(const struct ifa_msghdr *ifam); static void invoke_script(const struct sockaddr *sa, const struct sockaddr *dst, enum event ev, int ifindex, const char *ifname_hint); static void list_interfaces(const char *ifnames); static void check_announce(const struct if_announcemsghdr *ifan); -static void check_carrier(int if_index, int carrier); +static void check_carrier(const struct if_msghdr *ifm); static void rescan_interfaces(void); static void free_interfaces(void); static int find_interface(int index); @@ -259,28 +259,22 @@ static void dispatch(const void *msg, size_t len) { const struct rt_msghdr *hd = msg; - const struct if_msghdr *ifmp; - const struct ifa_msghdr *ifam; - enum event ev; if (hd->rtm_version != RTM_VERSION) return; switch (hd->rtm_type) { case RTM_NEWADDR: - ev = UP; - goto work; case RTM_DELADDR: - ev = DOWN; - goto work; + check_addrs(msg); + break; case RTM_IFANNOUNCE: rescan_interfaces(); check_announce(msg); - return; + break; case RTM_IFINFO: - ifmp = (const struct if_msghdr*)msg; - check_carrier(ifmp->ifm_index, ifmp->ifm_data.ifi_link_state); - return; + check_carrier(msg); + break; case RTM_ADD: case RTM_DELETE: case RTM_CHANGE: @@ -291,30 +285,29 @@ dispatch(const void *msg, size_t len) case RTM_ONEWADDR: case RTM_ODELADDR: case RTM_OCHGADDR: - return; + break; + default: + if (verbose) + printf("unknown message ignored (%d)\n", hd->rtm_type); + break; } - if (verbose) - printf("unknown message ignored (%d)\n", hd->rtm_type); - return; - -work: - ifam = (const struct ifa_msghdr *)msg; - check_addrs((const char *)(ifam + 1), ifam->ifam_addrs, ev); } static void -check_addrs(const char *cp, int addrs, enum event ev) +check_addrs(const struct ifa_msghdr *ifam) { + const char *cp = (const char *)(ifam + 1); const struct sockaddr *sa, *ifa = NULL, *brd = NULL; char ifname_buf[IFNAMSIZ]; const char *ifname; int ifndx = 0; unsigned i; + enum event ev; - if (addrs == 0) + if (ifam->ifam_addrs == 0) return; for (i = 1; i; i <<= 1) { - if ((i & addrs) == 0) + if ((i & ifam->ifam_addrs) == 0) continue; sa = (const struct sockaddr *)cp; if (i == RTA_IFP) { @@ -334,8 +327,9 @@ check_addrs(const char *cp, int addrs, e RT_ADVANCE(cp, sa); } if (ifa != NULL) { + ev = ifam->ifam_type == RTM_DELADDR ? DOWN : UP; ifname = if_indextoname(ifndx, ifname_buf); - if (ifname == NULL || ev < UP) + if (ifname == NULL) invoke_script(ifa, brd, ev, ifndx, ifname); else if (ev == UP) { if (if_is_connected(ifname)) @@ -444,13 +438,14 @@ list_interfaces(const char *ifnames) } static void -check_carrier(int if_index, int carrier_status) +check_carrier(const struct if_msghdr *ifm) { struct interface_data * p; + int carrier_status; enum event ev; SLIST_FOREACH(p, , next) - if (p->index == if_index) + if (p->index == ifm->ifm_index) break; if (p == NULL) @@ -462,7 +457,7 @@ check_carrier(int if_index, int carrier_ * - this is the first time we've been called, and * inhibit_initial is not set */ - + carrier_status = ifm->ifm_data.ifi_link_state; if ((carrier_status != p->last_carrier_status) || ((p->last_carrier_status == -1) && !inhibit_initial)) { switch (carrier_status) { @@ -477,7 +472,7 @@ check_carrier(int if_index, int carrier_ printf("unknown link status ignored\n"); return; } - invoke_script(NULL, NULL, ev, if_index, p->ifname); + invoke_script(NULL, NULL, ev, ifm->ifm_index, p->ifname); p->last_carrier_status = carrier_status; } }
CVS commit: src/external/mit/xorg/server/drivers/xf86-video-nv
Module Name:src Committed By: mrg Date: Wed Sep 21 18:00:26 UTC 2016 Modified Files: src/external/mit/xorg/server/drivers/xf86-video-nv: Makefile Log Message: always build the XAA files as well. they have functions used by the EXA code and besides a minor fix, were already setup to build with HAVE_XAA_H not defined. this should really fix PR#51480. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 \ src/external/mit/xorg/server/drivers/xf86-video-nv/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/drivers/xf86-video-nv/Makefile diff -u src/external/mit/xorg/server/drivers/xf86-video-nv/Makefile:1.11 src/external/mit/xorg/server/drivers/xf86-video-nv/Makefile:1.12 --- src/external/mit/xorg/server/drivers/xf86-video-nv/Makefile:1.11 Fri Sep 2 03:49:56 2016 +++ src/external/mit/xorg/server/drivers/xf86-video-nv/Makefile Wed Sep 21 18:00:26 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2016/09/02 03:49:56 jakllsch Exp $ +# $NetBSD: Makefile,v 1.12 2016/09/21 18:00:26 mrg Exp $ DRIVER= xf86-video-nv DRIVER_NAME= nv_drv @@ -11,6 +11,11 @@ SRCS+= g80_dac.c g80_display.c g80_dma. SRCS+= g80_output.c g80_sor.c MAN= nv.4 +# XAA files have generic functions as well +#.if ${XORG_SERVER_SUBDIR} == "xorg-server.old" +SRCS+= nv_xaa.c riva_xaa.c g80_xaa.c +#.endif + .if ${MACHINE} == "macppc" CPPFLAGS+= -DAVOID_VGAHW .endif @@ -30,7 +35,3 @@ COPTS+= ${${ACTIVE_CC} == "gcc":? -Wno- COPTS+= ${${ACTIVE_CC} == "clang":? -Wno-error=\#warnings :} .include "../Makefile.xf86-driver" - -.if ${XORG_SERVER_SUBDIR} == "xorg-server.old" -SRCS+= nv_xaa.c riva_xaa.c g80_xaa.c -.endif
CVS commit: xsrc/external/mit/xf86-video-nv/dist/src
Module Name:xsrc Committed By: mrg Date: Wed Sep 21 17:59:20 UTC 2016 Modified Files: xsrc/external/mit/xf86-video-nv/dist/src: riva_xaa.c Log Message: hide RivaSetRopPattern() behind HAVE_XAA_H. To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ xsrc/external/mit/xf86-video-nv/dist/src/riva_xaa.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-nv/dist/src/riva_xaa.c diff -u xsrc/external/mit/xf86-video-nv/dist/src/riva_xaa.c:1.1.1.2 xsrc/external/mit/xf86-video-nv/dist/src/riva_xaa.c:1.2 --- xsrc/external/mit/xf86-video-nv/dist/src/riva_xaa.c:1.1.1.2 Sun Jun 2 08:24:14 2013 +++ xsrc/external/mit/xf86-video-nv/dist/src/riva_xaa.c Wed Sep 21 17:59:20 2016 @@ -85,6 +85,7 @@ RivaSetRopSolid(RivaPtr pRiva, int rop) } } +#ifdef HAVE_XAA_H static void RivaSetRopPattern(RivaPtr pRiva, int rop) { @@ -94,7 +95,7 @@ RivaSetRopPattern(RivaPtr pRiva, int rop pRiva->riva.Rop->Rop3 = XAAGetPatternROP(rop); } } -#ifdef HAVE_XAA_H + /* * Fill solid rectangles. */
CVS commit: xsrc/external/mit/xf86-video-nv/dist/src
Module Name:xsrc Committed By: mrg Date: Wed Sep 21 17:58:19 UTC 2016 Modified Files: xsrc/external/mit/xf86-video-nv/dist/src: g80_dma.c g80_dma.h g80_exa.c g80_xaa.c g80_xaa.h Log Message: revert the previous; the XAA files need to just always be built even without XAA support itself. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.c \ xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.h \ xsrc/external/mit/xf86-video-nv/dist/src/g80_exa.c \ xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.c \ xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.c diff -u xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.c:1.2 xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.c:1.3 --- xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.c:1.2 Wed Sep 21 17:48:18 2016 +++ xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.c Wed Sep 21 17:58:18 2016 @@ -63,12 +63,3 @@ void G80DmaWait(G80Ptr pNv, int size) pNv->dmaFree = dmaGet - pNv->dmaCurrent - 1; } } - -void -G80DmaKickoffCallback(ScrnInfoPtr pScrn) -{ -G80Ptr pNv = G80PTR(pScrn); - -G80DmaKickoff(pNv); -pNv->DMAKickoffCallback = NULL; -} Index: xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.h diff -u xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.h:1.2 xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.h:1.3 --- xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.h:1.2 Wed Sep 21 17:48:18 2016 +++ xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.h Wed Sep 21 17:58:18 2016 @@ -12,4 +12,3 @@ void G80DmaKickoff(G80Ptr pNv); void G80DmaWait(G80Ptr pNv, int size); -void G80DmaKickoffCallback(ScrnInfoPtr pScrn); Index: xsrc/external/mit/xf86-video-nv/dist/src/g80_exa.c diff -u xsrc/external/mit/xf86-video-nv/dist/src/g80_exa.c:1.2 xsrc/external/mit/xf86-video-nv/dist/src/g80_exa.c:1.3 --- xsrc/external/mit/xf86-video-nv/dist/src/g80_exa.c:1.2 Wed Sep 21 17:48:18 2016 +++ xsrc/external/mit/xf86-video-nv/dist/src/g80_exa.c Wed Sep 21 17:58:18 2016 @@ -116,7 +116,7 @@ prepareSolid(PixmapPtr pPixmap, G80DmaStart(pNv, 0x588, 1); G80DmaNext (pNv, fg); -pNv->DMAKickoffCallback = G80DmaKickoffCallback; +pNv->DMAKickoffCallback = G80DMAKickoffCallback; return TRUE; } @@ -163,7 +163,7 @@ prepareCopy(PixmapPtr pSrcPixmap, G80DmaNext (pNv, 4); G80SetRopSolid(pNv, alu, planemask); } -pNv->DMAKickoffCallback = G80DmaKickoffCallback; +pNv->DMAKickoffCallback = G80DMAKickoffCallback; return TRUE; } @@ -283,7 +283,7 @@ upload(PixmapPtr pDst, if(kickoff) G80DmaKickoff(pNv); else -pNv->DMAKickoffCallback = G80DmaKickoffCallback; +pNv->DMAKickoffCallback = G80DMAKickoffCallback; return TRUE; } Index: xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.c diff -u xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.c:1.2 xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.c:1.3 --- xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.c:1.2 Wed Sep 21 17:48:18 2016 +++ xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.c Wed Sep 21 17:58:18 2016 @@ -48,6 +48,15 @@ G80Sync(ScrnInfoPtr pScrn) } void +G80DMAKickoffCallback(ScrnInfoPtr pScrn) +{ +G80Ptr pNv = G80PTR(pScrn); + +G80DmaKickoff(pNv); +pNv->DMAKickoffCallback = NULL; +} + +void G80SetPattern(G80Ptr pNv, int bg, int fg, int pat0, int pat1) { G80DmaStart(pNv, 0x2f0, 4); @@ -120,7 +129,7 @@ G80SetupForScreenToScreenCopy( G80DmaNext (pNv, 4); G80SetRopSolid(pNv, rop, planemask); } -pNv->DMAKickoffCallback = G80DmaKickoffCallback; +pNv->DMAKickoffCallback = G80DMAKickoffCallback; } static void @@ -176,7 +185,7 @@ G80SetupForSolidFill( G80DmaStart(pNv, 0x588, 1); G80DmaNext (pNv, color); -pNv->DMAKickoffCallback = G80DmaKickoffCallback; +pNv->DMAKickoffCallback = G80DMAKickoffCallback; } static void @@ -233,7 +242,7 @@ G80SetupForMono8x8PatternFill( G80DmaStart(pNv, 0x588, 1); G80DmaNext (pNv, fg); -pNv->DMAKickoffCallback = G80DmaKickoffCallback; +pNv->DMAKickoffCallback = G80DMAKickoffCallback; } static void @@ -419,7 +428,7 @@ G80SetupForSolidLine(ScrnInfoPtr pScrn, G80DmaStart(pNv, 0x588, 1); G80DmaNext (pNv, color); -pNv->DMAKickoffCallback = G80DmaKickoffCallback; +pNv->DMAKickoffCallback = G80DMAKickoffCallback; } static void Index: xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.h diff -u xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.h:1.2 xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.h:1.3 --- xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.h:1.2 Wed Sep 21 17:48:18 2016 +++ xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.h Wed Sep 21 17:58:18 2016 @@ -1,4 +1,5 @@ void
CVS commit: xsrc/external/mit/xf86-video-nv/dist/src
Module Name:xsrc Committed By: mrg Date: Wed Sep 21 17:48:18 UTC 2016 Modified Files: xsrc/external/mit/xf86-video-nv/dist/src: g80_dma.c g80_dma.h g80_exa.c g80_xaa.c g80_xaa.h Log Message: move G80DmaKickoffCallback into g80_dma.c so that it's visible no non-XAA builds. renamed from G80DMAKickoffCallback for consistency. should fix PR#51480. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.c \ xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.h \ xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.h cvs rdiff -u -r1.1.1.3 -r1.2 \ xsrc/external/mit/xf86-video-nv/dist/src/g80_exa.c \ xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.c diff -u xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.c:1.1.1.1 xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.c:1.2 --- xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.c:1.1.1.1 Sat Aug 2 05:14:16 2008 +++ xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.c Wed Sep 21 17:48:18 2016 @@ -63,3 +63,12 @@ void G80DmaWait(G80Ptr pNv, int size) pNv->dmaFree = dmaGet - pNv->dmaCurrent - 1; } } + +void +G80DmaKickoffCallback(ScrnInfoPtr pScrn) +{ +G80Ptr pNv = G80PTR(pScrn); + +G80DmaKickoff(pNv); +pNv->DMAKickoffCallback = NULL; +} Index: xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.h diff -u xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.h:1.1.1.1 xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.h:1.2 --- xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.h:1.1.1.1 Sat Aug 2 05:14:16 2008 +++ xsrc/external/mit/xf86-video-nv/dist/src/g80_dma.h Wed Sep 21 17:48:18 2016 @@ -12,3 +12,4 @@ void G80DmaKickoff(G80Ptr pNv); void G80DmaWait(G80Ptr pNv, int size); +void G80DmaKickoffCallback(ScrnInfoPtr pScrn); Index: xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.h diff -u xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.h:1.1.1.1 xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.h:1.2 --- xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.h:1.1.1.1 Sat Aug 2 05:14:16 2008 +++ xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.h Wed Sep 21 17:48:18 2016 @@ -1,5 +1,4 @@ void G80Sync(ScrnInfoPtr pScrn); -void G80DMAKickoffCallback(ScrnInfoPtr pScrn); void G80SetPattern(G80Ptr pNv, int bg, int fg, int pat0, int pat1); void G80SetRopSolid(G80Ptr pNv, CARD32 rop, CARD32 planemask); void G80SetClip(G80Ptr pNv, int x, int y, int w, int h); Index: xsrc/external/mit/xf86-video-nv/dist/src/g80_exa.c diff -u xsrc/external/mit/xf86-video-nv/dist/src/g80_exa.c:1.1.1.3 xsrc/external/mit/xf86-video-nv/dist/src/g80_exa.c:1.2 --- xsrc/external/mit/xf86-video-nv/dist/src/g80_exa.c:1.1.1.3 Sun Jun 2 08:24:14 2013 +++ xsrc/external/mit/xf86-video-nv/dist/src/g80_exa.c Wed Sep 21 17:48:18 2016 @@ -116,7 +116,7 @@ prepareSolid(PixmapPtr pPixmap, G80DmaStart(pNv, 0x588, 1); G80DmaNext (pNv, fg); -pNv->DMAKickoffCallback = G80DMAKickoffCallback; +pNv->DMAKickoffCallback = G80DmaKickoffCallback; return TRUE; } @@ -163,7 +163,7 @@ prepareCopy(PixmapPtr pSrcPixmap, G80DmaNext (pNv, 4); G80SetRopSolid(pNv, alu, planemask); } -pNv->DMAKickoffCallback = G80DMAKickoffCallback; +pNv->DMAKickoffCallback = G80DmaKickoffCallback; return TRUE; } @@ -283,7 +283,7 @@ upload(PixmapPtr pDst, if(kickoff) G80DmaKickoff(pNv); else -pNv->DMAKickoffCallback = G80DMAKickoffCallback; +pNv->DMAKickoffCallback = G80DmaKickoffCallback; return TRUE; } Index: xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.c diff -u xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.c:1.1.1.3 xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.c:1.2 --- xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.c:1.1.1.3 Sun Jun 2 08:24:14 2013 +++ xsrc/external/mit/xf86-video-nv/dist/src/g80_xaa.c Wed Sep 21 17:48:18 2016 @@ -48,15 +48,6 @@ G80Sync(ScrnInfoPtr pScrn) } void -G80DMAKickoffCallback(ScrnInfoPtr pScrn) -{ -G80Ptr pNv = G80PTR(pScrn); - -G80DmaKickoff(pNv); -pNv->DMAKickoffCallback = NULL; -} - -void G80SetPattern(G80Ptr pNv, int bg, int fg, int pat0, int pat1) { G80DmaStart(pNv, 0x2f0, 4); @@ -129,7 +120,7 @@ G80SetupForScreenToScreenCopy( G80DmaNext (pNv, 4); G80SetRopSolid(pNv, rop, planemask); } -pNv->DMAKickoffCallback = G80DMAKickoffCallback; +pNv->DMAKickoffCallback = G80DmaKickoffCallback; } static void @@ -185,7 +176,7 @@ G80SetupForSolidFill( G80DmaStart(pNv, 0x588, 1); G80DmaNext (pNv, color); -pNv->DMAKickoffCallback = G80DMAKickoffCallback; +pNv->DMAKickoffCallback = G80DmaKickoffCallback; } static void @@ -242,7 +233,7 @@ G80SetupForMono8x8PatternFill( G80DmaStart(pNv, 0x588, 1);
CVS commit: src/usr.sbin/ifwatchd
Module Name:src Committed By: roy Date: Wed Sep 21 16:47:35 UTC 2016 Modified Files: src/usr.sbin/ifwatchd: ifwatchd.c Log Message: Sprinkle some const. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/usr.sbin/ifwatchd/ifwatchd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ifwatchd/ifwatchd.c diff -u src/usr.sbin/ifwatchd/ifwatchd.c:1.29 src/usr.sbin/ifwatchd/ifwatchd.c:1.30 --- src/usr.sbin/ifwatchd/ifwatchd.c:1.29 Wed Sep 21 14:50:48 2016 +++ src/usr.sbin/ifwatchd/ifwatchd.c Wed Sep 21 16:47:35 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ifwatchd.c,v 1.29 2016/09/21 14:50:48 roy Exp $ */ +/* $NetBSD: ifwatchd.c,v 1.30 2016/09/21 16:47:35 roy Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -64,11 +64,12 @@ enum event { ARRIVAL, DEPARTURE, UP, DOW /* local functions */ __dead static void usage(void); -static void dispatch(void*, size_t); -static void check_addrs(char *cp, int addrs, enum event ev); -static void invoke_script(struct sockaddr *sa, struct sockaddr *dst, enum event ev, int ifindex, const char *ifname_hint); +static void dispatch(const void *, size_t); +static void check_addrs(const char *cp, int addrs, enum event ev); +static void invoke_script(const struct sockaddr *sa, const struct sockaddr *dst, +enum event ev, int ifindex, const char *ifname_hint); static void list_interfaces(const char *ifnames); -static void check_announce(struct if_announcemsghdr *ifan); +static void check_announce(const struct if_announcemsghdr *ifan); static void check_carrier(int if_index, int carrier); static void rescan_interfaces(void); static void free_interfaces(void); @@ -255,11 +256,11 @@ usage(void) } static void -dispatch(void *msg, size_t len) +dispatch(const void *msg, size_t len) { - struct rt_msghdr *hd = msg; - struct if_msghdr *ifmp; - struct ifa_msghdr *ifam; + const struct rt_msghdr *hd = msg; + const struct if_msghdr *ifmp; + const struct ifa_msghdr *ifam; enum event ev; if (hd->rtm_version != RTM_VERSION) @@ -274,10 +275,10 @@ dispatch(void *msg, size_t len) goto work; case RTM_IFANNOUNCE: rescan_interfaces(); - check_announce((struct if_announcemsghdr *)msg); + check_announce(msg); return; case RTM_IFINFO: - ifmp = (struct if_msghdr*)msg; + ifmp = (const struct if_msghdr*)msg; check_carrier(ifmp->ifm_index, ifmp->ifm_data.ifi_link_state); return; case RTM_ADD: @@ -297,14 +298,14 @@ dispatch(void *msg, size_t len) return; work: - ifam = (struct ifa_msghdr *)msg; - check_addrs((char *)(ifam + 1), ifam->ifam_addrs, ev); + ifam = (const struct ifa_msghdr *)msg; + check_addrs((const char *)(ifam + 1), ifam->ifam_addrs, ev); } static void -check_addrs(char *cp, int addrs, enum event ev) +check_addrs(const char *cp, int addrs, enum event ev) { - struct sockaddr *sa, *ifa = NULL, *brd = NULL; + const struct sockaddr *sa, *ifa = NULL, *brd = NULL; char ifname_buf[IFNAMSIZ]; const char *ifname; int ifndx = 0; @@ -315,9 +316,11 @@ check_addrs(char *cp, int addrs, enum ev for (i = 1; i; i <<= 1) { if ((i & addrs) == 0) continue; - sa = (struct sockaddr *)cp; + sa = (const struct sockaddr *)cp; if (i == RTA_IFP) { - struct sockaddr_dl * li = (struct sockaddr_dl*)sa; + const struct sockaddr_dl *li; + + li = (const struct sockaddr_dl *)sa; ifndx = li->sdl_index; if (!find_interface(ifndx)) { if (verbose) @@ -345,8 +348,8 @@ check_addrs(char *cp, int addrs, enum ev } static void -invoke_script(struct sockaddr *sa, struct sockaddr *dest, enum event ev, -int ifindex, const char *ifname_hint) +invoke_script(const struct sockaddr *sa, const struct sockaddr *dest, +enum event ev, int ifindex, const char *ifname_hint) { char addr[NI_MAXHOST], daddr[NI_MAXHOST], ifname_buf[IFNAMSIZ]; const char * volatile ifname; @@ -360,7 +363,7 @@ invoke_script(struct sockaddr *sa, struc if (sa != NULL && sa->sa_family == AF_INET6) { struct sockaddr_in6 sin6; - (void) memcpy(, (struct sockaddr_in6 *)sa, sizeof (sin6)); + memcpy(, (const struct sockaddr_in6 *)sa, sizeof (sin6)); if (IN6_IS_ADDR_LINKLOCAL(_addr)) return; } @@ -480,7 +483,7 @@ check_carrier(int if_index, int carrier_ } static void -check_announce(struct if_announcemsghdr *ifan) +check_announce(const struct if_announcemsghdr *ifan) { struct interface_data * p; const char *ifname = ifan->ifan_name;
CVS commit: src/usr.sbin/mdsetimage
Module Name:src Committed By: christos Date: Wed Sep 21 16:29:48 UTC 2016 Modified Files: src/usr.sbin/mdsetimage: mdsetimage.c Log Message: fix usage. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/mdsetimage/mdsetimage.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/mdsetimage/mdsetimage.c diff -u src/usr.sbin/mdsetimage/mdsetimage.c:1.21 src/usr.sbin/mdsetimage/mdsetimage.c:1.22 --- src/usr.sbin/mdsetimage/mdsetimage.c:1.21 Wed Sep 21 12:25:41 2016 +++ src/usr.sbin/mdsetimage/mdsetimage.c Wed Sep 21 12:29:48 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mdsetimage.c,v 1.21 2016/09/21 16:25:41 christos Exp $ */ +/* $NetBSD: mdsetimage.c,v 1.22 2016/09/21 16:29:48 christos Exp $ */ /* * Copyright (c) 1996, 2002 Christopher G. Demetriou @@ -37,7 +37,7 @@ #if !defined(lint) __COPYRIGHT("@(#) Copyright (c) 1996\ Christopher G. Demetriou. All rights reserved."); -__RCSID("$NetBSD: mdsetimage.c,v 1.21 2016/09/21 16:25:41 christos Exp $"); +__RCSID("$NetBSD: mdsetimage.c,v 1.22 2016/09/21 16:29:48 christos Exp $"); #endif /* not lint */ #include @@ -245,8 +245,8 @@ usage(void) const char **list; fprintf(stderr, "Usage: %s [-svx] [-b bfdname] [-I image_symbol] " - "[-S size_symbol] [-T address] kernel image", getprogname()); - fprintf(stderr, "supported targets:"); + "[-S size_symbol] [-T address] kernel image\n", getprogname()); + fprintf(stderr, "Supported targets:"); for (list = bin_supported_targets(); *list != NULL; list++) fprintf(stderr, " %s", *list); fprintf(stderr, "\n");
CVS commit: src/usr.sbin/mdsetimage
Module Name:src Committed By: christos Date: Wed Sep 21 16:27:55 UTC 2016 Modified Files: src/usr.sbin/mdsetimage: exec_coff.c exec_ecoff.c Log Message: ansify. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/mdsetimage/exec_coff.c \ src/usr.sbin/mdsetimage/exec_ecoff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/mdsetimage/exec_coff.c diff -u src/usr.sbin/mdsetimage/exec_coff.c:1.6 src/usr.sbin/mdsetimage/exec_coff.c:1.7 --- src/usr.sbin/mdsetimage/exec_coff.c:1.6 Thu Jul 30 11:16:37 2009 +++ src/usr.sbin/mdsetimage/exec_coff.c Wed Sep 21 12:27:55 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_coff.c,v 1.6 2009/07/30 15:16:37 tsutsui Exp $ */ +/* $NetBSD: exec_coff.c,v 1.7 2016/09/21 16:27:55 christos Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: exec_coff.c,v 1.6 2009/07/30 15:16:37 tsutsui Exp $"); +__RCSID("$NetBSD: exec_coff.c,v 1.7 2016/09/21 16:27:55 christos Exp $"); #endif /* not lint */ #include @@ -49,9 +49,7 @@ __RCSID("$NetBSD: exec_coff.c,v 1.6 2009 #define BAD do { rv = -1; goto out; } while (0) int -check_coff(mappedfile, mappedsize) - const char *mappedfile; - size_t mappedsize; +check_coff(const char *mappedfile, size_t mappedsize) { const struct coff_exechdr *exechdrp; int rv; @@ -70,10 +68,8 @@ out: } int -findoff_coff(mappedfile, mappedsize, vmaddr, fileoffp) - const char *mappedfile; - size_t mappedsize, *fileoffp; - u_long vmaddr; +findoff_coff(const char *mappedfile, size_t mappedsize, u_long vmaddr, +size_t *fileoffp, u_long text_addr) { const struct coff_exechdr *exechdrp; int rv; Index: src/usr.sbin/mdsetimage/exec_ecoff.c diff -u src/usr.sbin/mdsetimage/exec_ecoff.c:1.6 src/usr.sbin/mdsetimage/exec_ecoff.c:1.7 --- src/usr.sbin/mdsetimage/exec_ecoff.c:1.6 Thu Jul 30 11:16:37 2009 +++ src/usr.sbin/mdsetimage/exec_ecoff.c Wed Sep 21 12:27:55 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_ecoff.c,v 1.6 2009/07/30 15:16:37 tsutsui Exp $ */ +/* $NetBSD: exec_ecoff.c,v 1.7 2016/09/21 16:27:55 christos Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: exec_ecoff.c,v 1.6 2009/07/30 15:16:37 tsutsui Exp $"); +__RCSID("$NetBSD: exec_ecoff.c,v 1.7 2016/09/21 16:27:55 christos Exp $"); #endif /* not lint */ #include @@ -46,9 +46,7 @@ __RCSID("$NetBSD: exec_ecoff.c,v 1.6 200 #define BAD do { rv = -1; goto out; } while (0) int -check_ecoff(mappedfile, mappedsize) - const char *mappedfile; - size_t mappedsize; +check_ecoff(const char *mappedfile, size_t mappedsize) { const struct ecoff_exechdr *exechdrp; int rv; @@ -67,10 +65,8 @@ out: } int -findoff_ecoff(mappedfile, mappedsize, vmaddr, fileoffp) - const char *mappedfile; - size_t mappedsize, *fileoffp; - u_long vmaddr; +findoff_ecoff(const char *mappedfile, size_t mappedsize, u_long vmaddr, +size_t *fileoffp, u_long text_address) { const struct ecoff_exechdr *exechdrp; int rv;
CVS commit: src/external/gpl3/binutils/usr.sbin/mdsetimage
Module Name:src Committed By: christos Date: Wed Sep 21 16:26:18 UTC 2016 Modified Files: src/external/gpl3/binutils/usr.sbin/mdsetimage: Makefile Removed Files: src/external/gpl3/binutils/usr.sbin/mdsetimage: mdsetimage.8 mdsetimage.c Log Message: remove dup To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 \ src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile cvs rdiff -u -r1.3 -r0 \ src/external/gpl3/binutils/usr.sbin/mdsetimage/mdsetimage.8 cvs rdiff -u -r1.4 -r0 \ src/external/gpl3/binutils/usr.sbin/mdsetimage/mdsetimage.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/binutils/usr.sbin/mdsetimage/Makefile diff -u src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile:1.11 src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile:1.12 --- src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile:1.11 Tue Jan 26 14:37:49 2016 +++ src/external/gpl3/binutils/usr.sbin/mdsetimage/Makefile Wed Sep 21 12:26:18 2016 @@ -1,6 +1,8 @@ -# $NetBSD: Makefile,v 1.11 2016/01/26 19:37:49 christos Exp $ +# $NetBSD: Makefile,v 1.12 2016/09/21 16:26:18 christos Exp $ -.include +.include + +.PATH: ${NETBSDSRCDIR}/usr.sbin/mdsetimage .if (defined(HOSTPROG) && \ (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN))) || \ @@ -8,6 +10,7 @@ BFDSUBDIR= lib PROG= mdsetimage +SRCS= mdsetimage.c bin_bfd.c MAN= mdsetimage.8 CPPFLAGS+= -I${DIST}/bfd -I${DIST}/binutils -I${DIST}/include
CVS commit: src/usr.sbin/mdsetimage
Module Name:src Committed By: christos Date: Wed Sep 21 16:25:41 UTC 2016 Modified Files: src/usr.sbin/mdsetimage: Makefile exec_aout.c exec_elf32.c extern.h mdsetimage.8 mdsetimage.c Added Files: src/usr.sbin/mdsetimage: bin.h bin_bfd.c bin_nlist.c Log Message: merge copies... To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/mdsetimage/Makefile cvs rdiff -u -r0 -r1.1 src/usr.sbin/mdsetimage/bin.h \ src/usr.sbin/mdsetimage/bin_bfd.c src/usr.sbin/mdsetimage/bin_nlist.c cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/mdsetimage/exec_aout.c cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/mdsetimage/exec_elf32.c cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/mdsetimage/extern.h cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/mdsetimage/mdsetimage.8 cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/mdsetimage/mdsetimage.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/mdsetimage/Makefile diff -u src/usr.sbin/mdsetimage/Makefile:1.16 src/usr.sbin/mdsetimage/Makefile:1.17 --- src/usr.sbin/mdsetimage/Makefile:1.16 Sun May 18 03:57:39 2003 +++ src/usr.sbin/mdsetimage/Makefile Wed Sep 21 12:25:41 2016 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.16 2003/05/18 07:57:39 lukem Exp $ +# $NetBSD: Makefile,v 1.17 2016/09/21 16:25:41 christos Exp $ .include PROG= mdsetimage SRCS= mdsetimage.c exec_aout.c exec_ecoff.c exec_elf32.c exec_elf64.c \ - exec_coff.c + exec_coff.c bin_nlist.c MAN= mdsetimage.8 .if ${MACHINE_ARCH} == "alpha" Index: src/usr.sbin/mdsetimage/exec_aout.c diff -u src/usr.sbin/mdsetimage/exec_aout.c:1.7 src/usr.sbin/mdsetimage/exec_aout.c:1.8 --- src/usr.sbin/mdsetimage/exec_aout.c:1.7 Thu Jul 30 11:16:37 2009 +++ src/usr.sbin/mdsetimage/exec_aout.c Wed Sep 21 12:25:41 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_aout.c,v 1.7 2009/07/30 15:16:37 tsutsui Exp $ */ +/* $NetBSD: exec_aout.c,v 1.8 2016/09/21 16:25:41 christos Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: exec_aout.c,v 1.7 2009/07/30 15:16:37 tsutsui Exp $"); +__RCSID("$NetBSD: exec_aout.c,v 1.8 2016/09/21 16:25:41 christos Exp $"); #endif /* not lint */ #include @@ -45,13 +45,8 @@ __RCSID("$NetBSD: exec_aout.c,v 1.7 2009 #define check(off, size) ((off < 0) || (off + size > mappedsize)) #define BAD do { rv = -1; goto out; } while (0) -extern int T_flag_specified; -extern u_long text_start; - int -check_aout(mappedfile, mappedsize) - const char *mappedfile; - size_t mappedsize; +check_aout(const char *mappedfile, size_t mappedsize) { const struct exec *execp; int rv; @@ -70,10 +65,8 @@ out: } int -findoff_aout(mappedfile, mappedsize, vmaddr, fileoffp) - const char *mappedfile; - size_t mappedsize, *fileoffp; - u_long vmaddr; +findoff_aout(const char *mappedfile, size_t mappedsize, u_long vmaddr, +size_t *fileoffp, u_long text_start) { const struct exec *execp; int rv; @@ -87,7 +80,7 @@ findoff_aout(mappedfile, mappedsize, vma (execp->a_entry & (N_PAGSIZ(*execp)-1)) - execp->a_entry; /* apply correction based on the supplied text start address, if any */ - if (T_flag_specified) + if (text_start != (unsigned long)~0) vmaddr += N_TXTADDR(*execp) - text_start; if (N_TXTADDR(*execp) <= vmaddr && Index: src/usr.sbin/mdsetimage/exec_elf32.c diff -u src/usr.sbin/mdsetimage/exec_elf32.c:1.12 src/usr.sbin/mdsetimage/exec_elf32.c:1.13 --- src/usr.sbin/mdsetimage/exec_elf32.c:1.12 Sat Aug 28 17:30:03 2010 +++ src/usr.sbin/mdsetimage/exec_elf32.c Wed Sep 21 12:25:41 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf32.c,v 1.12 2010/08/28 21:30:03 joerg Exp $ */ +/* $NetBSD: exec_elf32.c,v 1.13 2016/09/21 16:25:41 christos Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: exec_elf32.c,v 1.12 2010/08/28 21:30:03 joerg Exp $"); +__RCSID("$NetBSD: exec_elf32.c,v 1.13 2016/09/21 16:25:41 christos Exp $"); #endif /* not lint */ #ifndef ELFSIZE @@ -54,9 +54,7 @@ __RCSID("$NetBSD: exec_elf32.c,v 1.12 20 #define BAD do { rv = -1; goto out; } while (0) int -ELFNAMEEND(check)(mappedfile, mappedsize) - const char *mappedfile; - size_t mappedsize; +ELFNAMEEND(check)(const char *mappedfile, size_t mappedsize) { const Elf_Ehdr *ehdrp; int rv; @@ -83,10 +81,8 @@ out: } int -ELFNAMEEND(findoff)(mappedfile, mappedsize, vmaddr, fileoffp) - const char *mappedfile; - size_t mappedsize, *fileoffp; - u_long vmaddr; +ELFNAMEEND(findoff)(const char *mappedfile, size_t mappedsize, u_long vmaddr, +size_t *fileoffp, u_long text_addr) { const Elf_Ehdr *ehdrp; const Elf_Phdr *phdrp; Index: src/usr.sbin/mdsetimage/extern.h diff -u src/usr.sbin/mdsetimage/extern.h:1.9 src/usr.sbin/mdsetimage/extern.h:1.10 --- src/usr.sbin/mdsetimage/extern.h:1.9 Mon Oct 1 19:32:34 2001 +++ src/usr.sbin/mdsetimage/extern.h Wed Sep 21 12:25:41
CVS commit: src/usr.sbin/ifwatchd
Module Name:src Committed By: roy Date: Wed Sep 21 14:50:48 UTC 2016 Modified Files: src/usr.sbin/ifwatchd: ifwatchd.c Log Message: Skip message if not our RTM_VERSION and silently ignore old message types. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/usr.sbin/ifwatchd/ifwatchd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ifwatchd/ifwatchd.c diff -u src/usr.sbin/ifwatchd/ifwatchd.c:1.28 src/usr.sbin/ifwatchd/ifwatchd.c:1.29 --- src/usr.sbin/ifwatchd/ifwatchd.c:1.28 Wed Sep 21 14:46:55 2016 +++ src/usr.sbin/ifwatchd/ifwatchd.c Wed Sep 21 14:50:48 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ifwatchd.c,v 1.28 2016/09/21 14:46:55 roy Exp $ */ +/* $NetBSD: ifwatchd.c,v 1.29 2016/09/21 14:50:48 roy Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -262,6 +262,9 @@ dispatch(void *msg, size_t len) struct ifa_msghdr *ifam; enum event ev; + if (hd->rtm_version != RTM_VERSION) + return; + switch (hd->rtm_type) { case RTM_NEWADDR: ev = UP; @@ -284,6 +287,9 @@ dispatch(void *msg, size_t len) case RTM_REDIRECT: case RTM_MISS: case RTM_IEEE80211: + case RTM_ONEWADDR: + case RTM_ODELADDR: + case RTM_OCHGADDR: return; } if (verbose)
CVS commit: src/usr.sbin/ifwatchd
Module Name:src Committed By: roy Date: Wed Sep 21 14:46:55 UTC 2016 Modified Files: src/usr.sbin/ifwatchd: ifwatchd.c Log Message: Use recvmsg to ensure we get every message rather than potentially overflowing our buffer. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/ifwatchd/ifwatchd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ifwatchd/ifwatchd.c diff -u src/usr.sbin/ifwatchd/ifwatchd.c:1.27 src/usr.sbin/ifwatchd/ifwatchd.c:1.28 --- src/usr.sbin/ifwatchd/ifwatchd.c:1.27 Wed Jan 27 18:55:51 2016 +++ src/usr.sbin/ifwatchd/ifwatchd.c Wed Sep 21 14:46:55 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ifwatchd.c,v 1.27 2016/01/27 18:55:51 riastradh Exp $ */ +/* $NetBSD: ifwatchd.c,v 1.28 2016/09/21 14:46:55 roy Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -117,7 +117,9 @@ main(int argc, char **argv) { int c, s, n; int errs = 0; - char msg[2048], *msgp; + struct msghdr msg; + struct iovec iov[1]; + char buf[2048]; openlog(argv[0], LOG_PID|LOG_CONS, LOG_DAEMON); while ((c = getopt(argc, argv, "qvhic:n:u:d:A:D:")) != -1) { @@ -206,13 +208,20 @@ main(int argc, char **argv) if (!inhibit_initial) run_initial_ups(); + iov[0].iov_base = buf; + iov[0].iov_len = sizeof(buf); + memset(, 0, sizeof(msg)); + msg.msg_iov = iov; + msg.msg_iovlen = 1; + for (;;) { - n = read(s, msg, sizeof msg); - msgp = msg; - for (msgp = msg; n > 0; - n -= ((struct rt_msghdr*)msgp)->rtm_msglen, - msgp += ((struct rt_msghdr*)msgp)->rtm_msglen) - dispatch(msgp, n); + n = recvmsg(s, , 0); + if (n == -1) { + syslog(LOG_ERR, "recvmsg: %m"); + exit(EXIT_FAILURE); + } + if (n != 0) + dispatch(iov[0].iov_base, n); } close(s);
CVS commit: src/lib/libm
Module Name:src Committed By: christos Date: Wed Sep 21 14:11:40 UTC 2016 Modified Files: src/lib/libm: Makefile src/lib/libm/noieee_src: n_asincos.c Added Files: src/lib/libm/noieee_src: n_atanhf.c Log Message: deal with namespace issues and missing atanhf for vax. To generate a diff of this commit: cvs rdiff -u -r1.185 -r1.186 src/lib/libm/Makefile cvs rdiff -u -r1.8 -r1.9 src/lib/libm/noieee_src/n_asincos.c cvs rdiff -u -r0 -r1.1 src/lib/libm/noieee_src/n_atanhf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/Makefile diff -u src/lib/libm/Makefile:1.185 src/lib/libm/Makefile:1.186 --- src/lib/libm/Makefile:1.185 Wed Sep 7 10:41:33 2016 +++ src/lib/libm/Makefile Wed Sep 21 10:11:40 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.185 2016/09/07 14:41:33 jakllsch Exp $ +# $NetBSD: Makefile,v 1.186 2016/09/21 14:11:40 christos Exp $ # # @(#)Makefile 5.1beta 93/09/24 # @@ -243,7 +243,8 @@ COPTS.compat_cabs.c= ${${ACTIVE_CC} == " COPTS.compat_cabsf.c= ${${ACTIVE_CC} == "gcc":? -fno-builtin-cabsf :} # math routines for non-IEEE architectures. -NOIEEE_SRCS = n_asincos.c n_acosh.c n_asinh.c n_atan.c n_atanh.c n_cosh.c \ +NOIEEE_SRCS = n_asincos.c n_acosh.c n_asinh.c n_atan.c n_atanh.c n_atanhf.c \ + n_cosh.c \ n_erf.c n_exp.c n_exp2.c n_exp2f.c n_exp__E.c n_expm1.c n_floor.c \ n_fmod.c n_gamma.c n_ilogb.c \ n_lgamma.c n_j0.c n_j1.c n_jn.c n_log.c n_log10.c n_log1p.c \ Index: src/lib/libm/noieee_src/n_asincos.c diff -u src/lib/libm/noieee_src/n_asincos.c:1.8 src/lib/libm/noieee_src/n_asincos.c:1.9 --- src/lib/libm/noieee_src/n_asincos.c:1.8 Sun Nov 24 09:41:53 2013 +++ src/lib/libm/noieee_src/n_asincos.c Wed Sep 21 10:11:40 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: n_asincos.c,v 1.8 2013/11/24 14:41:53 martin Exp $ */ +/* $NetBSD: n_asincos.c,v 1.9 2016/09/21 14:11:40 christos Exp $ */ /* * Copyright (c) 1985, 1993 * The Regents of the University of California. All rights reserved. @@ -27,6 +27,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ +#include +__RCSID("$NetBSD: n_asincos.c,v 1.9 2016/09/21 14:11:40 christos Exp $"); #ifndef lint #if 0 @@ -86,8 +88,16 @@ static char sccsid[] = "@(#)asincos.c 8. * 1.99 ulps. */ +#include "namespace.h" #include "mathimpl.h" +#ifdef __weak_alias +__weak_alias(asinf, _asinf) +#endif +#ifdef __weak_alias +__weak_alias(asin, _asin) +#endif + double asin(double x) { Added files: Index: src/lib/libm/noieee_src/n_atanhf.c diff -u /dev/null src/lib/libm/noieee_src/n_atanhf.c:1.1 --- /dev/null Wed Sep 21 10:11:40 2016 +++ src/lib/libm/noieee_src/n_atanhf.c Wed Sep 21 10:11:40 2016 @@ -0,0 +1,84 @@ +/* $NetBSD: n_atanhf.c,v 1.1 2016/09/21 14:11:40 christos Exp $ */ +/* + * Copyright (c) 1985, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + *may be used to endorse or promote products derived from this software + *without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. + */ +#include +__RCSID("$NetBSD: n_atanhf.c,v 1.1 2016/09/21 14:11:40 christos Exp $"); + +#ifndef lint +#if 0 +static char sccsid[] = "@(#)atanh.c 8.1 (Berkeley) 6/4/93"; +#endif +#endif /* not lint */ + +/* ATANH(X) + * RETURN THE HYPERBOLIC ARC TANGENT OF X + * DOUBLE PRECISION (VAX D format 56 bits, IEEE DOUBLE 53 BITS) + * CODED IN C BY K.C. NG, 1/8/85; + * REVISED BY K.C. NG on 2/7/85, 3/7/85, 8/18/85. + * + * Required kernel function: + * log1p(x) ...return log(1+x) + * + * Method : + *
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: roy Date: Wed Sep 21 14:00:29 UTC 2016 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/debug: shl.mi Log Message: Update for libc bump. To generate a diff of this commit: cvs rdiff -u -r1.784 -r1.785 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.144 -r1.145 src/distrib/sets/lists/debug/shl.mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.784 src/distrib/sets/lists/base/shl.mi:1.785 --- src/distrib/sets/lists/base/shl.mi:1.784 Mon Sep 5 02:25:37 2016 +++ src/distrib/sets/lists/base/shl.mi Wed Sep 21 14:00:29 2016 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.784 2016/09/05 02:25:37 ozaki-r Exp $ +# $NetBSD: shl.mi,v 1.785 2016/09/21 14:00:29 roy Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -18,7 +18,7 @@ ./lib/libblacklist.so.0.0 base-sys-shlib dynamicroot ./lib/libc.so base-sys-shlib dynamicroot ./lib/libc.so.12base-sys-shlib dynamicroot -./lib/libc.so.12.203base-sys-shlib dynamicroot +./lib/libc.so.12.204base-sys-shlib dynamicroot ./lib/libcrypt.sobase-sys-shlib dynamicroot ./lib/libcrypt.so.1base-sys-shlib dynamicroot ./lib/libcrypt.so.1.0base-sys-shlib dynamicroot @@ -214,7 +214,7 @@ ./usr/lib/libc++.so.1.0base-sys-shlib compatfile,libcxx ./usr/lib/libc.sobase-sys-shlib compatfile ./usr/lib/libc.so.12base-sys-shlib compatfile -./usr/lib/libc.so.12.203 base-sys-shlib compatfile +./usr/lib/libc.so.12.204 base-sys-shlib compatfile ./usr/lib/libcdk.sobase-obsolete compatfile,obsolete ./usr/lib/libcom_err.sobase-krb5-shlib compatfile,kerberos ./usr/lib/libcom_err.so.7 base-krb5-shlib compatfile,kerberos Index: src/distrib/sets/lists/debug/shl.mi diff -u src/distrib/sets/lists/debug/shl.mi:1.144 src/distrib/sets/lists/debug/shl.mi:1.145 --- src/distrib/sets/lists/debug/shl.mi:1.144 Mon Sep 5 02:25:38 2016 +++ src/distrib/sets/lists/debug/shl.mi Wed Sep 21 14:00:29 2016 @@ -1,7 +1,7 @@ -# $NetBSD: shl.mi,v 1.144 2016/09/05 02:25:38 ozaki-r Exp $ +# $NetBSD: shl.mi,v 1.145 2016/09/21 14:00:29 roy Exp $ ./usr/libdata/debug/lib base-sys-usr debug,dynamicroot,compatdir ./usr/libdata/debug/lib/libblacklist.so.0.0.debug comp-sys-debug debug,dynamicroot -./usr/libdata/debug/lib/libc.so.12.203.debug comp-sys-debug debug,dynamicroot +./usr/libdata/debug/lib/libc.so.12.204.debug comp-sys-debug debug,dynamicroot ./usr/libdata/debug/lib/libcrypt.so.1.0.debug comp-sys-debug debug,dynamicroot ./usr/libdata/debug/lib/libcrypto.so.11.0.debug comp-sys-debug debug,dynamicroot,crypto ./usr/libdata/debug/lib/libdevmapper.so.1.0.debug comp-sys-debug debug,dynamicroot @@ -69,7 +69,7 @@ ./usr/libdata/debug/usr/lib/libbsdmalloc.so.0.0.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libbz2.so.1.1.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libc++.so.1.0.debug comp-sys-debug debug,compatfile,libcxx -./usr/libdata/debug/usr/lib/libc.so.12.203.debug comp-sys-debug debug,compatfile +./usr/libdata/debug/usr/lib/libc.so.12.204.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libcom_err.so.7.0.debug comp-krb5-debug debug,compatfile,kerberos ./usr/libdata/debug/usr/lib/libcrypt.so.1.0.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libcrypto.so.11.0.debug comp-crypto-debug debug,compatfile,crypto
CVS commit: src/include
Module Name:src Committed By: roy Date: Wed Sep 21 13:32:27 UTC 2016 Modified Files: src/include: ifaddrs.h Log Message: Add ifa_addrflags to ifaddrs (forgot to commit this file, thanks Ryo!) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/include/ifaddrs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/ifaddrs.h diff -u src/include/ifaddrs.h:1.7 src/include/ifaddrs.h:1.8 --- src/include/ifaddrs.h:1.7 Sat Jan 23 01:26:14 2016 +++ src/include/ifaddrs.h Wed Sep 21 13:32:27 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ifaddrs.h,v 1.7 2016/01/23 01:26:14 dholland Exp $ */ +/* $NetBSD: ifaddrs.h,v 1.8 2016/09/21 13:32:27 roy Exp $ */ /* * Copyright (c) 1995, 1999 @@ -36,6 +36,7 @@ struct ifaddrs { struct sockaddr *ifa_netmask; struct sockaddr *ifa_dstaddr; void *ifa_data; + unsigned int ifa_addrflags; }; /*
CVS commit: src/lib/libc
Module Name:src Committed By: roy Date: Wed Sep 21 10:54:36 UTC 2016 Modified Files: src/lib/libc: shlib_version Log Message: Bump libc version for ifaddrs. To generate a diff of this commit: cvs rdiff -u -r1.267 -r1.268 src/lib/libc/shlib_version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/shlib_version diff -u src/lib/libc/shlib_version:1.267 src/lib/libc/shlib_version:1.268 --- src/lib/libc/shlib_version:1.267 Thu Sep 15 16:23:05 2016 +++ src/lib/libc/shlib_version Wed Sep 21 10:54:36 2016 @@ -1,4 +1,4 @@ -# $NetBSD: shlib_version,v 1.267 2016/09/15 16:23:05 joerg Exp $ +# $NetBSD: shlib_version,v 1.268 2016/09/21 10:54:36 roy Exp $ # Remember to update distrib/sets/lists/base/shl.* when changing # # things we wish to do on next major version bump: @@ -46,4 +46,4 @@ # - stop all math functions from setting errno # - boot obsolete signal functions to libcompat major=12 -minor=203 +minor=204
CVS commit: src/lib/libc/net
Module Name:src Committed By: roy Date: Wed Sep 21 10:53:24 UTC 2016 Modified Files: src/lib/libc/net: getifaddrs.3 getifaddrs.c Log Message: Add ifa_addrflags to ifaddrs. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/lib/libc/net/getifaddrs.3 cvs rdiff -u -r1.15 -r1.16 src/lib/libc/net/getifaddrs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/net/getifaddrs.3 diff -u src/lib/libc/net/getifaddrs.3:1.16 src/lib/libc/net/getifaddrs.3:1.17 --- src/lib/libc/net/getifaddrs.3:1.16 Sat Jan 23 07:21:18 2016 +++ src/lib/libc/net/getifaddrs.3 Wed Sep 21 10:53:24 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: getifaddrs.3,v 1.16 2016/01/23 07:21:18 wiz Exp $ +.\" $NetBSD: getifaddrs.3,v 1.17 2016/09/21 10:53:24 roy Exp $ .\" BSDI getifaddrs.3,v 2.5 2000/02/23 14:51:59 dab Exp .\" .\" Copyright (c) 1995, 1999 @@ -21,7 +21,7 @@ .\" 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. -.Dd April 7, 2013 +.Dd September 15, 2016 .Dt GETIFADDRS 3 .Os .Sh NAME @@ -57,6 +57,7 @@ structure contains at least the followin struct sockaddr *ifa_broadaddr;/* Interface broadcast address */ struct sockaddr *ifa_dstaddr; /* P2P interface destination */ void *ifa_data; /* Address specific data */ +unsigned int ifa_addrflags;/* Address flags */ .Ed .Pp The @@ -123,6 +124,10 @@ which contains various interface attribu For all other address families, it is .Dv NULL . .Pp +The +.Li ifa_addrflags +field contains the address flags, which are specific to the address family. +.Pp The data returned by .Fn getifaddrs is dynamically allocated and should be freed using @@ -185,6 +190,10 @@ The .Nm implementation first appeared in .Bsx . +.Pp +.Li ifa_addrflags +was added in +.Nx 8.0 . .Sh BUGS If both .In net/if.h Index: src/lib/libc/net/getifaddrs.c diff -u src/lib/libc/net/getifaddrs.c:1.15 src/lib/libc/net/getifaddrs.c:1.16 --- src/lib/libc/net/getifaddrs.c:1.15 Tue Mar 13 21:13:40 2012 +++ src/lib/libc/net/getifaddrs.c Wed Sep 21 10:53:24 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: getifaddrs.c,v 1.15 2012/03/13 21:13:40 christos Exp $ */ +/* $NetBSD: getifaddrs.c,v 1.16 2016/09/21 10:53:24 roy Exp $ */ /* * Copyright (c) 1995, 1999 @@ -27,7 +27,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: getifaddrs.c,v 1.15 2012/03/13 21:13:40 christos Exp $"); +__RCSID("$NetBSD: getifaddrs.c,v 1.16 2016/09/21 10:53:24 roy Exp $"); #endif /* LIBC_SCCS and not lint */ #ifndef RUMP_ACTION @@ -225,6 +225,7 @@ getifaddrs(struct ifaddrs **pif) ift->ifa_name = cif.ifa_name; ift->ifa_flags = cif.ifa_flags; ift->ifa_data = NULL; + ift->ifa_addrflags = ifam->ifam_addrflags; p = (char *)(void *)(ifam + 1); /* Scan to look for length of address */ alen = 0;
CVS commit: src/sys/sys
Module Name:src Committed By: roy Date: Wed Sep 21 10:52:13 UTC 2016 Modified Files: src/sys/sys: param.h Log Message: Bump kernel version for new routing socket message versions. To generate a diff of this commit: cvs rdiff -u -r1.504 -r1.505 src/sys/sys/param.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/param.h diff -u src/sys/sys/param.h:1.504 src/sys/sys/param.h:1.505 --- src/sys/sys/param.h:1.504 Fri Sep 16 03:10:45 2016 +++ src/sys/sys/param.h Wed Sep 21 10:52:13 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.504 2016/09/16 03:10:45 pgoyette Exp $ */ +/* $NetBSD: param.h,v 1.505 2016/09/21 10:52:13 roy Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -67,7 +67,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 799003800 /* NetBSD 7.99.38 */ +#define __NetBSD_Version__ 799003900 /* NetBSD 7.99.39 */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) <= __NetBSD_Version__)
CVS commit: src
Module Name:src Committed By: roy Date: Wed Sep 21 10:50:23 UTC 2016 Modified Files: src/share/man/man4: route.4 src/sys/compat/common: Makefile src/sys/compat/net: if.h route.h src/sys/net: if.h route.h rtsock.c src/sys/rump/net/lib/libnet: Makefile src/sys/sys: socket.h Added Files: src/sys/compat/common: rtsock_70.c Log Message: Add ifam_pid and ifam_addrflags to ifa_msghdr. Re-version RTM_NEWADDR, RTM_DELADDR, RTM_CHGADDR and NET_RT_IFLIST. Add compat code for old version. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/share/man/man4/route.4 cvs rdiff -u -r1.56 -r1.57 src/sys/compat/common/Makefile cvs rdiff -u -r0 -r1.1 src/sys/compat/common/rtsock_70.c cvs rdiff -u -r1.3 -r1.4 src/sys/compat/net/if.h cvs rdiff -u -r1.1 -r1.2 src/sys/compat/net/route.h cvs rdiff -u -r1.225 -r1.226 src/sys/net/if.h cvs rdiff -u -r1.102 -r1.103 src/sys/net/route.h cvs rdiff -u -r1.195 -r1.196 src/sys/net/rtsock.c cvs rdiff -u -r1.28 -r1.29 src/sys/rump/net/lib/libnet/Makefile cvs rdiff -u -r1.119 -r1.120 src/sys/sys/socket.h 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/route.4 diff -u src/share/man/man4/route.4:1.27 src/share/man/man4/route.4:1.28 --- src/share/man/man4/route.4:1.27 Mon Apr 4 13:29:12 2016 +++ src/share/man/man4/route.4 Wed Sep 21 10:50:23 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: route.4,v 1.27 2016/04/04 13:29:12 wiz Exp $ +.\" $NetBSD: route.4,v 1.28 2016/09/21 10:50:23 roy Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)route.4 8.6 (Berkeley) 4/19/94 .\" -.Dd March 30, 2016 +.Dd September 15, 2016 .Dt ROUTE 4 .Os .Sh NAME @@ -196,13 +196,16 @@ The messages are: #define RTM_LOSING 0x5/* Kernel Suspects Partitioning */ #define RTM_REDIRECT 0x6/* Told to use different route */ #define RTM_MISS 0x7/* Lookup failed on this address */ -#define RTM_NEWADDR 0xc/* address being added to iface */ -#define RTM_DELADDR 0xd/* address being removed from iface */ +#define RTM_ONEWADDR 0xc/* Old (pre-8.0) RTM_NEWADDR message */ +#define RTM_ODELADDR 0xd/* Old (pre-8.0) RTM_DELADDR message */ #define RTM_OOIFINFO 0xe/* Old (pre-1.5) RTM_IFINFO message */ #define RTM_OIFINFO 0xf/* Old (pre-6.0) RTM_IFINFO message */ #define RTM_IFANNOUNCE 0x10 /* iface arrival/departure */ #define RTM_IFINFO 0x14 /* iface/link going up/down etc. */ -#define RTM_CHGADDR 0x15 /* address has changed on iface */ +#define RTM_OCHGADDR 0x15 /* Old (pre-8.0) RTM_CHGADDR message */ +#define RTM_NEWADDR 0x16 /* address being added to iface */ +#define RTM_DELADDR 0x17 /* address being removed from iface */ +#define RTM_CHGADDR 0x18 /* address properties changed */ .Ed .Pp A message header consists of one of the following: @@ -236,9 +239,11 @@ struct ifa_msghdr { u_short ifam_msglen; /* to skip over non-understood messages */ u_char ifam_version; /* future binary compatibility */ u_char ifam_type; /* message type */ -int ifam_addrs;/* like rtm_addrs */ -int ifam_flags;/* value of ifa_flags */ u_short ifam_index;/* index for associated ifp */ +int ifam_flags;/* value of ifa_flags */ +int ifam_addrs;/* like rtm_addrs */ +pid_t ifam_pid; /* identify sender */ +int ifam_addrflags;/* family specific address flags */ int ifam_metric; /* value of ifa_metric */ }; @@ -367,3 +372,7 @@ and .Cm RTF_LLDATA appeared in .Nx 8.0 . +.Pp +.Vt ifa_msghdr +gained the fields ifam_pid and ifam_addrflags in +.Nx 8.0 . Index: src/sys/compat/common/Makefile diff -u src/sys/compat/common/Makefile:1.56 src/sys/compat/common/Makefile:1.57 --- src/sys/compat/common/Makefile:1.56 Wed Apr 6 19:45:45 2016 +++ src/sys/compat/common/Makefile Wed Sep 21 10:50:23 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.56 2016/04/06 19:45:45 roy Exp $ +# $NetBSD: Makefile,v 1.57 2016/09/21 10:50:23 roy Exp $ LIB= compat NOPIC= # defined @@ -48,7 +48,7 @@ SRCS+= kern_50.c kern_time_50.c kern_sel SRCS+= kern_sa_60.c tty_60.c kern_time_60.c # Compatibility code for NetBSD 7.0 -SRCS+= uipc_usrreq_70.c +SRCS+= rtsock_70.c uipc_usrreq_70.c # really, all machines where sizeof(int) != sizeof(long) (LP64) .if (${MACHINE_ARCH} != "alpha" && ${MACHINE_ARCH} != "sparc64" \ Index: src/sys/compat/net/if.h diff -u src/sys/compat/net/if.h:1.3 src/sys/compat/net/if.h:1.4 --- src/sys/compat/net/if.h:1.3 Tue Feb 1 01:39:20 2011 +++ src/sys/compat/net/if.h Wed Sep 21 10:50:23 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if.h,v 1.3 2011/02/01 01:39:20 matt Exp $ */ +/* $NetBSD: if.h,v 1.4 2016/09/21 10:50:23 roy Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: skrll Date: Wed Sep 21 06:49:40 UTC 2016 Modified Files: src/lib/libc/arch/mips/gen: _resumecontext.S swapcontext.S Log Message: Fix for [on]{32,64} /usr/tests/lib/libc/sys/t_getcontext /usr/tests/lib/libc/sys/t_swapcontext /usr/tests/lib/libc/sys/t_ucontext /usr/tests/lib/libpthread/t_swapcontext All pass now. Changes amount to - saving GP from caller in context for n{32,64} - performing (the equivalient of) PIC_PROLOGUE for swapcontext and __resumecontext - Call setcontext via the PLT in __resumecontext To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/mips/gen/_resumecontext.S cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/mips/gen/swapcontext.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/mips/gen/_resumecontext.S diff -u src/lib/libc/arch/mips/gen/_resumecontext.S:1.10 src/lib/libc/arch/mips/gen/_resumecontext.S:1.11 --- src/lib/libc/arch/mips/gen/_resumecontext.S:1.10 Sat Aug 13 08:09:17 2016 +++ src/lib/libc/arch/mips/gen/_resumecontext.S Wed Sep 21 06:49:39 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: _resumecontext.S,v 1.10 2016/08/13 08:09:17 skrll Exp $ */ +/* $NetBSD: _resumecontext.S,v 1.11 2016/09/21 06:49:39 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include "assym.h" #if defined(SYSLIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: _resumecontext.S,v 1.10 2016/08/13 08:09:17 skrll Exp $") + RCSID("$NetBSD: _resumecontext.S,v 1.11 2016/09/21 06:49:39 skrll Exp $") #endif /* SYSLIBC_SCCS && !lint */ .set reorder @@ -44,17 +44,36 @@ LEAF_NOPROFILE(__resumecontext) /* * We get here not by a call through $t9 but thru $ra after the - * function passed to makecontext returns. + * function passed to makecontext returns. Therefore, we need + * to recover gp from ra */ +#if defined(__mips_o32) || defined(__mips_o64) + .set push + .set noreorder + .cpload ra + .set pop +#endif +#if defined(__mips_n32) || defined(__mips_n64) + .cpsetup ra, t3, __resumecontext +#endif + PTR_SUBU sp, sp, UCONTEXT_SIZE # get space for ucontext move a0, sp# arg0 for getcontext PTR_S zero, _OFFSETOF_UC_LINK(a0) # make sure uc_link is 0 SYSTRAP(getcontext)# get context + +#if defined(__mips_n32) || defined(__mips_n64) + REG_PROLOGUE + /* We saved gp in t2 above */ + REG_S t3, _OFFSETOF_UC_GREGS_GP(a0) + REG_EPILOGUE +#endif + PTR_L a0, _OFFSETOF_UC_LINK(a0) # linked context? NOP_L beq a0, zero, 1f # nope, exit process nop - SYSTRAP(setcontext)# yes, become it. + PIC_TAILCALL(setcontext) # yes, become it. /* NOTREACHED (in theory) */ li a0, -1# failure, 1: Index: src/lib/libc/arch/mips/gen/swapcontext.S diff -u src/lib/libc/arch/mips/gen/swapcontext.S:1.6 src/lib/libc/arch/mips/gen/swapcontext.S:1.7 --- src/lib/libc/arch/mips/gen/swapcontext.S:1.6 Wed Sep 21 06:41:42 2016 +++ src/lib/libc/arch/mips/gen/swapcontext.S Wed Sep 21 06:49:39 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.6 2016/09/21 06:41:42 skrll Exp $ */ +/* $NetBSD: swapcontext.S,v 1.7 2016/09/21 06:49:39 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -33,13 +33,14 @@ #include "assym.h" #if defined(SYSLIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: swapcontext.S,v 1.6 2016/09/21 06:41:42 skrll Exp $") + RCSID("$NetBSD: swapcontext.S,v 1.7 2016/09/21 06:49:39 skrll Exp $") #endif /* SYSLIBC_SCCS && !lint */ .set reorder NESTED(swapcontext, CALLFRAME_SIZ, ra) .mask 0x8030, (CALLFRAME_RA - CALLFRAME_SIZ) + PIC_PROLOGUE(swapcontext) PTR_SUBU sp, sp, CALLFRAME_SIZ PTR_S ra, CALLFRAME_RA(sp) # save ra PTR_S a0, 0(sp) # stash away oucp @@ -53,6 +54,10 @@ NESTED(swapcontext, CALLFRAME_SIZ, ra) PTR_ADDIU v0, sp, CALLFRAME_SIZ REG_PROLOGUE REG_S zero, _OFFSETOF_UC_GREGS_V0(v1) +#if defined(__mips_n32) || defined(__mips_n64) + /* PIC_PROLOGUE saved gp in t3 */ + REG_S t3, _OFFSETOF_UC_GREGS_GP(v1) +#endif REG_S ra, _OFFSETOF_UC_GREGS_EPC(v1) REG_S v0, _OFFSETOF_UC_GREGS_SP(v1) REG_EPILOGUE
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: skrll Date: Wed Sep 21 06:41:42 UTC 2016 Modified Files: src/lib/libc/arch/mips/gen: swapcontext.S Log Message: Trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/mips/gen/swapcontext.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/mips/gen/swapcontext.S diff -u src/lib/libc/arch/mips/gen/swapcontext.S:1.5 src/lib/libc/arch/mips/gen/swapcontext.S:1.6 --- src/lib/libc/arch/mips/gen/swapcontext.S:1.5 Wed Sep 12 02:00:52 2012 +++ src/lib/libc/arch/mips/gen/swapcontext.S Wed Sep 21 06:41:42 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.5 2012/09/12 02:00:52 manu Exp $ */ +/* $NetBSD: swapcontext.S,v 1.6 2016/09/21 06:41:42 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -33,11 +33,11 @@ #include "assym.h" #if defined(SYSLIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: swapcontext.S,v 1.5 2012/09/12 02:00:52 manu Exp $") + RCSID("$NetBSD: swapcontext.S,v 1.6 2016/09/21 06:41:42 skrll Exp $") #endif /* SYSLIBC_SCCS && !lint */ .set reorder - + NESTED(swapcontext, CALLFRAME_SIZ, ra) .mask 0x8030, (CALLFRAME_RA - CALLFRAME_SIZ) PTR_SUBU sp, sp, CALLFRAME_SIZ