CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: hannken Date: Thu Dec 6 09:58:52 UTC 2018 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_znode.c Log Message: Add missing ZFS_OBJ_HOLD_ENTER() / ZFS_OBJ_HOLD_EXIT() to zfs_zget_cleaner(). To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c:1.22 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c:1.23 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c:1.22 Wed Nov 28 09:55:36 2018 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c Thu Dec 6 09:58:52 2018 @@ -1188,8 +1188,11 @@ zfs_zget_cleaner(zfsvfs_t *zfsvfs, uint6 znode_t *zp; int err; + ZFS_OBJ_HOLD_ENTER(zfsvfs, obj_num); + err = sa_buf_hold(zfsvfs->z_os, obj_num, NULL, &db); if (err) { + ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); return (SET_ERROR(err)); } @@ -1199,12 +1202,15 @@ zfs_zget_cleaner(zfsvfs_t *zfsvfs, uint6 (doi.doi_bonus_type == DMU_OT_ZNODE && doi.doi_bonus_size < sizeof (znode_phys_t { sa_buf_rele(db, NULL); + ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); return (SET_ERROR(EINVAL)); } hdl = dmu_buf_get_user(db); - KASSERT(hdl != NULL); + ASSERT3P(hdl, !=, NULL); zp = sa_get_userdata(hdl); + ASSERT3U(zp->z_id, ==, obj_num); sa_buf_rele(db, NULL); + ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); *zpp = zp; return (0); }
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: hannken Date: Thu Dec 6 10:00:40 UTC 2018 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c Log Message: We have component names as counted strings (cn_nameptr, cn_namelen) but ZFS expects a null-terminated name. Always create a copy with PNBUF_GET()/strlcpy()/PNBUF_PUT(). For LOOKUP use a small buffer on stack and allocate/free compomnent names longer than 30 chars. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.36 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.37 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.36 Fri Nov 30 09:53:40 2018 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Thu Dec 6 10:00:40 2018 @@ -3847,8 +3847,13 @@ zfs_rename_relock(struct vnode *sdvp, st zfsvfs_t *zfsvfs; struct vnode *nvp, *svp, *tvp; znode_t *sdzp, *tdzp, *szp, *tzp; +#ifdef __FreeBSD__ const char *snm = scnp->cn_nameptr; const char *tnm = tcnp->cn_nameptr; +#endif +#ifdef __NetBSD__ + char *snm, *tnm; +#endif int error; #ifdef __FreeBSD__ @@ -3918,7 +3923,15 @@ relock: * Re-resolve svp to be certain it still exists and fetch the * correct vnode. */ +#ifdef __NetBSD__ + /* ZFS wants a null-terminated name. */ + snm = PNBUF_GET(); + strlcpy(snm, scnp->cn_nameptr, scnp->cn_namelen + 1); +#endif error = zfs_dirent_lookup(sdzp, snm, &szp, ZEXISTS); +#ifdef __NetBSD__ + PNBUF_PUT(snm); +#endif if (error != 0) { /* Source entry invalid or not there. */ ZFS_EXIT(zfsvfs); @@ -3937,7 +3950,15 @@ relock: /* * Re-resolve tvp, if it disappeared we just carry on. */ +#ifdef __NetBSD__ + /* ZFS wants a null-terminated name. */ + tnm = PNBUF_GET(); + strlcpy(tnm, tcnp->cn_nameptr, tcnp->cn_namelen + 1); +#endif error = zfs_dirent_lookup(tdzp, tnm, &tzp, 0); +#ifdef __NetBSD__ + PNBUF_PUT(tnm); +#endif if (error != 0) { ZFS_EXIT(zfsvfs); VOP_UNLOCK(sdvp, 0); @@ -4138,8 +4159,13 @@ zfs_rename(vnode_t *sdvp, vnode_t **svpp znode_t *sdzp, *tdzp, *szp, *tzp; zilog_t *zilog = NULL; dmu_tx_t *tx; +#ifdef __FreeBSD__ char *snm = __UNCONST(scnp->cn_nameptr); char *tnm = __UNCONST(tcnp->cn_nameptr); +#endif +#ifdef __NetBSD__ + char *snm, *tnm; +#endif int error = 0; /* Reject renames across filesystems. */ @@ -4167,6 +4193,13 @@ zfs_rename(vnode_t *sdvp, vnode_t **svpp sdzp = VTOZ(sdvp); zfsvfs = tdzp->z_zfsvfs; zilog = zfsvfs->z_log; +#ifdef __NetBSD__ + /* ZFS wants a null-terminated name. */ + snm = PNBUF_GET(); + strlcpy(snm, scnp->cn_nameptr, scnp->cn_namelen + 1); + tnm = PNBUF_GET(); + strlcpy(tnm, tcnp->cn_nameptr, tcnp->cn_namelen + 1); +#endif /* * After we re-enter ZFS_ENTER() we will have to revalidate all @@ -4388,6 +4421,10 @@ unlockout: /* all 4 vnodes are locked, VOP_UNLOCK(*svpp, 0); VOP_UNLOCK(sdvp, 0); +#ifdef __NetBSD__ + PNBUF_PUT(snm); + PNBUF_PUT(tnm); +#endif if (*tvpp != sdvp && *tvpp != *svpp) if (*tvpp != NULL) @@ -5060,12 +5097,11 @@ zfs_netbsd_lookup(void *v) struct vnode *dvp = ap->a_dvp; struct vnode **vpp = ap->a_vpp; struct componentname *cnp = ap->a_cnp; - char nm[NAME_MAX + 1]; + char *nm, short_nm[31]; int error; int iswhiteout; KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE); - KASSERT(cnp->cn_namelen < sizeof nm); *vpp = NULL; @@ -5095,11 +5131,19 @@ zfs_netbsd_lookup(void *v) * zfs_lookup wants a null-terminated component name, but namei * gives us a pointer into the full pathname. */ + ASSERT(cnp->cn_namelen < PATH_MAX - 1); + if (cnp->cn_namelen + 1 > sizeof(short_nm)) + nm = PNBUF_GET(); + else + nm = short_nm; (void)strlcpy(nm, cnp->cn_nameptr, cnp->cn_namelen + 1); error = zfs_lookup(dvp, nm, vpp, NULL, 0, NULL, cnp->cn_cred, NULL, NULL, NULL); + if (nm != short_nm) + PNBUF_PUT(nm); + /* * Translate errors to match our namei insanity. Also, if the * caller wants to create an entry here, it's apparently our @@ -5174,6 +5218,7 @@ zfs_netbsd_create(void *v) struct vnode **vpp = ap->a_vpp; struct componentname *cnp = ap->a_cnp; struct vattr *vap = ap->a_vap; + char *nm; int mode; int error; @@ -5182,9 +5227,14 @@ zfs_netbsd_create(void *v) vattr_init_mask(vap); mode = vap->va_mode & ALLPERMS; + /* ZFS wants a null-terminated name. */ + nm = PNBUF_GET(); + (void)strlcpy(nm, cnp->cn_nameptr, cnp->cn_namelen + 1); + /* XXX !EXCL is wrong here... */ - error = zfs_create(dvp, __UNCONST(cnp->cn_nameptr), vap, !EXCL, mode, - vpp, cnp->cn_cred, NULL); + error = zfs_create(dvp, nm, vap, !EXCL, mode, vpp, cnp->cn_cred, NULL); + + PNBUF_PUT(nm); KASSERT((error == 0) =
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Thu Dec 6 13:25:02 UTC 2018 Modified Files: src/sys/dev/pci/ixgbe: if_sriov.c ixgbe.c ixgbe.h ixgbe_82599.c ixgbe_api.c ixgbe_api.h ixgbe_features.h ixgbe_netbsd.c ixgbe_netbsd.h ixgbe_phy.c ixgbe_type.h ixgbe_x550.c ixgbe_x550.h Log Message: Apply FreeBSD ix-3.3.6.tar.gz's change to NetBSD. Tested on C3000 and X550-T1, but not tested on Xeon D: - Add firmware recovery mode for X550, X550A(Xeon D) and X550EM (C3000): - FreeBSD always set IXGBE_FEATURE_RECOVERY_MODE without checking the NVM image version. We compare it against 2.0 to not to make new callout and not to call extra atomic operations. - In some FreeBSD's sysctl functions, atomic_load_acq_int() is called before a null pointer check. We call it after null pointer check. - Before calling atomic_load_acq_uint(), check adapter->feat_en flags to save atomic operation call. - We don't check recovery_mode in ixgbe_set_sysctl_value() because this function doesn't touch any hardware register. - NetBSD don't have FreeBSD's atomic_load_acq_int()-like function, so do it with membar_sync(). Thanks riastradh@ for the advice. - FreeBSD's ix-3.3.6 changed ixgbe_enable_aim from TRUE to FALSE, but we will keep it as TRUE because we have already fixed some bugs. - Remove IXGBE_DEV_ID_82599_LS(0x154f) support again. I don't know why. This was added in ix-3.2.18.tar.gz(NetBSD: ixgbe_82599.c rev. 1.20) and removed in ix-3.3.6.tar.gz. - On X550EMU, use ixgbe_identify_sfp_module_X550em() instead of ixgbe_identify_module_generic(). ixgbe_identify_sfp_module_X550em() has extra check (e.g. exclude 1G copper). - if_sriov.c's change doesn't affect to NetBSD because we don't support SR-IOV PF function. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/ixgbe/if_sriov.c \ src/sys/dev/pci/ixgbe/ixgbe_x550.h cvs rdiff -u -r1.168 -r1.169 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.52 -r1.53 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/ixgbe/ixgbe_82599.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/pci/ixgbe/ixgbe_api.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/ixgbe/ixgbe_api.h \ src/sys/dev/pci/ixgbe/ixgbe_x550.c cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/ixgbe/ixgbe_features.h cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/ixgbe/ixgbe_netbsd.c \ src/sys/dev/pci/ixgbe/ixgbe_netbsd.h cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/ixgbe/ixgbe_phy.c cvs rdiff -u -r1.36 -r1.37 src/sys/dev/pci/ixgbe/ixgbe_type.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/pci/ixgbe/if_sriov.c diff -u src/sys/dev/pci/ixgbe/if_sriov.c:1.4 src/sys/dev/pci/ixgbe/if_sriov.c:1.5 --- src/sys/dev/pci/ixgbe/if_sriov.c:1.4 Mon Sep 3 16:29:33 2018 +++ src/sys/dev/pci/ixgbe/if_sriov.c Thu Dec 6 13:25:02 2018 @@ -250,6 +250,64 @@ ixgbe_vf_set_default_vlan(struct adapter } /* ixgbe_vf_set_default_vlan */ +static void +ixgbe_clear_vfmbmem(struct ixgbe_hw *hw, struct ixgbe_vf *vf) +{ + uint32_t vf_index = IXGBE_VF_INDEX(vf->pool); + uint16_t mbx_size = hw->mbx.size; + uint16_t i; + + IXGBE_CORE_LOCK_ASSERT(adapter); + + for (i = 0; i < mbx_size; ++i) + IXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf_index), i, 0x0); +} /* ixgbe_clear_vfmbmem */ + + +static void +ixgbe_toggle_txdctl(struct ixgbe_hw *hw, struct ixgbe_vf *vf) +{ + uint32_t vf_index, offset, reg; + uint8_t queue_count, i; + + IXGBE_CORE_LOCK_ASSERT(adapter); + + vf_index = IXGBE_VF_INDEX(vf->pool); + + /* Determine number of queues by checking + * number of virtual functions */ + reg = IXGBE_READ_REG(hw, IXGBE_GCR_EXT); + switch (reg & IXGBE_GCR_EXT_VT_MODE_MASK) { + case IXGBE_GCR_EXT_VT_MODE_64: + queue_count = 2; + break; + case IXGBE_GCR_EXT_VT_MODE_32: + queue_count = 4; + break; + default: + return; + } + + /* Toggle queues */ + for (i = 0; i < queue_count; ++i) { + /* Calculate offset of current queue */ + offset = queue_count * vf_index + i; + + /* Enable queue */ + reg = IXGBE_READ_REG(hw, IXGBE_PVFTXDCTL(offset)); + reg |= IXGBE_TXDCTL_ENABLE; + IXGBE_WRITE_REG(hw, IXGBE_PVFTXDCTL(offset), reg); + IXGBE_WRITE_FLUSH(hw); + + /* Disable queue */ + reg = IXGBE_READ_REG(hw, IXGBE_PVFTXDCTL(offset)); + reg &= ~IXGBE_TXDCTL_ENABLE; + IXGBE_WRITE_REG(hw, IXGBE_PVFTXDCTL(offset), reg); + IXGBE_WRITE_FLUSH(hw); + } +} /* ixgbe_toggle_txdctl */ + + static boolean_t ixgbe_vf_frame_size_compatible(struct adapter *adapter, struct ixgbe_vf *vf) { @@ -305,6 +363,8 @@ ixgbe_process_vf_reset(struct adapter *a // XXX clear multicast addresses ixgbe_clear_rar(&adapter->hw, vf->rar_index); + ixgbe_clear_vfmbmem(&adapter->hw, vf); + ixgbe_toggle_txdctl(&adapter->hw, vf); vf->api_ver = IXGBE_API_VER_UNKNOWN; } /* ixgbe_process_vf_reset */ Index: src/sys/dev/pci/ixgbe/ixgbe_x550.h diff -u src/sys/dev/pci/ixgbe/ixgbe_x550.h:1.4 src/sys
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Thu Dec 6 13:51:43 UTC 2018 Modified Files: src/sys/kern: kern_proc.c Log Message: Typo fix (Geoff Wing) To generate a diff of this commit: cvs rdiff -u -r1.222 -r1.223 src/sys/kern/kern_proc.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/kern_proc.c diff -u src/sys/kern/kern_proc.c:1.222 src/sys/kern/kern_proc.c:1.223 --- src/sys/kern/kern_proc.c:1.222 Wed Dec 5 13:16:51 2018 +++ src/sys/kern/kern_proc.c Thu Dec 6 08:51:43 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_proc.c,v 1.222 2018/12/05 18:16:51 christos Exp $ */ +/* $NetBSD: kern_proc.c,v 1.223 2018/12/06 13:51:43 christos Exp $ */ /*- * Copyright (c) 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.222 2018/12/05 18:16:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.223 2018/12/06 13:51:43 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_kstack.h" @@ -223,7 +223,7 @@ static int sysctl_kern_proc_args(SYSCTLF static int sysctl_security_expose_address(SYSCTLFN_PROTO); #ifdef KASLR -static int kern_expose_address_= 0; +static int kern_expose_address = 0; #else static int kern_expose_address = 1; #endif
CVS commit: src/share/misc
Module Name:src Committed By: ginsbach Date: Thu Dec 6 14:22:48 UTC 2018 Modified Files: src/share/misc: acronyms.comp Log Message: Add BUAG, DCIM (2x), and SDP To generate a diff of this commit: cvs rdiff -u -r1.218 -r1.219 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.218 src/share/misc/acronyms.comp:1.219 --- src/share/misc/acronyms.comp:1.218 Wed Dec 5 14:44:54 2018 +++ src/share/misc/acronyms.comp Thu Dec 6 14:22:48 2018 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.218 2018/12/05 14:44:54 sevan Exp $ +$NetBSD: acronyms.comp,v 1.219 2018/12/06 14:22:48 ginsbach Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -179,6 +179,7 @@ BTS bit test [and] set BTS bug tracking system BW bandwidth BWM block-write mode +BUAG big ugly ASCII graphic CA certificate authority CAD computer-aided design CAM computer assisted manufacturing @@ -319,6 +320,8 @@ DCC direct cable connect DCD data carrier detect DCE data control equipment DCE distributed computing environment +DCIM data center infrastructure management +DCIM digital camera images DCL Digital Command Language DCOM distributed component object model DCOP Desktop COmmunication Protocol @@ -1263,6 +1266,7 @@ SDL Simple Declarative Language SDL Simple Direct-media Layer SDLC {software,system,systems} development life cycle SDN software defined networking +SDP Session Description Protocol SDRAM synchronous dynamic random access memory SDS software defined storage SDT syntax-directed translation
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: maxv Date: Thu Dec 6 17:26:18 UTC 2018 Modified Files: src/sys/arch/x86/include: pmap.h Log Message: Fix inconsistency, these are indexes and not types, no real functional change. To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/sys/arch/x86/include/pmap.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/x86/include/pmap.h diff -u src/sys/arch/x86/include/pmap.h:1.91 src/sys/arch/x86/include/pmap.h:1.92 --- src/sys/arch/x86/include/pmap.h:1.91 Mon Nov 19 20:44:51 2018 +++ src/sys/arch/x86/include/pmap.h Thu Dec 6 17:26:18 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.91 2018/11/19 20:44:51 maxv Exp $ */ +/* $NetBSD: pmap.h,v 1.92 2018/12/06 17:26:18 maxv Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -156,16 +156,15 @@ struct bootspace { vaddr_t emodule; }; -#define SLSPACE_NONE 0 -#define SLAREA_USER 1 -#define SLAREA_PTE 2 -#define SLAREA_MAIN 3 -#define SLAREA_PCPU 4 -#define SLAREA_DMAP 5 -#define SLAREA_HYPV 6 -#define SLAREA_ASAN 7 -#define SLAREA_KERN 8 -#define SLSPACE_NAREAS 9 +#define SLAREA_USER 0 +#define SLAREA_PTE 1 +#define SLAREA_MAIN 2 +#define SLAREA_PCPU 3 +#define SLAREA_DMAP 4 +#define SLAREA_HYPV 5 +#define SLAREA_ASAN 6 +#define SLAREA_KERN 7 +#define SLSPACE_NAREAS 8 struct slotspace { struct {
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: maxv Date: Thu Dec 6 17:44:28 UTC 2018 Modified Files: src/sys/arch/x86/x86: svs.c Log Message: Simplify, use _pi instead of modulos, no real functional change. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/x86/x86/svs.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/x86/x86/svs.c diff -u src/sys/arch/x86/x86/svs.c:1.21 src/sys/arch/x86/x86/svs.c:1.22 --- src/sys/arch/x86/x86/svs.c:1.21 Mon Nov 19 20:28:01 2018 +++ src/sys/arch/x86/x86/svs.c Thu Dec 6 17:44:28 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: svs.c,v 1.21 2018/11/19 20:28:01 maxv Exp $ */ +/* $NetBSD: svs.c,v 1.22 2018/12/06 17:44:28 maxv Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: svs.c,v 1.21 2018/11/19 20:28:01 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svs.c,v 1.22 2018/12/06 17:44:28 maxv Exp $"); #include "opt_svs.h" @@ -237,19 +237,17 @@ struct svs_utls { static pd_entry_t * svs_tree_add(struct cpu_info *ci, vaddr_t va) { - extern const vaddr_t ptp_frames[]; + extern const vaddr_t ptp_masks[]; extern const int ptp_shifts[]; - extern const long nbpd[]; pd_entry_t *dstpde; - size_t i, pidx, mod; struct vm_page *pg; + size_t i, pidx; paddr_t pa; dstpde = ci->ci_svs_updir; - mod = (size_t)-1; for (i = PTP_LEVELS; i > 1; i--) { - pidx = pl_i(va % mod, i); + pidx = pl_pi(va, i); if (!pmap_valid_entry(dstpde[pidx])) { pg = uvm_pagealloc(NULL, 0, NULL, UVM_PGA_ZERO); @@ -263,7 +261,6 @@ svs_tree_add(struct cpu_info *ci, vaddr_ pa = (paddr_t)(dstpde[pidx] & PG_FRAME); dstpde = (pd_entry_t *)PMAP_DIRECT_MAP(pa); - mod = nbpd[i-1]; } return dstpde; @@ -279,7 +276,7 @@ svs_page_add(struct cpu_info *ci, vaddr_ /* Create levels L4, L3 and L2. */ dstpde = svs_tree_add(ci, va); - pidx = pl1_i(va % NBPD_L2); + pidx = pl1_pi(va); /* * If 'va' is in a large page, we need to compute its physical @@ -369,7 +366,7 @@ svs_utls_init(struct cpu_info *ci) if (pmap_valid_entry(L1_BASE[pl1_i(utlsva)])) { panic("%s: local page already mapped", __func__); } - pidx = pl1_i(utlsva % NBPD_L2); + pidx = pl1_pi(utlsva); if (pmap_valid_entry(pd[pidx])) { panic("%s: L1 page already mapped", __func__); }
CVS commit: src/sys/arch/aarch64/include
Module Name:src Committed By: skrll Date: Thu Dec 6 18:36:06 UTC 2018 Modified Files: src/sys/arch/aarch64/include: param.h Log Message: Expose CACHE_LINE_SIZE (and COHERENCY_UNIT) so that fstat can work To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/aarch64/include/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/include/param.h diff -u src/sys/arch/aarch64/include/param.h:1.7 src/sys/arch/aarch64/include/param.h:1.8 --- src/sys/arch/aarch64/include/param.h:1.7 Sun Nov 18 15:52:03 2018 +++ src/sys/arch/aarch64/include/param.h Thu Dec 6 18:36:06 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.7 2018/11/18 15:52:03 skrll Exp $ */ +/* $NetBSD: param.h,v 1.8 2018/12/06 18:36:06 skrll Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -134,12 +134,10 @@ #define MSGBUFSIZE 16384 /* default message buffer size */ #endif -#ifdef _KERNEL +#define COHERENCY_UNIT 128 +#define CACHE_LINE_SIZE 128 -#if defined(CPU_THUNDERX) -#define COHERENCY_UNIT 128 -#define CACHE_LINE_SIZE 128 -#endif +#ifdef _KERNEL #ifndef __HIDE_DELAY void delay(unsigned int);
CVS commit: src/usr.bin/w
Module Name:src Committed By: sevan Date: Thu Dec 6 19:01:53 UTC 2018 Modified Files: src/usr.bin/w: uptime.1 Log Message: Add a statement about uptime's relation to w(1). To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/w/uptime.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/w/uptime.1 diff -u src/usr.bin/w/uptime.1:1.10 src/usr.bin/w/uptime.1:1.11 --- src/usr.bin/w/uptime.1:1.10 Thu Aug 7 11:17:13 2003 +++ src/usr.bin/w/uptime.1 Thu Dec 6 19:01:53 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: uptime.1,v 1.10 2003/08/07 11:17:13 agc Exp $ +.\" $NetBSD: uptime.1,v 1.11 2018/12/06 19:01:53 sevan Exp $ .\" .\" Copyright (c) 1980, 1990, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)uptime.1 8.2 (Berkeley) 4/18/94 .\" -.Dd April 18, 1994 +.Dd December 6, 2018 .Dt UPTIME 1 .Os .Sh NAME @@ -40,16 +40,19 @@ .Sh DESCRIPTION The .Nm -utility displays the current time, -the length of time the system has been up, -the number of users, and the load average of the system over the last -1, 5, and 15 minutes. +utility presents a subset of the information obtained by the +.Xr w 1 +utility. +.Nm +displays the current time, the length of time the system has been up, the number +of users, and the load average of the system over the last 1, 5, and 15 minutes. .Sh FILES .Bl -tag -width /netbsd .It Pa /netbsd system name list .El .Sh SEE ALSO +.Xr top 1 , .Xr w 1 .Sh HISTORY The
CVS commit: src/usr.bin/w
Module Name:src Committed By: sevan Date: Thu Dec 6 19:15:35 UTC 2018 Modified Files: src/usr.bin/w: uptime.1 w.1 Log Message: Document the source of load average figures. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.bin/w/uptime.1 cvs rdiff -u -r1.18 -r1.19 src/usr.bin/w/w.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/w/uptime.1 diff -u src/usr.bin/w/uptime.1:1.11 src/usr.bin/w/uptime.1:1.12 --- src/usr.bin/w/uptime.1:1.11 Thu Dec 6 19:01:53 2018 +++ src/usr.bin/w/uptime.1 Thu Dec 6 19:15:35 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: uptime.1,v 1.11 2018/12/06 19:01:53 sevan Exp $ +.\" $NetBSD: uptime.1,v 1.12 2018/12/06 19:15:35 sevan Exp $ .\" .\" Copyright (c) 1980, 1990, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -46,6 +46,8 @@ utility. .Nm displays the current time, the length of time the system has been up, the number of users, and the load average of the system over the last 1, 5, and 15 minutes. +The load average is obtained using +.Xr getloadavg 3 . .Sh FILES .Bl -tag -width /netbsd .It Pa /netbsd @@ -53,7 +55,8 @@ system name list .El .Sh SEE ALSO .Xr top 1 , -.Xr w 1 +.Xr w 1 , +.Xr getloadavg 3 .Sh HISTORY The .Nm Index: src/usr.bin/w/w.1 diff -u src/usr.bin/w/w.1:1.18 src/usr.bin/w/w.1:1.19 --- src/usr.bin/w/w.1:1.18 Tue Jan 11 09:39:12 2005 +++ src/usr.bin/w/w.1 Thu Dec 6 19:15:35 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: w.1,v 1.18 2005/01/11 09:39:12 wiz Exp $ +.\" $NetBSD: w.1,v 1.19 2018/12/06 19:15:35 sevan Exp $ .\" .\" Copyright (c) 1980, 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)w.1 8.1 (Berkeley) 6/6/93 .\" -.Dd January 11, 2005 +.Dd December 6, 2018 .Dt W 1 .Os .Sh NAME @@ -51,6 +51,8 @@ been running, the number of users logged averages. The load average numbers give the number of jobs in the run queue averaged over 1, 5, and 15 minutes. +The load average is obtained using +.Xr getloadavg 3 . .Pp The fields output are the user's login name, the name of the terminal the user is on, the host from which the user is logged in, the time the user @@ -91,7 +93,8 @@ list of users on the system .Xr finger 1 , .Xr ps 1 , .Xr uptime 1 , -.Xr who 1 +.Xr who 1 , +.Xr getloadavg 3 .Sh HISTORY The .Nm
CVS commit: src/lib/libc/arch/aarch64/softfloat
Module Name:src Committed By: tih Date: Thu Dec 6 19:17:13 UTC 2018 Modified Files: src/lib/libc/arch/aarch64/softfloat: softfloat.h Log Message: Summary: Align softfloat float128 with libgcc. While libgcc adapts its float128 data structure to the endianness of the architecture, the softfloat code in libc didn't. With both of them handling the same values, softfloat must follow the toolchain. OK: riastradh To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/aarch64/softfloat/softfloat.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/aarch64/softfloat/softfloat.h diff -u src/lib/libc/arch/aarch64/softfloat/softfloat.h:1.1 src/lib/libc/arch/aarch64/softfloat/softfloat.h:1.2 --- src/lib/libc/arch/aarch64/softfloat/softfloat.h:1.1 Sun Aug 10 05:47:37 2014 +++ src/lib/libc/arch/aarch64/softfloat/softfloat.h Thu Dec 6 19:17:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: softfloat.h,v 1.1 2014/08/10 05:47:37 matt Exp $ */ +/* $NetBSD: softfloat.h,v 1.2 2018/12/06 19:17:13 tih Exp $ */ /* This is a derivative work. */ @@ -46,6 +46,7 @@ the `FLOAT128' macro and the quadruple-p #include "softfloat-qp.h" +#include #include /* @@ -63,7 +64,11 @@ typedef struct { #endif #ifdef FLOAT128 typedef struct { +#if _BYTE_ORDER == _BIG_ENDIAN unsigned long long high, low; +#else +unsigned long long low, high; +#endif } float128; #endif
CVS commit: src/sys/net
Module Name:src Committed By: knakahara Date: Fri Dec 7 05:09:39 UTC 2018 Modified Files: src/sys/net: if_ipsec.c Log Message: ipsecif(4) support input drop packet counter. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/net/if_ipsec.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_ipsec.c diff -u src/sys/net/if_ipsec.c:1.18 src/sys/net/if_ipsec.c:1.19 --- src/sys/net/if_ipsec.c:1.18 Fri Oct 19 00:12:56 2018 +++ src/sys/net/if_ipsec.c Fri Dec 7 05:09:39 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ipsec.c,v 1.18 2018/10/19 00:12:56 knakahara Exp $ */ +/* $NetBSD: if_ipsec.c,v 1.19 2018/12/07 05:09:39 knakahara Exp $ */ /* * Copyright (c) 2017 Internet Initiative Japan Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ipsec.c,v 1.18 2018/10/19 00:12:56 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ipsec.c,v 1.19 2018/12/07 05:09:39 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -509,6 +509,7 @@ if_ipsec_in_enqueue(struct mbuf *m, int ifp->if_ibytes += pktlen; ifp->if_ipackets++; } else { + ifp->if_iqdrops++; m_freem(m); }