CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Dec 5 07:03:01 UTC 2019 Modified Files: src/sys/dev/pci: pciconf.c Log Message: KNF. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/dev/pci/pciconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pciconf.c diff -u src/sys/dev/pci/pciconf.c:1.42 src/sys/dev/pci/pciconf.c:1.43 --- src/sys/dev/pci/pciconf.c:1.42 Tue Oct 1 18:00:08 2019 +++ src/sys/dev/pci/pciconf.c Thu Dec 5 07:03:01 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pciconf.c,v 1.42 2019/10/01 18:00:08 chs Exp $ */ +/* $NetBSD: pciconf.c,v 1.43 2019/12/05 07:03:01 msaitoh Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pciconf.c,v 1.42 2019/10/01 18:00:08 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pciconf.c,v 1.43 2019/12/05 07:03:01 msaitoh Exp $"); #include "opt_pci.h" @@ -558,7 +558,7 @@ pci_do_device_query(pciconf_bus_t *pb, p pi = get_io_desc(pb, size); pi->dev = pd; pi->reg = br; - pi->size = (uint64_t) size; + pi->size = (uint64_t)size; pi->align = 4; if (pb->io_align < pi->size) pb->io_align = pi->size; @@ -575,15 +575,15 @@ pci_do_device_query(pciconf_bus_t *pb, p switch (PCI_MAPREG_MEM_TYPE(mask)) { case PCI_MAPREG_MEM_TYPE_32BIT: case PCI_MAPREG_MEM_TYPE_32BIT_1M: -size = (uint64_t) PCI_MAPREG_MEM_SIZE(mask); +size = (uint64_t)PCI_MAPREG_MEM_SIZE(mask); break; case PCI_MAPREG_MEM_TYPE_64BIT: bar64 = pci_conf_read(pb->pc, tag, br + 4); pci_conf_write(pb->pc, tag, br + 4, 0x); mask64 = pci_conf_read(pb->pc, tag, br + 4); pci_conf_write(pb->pc, tag, br + 4, bar64); -size = (uint64_t) PCI_MAPREG_MEM64_SIZE( - (((uint64_t) mask64) << 32) | mask); +size = (uint64_t)PCI_MAPREG_MEM64_SIZE( + (((uint64_t)mask64) << 32) | mask); width = 8; break; default: @@ -608,7 +608,8 @@ pci_do_device_query(pciconf_bus_t *pb, p printf("MEM%d BAR 0x%x has size %#lx\n", PCI_MAPREG_MEM_TYPE(mask) == PCI_MAPREG_MEM_TYPE_64BIT ? - 64 : 32, br, (unsigned long)size); + 64 : 32, + br, (unsigned long)size); } } @@ -652,7 +653,7 @@ pci_do_device_query(pciconf_bus_t *pb, p printf("pciconf: too many memory windows\n"); return -1; } - size = (uint64_t) PCI_MAPREG_MEM_SIZE(mask); + size = (uint64_t)PCI_MAPREG_MEM_SIZE(mask); pm = get_mem_desc(pb, size); pm->dev = pd; @@ -999,8 +1000,8 @@ configure_bus(pciconf_bus_t *pb) def_ltim = (def_ltim + 7) & ~7; max_ltim = (max_ltim + 7) & ~7; - pb->def_ltim = MIN( def_ltim, 255 ); - pb->max_ltim = MIN( MAX(max_ltim, def_ltim ), 255 ); + pb->def_ltim = MIN(def_ltim, 255); + pb->max_ltim = MIN(MAX(max_ltim, def_ltim), 255); /* * Now we have what we need to initialize the devices. @@ -1049,7 +1050,7 @@ configure_bus(pciconf_bus_t *pb) ltim = MIN (pb->def_ltim, pb->max_ltim); } if ((pd->enable & - (PCI_CONF_ENABLE_MEM|PCI_CONF_ENABLE_IO)) == 0) { + (PCI_CONF_ENABLE_MEM | PCI_CONF_ENABLE_IO)) == 0) { print_tag(pd->pc, pd->tag); printf("Disabled due to lack of resources.\n"); cmd &= ~(PCI_COMMAND_MASTER_ENABLE |
CVS commit: src/sys/arch/macppc/dev
Module Name:src Committed By: msaitoh Date: Thu Dec 5 06:28:20 UTC 2019 Modified Files: src/sys/arch/macppc/dev: if_mc.c Log Message: Revert if_mc.c rev. 1.25. It's not required to check ifm->ifm_cur->ifm_media instead of ifm->ifm_media. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/macppc/dev/if_mc.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/macppc/dev/if_mc.c diff -u src/sys/arch/macppc/dev/if_mc.c:1.25 src/sys/arch/macppc/dev/if_mc.c:1.26 --- src/sys/arch/macppc/dev/if_mc.c:1.25 Wed Dec 4 07:03:46 2019 +++ src/sys/arch/macppc/dev/if_mc.c Thu Dec 5 06:28:20 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_mc.c,v 1.25 2019/12/04 07:03:46 msaitoh Exp $ */ +/* $NetBSD: if_mc.c,v 1.26 2019/12/05 06:28:20 msaitoh Exp $ */ /*- * Copyright (c) 1997 David Huang @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_mc.c,v 1.25 2019/12/04 07:03:46 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_mc.c,v 1.26 2019/12/05 06:28:20 msaitoh Exp $"); #include #include @@ -362,12 +362,12 @@ mc_select_aui(struct mc_softc *sc) int mc_mediachange(struct mc_softc *sc) { - struct ifmedia_entry *ife = sc->sc_media.ifm_cur; + struct ifmedia *ifm = >sc_media; - if (IFM_TYPE(ife->ifm_media) != IFM_ETHER) + if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER) return EINVAL; - switch (IFM_SUBTYPE(ife->ifm_media)) { + switch (IFM_SUBTYPE(ifm->ifm_media)) { case IFM_10_T: mc_select_utp(sc);
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: mlelstv Date: Thu Dec 5 06:28:09 UTC 2019 Modified Files: src/sys/dev/i2c: i2c.c Log Message: Revert previous. Indirect matches are not wanted on platforms that use external configuration data (FDT or OF). To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/sys/dev/i2c/i2c.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/i2c/i2c.c diff -u src/sys/dev/i2c/i2c.c:1.69 src/sys/dev/i2c/i2c.c:1.70 --- src/sys/dev/i2c/i2c.c:1.69 Tue Mar 26 09:20:38 2019 +++ src/sys/dev/i2c/i2c.c Thu Dec 5 06:28:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: i2c.c,v 1.69 2019/03/26 09:20:38 mlelstv Exp $ */ +/* $NetBSD: i2c.c,v 1.70 2019/12/05 06:28:09 mlelstv Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.69 2019/03/26 09:20:38 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.70 2019/12/05 06:28:09 mlelstv Exp $"); #include #include @@ -719,8 +719,6 @@ iic_use_direct_match(const struct i2c_at const struct device_compatible_entry *compats, int *match_resultp) { - int res; - KASSERT(match_resultp != NULL); if (ia->ia_name != NULL && @@ -730,11 +728,8 @@ iic_use_direct_match(const struct i2c_at } if (ia->ia_ncompat > 0 && ia->ia_compat != NULL) { - res = iic_compatible_match(ia, compats, NULL); - if (res) { - *match_resultp = res; - return true; - } + *match_resultp = iic_compatible_match(ia, compats, NULL); + return true; } return false;
CVS commit: src/sys/arch/mips/adm5120/dev
Module Name:src Committed By: msaitoh Date: Thu Dec 5 06:25:33 UTC 2019 Modified Files: src/sys/arch/mips/adm5120/dev: if_admsw.c Log Message: Revert if_admsw.c rev. 1.25. It's not required to check sc->sc_ifmedia[port].ifm_cur->ifm_media instead of ifm->ifm_media. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/mips/adm5120/dev/if_admsw.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/adm5120/dev/if_admsw.c diff -u src/sys/arch/mips/adm5120/dev/if_admsw.c:1.26 src/sys/arch/mips/adm5120/dev/if_admsw.c:1.27 --- src/sys/arch/mips/adm5120/dev/if_admsw.c:1.26 Thu Dec 5 03:15:20 2019 +++ src/sys/arch/mips/adm5120/dev/if_admsw.c Thu Dec 5 06:25:33 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_admsw.c,v 1.26 2019/12/05 03:15:20 msaitoh Exp $ */ +/* $NetBSD: if_admsw.c,v 1.27 2019/12/05 06:25:33 msaitoh Exp $ */ /*- * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko. @@ -76,7 +76,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.26 2019/12/05 03:15:20 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.27 2019/12/05 06:25:33 msaitoh Exp $"); #include @@ -1237,21 +1237,21 @@ admsw_mediachange(struct ifnet *ifp) { struct admsw_softc *sc = ifp->if_softc; int port = (struct ethercom *)ifp - sc->sc_ethercom; /* XXX */ - struct ifmedia_entry *ife = sc->sc_ifmedia[port].ifm_cur; + struct ifmedia *ifm = >sc_ifmedia[port]; int old, new, val; - if (IFM_TYPE(ife->ifm_media) != IFM_ETHER) + if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER) return EINVAL; - if (IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO) { + if (IFM_SUBTYPE(ifm->ifm_media) == IFM_AUTO) { val = PHY_CNTL2_AUTONEG | PHY_CNTL2_100M | PHY_CNTL2_FDX; - } else if (IFM_SUBTYPE(ife->ifm_media) == IFM_100_TX) { - if ((ife->ifm_media & IFM_FDX) != 0) + } else if (IFM_SUBTYPE(ifm->ifm_media) == IFM_100_TX) { + if ((ifm->ifm_media & IFM_FDX) != 0) val = PHY_CNTL2_100M | PHY_CNTL2_FDX; else val = PHY_CNTL2_100M; - } else if (IFM_SUBTYPE(ife->ifm_media) == IFM_10_T) { - if ((ife->ifm_media & IFM_FDX) != 0) + } else if (IFM_SUBTYPE(ifm->ifm_media) == IFM_10_T) { + if ((ifm->ifm_media & IFM_FDX) != 0) val = PHY_CNTL2_FDX; else val = 0;
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: ryo Date: Thu Dec 5 05:45:52 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64: cpufunc.c Log Message: fix build error by my previous commit To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/aarch64/aarch64/cpufunc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/cpufunc.c diff -u src/sys/arch/aarch64/aarch64/cpufunc.c:1.10 src/sys/arch/aarch64/aarch64/cpufunc.c:1.11 --- src/sys/arch/aarch64/aarch64/cpufunc.c:1.10 Thu Dec 5 05:17:55 2019 +++ src/sys/arch/aarch64/aarch64/cpufunc.c Thu Dec 5 05:45:52 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.c,v 1.10 2019/12/05 05:17:55 ryo Exp $ */ +/* $NetBSD: cpufunc.c,v 1.11 2019/12/05 05:45:52 ryo Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu @@ -29,7 +29,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.10 2019/12/05 05:17:55 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.11 2019/12/05 05:45:52 ryo Exp $"); #include #include @@ -126,7 +126,7 @@ aarch64_getcacheinfo(int unit) /* Need static buffer for the boot CPU */ if (unit == 0) - cinfo = _cacheinfo0; + cinfo = aarch64_cacheinfo0; else cinfo = kmem_zalloc(sizeof(struct aarch64_cache_info) * MAX_CACHE_LEVEL, KM_SLEEP);
CVS commit: src/sys/net
Module Name:src Committed By: msaitoh Date: Thu Dec 5 05:29:28 UTC 2019 Modified Files: src/sys/net: if_media.h Log Message: Fix previous comment change for ifm_media. It was correct. The real problem is that some driver misuse ifm_media as the current active media. struct mii_data has the current active media(mii_media_active). If a driver use mii(4), it can be use mii->mii_media_active for this purpose. struct ifmedia has no entry for this purpose. Some drivers have an entry in their own softc to keep the value, but some other's don't have it and they mistakenly use ifm_media. We might add a new entry to struct ifmedia in future to avoid this confusion and for simplify. To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/net/if_media.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_media.h diff -u src/sys/net/if_media.h:1.67 src/sys/net/if_media.h:1.68 --- src/sys/net/if_media.h:1.67 Thu Nov 28 14:08:22 2019 +++ src/sys/net/if_media.h Thu Dec 5 05:29:27 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_media.h,v 1.67 2019/11/28 14:08:22 msaitoh Exp $ */ +/* $NetBSD: if_media.h,v 1.68 2019/12/05 05:29:27 msaitoh Exp $ */ /*- * Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc. @@ -883,8 +883,15 @@ struct ifmedia_entry { */ struct ifmedia { u_int ifm_mask; /* IFMWD: mask of changes we don't care */ - u_int ifm_media; /* IFMWD: current active media word */ - struct ifmedia_entry *ifm_cur; /* current user-selected media */ + u_int ifm_media; /* + * IFMWD: current use-set media word. + * + * XXX some drivers misuse this entry as + * current active media word. Don't use this + * entry as this purpose but use driver + * specific entry if you don't use mii(4). + */ + struct ifmedia_entry *ifm_cur; /* current user-selected media entry */ TAILQ_HEAD(, ifmedia_entry) ifm_list; /* list of all supported media */ ifm_change_cb_t ifm_change; /* media change driver callback */ ifm_stat_cb_t ifm_status; /* media status driver callback */
CVS commit: src/sys/arch/emips/ebus
Module Name:src Committed By: msaitoh Date: Thu Dec 5 05:28:09 UTC 2019 Modified Files: src/sys/arch/emips/ebus: if_le_ebus.c Log Message: Remove SIOC[SIFMEDIA because ifmedia_ioctl() does the same thing. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/emips/ebus/if_le_ebus.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/emips/ebus/if_le_ebus.c diff -u src/sys/arch/emips/ebus/if_le_ebus.c:1.20 src/sys/arch/emips/ebus/if_le_ebus.c:1.21 --- src/sys/arch/emips/ebus/if_le_ebus.c:1.20 Wed May 29 10:07:28 2019 +++ src/sys/arch/emips/ebus/if_le_ebus.c Thu Dec 5 05:28:09 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_le_ebus.c,v 1.20 2019/05/29 10:07:28 msaitoh Exp $ */ +/* $NetBSD: if_le_ebus.c,v 1.21 2019/12/05 05:28:09 msaitoh Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_le_ebus.c,v 1.20 2019/05/29 10:07:28 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_le_ebus.c,v 1.21 2019/12/05 05:28:09 msaitoh Exp $"); #include "opt_inet.h" @@ -591,42 +591,11 @@ enic_mediastatus(struct ifnet *ifp, stru int enic_ioctl(struct ifnet *ifp, u_long cmd, void *data) { - struct enic_softc *sc = ifp->if_softc; - struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; s = splnet(); switch (cmd) { - case SIOCSIFMEDIA: -#if 0 /*DEBUG*/ - { - extern int ei_drops[]; - static int flip = 0; - if (flip++ == 2) { - int i; - flip = 0; - printf("enic_ioctl(%x) %qd/%qd %qd/%qd %d/%d %d:%d " - "%d+%d %d/%d/%d\n", ifp->if_flags, - ifp->if_ierrors, ifp->if_oerrors, - ifp->if_ipackets, ifp->if_opackets, - sc->sc_no_rd, sc->sc_no_td, - sc->xhit, sc->xmiss, - sc->tfull, sc->tfull2, - sc->brh, sc->rf, sc->bxh); - printf(" Ctl %x lt %x tim %d\n", - sc->sc_regs->Control, sc->it, ifp->if_timer); - - for (i = 0; i < 64; i++) -if (ei_drops[i]) - printf(" %d.%d", i, ei_drops[i]); - printf("\n"); - } - } -#endif - error = ifmedia_ioctl(ifp, ifr, >sc_media, cmd); - break; - default: error = ether_ioctl(ifp, cmd, data); if (cmd == SIOCSIFADDR) {
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: ryo Date: Thu Dec 5 05:17:55 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64: cpufunc.c Log Message: MAX_CACHE_LEVEL * struct aarch64_cache_info are required to statically allocate for cpu0. avoid "cpu0: L2 512KB/64B 16-way write-back read-allocate write-allocate PIPT *UNK* cache" by r1.8 To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/aarch64/aarch64/cpufunc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/cpufunc.c diff -u src/sys/arch/aarch64/aarch64/cpufunc.c:1.9 src/sys/arch/aarch64/aarch64/cpufunc.c:1.10 --- src/sys/arch/aarch64/aarch64/cpufunc.c:1.9 Mon Dec 2 23:22:43 2019 +++ src/sys/arch/aarch64/aarch64/cpufunc.c Thu Dec 5 05:17:55 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.c,v 1.9 2019/12/02 23:22:43 ad Exp $ */ +/* $NetBSD: cpufunc.c,v 1.10 2019/12/05 05:17:55 ryo Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu @@ -29,7 +29,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.9 2019/12/02 23:22:43 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.10 2019/12/05 05:17:55 ryo Exp $"); #include #include @@ -49,7 +49,7 @@ u_int aarch64_cache_prefer_mask; /* cache info per cluster. the same cluster has the same cache configuration? */ #define MAXCPUPACKAGES MAXCPUS /* maximum of ci->ci_package_id */ static struct aarch64_cache_info *aarch64_cacheinfo[MAXCPUPACKAGES]; -static struct aarch64_cache_info aarch64_cacheinfo0; +static struct aarch64_cache_info aarch64_cacheinfo0[MAX_CACHE_LEVEL]; static void
CVS commit: src/sys/lib/libkern
Module Name:src Committed By: riastradh Date: Thu Dec 5 04:17:13 UTC 2019 Modified Files: src/sys/lib/libkern: libkern.h Log Message: #ifdef notyet ---> never To generate a diff of this commit: cvs rdiff -u -r1.135 -r1.136 src/sys/lib/libkern/libkern.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/lib/libkern/libkern.h diff -u src/sys/lib/libkern/libkern.h:1.135 src/sys/lib/libkern/libkern.h:1.136 --- src/sys/lib/libkern/libkern.h:1.135 Fri Nov 22 14:28:46 2019 +++ src/sys/lib/libkern/libkern.h Thu Dec 5 04:17:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: libkern.h,v 1.135 2019/11/22 14:28:46 maxv Exp $ */ +/* $NetBSD: libkern.h,v 1.136 2019/12/05 04:17:13 riastradh Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -546,23 +546,4 @@ int strnvisx(char *, size_t, const char #define VIS_SAFE 0x20 #define VIS_TRIM 0x40 -#ifdef notyet -/* - * LZF hashtable/state size: on uncompressible data and on a system with - * a sufficiently large d-cache, a larger table produces a considerable - * speed benefit. On systems with small memory and caches, however... - */ -#if defined(__vax__) || defined(__m68k__) -#define LZF_HLOG 14 -#else -#define LZF_HLOG 15 -#endif -typedef const uint8_t *LZF_STATE[1 << LZF_HLOG]; - -unsigned int lzf_compress_r (const void *const, unsigned int, void *, - unsigned int, LZF_STATE); -unsigned int lzf_decompress (const void *const, unsigned int, void *, - unsigned int); -#endif - #endif /* !_LIB_LIBKERN_LIBKERN_H_ */
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: riastradh Date: Thu Dec 5 03:59:39 UTC 2019 Modified Files: src/sys/arch/hppa/include: cpu.h Log Message: Only need one ci_onproc member. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hppa/include/cpu.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/hppa/include/cpu.h diff -u src/sys/arch/hppa/include/cpu.h:1.7 src/sys/arch/hppa/include/cpu.h:1.8 --- src/sys/arch/hppa/include/cpu.h:1.7 Wed Dec 4 07:49:39 2019 +++ src/sys/arch/hppa/include/cpu.h Thu Dec 5 03:59:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.7 2019/12/04 07:49:39 skrll Exp $ */ +/* $NetBSD: cpu.h,v 1.8 2019/12/05 03:59:39 riastradh Exp $ */ /* $OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $ */ @@ -47,7 +47,7 @@ * CSL requests users of this software to return to csl-d...@cs.utah.edu any * improvements that they make and grant CSL redistribution rights. * - * Utah $Hdr: cpu.h 1.19 94/12/16$ + * Utah $Hdr$ */ #ifndef _MACHINE_CPU_H_ @@ -296,7 +296,6 @@ struct cpu_info { #define CPUF_PRIMARY 0x0001 /* ... is monarch/primary */ #define CPUF_RUNNING 0x0002 /* ... is running. */ - struct lwp *ci_onproc; /* current user LWP / kthread */ volatile u_long ci_ipi; /* IPIs pending */ struct cpu_softc *ci_softc;
CVS commit: src/sys/rump/kern/lib/libcrypto
Module Name:src Committed By: riastradh Date: Thu Dec 5 03:57:55 UTC 2019 Modified Files: src/sys/rump/kern/lib/libcrypto: Makefile Log Message: Missed a spot in the crypto/arc4 deletion. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/rump/kern/lib/libcrypto/Makefile 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/kern/lib/libcrypto/Makefile diff -u src/sys/rump/kern/lib/libcrypto/Makefile:1.5 src/sys/rump/kern/lib/libcrypto/Makefile:1.6 --- src/sys/rump/kern/lib/libcrypto/Makefile:1.5 Mon Sep 2 20:09:30 2019 +++ src/sys/rump/kern/lib/libcrypto/Makefile Thu Dec 5 03:57:55 2019 @@ -1,8 +1,7 @@ -# $NetBSD: Makefile,v 1.5 2019/09/02 20:09:30 riastradh Exp $ +# $NetBSD: Makefile,v 1.6 2019/12/05 03:57:55 riastradh Exp $ # -.PATH: ${.CURDIR}/../../../../crypto/arc4\ - ${.CURDIR}/../../../../crypto/blowfish\ +.PATH: ${.CURDIR}/../../../../crypto/blowfish\ ${.CURDIR}/../../../../crypto/camellia\ ${.CURDIR}/../../../../crypto/cast128\ ${.CURDIR}/../../../../crypto/des\ @@ -12,9 +11,6 @@ LIB= rumpkern_crypto COMMENT=Cryptographic routines -# arc4 -SRCS+= arc4.c - # blowfish SRCS+= bf_ecb.c bf_enc.c bf_cbc.c bf_skey.c bf_module.c
CVS commit: src/external/cddl/osnet/sys/sys
Module Name:src Committed By: riastradh Date: Thu Dec 5 03:21:42 UTC 2019 Modified Files: src/external/cddl/osnet/sys/sys: opentypes.h Log Message: Avoid redefining uint_t if compat_defs.h already defines them. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/sys/sys/opentypes.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/sys/sys/opentypes.h diff -u src/external/cddl/osnet/sys/sys/opentypes.h:1.4 src/external/cddl/osnet/sys/sys/opentypes.h:1.5 --- src/external/cddl/osnet/sys/sys/opentypes.h:1.4 Thu Sep 6 00:44:43 2018 +++ src/external/cddl/osnet/sys/sys/opentypes.h Thu Dec 5 03:21:42 2019 @@ -21,10 +21,12 @@ typedef struct timespec timestruc_t; #define __defined_ts_t typedef struct timespec timespec_t; #endif +#ifndef HAVE_NBTOOL_CONFIG_H typedef unsigned int uint_t; typedef unsigned char uchar_t; typedef unsigned short ushort_t; typedef unsigned long ulong_t; +#endif typedef off_t off64_t; typedef id_t taskid_t; typedef id_t projid_t;
CVS commit: src/sys
Module Name:src Committed By: riastradh Date: Thu Dec 5 03:22:03 UTC 2019 Modified Files: src/sys/conf: files Removed Files: src/sys/crypto/arc4: arc4.c arc4.h files.arc4 Log Message: Nuke crypto/arc4. Has not been used since 2003. Will not be missed. To generate a diff of this commit: cvs rdiff -u -r1.1244 -r1.1245 src/sys/conf/files cvs rdiff -u -r1.7 -r0 src/sys/crypto/arc4/arc4.c cvs rdiff -u -r1.5 -r0 src/sys/crypto/arc4/arc4.h cvs rdiff -u -r1.2 -r0 src/sys/crypto/arc4/files.arc4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/files diff -u src/sys/conf/files:1.1244 src/sys/conf/files:1.1245 --- src/sys/conf/files:1.1244 Thu Nov 14 16:23:52 2019 +++ src/sys/conf/files Thu Dec 5 03:22:02 2019 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.1244 2019/11/14 16:23:52 maxv Exp $ +# $NetBSD: files,v 1.1245 2019/12/05 03:22:02 riastradh Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20171118 @@ -191,7 +191,6 @@ defflag opt_machdep.h MACHDEP # use it. # Individual crypto transforms -include "crypto/arc4/files.arc4" include "crypto/des/files.des" include "crypto/blowfish/files.blowfish" include "crypto/cast128/files.cast128"
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Thu Dec 5 03:21:29 UTC 2019 Modified Files: src/sys/kern: subr_pserialize.c Log Message: Switch psz_ev_excl to static evcnt. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/kern/subr_pserialize.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_pserialize.c diff -u src/sys/kern/subr_pserialize.c:1.16 src/sys/kern/subr_pserialize.c:1.17 --- src/sys/kern/subr_pserialize.c:1.16 Thu Dec 5 03:21:17 2019 +++ src/sys/kern/subr_pserialize.c Thu Dec 5 03:21:29 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_pserialize.c,v 1.16 2019/12/05 03:21:17 riastradh Exp $ */ +/* $NetBSD: subr_pserialize.c,v 1.17 2019/12/05 03:21:29 riastradh Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_pserialize.c,v 1.16 2019/12/05 03:21:17 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_pserialize.c,v 1.17 2019/12/05 03:21:29 riastradh Exp $"); #include #include @@ -47,7 +47,9 @@ struct pserialize { }; static kmutex_t psz_lock __cacheline_aligned; -static struct evcnt psz_ev_excl __cacheline_aligned; +static struct evcnt psz_ev_excl __cacheline_aligned = +EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "pserialize", "exclusive access"); +EVCNT_ATTACH_STATIC(psz_ev_excl); /* * pserialize_init: @@ -59,8 +61,6 @@ pserialize_init(void) { mutex_init(_lock, MUTEX_DEFAULT, IPL_NONE); - evcnt_attach_dynamic(_ev_excl, EVCNT_TYPE_MISC, NULL, - "pserialize", "exclusive access"); } /*
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Thu Dec 5 03:21:17 UTC 2019 Modified Files: src/sys/kern: subr_pserialize.c Log Message: Restore psz_lock just for the event count. Cost of mutex_enter/exit is negligible compared to the xcall we just did, so this is not going to meaningfully affect performance. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/kern/subr_pserialize.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_pserialize.c diff -u src/sys/kern/subr_pserialize.c:1.15 src/sys/kern/subr_pserialize.c:1.16 --- src/sys/kern/subr_pserialize.c:1.15 Tue Dec 3 13:30:52 2019 +++ src/sys/kern/subr_pserialize.c Thu Dec 5 03:21:17 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_pserialize.c,v 1.15 2019/12/03 13:30:52 martin Exp $ */ +/* $NetBSD: subr_pserialize.c,v 1.16 2019/12/05 03:21:17 riastradh Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. @@ -31,13 +31,14 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_pserialize.c,v 1.15 2019/12/03 13:30:52 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_pserialize.c,v 1.16 2019/12/05 03:21:17 riastradh Exp $"); #include #include #include #include #include +#include #include #include @@ -45,6 +46,7 @@ struct pserialize { lwp_t * psz_owner; }; +static kmutex_t psz_lock __cacheline_aligned; static struct evcnt psz_ev_excl __cacheline_aligned; /* @@ -56,6 +58,7 @@ void pserialize_init(void) { + mutex_init(_lock, MUTEX_DEFAULT, IPL_NONE); evcnt_attach_dynamic(_ev_excl, EVCNT_TYPE_MISC, NULL, "pserialize", "exclusive access"); } @@ -120,10 +123,9 @@ pserialize_perform(pserialize_t psz) KASSERT(psz->psz_owner == curlwp); psz->psz_owner = NULL; -#ifdef __HAVE_ATOMIC64_LOADSTORE - atomic_store_relaxed(_ev_excl.ev_count, - 1 + atomic_load_relaxed(_ev_excl.ev_count)); -#endif + mutex_enter(_lock); + psz_ev_excl.ev_count++; + mutex_exit(_lock); } int
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Thu Dec 5 03:21:08 UTC 2019 Modified Files: src/sys/kern: subr_percpu.c Log Message: Allow equality in this assertion. This can happen if we lose the race mentioned in percpu_cpu_swap. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/kern/subr_percpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_percpu.c diff -u src/sys/kern/subr_percpu.c:1.19 src/sys/kern/subr_percpu.c:1.20 --- src/sys/kern/subr_percpu.c:1.19 Wed Sep 18 15:33:32 2019 +++ src/sys/kern/subr_percpu.c Thu Dec 5 03:21:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_percpu.c,v 1.19 2019/09/18 15:33:32 kamil Exp $ */ +/* $NetBSD: subr_percpu.c,v 1.20 2019/12/05 03:21:08 riastradh Exp $ */ /*- * Copyright (c)2007,2008 YAMAMOTO Takashi, @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_percpu.c,v 1.19 2019/09/18 15:33:32 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_percpu.c,v 1.20 2019/12/05 03:21:08 riastradh Exp $"); #include #include @@ -149,7 +149,7 @@ percpu_cpu_enlarge(size_t size) where = xc_unicast(0, percpu_cpu_swap, ci, , ci); xc_wait(where); } - KASSERT(pcc.pcc_size < size); + KASSERT(pcc.pcc_size <= size); if (pcc.pcc_data != NULL) { kmem_free(pcc.pcc_data, pcc.pcc_size); }
CVS commit: src/sys/arch/mips/adm5120/dev
Module Name:src Committed By: msaitoh Date: Thu Dec 5 03:15:20 UTC 2019 Modified Files: src/sys/arch/mips/adm5120/dev: if_admsw.c Log Message: Do SIOC[GS]IFMEDIA like others. Not tested. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/mips/adm5120/dev/if_admsw.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/adm5120/dev/if_admsw.c diff -u src/sys/arch/mips/adm5120/dev/if_admsw.c:1.25 src/sys/arch/mips/adm5120/dev/if_admsw.c:1.26 --- src/sys/arch/mips/adm5120/dev/if_admsw.c:1.25 Wed Dec 4 05:19:10 2019 +++ src/sys/arch/mips/adm5120/dev/if_admsw.c Thu Dec 5 03:15:20 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_admsw.c,v 1.25 2019/12/04 05:19:10 msaitoh Exp $ */ +/* $NetBSD: if_admsw.c,v 1.26 2019/12/05 03:15:20 msaitoh Exp $ */ /*- * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko. @@ -76,7 +76,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.25 2019/12/04 05:19:10 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_admsw.c,v 1.26 2019/12/05 03:15:20 msaitoh Exp $"); #include @@ -454,6 +454,7 @@ admsw_attach(device_t parent, device_t s admsw_reset(sc); for (i = 0; i < SW_DEVS; i++) { + sc->sc_ethercom[i].ec_ifmedia = >sc_ifmedia[i]; ifmedia_init(>sc_ifmedia[i], 0, admsw_mediachange, admsw_mediastatus); ifmedia_add(>sc_ifmedia[i], IFM_ETHER|IFM_10_T, 0, NULL); ifmedia_add(>sc_ifmedia[i], IFM_ETHER|IFM_10_T|IFM_FDX, 0, NULL); @@ -740,6 +741,10 @@ admsw_ioctl(struct ifnet *ifp, u_long cm struct ifdrv *ifd; int s, error, port; + port = (struct ethercom *)ifp - sc->sc_ethercom; /* XXX */ + if (port >= SW_DEVS) + return EOPNOTSUPP; + s = splnet(); switch (cmd) { @@ -747,16 +752,6 @@ admsw_ioctl(struct ifnet *ifp, u_long cm if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) error = 0; break; - case SIOCSIFMEDIA: - case SIOCGIFMEDIA: - port = (struct ethercom *)ifp - sc->sc_ethercom; /* XXX */ - if (port >= SW_DEVS) - error = EOPNOTSUPP; - else - error = ifmedia_ioctl(ifp, (struct ifreq *)data, - >sc_ifmedia[port], cmd); - break; - case SIOCGDRVSPEC: case SIOCSDRVSPEC: ifd = (struct ifdrv *) data;
CVS commit: src/sys/dev
Module Name:src Committed By: msaitoh Date: Thu Dec 5 03:11:41 UTC 2019 Modified Files: src/sys/dev/ic: awi.c wi.c src/sys/dev/usb: if_atu.c Log Message: Remove SIOC[GS]IFMEDIA because ieee80211_ioctl() does the same thing. To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.99 src/sys/dev/ic/awi.c cvs rdiff -u -r1.253 -r1.254 src/sys/dev/ic/wi.c cvs rdiff -u -r1.67 -r1.68 src/sys/dev/usb/if_atu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/awi.c diff -u src/sys/dev/ic/awi.c:1.98 src/sys/dev/ic/awi.c:1.99 --- src/sys/dev/ic/awi.c:1.98 Tue May 28 07:41:48 2019 +++ src/sys/dev/ic/awi.c Thu Dec 5 03:11:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: awi.c,v 1.98 2019/05/28 07:41:48 msaitoh Exp $ */ +/* $NetBSD: awi.c,v 1.99 2019/12/05 03:11:40 msaitoh Exp $ */ /*- * Copyright (c) 1999,2000,2001 The NetBSD Foundation, Inc. @@ -78,7 +78,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: awi.c,v 1.98 2019/05/28 07:41:48 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: awi.c,v 1.99 2019/12/05 03:11:40 msaitoh Exp $"); #include "opt_inet.h" @@ -833,7 +833,6 @@ static int awi_ioctl(struct ifnet *ifp, u_long cmd, void *data) { struct awi_softc *sc = ifp->if_softc; - struct ifreq *ifr = (struct ifreq *)data; int s, error; s = splnet(); @@ -858,10 +857,6 @@ awi_ioctl(struct ifnet *ifp, u_long cmd, } else if (sc->sc_enabled) awi_stop(ifp, 1); break; - case SIOCSIFMEDIA: - case SIOCGIFMEDIA: - error = ifmedia_ioctl(ifp, ifr, >sc_ic.ic_media, cmd); - break; case SIOCADDMULTI: case SIOCDELMULTI: error = ether_ioctl(ifp, cmd, data); Index: src/sys/dev/ic/wi.c diff -u src/sys/dev/ic/wi.c:1.253 src/sys/dev/ic/wi.c:1.254 --- src/sys/dev/ic/wi.c:1.253 Tue May 28 07:41:48 2019 +++ src/sys/dev/ic/wi.c Thu Dec 5 03:11:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: wi.c,v 1.253 2019/05/28 07:41:48 msaitoh Exp $ */ +/* $NetBSD: wi.c,v 1.254 2019/12/05 03:11:40 msaitoh Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -99,7 +99,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.253 2019/05/28 07:41:48 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.254 2019/12/05 03:11:40 msaitoh Exp $"); #define WI_HERMES_AUTOINC_WAR /* Work around data write autoinc bug. */ #define WI_HERMES_STATS_WAR /* Work around stats counter bug. */ @@ -1419,7 +1419,6 @@ wi_ioctl(struct ifnet *ifp, u_long cmd, { struct wi_softc *sc = ifp->if_softc; struct ieee80211com *ic = >sc_ic; - struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; if (!device_is_active(sc->sc_dev)) @@ -1453,10 +1452,6 @@ wi_ioctl(struct ifnet *ifp, u_long cmd, } else if (sc->sc_enabled) wi_stop(ifp, 1); break; - case SIOCSIFMEDIA: - case SIOCGIFMEDIA: - error = ifmedia_ioctl(ifp, ifr, >ic_media, cmd); - break; case SIOCADDMULTI: case SIOCDELMULTI: if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) { Index: src/sys/dev/usb/if_atu.c diff -u src/sys/dev/usb/if_atu.c:1.67 src/sys/dev/usb/if_atu.c:1.68 --- src/sys/dev/usb/if_atu.c:1.67 Sun Dec 1 12:47:10 2019 +++ src/sys/dev/usb/if_atu.c Thu Dec 5 03:11:41 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_atu.c,v 1.67 2019/12/01 12:47:10 maxv Exp $ */ +/* $NetBSD: if_atu.c,v 1.68 2019/12/05 03:11:41 msaitoh Exp $ */ /* $OpenBSD: if_atu.c,v 1.48 2004/12/30 01:53:21 dlg Exp $ */ /* * Copyright (c) 2003, 2004 @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.67 2019/12/01 12:47:10 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.68 2019/12/05 03:11:41 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -2138,17 +2138,11 @@ static int atu_ioctl(struct ifnet *ifp, u_long command, void *data) { struct atu_softc *sc = ifp->if_softc; - struct ifreq *ifr = (struct ifreq *)data; struct ieee80211com *ic = >sc_ic; int err = 0, s; s = splnet(); switch (command) { - case SIOCSIFMEDIA: - case SIOCGIFMEDIA: - err = ifmedia_ioctl(ifp, ifr, >ic_media, command); - break; - default: DPRINTFN(15, ("%s: ieee80211_ioctl (%lu)\n", device_xname(sc->atu_dev), command));
CVS commit: src/sys/arch/arm/imx/fdt
Module Name:src Committed By: hkenken Date: Thu Dec 5 00:31:14 UTC 2019 Modified Files: src/sys/arch/arm/imx/fdt: imx6_pcie.c Log Message: Remove unnecessary code. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/imx/fdt/imx6_pcie.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/imx/fdt/imx6_pcie.c diff -u src/sys/arch/arm/imx/fdt/imx6_pcie.c:1.5 src/sys/arch/arm/imx/fdt/imx6_pcie.c:1.6 --- src/sys/arch/arm/imx/fdt/imx6_pcie.c:1.5 Wed Oct 16 11:16:30 2019 +++ src/sys/arch/arm/imx/fdt/imx6_pcie.c Thu Dec 5 00:31:14 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_pcie.c,v 1.5 2019/10/16 11:16:30 hkenken Exp $ */ +/* $NetBSD: imx6_pcie.c,v 1.6 2019/12/05 00:31:14 hkenken Exp $ */ /*- * Copyright (c) 2019 Genetec Corporation. All rights reserved. * Written by Hashimoto Kenichi for Genetec Corporation. @@ -25,7 +25,7 @@ * SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: imx6_pcie.c,v 1.5 2019/10/16 11:16:30 hkenken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx6_pcie.c,v 1.6 2019/12/05 00:31:14 hkenken Exp $"); #include "opt_pci.h" #include "opt_fdt.h" @@ -204,10 +204,6 @@ imx6_pcie_attach(device_t parent, device sc->sc_clk_pcie_ext_src = NULL; } - - TAILQ_INIT(>sc_intrs); - mutex_init(>sc_lock, MUTEX_DEFAULT, IPL_VM); - if (!fdtbus_intr_str(phandle, 0, intrstr, sizeof(intrstr))) { aprint_error_dev(self, "failed to decode interrupt\n"); return;
CVS commit: src
Module Name:src Committed By: pgoyette Date: Wed Dec 4 23:35:36 UTC 2019 Modified Files: src/lib/libc/sys: modctl.2 src/sbin/modstat: modstat.8 Log Message: Note that the size returned by modctl(2) and displayed by modstat(8) is only for the module's text section, not for the entire size of the module. Addresses PR kern-54737 To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/sys/modctl.2 cvs rdiff -u -r1.23 -r1.24 src/sbin/modstat/modstat.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/modctl.2 diff -u src/lib/libc/sys/modctl.2:1.15 src/lib/libc/sys/modctl.2:1.16 --- src/lib/libc/sys/modctl.2:1.15 Mon Apr 8 10:47:16 2019 +++ src/lib/libc/sys/modctl.2 Wed Dec 4 23:35:36 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: modctl.2,v 1.15 2019/04/08 10:47:16 pgoyette Exp $ +.\" $NetBSD: modctl.2,v 1.16 2019/12/04 23:35:36 pgoyette Exp $ .\" .\" Copyright (c) 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -24,7 +24,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 8, 2019 +.Dd December 4, 2019 .Dt MODCTL 2 .Os .Sh NAME @@ -184,7 +184,7 @@ Miscellaneous. The load address within the kernel. (This value is available only for privileged users.) .It Fa "u_int ms_size" -Loaded size of the module. +Loaded size of the module's text section. (This value is available only for privileged users.) .It Fa "u_int ms_refcnt" Current number of live references to this module. Index: src/sbin/modstat/modstat.8 diff -u src/sbin/modstat/modstat.8:1.23 src/sbin/modstat/modstat.8:1.24 --- src/sbin/modstat/modstat.8:1.23 Sun Jan 27 02:08:36 2019 +++ src/sbin/modstat/modstat.8 Wed Dec 4 23:35:36 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: modstat.8,v 1.23 2019/01/27 02:08:36 pgoyette Exp $ +.\" $NetBSD: modstat.8,v 1.24 2019/12/04 23:35:36 pgoyette Exp $ .\" .\" Copyright (c) 1993 Christopher G. Demetriou .\" All rights reserved. @@ -32,7 +32,7 @@ .\" .\" <> .\" -.Dd September 8, 2018 +.Dd December 4, 2019 .Dt MODSTAT 8 .Os .Sh NAME @@ -90,7 +90,7 @@ indicates that the module was loaded dur .Qq Dv filesys indicates that the module was loaded from the file system. .It Li SIZE -Size of the module in bytes. +Size of the module's text section, in bytes. .It Li FLAG The module flags: .Bl -tag -width a -offset indent -compact
CVS commit: src/etc
Module Name:src Committed By: sevan Date: Wed Dec 4 21:53:21 UTC 2019 Modified Files: src/etc/etc.amd64: boot.cfg src/etc/etc.i386: boot.cfg Log Message: Make use of the pcidevs database by default. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/etc/etc.amd64/boot.cfg cvs rdiff -u -r1.6 -r1.7 src/etc/etc.i386/boot.cfg Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.amd64/boot.cfg diff -u src/etc/etc.amd64/boot.cfg:1.6 src/etc/etc.amd64/boot.cfg:1.7 --- src/etc/etc.amd64/boot.cfg:1.6 Mon Apr 22 13:32:13 2019 +++ src/etc/etc.amd64/boot.cfg Wed Dec 4 21:53:20 2019 @@ -1,4 +1,4 @@ -menu=Boot normally:rndseed /var/db/entropy-file;boot +menu=Boot normally:rndseed /var/db/entropy-file;load pciverbose;boot menu=Boot single user:rndseed /var/db/entropy-file;boot -s menu=Drop to boot prompt:prompt default=1 Index: src/etc/etc.i386/boot.cfg diff -u src/etc/etc.i386/boot.cfg:1.6 src/etc/etc.i386/boot.cfg:1.7 --- src/etc/etc.i386/boot.cfg:1.6 Mon Apr 22 13:32:13 2019 +++ src/etc/etc.i386/boot.cfg Wed Dec 4 21:53:20 2019 @@ -1,4 +1,4 @@ -menu=Boot normally:rndseed /var/db/entropy-file;boot +menu=Boot normally:rndseed /var/db/entropy-file;load pciverbose;boot menu=Boot single user:rndseed /var/db/entropy-file;boot -s menu=Drop to boot prompt:prompt default=1
CVS commit: src/sys/dev/acpi/wmi
Module Name:src Committed By: bouyer Date: Wed Dec 4 19:51:32 UTC 2019 Modified Files: src/sys/dev/acpi/wmi: wmi_dell.c Log Message: Finally fix problem discussed in this old thread: http://mail-index.netbsd.org/tech-kern/2017/12/03/msg022661.html Dell's radio hotkey sends a PMFE_RADIO_TOGGLE event, but nothing actually listen to it. Turn it into a PSWITCH_HK_WIRELESS_BUTTON hotkey, similar to what thinkpad_acpi.c does. Add type/subtypes seen on a Dell lattitude 5480 laptop. XXX we need a PMFE_AUDIO_MICRO_TOGGLE, and something to handle it. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/acpi/wmi/wmi_dell.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/wmi/wmi_dell.c diff -u src/sys/dev/acpi/wmi/wmi_dell.c:1.11 src/sys/dev/acpi/wmi/wmi_dell.c:1.12 --- src/sys/dev/acpi/wmi/wmi_dell.c:1.11 Sun Dec 3 23:43:00 2017 +++ src/sys/dev/acpi/wmi/wmi_dell.c Wed Dec 4 19:51:32 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: wmi_dell.c,v 1.11 2017/12/03 23:43:00 christos Exp $ */ +/* $NetBSD: wmi_dell.c,v 1.12 2019/12/04 19:51:32 bouyer Exp $ */ /*- * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wmi_dell.c,v 1.11 2017/12/03 23:43:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wmi_dell.c,v 1.12 2019/12/04 19:51:32 bouyer Exp $"); #include #include @@ -53,7 +53,8 @@ __KERNEL_RCSID(0, "$NetBSD: wmi_dell.c,v ACPI_MODULE_NAME ("wmi_dell") #define WMI_DELL_PSW_DISPLAY_CYCLE 0 -#define WMI_DELL_PSW_COUNT 1 +#define WMI_DELL_PSW_RADIO_TOGGLE 1 +#define WMI_DELL_PSW_COUNT 2 #define WMI_DELL_GUID_EVENT "9DBB5994-A997-11DA-B012-B622A1EF5492" #define WMI_DELL_GUID_DESC "8D9DDCBC-A997-11DA-B012-B622A1EF5492" @@ -82,7 +83,7 @@ const struct wmi_dell_actions { {WMI_DELLA_PMF, 0x, 0xe006, PMFE_DISPLAY_BRIGHTNESS_UP}, {WMI_DELLA_PSW, 0x, 0xe00b, WMI_DELL_PSW_DISPLAY_CYCLE}, - {WMI_DELLA_PMF, 0x, 0xe008, PMFE_RADIO_TOGGLE}, + {WMI_DELLA_PSW, 0x, 0xe008, WMI_DELL_PSW_RADIO_TOGGLE}, {WMI_DELLA_IGN, 0x, 0xe00c, 0}, /* keyboard illumination */ /* volume control */ @@ -96,14 +97,16 @@ const struct wmi_dell_actions { /* type 0x10 */ {WMI_DELLA_PMF, 0x0010, 0x0057, PMFE_DISPLAY_BRIGHTNESS_DOWN}, {WMI_DELLA_PMF, 0x0010, 0x0058, PMFE_DISPLAY_BRIGHTNESS_UP}, + {WMI_DELLA_IGN, 0x0010, 0x0150, 0}, /* XXX microphone toggle */ {WMI_DELLA_IGN, 0x0010, 0x0151, 0}, /* Fn-lock */ {WMI_DELLA_IGN, 0x0010, 0x0152, 0}, /* keyboard illumination */ - {WMI_DELLA_PMF, 0x0010, 0x0153, PMFE_RADIO_TOGGLE}, + {WMI_DELLA_PSW, 0x0010, 0x0153, WMI_DELL_PSW_RADIO_TOGGLE}, {WMI_DELLA_IGN, 0x0010, 0x0155, 0}, /* Stealth mode toggle */ + {WMI_DELLA_PSW, 0x0010, 0xE008, WMI_DELL_PSW_RADIO_TOGGLE}, {WMI_DELLA_IGN, 0x0010, 0xE035, 0}, /* Fn-lock */ /* type 0x11 */ - {WMI_DELLA_IGN, 0x0011, 0x02eb5, 0}, /* keyboard illumination */ + {WMI_DELLA_IGN, 0x0011, 0x02eb, 0}, /* keyboard illumination */ }; static int wmi_dell_match(device_t, cfdata_t, void *); @@ -182,9 +185,23 @@ wmi_dell_attach(device_t parent, device_ e = sysmon_pswitch_register(>sc_smpsw[WMI_DELL_PSW_DISPLAY_CYCLE]); + if (e != 0) { + sc->sc_smpsw_valid = false; + goto end; + } + + sc->sc_smpsw[WMI_DELL_PSW_RADIO_TOGGLE].smpsw_name = + PSWITCH_HK_WIRELESS_BUTTON; + + sc->sc_smpsw[WMI_DELL_PSW_RADIO_TOGGLE].smpsw_type = + PSWITCH_TYPE_HOTKEY; + + e = sysmon_pswitch_register(>sc_smpsw[WMI_DELL_PSW_RADIO_TOGGLE]); + if (e != 0) sc->sc_smpsw_valid = false; +end: (void)pmf_device_register(self, wmi_dell_suspend, wmi_dell_resume); }
CVS commit: src/sys/dev/dm
Module Name:src Committed By: tkusumi Date: Wed Dec 4 16:55:30 UTC 2019 Modified Files: src/sys/dev/dm: device-mapper.c dm_pdev.c Log Message: dm: Minor fixes/cleanups To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/dev/dm/device-mapper.c cvs rdiff -u -r1.14 -r1.15 src/sys/dev/dm/dm_pdev.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/dm/device-mapper.c diff -u src/sys/dev/dm/device-mapper.c:1.43 src/sys/dev/dm/device-mapper.c:1.44 --- src/sys/dev/dm/device-mapper.c:1.43 Wed Dec 4 15:31:12 2019 +++ src/sys/dev/dm/device-mapper.c Wed Dec 4 16:55:30 2019 @@ -1,4 +1,4 @@ -/*$NetBSD: device-mapper.c,v 1.43 2019/12/04 15:31:12 tkusumi Exp $ */ +/*$NetBSD: device-mapper.c,v 1.44 2019/12/04 16:55:30 tkusumi Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -616,13 +616,13 @@ dmstrategy(struct buf *bp) * Find out what tables I want to select. */ SLIST_FOREACH(table_en, tbl, next) { - /* I need need number of bytes not blocks. */ + /* I need number of bytes not blocks. */ table_start = table_en->start * DEV_BSIZE; /* * I have to sub 1 from table_en->length to prevent * off by one error */ - table_end = table_start + (table_en->length)* DEV_BSIZE; + table_end = table_start + table_en->length * DEV_BSIZE; start = MAX(table_start, buf_start); Index: src/sys/dev/dm/dm_pdev.c diff -u src/sys/dev/dm/dm_pdev.c:1.14 src/sys/dev/dm/dm_pdev.c:1.15 --- src/sys/dev/dm/dm_pdev.c:1.14 Wed Dec 4 15:31:12 2019 +++ src/sys/dev/dm/dm_pdev.c Wed Dec 4 16:55:30 2019 @@ -1,4 +1,4 @@ -/*$NetBSD: dm_pdev.c,v 1.14 2019/12/04 15:31:12 tkusumi Exp $ */ +/*$NetBSD: dm_pdev.c,v 1.15 2019/12/04 16:55:30 tkusumi Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: dm_pdev.c,v 1.14 2019/12/04 15:31:12 tkusumi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dm_pdev.c,v 1.15 2019/12/04 16:55:30 tkusumi Exp $"); #include #include @@ -43,7 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: dm_pdev.c,v #include "dm.h" -SLIST_HEAD(dm_pdevs, dm_pdev) dm_pdev_list; +static SLIST_HEAD(dm_pdevs, dm_pdev) dm_pdev_list; static kmutex_t dm_pdev_mutex;
CVS commit: src/sys/dev/dm
Module Name:src Committed By: tkusumi Date: Wed Dec 4 16:54:03 UTC 2019 Modified Files: src/sys/dev/dm: dm.h Log Message: dm: Comment out unused dm_dev fields documented in sys/dev/dm/doc To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/dev/dm/dm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/dm/dm.h diff -u src/sys/dev/dm/dm.h:1.31 src/sys/dev/dm/dm.h:1.32 --- src/sys/dev/dm/dm.h:1.31 Tue Dec 3 16:09:13 2019 +++ src/sys/dev/dm/dm.h Wed Dec 4 16:54:03 2019 @@ -1,4 +1,4 @@ -/*$NetBSD: dm.h,v 1.31 2019/12/03 16:09:13 tkusumi Exp $ */ +/*$NetBSD: dm.h,v 1.32 2019/12/04 16:54:03 tkusumi Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -137,12 +137,12 @@ typedef struct dm_dev { dm_table_head_t table_head; - struct dm_dev_head upcalls; + //struct dm_dev_head upcalls; struct disk *diskp; kmutex_t diskp_mtx; - TAILQ_ENTRY(dm_dev) next_upcall; /* LIST of mirrored, snapshoted devices. */ + //TAILQ_ENTRY(dm_dev) next_upcall; /* LIST of mirrored, snapshoted devices. */ TAILQ_ENTRY(dm_dev) next_devlist; /* Major device list. */ } dm_dev_t;
CVS commit: src/etc/rc.d
Module Name:src Committed By: jmcneill Date: Wed Dec 4 16:46:50 UTC 2019 Modified Files: src/etc/rc.d: zfs Log Message: Add missing rcvar=$name To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/etc/rc.d/zfs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.d/zfs diff -u src/etc/rc.d/zfs:1.2 src/etc/rc.d/zfs:1.3 --- src/etc/rc.d/zfs:1.2 Sun Dec 1 21:00:43 2019 +++ src/etc/rc.d/zfs Wed Dec 4 16:46:50 2019 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: zfs,v 1.2 2019/12/01 21:00:43 jmcneill Exp $ +# $NetBSD: zfs,v 1.3 2019/12/04 16:46:50 jmcneill Exp $ # # PROVIDE: zfs @@ -10,6 +10,7 @@ $_rc_subr_loaded . /etc/rc.subr name="zfs" +rcvar=$name start_cmd="zfs_start" stop_cmd="zfs_stop"
CVS commit: src/sys/dev/dm
Module Name:src Committed By: tkusumi Date: Wed Dec 4 15:31:12 UTC 2019 Modified Files: src/sys/dev/dm: device-mapper.c dm_dev.c dm_ioctl.c dm_pdev.c dm_table.c dm_target.c Log Message: dm: style + whitespace + indentation fixes No functional changes. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/dev/dm/device-mapper.c cvs rdiff -u -r1.12 -r1.13 src/sys/dev/dm/dm_dev.c cvs rdiff -u -r1.36 -r1.37 src/sys/dev/dm/dm_ioctl.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/dm/dm_pdev.c cvs rdiff -u -r1.8 -r1.9 src/sys/dev/dm/dm_table.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/dm/dm_target.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/dm/device-mapper.c diff -u src/sys/dev/dm/device-mapper.c:1.42 src/sys/dev/dm/device-mapper.c:1.43 --- src/sys/dev/dm/device-mapper.c:1.42 Tue Dec 3 15:36:00 2019 +++ src/sys/dev/dm/device-mapper.c Wed Dec 4 15:31:12 2019 @@ -1,4 +1,4 @@ -/*$NetBSD: device-mapper.c,v 1.42 2019/12/03 15:36:00 tkusumi Exp $ */ +/*$NetBSD: device-mapper.c,v 1.43 2019/12/04 15:31:12 tkusumi Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -149,7 +149,7 @@ static const struct cmd_function { { .cmd = "reload", .fn = dm_table_load_ioctl,.allowed = 0 }, { .cmd = "status", .fn = dm_table_status_ioctl, .allowed = 1 }, { .cmd = "table", .fn = dm_table_status_ioctl, .allowed = 1 }, - { .cmd = NULL, .fn = NULL, .allowed = 0 } + { .cmd = NULL, .fn = NULL, .allowed = 0 } }; #ifdef _MODULE @@ -194,11 +194,8 @@ dm_modcmd(modcmd_t cmd, void *arg) config_cfdriver_detach(_cd); break; } - dm_doinit(); - break; - case MODULE_CMD_FINI: /* * Disable unloading of dm module if there are any devices @@ -220,7 +217,6 @@ dm_modcmd(modcmd_t cmd, void *arg) break; case MODULE_CMD_STAT: return ENOTTY; - default: return ENOTTY; } @@ -364,7 +360,7 @@ dmioctl(dev_t dev, const u_long cmd, voi aprint_debug("dmioctl called\n"); KASSERT(data != NULL); - if (( r = disk_ioctl_switch(dev, cmd, data)) == ENOTTY) { + if ((r = disk_ioctl_switch(dev, cmd, data)) == ENOTTY) { struct plistref *pref = (struct plistref *) data; /* Check if we were called with NETBSD_DM_IOCTL ioctl @@ -429,7 +425,6 @@ dm_ioctl_switch(u_long cmd) { switch(cmd) { - case NETBSD_DM_IOCTL: aprint_debug("dm NetBSD_DM_IOCTL called\n"); break; @@ -511,8 +506,7 @@ disk_ioctl_switch(dev_t dev, u_long cmd, * Call sync target routine for all table entries. Target sync * routine basically call DIOCCACHESYNC on underlying devices. */ - SLIST_FOREACH(table_en, tbl, next) - { + SLIST_FOREACH(table_en, tbl, next) { (void)table_en->target->sync(table_en); } dm_table_release(>table_head, DM_TABLE_ACTIVE); @@ -556,7 +550,6 @@ disk_ioctl_switch(dev_t dev, u_long cmd, break; } - default: aprint_debug("unknown disk_ioctl called\n"); return ENOTTY; @@ -622,8 +615,7 @@ dmstrategy(struct buf *bp) /* * Find out what tables I want to select. */ - SLIST_FOREACH(table_en, tbl, next) - { + SLIST_FOREACH(table_en, tbl, next) { /* I need need number of bytes not blocks. */ table_start = table_en->start * DEV_BSIZE; /* @@ -672,8 +664,6 @@ dmstrategy(struct buf *bp) dm_table_release(>table_head, DM_TABLE_ACTIVE); dm_dev_unbusy(dmv); - - return; } @@ -697,15 +687,13 @@ dmsize(dev_t dev) dm_dev_t *dmv; uint64_t size; - size = 0; - if ((dmv = dm_dev_lookup(NULL, NULL, minor(dev))) == NULL) - return -ENOENT; + return -ENOENT; size = dm_table_size(>table_head); dm_dev_unbusy(dmv); - return size; + return size; } static void Index: src/sys/dev/dm/dm_dev.c diff -u src/sys/dev/dm/dm_dev.c:1.12 src/sys/dev/dm/dm_dev.c:1.13 --- src/sys/dev/dm/dm_dev.c:1.12 Tue Dec 3 16:22:01 2019 +++ src/sys/dev/dm/dm_dev.c Wed Dec 4 15:31:12 2019 @@ -1,4 +1,4 @@ -/*$NetBSD: dm_dev.c,v 1.12 2019/12/03 16:22:01 tkusumi Exp $ */ +/*$NetBSD: dm_dev.c,v 1.13 2019/12/04 15:31:12 tkusumi Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: dm_dev.c,v 1.12 2019/12/03 16:22:01 tkusumi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dm_dev.c,v 1.13 2019/12/04 15:31:12 tkusumi Exp $"); #include #include @@ -133,7 +133,6 @@ dm_dev_lookup_name(const char *dm_dev_na return NULL; TAILQ_FOREACH(dmv, _dev_list, next_devlist) { - dlen = strlen(dmv->name); if (slen != dlen) @@ -162,7 +161,6 @@ dm_dev_lookup_uuid(const char *dm_dev_uu return NULL; TAILQ_FOREACH(dmv, _dev_list, next_devlist) { - if (strlen(dmv->uuid) != len) continue; @@ -190,9 +188,7 @@ dm_dev_insert(dm_dev_t * dev) if (((dmv = dm_dev_lookup_uuid(dev->uuid)) == NULL) && ((dmv = dm_dev_lookup_name(dev->name)) == NULL)
CVS commit: src/usr.bin/mkubootimage
Module Name:src Committed By: jmcneill Date: Wed Dec 4 14:09:47 UTC 2019 Modified Files: src/usr.bin/mkubootimage: mkubootimage.c Log Message: Fix signed/unsigned comparison To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/usr.bin/mkubootimage/mkubootimage.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/mkubootimage/mkubootimage.c diff -u src/usr.bin/mkubootimage/mkubootimage.c:1.25 src/usr.bin/mkubootimage/mkubootimage.c:1.26 --- src/usr.bin/mkubootimage/mkubootimage.c:1.25 Wed Dec 4 11:21:34 2019 +++ src/usr.bin/mkubootimage/mkubootimage.c Wed Dec 4 14:09:47 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: mkubootimage.c,v 1.25 2019/12/04 11:21:34 jmcneill Exp $ */ +/* $NetBSD: mkubootimage.c,v 1.26 2019/12/04 14:09:47 jmcneill Exp $ */ /*- * Copyright (c) 2010 Jared D. McNeill @@ -30,7 +30,7 @@ #endif #include -__RCSID("$NetBSD: mkubootimage.c,v 1.25 2019/12/04 11:21:34 jmcneill Exp $"); +__RCSID("$NetBSD: mkubootimage.c,v 1.26 2019/12/04 14:09:47 jmcneill Exp $"); #include #include @@ -433,7 +433,7 @@ write_image(void *hdr, size_t hdrlen, in } if (update_image) { - if (lseek(kernel_fd, hdrlen, SEEK_SET) != hdrlen) { + if (lseek(kernel_fd, hdrlen, SEEK_SET) != (off_t)hdrlen) { perror("seek failed"); return errno; }
CVS commit: src/sys/sys
Module Name:src Committed By: kamil Date: Wed Dec 4 13:52:27 UTC 2019 Modified Files: src/sys/sys: ptrace.h Log Message: Register "PT_STOP" in ptrace PT_STRINGS To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/sys/ptrace.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/ptrace.h diff -u src/sys/sys/ptrace.h:1.66 src/sys/sys/ptrace.h:1.67 --- src/sys/sys/ptrace.h:1.66 Wed Oct 9 13:19:43 2019 +++ src/sys/sys/ptrace.h Wed Dec 4 13:52:27 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ptrace.h,v 1.66 2019/10/09 13:19:43 kamil Exp $ */ +/* $NetBSD: ptrace.h,v 1.67 2019/12/04 13:52:27 kamil Exp $ */ /*- * Copyright (c) 1984, 1993 @@ -85,7 +85,8 @@ /* 19 */"PT_SET_SIGINFO", \ /* 20 */"PT_GET_SIGINFO", \ /* 21 */"PT_RESUME", \ -/* 22 */"PT_SUSPEND", +/* 22 */"PT_SUSPEND", \ +/* 23 */"PT_STOP", /* PT_{G,S}EVENT_MASK */ typedef struct ptrace_event {
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: jmcneill Date: Wed Dec 4 13:47:03 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64: TODO Log Message: remove DTrace from TODO list To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/aarch64/aarch64/TODO Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/TODO diff -u src/sys/arch/aarch64/aarch64/TODO:1.7 src/sys/arch/aarch64/aarch64/TODO:1.8 --- src/sys/arch/aarch64/aarch64/TODO:1.7 Wed May 8 02:57:11 2019 +++ src/sys/arch/aarch64/aarch64/TODO Wed Dec 4 13:47:03 2019 @@ -1,8 +1,7 @@ -$NetBSD: TODO,v 1.7 2019/05/08 02:57:11 msaitoh Exp $ +$NetBSD: TODO,v 1.8 2019/12/04 13:47:03 jmcneill Exp $ TODO list for NetBSD/aarch64 - kernel preemption - Implement __HAVE_UCAS_FULL or __HAVE_UCAS_MP (don't use full generic impl) - pmap should be work even if PID_MAX >= 65536 (don't depend 16bit ASID) - TLB ASID in pmap should be randomized - - DTrace
CVS commit: src/distrib/notes/common
Module Name:src Committed By: uwe Date: Wed Dec 4 13:04:09 UTC 2019 Modified Files: src/distrib/notes/common: main Log Message: "Administrivia" is a real word and it was used here on purpose. To generate a diff of this commit: cvs rdiff -u -r1.559 -r1.560 src/distrib/notes/common/main Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/common/main diff -u src/distrib/notes/common/main:1.559 src/distrib/notes/common/main:1.560 --- src/distrib/notes/common/main:1.559 Wed Dec 4 09:25:43 2019 +++ src/distrib/notes/common/main Wed Dec 4 13:04:09 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: main,v 1.559 2019/12/04 09:25:43 wiz Exp $ +.\" $NetBSD: main,v 1.560 2019/12/04 13:04:09 uwe Exp $ .\" .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -909,7 +909,7 @@ where is your topic of interest; a list of possibly related man pages will be displayed. . -.Ss Administrativa +.Ss Administrivia .Pp . If you've got something to say, do so!
CVS commit: src/share/mk
Module Name:src Committed By: jmcneill Date: Wed Dec 4 11:47:52 UTC 2019 Modified Files: src/share/mk: bsd.own.mk Log Message: Enable DTrace on aarch64 To generate a diff of this commit: cvs rdiff -u -r1.1167 -r1.1168 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1167 src/share/mk/bsd.own.mk:1.1168 --- src/share/mk/bsd.own.mk:1.1167 Sun Dec 1 20:28:25 2019 +++ src/share/mk/bsd.own.mk Wed Dec 4 11:47:52 2019 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1167 2019/12/01 20:28:25 jmcneill Exp $ +# $NetBSD: bsd.own.mk,v 1.1168 2019/12/04 11:47:52 jmcneill Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -1036,6 +1036,7 @@ MKZFS?= yes # .if ${MACHINE_ARCH} == "i386" || \ ${MACHINE_ARCH} == "x86_64" || \ +${MACHINE_ARCH} == "aarch64" || \ !empty(MACHINE_ARCH:Mearm*) MKDTRACE?= yes MKCTF?= yes
CVS commit: src/distrib/sets/lists/modules
Module Name:src Committed By: jmcneill Date: Wed Dec 4 11:47:17 UTC 2019 Modified Files: src/distrib/sets/lists/modules: ad.arm md.amd64 md.i386 mi Log Message: Move dtrace_syscall_linux out of mi set list To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/distrib/sets/lists/modules/ad.arm cvs rdiff -u -r1.81 -r1.82 src/distrib/sets/lists/modules/md.amd64 cvs rdiff -u -r1.82 -r1.83 src/distrib/sets/lists/modules/md.i386 cvs rdiff -u -r1.127 -r1.128 src/distrib/sets/lists/modules/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/modules/ad.arm diff -u src/distrib/sets/lists/modules/ad.arm:1.13 src/distrib/sets/lists/modules/ad.arm:1.14 --- src/distrib/sets/lists/modules/ad.arm:1.13 Sun Sep 22 22:59:37 2019 +++ src/distrib/sets/lists/modules/ad.arm Wed Dec 4 11:47:17 2019 @@ -1,4 +1,4 @@ -# $NetBSD: ad.arm,v 1.13 2019/09/22 22:59:37 christos Exp $ +# $NetBSD: ad.arm,v 1.14 2019/12/04 11:47:17 jmcneill Exp $ ./@MODULEDIR@/compat_netbsd32 base-kernel-modules kmod ./@MODULEDIR@/compat_netbsd32/compat_netbsd32.kmod base-kernel-modules kmod @@ -46,5 +46,7 @@ ./@MODULEDIR@/compat_netbsd32_sysvipc_14/compat_netbsd32_sysvipc_14.kmod base-kernel-modules kmod ./@MODULEDIR@/compat_netbsd32_sysvipc_50 base-kernel-modules kmod ./@MODULEDIR@/compat_netbsd32_sysvipc_50/compat_netbsd32_sysvipc_50.kmod base-kernel-modules kmod +./@MODULEDIR@/dtrace_syscall_linux base-kernel-modules kmod,dtrace +./@MODULEDIR@/dtrace_syscall_linux/dtrace_syscall_linux.kmod base-kernel-modules kmod,dtrace ./@MODULEDIR@/exec_elf32 base-kernel-modules kmod ./@MODULEDIR@/exec_elf32/exec_elf32.kmod base-kernel-modules kmod Index: src/distrib/sets/lists/modules/md.amd64 diff -u src/distrib/sets/lists/modules/md.amd64:1.81 src/distrib/sets/lists/modules/md.amd64:1.82 --- src/distrib/sets/lists/modules/md.amd64:1.81 Sun Sep 22 22:59:37 2019 +++ src/distrib/sets/lists/modules/md.amd64 Wed Dec 4 11:47:17 2019 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.81 2019/09/22 22:59:37 christos Exp $ +# $NetBSD: md.amd64,v 1.82 2019/12/04 11:47:17 jmcneill Exp $ # # NOTE that there are two sets of files here: # @MODULEDIR@ and amd64-xen @@ -117,6 +117,8 @@ ./@MODULEDIR@/drmkms_agp/drmkms_agp.kmod base-kernel-modules kmod ./@MODULEDIR@/drmkms_pci base-kernel-modules kmod ./@MODULEDIR@/drmkms_pci/drmkms_pci.kmod base-kernel-modules kmod +./@MODULEDIR@/dtrace_syscall_linux base-kernel-modules kmod,dtrace +./@MODULEDIR@/dtrace_syscall_linux/dtrace_syscall_linux.kmod base-kernel-modules kmod,dtrace ./@MODULEDIR@/dtrace_syscall_linux32 base-kernel-modules kmod,dtrace ./@MODULEDIR@/dtrace_syscall_linux32/dtrace_syscall_linux32.kmod base-kernel-modules kmod,dtrace ./@MODULEDIR@/dtrace_syscall_netbsd32 base-kernel-modules kmod,dtrace Index: src/distrib/sets/lists/modules/md.i386 diff -u src/distrib/sets/lists/modules/md.i386:1.82 src/distrib/sets/lists/modules/md.i386:1.83 --- src/distrib/sets/lists/modules/md.i386:1.82 Wed Sep 19 16:11:53 2018 +++ src/distrib/sets/lists/modules/md.i386 Wed Dec 4 11:47:17 2019 @@ -1,4 +1,4 @@ -# $NetBSD: md.i386,v 1.82 2018/09/19 16:11:53 maxv Exp $ +# $NetBSD: md.i386,v 1.83 2019/12/04 11:47:17 jmcneill Exp $ # # NOTE that there are two sets of files here: @MODULEDIR@ and i386pae-xen # @@ -79,6 +79,8 @@ ./@MODULEDIR@/drmkms_agp/drmkms_agp.kmod base-kernel-modules kmod ./@MODULEDIR@/drmkms_pci base-kernel-modules kmod ./@MODULEDIR@/drmkms_pci/drmkms_pci.kmod base-kernel-modules kmod +./@MODULEDIR@/dtrace_syscall_linux base-kernel-modules kmod,dtrace +./@MODULEDIR@/dtrace_syscall_linux/dtrace_syscall_linux.kmod base-kernel-modules kmod,dtrace ./@MODULEDIR@/emdtvbase-kernel-modules kmod ./@MODULEDIR@/emdtv/emdtv.kmod base-kernel-modules kmod ./@MODULEDIR@/estbase-kernel-modules kmod Index: src/distrib/sets/lists/modules/mi diff -u src/distrib/sets/lists/modules/mi:1.127 src/distrib/sets/lists/modules/mi:1.128 --- src/distrib/sets/lists/modules/mi:1.127 Mon Oct 28 13:19:50 2019 +++ src/distrib/sets/lists/modules/mi Wed Dec 4 11:47:17 2019 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.127 2019/10/28 13:19:50 maya Exp $ +# $NetBSD: mi,v 1.128 2019/12/04 11:47:17 jmcneill Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -148,8 +148,6 @@ ./@MODULEDIR@/dtrace_sdt/dtrace_sdt.kmod base-kernel-modules kmod,dtrace ./@MODULEDIR@/dtrace_syscallbase-kernel-modules kmod,dtrace ./@MODULEDIR@/dtrace_syscall/dtrace_syscall.kmod base-kernel-modules kmod,dtrace -./@MODULEDIR@/dtrace_syscall_linux base-kernel-modules kmod,dtrace -./@MODULEDIR@/dtrace_syscall_linux/dtrace_syscall_linux.kmod base-kernel-modules kmod,dtrace ./@MODULEDIR@/dtvbase-kernel-modules kmod ./@MODULEDIR@/dtv/dtv.kmod base-kernel-modules kmod ./@MODULEDIR@/dtv_mathbase-kernel-modules kmod
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Wed Dec 4 11:25:04 UTC 2019 Modified Files: src/sys/arch/evbarm/conf: mk.generic64 Log Message: Update arm64 image header in place To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/conf/mk.generic64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/mk.generic64 diff -u src/sys/arch/evbarm/conf/mk.generic64:1.3 src/sys/arch/evbarm/conf/mk.generic64:1.4 --- src/sys/arch/evbarm/conf/mk.generic64:1.3 Sat Sep 29 17:05:55 2018 +++ src/sys/arch/evbarm/conf/mk.generic64 Wed Dec 4 11:25:04 2019 @@ -1,4 +1,4 @@ -# $NetBSD: mk.generic64,v 1.3 2018/09/29 17:05:55 jmcneill Exp $ +# $NetBSD: mk.generic64,v 1.4 2019/12/04 11:25:04 jmcneill Exp $ SYSTEM_FIRST_OBJ= start.o SYSTEM_FIRST_SFILE= ${ARM}/aarch64/start.S @@ -7,15 +7,15 @@ _OSRELEASE!= ${HOST_SH} $S/conf/osrelea BOARDTYPE= evbarm64 -MKUBOOTIMAGEARGS= -f arm64 -a 0x20 +MKUBOOTIMAGEARGS= -f arm64 -u -a 0x20 MKKNLIMG= ${THISARM}/compile/rpi-mkknlimg.sh -SYSTEM_LD_TAIL_EXTRA+=; \ - echo ${OBJCOPY} -S -O binary $@ $@.bin; \ - ${OBJCOPY} -S -O binary $@ $@.bin; \ - echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.bin $@.ub; \ - ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.bin $@.ub; \ - echo ${MKKNLIMG} $@.ub $@.img; \ - ${HOST_SH} ${MKKNLIMG} $@.ub $@.img; +SYSTEM_LD_TAIL_EXTRA+= && \ + echo ${OBJCOPY} -S -O binary $@ $@.bin && \ + ${OBJCOPY} -S -O binary $@ $@.bin && \ + echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.bin $@.ub && \ + ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@.bin $@.ub && \ + echo ${MKKNLIMG} $@.ub $@.img && \ + ${HOST_SH} ${MKKNLIMG} $@.ub $@.img EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.img@}
CVS commit: src/sys/arch/aarch64
Module Name:src Committed By: jmcneill Date: Wed Dec 4 11:24:31 UTC 2019 Modified Files: src/sys/arch/aarch64/aarch64: start.S src/sys/arch/aarch64/conf: Makefile.aarch64 Log Message: Fix alignment of .text section by changing load address to 0xffc0 and adding 64 bytes of padding before the entry point. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/aarch64/aarch64/start.S cvs rdiff -u -r1.15 -r1.16 src/sys/arch/aarch64/conf/Makefile.aarch64 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/start.S diff -u src/sys/arch/aarch64/aarch64/start.S:1.2 src/sys/arch/aarch64/aarch64/start.S:1.3 --- src/sys/arch/aarch64/aarch64/start.S:1.2 Thu Oct 18 09:01:51 2018 +++ src/sys/arch/aarch64/aarch64/start.S Wed Dec 4 11:24:31 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: start.S,v 1.2 2018/10/18 09:01:51 skrll Exp $ */ +/* $NetBSD: start.S,v 1.3 2019/12/04 11:24:31 jmcneill Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu @@ -32,7 +32,7 @@ #include -RCSID("$NetBSD: start.S,v 1.2 2018/10/18 09:01:51 skrll Exp $") +RCSID("$NetBSD: start.S,v 1.3 2019/12/04 11:24:31 jmcneill Exp $") /* load far effective address (pc relative) */ .macro ADDR, reg, addr @@ -41,6 +41,11 @@ RCSID("$NetBSD: start.S,v 1.2 2018/10/18 .endm /* + * Padding at start of kernel image to make room for 64-byte header (non-ELF booting) + */ +.space 64, 0x0 + +/* * Kernel start routine for aarch64 boards. */ .global start Index: src/sys/arch/aarch64/conf/Makefile.aarch64 diff -u src/sys/arch/aarch64/conf/Makefile.aarch64:1.15 src/sys/arch/aarch64/conf/Makefile.aarch64:1.16 --- src/sys/arch/aarch64/conf/Makefile.aarch64:1.15 Sun Mar 3 07:04:40 2019 +++ src/sys/arch/aarch64/conf/Makefile.aarch64 Wed Dec 4 11:24:31 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.aarch64,v 1.15 2019/03/03 07:04:40 maxv Exp $ +# $NetBSD: Makefile.aarch64,v 1.16 2019/12/04 11:24:31 jmcneill Exp $ # Makefile for NetBSD # @@ -74,7 +74,7 @@ locore.o: ${ARM}/aarch64/locore.S assym. ## (5) link settings ## KERNLDSCRIPT?= ${ARM}/conf/kern.ldscript -LOADADDRESS?= 0xffc00040 +LOADADDRESS?= 0xffc0 LINKFLAGS_NORMAL= -X # Strip AArch64 mapping symbols from the kernel image, as they interfere
CVS commit: src/usr.bin/mkubootimage
Module Name:src Committed By: jmcneill Date: Wed Dec 4 11:21:34 UTC 2019 Modified Files: src/usr.bin/mkubootimage: mkubootimage.1 mkubootimage.c Log Message: Add -u flag for updating headers in place. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.bin/mkubootimage/mkubootimage.1 cvs rdiff -u -r1.24 -r1.25 src/usr.bin/mkubootimage/mkubootimage.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/mkubootimage/mkubootimage.1 diff -u src/usr.bin/mkubootimage/mkubootimage.1:1.12 src/usr.bin/mkubootimage/mkubootimage.1:1.13 --- src/usr.bin/mkubootimage/mkubootimage.1:1.12 Sun Feb 4 15:44:51 2018 +++ src/usr.bin/mkubootimage/mkubootimage.1 Wed Dec 4 11:21:34 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: mkubootimage.1,v 1.12 2018/02/04 15:44:51 jmcneill Exp $ +.\" $NetBSD: mkubootimage.1,v 1.13 2019/12/04 11:21:34 jmcneill Exp $ .\" .\" Copyright (c) 2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 4, 2018 +.Dd December 4, 2019 .Dt MKUBOOTIMAGE 1 .Os .Sh NAME @@ -46,6 +46,7 @@ .Fl n Ar image .Op Fl O Po freebsd Ns | Ns linux Ns | Ns netbsd Ns | Ns openbsd Pc .Fl T No ( fs Ns | Ns kernel Ns | Ns kernel_noload Ns | Ns ramdisk Ns | Ns standalone ) +.Op Fl u .Ar source destination .\" .Sh DESCRIPTION @@ -124,6 +125,8 @@ Defines the image type. This is required for .Qq uimg format images. +.It Fl u +Update the header in an existing file instead of creating a new one. .El .Pp The required Index: src/usr.bin/mkubootimage/mkubootimage.c diff -u src/usr.bin/mkubootimage/mkubootimage.c:1.24 src/usr.bin/mkubootimage/mkubootimage.c:1.25 --- src/usr.bin/mkubootimage/mkubootimage.c:1.24 Sun Feb 4 17:33:34 2018 +++ src/usr.bin/mkubootimage/mkubootimage.c Wed Dec 4 11:21:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: mkubootimage.c,v 1.24 2018/02/04 17:33:34 jmcneill Exp $ */ +/* $NetBSD: mkubootimage.c,v 1.25 2019/12/04 11:21:34 jmcneill Exp $ */ /*- * Copyright (c) 2010 Jared D. McNeill @@ -30,7 +30,7 @@ #endif #include -__RCSID("$NetBSD: mkubootimage.c,v 1.24 2018/02/04 17:33:34 jmcneill Exp $"); +__RCSID("$NetBSD: mkubootimage.c,v 1.25 2019/12/04 11:21:34 jmcneill Exp $"); #include #include @@ -74,6 +74,7 @@ static uint32_t image_entrypoint = 0; static char *image_name; static uint32_t image_magic = IH_MAGIC; static enum image_format image_format = FMT_UIMG; +static int update_image = 0; static const struct uboot_image_format { enum image_format format; @@ -269,7 +270,7 @@ usage(void) fprintf(stderr, " -O "); fprintf(stderr, " -T "); fprintf(stderr, " -a [-e ] [-m ] -n "); - fprintf(stderr, " [-f ]"); + fprintf(stderr, " [-f ] [-u]"); fprintf(stderr, " \n"); exit(EXIT_FAILURE); @@ -431,6 +432,13 @@ write_image(void *hdr, size_t hdrlen, in } } + if (update_image) { + if (lseek(kernel_fd, hdrlen, SEEK_SET) != hdrlen) { + perror("seek failed"); + return errno; + } + } + while ((rlen = read(kernel_fd, buf, sizeof(buf))) > 0) { wlen = write(image_fd, buf, rlen); if (wlen != rlen) { @@ -453,7 +461,7 @@ main(int argc, char *argv[]) int ch; unsigned long long num; - while ((ch = getopt(argc, argv, "A:C:E:O:T:a:e:f:hm:n:")) != -1) { + while ((ch = getopt(argc, argv, "A:C:E:O:T:a:e:f:hm:n:u")) != -1) { switch (ch) { case 'A': /* arch */ image_arch = get_arch(optarg); @@ -504,6 +512,9 @@ main(int argc, char *argv[]) case 'n': /* name */ image_name = strdup(optarg); break; + case 'u': /* update image */ + update_image = 1; + break; case 'h': default: usage();
CVS commit: src/sys/modules/dtrace
Module Name:src Committed By: martin Date: Wed Dec 4 10:12:47 UTC 2019 Modified Files: src/sys/modules/dtrace: Makefile Log Message: Add syscall_linux back for other arm architectures (accidently removed in previous) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/modules/dtrace/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/dtrace/Makefile diff -u src/sys/modules/dtrace/Makefile:1.7 src/sys/modules/dtrace/Makefile:1.8 --- src/sys/modules/dtrace/Makefile:1.7 Tue Dec 3 22:10:56 2019 +++ src/sys/modules/dtrace/Makefile Wed Dec 4 10:12:47 2019 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.7 2019/12/03 22:10:56 jmcneill Exp $ +# $NetBSD: Makefile,v 1.8 2019/12/04 10:12:47 martin Exp $ # $FreeBSD: src/sys/modules/dtrace/Makefile,v 1.6.2.1 2009/08/03 08:13:06 kensmith Exp $ .include SUBDIR= dtrace sdt fbt lockstat profile syscall -.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" +.if ${MACHINE_ARCH} != "aarch64" SUBDIR+= linux_syscall .endif
CVS commit: src/sys
Module Name:src Committed By: wiz Date: Wed Dec 4 09:34:13 UTC 2019 Modified Files: src/sys/external/bsd/drm2/dist/drm/vmwgfx: vmwgfx_kms.c src/sys/kern: kern_cpu.c Log Message: Fix typo in comment (typlogy) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_kms.c cvs rdiff -u -r1.80 -r1.81 src/sys/kern/kern_cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_kms.c diff -u src/sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_kms.c:1.4 src/sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_kms.c:1.5 --- src/sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_kms.c:1.4 Mon Aug 27 04:58:37 2018 +++ src/sys/external/bsd/drm2/dist/drm/vmwgfx/vmwgfx_kms.c Wed Dec 4 09:34:12 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: vmwgfx_kms.c,v 1.4 2018/08/27 04:58:37 riastradh Exp $ */ +/* $NetBSD: vmwgfx_kms.c,v 1.5 2019/12/04 09:34:12 wiz Exp $ */ /** * @@ -28,7 +28,7 @@ **/ #include -__KERNEL_RCSID(0, "$NetBSD: vmwgfx_kms.c,v 1.4 2018/08/27 04:58:37 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vmwgfx_kms.c,v 1.5 2019/12/04 09:34:12 wiz Exp $"); #include "vmwgfx_kms.h" @@ -1671,7 +1671,7 @@ int vmw_kms_update_layout_ioctl(struct d if (dev_priv->active_display_unit == vmw_du_screen_target) { /* - * For Screen Targets, the limits for a toplogy are: + * For Screen Targets, the limits for a topology are: * 1. Bounding box (assuming 32bpp) must be < prim_bb_mem * 2. Total pixels (assuming 32bpp) must be < prim_bb_mem */ Index: src/sys/kern/kern_cpu.c diff -u src/sys/kern/kern_cpu.c:1.80 src/sys/kern/kern_cpu.c:1.81 --- src/sys/kern/kern_cpu.c:1.80 Tue Dec 3 22:28:41 2019 +++ src/sys/kern/kern_cpu.c Wed Dec 4 09:34:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_cpu.c,v 1.80 2019/12/03 22:28:41 ad Exp $ */ +/* $NetBSD: kern_cpu.c,v 1.81 2019/12/04 09:34:13 wiz Exp $ */ /*- * Copyright (c) 2007, 2008, 2009, 2010, 2012, 2019 The NetBSD Foundation, Inc. @@ -56,7 +56,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_cpu.c,v 1.80 2019/12/03 22:28:41 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_cpu.c,v 1.81 2019/12/04 09:34:13 wiz Exp $"); #include "opt_cpu_ucode.h" @@ -654,7 +654,7 @@ cpu_topology_peers(void) } /* - * Print out the toplogy lists. + * Print out the topology lists. */ static void cpu_topology_print(void) @@ -686,7 +686,7 @@ cpu_topology_print(void) } /* - * Fake up toplogy info if we have none, or if what we got was bogus. + * Fake up topology info if we have none, or if what we got was bogus. * Don't override ci_package_id, etc, if cpu_topology_present is set. * MD code also uses these. */
CVS commit: src/distrib/notes/common
Module Name:src Committed By: wiz Date: Wed Dec 4 09:25:43 UTC 2019 Modified Files: src/distrib/notes/common: main Log Message: Fix some typos. To generate a diff of this commit: cvs rdiff -u -r1.558 -r1.559 src/distrib/notes/common/main Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/common/main diff -u src/distrib/notes/common/main:1.558 src/distrib/notes/common/main:1.559 --- src/distrib/notes/common/main:1.558 Wed Dec 4 09:03:34 2019 +++ src/distrib/notes/common/main Wed Dec 4 09:25:43 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: main,v 1.558 2019/12/04 09:03:34 martin Exp $ +.\" $NetBSD: main,v 1.559 2019/12/04 09:25:43 wiz Exp $ .\" .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -527,10 +527,10 @@ The result of these improvements is a st production use that rivals most commercially available systems. .Pp .if !\n[RELEASE_BRANCH] \{ \ -Please note that this build is a developement snapshot, not a formal release. +Please note that this build is a development snapshot, not a formal release. You are testing the bleeding edge of .Nx -developement, and no formal or informal testing may have been done for +development, and no formal or informal testing may have been done for this snapshot (yet). .Pp .\} \" !\n[RELEASE_BRANCH] \{ @@ -815,7 +815,7 @@ However, new binaries can not be mixed w libraries are incompatible. .Pp .Ic sysinst -does not provide an automatic mechanism to partlially upgrade an old +does not provide an automatic mechanism to partially upgrade an old installation. There are two ways to handle the transition: .(enum @@ -909,7 +909,7 @@ where is your topic of interest; a list of possibly related man pages will be displayed. . -.Ss Administrivia +.Ss Administrativa .Pp . If you've got something to say, do so!
CVS commit: src/distrib/notes/common
Module Name:src Committed By: martin Date: Wed Dec 4 09:03:34 UTC 2019 Modified Files: src/distrib/notes/common: main Log Message: For HEAD builds, add a small "bleeding edge" warning when we talk about a rock solid OS. To generate a diff of this commit: cvs rdiff -u -r1.557 -r1.558 src/distrib/notes/common/main Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/common/main diff -u src/distrib/notes/common/main:1.557 src/distrib/notes/common/main:1.558 --- src/distrib/notes/common/main:1.557 Wed Nov 27 09:29:25 2019 +++ src/distrib/notes/common/main Wed Dec 4 09:03:34 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: main,v 1.557 2019/11/27 09:29:25 martin Exp $ +.\" $NetBSD: main,v 1.558 2019/12/04 09:03:34 martin Exp $ .\" .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -526,6 +526,14 @@ numerous userland enhancements. The result of these improvements is a stable operating system fit for production use that rivals most commercially available systems. .Pp +.if !\n[RELEASE_BRANCH] \{ \ +Please note that this build is a developement snapshot, not a formal release. +You are testing the bleeding edge of +.Nx +developement, and no formal or informal testing may have been done for +this snapshot (yet). +.Pp +.\} \" !\n[RELEASE_BRANCH] \{ It is impossible to completely summarize the massive development that went into the .Nx
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Dec 4 09:03:45 UTC 2019 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Simplify. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.649 -r1.650 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.649 src/sys/dev/pci/if_wm.c:1.650 --- src/sys/dev/pci/if_wm.c:1.649 Thu Sep 26 04:16:03 2019 +++ src/sys/dev/pci/if_wm.c Wed Dec 4 09:03:45 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.649 2019/09/26 04:16:03 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.650 2019/12/04 09:03:45 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.649 2019/09/26 04:16:03 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.650 2019/12/04 09:03:45 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -9284,7 +9284,7 @@ wm_linkintr_serdes(struct wm_softc *sc, { struct ifnet *ifp = >sc_ethercom.ec_if; struct mii_data *mii = >sc_mii; - struct ifmedia_entry *ife = sc->sc_mii.mii_media.ifm_cur; + struct ifmedia_entry *ife = mii->mii_media.ifm_cur; uint32_t pcs_adv, pcs_lpab, reg; DPRINTF(WM_DEBUG_LINK, ("%s: %s:\n", device_xname(sc->sc_dev), @@ -11409,7 +11409,7 @@ wm_gmii_statchg(struct ifnet *ifp) sc->sc_ctrl |= CTRL_RFCE; } - if (sc->sc_mii.mii_media_active & IFM_FDX) { + if (mii->mii_media_active & IFM_FDX) { DPRINTF(WM_DEBUG_LINK, ("%s: LINK: statchg: FDX\n", ifp->if_xname)); sc->sc_tctl |= TCTL_COLD(TX_COLLISION_DISTANCE_FDX); @@ -11424,7 +11424,7 @@ wm_gmii_statchg(struct ifnet *ifp) CSR_WRITE(sc, (sc->sc_type < WM_T_82543) ? WMREG_OLD_FCRTL : WMREG_FCRTL, sc->sc_fcrtl); if (sc->sc_type == WM_T_80003) { - switch (IFM_SUBTYPE(sc->sc_mii.mii_media_active)) { + switch (IFM_SUBTYPE(mii->mii_media_active)) { case IFM_1000_T: wm_kmrn_writereg(sc, KUMCTRLSTA_OFFSET_HD_CTRL, KUMCTRLSTA_HD_CTRL_1000_DEFAULT); @@ -12190,7 +12190,7 @@ wm_serdes_mediastatus(struct ifnet *ifp, { struct wm_softc *sc = ifp->if_softc; struct mii_data *mii = >sc_mii; - struct ifmedia_entry *ife = sc->sc_mii.mii_media.ifm_cur; + struct ifmedia_entry *ife = mii->mii_media.ifm_cur; uint32_t pcs_adv, pcs_lpab, reg; ifmr->ifm_status = IFM_AVALID; @@ -15459,7 +15459,7 @@ wm_hv_phy_workarounds_ich8lan(struct wm_ if ((rv = wm_set_mdio_slow_mode_hv(sc)) != 0) return rv; - child = LIST_FIRST(>sc_mii.mii_phys); + child = LIST_FIRST(>mii_phys); if (child != NULL) phyrev = child->mii_mpd_rev; @@ -15494,8 +15494,7 @@ wm_hv_phy_workarounds_ich8lan(struct wm_ */ if ((child != NULL) && (phyrev < 2)) { PHY_RESET(child); - rv = sc->sc_mii.mii_writereg(dev, 2, MII_BMCR, - 0x3140); + rv = mii->mii_writereg(dev, 2, MII_BMCR, 0x3140); if (rv != 0) return rv; }
CVS commit: src/etc/root
Module Name:src Committed By: mrg Date: Wed Dec 4 08:21:50 UTC 2019 Modified Files: src/etc/root: dot.cshrc Log Message: remove no longer existing gnu/* from cdpath. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/etc/root/dot.cshrc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/root/dot.cshrc diff -u src/etc/root/dot.cshrc:1.27 src/etc/root/dot.cshrc:1.28 --- src/etc/root/dot.cshrc:1.27 Thu Mar 1 06:12:09 2018 +++ src/etc/root/dot.cshrc Wed Dec 4 08:21:50 2019 @@ -1,4 +1,4 @@ -# $NetBSD: dot.cshrc,v 1.27 2018/03/01 06:12:09 snj Exp $ +# $NetBSD: dot.cshrc,v 1.28 2019/12/04 08:21:50 mrg Exp $ alias h history alias j jobs -l @@ -28,7 +28,7 @@ set history=1000 set path=(/sbin /usr/sbin /bin /usr/bin /usr/pkg/sbin /usr/pkg/bin /usr/X11R7/bin /usr/local/sbin /usr/local/bin) # directory stuff: cdpath/cd/back -set cdpath=(/usr/src/{sys,bin,sbin,usr.{bin,sbin},lib,libexec,share,local,games,gnu/{usr.{bin,sbin},libexec,lib,games}}) +set cdpath=(/usr/src/{sys,bin,sbin,usr.{bin,sbin},lib,libexec,share,local,games,libexec,lib,games}}) if ($?prompt && -x /usr/bin/id ) then if (`/usr/bin/id -u` == 0) then
CVS commit: src/sys/dev/ic
Module Name:src Committed By: msaitoh Date: Wed Dec 4 08:21:43 UTC 2019 Modified Files: src/sys/dev/ic: gem.c Log Message: >From OpenBSD: - Fix error message. - Whitespace fix. To generate a diff of this commit: cvs rdiff -u -r1.122 -r1.123 src/sys/dev/ic/gem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/gem.c diff -u src/sys/dev/ic/gem.c:1.122 src/sys/dev/ic/gem.c:1.123 --- src/sys/dev/ic/gem.c:1.122 Wed Dec 4 08:12:03 2019 +++ src/sys/dev/ic/gem.c Wed Dec 4 08:21:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: gem.c,v 1.122 2019/12/04 08:12:03 msaitoh Exp $ */ +/* $NetBSD: gem.c,v 1.123 2019/12/04 08:21:43 msaitoh Exp $ */ /* * @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.122 2019/12/04 08:12:03 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.123 2019/12/04 08:21:43 msaitoh Exp $"); #include "opt_inet.h" @@ -770,7 +770,7 @@ gem_reset_rx(struct gem_softc *sc) bus_space_barrier(t, h, GEM_RX_CONFIG, 4, BUS_SPACE_BARRIER_WRITE); /* Wait till it finishes */ if (!gem_bitwait(sc, h, GEM_RX_CONFIG, 1, 0)) - aprint_error_dev(sc->sc_dev, "cannot disable read dma\n"); + aprint_error_dev(sc->sc_dev, "cannot disable rx dma\n"); /* Wait 5ms extra. */ delay(5000); @@ -878,7 +878,7 @@ gem_reset_tx(struct gem_softc *sc) bus_space_barrier(t, h, GEM_TX_CONFIG, 4, BUS_SPACE_BARRIER_WRITE); /* Wait till it finishes */ if (!gem_bitwait(sc, h, GEM_TX_CONFIG, 1, 0)) - aprint_error_dev(sc->sc_dev, "cannot disable read dma\n"); + aprint_error_dev(sc->sc_dev, "cannot disable tx dma\n"); /* OpenBSD 1.34 */ /* Wait 5ms extra. */ delay(5000); @@ -887,7 +887,7 @@ gem_reset_tx(struct gem_softc *sc) bus_space_barrier(t, h, GEM_RESET, 4, BUS_SPACE_BARRIER_WRITE); /* Wait till it finishes */ if (!gem_bitwait(sc, h2, GEM_RESET, GEM_RESET_TX, 0)) { - aprint_error_dev(sc->sc_dev, "cannot reset receiver\n"); + aprint_error_dev(sc->sc_dev, "cannot reset transmitter\n"); /* OpenBSD 1.34 */ return (1); } return (0); @@ -1213,7 +1213,6 @@ gem_init(struct ifnet *ifp) if (sc->sc_hwinit) (*sc->sc_hwinit)(sc); - /* step 15. Give the receiver a swift kick */ bus_space_write_4(t, h, GEM_RX_KICK, GEM_NRXDESC-4);
CVS commit: src/sys/dev/ic
Module Name:src Committed By: msaitoh Date: Wed Dec 4 08:12:03 UTC 2019 Modified Files: src/sys/dev/ic: gem.c Log Message: Rename ifm to ife for struct ifmedia_entry *. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/sys/dev/ic/gem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/gem.c diff -u src/sys/dev/ic/gem.c:1.121 src/sys/dev/ic/gem.c:1.122 --- src/sys/dev/ic/gem.c:1.121 Fri Sep 13 07:55:06 2019 +++ src/sys/dev/ic/gem.c Wed Dec 4 08:12:03 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: gem.c,v 1.121 2019/09/13 07:55:06 msaitoh Exp $ */ +/* $NetBSD: gem.c,v 1.122 2019/12/04 08:12:03 msaitoh Exp $ */ /* * @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.121 2019/09/13 07:55:06 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gem.c,v 1.122 2019/12/04 08:12:03 msaitoh Exp $"); #include "opt_inet.h" @@ -246,7 +246,7 @@ gem_attach(struct gem_softc *sc, const u struct mii_data *mii = >sc_mii; bus_space_tag_t t = sc->sc_bustag; bus_space_handle_t h = sc->sc_h1; - struct ifmedia_entry *ifm; + struct ifmedia_entry *ife; int i, error, phyaddr; uint32_t v; char *nullbuf; @@ -559,11 +559,11 @@ gem_attach(struct gem_softc *sc, const u * If we support GigE media, we support jumbo frames too. * Unless we are Apple. */ - TAILQ_FOREACH(ifm, >mii_media.ifm_list, ifm_list) { - if (IFM_SUBTYPE(ifm->ifm_media) == IFM_1000_T || - IFM_SUBTYPE(ifm->ifm_media) == IFM_1000_SX || - IFM_SUBTYPE(ifm->ifm_media) == IFM_1000_LX || - IFM_SUBTYPE(ifm->ifm_media) == IFM_1000_CX) { + TAILQ_FOREACH(ife, >mii_media.ifm_list, ifm_list) { + if (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T || + IFM_SUBTYPE(ife->ifm_media) == IFM_1000_SX || + IFM_SUBTYPE(ife->ifm_media) == IFM_1000_LX || + IFM_SUBTYPE(ife->ifm_media) == IFM_1000_CX) { if (!GEM_IS_APPLE(sc)) sc->sc_ethercom.ec_capabilities |= ETHERCAP_JUMBO_MTU;