Module Name: src Committed By: maxv Date: Fri May 15 19:28:10 UTC 2020
Modified Files: src/sys/arch/arm/sunxi: sun8i_crypto.c src/sys/dev/i2c: ibmhawk.c src/sys/dev/ic: ciss.c src/sys/dev/usb: if_cdce.c src/sys/fs/puffs: puffs_msgif.c puffs_vnops.c src/sys/net/agr: ieee8023ad_lacp_sm_tx.c Log Message: hardclock_ticks -> getticks() To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/sunxi/sun8i_crypto.c cvs rdiff -u -r1.8 -r1.9 src/sys/dev/i2c/ibmhawk.c cvs rdiff -u -r1.41 -r1.42 src/sys/dev/ic/ciss.c cvs rdiff -u -r1.71 -r1.72 src/sys/dev/usb/if_cdce.c cvs rdiff -u -r1.105 -r1.106 src/sys/fs/puffs/puffs_msgif.c cvs rdiff -u -r1.215 -r1.216 src/sys/fs/puffs/puffs_vnops.c cvs rdiff -u -r1.3 -r1.4 src/sys/net/agr/ieee8023ad_lacp_sm_tx.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/sunxi/sun8i_crypto.c diff -u src/sys/arch/arm/sunxi/sun8i_crypto.c:1.13 src/sys/arch/arm/sunxi/sun8i_crypto.c:1.14 --- src/sys/arch/arm/sunxi/sun8i_crypto.c:1.13 Thu Apr 30 03:40:53 2020 +++ src/sys/arch/arm/sunxi/sun8i_crypto.c Fri May 15 19:28:09 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sun8i_crypto.c,v 1.13 2020/04/30 03:40:53 riastradh Exp $ */ +/* $NetBSD: sun8i_crypto.c,v 1.14 2020/05/15 19:28:09 maxv Exp $ */ /*- * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(1, "$NetBSD: sun8i_crypto.c,v 1.13 2020/04/30 03:40:53 riastradh Exp $"); +__KERNEL_RCSID(1, "$NetBSD: sun8i_crypto.c,v 1.14 2020/05/15 19:28:09 maxv Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -614,7 +614,7 @@ sun8i_crypto_submit(struct sun8i_crypto_ /* Loaded up and ready to go. Start a timer ticking. */ sc->sc_chan[i].cc_task = task; - sc->sc_chan[i].cc_starttime = atomic_load_relaxed(&hardclock_ticks); + sc->sc_chan[i].cc_starttime = getticks(); callout_schedule(&sc->sc_timeout, SUN8I_CRYPTO_TIMEOUT); /* XXX Consider polling if cold to get entropy earlier. */ @@ -725,7 +725,7 @@ sun8i_crypto_worker(struct work *wk, voi sc->sc_esr = 0; /* Check the time to determine what's timed out. */ - now = atomic_load_relaxed(&hardclock_ticks); + now = getticks(); /* Process the channels. */ for (i = 0; i < SUN8I_CRYPTO_NCHAN; i++) { Index: src/sys/dev/i2c/ibmhawk.c diff -u src/sys/dev/i2c/ibmhawk.c:1.8 src/sys/dev/i2c/ibmhawk.c:1.9 --- src/sys/dev/i2c/ibmhawk.c:1.8 Mon Sep 3 16:29:31 2018 +++ src/sys/dev/i2c/ibmhawk.c Fri May 15 19:28:09 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ibmhawk.c,v 1.8 2018/09/03 16:29:31 riastradh Exp $ */ +/* $NetBSD: ibmhawk.c,v 1.9 2020/05/15 19:28:09 maxv Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -365,13 +365,13 @@ ibmhawk_refresh(struct sysmon_envsys *sm struct ibmhawk_softc *sc = sme->sme_cookie; /* No more than two refreshes per second. */ - if (hardclock_ticks-sc->sc_refresh < hz/2) + if (getticks() - sc->sc_refresh < hz/2) return; #if IBMHAWK_DEBUG > 1 aprint_normal_dev(sc->sc_dev, "refresh \"%s\" delta %d\n", - edata->desc, hardclock_ticks-sc->sc_refresh); + edata->desc, getticks() - sc->sc_refresh); #endif - sc->sc_refresh = hardclock_ticks; + sc->sc_refresh = getticks(); ibmhawk_refreshall(sc, false); } Index: src/sys/dev/ic/ciss.c diff -u src/sys/dev/ic/ciss.c:1.41 src/sys/dev/ic/ciss.c:1.42 --- src/sys/dev/ic/ciss.c:1.41 Sun Nov 10 21:16:35 2019 +++ src/sys/dev/ic/ciss.c Fri May 15 19:28:10 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ciss.c,v 1.41 2019/11/10 21:16:35 chs Exp $ */ +/* $NetBSD: ciss.c,v 1.42 2020/05/15 19:28:10 maxv Exp $ */ /* $OpenBSD: ciss.c,v 1.68 2013/05/30 16:15:02 deraadt Exp $ */ /* @@ -19,7 +19,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.41 2019/11/10 21:16:35 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.42 2020/05/15 19:28:10 maxv Exp $"); #include "bio.h" @@ -501,7 +501,7 @@ ciss_wait(struct ciss_softc *sc, struct tohz = mstohz(ms); if (tohz == 0) tohz = 1; - etick = hardclock_ticks + tohz; + etick = getticks() + tohz; for (;;) { ccb->ccb_state = CISS_CCB_POLL; @@ -517,7 +517,7 @@ ciss_wait(struct ciss_softc *sc, struct ciss_done(ccb); return 0; } - tohz = etick - hardclock_ticks; + tohz = etick - getticks(); if (tohz <= 0) return EWOULDBLOCK; CISS_DPRINTF(CISS_D_CMD, ("T")); Index: src/sys/dev/usb/if_cdce.c diff -u src/sys/dev/usb/if_cdce.c:1.71 src/sys/dev/usb/if_cdce.c:1.72 --- src/sys/dev/usb/if_cdce.c:1.71 Fri May 8 06:24:28 2020 +++ src/sys/dev/usb/if_cdce.c Fri May 15 19:28:10 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_cdce.c,v 1.71 2020/05/08 06:24:28 skrll Exp $ */ +/* $NetBSD: if_cdce.c,v 1.72 2020/05/15 19:28:10 maxv Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wp...@windriver.com> @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.71 2020/05/08 06:24:28 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.72 2020/05/15 19:28:10 maxv Exp $"); #include <sys/param.h> @@ -245,7 +245,8 @@ cdce_attach(device_t parent, device_t se ether_aton_r(un->un_eaddr, sizeof(un->un_eaddr), eaddr_str)) { aprint_normal_dev(self, "faking address\n"); un->un_eaddr[0] = 0x2a; - memcpy(&un->un_eaddr[1], &hardclock_ticks, sizeof(uint32_t)); + uint32_t ticks = getticks(); + memcpy(&un->un_eaddr[1], &ticks, sizeof(ticks)); un->un_eaddr[5] = (uint8_t)(device_unit(un->un_dev)); } Index: src/sys/fs/puffs/puffs_msgif.c diff -u src/sys/fs/puffs/puffs_msgif.c:1.105 src/sys/fs/puffs/puffs_msgif.c:1.106 --- src/sys/fs/puffs/puffs_msgif.c:1.105 Sun Feb 23 15:46:40 2020 +++ src/sys/fs/puffs/puffs_msgif.c Fri May 15 19:28:10 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_msgif.c,v 1.105 2020/02/23 15:46:40 ad Exp $ */ +/* $NetBSD: puffs_msgif.c,v 1.106 2020/05/15 19:28:10 maxv Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: puffs_msgif.c,v 1.105 2020/02/23 15:46:40 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: puffs_msgif.c,v 1.106 2020/05/15 19:28:10 maxv Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -1046,7 +1046,7 @@ puffs_msgif_dispatch(void *ctx, struct p * once the file server acknowledges a request */ #define TIMED_OUT(expire) \ - ((int)((unsigned int)hardclock_ticks - (unsigned int)expire) > 0) + ((int)((unsigned int)getticks() - (unsigned int)expire) > 0) void puffs_sop_thread(void *arg) { Index: src/sys/fs/puffs/puffs_vnops.c diff -u src/sys/fs/puffs/puffs_vnops.c:1.215 src/sys/fs/puffs/puffs_vnops.c:1.216 --- src/sys/fs/puffs/puffs_vnops.c:1.215 Thu Apr 23 21:47:07 2020 +++ src/sys/fs/puffs/puffs_vnops.c Fri May 15 19:28:10 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_vnops.c,v 1.215 2020/04/23 21:47:07 ad Exp $ */ +/* $NetBSD: puffs_vnops.c,v 1.216 2020/05/15 19:28:10 maxv Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.215 2020/04/23 21:47:07 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.216 2020/05/15 19:28:10 maxv Exp $"); #include <sys/param.h> #include <sys/buf.h> @@ -40,7 +40,7 @@ __KERNEL_RCSID(0, "$NetBSD: puffs_vnops. #include <sys/namei.h> #include <sys/vnode.h> #include <sys/proc.h> -#include <sys/kernel.h> /* For hz, hardclock_ticks */ +#include <sys/kernel.h> /* For hz, getticks() */ #include <uvm/uvm.h> @@ -473,11 +473,11 @@ puffs_abortbutton(struct puffs_mount *pm */ #define TTL_TO_TIMEOUT(ts) \ - (hardclock_ticks + (ts->tv_sec * hz) + (ts->tv_nsec * hz / 1000000000)) + (getticks() + (ts->tv_sec * hz) + (ts->tv_nsec * hz / 1000000000)) #define TTL_VALID(ts) \ ((ts != NULL) && !((ts->tv_sec == 0) && (ts->tv_nsec == 0))) #define TIMED_OUT(expire) \ - ((int)((unsigned int)hardclock_ticks - (unsigned int)expire) > 0) + ((int)((unsigned int)getticks() - (unsigned int)expire) > 0) int puffs_vnop_lookup(void *v) { @@ -661,7 +661,7 @@ puffs_vnop_lookup(void *v) * lifetime of busiest * nodes - with some limits. */ grace = 10 * puffs_sopreq_expire_timeout; - cpn->pn_cn_grace = hardclock_ticks + grace; + cpn->pn_cn_grace = getticks() + grace; vp = cvp; } Index: src/sys/net/agr/ieee8023ad_lacp_sm_tx.c diff -u src/sys/net/agr/ieee8023ad_lacp_sm_tx.c:1.3 src/sys/net/agr/ieee8023ad_lacp_sm_tx.c:1.4 --- src/sys/net/agr/ieee8023ad_lacp_sm_tx.c:1.3 Sun Dec 11 12:24:54 2005 +++ src/sys/net/agr/ieee8023ad_lacp_sm_tx.c Fri May 15 19:28:10 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ieee8023ad_lacp_sm_tx.c,v 1.3 2005/12/11 12:24:54 christos Exp $ */ +/* $NetBSD: ieee8023ad_lacp_sm_tx.c,v 1.4 2020/05/15 19:28:10 maxv Exp $ */ /*- * Copyright (c)2005 YAMAMOTO Takashi, @@ -27,13 +27,13 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_tx.c,v 1.3 2005/12/11 12:24:54 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_sm_tx.c,v 1.4 2020/05/15 19:28:10 maxv Exp $"); #include <sys/param.h> #include <sys/callout.h> #include <sys/mbuf.h> #include <sys/systm.h> -#include <sys/kernel.h> /* hardclock_ticks */ +#include <sys/kernel.h> /* getticks() */ #include <net/if.h> #include <net/if_ether.h> @@ -67,7 +67,7 @@ lacp_sm_tx(struct lacp_port *lp) } /* rate limit */ - now = hardclock_ticks; + now = getticks(); if ((unsigned int)(now - lp->lp_last_lacpdu_sent) <= LACP_FAST_PERIODIC_TIME * hz / 3) { return;