CVS commit: src/usr.bin/make
Module Name:src Committed By: mrg Date: Sun Sep 27 01:07:12 UTC 2020 Modified Files: src/usr.bin/make: targ.c Log Message: fix usr.bin/make build (which uses more warnings): remove static only prototype TargPrintOnlySrc(). PrintOnlySources() does not return a value, make it void. To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/usr.bin/make/targ.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/targ.c diff -u src/usr.bin/make/targ.c:1.102 src/usr.bin/make/targ.c:1.103 --- src/usr.bin/make/targ.c:1.102 Sat Sep 26 17:39:45 2020 +++ src/usr.bin/make/targ.c Sun Sep 27 01:07:12 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: targ.c,v 1.102 2020/09/26 17:39:45 rillig Exp $ */ +/* $NetBSD: targ.c,v 1.103 2020/09/27 01:07:12 mrg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -121,7 +121,7 @@ #include "dir.h" /* "@(#)targ.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: targ.c,v 1.102 2020/09/26 17:39:45 rillig Exp $"); +MAKE_RCSID("$NetBSD: targ.c,v 1.103 2020/09/27 01:07:12 mrg Exp $"); static GNodeList *allTargets; /* the list of all targets found so far */ #ifdef CLEANUP @@ -129,7 +129,6 @@ static GNodeList *allGNs; /* List of all #endif static Hash_Table targets; /* a hash table of same */ -static int TargPrintOnlySrc(void *, void *); #ifdef CLEANUP static void TargFreeGN(void *); #endif @@ -514,7 +513,7 @@ Targ_PrintNodes(GNodeList *gnodes, int p } /* Print only those targets that are just a source. */ -static int +static void PrintOnlySources(void) { GNodeListNode *ln;
CVS commit: src/doc
Module Name:src Committed By: mrg Date: Sun Sep 27 00:32:22 UTC 2020 Modified Files: src/doc: 3RDPARTY Log Message: note GMP 6.2.0 is in -current. To generate a diff of this commit: cvs rdiff -u -r1.1746 -r1.1747 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1746 src/doc/3RDPARTY:1.1747 --- src/doc/3RDPARTY:1.1746 Sat Sep 26 07:59:18 2020 +++ src/doc/3RDPARTY Sun Sep 27 00:32:22 2020 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1746 2020/09/26 07:59:18 mrg Exp $ +# $NetBSD: 3RDPARTY,v 1.1747 2020/09/27 00:32:22 mrg Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1537,7 +1537,7 @@ Location: external/lgpl3/mpfr/dist Notes: Package: GNU MP -Version: 6.1.2 +Version: 6.2.0 Current Vers: 6.2.0 Maintainer: http://gmplib.org/mailman/listinfo/gmp-devel Archive Site: http://gmplib.org/
CVS commit: src/sys/rump/librump/rumpnet
Module Name:src Committed By: roy Date: Sun Sep 27 00:34:44 UTC 2020 Modified Files: src/sys/rump/librump/rumpnet: net_stub.c Log Message: rump: Add weak alias for bridge_calc_link_state To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/rump/librump/rumpnet/net_stub.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpnet/net_stub.c diff -u src/sys/rump/librump/rumpnet/net_stub.c:1.39 src/sys/rump/librump/rumpnet/net_stub.c:1.40 --- src/sys/rump/librump/rumpnet/net_stub.c:1.39 Sun Sep 27 00:17:56 2020 +++ src/sys/rump/librump/rumpnet/net_stub.c Sun Sep 27 00:34:44 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: net_stub.c,v 1.39 2020/09/27 00:17:56 roy Exp $ */ +/* $NetBSD: net_stub.c,v 1.40 2020/09/27 00:34:44 roy Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: net_stub.c,v 1.39 2020/09/27 00:17:56 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: net_stub.c,v 1.40 2020/09/27 00:34:44 roy Exp $"); #include #include @@ -64,6 +64,7 @@ rumpnet_stub(void) __weak_alias(bridge_ifdetach,rumpnet_stub); __weak_alias(bridge_output,rumpnet_stub); __weak_alias(bridge_calc_csum_flags,rumpnet_stub); +__weak_alias(bridge_calc_link_state,rumpnet_stub); /* agr */ __weak_alias(agr_input,rumpnet_stub);
CVS commit: src/sys/net
Module Name:src Committed By: roy Date: Sun Sep 27 00:32:17 UTC 2020 Modified Files: src/sys/net: if.c if_bridge.c if_bridgevar.h Log Message: bridge: Calculate link state as the best link state of any member If any member is LINK_STATE_UP then it's LINK_STATE_UP. Otherwise if any member is LINK_STATE_UNKNOWN then it's LINK_STATE_UNKNOWN. Otherwise it's LINK_STATE_DOWN. To generate a diff of this commit: cvs rdiff -u -r1.481 -r1.482 src/sys/net/if.c cvs rdiff -u -r1.174 -r1.175 src/sys/net/if_bridge.c cvs rdiff -u -r1.34 -r1.35 src/sys/net/if_bridgevar.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/net/if.c diff -u src/sys/net/if.c:1.481 src/sys/net/if.c:1.482 --- src/sys/net/if.c:1.481 Sat Sep 26 18:35:12 2020 +++ src/sys/net/if.c Sun Sep 27 00:32:17 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.481 2020/09/26 18:35:12 roy Exp $ */ +/* $NetBSD: if.c,v 1.482 2020/09/27 00:32:17 roy Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.481 2020/09/26 18:35:12 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.482 2020/09/27 00:32:17 roy Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -2420,6 +2420,11 @@ if_link_state_change_process(struct ifne if (ifp->if_link_state_changed != NULL) ifp->if_link_state_changed(ifp, link_state); +#if NBRIDGE > 0 + if (ifp->if_bridge != NULL) + bridge_calc_link_state(ifp->if_bridge); +#endif + DOMAIN_FOREACH(dp) { if (dp->dom_if_link_state_change != NULL) dp->dom_if_link_state_change(ifp, link_state); Index: src/sys/net/if_bridge.c diff -u src/sys/net/if_bridge.c:1.174 src/sys/net/if_bridge.c:1.175 --- src/sys/net/if_bridge.c:1.174 Sat Aug 1 06:50:43 2020 +++ src/sys/net/if_bridge.c Sun Sep 27 00:32:17 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bridge.c,v 1.174 2020/08/01 06:50:43 maxv Exp $ */ +/* $NetBSD: if_bridge.c,v 1.175 2020/09/27 00:32:17 roy Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -80,7 +80,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.174 2020/08/01 06:50:43 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.175 2020/09/27 00:32:17 roy Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -438,9 +438,8 @@ bridge_clone_create(struct if_clone *ifc if_initname(ifp, ifc->ifc_name, unit); ifp->if_softc = sc; - ifp->if_extflags = IFEF_NO_LINK_STATE_CHANGE; #ifdef NET_MPSAFE - ifp->if_extflags |= IFEF_MPSAFE; + ifp->if_extflags = IFEF_MPSAFE; #endif ifp->if_mtu = ETHERMTU; ifp->if_ioctl = bridge_ioctl; @@ -465,6 +464,14 @@ bridge_clone_create(struct if_clone *ifc return error; } + + /* + * Set the link state to down. + * When interfaces are added the link state will reflect + * the best link state of the combined interfaces. + */ + ifp->if_link_state = LINK_STATE_DOWN; + if_alloc_sadl(ifp); if_register(ifp); @@ -796,6 +803,32 @@ bridge_calc_csum_flags(struct bridge_sof BRIDGE_UNLOCK(sc); } +/* + * bridge_calc_link_state: + * + * Calculate the link state based on each member interface. + */ +void +bridge_calc_link_state(struct bridge_softc *sc) +{ + struct bridge_iflist *bif; + struct ifnet *ifs; + int link_state = LINK_STATE_DOWN; + + BRIDGE_LOCK(sc); + BRIDGE_IFLIST_READER_FOREACH(bif, sc) { + ifs = bif->bif_ifp; + if (ifs->if_link_state == LINK_STATE_UP) { + link_state = LINK_STATE_UP; + break; + } + if (ifs->if_link_state == LINK_STATE_UNKNOWN) + link_state = LINK_STATE_UNKNOWN; + } + if_link_state_change(>sc_if, link_state); + BRIDGE_UNLOCK(sc); +} + static int bridge_ioctl_add(struct bridge_softc *sc, void *arg) { @@ -881,6 +914,7 @@ bridge_ioctl_add(struct bridge_softc *sc BRIDGE_UNLOCK(sc); bridge_calc_csum_flags(sc); + bridge_calc_link_state(sc); if (sc->sc_if.if_flags & IFF_RUNNING) bstp_initialization(sc); @@ -927,6 +961,7 @@ bridge_ioctl_del(struct bridge_softc *sc bridge_rtdelete(sc, ifs); bridge_calc_csum_flags(sc); + bridge_calc_link_state(sc); if (sc->sc_if.if_flags & IFF_RUNNING) bstp_initialization(sc); Index: src/sys/net/if_bridgevar.h diff -u src/sys/net/if_bridgevar.h:1.34 src/sys/net/if_bridgevar.h:1.35 --- src/sys/net/if_bridgevar.h:1.34 Thu Apr 30 13:59:50 2020 +++ src/sys/net/if_bridgevar.h Sun Sep 27 00:32:17 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bridgevar.h,v 1.34 2020/04/30 13:59:50 jdolecek Exp $ */ +/* $NetBSD: if_bridgevar.h,v 1.35 2020/09/27 00:32:17 roy Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -346,6 +346,7 @@ void bridge_enqueue(struct bridge_softc int); void bridge_calc_csum_flags(struct bridge_softc *); +void bridge_calc_link_state(struct bridge_softc *); #define BRIDGE_LOCK(_sc) mutex_enter(&(_sc)->sc_iflist_psref.bip_lock) #define BRIDGE_UNLOCK(_sc) mutex_exit(&(_sc)->sc_iflist_psref.bip_lock)
CVS import: src/external/lgpl3/gmp/dist
Module Name:src Committed By: mrg Date: Sun Sep 27 00:27:13 UTC 2020 Update of /cvsroot/src/external/lgpl3/gmp/dist In directory ivanova.netbsd.org:/tmp/cvs-serv15325 Log Message: initial import of GMP 6.2.0. changes include: - Bug fixes to gmp_snprintf, conversion to double, mpz_powm, and mpf_set_str. - New functions for factorial, primorial, fibonacci, mpz_2fac_ui, and mpz_mfac_uiui. - MIPS r6 cores are now supported. - Various speeds ups. Status: Vendor Tag: gmp Release Tags: gmp-6-2-0 U src/external/lgpl3/gmp/dist/Makefile.am C src/external/lgpl3/gmp/dist/configure C src/external/lgpl3/gmp/dist/acinclude.m4 U src/external/lgpl3/gmp/dist/configure.ac U src/external/lgpl3/gmp/dist/aclocal.m4 U src/external/lgpl3/gmp/dist/gmpxx.h C src/external/lgpl3/gmp/dist/Makefile.in U src/external/lgpl3/gmp/dist/config.in C src/external/lgpl3/gmp/dist/gmp-h.in N src/external/lgpl3/gmp/dist/gmp.pc.in N src/external/lgpl3/gmp/dist/gmpxx.pc.in U src/external/lgpl3/gmp/dist/AUTHORS U src/external/lgpl3/gmp/dist/COPYING U src/external/lgpl3/gmp/dist/ChangeLog U src/external/lgpl3/gmp/dist/INSTALL U src/external/lgpl3/gmp/dist/NEWS U src/external/lgpl3/gmp/dist/README U src/external/lgpl3/gmp/dist/compile C src/external/lgpl3/gmp/dist/config.guess C src/external/lgpl3/gmp/dist/config.sub U src/external/lgpl3/gmp/dist/install-sh U src/external/lgpl3/gmp/dist/ltmain.sh U src/external/lgpl3/gmp/dist/missing U src/external/lgpl3/gmp/dist/errno.c C src/external/lgpl3/gmp/dist/gmp-impl.h C src/external/lgpl3/gmp/dist/longlong.h U src/external/lgpl3/gmp/dist/assert.c U src/external/lgpl3/gmp/dist/compat.c U src/external/lgpl3/gmp/dist/extract-dbl.c U src/external/lgpl3/gmp/dist/invalid.c U src/external/lgpl3/gmp/dist/memory.c U src/external/lgpl3/gmp/dist/mp_bpl.c U src/external/lgpl3/gmp/dist/mp_clz_tab.c U src/external/lgpl3/gmp/dist/mp_dv_tab.c U src/external/lgpl3/gmp/dist/mp_minv_tab.c U src/external/lgpl3/gmp/dist/mp_get_fns.c U src/external/lgpl3/gmp/dist/mp_set_fns.c U src/external/lgpl3/gmp/dist/version.c U src/external/lgpl3/gmp/dist/nextprime.c U src/external/lgpl3/gmp/dist/primesieve.c U src/external/lgpl3/gmp/dist/tal-debug.c U src/external/lgpl3/gmp/dist/tal-notreent.c U src/external/lgpl3/gmp/dist/tal-reent.c C src/external/lgpl3/gmp/dist/configfsf.guess C src/external/lgpl3/gmp/dist/configfsf.sub U src/external/lgpl3/gmp/dist/.gdbinit U src/external/lgpl3/gmp/dist/INSTALL.autoconf U src/external/lgpl3/gmp/dist/COPYING.LESSERv3 U src/external/lgpl3/gmp/dist/COPYINGv2 U src/external/lgpl3/gmp/dist/COPYINGv3 N src/external/lgpl3/gmp/dist/asl.h U src/external/lgpl3/gmp/dist/bootstrap.c U src/external/lgpl3/gmp/dist/gen-fac.c U src/external/lgpl3/gmp/dist/gen-fib.c U src/external/lgpl3/gmp/dist/gen-bases.c U src/external/lgpl3/gmp/dist/gen-trialdivtab.c U src/external/lgpl3/gmp/dist/gen-jacobitab.c U src/external/lgpl3/gmp/dist/gen-psqr.c U src/external/lgpl3/gmp/dist/test-driver U src/external/lgpl3/gmp/dist/ylwrap U src/external/lgpl3/gmp/dist/cxx/dummy.cc U src/external/lgpl3/gmp/dist/cxx/Makefile.am U src/external/lgpl3/gmp/dist/cxx/Makefile.in U src/external/lgpl3/gmp/dist/cxx/isfuns.cc U src/external/lgpl3/gmp/dist/cxx/ismpf.cc U src/external/lgpl3/gmp/dist/cxx/ismpq.cc U src/external/lgpl3/gmp/dist/cxx/ismpz.cc U src/external/lgpl3/gmp/dist/cxx/ismpznw.cc U src/external/lgpl3/gmp/dist/cxx/limits.cc U src/external/lgpl3/gmp/dist/cxx/osdoprnti.cc U src/external/lgpl3/gmp/dist/cxx/osfuns.cc U src/external/lgpl3/gmp/dist/cxx/osmpf.cc U src/external/lgpl3/gmp/dist/cxx/osmpq.cc U src/external/lgpl3/gmp/dist/cxx/osmpz.cc U src/external/lgpl3/gmp/dist/mini-gmp/README U src/external/lgpl3/gmp/dist/mini-gmp/mini-gmp.c U src/external/lgpl3/gmp/dist/mini-gmp/mini-gmp.h N src/external/lgpl3/gmp/dist/mini-gmp/mini-mpq.c N src/external/lgpl3/gmp/dist/mini-gmp/mini-mpq.h U src/external/lgpl3/gmp/dist/mini-gmp/tests/Makefile U src/external/lgpl3/gmp/dist/mini-gmp/tests/run-tests U src/external/lgpl3/gmp/dist/mini-gmp/tests/hex-random.c U src/external/lgpl3/gmp/dist/mini-gmp/tests/hex-random.h U src/external/lgpl3/gmp/dist/mini-gmp/tests/mini-random.c U src/external/lgpl3/gmp/dist/mini-gmp/tests/mini-random.h U src/external/lgpl3/gmp/dist/mini-gmp/tests/t-add.c U src/external/lgpl3/gmp/dist/mini-gmp/tests/t-aorsmul.c U src/external/lgpl3/gmp/dist/mini-gmp/tests/t-bitops.c U src/external/lgpl3/gmp/dist/mini-gmp/tests/t-cmp_d.c U src/external/lgpl3/gmp/dist/mini-gmp/tests/t-comb.c U src/external/lgpl3/gmp/dist/mini-gmp/tests/t-cong.c U src/external/lgpl3/gmp/dist/mini-gmp/tests/t-div.c U src/external/lgpl3/gmp/dist/mini-gmp/tests/t-div_2exp.c U src/external/lgpl3/gmp/dist/mini-gmp/tests/t-double.c U src/external/lgpl3/gmp/dist/mini-gmp/tests/t-gcd.c U src/external/lgpl3/gmp/dist/mini-gmp/tests/t-import.c U src/external/lgpl3/gmp/dist/mini-gmp/tests/t-invert.c U src/external/lgpl3/gmp/dist/mini-gmp/tests/t-lcm.c U src/external/lgpl3/gmp/dist/mini-gmp/tests/t-limbs.c U
CVS commit: src/sys/rump/librump/rumpnet
Module Name:src Committed By: roy Date: Sun Sep 27 00:17:56 UTC 2020 Modified Files: src/sys/rump/librump/rumpnet: net_stub.c Log Message: rump: Try to fix build To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/rump/librump/rumpnet/net_stub.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpnet/net_stub.c diff -u src/sys/rump/librump/rumpnet/net_stub.c:1.38 src/sys/rump/librump/rumpnet/net_stub.c:1.39 --- src/sys/rump/librump/rumpnet/net_stub.c:1.38 Fri Aug 28 06:20:44 2020 +++ src/sys/rump/librump/rumpnet/net_stub.c Sun Sep 27 00:17:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: net_stub.c,v 1.38 2020/08/28 06:20:44 ozaki-r Exp $ */ +/* $NetBSD: net_stub.c,v 1.39 2020/09/27 00:17:56 roy Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: net_stub.c,v 1.38 2020/08/28 06:20:44 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: net_stub.c,v 1.39 2020/09/27 00:17:56 roy Exp $"); #include #include @@ -77,6 +77,7 @@ __weak_alias(pppoedisc_input,rumpnet_stu /* vlan */ __weak_alias(vlan_input,rumpnet_stub); __weak_alias(vlan_ifdetach,rumpnet_stub); +__weak_alias(vlan_link_state_changed,rumpnet_stub); /* ipsec */ /* FIXME: should modularize netipsec and reduce reverse symbol references */
CVS commit: src/sbin/ifconfig
Module Name:src Committed By: roy Date: Sat Sep 26 23:43:26 UTC 2020 Modified Files: src/sbin/ifconfig: ifconfig.c Log Message: ifconfig: We already have struct if_data in ifa_data. So let's not bother with an ioctl we don't need. To generate a diff of this commit: cvs rdiff -u -r1.245 -r1.246 src/sbin/ifconfig/ifconfig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/ifconfig/ifconfig.c diff -u src/sbin/ifconfig/ifconfig.c:1.245 src/sbin/ifconfig/ifconfig.c:1.246 --- src/sbin/ifconfig/ifconfig.c:1.245 Wed Sep 23 10:48:12 2020 +++ src/sbin/ifconfig/ifconfig.c Sat Sep 26 23:43:26 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ifconfig.c,v 1.245 2020/09/23 10:48:12 roy Exp $ */ +/* $NetBSD: ifconfig.c,v 1.246 2020/09/26 23:43:26 roy Exp $ */ /*- * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ #ifndef lint __COPYRIGHT("@(#) Copyright (c) 1983, 1993\ The Regents of the University of California. All rights reserved."); -__RCSID("$NetBSD: ifconfig.c,v 1.245 2020/09/23 10:48:12 roy Exp $"); +__RCSID("$NetBSD: ifconfig.c,v 1.246 2020/09/26 23:43:26 roy Exp $"); #endif /* not lint */ #include @@ -135,8 +135,8 @@ static int setlinkstr(prop_dictionary_t, static int unsetlinkstr(prop_dictionary_t, prop_dictionary_t); static int setifdescr(prop_dictionary_t, prop_dictionary_t); static int unsetifdescr(prop_dictionary_t, prop_dictionary_t); -static void status(const struct sockaddr_dl *, prop_dictionary_t, -prop_dictionary_t); +static void status(const struct sockaddr_dl *, const void *, +prop_dictionary_t, prop_dictionary_t); __dead static void usage(void); static const struct kwinst ifflagskw[] = { @@ -908,7 +908,7 @@ printall(const char *ifname, prop_dictio continue; } - status(sdl, env, oenv); + status(sdl, ifa->ifa_data, env, oenv); sdl = NULL; } if (lflag) @@ -1270,10 +1270,10 @@ print_human_bytes(bool humanize, uint64_ #define MAX_PRINT_LEN 58 /* XXX need a better way to determine this! */ void -status(const struct sockaddr_dl *sdl, prop_dictionary_t env, -prop_dictionary_t oenv) +status(const struct sockaddr_dl *sdl, const void *ifa_data, +prop_dictionary_t env, prop_dictionary_t oenv) { - const struct if_data *ifi; + const struct if_data *ifi = ifa_data; status_func_t *status_f; statistics_func_t *statistics_f; struct ifdatareq ifdr; @@ -1365,18 +1365,19 @@ status(const struct sockaddr_dl *sdl, pr free(p); } - estrlcpy(ifdr.ifdr_name, ifname, sizeof(ifdr.ifdr_name)); - - if (prog_ioctl(s, zflag ? SIOCZIFDATA : SIOCGIFDATA, ) == -1) - err(EXIT_FAILURE, zflag ? "SIOCZIFDATA" : "SIOCGIFDATA"); - - ifi = _data; - media_status(sdl->sdl_type, ifi->ifi_link_state, env, oenv); if (!vflag && !zflag) goto proto_status; + /* We already have if_data from SIOCGIFDATA in ifa_data. */ + if (zflag) { + estrlcpy(ifdr.ifdr_name, ifname, sizeof(ifdr.ifdr_name)); + if (prog_ioctl(s, SIOCZIFDATA, ) == -1) + err(EXIT_FAILURE, "SIOCZIFDATA"); + ifi = _data; + } + print_plural("\tinput: ", ifi->ifi_ipackets, "packet"); print_human_bytes(hflag, ifi->ifi_ibytes); if (ifi->ifi_imcasts)
CVS commit: src/sys/arch/alpha
Module Name:src Committed By: thorpej Date: Sat Sep 26 21:07:48 UTC 2020 Modified Files: src/sys/arch/alpha/alpha: interrupt.c src/sys/arch/alpha/include: intr.h pci_machdep.h src/sys/arch/alpha/pci: pci_6600.c pci_machdep.c Log Message: Implement cpu_intr_redistribute() for Tusnami/Titan systems. To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/sys/arch/alpha/alpha/interrupt.c cvs rdiff -u -r1.81 -r1.82 src/sys/arch/alpha/include/intr.h cvs rdiff -u -r1.20 -r1.21 src/sys/arch/alpha/include/pci_machdep.h cvs rdiff -u -r1.28 -r1.29 src/sys/arch/alpha/pci/pci_6600.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/alpha/pci/pci_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/alpha/alpha/interrupt.c diff -u src/sys/arch/alpha/alpha/interrupt.c:1.90 src/sys/arch/alpha/alpha/interrupt.c:1.91 --- src/sys/arch/alpha/alpha/interrupt.c:1.90 Fri Sep 25 03:40:11 2020 +++ src/sys/arch/alpha/alpha/interrupt.c Sat Sep 26 21:07:48 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: interrupt.c,v 1.90 2020/09/25 03:40:11 thorpej Exp $ */ +/* $NetBSD: interrupt.c,v 1.91 2020/09/26 21:07:48 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.90 2020/09/25 03:40:11 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.91 2020/09/26 21:07:48 thorpej Exp $"); #include #include @@ -575,6 +575,8 @@ cpu_intr_p(void) return curcpu()->ci_intrdepth != 0; } +void (*alpha_intr_redistribute)(void); + /* * cpu_intr_redistribute: * @@ -583,7 +585,8 @@ cpu_intr_p(void) void cpu_intr_redistribute(void) { - /* XXX Nothing, yet. */ + if (alpha_intr_redistribute != NULL) + (*alpha_intr_redistribute)(); } /* Index: src/sys/arch/alpha/include/intr.h diff -u src/sys/arch/alpha/include/intr.h:1.81 src/sys/arch/alpha/include/intr.h:1.82 --- src/sys/arch/alpha/include/intr.h:1.81 Fri Sep 25 03:40:11 2020 +++ src/sys/arch/alpha/include/intr.h Sat Sep 26 21:07:48 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.81 2020/09/25 03:40:11 thorpej Exp $ */ +/* $NetBSD: intr.h,v 1.82 2020/09/26 21:07:48 thorpej Exp $ */ /*- * Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. @@ -268,6 +268,7 @@ struct evcnt *alpha_shared_intr_evcnt(st unsigned int); extern struct scbvec scb_iovectab[]; +extern void (*alpha_intr_redistribute)(void); void scb_init(void); void scb_set(u_long, void (*)(void *, u_long), void *); Index: src/sys/arch/alpha/include/pci_machdep.h diff -u src/sys/arch/alpha/include/pci_machdep.h:1.20 src/sys/arch/alpha/include/pci_machdep.h:1.21 --- src/sys/arch/alpha/include/pci_machdep.h:1.20 Sat Sep 26 02:46:27 2020 +++ src/sys/arch/alpha/include/pci_machdep.h Sat Sep 26 21:07:48 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.h,v 1.20 2020/09/26 02:46:27 thorpej Exp $ */ +/* $NetBSD: pci_machdep.h,v 1.21 2020/09/26 21:07:48 thorpej Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -132,6 +132,8 @@ void *alpha_pci_generic_intr_establish(p void alpha_pci_generic_intr_disestablish(pci_chipset_tag_t, void *); void alpha_pci_generic_iointr(void *, unsigned long); +void alpha_pci_generic_intr_redistribute(pci_chipset_tag_t); + void alpha_pci_intr_handle_init(pci_intr_handle_t *, u_int, u_int); void alpha_pci_intr_handle_set_irq(pci_intr_handle_t *, u_int); u_int alpha_pci_intr_handle_get_irq(const pci_intr_handle_t *); Index: src/sys/arch/alpha/pci/pci_6600.c diff -u src/sys/arch/alpha/pci/pci_6600.c:1.28 src/sys/arch/alpha/pci/pci_6600.c:1.29 --- src/sys/arch/alpha/pci/pci_6600.c:1.28 Sat Sep 26 02:50:41 2020 +++ src/sys/arch/alpha/pci/pci_6600.c Sat Sep 26 21:07:48 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_6600.c,v 1.28 2020/09/26 02:50:41 thorpej Exp $ */ +/* $NetBSD: pci_6600.c,v 1.29 2020/09/26 21:07:48 thorpej Exp $ */ /*- * Copyright (c) 1999 by Ross Harvey. All rights reserved. @@ -33,7 +33,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pci_6600.c,v 1.28 2020/09/26 02:50:41 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_6600.c,v 1.29 2020/09/26 21:07:48 thorpej Exp $"); #include #include @@ -98,6 +98,8 @@ static void dec_6600_intr_disable(pci_ch static void dec_6600_intr_set_affinity(pci_chipset_tag_t, int, struct cpu_info *); +static void dec_6600_intr_redistribute(void); + /* * We keep 2 software copies of the interrupt enables: one global one, * and one per-CPU for setting the interrupt affinity. @@ -132,6 +134,8 @@ pci_6600_pickintr(struct tsp_config *pcp pc->pc_intr_disable = dec_6600_intr_disable; pc->pc_intr_set_affinity = dec_6600_intr_set_affinity; + alpha_intr_redistribute = dec_6600_intr_redistribute; + /* Note eligible CPUs for interrupt routing purposes. */ for (CPU_INFO_FOREACH(cii, ci)) { KASSERT(ci->ci_cpuid < 4); @@
CVS commit: src/external/lgpl3/gmp
Module Name:src Committed By: mrg Date: Sat Sep 26 20:58:48 UTC 2020 Modified Files: src/external/lgpl3/gmp: Makefile.netbsd-gmp build-gmp-Makefile.inc.awk Log Message: update slightly to enable 'native-gmp' target from tools/gmp to work. call the awk script on 'config.log', which has (almost) the same output as the stdout of ./configure, and automatically store it as 'srcs.mk'. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/lgpl3/gmp/Makefile.netbsd-gmp cvs rdiff -u -r1.4 -r1.5 src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/lgpl3/gmp/Makefile.netbsd-gmp diff -u src/external/lgpl3/gmp/Makefile.netbsd-gmp:1.5 src/external/lgpl3/gmp/Makefile.netbsd-gmp:1.6 --- src/external/lgpl3/gmp/Makefile.netbsd-gmp:1.5 Tue Aug 22 09:57:18 2017 +++ src/external/lgpl3/gmp/Makefile.netbsd-gmp Sat Sep 26 20:58:48 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.netbsd-gmp,v 1.5 2017/08/22 09:57:18 mrg Exp $ +# $NetBSD: Makefile.netbsd-gmp,v 1.6 2020/09/26 20:58:48 mrg Exp $ # hack makefile to help build gmp ./configure @@ -25,6 +25,7 @@ all: copy-files: cd build && cp gmp.h gmp-mparam.h config.h config.m4 ${ARCHDIR} + awk -f ${NETBSDSRCDIR}/external/lgpl3/gmp/build-gmp-Makefile.inc.awk < build/config.log > ${ARCHDIR}/srcs.mk sed -i -e 's/define.*CONFIG_TOP_SRCDIR.*//' ${ARCHDIR}/config.m4 sed -i -e 's/__GMP_CC.*/__GMP_CC "gcc"/' ${ARCHDIR}/gmp.h sed -i -e 's/GMP_MPARAM_H_SUGGEST[ ]"\/.*dist\/mpn/GMP_MPARAM_H_SUGGEST ".\/mpn/' ${ARCHDIR}/config.h Index: src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk diff -u src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk:1.4 src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk:1.5 --- src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk:1.4 Tue Aug 22 09:57:18 2017 +++ src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk Sat Sep 26 20:58:48 2020 @@ -1,6 +1,6 @@ #! /usr/bin/awk -f -/^config.status: linking/ { +/^config.status(:[0-9]*:|:) linking/ { # $3 = src # $5 = dst
CVS commit: src/tools/gmp
Module Name:src Committed By: mrg Date: Sat Sep 26 20:56:53 UTC 2020 Modified Files: src/tools/gmp: Makefile Log Message: initial working version of native-gmp support. does not use mknative.common yet, so always updates files and does not mark them with NetBSD rcsid. (not a regression from the manual version at least.) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tools/gmp/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gmp/Makefile diff -u src/tools/gmp/Makefile:1.3 src/tools/gmp/Makefile:1.4 --- src/tools/gmp/Makefile:1.3 Sat Jan 9 01:13:42 2016 +++ src/tools/gmp/Makefile Sat Sep 26 20:56:53 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2016/01/09 01:13:42 christos Exp $ +# $NetBSD: Makefile,v 1.4 2020/09/26 20:56:53 mrg Exp $ # GNUHOSTDIST= ${.CURDIR}/../../external/lgpl3/gmp/dist @@ -15,3 +15,18 @@ CONFIGURE_ENV:= ${CONFIGURE_ENV:NPATH=*: # Force avoiding possibly non-executable install-sh. CONFIGURE_ENV+= ac_cv_path_mkdir="${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install -d" + +# mknative-gmp support +# +# XXX early version; does not use mknative.common yet. + +native-gmp: .native/.configure_done + @echo 'Extracting GNU GMP configury for a native toolchain.' + (cd ${.OBJDIR}/.native && \ + ${MAKE} -f ${.CURDIR}/../../external/lgpl3/gmp/Makefile.netbsd-gmp copy-files) + @echo 'HA HA, only joking. Manual fixes maybe needed now.' + +.native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile + mkdir .native 2>/dev/null || true + (cd ${.OBJDIR}/.native && \ + ${MAKE} -f ${.CURDIR}/../../external/lgpl3/gmp/Makefile.netbsd-gmp all)
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: mrg Date: Sat Sep 26 20:38:27 UTC 2020 Modified Files: src/sys/arch/mips/mips: db_trace.c Log Message: redo much of rev 1.45 and make the _KERNEL path look like it used to before. while it uses less total lines of code and looks less ugly, the merged crash+ddb code here is less correct and harder to follow for the kernel path. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/arch/mips/mips/db_trace.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/db_trace.c diff -u src/sys/arch/mips/mips/db_trace.c:1.46 src/sys/arch/mips/mips/db_trace.c:1.47 --- src/sys/arch/mips/mips/db_trace.c:1.46 Sat Sep 26 04:11:48 2020 +++ src/sys/arch/mips/mips/db_trace.c Sat Sep 26 20:38:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: db_trace.c,v 1.46 2020/09/26 04:11:48 simonb Exp $ */ +/* $NetBSD: db_trace.c,v 1.47 2020/09/26 20:38:27 mrg Exp $ */ /* * Mach Operating System @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.46 2020/09/26 04:11:48 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.47 2020/09/26 20:38:27 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -141,8 +141,6 @@ db_stack_trace_print(db_expr_t addr, boo { #ifndef DDB_TRACE struct pcb *pcb; - struct proc p; - struct lwp l; const char *cp = modif; char c; bool lwpaddr = false; @@ -173,27 +171,42 @@ db_stack_trace_print(db_expr_t addr, boo } if (lwpaddr) { - db_read_bytes(addr, sizeof(l), (char *)); - db_read_bytes((db_addr_t)l.l_proc, sizeof(p), (char *)); - (*pr)("pid %d.%d ", p.p_pid, l.l_lid); +#ifdef _KERNEL + struct lwp *l; + + l = (struct lwp *)(intptr_t)addr; + (*pr)("pid %d.%d ", l->l_proc->p_pid, l->l_lid); + pcb = lwp_getpcb(l); +#else + struct proc pstore; + struct lwp lstore; + + db_read_bytes(addr, sizeof(lstore), (char *)); + db_read_bytes((db_addr_t)lstore.l_proc, sizeof(pstore), + (char *)); + (*pr)("pid %d.%d ", pstore.p_pid, lstore.l_lid); + pcb = lwp_getpcb(); +#endif } else { /* "trace/t" */ (*pr)("pid %d ", (int)addr); #ifdef _KERNEL - struct proc *p2 = proc_find_raw(addr); - if (p2 == NULL) { + struct lwp *l; + struct proc *p = proc_find_raw(addr); + + if (p == NULL) { (*pr)("not found\n"); return; } - l = *LIST_FIRST(>p_lwps); /* XXX NJWLWP */ + l = LIST_FIRST(>p_lwps); /* XXX NJWLWP */ + pcb = lwp_getpcb(l); #else (*pr)("no proc_find_raw() in crash\n"); return; #endif } - pcb = lwp_getpcb(); (*pr)("at %p\n", pcb); #ifdef _KERNEL
CVS commit: src/sys/net
Module Name:src Committed By: roy Date: Sat Sep 26 19:38:45 UTC 2020 Modified Files: src/sys/net: if_tap.c Log Message: tap: Remove media from this virtual interface It serves no purpose at all. To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.118 src/sys/net/if_tap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_tap.c diff -u src/sys/net/if_tap.c:1.117 src/sys/net/if_tap.c:1.118 --- src/sys/net/if_tap.c:1.117 Tue Feb 4 05:46:32 2020 +++ src/sys/net/if_tap.c Sat Sep 26 19:38:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tap.c,v 1.117 2020/02/04 05:46:32 thorpej Exp $ */ +/* $NetBSD: if_tap.c,v 1.118 2020/09/26 19:38:45 roy Exp $ */ /* * Copyright (c) 2003, 2004, 2008, 2009 The NetBSD Foundation. @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.117 2020/02/04 05:46:32 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.118 2020/09/26 19:38:45 roy Exp $"); #if defined(_KERNEL_OPT) @@ -65,7 +65,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1 #include #include #include -#include #include #include @@ -89,16 +88,8 @@ static int tap_node; static int tap_sysctl_handler(SYSCTLFN_PROTO); static void sysctl_tap_setup(struct sysctllog **); -/* - * Since we're an Ethernet device, we need the 2 following - * components: a struct ethercom and a struct ifmedia - * since we don't attach a PHY to ourselves. - * We could emulate one, but there's no real point. - */ - struct tap_softc { device_t sc_dev; - struct ifmedia sc_im; struct ethercom sc_ec; int sc_flags; #define TAP_INUSE 0x0001 /* tap device can only be opened once */ @@ -191,18 +182,10 @@ static void tap_kqdetach(struct knote *) static int tap_kqread(struct knote *, long); /* - * Those are needed by the if_media interface. - */ - -static int tap_mediachange(struct ifnet *); -static void tap_mediastatus(struct ifnet *, struct ifmediareq *); - -/* * Those are needed by the ifnet interface, and would typically be * there for any network interface driver. * Some other routines are optional: watchdog and drain. */ - static void tap_start(struct ifnet *); static void tap_stop(struct ifnet *, int); static int tap_init(struct ifnet *); @@ -344,24 +327,6 @@ tap_attach(device_t parent, device_t sel ether_snprintf(enaddrstr, sizeof(enaddrstr), enaddr)); /* - * Why 1000baseT? Why not? You can add more. - * - * Note that there are 3 steps: init, one or several additions to - * list of supported media, and in the end, the selection of one - * of them. - */ - sc->sc_ec.ec_ifmedia = >sc_im; - ifmedia_init(>sc_im, 0, tap_mediachange, tap_mediastatus); - ifmedia_add(>sc_im, IFM_ETHER | IFM_1000_T, 0, NULL); - ifmedia_add(>sc_im, IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL); - ifmedia_add(>sc_im, IFM_ETHER | IFM_100_TX, 0, NULL); - ifmedia_add(>sc_im, IFM_ETHER | IFM_100_TX | IFM_FDX, 0, NULL); - ifmedia_add(>sc_im, IFM_ETHER | IFM_10_T, 0, NULL); - ifmedia_add(>sc_im, IFM_ETHER | IFM_10_T | IFM_FDX, 0, NULL); - ifmedia_add(>sc_im, IFM_ETHER | IFM_AUTO, 0, NULL); - ifmedia_set(>sc_im, IFM_ETHER | IFM_AUTO); - - /* * One should note that an interface must do multicast in order * to support IPv6. */ @@ -385,7 +350,6 @@ tap_attach(device_t parent, device_t sel error = if_initialize(ifp); if (error != 0) { aprint_error_dev(self, "if_initialize failed(%d)\n", error); - ifmedia_removeall(>sc_im); pmf_device_deregister(self); mutex_destroy(>sc_lock); seldestroy(>sc_rsel); @@ -451,7 +415,6 @@ tap_detach(device_t self, int flags) "sysctl_destroyv returned %d, ignoring\n", error); ether_ifdetach(ifp); if_detach(ifp); - ifmedia_fini(>sc_im); seldestroy(>sc_rsel); mutex_destroy(>sc_lock); cv_destroy(>sc_cv); @@ -462,28 +425,6 @@ tap_detach(device_t self, int flags) } /* - * This function is called by the ifmedia layer to notify the driver - * that the user requested a media change. A real driver would - * reconfigure the hardware. - */ -static int -tap_mediachange(struct ifnet *ifp) -{ - return 0; -} - -/* - * Here the user asks for the currently used media. - */ -static void -tap_mediastatus(struct ifnet *ifp, struct ifmediareq *imr) -{ - struct tap_softc *sc = (struct tap_softc *)ifp->if_softc; - - imr->ifm_active = sc->sc_im.ifm_cur->ifm_media; -} - -/* * This is the function where we SEND packets. * * There is no 'receive' equivalent. A typical driver will get @@ -571,8 +512,7 @@ tap_softintr(void *cookie) * The latter is a hack I used to set the Ethernet address of the * faked device. * - * Note that both ifmedia_ioctl() and ether_ioctl() have to be - * called under splnet(). + * Note that ether_ioctl() has to be called under splnet(). */ static int tap_ioctl(struct ifnet *ifp, u_long cmd, void *data)
CVS commit: src/sys/net
Module Name:src Committed By: roy Date: Sat Sep 26 18:38:09 UTC 2020 Modified Files: src/sys/net: if_ethersubr.c if_vlan.c if_vlanvar.h Log Message: vlan: match the interface link state with that of the parent Now addresses on a vlan will detach and undergo duplicate address dectection on link state changes just as on a standard interface. To generate a diff of this commit: cvs rdiff -u -r1.288 -r1.289 src/sys/net/if_ethersubr.c cvs rdiff -u -r1.152 -r1.153 src/sys/net/if_vlan.c cvs rdiff -u -r1.13 -r1.14 src/sys/net/if_vlanvar.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/net/if_ethersubr.c diff -u src/sys/net/if_ethersubr.c:1.288 src/sys/net/if_ethersubr.c:1.289 --- src/sys/net/if_ethersubr.c:1.288 Fri Aug 28 06:27:49 2020 +++ src/sys/net/if_ethersubr.c Sat Sep 26 18:38:09 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ethersubr.c,v 1.288 2020/08/28 06:27:49 ozaki-r Exp $ */ +/* $NetBSD: if_ethersubr.c,v 1.289 2020/09/26 18:38:09 roy Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.288 2020/08/28 06:27:49 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.289 2020/09/26 18:38:09 roy Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -979,6 +979,17 @@ ether_snprintf(char *buf, size_t len, co return buf; } +static void +ether_link_state_changed(struct ifnet *ifp, int link_state) +{ +#if NVLAN > 0 + struct ethercom *ec = (void *)ifp; + + if (ec->ec_nvlans) + vlan_link_state_changed(ifp, link_state); +#endif +} + /* * Perform common duties while attaching to interface list */ @@ -993,6 +1004,7 @@ ether_ifattach(struct ifnet *ifp, const ifp->if_mtu = ETHERMTU; ifp->if_output = ether_output; ifp->_if_input = ether_input; + ifp->if_link_state_changed = ether_link_state_changed; if (ifp->if_baudrate == 0) ifp->if_baudrate = IF_Mbps(10); /* just a default */ Index: src/sys/net/if_vlan.c diff -u src/sys/net/if_vlan.c:1.152 src/sys/net/if_vlan.c:1.153 --- src/sys/net/if_vlan.c:1.152 Fri Jun 12 11:04:45 2020 +++ src/sys/net/if_vlan.c Sat Sep 26 18:38:09 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vlan.c,v 1.152 2020/06/12 11:04:45 roy Exp $ */ +/* $NetBSD: if_vlan.c,v 1.153 2020/09/26 18:38:09 roy Exp $ */ /* * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -78,7 +78,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.152 2020/06/12 11:04:45 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.153 2020/09/26 18:38:09 roy Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -355,9 +355,8 @@ vlan_clone_create(struct if_clone *ifc, if_initname(ifp, ifc->ifc_name, unit); ifp->if_softc = ifv; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - ifp->if_extflags = IFEF_NO_LINK_STATE_CHANGE; #ifdef NET_MPSAFE - ifp->if_extflags |= IFEF_MPSAFE; + ifp->if_extflags = IFEF_MPSAFE; #endif ifp->if_start = vlan_start; ifp->if_transmit = vlan_transmit; @@ -371,6 +370,13 @@ vlan_clone_create(struct if_clone *ifc, goto fail; } + /* + * Set the link state to down. + * When the parent interface attaches we will use that link state. + * When the parent interface link state changes, so will ours. + */ + ifp->if_link_state = LINK_STATE_DOWN; + vlan_reset_linkname(ifp); if_register(ifp); return 0; @@ -562,6 +568,12 @@ vlan_config(struct ifvlan *ifv, struct i nmib_psref = NULL; omib_cleanup = true; + + /* + * We inherit the parents link state. + */ + if_link_state_change(>ifv_if, p->if_link_state); + done: mutex_exit(>ifv_lock); @@ -1669,6 +1681,35 @@ out: } /* + * If the parent link state changed, the vlan link state should change also. + */ +void +vlan_link_state_changed(struct ifnet *p, int link_state) +{ + struct ifvlan *ifv; + struct ifvlan_linkmib *mib; + struct psref psref; + struct ifnet *ifp; + + mutex_enter(_list.lock); + + LIST_FOREACH(ifv, _list.list, ifv_list) { + mib = vlan_getref_linkmib(ifv, ); + if (mib == NULL) + continue; + + if (mib->ifvm_p == p) { + ifp = >ifvm_ifvlan->ifv_if; + if_link_state_change(ifp, link_state); + } + + vlan_putref_linkmib(mib, ); + } + + mutex_exit(_list.lock); +} + +/* * Module infrastructure */ #include "if_module.h" Index: src/sys/net/if_vlanvar.h diff -u src/sys/net/if_vlanvar.h:1.13 src/sys/net/if_vlanvar.h:1.14 --- src/sys/net/if_vlanvar.h:1.13 Mon Jan 15 16:36:51 2018 +++ src/sys/net/if_vlanvar.h Sat Sep 26 18:38:09 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vlanvar.h,v 1.13 2018/01/15 16:36:51 maxv Exp $ */ +/* $NetBSD: if_vlanvar.h,v 1.14 2020/09/26 18:38:09 roy Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -83,6 +83,7 @@ struct vlanreq { #ifdef _KERNEL void vlan_input(struct ifnet *, struct mbuf *); void vlan_ifdetach(struct ifnet *); +void vlan_link_state_changed(struct ifnet *, int); /*
CVS commit: src/sys/net
Module Name:src Committed By: roy Date: Sat Sep 26 18:35:12 UTC 2020 Modified Files: src/sys/net: if.c if.h Log Message: net: Add a callback to ifnet to notify of link state changes To generate a diff of this commit: cvs rdiff -u -r1.480 -r1.481 src/sys/net/if.c cvs rdiff -u -r1.286 -r1.287 src/sys/net/if.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/net/if.c diff -u src/sys/net/if.c:1.480 src/sys/net/if.c:1.481 --- src/sys/net/if.c:1.480 Sat Sep 26 11:57:05 2020 +++ src/sys/net/if.c Sat Sep 26 18:35:12 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.480 2020/09/26 11:57:05 roy Exp $ */ +/* $NetBSD: if.c,v 1.481 2020/09/26 18:35:12 roy Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.480 2020/09/26 11:57:05 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.481 2020/09/26 18:35:12 roy Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -1212,6 +1212,8 @@ if_deactivate(struct ifnet *ifp) ifp->if_slowtimo = if_nullslowtimo; ifp->if_drain = if_nulldrain; + ifp->if_link_state_changed = NULL; + /* No more packets may be enqueued. */ ifp->if_snd.ifq_maxlen = 0; @@ -2415,6 +2417,9 @@ if_link_state_change_process(struct ifne carp_carpdev_state(ifp); #endif + if (ifp->if_link_state_changed != NULL) + ifp->if_link_state_changed(ifp, link_state); + DOMAIN_FOREACH(dp) { if (dp->dom_if_link_state_change != NULL) dp->dom_if_link_state_change(ifp, link_state); Index: src/sys/net/if.h diff -u src/sys/net/if.h:1.286 src/sys/net/if.h:1.287 --- src/sys/net/if.h:1.286 Sat Sep 26 11:57:05 2020 +++ src/sys/net/if.h Sat Sep 26 18:35:12 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if.h,v 1.286 2020/09/26 11:57:05 roy Exp $ */ +/* $NetBSD: if.h,v 1.287 2020/09/26 18:35:12 roy Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -419,6 +419,7 @@ typedef struct ifnet { uint16_t if_link_queue; /* q: masked link state change queue */ /* q: is link state work scheduled? */ bool if_link_scheduled; + void (*if_link_state_changed)(struct ifnet *, int); struct pslist_entry if_pslist_entry;/* i: */ struct psref_target
CVS commit: src
Module Name:src Committed By: jmcneill Date: Sat Sep 26 17:49:51 UTC 2020 Modified Files: src/distrib/sets: mkvars.mk sets.subr src/distrib/sets/lists/base: md.amd64 mi shl.mi src/distrib/sets/lists/comp: md.amd64 mi src/distrib/sets/lists/debug: md.amd64 mi module.md.amd64 module.mi shl.mi src/distrib/sets/lists/modules: md.amd64 mi src/lib: Makefile src/share/mk: bsd.own.mk src/sys/modules: Makefile src/usr.sbin/nvmmctl: Makefile Log Message: Add HAVE_NVMM and use it to control the build of NVMM related components. Defined to "yes" on amd64, "no" everywhere else. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/distrib/sets/mkvars.mk cvs rdiff -u -r1.192 -r1.193 src/distrib/sets/sets.subr cvs rdiff -u -r1.282 -r1.283 src/distrib/sets/lists/base/md.amd64 cvs rdiff -u -r1.1264 -r1.1265 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.905 -r1.906 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.282 -r1.283 src/distrib/sets/lists/comp/md.amd64 cvs rdiff -u -r1.2358 -r1.2359 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.111 -r1.112 src/distrib/sets/lists/debug/md.amd64 cvs rdiff -u -r1.338 -r1.339 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.2 -r1.3 src/distrib/sets/lists/debug/module.md.amd64 cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/debug/module.mi cvs rdiff -u -r1.264 -r1.265 src/distrib/sets/lists/debug/shl.mi cvs rdiff -u -r1.89 -r1.90 src/distrib/sets/lists/modules/md.amd64 cvs rdiff -u -r1.141 -r1.142 src/distrib/sets/lists/modules/mi cvs rdiff -u -r1.284 -r1.285 src/lib/Makefile cvs rdiff -u -r1.1221 -r1.1222 src/share/mk/bsd.own.mk cvs rdiff -u -r1.245 -r1.246 src/sys/modules/Makefile cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/nvmmctl/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/mkvars.mk diff -u src/distrib/sets/mkvars.mk:1.39 src/distrib/sets/mkvars.mk:1.40 --- src/distrib/sets/mkvars.mk:1.39 Sat Sep 12 15:25:41 2020 +++ src/distrib/sets/mkvars.mk Sat Sep 26 17:49:49 2020 @@ -1,4 +1,4 @@ -# $NetBSD: mkvars.mk,v 1.39 2020/09/12 15:25:41 jmcneill Exp $ +# $NetBSD: mkvars.mk,v 1.40 2020/09/26 17:49:49 jmcneill Exp $ MKEXTRAVARS= \ MACHINE \ @@ -10,6 +10,7 @@ MKEXTRAVARS= \ HAVE_XORG_SERVER_VER \ HAVE_XORG_GLAMOR \ HAVE_MESA_VER \ + HAVE_NVMM \ HAVE_BINUTILS \ HAVE_LIBGCC_EH \ HAVE_OPENSSL \ Index: src/distrib/sets/sets.subr diff -u src/distrib/sets/sets.subr:1.192 src/distrib/sets/sets.subr:1.193 --- src/distrib/sets/sets.subr:1.192 Sat Sep 12 15:25:41 2020 +++ src/distrib/sets/sets.subr Sat Sep 26 17:49:49 2020 @@ -1,4 +1,4 @@ -# $NetBSD: sets.subr,v 1.192 2020/09/12 15:25:41 jmcneill Exp $ +# $NetBSD: sets.subr,v 1.193 2020/09/26 17:49:49 jmcneill Exp $ # # @@ -20,8 +20,9 @@ # HAVE_BINUTILS # HAVE_GCC # HAVE_GDB -# HAVE_SSP +# HAVE_NVMM # HAVE_OPENSSL +# HAVE_SSP # HAVE_UEFI # TOOLCHAIN_MISSING # OBJECT_FMT @@ -191,7 +192,7 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g # In each file, a record consists of a path and a System Package name, # separated by whitespace. E.g., # -# # $NetBSD: sets.subr,v 1.192 2020/09/12 15:25:41 jmcneill Exp $ +# # $NetBSD: sets.subr,v 1.193 2020/09/26 17:49:49 jmcneill Exp $ # . base-sys-root [keyword[,...]] # ./altroot base-sys-root # ./bin base-sys-root @@ -226,6 +227,7 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g # gcc= = value of ${HAVE_GCC} # gdb= = value of ${HAVE_GDB} # mesa_ver= = value of ${HAVE_MESA_VER} +# nvmm ${HAVE_NVMM} != no # openssl= = value of ${HAVE_OPENSSL} # uefi ${HAVE_UEFI} != no # xorg_server_ver= = value of ${HAVE_XORG_SERVER_VER} @@ -340,6 +342,9 @@ list_set_files() if ("mesa_ver" in wanted) { wanted["mesa_ver=" "'"${HAVE_MESA_VER}"'"] = 1 } + if ("nvmm" in wanted) { +wanted["nvmm=" "'"${HAVE_NVMM}"'"] = 1 + } if ("openssl" in wanted) { wanted["openssl=" "'"${HAVE_OPENSSL}"'"] = 1 } Index: src/distrib/sets/lists/base/md.amd64 diff -u src/distrib/sets/lists/base/md.amd64:1.282 src/distrib/sets/lists/base/md.amd64:1.283 --- src/distrib/sets/lists/base/md.amd64:1.282 Sat Sep 12 15:25:41 2020 +++ src/distrib/sets/lists/base/md.amd64 Sat Sep 26 17:49:49 2020 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.282 2020/09/12 15:25:41 jmcneill Exp $ +# $NetBSD: md.amd64,v 1.283 2020/09/26 17:49:49 jmcneill Exp $ ./dev/lms0 base-obsolete obsolete ./dev/mms0 base-obsolete obsolete ./libexec/ld.elf_so-i386 base-sys-shlib compat,pic @@ -10,9 +10,6 @@ ./usr/lib/i386/libproc.so.1.0 base-compat-shlib compat,pic,dtrace ./usr/lib/i386/librtld_db.so.0 base-compat-shlib compat,pic,dtrace ./usr/lib/i386/librtld_db.so.0.0 base-compat-shlib compat,pic,dtrace -./usr/lib/libnvmm.sobase-sys-shlib pic -./usr/lib/libnvmm.so.0base-sys-shlib pic -./usr/lib/libnvmm.so.0.1 base-sys-shlib pic
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Sep 26 17:39:45 UTC 2020 Modified Files: src/usr.bin/make: job.c main.c make.c parse.c targ.c Log Message: make(1): revert migration from Lst_ForEachUntil to Lst_ForEach There is a crucial difference between these functions, in that Lst_ForEachUntil can cope with a few concurrent modifications while iterating over the list. This is something that Lst_ForEach doesn't do. This difference led to a crash very early in NetBSD's build.sh. To generate a diff of this commit: cvs rdiff -u -r1.241 -r1.242 src/usr.bin/make/job.c cvs rdiff -u -r1.348 -r1.349 src/usr.bin/make/main.c cvs rdiff -u -r1.147 -r1.148 src/usr.bin/make/make.c cvs rdiff -u -r1.333 -r1.334 src/usr.bin/make/parse.c cvs rdiff -u -r1.101 -r1.102 src/usr.bin/make/targ.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/job.c diff -u src/usr.bin/make/job.c:1.241 src/usr.bin/make/job.c:1.242 --- src/usr.bin/make/job.c:1.241 Sat Sep 26 17:15:20 2020 +++ src/usr.bin/make/job.c Sat Sep 26 17:39:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.241 2020/09/26 17:15:20 rillig Exp $ */ +/* $NetBSD: job.c,v 1.242 2020/09/26 17:39:45 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -140,7 +140,7 @@ #include "trace.h" /* "@(#)job.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: job.c,v 1.241 2020/09/26 17:15:20 rillig Exp $"); +MAKE_RCSID("$NetBSD: job.c,v 1.242 2020/09/26 17:39:45 rillig Exp $"); # define STATIC static @@ -655,7 +655,7 @@ JobFindPid(int pid, int status, Boolean * jobp job for which to print it * * Results: - * 0, unless the command was "..." + * Always 0, unless the command was "..." * * Side Effects: * If the command begins with a '-' and the shell has no error control, Index: src/usr.bin/make/main.c diff -u src/usr.bin/make/main.c:1.348 src/usr.bin/make/main.c:1.349 --- src/usr.bin/make/main.c:1.348 Sat Sep 26 17:15:20 2020 +++ src/usr.bin/make/main.c Sat Sep 26 17:39:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.348 2020/09/26 17:15:20 rillig Exp $ */ +/* $NetBSD: main.c,v 1.349 2020/09/26 17:39:45 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -126,7 +126,7 @@ #endif /* "@(#)main.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: main.c,v 1.348 2020/09/26 17:15:20 rillig Exp $"); +MAKE_RCSID("$NetBSD: main.c,v 1.349 2020/09/26 17:39:45 rillig Exp $"); #if defined(MAKE_NATIVE) && !defined(lint) __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\ The Regents of the University of California. All rights reserved."); @@ -1969,7 +1969,7 @@ cached_realpath(const char *pathname, ch static int -addErrorCMD(void *cmdp, void *unused) +addErrorCMD(void *cmdp, void *gnp) { if (cmdp == NULL) return 1; /* stop */ Index: src/usr.bin/make/make.c diff -u src/usr.bin/make/make.c:1.147 src/usr.bin/make/make.c:1.148 --- src/usr.bin/make/make.c:1.147 Sat Sep 26 17:15:20 2020 +++ src/usr.bin/make/make.c Sat Sep 26 17:39:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: make.c,v 1.147 2020/09/26 17:15:20 rillig Exp $ */ +/* $NetBSD: make.c,v 1.148 2020/09/26 17:39:45 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -107,7 +107,7 @@ #include"job.h" /* "@(#)make.c 8.1 (Berkeley) 6/6/93" */ -MAKE_RCSID("$NetBSD: make.c,v 1.147 2020/09/26 17:15:20 rillig Exp $"); +MAKE_RCSID("$NetBSD: make.c,v 1.148 2020/09/26 17:39:45 rillig Exp $"); static unsigned int checked = 1;/* Sequence # to detect recursion */ static GNodeList *toBeMade; /* The current fringe of the graph. These @@ -116,11 +116,14 @@ static GNodeList *toBeMade; /* The curre * Make_Update and subtracted from by * MakeStartJobs */ +static int MakeAddChild(void *, void *); +static int MakeFindChild(void *, void *); +static int MakeHandleUse(void *, void *); static Boolean MakeStartJobs(void); static int MakePrintStatus(void *, void *); static int MakeCheckOrder(void *, void *); static int MakeBuildChild(void *, void *); -static void MakeBuildParent(void *, void *); +static int MakeBuildParent(void *, void *); MAKE_ATTR_DEAD static void make_abort(GNode *gn, int line) @@ -375,11 +378,14 @@ Make_OODate(GNode *gn) * gnp the node to add * lp the list to which to add it * + * Results: + * Always returns 0 + * * Side Effects: * The given list is extended *--- */ -static void +static int MakeAddChild(void *gnp, void *lp) { GNode *gn = gnp; @@ -391,6 +397,7 @@ MakeAddChild(void *gnp, void *lp) gn->name, gn->cohort_num); Lst_Enqueue(l, gn); } +return 0; } /*- @@ -402,12 +409,15 @@ MakeAddChild(void *gnp, void *lp) * Input: * gnp the node to find * + * Results: + * Always returns 0 + * * Side Effects: * The path and mtime of the node and the cmgn of the
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Sep 26 17:15:20 UTC 2020 Modified Files: src/usr.bin/make: dir.c job.c lst.c lst.h main.c make.c meta.c suff.c targ.c Log Message: make(1): inline and remove LstNode_Prev and LstNode_Next These functions made the code larger than necessary. The prev and next fields are published intentionally since navigating in a doubly-linked list is simple to do and there is no need to wrap this in a layer of function calls, not even syntactically. (On the execution level, the function calls had been inlined anyway.) To generate a diff of this commit: cvs rdiff -u -r1.147 -r1.148 src/usr.bin/make/dir.c cvs rdiff -u -r1.240 -r1.241 src/usr.bin/make/job.c cvs rdiff -u -r1.71 -r1.72 src/usr.bin/make/lst.c cvs rdiff -u -r1.68 -r1.69 src/usr.bin/make/lst.h cvs rdiff -u -r1.347 -r1.348 src/usr.bin/make/main.c cvs rdiff -u -r1.146 -r1.147 src/usr.bin/make/make.c cvs rdiff -u -r1.119 -r1.120 src/usr.bin/make/meta.c cvs rdiff -u -r1.168 -r1.169 src/usr.bin/make/suff.c cvs rdiff -u -r1.100 -r1.101 src/usr.bin/make/targ.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/dir.c diff -u src/usr.bin/make/dir.c:1.147 src/usr.bin/make/dir.c:1.148 --- src/usr.bin/make/dir.c:1.147 Fri Sep 25 06:49:13 2020 +++ src/usr.bin/make/dir.c Sat Sep 26 17:15:20 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.147 2020/09/25 06:49:13 rillig Exp $ */ +/* $NetBSD: dir.c,v 1.148 2020/09/26 17:15:20 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -134,7 +134,7 @@ #include "job.h" /* "@(#)dir.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: dir.c,v 1.147 2020/09/25 06:49:13 rillig Exp $"); +MAKE_RCSID("$NetBSD: dir.c,v 1.148 2020/09/26 17:15:20 rillig Exp $"); #define DIR_DEBUG0(fmt) \ if (!DEBUG(DIR)) (void) 0; else fprintf(debug_file, fmt) @@ -1705,10 +1705,9 @@ void Dir_Concat(SearchPath *path1, SearchPath *path2) { SearchPathNode *ln; -CachedDir *dir; -for (ln = Lst_First(path2); ln != NULL; ln = LstNode_Next(ln)) { - dir = LstNode_Datum(ln); +for (ln = path2->first; ln != NULL; ln = ln->next) { + CachedDir *dir = ln->datum; if (Lst_FindDatum(path1, dir) == NULL) { dir->refCount += 1; Lst_Append(path1, dir); @@ -1746,8 +1745,8 @@ void Dir_PrintPath(SearchPath *path) { SearchPathNode *node; -for (node = Lst_First(path); node != NULL; node = LstNode_Next(node)) { - const CachedDir *dir = LstNode_Datum(node); +for (node = path->first; node != NULL; node = node->next) { + const CachedDir *dir = node->datum; fprintf(debug_file, "%s ", dir->name); } } Index: src/usr.bin/make/job.c diff -u src/usr.bin/make/job.c:1.240 src/usr.bin/make/job.c:1.241 --- src/usr.bin/make/job.c:1.240 Sat Sep 26 16:55:58 2020 +++ src/usr.bin/make/job.c Sat Sep 26 17:15:20 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.240 2020/09/26 16:55:58 rillig Exp $ */ +/* $NetBSD: job.c,v 1.241 2020/09/26 17:15:20 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -140,7 +140,7 @@ #include "trace.h" /* "@(#)job.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: job.c,v 1.240 2020/09/26 16:55:58 rillig Exp $"); +MAKE_RCSID("$NetBSD: job.c,v 1.241 2020/09/26 17:15:20 rillig Exp $"); # define STATIC static @@ -689,7 +689,7 @@ JobPrintCommand(void *cmdp, void *jobp) job->node->type |= OP_SAVE_CMDS; if ((job->flags & JOB_IGNDOTS) == 0) { StringListNode *dotsNode = Lst_FindDatum(job->node->commands, cmd); - job->tailCmds = dotsNode != NULL ? LstNode_Next(dotsNode) : NULL; + job->tailCmds = dotsNode != NULL ? dotsNode->next : NULL; return 1; } return 0; @@ -884,8 +884,8 @@ JobSaveCommands(Job *job) { StringListNode *node; -for (node = job->tailCmds; node != NULL; node = LstNode_Next(node)) { - char *cmd = LstNode_Datum(node); +for (node = job->tailCmds; node != NULL; node = node->next) { + const char *cmd = node->datum; char *expanded_cmd; /* XXX: This Var_Subst is only intended to expand the dynamic * variables such as .TARGET, .IMPSRC. It is not intended to Index: src/usr.bin/make/lst.c diff -u src/usr.bin/make/lst.c:1.71 src/usr.bin/make/lst.c:1.72 --- src/usr.bin/make/lst.c:1.71 Fri Sep 25 04:18:11 2020 +++ src/usr.bin/make/lst.c Sat Sep 26 17:15:20 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: lst.c,v 1.71 2020/09/25 04:18:11 rillig Exp $ */ +/* $NetBSD: lst.c,v 1.72 2020/09/26 17:15:20 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -34,7 +34,7 @@ #include "make.h" -MAKE_RCSID("$NetBSD: lst.c,v 1.71 2020/09/25 04:18:11 rillig Exp $"); +MAKE_RCSID("$NetBSD: lst.c,v 1.72 2020/09/26 17:15:20 rillig Exp $"); /* Allocate and initialize a list node. * @@ -290,8 +290,7 @@ Lst_Find(List *list, LstFindProc match, /* Return the first node from the list,
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Sep 26 17:02:11 UTC 2020 Modified Files: src/usr.bin/make: targ.c Log Message: make(1): inline Lst_ForEach in Targ_PrintGraph To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/usr.bin/make/targ.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/targ.c diff -u src/usr.bin/make/targ.c:1.99 src/usr.bin/make/targ.c:1.100 --- src/usr.bin/make/targ.c:1.99 Sat Sep 26 16:55:58 2020 +++ src/usr.bin/make/targ.c Sat Sep 26 17:02:11 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: targ.c,v 1.99 2020/09/26 16:55:58 rillig Exp $ */ +/* $NetBSD: targ.c,v 1.100 2020/09/26 17:02:11 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -121,7 +121,7 @@ #include "dir.h" /* "@(#)targ.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: targ.c,v 1.99 2020/09/26 16:55:58 rillig Exp $"); +MAKE_RCSID("$NetBSD: targ.c,v 1.100 2020/09/26 17:02:11 rillig Exp $"); static GNodeList *allTargets; /* the list of all targets found so far */ #ifdef CLEANUP @@ -511,19 +511,22 @@ Targ_PrintNodes(GNodeList *gnodes, int p Lst_ForEach(gnodes, PrintNode, ); } -/* Print only those targets that are just a source. - * The name of each file is printed, preceded by #\t. */ +/* Print only those targets that are just a source. */ static void -TargPrintOnlySrc(void *gnp, void *dummy MAKE_ATTR_UNUSED) +PrintOnlySources(void) { -GNode *gn = (GNode *)gnp; -if (!OP_NOP(gn->type)) - return; +GNodeListNode *ln; -fprintf(debug_file, "#\t%s [%s]", - gn->name, gn->path ? gn->path : gn->name); -Targ_PrintType(gn->type); -fprintf(debug_file, "\n"); +for (ln = allTargets->first; ln != NULL; ln = ln->next) { + GNode *gn = ln->datum; + if (!OP_NOP(gn->type)) + continue; + + fprintf(debug_file, "#\t%s [%s]", + gn->name, gn->path ? gn->path : gn->name); + Targ_PrintType(gn->type); + fprintf(debug_file, "\n"); +} } /* Input: @@ -535,10 +538,10 @@ void Targ_PrintGraph(int pass) { fprintf(debug_file, "#*** Input graph:\n"); -Lst_ForEach(allTargets, PrintNode, ); +Targ_PrintNodes(allTargets, pass); fprintf(debug_file, "\n\n"); fprintf(debug_file, "#\n# Files that are only sources:\n"); -Lst_ForEach(allTargets, TargPrintOnlySrc, NULL); +PrintOnlySources(); fprintf(debug_file, "#*** Global Variables:\n"); Var_Dump(VAR_GLOBAL); fprintf(debug_file, "#*** Command-line Variables:\n");
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Sep 26 16:55:58 UTC 2020 Modified Files: src/usr.bin/make: job.c main.c make.c parse.c targ.c Log Message: make(1): replace a few Lst_ForEachUntil with simpler Lst_ForEach To generate a diff of this commit: cvs rdiff -u -r1.239 -r1.240 src/usr.bin/make/job.c cvs rdiff -u -r1.346 -r1.347 src/usr.bin/make/main.c cvs rdiff -u -r1.145 -r1.146 src/usr.bin/make/make.c cvs rdiff -u -r1.332 -r1.333 src/usr.bin/make/parse.c cvs rdiff -u -r1.98 -r1.99 src/usr.bin/make/targ.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/job.c diff -u src/usr.bin/make/job.c:1.239 src/usr.bin/make/job.c:1.240 --- src/usr.bin/make/job.c:1.239 Sat Sep 26 16:00:12 2020 +++ src/usr.bin/make/job.c Sat Sep 26 16:55:58 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.239 2020/09/26 16:00:12 rillig Exp $ */ +/* $NetBSD: job.c,v 1.240 2020/09/26 16:55:58 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -140,7 +140,7 @@ #include "trace.h" /* "@(#)job.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: job.c,v 1.239 2020/09/26 16:00:12 rillig Exp $"); +MAKE_RCSID("$NetBSD: job.c,v 1.240 2020/09/26 16:55:58 rillig Exp $"); # define STATIC static @@ -655,7 +655,7 @@ JobFindPid(int pid, int status, Boolean * jobp job for which to print it * * Results: - * Always 0, unless the command was "..." + * 0, unless the command was "..." * * Side Effects: * If the command begins with a '-' and the shell has no error control, Index: src/usr.bin/make/main.c diff -u src/usr.bin/make/main.c:1.346 src/usr.bin/make/main.c:1.347 --- src/usr.bin/make/main.c:1.346 Sat Sep 26 16:00:12 2020 +++ src/usr.bin/make/main.c Sat Sep 26 16:55:58 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.346 2020/09/26 16:00:12 rillig Exp $ */ +/* $NetBSD: main.c,v 1.347 2020/09/26 16:55:58 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -126,7 +126,7 @@ #endif /* "@(#)main.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: main.c,v 1.346 2020/09/26 16:00:12 rillig Exp $"); +MAKE_RCSID("$NetBSD: main.c,v 1.347 2020/09/26 16:55:58 rillig Exp $"); #if defined(MAKE_NATIVE) && !defined(lint) __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\ The Regents of the University of California. All rights reserved."); @@ -1969,7 +1969,7 @@ cached_realpath(const char *pathname, ch static int -addErrorCMD(void *cmdp, void *gnp) +addErrorCMD(void *cmdp, void *unused) { if (cmdp == NULL) return 1; /* stop */ Index: src/usr.bin/make/make.c diff -u src/usr.bin/make/make.c:1.145 src/usr.bin/make/make.c:1.146 --- src/usr.bin/make/make.c:1.145 Sat Sep 26 16:00:12 2020 +++ src/usr.bin/make/make.c Sat Sep 26 16:55:58 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: make.c,v 1.145 2020/09/26 16:00:12 rillig Exp $ */ +/* $NetBSD: make.c,v 1.146 2020/09/26 16:55:58 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -107,7 +107,7 @@ #include"job.h" /* "@(#)make.c 8.1 (Berkeley) 6/6/93" */ -MAKE_RCSID("$NetBSD: make.c,v 1.145 2020/09/26 16:00:12 rillig Exp $"); +MAKE_RCSID("$NetBSD: make.c,v 1.146 2020/09/26 16:55:58 rillig Exp $"); static unsigned int checked = 1;/* Sequence # to detect recursion */ static GNodeList *toBeMade; /* The current fringe of the graph. These @@ -116,14 +116,11 @@ static GNodeList *toBeMade; /* The curre * Make_Update and subtracted from by * MakeStartJobs */ -static int MakeAddChild(void *, void *); -static int MakeFindChild(void *, void *); -static int MakeHandleUse(void *, void *); static Boolean MakeStartJobs(void); static int MakePrintStatus(void *, void *); static int MakeCheckOrder(void *, void *); static int MakeBuildChild(void *, void *); -static int MakeBuildParent(void *, void *); +static void MakeBuildParent(void *, void *); MAKE_ATTR_DEAD static void make_abort(GNode *gn, int line) @@ -378,14 +375,11 @@ Make_OODate(GNode *gn) * gnp the node to add * lp the list to which to add it * - * Results: - * Always returns 0 - * * Side Effects: * The given list is extended *--- */ -static int +static void MakeAddChild(void *gnp, void *lp) { GNode *gn = gnp; @@ -397,7 +391,6 @@ MakeAddChild(void *gnp, void *lp) gn->name, gn->cohort_num); Lst_Enqueue(l, gn); } -return 0; } /*- @@ -409,15 +402,12 @@ MakeAddChild(void *gnp, void *lp) * Input: * gnp the node to find * - * Results: - * Always returns 0 - * * Side Effects: * The path and mtime of the node and the cmgn of the parent are * updated; the unmade children count of the parent is decremented. *--- */ -static int +static void MakeFindChild(void *gnp, void *pgnp) { GNode *gn = (GNode *)gnp; @@ -426,8
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Sep 26 16:41:42 UTC 2020 Modified Files: src/usr.bin/make: compat.c nonints.h Log Message: make(1): inline Lst_ForEachUntil in Compat_Make To generate a diff of this commit: cvs rdiff -u -r1.151 -r1.152 src/usr.bin/make/compat.c cvs rdiff -u -r1.130 -r1.131 src/usr.bin/make/nonints.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/compat.c diff -u src/usr.bin/make/compat.c:1.151 src/usr.bin/make/compat.c:1.152 --- src/usr.bin/make/compat.c:1.151 Sat Sep 26 16:00:12 2020 +++ src/usr.bin/make/compat.c Sat Sep 26 16:41:42 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.151 2020/09/26 16:00:12 rillig Exp $ */ +/* $NetBSD: compat.c,v 1.152 2020/09/26 16:41:42 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -99,7 +99,7 @@ #include"pathnames.h" /* "@(#)compat.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: compat.c,v 1.151 2020/09/26 16:00:12 rillig Exp $"); +MAKE_RCSID("$NetBSD: compat.c,v 1.152 2020/09/26 16:41:42 rillig Exp $"); static GNode *curTarg = NULL; static void CompatInterrupt(int); @@ -471,30 +471,25 @@ CompatRunCommand(void *cmd, void *gn) return Compat_RunCommand(cmd, gn); } -static int -CompatMake(void *gn, void *pgn) +static void +MakeNodes(GNodeList *gnodes, GNode *pgn) { -return Compat_Make(gn, pgn); +GNodeListNode *node; +for (node = gnodes->first; node != NULL; node = node->next) { + GNode *cohort = node->datum; + Compat_Make(cohort, pgn); +} } -/*- - *--- - * Compat_Make -- - * Make a target. - * - * Input: - * gnp The node to make - * pgnp Parent to abort if necessary +/* Make a target. * - * Results: - * 0 - * - * Side Effects: - * If an error is detected and not being ignored, the process exits. + * If an error is detected and not being ignored, the process exits. * - *--- + * Input: + * gn The node to make + * pgn Parent to abort if necessary */ -int +void Compat_Make(GNode *gn, GNode *pgn) { if (!shellName) /* we came here from jobs */ @@ -512,7 +507,7 @@ Compat_Make(GNode *gn, GNode *pgn) gn->made = BEINGMADE; if ((gn->type & OP_MADE) == 0) Suff_FindDeps(gn); - Lst_ForEachUntil(gn->children, CompatMake, gn); + MakeNodes(gn->children, gn); if ((gn->flags & REMAKE) == 0) { gn->made = ABORTED; pgn->flags &= ~(unsigned)REMAKE; @@ -652,8 +647,7 @@ Compat_Make(GNode *gn, GNode *pgn) } cohorts: -Lst_ForEachUntil(gn->cohorts, CompatMake, pgn); -return 0; +MakeNodes(gn->cohorts, pgn); } /* Initialize this module and start making. Index: src/usr.bin/make/nonints.h diff -u src/usr.bin/make/nonints.h:1.130 src/usr.bin/make/nonints.h:1.131 --- src/usr.bin/make/nonints.h:1.130 Sat Sep 26 16:00:12 2020 +++ src/usr.bin/make/nonints.h Sat Sep 26 16:41:42 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: nonints.h,v 1.130 2020/09/26 16:00:12 rillig Exp $ */ +/* $NetBSD: nonints.h,v 1.131 2020/09/26 16:41:42 rillig Exp $ */ /*- * Copyright (c) 1988, 1989, 1990, 1993 @@ -87,7 +87,7 @@ Boolean Arch_IsLib(GNode *); /* compat.c */ int Compat_RunCommand(char *, GNode *); void Compat_Run(GNodeList *); -int Compat_Make(GNode *, GNode *); +void Compat_Make(GNode *, GNode *); /* cond.c */ CondEvalResult Cond_EvalCondition(const char *, Boolean *);
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Sep 26 16:27:27 UTC 2020 Modified Files: src/usr.bin/make: targ.c Log Message: make(1): clean up obsolete comments about TARG constants To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/usr.bin/make/targ.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/targ.c diff -u src/usr.bin/make/targ.c:1.97 src/usr.bin/make/targ.c:1.98 --- src/usr.bin/make/targ.c:1.97 Sat Sep 26 16:21:17 2020 +++ src/usr.bin/make/targ.c Sat Sep 26 16:27:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: targ.c,v 1.97 2020/09/26 16:21:17 rillig Exp $ */ +/* $NetBSD: targ.c,v 1.98 2020/09/26 16:27:27 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -85,9 +85,11 @@ * hash table, though all its fields are * initialized. * - * Targ_FindNode Find the node for a given target, creating - * and storing it if it doesn't exist and the - * flags are right (TARG_CREATE) + * Targ_FindNode Find the node, or return NULL. + * + * Targ_GetNode Find the node, or create it. + * + * Targ_NewInternalNode Create an internal node. * * Targ_FindList Given a list of names, find nodes for all * of them, creating them as necessary. @@ -119,7 +121,7 @@ #include "dir.h" /* "@(#)targ.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: targ.c,v 1.97 2020/09/26 16:21:17 rillig Exp $"); +MAKE_RCSID("$NetBSD: targ.c,v 1.98 2020/09/26 16:27:27 rillig Exp $"); static GNodeList *allTargets; /* the list of all targets found so far */ #ifdef CLEANUP @@ -286,19 +288,7 @@ GNode *Targ_GetEndNode(void) return endNode; } -/* Make a complete list of GNodes from the given list of names. - * If flags is TARG_CREATE, nodes will be created for all names in - * names which do not yet have graph nodes. If flags is TARG_NOCREATE, - * an error message will be printed for each name which can't be found. - * - * Input: - * name list of names to find - * flags flags used if no node is found for a given name - * - * Results: - * A complete list of graph nodes corresponding to all instances of all - * the names in names. - */ +/* Return the named nodes, creating them as necessary. */ GNodeList * Targ_FindList(StringList *names) {
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Sep 26 16:21:17 UTC 2020 Modified Files: src/usr.bin/make: targ.c Log Message: make(1): remove useless comment from TargFreeGN GNode.fname is a const char *, therefore it cannot be freed anyway. To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/usr.bin/make/targ.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/targ.c diff -u src/usr.bin/make/targ.c:1.96 src/usr.bin/make/targ.c:1.97 --- src/usr.bin/make/targ.c:1.96 Sat Sep 26 16:18:44 2020 +++ src/usr.bin/make/targ.c Sat Sep 26 16:21:17 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: targ.c,v 1.96 2020/09/26 16:18:44 rillig Exp $ */ +/* $NetBSD: targ.c,v 1.97 2020/09/26 16:21:17 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -119,7 +119,7 @@ #include "dir.h" /* "@(#)targ.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: targ.c,v 1.96 2020/09/26 16:18:44 rillig Exp $"); +MAKE_RCSID("$NetBSD: targ.c,v 1.97 2020/09/26 16:21:17 rillig Exp $"); static GNodeList *allTargets; /* the list of all targets found so far */ #ifdef CLEANUP @@ -230,7 +230,6 @@ TargFreeGN(void *gnp) Lst_Free(gn->commands); /* XXX: does gn->suffix need to be freed? It is reference-counted. */ -/* gn->fname points to name allocated when file was opened, don't free */ free(gn); } @@ -247,7 +246,6 @@ Targ_FindNode(const char *name) GNode * Targ_GetNode(const char *name) { - Boolean isNew; Hash_Entry *he = Hash_CreateEntry(, name, ); if (!isNew)
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Sep 26 16:18:44 UTC 2020 Modified Files: src/usr.bin/make: targ.c Log Message: make(1): inline Targ_FindNodeImpl The 3 callers of this function passed different flags, and these flags led to code paths that almost did not overlap. It's a bit strange that GCC 5 didn't get that, and even marking the function as inline did not produce much smaller code, even though the conditions inside that function were obviously constant. Clang 9 did a better job here. But even for human readers, inlining the function and then throwing away the dead code leads to much easier code. This pattern of squeezing completely different code into a single function has already occurred in a different part of make, though I don't remember where exactly. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/usr.bin/make/targ.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/targ.c diff -u src/usr.bin/make/targ.c:1.95 src/usr.bin/make/targ.c:1.96 --- src/usr.bin/make/targ.c:1.95 Sat Sep 26 16:00:12 2020 +++ src/usr.bin/make/targ.c Sat Sep 26 16:18:44 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: targ.c,v 1.95 2020/09/26 16:00:12 rillig Exp $ */ +/* $NetBSD: targ.c,v 1.96 2020/09/26 16:18:44 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -119,7 +119,7 @@ #include "dir.h" /* "@(#)targ.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: targ.c,v 1.95 2020/09/26 16:00:12 rillig Exp $"); +MAKE_RCSID("$NetBSD: targ.c,v 1.96 2020/09/26 16:18:44 rillig Exp $"); static GNodeList *allTargets; /* the list of all targets found so far */ #ifdef CLEANUP @@ -236,60 +236,28 @@ TargFreeGN(void *gnp) } #endif -#define TARG_NOCREATE 0x00 /* don't create it */ -#define TARG_CREATE 0x01 /* create node if not found */ -#define TARG_NOHASH 0x02 /* don't look in/add to hash table */ - -/* Find a node in the list using the given name for matching. - * If the node is created, it is added to the .ALLTARGETS list. - * - * Input: - * name the name to find - * flags flags governing events when target not found - * - * Results: - * The node in the list if it was. If it wasn't, return NULL if - * flags was TARG_NOCREATE or the newly created and initialized node - * if it was TARG_CREATE - */ -static GNode * -Targ_FindNodeImpl(const char *name, int flags) -{ -GNode *gn; /* node in that element */ -Hash_Entry *he; /* New or used hash entry for node */ - -if (!(flags & TARG_CREATE) && !(flags & TARG_NOHASH)) - return Hash_FindValue(, name); - -if (!(flags & TARG_NOHASH)) { - Boolean isNew; - he = Hash_CreateEntry(, name, ); - if (!isNew) - return Hash_GetValue(he); -} - -gn = Targ_NewGN(name); -if (!(flags & TARG_NOHASH)) - Hash_SetValue(he, gn); -Var_Append(".ALLTARGETS", name, VAR_GLOBAL); -Lst_Append(allTargets, gn); -if (doing_depend) - gn->flags |= FROM_DEPEND; -return gn; -} - /* Get the existing global node, or return NULL. */ GNode * Targ_FindNode(const char *name) { -return Targ_FindNodeImpl(name, TARG_NOCREATE); +return Hash_FindValue(, name); } /* Get the existing global node, or create it. */ GNode * Targ_GetNode(const char *name) { -return Targ_FindNodeImpl(name, TARG_CREATE); + +Boolean isNew; +Hash_Entry *he = Hash_CreateEntry(, name, ); +if (!isNew) + return Hash_GetValue(he); + +{ + GNode *gn = Targ_NewInternalNode(name); + Hash_SetValue(he, gn); + return gn; +} } /* Create a node, register it in .ALLTARGETS but don't store it in the @@ -299,7 +267,12 @@ Targ_GetNode(const char *name) GNode * Targ_NewInternalNode(const char *name) { -return Targ_FindNodeImpl(name, TARG_NOHASH); +GNode *gn = Targ_NewGN(name); +Var_Append(".ALLTARGETS", name, VAR_GLOBAL); +Lst_Append(allTargets, gn); +if (doing_depend) + gn->flags |= FROM_DEPEND; +return gn; } /* Return the .END node, which contains the commands to be executed when @@ -338,8 +311,8 @@ Targ_FindList(StringList *names) Lst_Open(names); while ((ln = Lst_Next(names)) != NULL) { - char *name = LstNode_Datum(ln); - GNode *gn = Targ_GetNode(name); + char *name = LstNode_Datum(ln); + GNode *gn = Targ_GetNode(name); Lst_Append(nodes, gn); } Lst_Close(names); @@ -439,22 +412,22 @@ Targ_PrintType(int type) type &= ~tbit; switch(tbit) { - PRINTBIT(OPTIONAL); - PRINTBIT(USE); - PRINTBIT(EXEC); - PRINTBIT(IGNORE); - PRINTBIT(PRECIOUS); - PRINTBIT(SILENT); - PRINTBIT(MAKE); - PRINTBIT(JOIN); - PRINTBIT(INVISIBLE); - PRINTBIT(NOTMAIN); - PRINTDBIT(LIB); + PRINTBIT(OPTIONAL); + PRINTBIT(USE); + PRINTBIT(EXEC); + PRINTBIT(IGNORE); + PRINTBIT(PRECIOUS); + PRINTBIT(SILENT); + PRINTBIT(MAKE); + PRINTBIT(JOIN); + PRINTBIT(INVISIBLE); + PRINTBIT(NOTMAIN); + PRINTDBIT(LIB); /*XXX: MEMBER is
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Sep 26 16:00:12 UTC 2020 Modified Files: src/usr.bin/make: arch.c compat.c cond.c job.c main.c make.c make.h nonints.h parse.c suff.c targ.c var.c Log Message: make(1): clean up API for finding and creating GNodes The previous API had complicated rules for the cases in which the single function returned NULL or what it did. The flags for that function were confusing since passing TARG_NOHASH would create a new node even though TARG_CREATE was not included in that bit mask. Splitting the function into 3 separate functions avoids this confusion. It also reveals several places where the complicated API led to unreachable code. Such code has been removed. To generate a diff of this commit: cvs rdiff -u -r1.122 -r1.123 src/usr.bin/make/arch.c cvs rdiff -u -r1.150 -r1.151 src/usr.bin/make/compat.c cvs rdiff -u -r1.151 -r1.152 src/usr.bin/make/cond.c cvs rdiff -u -r1.238 -r1.239 src/usr.bin/make/job.c cvs rdiff -u -r1.345 -r1.346 src/usr.bin/make/main.c cvs rdiff -u -r1.144 -r1.145 src/usr.bin/make/make.c cvs rdiff -u -r1.146 -r1.147 src/usr.bin/make/make.h cvs rdiff -u -r1.129 -r1.130 src/usr.bin/make/nonints.h cvs rdiff -u -r1.331 -r1.332 src/usr.bin/make/parse.c cvs rdiff -u -r1.167 -r1.168 src/usr.bin/make/suff.c cvs rdiff -u -r1.94 -r1.95 src/usr.bin/make/targ.c cvs rdiff -u -r1.542 -r1.543 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/arch.c diff -u src/usr.bin/make/arch.c:1.122 src/usr.bin/make/arch.c:1.123 --- src/usr.bin/make/arch.c:1.122 Sat Sep 26 14:48:31 2020 +++ src/usr.bin/make/arch.c Sat Sep 26 16:00:12 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.122 2020/09/26 14:48:31 rillig Exp $ */ +/* $NetBSD: arch.c,v 1.123 2020/09/26 16:00:12 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -133,7 +133,7 @@ #include"config.h" /* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: arch.c,v 1.122 2020/09/26 14:48:31 rillig Exp $"); +MAKE_RCSID("$NetBSD: arch.c,v 1.123 2020/09/26 16:00:12 rillig Exp $"); #ifdef TARGET_MACHINE #undef MAKE_MACHINE @@ -345,15 +345,10 @@ Arch_ParseArchive(char **linePtr, GNodeL * Just create an ARCHV node for the thing and let * SuffExpandChildren handle it... */ - gn = Targ_FindNode(buf, TARG_CREATE); + gn = Targ_GetNode(buf); + gn->type |= OP_ARCHV; + Lst_Append(nodeLst, gn); - if (gn == NULL) { - free(buf); - return FALSE; - } else { - gn->type |= OP_ARCHV; - Lst_Append(nodeLst, gn); - } } else if (!Arch_ParseArchive(, nodeLst, ctxt)) { /* * Error in nested call -- free buffer and return FALSE @@ -375,12 +370,9 @@ Arch_ParseArchive(char **linePtr, GNodeL char *fullname = str_concat4(libName, "(", member, ")"); free(member); - gn = Targ_FindNode(fullname, TARG_CREATE); + gn = Targ_GetNode(fullname); free(fullname); - if (gn == NULL) - return FALSE; - /* * We've found the node, but have to make sure the rest of * the world knows it's an archive member, without having @@ -394,12 +386,9 @@ Arch_ParseArchive(char **linePtr, GNodeL Lst_Free(members); } else { char *fullname = str_concat4(libName, "(", memName, ")"); - gn = Targ_FindNode(fullname, TARG_CREATE); + gn = Targ_GetNode(fullname); free(fullname); - if (gn == NULL) - return FALSE; - /* * We've found the node, but have to make sure the rest of the * world knows it's an archive member, without having to Index: src/usr.bin/make/compat.c diff -u src/usr.bin/make/compat.c:1.150 src/usr.bin/make/compat.c:1.151 --- src/usr.bin/make/compat.c:1.150 Thu Sep 24 07:11:29 2020 +++ src/usr.bin/make/compat.c Sat Sep 26 16:00:12 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.150 2020/09/24 07:11:29 rillig Exp $ */ +/* $NetBSD: compat.c,v 1.151 2020/09/26 16:00:12 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -99,7 +99,7 @@ #include"pathnames.h" /* "@(#)compat.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: compat.c,v 1.150 2020/09/24 07:11:29 rillig Exp $"); +MAKE_RCSID("$NetBSD: compat.c,v 1.151 2020/09/26 16:00:12 rillig Exp $"); static GNode *curTarg = NULL; static void CompatInterrupt(int); @@ -145,7 +145,7 @@ CompatInterrupt(int signo) * Run .INTERRUPT only if hit with interrupt signal */ if (signo == SIGINT) { - gn = Targ_FindNode(".INTERRUPT", TARG_NOCREATE); + gn = Targ_FindNode(".INTERRUPT"); if (gn != NULL) { Compat_Make(gn, gn); } @@ -692,7 +692,7 @@ Compat_Run(GNodeList *targs) * to it. */ if (!queryFlag) { - gn = Targ_FindNode(".BEGIN", TARG_NOCREATE); + gn = Targ_FindNode(".BEGIN"); if (gn != NULL) { Compat_Make(gn, gn); if (gn->made == ERROR) { Index: src/usr.bin/make/cond.c diff -u
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: rillig Date: Sat Sep 26 15:41:53 UTC 2020 Modified Files: src/usr.bin/make/unit-tests: dep-double-colon.mk Log Message: make(1): add test for '::' dependency operator with .ALLTARGETS To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/unit-tests/dep-double-colon.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/unit-tests/dep-double-colon.mk diff -u src/usr.bin/make/unit-tests/dep-double-colon.mk:1.3 src/usr.bin/make/unit-tests/dep-double-colon.mk:1.4 --- src/usr.bin/make/unit-tests/dep-double-colon.mk:1.3 Sat Aug 22 12:42:32 2020 +++ src/usr.bin/make/unit-tests/dep-double-colon.mk Sat Sep 26 15:41:53 2020 @@ -1,4 +1,4 @@ -# $NetBSD: dep-double-colon.mk,v 1.3 2020/08/22 12:42:32 rillig Exp $ +# $NetBSD: dep-double-colon.mk,v 1.4 2020/09/26 15:41:53 rillig Exp $ # # Tests for the :: operator in dependency declarations. @@ -9,3 +9,12 @@ all:: all:: @echo 'command 2a' @echo 'command 2b' + +# When there are multiple command groups for a '::' target, each of these +# groups is added separately to the .ALLTARGETS variable. +# +# XXX: What is this good for? +# XXX: Where does the leading space come from? +.if ${.ALLTARGETS} != " all all" +. error +.endif
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Sep 26 14:59:21 UTC 2020 Modified Files: src/usr.bin/make: targ.c Log Message: make(1): replace Hash_FindEntry with Hash_FindValue in Targ_FindNode To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/usr.bin/make/targ.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/targ.c diff -u src/usr.bin/make/targ.c:1.93 src/usr.bin/make/targ.c:1.94 --- src/usr.bin/make/targ.c:1.93 Thu Sep 24 07:59:33 2020 +++ src/usr.bin/make/targ.c Sat Sep 26 14:59:21 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: targ.c,v 1.93 2020/09/24 07:59:33 rillig Exp $ */ +/* $NetBSD: targ.c,v 1.94 2020/09/26 14:59:21 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -122,7 +122,7 @@ #include "dir.h" /* "@(#)targ.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: targ.c,v 1.93 2020/09/24 07:59:33 rillig Exp $"); +MAKE_RCSID("$NetBSD: targ.c,v 1.94 2020/09/26 14:59:21 rillig Exp $"); static GNodeList *allTargets; /* the list of all targets found so far */ #ifdef CLEANUP @@ -255,22 +255,17 @@ TargFreeGN(void *gnp) GNode * Targ_FindNode(const char *name, int flags) { -GNode *gn; /* node in that element */ -Hash_Entry *he = NULL; /* New or used hash entry for node */ -Boolean isNew; /* Set TRUE if Hash_CreateEntry had to create */ - /* an entry for the node */ - -if (!(flags & (TARG_CREATE | TARG_NOHASH))) { - he = Hash_FindEntry(, name); - if (he == NULL) - return NULL; - return (GNode *)Hash_GetValue(he); -} +GNode *gn; /* node in that element */ +Hash_Entry *he; /* New or used hash entry for node */ + +if (!(flags & TARG_CREATE) && !(flags & TARG_NOHASH)) + return Hash_FindValue(, name); if (!(flags & TARG_NOHASH)) { + Boolean isNew; he = Hash_CreateEntry(, name, ); if (!isNew) - return (GNode *)Hash_GetValue(he); + return Hash_GetValue(he); } gn = Targ_NewGN(name);
CVS commit: src/usr.bin/make
Module Name:src Committed By: rillig Date: Sat Sep 26 14:48:31 UTC 2020 Modified Files: src/usr.bin/make: arch.c hash.c hash.h var.c Log Message: make(1): add Hash_FindValue, for direct access to hash table data To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/usr.bin/make/arch.c cvs rdiff -u -r1.32 -r1.33 src/usr.bin/make/hash.c cvs rdiff -u -r1.23 -r1.24 src/usr.bin/make/hash.h cvs rdiff -u -r1.541 -r1.542 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/arch.c diff -u src/usr.bin/make/arch.c:1.121 src/usr.bin/make/arch.c:1.122 --- src/usr.bin/make/arch.c:1.121 Fri Sep 25 14:49:51 2020 +++ src/usr.bin/make/arch.c Sat Sep 26 14:48:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.121 2020/09/25 14:49:51 rillig Exp $ */ +/* $NetBSD: arch.c,v 1.122 2020/09/26 14:48:31 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -133,7 +133,7 @@ #include"config.h" /* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: arch.c,v 1.121 2020/09/25 14:49:51 rillig Exp $"); +MAKE_RCSID("$NetBSD: arch.c,v 1.122 2020/09/26 14:48:31 rillig Exp $"); #ifdef TARGET_MACHINE #undef MAKE_MACHINE @@ -466,7 +466,6 @@ ArchStatMember(const char *archive, cons char magic[SARMAG]; ArchListNode *ln; Arch *ar; /* Archive descriptor */ -Hash_Entry *he; /* Entry containing member's description */ struct ar_hdr arh;/* archive-member header for reading archive */ char memName[MAXPATHLEN+1]; /* Current member name while hashing. */ @@ -489,13 +488,14 @@ ArchStatMember(const char *archive, cons } if (ln != NULL) { - ar = LstNode_Datum(ln); + struct ar_hdr *hdr; - he = Hash_FindEntry(>members, member); + ar = LstNode_Datum(ln); + hdr = Hash_FindValue(>members, member); + if (hdr != NULL) + return hdr; - if (he != NULL) { - return (struct ar_hdr *)Hash_GetValue(he); - } else { + { /* Try truncated name */ char copy[AR_MAX_NAME_LEN+1]; size_t len = strlen(member); @@ -504,9 +504,8 @@ ArchStatMember(const char *archive, cons len = AR_MAX_NAME_LEN; snprintf(copy, sizeof copy, "%s", member); } - if ((he = Hash_FindEntry(>members, copy)) != NULL) - return (struct ar_hdr *)Hash_GetValue(he); - return NULL; + hdr = Hash_FindValue(>members, copy); + return hdr; } } @@ -628,9 +627,12 @@ ArchStatMember(const char *archive, cons } #endif - he = Hash_CreateEntry(>members, memName, NULL); - Hash_SetValue(he, bmake_malloc(sizeof(struct ar_hdr))); - memcpy(Hash_GetValue(he), , sizeof(struct ar_hdr)); + { + Hash_Entry *he; + he = Hash_CreateEntry(>members, memName, NULL); + Hash_SetValue(he, bmake_malloc(sizeof(struct ar_hdr))); + memcpy(Hash_GetValue(he), , sizeof(struct ar_hdr)); + } } if (fseek(arch, ((long)size + 1) & ~1, SEEK_CUR) != 0) goto badarch; @@ -644,13 +646,7 @@ ArchStatMember(const char *archive, cons * Now that the archive has been read and cached, we can look into * the hash table to find the desired member's header. */ -he = Hash_FindEntry(>members, member); - -if (he != NULL) { - return (struct ar_hdr *)Hash_GetValue(he); -} else { - return NULL; -} +return Hash_FindValue(>members, member); badarch: fclose(arch); Index: src/usr.bin/make/hash.c diff -u src/usr.bin/make/hash.c:1.32 src/usr.bin/make/hash.c:1.33 --- src/usr.bin/make/hash.c:1.32 Sun Sep 13 15:15:51 2020 +++ src/usr.bin/make/hash.c Sat Sep 26 14:48:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: hash.c,v 1.32 2020/09/13 15:15:51 rillig Exp $ */ +/* $NetBSD: hash.c,v 1.33 2020/09/26 14:48:31 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -79,7 +79,7 @@ #include "make.h" /* "@(#)hash.c 8.1 (Berkeley) 6/6/93" */ -MAKE_RCSID("$NetBSD: hash.c,v 1.32 2020/09/13 15:15:51 rillig Exp $"); +MAKE_RCSID("$NetBSD: hash.c,v 1.33 2020/09/26 14:48:31 rillig Exp $"); /* * Forward references to local procedures that are used before they're @@ -188,6 +188,13 @@ Hash_FindEntry(Hash_Table *t, const char return e; } +void * +Hash_FindValue(Hash_Table *t, const char *key) +{ +Hash_Entry *he = Hash_FindEntry(t, key); +return he != NULL ? he->value : NULL; +} + /* Searches the hash table for an entry corresponding to the key. * If no entry is found, then one is created. * Index: src/usr.bin/make/hash.h diff -u src/usr.bin/make/hash.h:1.23 src/usr.bin/make/hash.h:1.24 --- src/usr.bin/make/hash.h:1.23 Sun Sep 13 15:27:25 2020 +++ src/usr.bin/make/hash.h Sat Sep 26 14:48:31 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: hash.h,v 1.23 2020/09/13 15:27:25 rillig Exp $ */ +/* $NetBSD: hash.h,v 1.24 2020/09/26 14:48:31 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of
CVS commit: src/sys/arch/evbarm/include
Module Name:src Committed By: skrll Date: Sat Sep 26 14:18:06 UTC 2020 Modified Files: src/sys/arch/evbarm/include: loadfile_machdep.h Log Message: RCSId police To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/include/loadfile_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/include/loadfile_machdep.h diff -u src/sys/arch/evbarm/include/loadfile_machdep.h:1.7 src/sys/arch/evbarm/include/loadfile_machdep.h:1.8 --- src/sys/arch/evbarm/include/loadfile_machdep.h:1.7 Sat Mar 30 12:45:50 2019 +++ src/sys/arch/evbarm/include/loadfile_machdep.h Sat Sep 26 14:18:06 2020 @@ -1,3 +1,4 @@ +/* $NetBSD: loadfile_machdep.h,v 1.8 2020/09/26 14:18:06 skrll Exp $ */ #if defined(__aarch64__) #define BOOT_ELF64
CVS commit: src/sys
Module Name:src Committed By: skrll Date: Sat Sep 26 12:58:23 UTC 2020 Modified Files: src/sys/arch/arm/include: cpufunc.h src/sys/external/bsd/vchiq/dist/interface/compat: vchi_bsd.h src/sys/external/bsd/vchiq/dist/interface/vchiq_arm: vchiq_2835_arm.c vchiq_core.c vchiq_core.h vchiq_kmod_netbsd.c Log Message: Define isb(), dsb(option), and dmb(option) Catch up with vchiq upstream to allow this. To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.83 src/sys/arch/arm/include/cpufunc.h cvs rdiff -u -r1.16 -r1.17 \ src/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h cvs rdiff -u -r1.21 -r1.22 \ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_2835_arm.c cvs rdiff -u -r1.14 -r1.15 \ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.c cvs rdiff -u -r1.5 -r1.6 \ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.h cvs rdiff -u -r1.11 -r1.12 \ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_kmod_netbsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/cpufunc.h diff -u src/sys/arch/arm/include/cpufunc.h:1.82 src/sys/arch/arm/include/cpufunc.h:1.83 --- src/sys/arch/arm/include/cpufunc.h:1.82 Tue Dec 11 19:38:42 2018 +++ src/sys/arch/arm/include/cpufunc.h Sat Sep 26 12:58:22 2020 @@ -42,6 +42,26 @@ #ifndef _ARM_CPUFUNC_H_ #define _ARM_CPUFUNC_H_ +#define isb() __asm __volatile("isb" : : : "memory") + +/* + * Options for DMB and DSB: + * oshld Outer Shareable, load + * oshst Outer Shareable, store + * osh Outer Shareable, all + * nshld Non-shareable, load + * nshst Non-shareable, store + * nsh Non-shareable, all + * ishld Inner Shareable, load + * ishst Inner Shareable, store + * ish Inner Shareable, all + * ld Full system, load + * st Full system, store + * sy Full system, all + */ +#define dsb(opt) __asm __volatile("dsb " __STRING(opt) : : : "memory") +#define dmb(opt) __asm __volatile("dmb " __STRING(opt) : : : "memory") + #ifdef __arm__ #ifdef _KERNEL Index: src/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h diff -u src/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h:1.16 src/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h:1.17 --- src/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h:1.16 Sat Sep 26 10:56:37 2020 +++ src/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h Sat Sep 26 12:58:22 2020 @@ -302,8 +302,6 @@ typedef off_t loff_t; #define BCM2835_MBOX_CHAN_VCHIQ 3 #define bcm_mbox_write bcmmbox_write -#define dsb membar_producer - #define device_print_prettyname(dev) device_printf((dev), "") #endif /* __VCHI_NETBSD_H__ */ Index: src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_2835_arm.c diff -u src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_2835_arm.c:1.21 src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_2835_arm.c:1.22 --- src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_2835_arm.c:1.21 Wed Jan 22 19:15:49 2020 +++ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_2835_arm.c Sat Sep 26 12:58:23 2020 @@ -181,7 +181,7 @@ vchiq_platform_init(VCHIQ_STATE_T *state } /* Send the base address of the slots to VideoCore */ - dsb(); /* Ensure all writes have completed */ + dsb(sy); /* Ensure all writes have completed */ bus_dmamap_sync(dma_tag, dma_map, 0, slot_mem_size, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); Index: src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.c diff -u src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.c:1.14 src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.c:1.15 --- src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.c:1.14 Wed Jan 22 19:15:49 2020 +++ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.c Sat Sep 26 12:58:23 2020 @@ -439,7 +439,7 @@ remote_event_wait(VCHIQ_STATE_T *state, { if (!event->fired) { event->armed = 1; - dsb(); + dsb(sy); if (!event->fired) { if (down_interruptible( (struct semaphore *) Index: src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.h diff -u src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.h:1.5 src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.h:1.6 --- src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.h:1.5 Wed Jan 22 19:15:49 2020 +++ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_core.h Sat Sep 26 12:58:23 2020 @@ -185,11 +185,11 @@ enum { #define DEBUG_INITIALISE(local) int *debug_ptr = (local)->debug; #define DEBUG_TRACE(d) \ - do { debug_ptr[DEBUG_ ## d] = __LINE__; dsb(); } while (0) + do { debug_ptr[DEBUG_ ## d] = __LINE__; dsb(sy); } while (0) #define DEBUG_VALUE(d, v) \ - do { debug_ptr[DEBUG_ ## d] = (v); dsb(); } while (0) + do { debug_ptr[DEBUG_ ## d] = (v); dsb(sy); } while (0) #define DEBUG_COUNT(d) \ - do {
CVS commit: src/sys/net
Module Name:src Committed By: roy Date: Sat Sep 26 11:57:05 UTC 2020 Modified Files: src/sys/net: if.c if.h Log Message: net: Fix the setting of if_link_state Link state changes are not dependant on the interface being up, but we also need to guard against more link state changes being scheduled when the interface is being detached. We do this by clearing the link queue but keeping if_link_sheduled = true. We can check for this in both if_link_state_change() and if_link_state_change_work() to abort early as there is no point in doing anything if the interface is being detached because if_down() is called in if_detach() after the workqueue has been drained to the same overall effect. To generate a diff of this commit: cvs rdiff -u -r1.479 -r1.480 src/sys/net/if.c cvs rdiff -u -r1.285 -r1.286 src/sys/net/if.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/net/if.c diff -u src/sys/net/if.c:1.479 src/sys/net/if.c:1.480 --- src/sys/net/if.c:1.479 Thu Jul 16 15:02:08 2020 +++ src/sys/net/if.c Sat Sep 26 11:57:05 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.479 2020/07/16 15:02:08 msaitoh Exp $ */ +/* $NetBSD: if.c,v 1.480 2020/09/26 11:57:05 roy Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.479 2020/07/16 15:02:08 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.480 2020/09/26 11:57:05 roy Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -166,6 +166,20 @@ MALLOC_DEFINE(M_IFADDR, "ifaddr", "inter MALLOC_DEFINE(M_IFMADDR, "ether_multi", "link-level multicast address"); /* + * XXX reusing (ifp)->if_snd->ifq_lock rather than having another spin mutex + * for each ifnet. It doesn't matter because: + * - if IFEF_MPSAFE is enabled, if_snd isn't used and lock contentions on + * ifq_lock don't happen + * - if IFEF_MPSAFE is disabled, there is no lock contention on ifq_lock + * because if_snd, if_link_state_change and if_link_state_change_process + * are all called with KERNEL_LOCK + */ +#define IF_LINK_STATE_CHANGE_LOCK(ifp) \ + mutex_enter((ifp)->if_snd.ifq_lock) +#define IF_LINK_STATE_CHANGE_UNLOCK(ifp) \ + mutex_exit((ifp)->if_snd.ifq_lock) + +/* * Global list of interfaces. */ /* DEPRECATED. Remove it once kvm(3) users disappeared */ @@ -703,6 +717,7 @@ if_initialize(ifnet_t *ifp) ifp->if_link_state = LINK_STATE_UNKNOWN; ifp->if_link_queue = -1; /* all bits set, see link_state_change() */ + ifp->if_link_scheduled = false; ifp->if_capenable = 0; ifp->if_csum_flags_tx = 0; @@ -1317,7 +1332,22 @@ if_detach(struct ifnet *ifp) s = splnet(); sysctl_teardown(>if_sysctl_log); + IFNET_LOCK(ifp); + + /* + * Unset all queued link states and pretend a + * link state change is scheduled. + * This stops any more link state changes occuring for this + * interface while it's being detached so it's safe + * to drain the workqueue. + */ + IF_LINK_STATE_CHANGE_LOCK(ifp); + ifp->if_link_queue = -1; /* all bits set, see link_state_change() */ + ifp->if_link_scheduled = true; + IF_LINK_STATE_CHANGE_UNLOCK(ifp); + workqueue_wait(ifnet_link_state_wq, >if_link_work); + if_deactivate(ifp); IFNET_UNLOCK(ifp); @@ -2237,30 +2267,6 @@ link_rtrequest(int cmd, struct rtentry * } /* - * XXX reusing (ifp)->if_snd->ifq_lock rather than having another spin mutex - * for each ifnet. It doesn't matter because: - * - if IFEF_MPSAFE is enabled, if_snd isn't used and lock contentions on - * ifq_lock don't happen - * - if IFEF_MPSAFE is disabled, there is no lock contention on ifq_lock - * because if_snd, if_link_state_change and if_link_state_change_process - * are all called with KERNEL_LOCK - */ -#define IF_LINK_STATE_CHANGE_LOCK(ifp) \ - mutex_enter((ifp)->if_snd.ifq_lock) -#define IF_LINK_STATE_CHANGE_UNLOCK(ifp) \ - mutex_exit((ifp)->if_snd.ifq_lock) - -static void -if_link_state_change_work_schedule(struct ifnet *ifp) -{ - if (ifp->if_link_cansched && !ifp->if_link_scheduled) { - ifp->if_link_scheduled = true; - workqueue_enqueue(ifnet_link_state_wq, >if_link_work, - NULL); - } -} - -/* * Handle a change in the interface link state and * queue notifications. */ @@ -2292,14 +2298,22 @@ if_link_state_change(struct ifnet *ifp, /* Find the last unset event in the queue. */ LQ_FIND_UNSET(ifp->if_link_queue, idx); - /* - * Ensure link_state doesn't match the last event in the queue. - * ifp->if_link_state is not checked and set here because - * that would present an inconsistent picture to the system. - */ - if (idx != 0 && - LQ_ITEM(ifp->if_link_queue, idx - 1) == (uint8_t)link_state) - goto out; + if (idx == 0) { + /* + * There is no queue of link state changes. + * As we have the lock we can safely compare against the + * current link state and return if the same. + * Otherwise, if scheduled is true
CVS commit: src/external/gpl2/grep/dist/lib
Module Name:src Committed By: mlelstv Date: Sat Sep 26 11:39:17 UTC 2020 Modified Files: src/external/gpl2/grep/dist/lib: regex.c Log Message: Moving pointers could fail if realloc() allocates a new memory region where the difference between old and new address exceeds an int. Use ptrdiff_t for calculations instead. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/grep/dist/lib/regex.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/gpl2/grep/dist/lib/regex.c diff -u src/external/gpl2/grep/dist/lib/regex.c:1.2 src/external/gpl2/grep/dist/lib/regex.c:1.3 --- src/external/gpl2/grep/dist/lib/regex.c:1.2 Sun Jan 10 22:16:40 2016 +++ src/external/gpl2/grep/dist/lib/regex.c Sat Sep 26 11:39:17 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: regex.c,v 1.2 2016/01/10 22:16:40 christos Exp $ */ +/* $NetBSD: regex.c,v 1.3 2020/09/26 11:39:17 mlelstv Exp $ */ /* Extended regular expression matching and search library, version 0.12. @@ -2047,7 +2047,7 @@ static reg_errcode_t compile_range _RE_A /* If the buffer moved, move all the pointers into it. */ \ if (old_buffer != COMPILED_BUFFER_VAR)\ { \ - int incr = COMPILED_BUFFER_VAR - old_buffer; \ + ptrdiff_t incr = COMPILED_BUFFER_VAR - old_buffer; \ MOVE_BUFFER_POINTER (b); \ MOVE_BUFFER_POINTER (begalt); \ if (fixup_alt_jump) \ @@ -2075,7 +2075,7 @@ static reg_errcode_t compile_range _RE_A /* If the buffer moved, move all the pointers into it. */ \ if (old_buffer != COMPILED_BUFFER_VAR)\ { \ - int incr = COMPILED_BUFFER_VAR - old_buffer; \ + ptrdiff_t incr = COMPILED_BUFFER_VAR - old_buffer; \ MOVE_BUFFER_POINTER (b); \ MOVE_BUFFER_POINTER (begalt); \ if (fixup_alt_jump) \
CVS commit: src/sys/external/bsd/vchiq/dist/interface/compat
Module Name:src Committed By: skrll Date: Sat Sep 26 10:56:37 UTC 2020 Modified Files: src/sys/external/bsd/vchiq/dist/interface/compat: vchi_bsd.h Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 \ src/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.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/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h diff -u src/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h:1.15 src/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h:1.16 --- src/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h:1.15 Tue Aug 28 09:25:21 2018 +++ src/sys/external/bsd/vchiq/dist/interface/compat/vchi_bsd.h Sat Sep 26 10:56:37 2020 @@ -293,7 +293,7 @@ int fatal_signal_pending(VCHIQ_THREAD_T) #define __user #define current curlwp -#define EXPORT_SYMBOL(x) +#define EXPORT_SYMBOL(x) #define PAGE_ALIGN(addr) round_page(addr) typedef void irqreturn_t;
CVS commit: src
Module Name:src Committed By: skrll Date: Sat Sep 26 10:06:27 UTC 2020 Modified Files: src/distrib/sets/lists/comp: ad.aarch64 ad.arm src/sys/arch/arm/cortex: gic.c src/sys/arch/arm/gemini: gemini_icu.c src/sys/arch/arm/include: Makefile src/sys/arch/arm/omap: omap2_icu.c omapl1x_aintc.c src/sys/arch/arm/ti: ti_omapintc.c Removed Files: src/sys/arch/acorn32/include: atomic.h src/sys/arch/amigappc/include: atomic.h src/sys/arch/arm/include: atomic.h src/sys/arch/cats/include: atomic.h src/sys/arch/epoc32/include: atomic.h src/sys/arch/evbarm/include: atomic.h src/sys/arch/hpcarm/include: atomic.h src/sys/arch/iyonix/include: atomic.h src/sys/arch/netwinder/include: atomic.h src/sys/arch/shark/include: atomic.h src/sys/arch/zaurus/include: atomic.h Log Message: G/C arm/atomic.h To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/distrib/sets/lists/comp/ad.aarch64 cvs rdiff -u -r1.103 -r1.104 src/distrib/sets/lists/comp/ad.arm cvs rdiff -u -r1.1 -r0 src/sys/arch/acorn32/include/atomic.h cvs rdiff -u -r1.1 -r0 src/sys/arch/amigappc/include/atomic.h cvs rdiff -u -r1.41 -r1.42 src/sys/arch/arm/cortex/gic.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/gemini/gemini_icu.c cvs rdiff -u -r1.51 -r1.52 src/sys/arch/arm/include/Makefile cvs rdiff -u -r1.11 -r0 src/sys/arch/arm/include/atomic.h cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/omap/omap2_icu.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/omap/omapl1x_aintc.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/ti/ti_omapintc.c cvs rdiff -u -r1.1 -r0 src/sys/arch/cats/include/atomic.h cvs rdiff -u -r1.1 -r0 src/sys/arch/epoc32/include/atomic.h cvs rdiff -u -r1.2 -r0 src/sys/arch/evbarm/include/atomic.h cvs rdiff -u -r1.1 -r0 src/sys/arch/hpcarm/include/atomic.h cvs rdiff -u -r1.2 -r0 src/sys/arch/iyonix/include/atomic.h cvs rdiff -u -r1.1 -r0 src/sys/arch/netwinder/include/atomic.h cvs rdiff -u -r1.1 -r0 src/sys/arch/shark/include/atomic.h cvs rdiff -u -r1.1 -r0 src/sys/arch/zaurus/include/atomic.h 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/comp/ad.aarch64 diff -u src/distrib/sets/lists/comp/ad.aarch64:1.43 src/distrib/sets/lists/comp/ad.aarch64:1.44 --- src/distrib/sets/lists/comp/ad.aarch64:1.43 Sun Sep 6 10:54:26 2020 +++ src/distrib/sets/lists/comp/ad.aarch64 Sat Sep 26 10:06:25 2020 @@ -1,4 +1,4 @@ -# $NetBSD: ad.aarch64,v 1.43 2020/09/06 10:54:26 mrg Exp $ +# $NetBSD: ad.aarch64,v 1.44 2020/09/26 10:06:25 skrll Exp $ ./usr/include/aarch64comp-c-include ./usr/include/aarch64/ansi.h comp-c-include ./usr/include/aarch64/aout_machdep.h comp-c-include @@ -67,7 +67,7 @@ ./usr/include/arm/arm32/vmparam.h comp-c-include ./usr/include/arm/armreg.h comp-c-include ./usr/include/arm/asm.hcomp-c-include -./usr/include/arm/atomic.h comp-c-include +./usr/include/arm/atomic.h comp-c-include obsolete ./usr/include/arm/bswap.h comp-c-include ./usr/include/arm/byte_swap.h comp-c-include ./usr/include/arm/cdefs.h comp-c-include Index: src/distrib/sets/lists/comp/ad.arm diff -u src/distrib/sets/lists/comp/ad.arm:1.103 src/distrib/sets/lists/comp/ad.arm:1.104 --- src/distrib/sets/lists/comp/ad.arm:1.103 Sun Sep 6 10:54:26 2020 +++ src/distrib/sets/lists/comp/ad.arm Sat Sep 26 10:06:25 2020 @@ -1,4 +1,4 @@ -# $NetBSD: ad.arm,v 1.103 2020/09/06 10:54:26 mrg Exp $ +# $NetBSD: ad.arm,v 1.104 2020/09/26 10:06:25 skrll Exp $ ./usr/bin/elf2aoutcomp-sysutil-bin ./usr/include/acorn26comp-obsolete obsolete ./usr/include/acorn26/ansi.h comp-obsolete obsolete @@ -127,7 +127,7 @@ ./usr/include/arm/arm32/vmparam.h comp-c-include ./usr/include/arm/armreg.h comp-c-include ./usr/include/arm/asm.hcomp-c-include -./usr/include/arm/atomic.h comp-c-include +./usr/include/arm/atomic.h comp-c-include obsolete ./usr/include/arm/bswap.h comp-c-include ./usr/include/arm/bus.hcomp-obsolete obsolete ./usr/include/arm/byte_swap.h comp-c-include Index: src/sys/arch/arm/cortex/gic.c diff -u src/sys/arch/arm/cortex/gic.c:1.41 src/sys/arch/arm/cortex/gic.c:1.42 --- src/sys/arch/arm/cortex/gic.c:1.41 Mon Jul 27 18:36:23 2020 +++ src/sys/arch/arm/cortex/gic.c Sat Sep 26 10:06:25 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: gic.c,v 1.41 2020/07/27 18:36:23 jmcneill Exp $ */ +/* $NetBSD: gic.c,v 1.42 2020/09/26 10:06:25 skrll Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -34,7 +34,7 @@ #define _INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.41 2020/07/27 18:36:23 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.42 2020/09/26 10:06:25 skrll Exp $"); #include #include @@ -46,7 +46,6 @@ __KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.41 #include #include -#include #include #include Index:
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: simonb Date: Sat Sep 26 08:21:27 UTC 2020 Modified Files: src/sys/arch/mips/mips: lock_stubs_llsc.S lock_stubs_ras.S Log Message: Expose the atomicvec vectors via EXPORT_OBJECT so ksyms(4) address lookups can find them. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/mips/mips/lock_stubs_llsc.S cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/mips/lock_stubs_ras.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/lock_stubs_llsc.S diff -u src/sys/arch/mips/mips/lock_stubs_llsc.S:1.12 src/sys/arch/mips/mips/lock_stubs_llsc.S:1.13 --- src/sys/arch/mips/mips/lock_stubs_llsc.S:1.12 Sun Aug 9 08:33:52 2020 +++ src/sys/arch/mips/mips/lock_stubs_llsc.S Sat Sep 26 08:21:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: lock_stubs_llsc.S,v 1.12 2020/08/09 08:33:52 skrll Exp $ */ +/* $NetBSD: lock_stubs_llsc.S,v 1.13 2020/09/26 08:21:27 simonb Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #include -RCSID("$NetBSD: lock_stubs_llsc.S,v 1.12 2020/08/09 08:33:52 skrll Exp $") +RCSID("$NetBSD: lock_stubs_llsc.S,v 1.13 2020/09/26 08:21:27 simonb Exp $") #include "assym.h" @@ -341,7 +341,7 @@ END(llsc_mutex_spin_exit) #endif /* !LOCKDEBUG */ .rdata -EXPORT(mips_llsc_locore_atomicvec) +EXPORT_OBJECT(mips_llsc_locore_atomicvec) PTR_WORD llsc_atomic_cas_uint PTR_WORD llsc_atomic_cas_ulong PTR_WORD llsc_ucas_32 Index: src/sys/arch/mips/mips/lock_stubs_ras.S diff -u src/sys/arch/mips/mips/lock_stubs_ras.S:1.10 src/sys/arch/mips/mips/lock_stubs_ras.S:1.11 --- src/sys/arch/mips/mips/lock_stubs_ras.S:1.10 Sat Apr 6 03:06:26 2019 +++ src/sys/arch/mips/mips/lock_stubs_ras.S Sat Sep 26 08:21:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: lock_stubs_ras.S,v 1.10 2019/04/06 03:06:26 thorpej Exp $ */ +/* $NetBSD: lock_stubs_ras.S,v 1.11 2020/09/26 08:21:27 simonb Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #include -RCSID("$NetBSD: lock_stubs_ras.S,v 1.10 2019/04/06 03:06:26 thorpej Exp $") +RCSID("$NetBSD: lock_stubs_ras.S,v 1.11 2020/09/26 08:21:27 simonb Exp $") #include "assym.h" @@ -482,7 +482,7 @@ END(ras_mutex_spin_exit) #endif /* !LOCKDEBUG */ .data -EXPORT(mips_locore_atomicvec) +EXPORT_OBJECT(mips_locore_atomicvec) PTR_WORD ras_atomic_cas_uint PTR_WORD ras_atomic_cas_ulong PTR_WORD ras_ucas_32
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: simonb Date: Sat Sep 26 08:21:10 UTC 2020 Modified Files: src/sys/arch/mips/mips: locore.S Log Message: Use EXPORT for start and EXPORT_OBJECT for kernel_text instead of by-hand exporting. Using EXPORT_OBJECT for kernel_text also fixes "bt/a" from DDB. To generate a diff of this commit: cvs rdiff -u -r1.225 -r1.226 src/sys/arch/mips/mips/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/locore.S diff -u src/sys/arch/mips/mips/locore.S:1.225 src/sys/arch/mips/mips/locore.S:1.226 --- src/sys/arch/mips/mips/locore.S:1.225 Fri Jul 31 20:04:18 2020 +++ src/sys/arch/mips/mips/locore.S Sat Sep 26 08:21:10 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.225 2020/07/31 20:04:18 skrll Exp $ */ +/* $NetBSD: locore.S,v 1.226 2020/09/26 08:21:10 simonb Exp $ */ /* * Copyright (c) 1992, 1993 @@ -63,16 +63,14 @@ #include #include -RCSID("$NetBSD: locore.S,v 1.225 2020/07/31 20:04:18 skrll Exp $") +RCSID("$NetBSD: locore.S,v 1.226 2020/09/26 08:21:10 simonb Exp $") #include "assym.h" .set noreorder - .globl start - .globl _C_LABEL(kernel_text) # libkvm refers this -start: -_C_LABEL(kernel_text): +EXPORT(start) +EXPORT_OBJECT(kernel_text) # libkvm refers this /* First disable the interrupts only, for safety */ mfc0 k0, MIPS_COP_0_STATUS MFC0_HAZARD
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: simonb Date: Sat Sep 26 08:19:11 UTC 2020 Modified Files: src/sys/arch/mips/include: asm.h Log Message: Add EXPORT_OBJECT - export definition of symbol of symbol type Object, visible to ksyms(4) address search. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/arch/mips/include/asm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/asm.h diff -u src/sys/arch/mips/include/asm.h:1.61 src/sys/arch/mips/include/asm.h:1.62 --- src/sys/arch/mips/include/asm.h:1.61 Wed Aug 12 08:56:37 2020 +++ src/sys/arch/mips/include/asm.h Sat Sep 26 08:19:11 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.61 2020/08/12 08:56:37 skrll Exp $ */ +/* $NetBSD: asm.h,v 1.62 2020/09/26 08:19:11 simonb Exp $ */ /* * Copyright (c) 1992, 1993 @@ -237,6 +237,14 @@ _C_LABEL(x): _C_LABEL(x): /* + * EXPORT_OBJECT -- export definition of symbol of symbol + * type Object, visible to ksyms(4) address search. + */ +#define EXPORT_OBJECT(x) \ + EXPORT(x); \ + .type _C_LABEL(x), @object; + +/* * VECTOR * exception vector entrypoint * XXX: regmask should be used to generate .mask
CVS commit: src
Module Name:src Committed By: mrg Date: Sat Sep 26 08:02:35 UTC 2020 Modified Files: src: UPDATING Log Message: note mpfr needs a cleaning. To generate a diff of this commit: cvs rdiff -u -r1.314 -r1.315 src/UPDATING Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/UPDATING diff -u src/UPDATING:1.314 src/UPDATING:1.315 --- src/UPDATING:1.314 Sat Sep 12 08:31:39 2020 +++ src/UPDATING Sat Sep 26 08:02:35 2020 @@ -1,4 +1,4 @@ -$NetBSD: UPDATING,v 1.314 2020/09/12 08:31:39 mrg Exp $ +$NetBSD: UPDATING,v 1.315 2020/09/26 08:02:35 mrg Exp $ This file (UPDATING) is intended to be a brief reference to recent changes that might cause problems in the build process, and a guide for @@ -19,6 +19,10 @@ See also: BUILDING, build.sh, Makefile. Recent changes: ^^^ +20200925: + GNU MPC and MPFR have been updated. At least MPFR needs cleaning + in both the tools and external dirs. + 20200912: GCC 9 has arrived for Arm and x86 platforms, and will be coming for several more, as will binutils 2.34. Clean as required.
CVS commit: src/doc
Module Name:src Committed By: mrg Date: Sat Sep 26 07:59:18 UTC 2020 Modified Files: src/doc: 3RDPARTY Log Message: note mpc (1.2.0) and mpfr (4.1.0) have new versions and are also updated to them. note gmp has a new release (6.2.0). To generate a diff of this commit: cvs rdiff -u -r1.1745 -r1.1746 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1745 src/doc/3RDPARTY:1.1746 --- src/doc/3RDPARTY:1.1745 Sat Sep 12 08:39:36 2020 +++ src/doc/3RDPARTY Sat Sep 26 07:59:18 2020 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1745 2020/09/12 08:39:36 wiz Exp $ +# $NetBSD: 3RDPARTY,v 1.1746 2020/09/26 07:59:18 mrg Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1513,8 +1513,8 @@ Notes: 3. Carefully check for non-autoconf GPL components leaked into the dist area. Package: mpc -Version: 1.1.0 -Current Vers: 1.1.0 +Version: 1.2.0 +Current Vers: 1.2.0 Maintainer: Archive Site: http://www.multiprecision.org/mpc/download/ Home Page: http://www.multiprecision.org/mpc/ @@ -1525,8 +1525,8 @@ Location: external/lgpl3/mpc/dist Notes: Package: mpfr -Version: 4.0.1 -Current Vers: 4.0.1 +Version: 4.1.0 +Current Vers: 4.1.0 Maintainer: Archive Site: http://www.mpfr.org/mpfr-current/ Home Page: http://www.mpfr.org/ @@ -1538,7 +1538,7 @@ Notes: Package: GNU MP Version: 6.1.2 -Current Vers: 6.1.2 +Current Vers: 6.2.0 Maintainer: http://gmplib.org/mailman/listinfo/gmp-devel Archive Site: http://gmplib.org/ Home Page: http://gmplib.org/ @@ -1546,7 +1546,7 @@ Mailing List: http://gmplib.org/mailman/ Responsible: mrg License: LGPL3 Location: external/lgpl3/gmp/dist -Notes: +Notes: See the README. Package: osnet Version: osnet-20100224
CVS commit: src/external/lgpl3/mpc/lib/libmpc
Module Name:src Committed By: mrg Date: Sat Sep 26 07:57:56 UTC 2020 Modified Files: src/external/lgpl3/mpc/lib/libmpc: Makefile Log Message: updates for mpc 1.2.0. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/lgpl3/mpc/lib/libmpc/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/lgpl3/mpc/lib/libmpc/Makefile diff -u src/external/lgpl3/mpc/lib/libmpc/Makefile:1.4 src/external/lgpl3/mpc/lib/libmpc/Makefile:1.5 --- src/external/lgpl3/mpc/lib/libmpc/Makefile:1.4 Tue Sep 4 05:16:25 2018 +++ src/external/lgpl3/mpc/lib/libmpc/Makefile Sat Sep 26 07:57:56 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2018/09/04 05:16:25 mrg Exp $ +# $NetBSD: Makefile,v 1.5 2020/09/26 07:57:56 mrg Exp $ .include @@ -40,6 +40,7 @@ SRCS= \ div.c \ div_fr.c \ div_ui.c \ + dot.c \ exp.c \ fma.c \ fr_div.c \ @@ -90,6 +91,7 @@ SRCS= \ sub.c \ sub_fr.c \ sub_ui.c \ + sum.c \ swap.c \ tan.c \ tanh.c \
CVS import: src/external/lgpl3/mpc/dist
Module Name:src Committed By: mrg Date: Sat Sep 26 07:54:57 UTC 2020 Update of /cvsroot/src/external/lgpl3/mpc/dist In directory ivanova.netbsd.org:/tmp/cvs-serv10535 Log Message: initial import of mpc 1.2.0. main changes are: New functions: mpc_sum mpc_dot Several functions are more robust with a reduced exponent range (for example corresponding to IEEE 754 binary formats). Status: Vendor Tag: mpc Release Tags: mpc-1-2-0 U src/external/lgpl3/mpc/dist/Makefile.am U src/external/lgpl3/mpc/dist/Makefile.in U src/external/lgpl3/mpc/dist/config.h.in U src/external/lgpl3/mpc/dist/aclocal.m4 U src/external/lgpl3/mpc/dist/AUTHORS U src/external/lgpl3/mpc/dist/README U src/external/lgpl3/mpc/dist/ChangeLog U src/external/lgpl3/mpc/dist/configure U src/external/lgpl3/mpc/dist/INSTALL U src/external/lgpl3/mpc/dist/Makefile.vc U src/external/lgpl3/mpc/dist/configure.ac U src/external/lgpl3/mpc/dist/COPYING.LESSER U src/external/lgpl3/mpc/dist/NEWS U src/external/lgpl3/mpc/dist/TODO U src/external/lgpl3/mpc/dist/m4/ltoptions.m4 U src/external/lgpl3/mpc/dist/m4/lt~obsolete.m4 U src/external/lgpl3/mpc/dist/m4/ltsugar.m4 U src/external/lgpl3/mpc/dist/m4/ltversion.m4 U src/external/lgpl3/mpc/dist/m4/ax_c_check_flag.m4 U src/external/lgpl3/mpc/dist/m4/libtool.m4 U src/external/lgpl3/mpc/dist/m4/mpc.m4 U src/external/lgpl3/mpc/dist/m4/valgrind-tests.m4 U src/external/lgpl3/mpc/dist/m4/ax_gcc_version.m4 U src/external/lgpl3/mpc/dist/m4/ax_gcc_option.m4 U src/external/lgpl3/mpc/dist/tools/Makefile.am U src/external/lgpl3/mpc/dist/tools/Makefile.in N src/external/lgpl3/mpc/dist/tools/mpcheck/Makefile.am N src/external/lgpl3/mpc/dist/tools/mpcheck/Makefile.in N src/external/lgpl3/mpc/dist/tools/mpcheck/mpcheck-float128.c N src/external/lgpl3/mpc/dist/tools/mpcheck/README N src/external/lgpl3/mpc/dist/tools/mpcheck/mpcheck-double.c N src/external/lgpl3/mpc/dist/tools/mpcheck/mpcheck-longdouble.c N src/external/lgpl3/mpc/dist/tools/mpcheck/mpcheck-float.c U src/external/lgpl3/mpc/dist/tools/bench/Makefile.am U src/external/lgpl3/mpc/dist/tools/bench/Makefile.in U src/external/lgpl3/mpc/dist/tools/bench/benchtime.h U src/external/lgpl3/mpc/dist/tools/bench/mpcbench.c N src/external/lgpl3/mpc/dist/build-aux/missing N src/external/lgpl3/mpc/dist/build-aux/config.guess N src/external/lgpl3/mpc/dist/build-aux/ltmain.sh N src/external/lgpl3/mpc/dist/build-aux/test-driver N src/external/lgpl3/mpc/dist/build-aux/depcomp N src/external/lgpl3/mpc/dist/build-aux/compile N src/external/lgpl3/mpc/dist/build-aux/mdate-sh N src/external/lgpl3/mpc/dist/build-aux/install-sh N src/external/lgpl3/mpc/dist/build-aux/texinfo.tex N src/external/lgpl3/mpc/dist/build-aux/ar-lib N src/external/lgpl3/mpc/dist/build-aux/config.sub U src/external/lgpl3/mpc/dist/tests/tpow_fr.c U src/external/lgpl3/mpc/dist/tests/tanh.dat U src/external/lgpl3/mpc/dist/tests/div_fr.dsc U src/external/lgpl3/mpc/dist/tests/atan.dat U src/external/lgpl3/mpc/dist/tests/copy_parameter.c U src/external/lgpl3/mpc/dist/tests/tui_div.c U src/external/lgpl3/mpc/dist/tests/tsqr.c U src/external/lgpl3/mpc/dist/tests/asinh.dsc U src/external/lgpl3/mpc/dist/tests/norm.dsc U src/external/lgpl3/mpc/dist/tests/pow_z.dat N src/external/lgpl3/mpc/dist/tests/tsum.c U src/external/lgpl3/mpc/dist/tests/pow_ui.dat U src/external/lgpl3/mpc/dist/tests/Makefile.am U src/external/lgpl3/mpc/dist/tests/ttan.c U src/external/lgpl3/mpc/dist/tests/add_fr.dsc U src/external/lgpl3/mpc/dist/tests/tmul_fr.c U src/external/lgpl3/mpc/dist/tests/cosh.dsc U src/external/lgpl3/mpc/dist/tests/tio_str.c U src/external/lgpl3/mpc/dist/tests/tswap.c U src/external/lgpl3/mpc/dist/tests/tmul_si.c U src/external/lgpl3/mpc/dist/tests/tpl_native.c U src/external/lgpl3/mpc/dist/tests/setprec_parameters.c U src/external/lgpl3/mpc/dist/tests/Makefile.in U src/external/lgpl3/mpc/dist/tests/pow_si.dat U src/external/lgpl3/mpc/dist/tests/sinh.dsc U src/external/lgpl3/mpc/dist/tests/data_check.tpl U src/external/lgpl3/mpc/dist/tests/tasinh.c U src/external/lgpl3/mpc/dist/tests/div_fr.dat U src/external/lgpl3/mpc/dist/tests/timag.c U src/external/lgpl3/mpc/dist/tests/exceptions.c U src/external/lgpl3/mpc/dist/tests/tpow_ld.c U src/external/lgpl3/mpc/dist/tests/check_data.c U src/external/lgpl3/mpc/dist/tests/tdiv.c U src/external/lgpl3/mpc/dist/tests/clear_parameters.c U src/external/lgpl3/mpc/dist/tests/tpow_ui.c U src/external/lgpl3/mpc/dist/tests/tset.c U src/external/lgpl3/mpc/dist/tests/sin_cos.dsc U src/external/lgpl3/mpc/dist/tests/fr_sub.dat U src/external/lgpl3/mpc/dist/tests/tabs.c U src/external/lgpl3/mpc/dist/tests/mul.dat U src/external/lgpl3/mpc/dist/tests/tget_version.c U src/external/lgpl3/mpc/dist/tests/ttanh.c U src/external/lgpl3/mpc/dist/tests/cmp_abs.dsc U src/external/lgpl3/mpc/dist/tests/tsub.c U src/external/lgpl3/mpc/dist/tests/acosh.dat U src/external/lgpl3/mpc/dist/tests/print_parameter.c U src/external/lgpl3/mpc/dist/tests/tdiv_ui.c U
CVS commit: src/external/lgpl3/mpfr/lib/libmpfr
Module Name:src Committed By: mrg Date: Sat Sep 26 07:50:41 UTC 2020 Modified Files: src/external/lgpl3/mpfr/lib/libmpfr: Makefile Log Message: updates for mpfr 4.0.1. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/external/lgpl3/mpfr/lib/libmpfr/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/lgpl3/mpfr/lib/libmpfr/Makefile diff -u src/external/lgpl3/mpfr/lib/libmpfr/Makefile:1.20 src/external/lgpl3/mpfr/lib/libmpfr/Makefile:1.21 --- src/external/lgpl3/mpfr/lib/libmpfr/Makefile:1.20 Fri May 15 14:44:05 2020 +++ src/external/lgpl3/mpfr/lib/libmpfr/Makefile Sat Sep 26 07:50:41 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.20 2020/05/15 14:44:05 joerg Exp $ +# $NetBSD: Makefile,v 1.21 2020/09/26 07:50:41 mrg Exp $ .include @@ -10,6 +10,8 @@ INCS= mpf2mpfr.h mpfr.h INCSDIR= /usr/include .endif +MPFRDIST= ${.CURDIR}/../../dist + # XXX get_d.c triggers lint div zero errors (which is valid?) MKLINT=no @@ -43,7 +45,8 @@ SRCS= \ clears.c \ cmp.c \ cmp2.c \ - cmp_abs.c \ + cmpabs.c \ + cmpabs_ui.c \ cmp_d.c \ cmp_ld.c \ cmp_si.c \ @@ -71,6 +74,7 @@ SRCS= \ div_2ui.c \ div_d.c \ div_ui.c \ + dot.c \ dump.c \ eint.c \ eq.c \ @@ -104,6 +108,7 @@ SRCS= \ gamma_inc.c \ gammaonethird.c \ get_d.c \ + get_d128.c \ get_d64.c \ get_exp.c \ get_f.c \ @@ -156,6 +161,7 @@ SRCS= \ mul_d.c \ mul_ui.c \ mulders.c \ + nbits_ulong.c \ neg.c \ next.c \ nrandom.c \ @@ -185,6 +191,7 @@ SRCS= \ sech.c \ set.c \ set_d.c \ + set_d128.c \ set_d64.c \ set_dfl_prec.c \ set_exp.c \ @@ -234,6 +241,7 @@ SRCS= \ swap.c \ tan.c \ tanh.c \ + total_order.c \ ubf.c \ uceil_exp2.c \ uceil_log2.c \ @@ -280,7 +288,7 @@ CPPFLAGS+= -I. \ # Find .include "../../../gmp/Makefile.arch" CPPFLAGS+= -I${NETBSDSRCDIR}/external/lgpl3/gmp/lib/libgmp/arch/${GMP_MACHINE_ARCH} -CPPFLAGS+= -I${.CURDIR}/../../dist/src +CPPFLAGS+= -I${MPFRDIST}/src # IEEE FP support. No VAX here. .if ${MACHINE_ARCH} == "x86_64" || \ @@ -322,6 +330,14 @@ mparam.h: mparam_h.in ${SRCS}: mparam.h CLEANFILES+= mparam.h +GET_PATCHES_SH= ${MPFRDIST}/tools/get_patches.sh +PATCHES= ${MPFRDIST}/PATCHES + +get_patches.c: ${GET_PATCHES_SH} ${PATCHES} + ${GET_PATCHES_SH} ${PATCHES} > $@.tmp && mv $@.tmp $@ + +CLEANFILES+= get_patches.c.tmp get_patches.c + .PATH: ${.CURDIR}/../../dist/src .if !empty(MACHINE_ARCH:M*arm*)
CVS commit: src/external/lgpl3/mpfr/dist
Module Name:src Committed By: mrg Date: Sat Sep 26 07:40:50 UTC 2020 Modified Files: src/external/lgpl3/mpfr/dist/src: Makefile.in Added Files: src/external/lgpl3/mpfr/dist: PATCHES Log Message: empty PATCHES is needed. revert a local change that is wrong now. To generate a diff of this commit: cvs rdiff -u -r0 -r1.4 src/external/lgpl3/mpfr/dist/PATCHES cvs rdiff -u -r1.5 -r1.6 src/external/lgpl3/mpfr/dist/src/Makefile.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/lgpl3/mpfr/dist/src/Makefile.in diff -u src/external/lgpl3/mpfr/dist/src/Makefile.in:1.5 src/external/lgpl3/mpfr/dist/src/Makefile.in:1.6 --- src/external/lgpl3/mpfr/dist/src/Makefile.in:1.5 Sat Sep 26 07:29:57 2020 +++ src/external/lgpl3/mpfr/dist/src/Makefile.in Sat Sep 26 07:40:50 2020 @@ -1741,8 +1741,6 @@ uninstall-am: uninstall-includeHEADERS u # we need to require GNU "make". .POSIX: get_patches.c: $(GET_PATCHES_SH) $(PATCHES) - @echo "NOT REBUILDING $@" -NetBSD_DISABLED_get_patches.c: $(GET_PATCHES_SH) $(PATCHES) > $@ || { rm -f $@; exit 1; } # Check that MPFR does not use GMP internal symbols. Of course, do not run Added files:
CVS import: src/external/lgpl3/mpfr/dist
Module Name:src Committed By: mrg Date: Sat Sep 26 07:25:47 UTC 2020 Update of /cvsroot/src/external/lgpl3/mpfr/dist In directory ivanova.netbsd.org:/tmp/cvs-serv15346 Log Message: GNU mpfr 4.1.0. main changes from 4.0: Changed __float128 to the type _Float128 specified in ISO/IEC TS 18661. __float128 is used as a fallback if _Float128 is not supported. New function mpfr_get_str_ndigits about conversion to a string of digits. New function mpfr_dot for the dot product (incomplete, experimental). New functions mpfr_get_decimal128 and mpfr_set_decimal128 (available only when MPFR has been built with decimal float support). New function mpfr_cmpabs_ui. New function mpfr_total_order_p for the IEEE 754 totalOrder predicate. The mpfr_out_str function now accepts bases from -2 to -36, in order to follow mpfr_get_str and GMP's mpf_out_str functions (these cases gave an assertion failure, as with other invalid bases). Shared caches: cleanup; really detect lock failures (abort in this case). Improved mpfr_add and mpfr_sub when all operands have a precision equal to twice the number of bits per word, e.g., 128 bits on a 64-bit platform. Optimized the tuning parameters for various architectures. Status: Vendor Tag: mpfr Release Tags: mpfr-4-1-0 U src/external/lgpl3/mpfr/dist/configure.ac U src/external/lgpl3/mpfr/dist/AUTHORS U src/external/lgpl3/mpfr/dist/aclocal.m4 C src/external/lgpl3/mpfr/dist/VERSION U src/external/lgpl3/mpfr/dist/ltmain.sh C src/external/lgpl3/mpfr/dist/Makefile.in U src/external/lgpl3/mpfr/dist/Makefile.am U src/external/lgpl3/mpfr/dist/PATCHES U src/external/lgpl3/mpfr/dist/test-driver U src/external/lgpl3/mpfr/dist/COPYING C src/external/lgpl3/mpfr/dist/config.guess U src/external/lgpl3/mpfr/dist/BUGS U src/external/lgpl3/mpfr/dist/missing U src/external/lgpl3/mpfr/dist/TODO U src/external/lgpl3/mpfr/dist/NEWS U src/external/lgpl3/mpfr/dist/compile U src/external/lgpl3/mpfr/dist/depcomp U src/external/lgpl3/mpfr/dist/COPYING.LESSER U src/external/lgpl3/mpfr/dist/ar-lib U src/external/lgpl3/mpfr/dist/install-sh U src/external/lgpl3/mpfr/dist/README U src/external/lgpl3/mpfr/dist/acinclude.m4 U src/external/lgpl3/mpfr/dist/configure C src/external/lgpl3/mpfr/dist/config.sub U src/external/lgpl3/mpfr/dist/INSTALL U src/external/lgpl3/mpfr/dist/ChangeLog U src/external/lgpl3/mpfr/dist/mpfr.pc.in U src/external/lgpl3/mpfr/dist/m4/lt~obsolete.m4 U src/external/lgpl3/mpfr/dist/m4/ltversion.m4 U src/external/lgpl3/mpfr/dist/m4/ltoptions.m4 U src/external/lgpl3/mpfr/dist/m4/libtool.m4 U src/external/lgpl3/mpfr/dist/m4/ltsugar.m4 U src/external/lgpl3/mpfr/dist/tune/Makefile.in U src/external/lgpl3/mpfr/dist/tune/Makefile.am U src/external/lgpl3/mpfr/dist/tune/speed.c U src/external/lgpl3/mpfr/dist/tune/tuneup.c U src/external/lgpl3/mpfr/dist/tune/bidimensional_sample.c U src/external/lgpl3/mpfr/dist/src/fits_sint.c U src/external/lgpl3/mpfr/dist/src/cmp2.c U src/external/lgpl3/mpfr/dist/src/div_d.c U src/external/lgpl3/mpfr/dist/src/csc.c U src/external/lgpl3/mpfr/dist/src/get_f.c N src/external/lgpl3/mpfr/dist/src/cmpabs_ui.c U src/external/lgpl3/mpfr/dist/src/gen_inverse.h U src/external/lgpl3/mpfr/dist/src/setmax.c U src/external/lgpl3/mpfr/dist/src/invsqrt_limb.h U src/external/lgpl3/mpfr/dist/src/fits_slong.c U src/external/lgpl3/mpfr/dist/src/set_sj.c U src/external/lgpl3/mpfr/dist/src/inp_str.c U src/external/lgpl3/mpfr/dist/src/get_float128.c U src/external/lgpl3/mpfr/dist/src/ui_div.c U src/external/lgpl3/mpfr/dist/src/get_ld.c U src/external/lgpl3/mpfr/dist/src/mul_d.c U src/external/lgpl3/mpfr/dist/src/strtofr.c U src/external/lgpl3/mpfr/dist/src/set_z_exp.c U src/external/lgpl3/mpfr/dist/src/isinf.c U src/external/lgpl3/mpfr/dist/src/exceptions.c U src/external/lgpl3/mpfr/dist/src/set_d64.c U src/external/lgpl3/mpfr/dist/src/erandom.c U src/external/lgpl3/mpfr/dist/src/ieee_floats.h U src/external/lgpl3/mpfr/dist/src/const_euler.c U src/external/lgpl3/mpfr/dist/src/sec.c U src/external/lgpl3/mpfr/dist/src/powerof2.c N src/external/lgpl3/mpfr/dist/src/add1sp1_extracted.c U src/external/lgpl3/mpfr/dist/src/sum.c U src/external/lgpl3/mpfr/dist/src/yn.c U src/external/lgpl3/mpfr/dist/src/set_exp.c U src/external/lgpl3/mpfr/dist/src/div_2si.c U src/external/lgpl3/mpfr/dist/src/sub1.c U src/external/lgpl3/mpfr/dist/src/add1sp.c U src/external/lgpl3/mpfr/dist/src/lngamma.c U src/external/lgpl3/mpfr/dist/src/volatile.c U src/external/lgpl3/mpfr/dist/src/grandom.c U src/external/lgpl3/mpfr/dist/src/gmp_op.c U src/external/lgpl3/mpfr/dist/src/acos.c U src/external/lgpl3/mpfr/dist/src/set_prec.c U src/external/lgpl3/mpfr/dist/src/cmp.c U src/external/lgpl3/mpfr/dist/src/pow_si.c U src/external/lgpl3/mpfr/dist/src/round_prec.c U src/external/lgpl3/mpfr/dist/src/eint.c U src/external/lgpl3/mpfr/dist/src/mpfr-cvers.h U src/external/lgpl3/mpfr/dist/src/get_q.c N src/external/lgpl3/mpfr/dist/src/total_order.c U src/external/lgpl3/mpfr/dist/src/ui_pow_ui.c U
CVS commit: src/external/lgpl3/mpfr/dist
Module Name:src Committed By: mrg Date: Sat Sep 26 07:01:40 UTC 2020 Removed Files: src/external/lgpl3/mpfr/dist: PATCHES Log Message: we don't have a patch version for a while now. To generate a diff of this commit: cvs rdiff -u -r1.2 -r0 src/external/lgpl3/mpfr/dist/PATCHES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: skrll Date: Sat Sep 26 06:09:33 UTC 2020 Modified Files: src/sys/arch/aarch64/aarch64: cpuswitch.S Log Message: Use 'lr' instead of 'x30' in an instruction for clarity To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/aarch64/aarch64/cpuswitch.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/cpuswitch.S diff -u src/sys/arch/aarch64/aarch64/cpuswitch.S:1.26 src/sys/arch/aarch64/aarch64/cpuswitch.S:1.27 --- src/sys/arch/aarch64/aarch64/cpuswitch.S:1.26 Sat Sep 26 06:08:41 2020 +++ src/sys/arch/aarch64/aarch64/cpuswitch.S Sat Sep 26 06:09:33 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuswitch.S,v 1.26 2020/09/26 06:08:41 skrll Exp $ */ +/* $NetBSD: cpuswitch.S,v 1.27 2020/09/26 06:09:33 skrll Exp $ */ /*- * Copyright (c) 2014, 2020 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include "opt_ddb.h" #include "opt_kasan.h" -RCSID("$NetBSD: cpuswitch.S,v 1.26 2020/09/26 06:08:41 skrll Exp $") +RCSID("$NetBSD: cpuswitch.S,v 1.27 2020/09/26 06:09:33 skrll Exp $") ARMV8_DEFINE_OPTIONS @@ -298,7 +298,7 @@ ENTRY_NP(lwp_trampoline) /* * When the x27 function returns, it will jump to el0_trap_exit. */ - adr x30, el0_trap_exit /* tail call via lr */ + adr lr, el0_trap_exit /* tail call via lr */ mov x0, x28 /* mov arg into place */ mov x16, x27 /* use x16 as jump register, for BTI */ br x16 /* call function with arg */
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: skrll Date: Sat Sep 26 06:08:41 UTC 2020 Modified Files: src/sys/arch/aarch64/aarch64: cpuswitch.S Log Message: Fix a comment To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/aarch64/aarch64/cpuswitch.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/cpuswitch.S diff -u src/sys/arch/aarch64/aarch64/cpuswitch.S:1.25 src/sys/arch/aarch64/aarch64/cpuswitch.S:1.26 --- src/sys/arch/aarch64/aarch64/cpuswitch.S:1.25 Wed Aug 12 13:19:35 2020 +++ src/sys/arch/aarch64/aarch64/cpuswitch.S Sat Sep 26 06:08:41 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuswitch.S,v 1.25 2020/08/12 13:19:35 skrll Exp $ */ +/* $NetBSD: cpuswitch.S,v 1.26 2020/09/26 06:08:41 skrll Exp $ */ /*- * Copyright (c) 2014, 2020 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include "opt_ddb.h" #include "opt_kasan.h" -RCSID("$NetBSD: cpuswitch.S,v 1.25 2020/08/12 13:19:35 skrll Exp $") +RCSID("$NetBSD: cpuswitch.S,v 1.26 2020/09/26 06:08:41 skrll Exp $") ARMV8_DEFINE_OPTIONS @@ -161,7 +161,7 @@ ENTRY_NP(cpu_switchto_softint) stp x23, x24, [sp, #TF_X23] stp x25, x26, [sp, #TF_X25] stp x27, x28, [sp, #TF_X27] - stp x29, x2, [sp, #TF_X29] /* tf->lr = softint_cleanup; */ + stp x29, x2, [sp, #TF_X29] /* tf->tf_lr = softint_cleanup; */ mrs x19, tpidr_el1 /* x19 := curlwp */ mov x4, sp