CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: snj Date: Sat Jan 13 05:50:47 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: 472, 475, 476, 486-488 To generate a diff of this commit: cvs rdiff -u -r1.1.2.101 -r1.1.2.102 src/doc/CHANGES-8.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.0 diff -u src/doc/CHANGES-8.0:1.1.2.101 src/doc/CHANGES-8.0:1.1.2.102 --- src/doc/CHANGES-8.0:1.1.2.101 Sat Jan 13 04:44:51 2018 +++ src/doc/CHANGES-8.0 Sat Jan 13 05:50:47 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.0,v 1.1.2.101 2018/01/13 04:44:51 snj Exp $ +# $NetBSD: CHANGES-8.0,v 1.1.2.102 2018/01/13 05:50:47 snj Exp $ A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04 until the 8.0 release: @@ -8878,3 +8878,47 @@ sys/dev/mulaw.h 1.25 filters. NFC. [nat, ticket #485] +sys/dev/pci/pucdata.c1.100 + + Add support for Manhattan 158220 card. PR/52868 + [maya, ticket #472] + +sys/dev/fss.c 1.101-1.103 +usr.sbin/fssconfig/fssconfig.c 1.13 + + fss(4): + - Bounds check against media size for non-persistent snapshots. + - Treat partial read from backing store as I/O error. + - Pass residual back to b_resid for persistent snapshots. + + fssconfig(8): Use stat() information to decide if the backing + store is a directory. Depending on open() returning EISDIR + fails for mount points. + [hannken, ticket #475] + +sys/dev/ic/cs4215reg.h1.5 +sys/dev/sbus/dbri.c1.37 +sys/dev/sbus/dbrivar.h1.15 + + Overhaul the dbri driver and make it work again. PR 52786 + [macallan, ticket #476] + +sys/net/if.c 1.418 + + Check MP-safety in ifa_insert and ifa_remove only for + IFEF_MPSAFE drivers. Eventually the assertions should pass + for all drivers, however, at this point it's too eager. + PR kern/52895 + [ozaki-r, ticket #486] + +sys/net/if.c 1.417 + + Suppress the assertion of IFNET_LOCK in if_mcast_op if + MROUTING. MROUTING doesn't deal with IFNET_LOCK yet. + [ozaki-r, ticket #487] + +sys/netinet/in.c1.213 + + Don't pass rwlock to callout_halt + [ozaki-r, ticket #488] +
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: snj Date: Sat Jan 13 05:50:47 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: 472, 475, 476, 486-488 To generate a diff of this commit: cvs rdiff -u -r1.1.2.101 -r1.1.2.102 src/doc/CHANGES-8.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/netinet
Module Name:src Committed By: snj Date: Sat Jan 13 05:45:06 UTC 2018 Modified Files: src/sys/netinet [netbsd-8]: in.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #488): sys/netinet/in.c: revision 1.213 Don't pass rwlock to callout_halt To generate a diff of this commit: cvs rdiff -u -r1.203.2.5 -r1.203.2.6 src/sys/netinet/in.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/netinet/in.c diff -u src/sys/netinet/in.c:1.203.2.5 src/sys/netinet/in.c:1.203.2.6 --- src/sys/netinet/in.c:1.203.2.5 Tue Jan 2 10:56:58 2018 +++ src/sys/netinet/in.c Sat Jan 13 05:45:06 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: in.c,v 1.203.2.5 2018/01/02 10:56:58 snj Exp $ */ +/* $NetBSD: in.c,v 1.203.2.6 2018/01/13 05:45:06 snj Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.203.2.5 2018/01/02 10:56:58 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.203.2.6 2018/01/13 05:45:06 snj Exp $"); #include "arp.h" @@ -1953,6 +1953,7 @@ in_lltable_free_entry(struct lltable *ll { struct ifnet *ifp __diagused; size_t pkts_dropped; + bool locked = false; LLE_WLOCK_ASSERT(lle); KASSERT(llt != NULL); @@ -1962,15 +1963,32 @@ in_lltable_free_entry(struct lltable *ll ifp = llt->llt_ifp; IF_AFDATA_WLOCK_ASSERT(ifp); lltable_unlink_entry(llt, lle); + locked = true; } + /* + * We need to release the lock here to lle_timer proceeds; + * lle_timer should stop immediately if LLE_LINKED isn't set. + * Note that we cannot pass lle->lle_lock to callout_halt + * because it's a rwlock. + */ + LLE_ADDREF(lle); + LLE_WUNLOCK(lle); + if (locked) + IF_AFDATA_WUNLOCK(ifp); + /* cancel timer */ - if (callout_halt(>lle_timer, >lle_lock)) - LLE_REMREF(lle); + callout_halt(>lle_timer, NULL); + + LLE_WLOCK(lle); + LLE_REMREF(lle); /* Drop hold queue */ pkts_dropped = llentry_free(lle); arp_stat_add(ARP_STAT_DFRDROPPED, (uint64_t)pkts_dropped); + + if (locked) + IF_AFDATA_WLOCK(ifp); } static int
CVS commit: [netbsd-8] src/sys/netinet
Module Name:src Committed By: snj Date: Sat Jan 13 05:45:06 UTC 2018 Modified Files: src/sys/netinet [netbsd-8]: in.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #488): sys/netinet/in.c: revision 1.213 Don't pass rwlock to callout_halt To generate a diff of this commit: cvs rdiff -u -r1.203.2.5 -r1.203.2.6 src/sys/netinet/in.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/net
Module Name:src Committed By: snj Date: Sat Jan 13 05:43:44 UTC 2018 Modified Files: src/sys/net [netbsd-8]: if.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #487): sys/net/if.c: revision 1.417 Suppress the assertion of IFNET_LOCK in if_mcast_op if MROUTING MROUTING doesn't deal with IFNET_LOCK yet. Reported by kardel@ To generate a diff of this commit: cvs rdiff -u -r1.394.2.5 -r1.394.2.6 src/sys/net/if.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.c diff -u src/sys/net/if.c:1.394.2.5 src/sys/net/if.c:1.394.2.6 --- src/sys/net/if.c:1.394.2.5 Sat Jan 13 05:41:38 2018 +++ src/sys/net/if.c Sat Jan 13 05:43:44 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.394.2.5 2018/01/13 05:41:38 snj Exp $ */ +/* $NetBSD: if.c,v 1.394.2.6 2018/01/13 05:43:44 snj Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,16 +90,16 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.394.2.5 2018/01/13 05:41:38 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.394.2.6 2018/01/13 05:43:44 snj Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" #include "opt_ipsec.h" - #include "opt_atalk.h" #include "opt_natm.h" #include "opt_wlan.h" #include "opt_net_mpsafe.h" +#include "opt_mrouting.h" #endif #include @@ -3561,8 +3561,8 @@ if_mcast_op(ifnet_t *ifp, const unsigned int rc; struct ifreq ifr; - /* CARP still doesn't deal with the lock yet */ -#if !defined(NCARP) || (NCARP == 0) + /* CARP and MROUTING still don't deal with the lock yet */ +#if (!defined(NCARP) || (NCARP == 0)) && !defined(MROUTING) KASSERT(IFNET_LOCKED(ifp)); #endif if (ifp->if_mcastop != NULL)
CVS commit: [netbsd-8] src/sys/net
Module Name:src Committed By: snj Date: Sat Jan 13 05:43:44 UTC 2018 Modified Files: src/sys/net [netbsd-8]: if.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #487): sys/net/if.c: revision 1.417 Suppress the assertion of IFNET_LOCK in if_mcast_op if MROUTING MROUTING doesn't deal with IFNET_LOCK yet. Reported by kardel@ To generate a diff of this commit: cvs rdiff -u -r1.394.2.5 -r1.394.2.6 src/sys/net/if.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/net
Module Name:src Committed By: snj Date: Sat Jan 13 05:41:39 UTC 2018 Modified Files: src/sys/net [netbsd-8]: if.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #486): sys/net/if.c: revision 1.418 Check MP-safety in ifa_insert and ifa_remove only for IFEF_MPSAFE drivers Eventually the assertions should pass for all drivers, however, at this point it's too eager. Fix PR kern/52895 To generate a diff of this commit: cvs rdiff -u -r1.394.2.4 -r1.394.2.5 src/sys/net/if.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.c diff -u src/sys/net/if.c:1.394.2.4 src/sys/net/if.c:1.394.2.5 --- src/sys/net/if.c:1.394.2.4 Tue Jan 2 10:20:33 2018 +++ src/sys/net/if.c Sat Jan 13 05:41:38 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.394.2.4 2018/01/02 10:20:33 snj Exp $ */ +/* $NetBSD: if.c,v 1.394.2.5 2018/01/13 05:41:38 snj Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.394.2.4 2018/01/02 10:20:33 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.394.2.5 2018/01/13 05:41:38 snj Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -1792,12 +1792,13 @@ ifa_insert(struct ifnet *ifp, struct ifa ifa->ifa_ifp = ifp; /* + * Check MP-safety for IFEF_MPSAFE drivers. * Check !IFF_RUNNING for initialization routines that normally don't * take IFNET_LOCK but it's safe because there is no competitor. * XXX there are false positive cases because IFF_RUNNING can be off on * if_stop. */ - KASSERT(!ISSET(ifp->if_flags, IFF_RUNNING) || + KASSERT(!if_is_mpsafe(ifp) || !ISSET(ifp->if_flags, IFF_RUNNING) || IFNET_LOCKED(ifp)); TAILQ_INSERT_TAIL(>if_addrlist, ifa, ifa_list); @@ -1813,10 +1814,11 @@ ifa_remove(struct ifnet *ifp, struct ifa KASSERT(ifa->ifa_ifp == ifp); /* + * Check MP-safety for IFEF_MPSAFE drivers. * if_is_deactivated indicates ifa_remove is called form if_detach * where is safe even if IFNET_LOCK isn't held. */ - KASSERT(if_is_deactivated(ifp) || IFNET_LOCKED(ifp)); + KASSERT(!if_is_mpsafe(ifp) || if_is_deactivated(ifp) || IFNET_LOCKED(ifp)); TAILQ_REMOVE(>if_addrlist, ifa, ifa_list); IFADDR_WRITER_REMOVE(ifa);
CVS commit: [netbsd-8] src/sys/net
Module Name:src Committed By: snj Date: Sat Jan 13 05:41:39 UTC 2018 Modified Files: src/sys/net [netbsd-8]: if.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #486): sys/net/if.c: revision 1.418 Check MP-safety in ifa_insert and ifa_remove only for IFEF_MPSAFE drivers Eventually the assertions should pass for all drivers, however, at this point it's too eager. Fix PR kern/52895 To generate a diff of this commit: cvs rdiff -u -r1.394.2.4 -r1.394.2.5 src/sys/net/if.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/dev
Module Name:src Committed By: snj Date: Sat Jan 13 05:40:25 UTC 2018 Modified Files: src/sys/dev/ic [netbsd-8]: cs4215reg.h src/sys/dev/sbus [netbsd-8]: dbri.c dbrivar.h Log Message: Pull up following revision(s) (requested by macallan in ticket #476): sys/dev/sbus/dbrivar.h: revision 1.15 sys/dev/ic/cs4215reg.h: revision 1.5 sys/dev/sbus/dbri.c: revision 1.37 overhaul the dbri driver and make it work again in the New Order Of Things - fix switching between control and data mode - make sure interrupts can happen in control mode - implement audioif.commit_settings() - switch to control mode only if needed - for changes in sample rate or format but not for things like volume control should fix PR 52786 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.80.1 src/sys/dev/ic/cs4215reg.h cvs rdiff -u -r1.35 -r1.35.22.1 src/sys/dev/sbus/dbri.c cvs rdiff -u -r1.13 -r1.13.42.1 src/sys/dev/sbus/dbrivar.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/ic/cs4215reg.h diff -u src/sys/dev/ic/cs4215reg.h:1.4 src/sys/dev/ic/cs4215reg.h:1.4.80.1 --- src/sys/dev/ic/cs4215reg.h:1.4 Mon May 5 00:21:47 2008 +++ src/sys/dev/ic/cs4215reg.h Sat Jan 13 05:40:25 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cs4215reg.h,v 1.4 2008/05/05 00:21:47 jmcneill Exp $ */ +/* $NetBSD: cs4215reg.h,v 1.4.80.1 2018/01/13 05:40:25 snj Exp $ */ /* * Copyright (c) 2001 Jared D. McNeill@@ -30,7 +30,7 @@ /* time slot 1: status register */ #define CS4215_CLB (1<<2) /* control latch bit */ #define CS4215_MLB (1<<4) /* 1: mic: 20 dB gain disabled */ -#define CS4215_RSRVD_1 (1<<5) +#define CS4215_ONE (1<<5) /* always one */ /* time slot 2: data format register */ #define CS4215_DFR_LINEAR16 0 Index: src/sys/dev/sbus/dbri.c diff -u src/sys/dev/sbus/dbri.c:1.35 src/sys/dev/sbus/dbri.c:1.35.22.1 --- src/sys/dev/sbus/dbri.c:1.35 Sat Oct 19 21:00:32 2013 +++ src/sys/dev/sbus/dbri.c Sat Jan 13 05:40:25 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: dbri.c,v 1.35 2013/10/19 21:00:32 mrg Exp $ */ +/* $NetBSD: dbri.c,v 1.35.22.1 2018/01/13 05:40:25 snj Exp $ */ /* * Copyright (C) 1997 Rudolf Koenig (rfkoe...@immd4.informatik.uni-erlangen.de) @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dbri.c,v 1.35 2013/10/19 21:00:32 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dbri.c,v 1.35.22.1 2018/01/13 05:40:25 snj Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -165,6 +165,7 @@ static void dbri_set_power(struct dbri_s static void dbri_bring_up(struct dbri_softc *); static bool dbri_suspend(device_t, const pmf_qual_t *); static bool dbri_resume(device_t, const pmf_qual_t *); +static int dbri_commit(void *); /* stupid support routines */ static uint32_t reverse_bytes(uint32_t, int); @@ -195,6 +196,7 @@ struct audio_hw_if dbri_hw_if = { .trigger_output = dbri_trigger_output, .trigger_input = dbri_trigger_input, .get_locks = dbri_get_locks, + .commit_settings = dbri_commit, }; CFATTACH_DECL_NEW(dbri, sizeof(struct dbri_softc), @@ -277,6 +279,8 @@ dbri_attach_sbus(device_t parent, device sc->sc_dmat = sa->sa_dmatag; sc->sc_powerstate = 1; + sc->sc_whack_codec = 0; + pwr = prom_getpropint(sa->sa_node,"pwr-on-auxio",0); aprint_normal(": rev %s\n", ver); @@ -533,6 +537,7 @@ dbri_init(struct dbri_softc *sc) int n; dbri_reset(sc); + sc->sc_mm.status = 0; cmd = dbri_command_lock(sc); @@ -548,7 +553,6 @@ dbri_init(struct dbri_softc *sc) sc->sc_dma->intr[n] = 0; } - /* Disable all SBus bursts */ /* XXX 16 byte bursts cause errors, the rest works */ reg = bus_space_read_4(iot, ioh, DBRI_REG0); @@ -698,9 +702,6 @@ dbri_process_interrupt(struct dbri_softc case DBRI_INTR_FXDT: /* fixed data change */ DPRINTF("dbri_intr: Fixed data change (%d: %x)\n", channel, val); -#if 0 - printf("reg: %08x\n", sc->sc_mm.status); -#endif if (sc->sc_pipe[channel].sdp & DBRI_SDP_MSB) val = reverse_bytes(val, sc->sc_pipe[channel].length); if (sc->sc_pipe[channel].prec) @@ -859,10 +860,12 @@ mmcodec_init_data(struct dbri_softc *sc) pipe_ts_link(sc, 20, PIPEoutput, 16, 32, sc->sc_mm.offset + 32); pipe_ts_link(sc, 4, PIPEoutput, 16, data_width, sc->sc_mm.offset); pipe_ts_link(sc, 6, PIPEinput, 16, data_width, sc->sc_mm.offset); +#if 0 + /* readback for the mixer registers - we don't use that */ pipe_ts_link(sc, 21, PIPEinput, 16, 32, sc->sc_mm.offset + 32); - pipe_receive_fixed(sc, 21, >sc_mm.status); - + pipe_receive_fixed(sc, 21, >sc_mm.d.ldata); +#endif mmcodec_setgain(sc, 0); tmp = bus_space_read_4(iot, ioh, DBRI_REG0); @@ -879,14 +882,13 @@ mmcodec_pipe_init(struct dbri_softc *sc) pipe_setup(sc, 4, DBRI_SDP_MEM | DBRI_SDP_TO_SER | DBRI_SDP_MSB); pipe_setup(sc, 20, DBRI_SDP_FIXED | DBRI_SDP_TO_SER | DBRI_SDP_MSB); pipe_setup(sc, 6, DBRI_SDP_MEM | DBRI_SDP_FROM_SER | DBRI_SDP_MSB); +#if 0
CVS commit: [netbsd-8] src/sys/dev
Module Name:src Committed By: snj Date: Sat Jan 13 05:40:25 UTC 2018 Modified Files: src/sys/dev/ic [netbsd-8]: cs4215reg.h src/sys/dev/sbus [netbsd-8]: dbri.c dbrivar.h Log Message: Pull up following revision(s) (requested by macallan in ticket #476): sys/dev/sbus/dbrivar.h: revision 1.15 sys/dev/ic/cs4215reg.h: revision 1.5 sys/dev/sbus/dbri.c: revision 1.37 overhaul the dbri driver and make it work again in the New Order Of Things - fix switching between control and data mode - make sure interrupts can happen in control mode - implement audioif.commit_settings() - switch to control mode only if needed - for changes in sample rate or format but not for things like volume control should fix PR 52786 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.80.1 src/sys/dev/ic/cs4215reg.h cvs rdiff -u -r1.35 -r1.35.22.1 src/sys/dev/sbus/dbri.c cvs rdiff -u -r1.13 -r1.13.42.1 src/sys/dev/sbus/dbrivar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src
Module Name:src Committed By: snj Date: Sat Jan 13 05:38:54 UTC 2018 Modified Files: src/sys/dev [netbsd-8]: fss.c src/usr.sbin/fssconfig [netbsd-8]: fssconfig.c Log Message: Pull up following revision(s) (requested by hannken in ticket #475): sys/dev/fss.c: revision 1.101-1.103 usr.sbin/fssconfig/fssconfig.c: revision 1.13 Bounds check against media size for non-persistent snapshots. -- Treat partial read from backing store as I/O error. -- Pass residual back to b_resid for persistent snapshots. -- Use stat() information to decide if the backing store is a directory. Depending on open() returning EISDIR fails for mount points. To generate a diff of this commit: cvs rdiff -u -r1.98.2.1 -r1.98.2.2 src/sys/dev/fss.c cvs rdiff -u -r1.12 -r1.12.6.1 src/usr.sbin/fssconfig/fssconfig.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/fss.c diff -u src/sys/dev/fss.c:1.98.2.1 src/sys/dev/fss.c:1.98.2.2 --- src/sys/dev/fss.c:1.98.2.1 Thu Dec 21 21:50:16 2017 +++ src/sys/dev/fss.c Sat Jan 13 05:38:54 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: fss.c,v 1.98.2.1 2017/12/21 21:50:16 snj Exp $ */ +/* $NetBSD: fss.c,v 1.98.2.2 2018/01/13 05:38:54 snj Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.98.2.1 2017/12/21 21:50:16 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.98.2.2 2018/01/13 05:38:54 snj Exp $"); #include #include @@ -89,7 +89,7 @@ static void fss_softc_free(struct fss_so static int fss_read_cluster(struct fss_softc *, u_int32_t); static void fss_bs_thread(void *); static int fss_bs_io(struct fss_softc *, fss_io_type, -u_int32_t, off_t, int, void *); +u_int32_t, off_t, int, void *, size_t *); static u_int32_t *fss_bs_indir(struct fss_softc *, u_int32_t); static kmutex_t fss_device_lock; /* Protect all units. */ @@ -281,20 +281,26 @@ fss_strategy(struct buf *bp) mutex_enter(>sc_slock); if (write || !FSS_ISVALID(sc)) { - - mutex_exit(>sc_slock); - bp->b_error = (write ? EROFS : ENXIO); - bp->b_resid = bp->b_bcount; - biodone(bp); - return; + goto done; } + /* Check bounds for non-persistent snapshots. */ + if ((sc->sc_flags & FSS_PERSISTENT) == 0 && + bounds_check_with_mediasize(bp, DEV_BSIZE, + btodb(FSS_CLTOB(sc, sc->sc_clcount - 1) + sc->sc_clresid)) <= 0) + goto done; bp->b_rawblkno = bp->b_blkno; bufq_put(sc->sc_bufq, bp); cv_signal(>sc_work_cv); mutex_exit(>sc_slock); + return; + +done: + mutex_exit(>sc_slock); + bp->b_resid = bp->b_bcount; + biodone(bp); } int @@ -981,6 +987,8 @@ restart: todo -= len; } error = biowait(mbp); + if (error == 0 && mbp->b_resid != 0) + error = EIO; putiobuf(mbp); mutex_enter(>sc_slock); @@ -1002,7 +1010,7 @@ restart: */ static int fss_bs_io(struct fss_softc *sc, fss_io_type rw, -u_int32_t cl, off_t off, int len, void *data) +u_int32_t cl, off_t off, int len, void *data, size_t *resid) { int error; @@ -1013,7 +1021,7 @@ fss_bs_io(struct fss_softc *sc, fss_io_t error = vn_rdwr((rw == FSS_READ ? UIO_READ : UIO_WRITE), sc->sc_bs_vp, data, len, off, UIO_SYSSPACE, IO_ADV_ENCODE(POSIX_FADV_NOREUSE) | IO_NODELOCKED, - sc->sc_bs_lwp->l_cred, NULL, NULL); + sc->sc_bs_lwp->l_cred, resid, NULL); if (error == 0) { mutex_enter(sc->sc_bs_vp->v_interlock); error = VOP_PUTPAGES(sc->sc_bs_vp, trunc_page(off), @@ -1042,7 +1050,7 @@ fss_bs_indir(struct fss_softc *sc, u_int if (sc->sc_indir_dirty) { if (fss_bs_io(sc, FSS_WRITE, sc->sc_indir_cur, 0, - FSS_CLSIZE(sc), (void *)sc->sc_indir_data) != 0) + FSS_CLSIZE(sc), (void *)sc->sc_indir_data, NULL) != 0) return NULL; setbit(sc->sc_indir_valid, sc->sc_indir_cur); } @@ -1052,7 +1060,7 @@ fss_bs_indir(struct fss_softc *sc, u_int if (isset(sc->sc_indir_valid, sc->sc_indir_cur)) { if (fss_bs_io(sc, FSS_READ, sc->sc_indir_cur, 0, - FSS_CLSIZE(sc), (void *)sc->sc_indir_data) != 0) + FSS_CLSIZE(sc), (void *)sc->sc_indir_data, NULL) != 0) return NULL; } else memset(sc->sc_indir_data, 0, FSS_CLSIZE(sc)); @@ -1073,6 +1081,7 @@ fss_bs_thread(void *arg) long off; char *addr; u_int32_t c, cl, ch, *indirp; + size_t resid; struct buf *bp, *nbp; struct fss_softc *sc; struct fss_cache *scp, *scl; @@ -1109,14 +1118,18 @@ fss_bs_thread(void *arg) disk_busy(sc->sc_dkdev); error = fss_bs_io(sc, FSS_READ, 0, dbtob(bp->b_blkno), bp->b_bcount, -bp->b_data); +bp->b_data, ); +if (error) + resid = bp->b_bcount; disk_unbusy(sc->sc_dkdev, (error ? 0 : bp->b_bcount), is_read); - } else + } else { error = ENXIO; +resid = bp->b_bcount; + } bp->b_error = error; - bp->b_resid = (error ? bp->b_bcount : 0); + bp->b_resid = resid; biodone(bp); mutex_enter(>sc_slock); @@
CVS commit: [netbsd-8] src
Module Name:src Committed By: snj Date: Sat Jan 13 05:38:54 UTC 2018 Modified Files: src/sys/dev [netbsd-8]: fss.c src/usr.sbin/fssconfig [netbsd-8]: fssconfig.c Log Message: Pull up following revision(s) (requested by hannken in ticket #475): sys/dev/fss.c: revision 1.101-1.103 usr.sbin/fssconfig/fssconfig.c: revision 1.13 Bounds check against media size for non-persistent snapshots. -- Treat partial read from backing store as I/O error. -- Pass residual back to b_resid for persistent snapshots. -- Use stat() information to decide if the backing store is a directory. Depending on open() returning EISDIR fails for mount points. To generate a diff of this commit: cvs rdiff -u -r1.98.2.1 -r1.98.2.2 src/sys/dev/fss.c cvs rdiff -u -r1.12 -r1.12.6.1 src/usr.sbin/fssconfig/fssconfig.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/dev/pci
Module Name:src Committed By: snj Date: Sat Jan 13 05:36:03 UTC 2018 Modified Files: src/sys/dev/pci [netbsd-8]: pucdata.c Log Message: Pull up following revision(s) (requested by maya in ticket #472): sys/dev/pci/pucdata.c: revision 1.100 PR/52868: Petar Bogdanovic: Add support for Manhattan 158220 card To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.99.8.1 src/sys/dev/pci/pucdata.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/pucdata.c diff -u src/sys/dev/pci/pucdata.c:1.99 src/sys/dev/pci/pucdata.c:1.99.8.1 --- src/sys/dev/pci/pucdata.c:1.99 Sun Jan 15 04:45:39 2017 +++ src/sys/dev/pci/pucdata.c Sat Jan 13 05:36:03 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pucdata.c,v 1.99 2017/01/15 04:45:39 msaitoh Exp $ */ +/* $NetBSD: pucdata.c,v 1.99.8.1 2018/01/13 05:36:03 snj Exp $ */ /* * Copyright (c) 1998, 1999 Christopher G. Demetriou. All rights reserved. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pucdata.c,v 1.99 2017/01/15 04:45:39 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pucdata.c,v 1.99.8.1 2018/01/13 05:36:03 snj Exp $"); #include #include @@ -879,6 +879,15 @@ const struct puc_device_description puc_ }, }, + /* NetMos PCI NM9865 : 1P */ + { "NetMos NM9865 Single LPT", + { PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9865, 0xa000, 0x2000 }, + { 0x, 0x, 0x, 0x }, + { + { PUC_PORT_TYPE_LPT, PCI_BAR0, 0x00, 0x00 }, + }, + }, + /* NetMos 2S PCI NM9865 : 2S */ { "NetMos NM9865 2 UART", { PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9865, 0xa000, 0x3002 },
CVS commit: [netbsd-8] src/sys/dev/pci
Module Name:src Committed By: snj Date: Sat Jan 13 05:36:03 UTC 2018 Modified Files: src/sys/dev/pci [netbsd-8]: pucdata.c Log Message: Pull up following revision(s) (requested by maya in ticket #472): sys/dev/pci/pucdata.c: revision 1.100 PR/52868: Petar Bogdanovic: Add support for Manhattan 158220 card To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.99.8.1 src/sys/dev/pci/pucdata.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: snj Date: Sat Jan 13 04:44:51 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: amend 456 To generate a diff of this commit: cvs rdiff -u -r1.1.2.100 -r1.1.2.101 src/doc/CHANGES-8.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: snj Date: Sat Jan 13 04:44:51 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: amend 456 To generate a diff of this commit: cvs rdiff -u -r1.1.2.100 -r1.1.2.101 src/doc/CHANGES-8.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.0 diff -u src/doc/CHANGES-8.0:1.1.2.100 src/doc/CHANGES-8.0:1.1.2.101 --- src/doc/CHANGES-8.0:1.1.2.100 Tue Jan 9 19:39:51 2018 +++ src/doc/CHANGES-8.0 Sat Jan 13 04:44:51 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.0,v 1.1.2.100 2018/01/09 19:39:51 snj Exp $ +# $NetBSD: CHANGES-8.0,v 1.1.2.101 2018/01/13 04:44:51 snj Exp $ A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04 until the 8.0 release: @@ -8686,7 +8686,7 @@ sys/arch/x86/x86/vm_machdep.c 1.30 [maxv, ticket #477] sys/arch/arm/sunxi/sunxi_emac.c 1.9 -sys/dev/ic/dwc_gmac.c1.43-1.44 +sys/dev/ic/dwc_gmac.c1.43-1.45 sys/dev/pci/if_iwm.c1.75 sys/dev/pci/if_wm.c1.543 sys/dev/pci/ixgbe/ixgbe.c 1.112 @@ -8739,7 +8739,7 @@ sys/rump/net/lib/libnetinet/netinet_comp - Unify IFEF_*_MPSAFE flags into IFEF_MPSAFE - Don't hold KERNEL_LOCK on if_ioctl if IFEF_MPSAFE - Enable IFEF_MPSAFE only if NET_MPSAFE - [ozaki-r, ticket #456] + [ozaki-r/martin, ticket #456] sys/net/rtsock.c1.233-1.234, 1.236
CVS commit: [netbsd-8] src/sys/dev/ic
Module Name:src Committed By: snj Date: Sat Jan 13 04:44:29 UTC 2018 Modified Files: src/sys/dev/ic [netbsd-8]: dwc_gmac.c Log Message: Pull up following revision(s) (requested by martin in ticket #456): sys/dev/ic/dwc_gmac.c: 1.45 Don't KASSERT that we are MPSAFE if ! DWCGMAC_MPSAFE To generate a diff of this commit: cvs rdiff -u -r1.40.6.2 -r1.40.6.3 src/sys/dev/ic/dwc_gmac.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/dev/ic
Module Name:src Committed By: snj Date: Sat Jan 13 04:44:29 UTC 2018 Modified Files: src/sys/dev/ic [netbsd-8]: dwc_gmac.c Log Message: Pull up following revision(s) (requested by martin in ticket #456): sys/dev/ic/dwc_gmac.c: 1.45 Don't KASSERT that we are MPSAFE if ! DWCGMAC_MPSAFE To generate a diff of this commit: cvs rdiff -u -r1.40.6.2 -r1.40.6.3 src/sys/dev/ic/dwc_gmac.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/dwc_gmac.c diff -u src/sys/dev/ic/dwc_gmac.c:1.40.6.2 src/sys/dev/ic/dwc_gmac.c:1.40.6.3 --- src/sys/dev/ic/dwc_gmac.c:1.40.6.2 Tue Jan 2 10:20:32 2018 +++ src/sys/dev/ic/dwc_gmac.c Sat Jan 13 04:44:29 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc_gmac.c,v 1.40.6.2 2018/01/02 10:20:32 snj Exp $ */ +/* $NetBSD: dwc_gmac.c,v 1.40.6.3 2018/01/13 04:44:29 snj Exp $ */ /*- * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.40.6.2 2018/01/02 10:20:32 snj Exp $"); +__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.40.6.3 2018/01/13 04:44:29 snj Exp $"); /* #define DWC_GMAC_DEBUG 1 */ @@ -838,7 +838,9 @@ static void dwc_gmac_start(struct ifnet *ifp) { struct dwc_gmac_softc *sc = ifp->if_softc; +#ifdef DWCGMAC_MPSAFE KASSERT(if_is_mpsafe(ifp)); +#endif mutex_enter(sc->sc_lock); if (!sc->sc_stopping) {
CVS commit: src/share/misc
Module Name:src Committed By: pgoyette Date: Sat Jan 13 03:35:40 UTC 2018 Modified Files: src/share/misc: acronyms Log Message: Add: BIDI = boy, I did it To generate a diff of this commit: cvs rdiff -u -r1.264 -r1.265 src/share/misc/acronyms Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/misc
Module Name:src Committed By: pgoyette Date: Sat Jan 13 03:35:40 UTC 2018 Modified Files: src/share/misc: acronyms Log Message: Add: BIDI = boy, I did it To generate a diff of this commit: cvs rdiff -u -r1.264 -r1.265 src/share/misc/acronyms 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 diff -u src/share/misc/acronyms:1.264 src/share/misc/acronyms:1.265 --- src/share/misc/acronyms:1.264 Sat Dec 2 01:36:38 2017 +++ src/share/misc/acronyms Sat Jan 13 03:35:40 2018 @@ -1,4 +1,4 @@ -$NetBSD: acronyms,v 1.264 2017/12/02 01:36:38 ginsbach Exp $ +$NetBSD: acronyms,v 1.265 2018/01/13 03:35:40 pgoyette Exp $ 10Q thank you 10X thanks 1337 elite ("leet") @@ -69,6 +69,7 @@ BIAF back in a few BIALW back in a little while BIAS back in a second BIAW back in a while +BIDI boy, I did it BNYA burned now you are BOC but of course BOFH bastard operator from hell
CVS commit: src/sys/arch/sparc/dev
Module Name:src Committed By: macallan Date: Fri Jan 12 23:38:24 UTC 2018 Modified Files: src/sys/arch/sparc/dev: cgfourteen.c Log Message: enable font loading To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/arch/sparc/dev/cgfourteen.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sparc/dev
Module Name:src Committed By: macallan Date: Fri Jan 12 23:38:24 UTC 2018 Modified Files: src/sys/arch/sparc/dev: cgfourteen.c Log Message: enable font loading To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/arch/sparc/dev/cgfourteen.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/sparc/dev/cgfourteen.c diff -u src/sys/arch/sparc/dev/cgfourteen.c:1.83 src/sys/arch/sparc/dev/cgfourteen.c:1.84 --- src/sys/arch/sparc/dev/cgfourteen.c:1.83 Sat Jan 6 07:26:54 2018 +++ src/sys/arch/sparc/dev/cgfourteen.c Fri Jan 12 23:38:24 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cgfourteen.c,v 1.83 2018/01/06 07:26:54 macallan Exp $ */ +/* $NetBSD: cgfourteen.c,v 1.84 2018/01/12 23:38:24 macallan Exp $ */ /* * Copyright (c) 1996 @@ -724,7 +724,8 @@ cg14_setup_wsdisplay(struct cgfourteen_s 0, 0, NULL, 8, 16, - WSSCREEN_WSCOLORS | WSSCREEN_HILIT | WSSCREEN_UNDERLINE, + WSSCREEN_WSCOLORS | WSSCREEN_HILIT | WSSCREEN_UNDERLINE | + WSSCREEN_RESIZE, NULL }; cg14_set_depth(sc, 8); @@ -734,6 +735,8 @@ cg14_setup_wsdisplay(struct cgfourteen_s vcons_init(>sc_vd, sc, >sc_defaultscreen_descr, _accessops); sc->sc_vd.init_screen = cg14_init_screen; + sc->sc_vd.show_screen_cookie = >sc_gc; + sc->sc_vd.show_screen_cb = glyphcache_adapt; ri = >sc_console_screen.scr_ri; @@ -1009,6 +1012,8 @@ cg14_init_screen(void *cookie, struct vc ri->ri_flg = RI_CENTER | RI_FULLCLEAR; ri->ri_bits = (char *)sc->sc_fb.fb_pixels; + + scr->scr_flags |= VCONS_LOADFONT; #if NSX > 0 ri->ri_flg |= RI_8BIT_IS_RGB | RI_ENABLE_ALPHA | RI_PREFER_ALPHA; @@ -1020,14 +1025,15 @@ cg14_init_screen(void *cookie, struct vc scr->scr_flags |= VCONS_NO_COPYCOLS; } else #endif - scr->scr_flags |= VCONS_DONT_READ; + scr->scr_flags |= VCONS_DONT_READ; if (existing) { ri->ri_flg |= RI_CLEAR; } rasops_init(ri, 0, 0); - ri->ri_caps = WSSCREEN_WSCOLORS | WSSCREEN_HILIT | WSSCREEN_UNDERLINE; + ri->ri_caps = WSSCREEN_WSCOLORS | WSSCREEN_HILIT | WSSCREEN_UNDERLINE | + WSSCREEN_RESIZE; rasops_reconfig(ri, sc->sc_fb.fb_type.fb_height / ri->ri_font->fontheight,
CVS commit: src/bin/ps
Module Name:src Committed By: kamil Date: Fri Jan 12 23:01:14 UTC 2018 Modified Files: src/bin/ps: ps.c Log Message: Fix an unitialized memory read bug in ps(1) rawcpu of type int, is declared inside main(){} and it can be passed as uninitialized to setpinfo(). The setpinfo() function has a switch checking the value of rawcpu: if (!rawcpu) pi[i].pcpu /= 1.0 - exp(ki[i].p_swtime * log_ccpu); rawcpu is set to 1 with the command line argument "-C". -C Change the way the CPU percentage is calculated by using a "raw" CPU calculation that ignores "resident" time (this normally has no effect). Bug reproducible with an invocation: "ps u". It hides with "ps uC". Initialize rawcpu by default to 0, before the getopt(3) machinery. Detected with MSan running on NetBSD/amd64. Sponsored by To generate a diff of this commit: cvs rdiff -u -r1.88 -r1.89 src/bin/ps/ps.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/bin/ps
Module Name:src Committed By: kamil Date: Fri Jan 12 23:01:14 UTC 2018 Modified Files: src/bin/ps: ps.c Log Message: Fix an unitialized memory read bug in ps(1) rawcpu of type int, is declared inside main(){} and it can be passed as uninitialized to setpinfo(). The setpinfo() function has a switch checking the value of rawcpu: if (!rawcpu) pi[i].pcpu /= 1.0 - exp(ki[i].p_swtime * log_ccpu); rawcpu is set to 1 with the command line argument "-C". -C Change the way the CPU percentage is calculated by using a "raw" CPU calculation that ignores "resident" time (this normally has no effect). Bug reproducible with an invocation: "ps u". It hides with "ps uC". Initialize rawcpu by default to 0, before the getopt(3) machinery. Detected with MSan running on NetBSD/amd64. Sponsored by To generate a diff of this commit: cvs rdiff -u -r1.88 -r1.89 src/bin/ps/ps.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/ps/ps.c diff -u src/bin/ps/ps.c:1.88 src/bin/ps/ps.c:1.89 --- src/bin/ps/ps.c:1.88 Mon Dec 26 20:52:39 2016 +++ src/bin/ps/ps.c Fri Jan 12 23:01:14 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ps.c,v 1.88 2016/12/26 20:52:39 rin Exp $ */ +/* $NetBSD: ps.c,v 1.89 2018/01/12 23:01:14 kamil Exp $ */ /* * Copyright (c) 2000-2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 19 #if 0 static char sccsid[] = "@(#)ps.c 8.4 (Berkeley) 4/2/94"; #else -__RCSID("$NetBSD: ps.c,v 1.88 2016/12/26 20:52:39 rin Exp $"); +__RCSID("$NetBSD: ps.c,v 1.89 2018/01/12 23:01:14 kamil Exp $"); #endif #endif /* not lint */ @@ -224,7 +224,7 @@ main(int argc, char *argv[]) if (argc > 1) argv[1] = kludge_oldps_options(argv[1]); - descendancy = fmt = prtheader = wflag = xflg = showlwps = 0; + descendancy = fmt = prtheader = wflag = xflg = rawcpu = showlwps = 0; what = KERN_PROC_UID; flag = myuid = getuid(); memf = nlistf = swapf = NULL;
CVS commit: src/sys/dev/spi
Module Name:src Committed By: jakllsch Date: Fri Jan 12 19:38:53 UTC 2018 Modified Files: src/sys/dev/spi: spiflash.c Log Message: We always need bp->b_resid initialized before we try to toss the transfer. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/dev/spi/spiflash.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/spi/spiflash.c diff -u src/sys/dev/spi/spiflash.c:1.19 src/sys/dev/spi/spiflash.c:1.20 --- src/sys/dev/spi/spiflash.c:1.19 Fri Aug 19 03:23:39 2016 +++ src/sys/dev/spi/spiflash.c Fri Jan 12 19:38:52 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: spiflash.c,v 1.19 2016/08/19 03:23:39 jakllsch Exp $ */ +/* $NetBSD: spiflash.c,v 1.20 2018/01/12 19:38:52 jakllsch Exp $ */ /*- * Copyright (c) 2006 Urbana-Champaign Independent Media Center. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: spiflash.c,v 1.19 2016/08/19 03:23:39 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spiflash.c,v 1.20 2018/01/12 19:38:52 jakllsch Exp $"); #include #include @@ -310,10 +310,11 @@ spiflash_strategy(struct buf *bp) spiflash_handle_t sc; int s; + bp->b_resid = bp->b_bcount; + sc = device_lookup_private(_cd, DISKUNIT(bp->b_dev)); if (sc == NULL) { bp->b_error = ENXIO; - bp->b_resid = bp->b_bcount; biodone(bp); return; } @@ -321,7 +322,6 @@ spiflash_strategy(struct buf *bp) if (((bp->b_bcount % sc->sc_write_size) != 0) || (bp->b_blkno < 0)) { bp->b_error = EINVAL; - bp->b_resid = bp->b_bcount; biodone(bp); return; } @@ -338,8 +338,6 @@ spiflash_strategy(struct buf *bp) return; } - bp->b_resid = bp->b_bcount; - /* all ready, hand off to thread for async processing */ s = splbio(); bufq_put(sc->sc_waitq, bp);
CVS commit: src/sys/dev/spi
Module Name:src Committed By: jakllsch Date: Fri Jan 12 19:38:53 UTC 2018 Modified Files: src/sys/dev/spi: spiflash.c Log Message: We always need bp->b_resid initialized before we try to toss the transfer. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/dev/spi/spiflash.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: para Date: Fri Jan 12 18:54:37 UTC 2018 Modified Files: src/sys/kern: subr_pool.c Log Message: fix comment pool stats are listed 'vmstat -m' not 'vmstat -i' To generate a diff of this commit: cvs rdiff -u -r1.220 -r1.221 src/sys/kern/subr_pool.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_pool.c diff -u src/sys/kern/subr_pool.c:1.220 src/sys/kern/subr_pool.c:1.221 --- src/sys/kern/subr_pool.c:1.220 Fri Dec 29 16:13:26 2017 +++ src/sys/kern/subr_pool.c Fri Jan 12 18:54:37 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_pool.c,v 1.220 2017/12/29 16:13:26 christos Exp $ */ +/* $NetBSD: subr_pool.c,v 1.221 2018/01/12 18:54:37 para Exp $ */ /*- * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010, 2014, 2015 @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.220 2017/12/29 16:13:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.221 2018/01/12 18:54:37 para Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -71,7 +71,7 @@ __KERNEL_RCSID(0, "$NetBSD: subr_pool.c, * an internal pool of page headers (`phpool'). */ -/* List of all pools. Non static as needed by 'vmstat -i' */ +/* List of all pools. Non static as needed by 'vmstat -m' */ TAILQ_HEAD(, pool) pool_head = TAILQ_HEAD_INITIALIZER(pool_head); /* Private pool for page header structures */
CVS commit: src/sys/kern
Module Name:src Committed By: para Date: Fri Jan 12 18:54:37 UTC 2018 Modified Files: src/sys/kern: subr_pool.c Log Message: fix comment pool stats are listed 'vmstat -m' not 'vmstat -i' To generate a diff of this commit: cvs rdiff -u -r1.220 -r1.221 src/sys/kern/subr_pool.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jakllsch Date: Fri Jan 12 18:22:35 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sun8i_h3_ccu.c Log Message: Add clocks gates and divisors for H3/H5 SPI[01] controllers. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/sunxi/sun8i_h3_ccu.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_h3_ccu.c diff -u src/sys/arch/arm/sunxi/sun8i_h3_ccu.c:1.14 src/sys/arch/arm/sunxi/sun8i_h3_ccu.c:1.15 --- src/sys/arch/arm/sunxi/sun8i_h3_ccu.c:1.14 Wed Oct 11 10:52:54 2017 +++ src/sys/arch/arm/sunxi/sun8i_h3_ccu.c Fri Jan 12 18:22:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: sun8i_h3_ccu.c,v 1.14 2017/10/11 10:52:54 jmcneill Exp $ */ +/* $NetBSD: sun8i_h3_ccu.c,v 1.15 2018/01/12 18:22:35 jakllsch Exp $ */ /*- * Copyright (c) 2017 Jared McNeill@@ -29,7 +29,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: sun8i_h3_ccu.c,v 1.14 2017/10/11 10:52:54 jmcneill Exp $"); +__KERNEL_RCSID(1, "$NetBSD: sun8i_h3_ccu.c,v 1.15 2018/01/12 18:22:35 jakllsch Exp $"); #include #include @@ -57,6 +57,8 @@ __KERNEL_RCSID(1, "$NetBSD: sun8i_h3_ccu #define SDMMC0_CLK_REG 0x088 #define SDMMC1_CLK_REG 0x08c #define SDMMC2_CLK_REG 0x090 +#define SPI0_CLK_REG 0x0a0 +#define SPI1_CLK_REG 0x0a4 #define USBPHY_CFG_REG 0x0cc #define MBUS_RST_REG 0x0fc #define AC_DIG_CLK_REG 0x140 @@ -318,6 +320,21 @@ static struct sunxi_ccu_clk sun8i_h3_ccu SUNXI_CCU_PHASE(H3_CLK_MMC2_OUTPUT, "mmc2_output", "mmc2", SDMMC2_CLK_REG, __BITS(10,8)), + SUNXI_CCU_NM(H3_CLK_SPI0, "spi0", mod_parents, + SPI0_CLK_REG, /* reg */ + __BITS(17,16), /* n */ + __BITS(3,0), /* m */ + __BITS(25,24), /* sel */ + __BIT(31), /* enable */ + SUNXI_CCU_NM_ROUND_DOWN), + SUNXI_CCU_NM(H3_CLK_SPI1, "spi1", mod_parents, + SPI1_CLK_REG, /* reg */ + __BITS(17,16), /* n */ + __BITS(3,0), /* m */ + __BITS(25,24), /* sel */ + __BIT(31), /* enable */ + SUNXI_CCU_NM_ROUND_DOWN), + SUNXI_CCU_GATE(H3_CLK_AC_DIG, "ac_dig", "pll_audio", AC_DIG_CLK_REG, 31), @@ -331,6 +348,10 @@ static struct sunxi_ccu_clk sun8i_h3_ccu BUS_CLK_GATING_REG0, 10), SUNXI_CCU_GATE(H3_CLK_BUS_EMAC, "bus-emac", "ahb2", BUS_CLK_GATING_REG0, 17), + SUNXI_CCU_GATE(H3_CLK_BUS_SPI0, "bus-spi0", "ahb1", + BUS_CLK_GATING_REG0, 20), + SUNXI_CCU_GATE(H3_CLK_BUS_SPI1, "bus-spi1", "ahb1", + BUS_CLK_GATING_REG0, 21), SUNXI_CCU_GATE(H3_CLK_BUS_OTG, "bus-otg", "ahb1", BUS_CLK_GATING_REG0, 23), SUNXI_CCU_GATE(H3_CLK_BUS_EHCI0, "bus-ehci0", "ahb1",
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jakllsch Date: Fri Jan 12 18:22:35 UTC 2018 Modified Files: src/sys/arch/arm/sunxi: sun8i_h3_ccu.c Log Message: Add clocks gates and divisors for H3/H5 SPI[01] controllers. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/sunxi/sun8i_h3_ccu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Fri Jan 12 17:58:51 UTC 2018 Modified Files: src/sys/kern: kern_event.c Log Message: Set EV_ONESHOT to prevent rescheduling XXX: pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/sys/kern/kern_event.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_event.c diff -u src/sys/kern/kern_event.c:1.102 src/sys/kern/kern_event.c:1.103 --- src/sys/kern/kern_event.c:1.102 Mon Jan 8 22:31:13 2018 +++ src/sys/kern/kern_event.c Fri Jan 12 12:58:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_event.c,v 1.102 2018/01/09 03:31:13 christos Exp $ */ +/* $NetBSD: kern_event.c,v 1.103 2018/01/12 17:58:51 christos Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.102 2018/01/09 03:31:13 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.103 2018/01/12 17:58:51 christos Exp $"); #include #include @@ -710,6 +710,12 @@ static void filt_timerdetach(struct knote *kn) { callout_t *calloutp; + struct kqueue *kq = kn->kn_kq; + + mutex_spin_enter(>kq_lock); + /* prevent rescheduling when we expire */ + kn->kn_flags |= EV_ONESHOT; + mutex_spin_exit(>kq_lock); calloutp = (callout_t *)kn->kn_hook; callout_halt(calloutp, NULL);
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Fri Jan 12 17:58:51 UTC 2018 Modified Files: src/sys/kern: kern_event.c Log Message: Set EV_ONESHOT to prevent rescheduling XXX: pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/sys/kern/kern_event.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: christos Date: Fri Jan 12 17:54:36 UTC 2018 Modified Files: src/usr.sbin/autofs: log.c Log Message: missing printflike To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/autofs/log.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: christos Date: Fri Jan 12 17:54:36 UTC 2018 Modified Files: src/usr.sbin/autofs: log.c Log Message: missing printflike To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/autofs/log.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/log.c diff -u src/usr.sbin/autofs/log.c:1.1 src/usr.sbin/autofs/log.c:1.2 --- src/usr.sbin/autofs/log.c:1.1 Mon Jan 8 22:31:15 2018 +++ src/usr.sbin/autofs/log.c Fri Jan 12 12:54:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: log.c,v 1.1 2018/01/09 03:31:15 christos Exp $ */ +/* $NetBSD: log.c,v 1.2 2018/01/12 17:54:36 christos Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ * */ #include -__RCSID("$NetBSD: log.c,v 1.1 2018/01/09 03:31:15 christos Exp $"); +__RCSID("$NetBSD: log.c,v 1.2 2018/01/12 17:54:36 christos Exp $"); #include #include @@ -89,7 +89,7 @@ log_set_peer_addr(const char *addr) peer_addr = checked_strdup(addr); } -static void +static __printflike(3, 0) void log_common(int priority, int log_errno, const char *fmt, va_list ap) { static char msgbuf[MSGBUF_LEN];
CVS commit: src/sys/arch/sparc/sparc
Module Name:src Committed By: mrg Date: Fri Jan 12 09:47:44 UTC 2018 Modified Files: src/sys/arch/sparc/sparc: timer.c Log Message: fix hang at 4B microseconds (1h12 or so), and simplify part of the previous To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/sparc/sparc/timer.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/sparc/sparc/timer.c diff -u src/sys/arch/sparc/sparc/timer.c:1.33 src/sys/arch/sparc/sparc/timer.c:1.34 --- src/sys/arch/sparc/sparc/timer.c:1.33 Fri Jan 12 06:01:33 2018 +++ src/sys/arch/sparc/sparc/timer.c Fri Jan 12 09:47:44 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: timer.c,v 1.33 2018/01/12 06:01:33 mrg Exp $ */ +/* $NetBSD: timer.c,v 1.34 2018/01/12 09:47:44 mrg Exp $ */ /* * Copyright (c) 1992, 1993 @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: timer.c,v 1.33 2018/01/12 06:01:33 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: timer.c,v 1.34 2018/01/12 09:47:44 mrg Exp $"); #include #include @@ -162,17 +162,11 @@ timer_get_timecount(struct timecounter * /* * This handles early-boot cases where the counter resets twice - * before the offset is updated. + * before the offset is updated, and we have a stupid check to + * ensure overflow hasn't happened. */ - if (res < cntr.lastres) { - if (fixup == 0) - fixup = cntr.limit; - while (res < cntr.lastres) { - if (res > UINT_MAX - fixup) -break; - res += fixup; - } - } + if (res < cntr.lastres && res > (TMR_MASK+1) << 3) + res = cntr.lastres + 1; cntr.lastres = res;
CVS commit: src/sys/arch/sparc/sparc
Module Name:src Committed By: mrg Date: Fri Jan 12 09:47:44 UTC 2018 Modified Files: src/sys/arch/sparc/sparc: timer.c Log Message: fix hang at 4B microseconds (1h12 or so), and simplify part of the previous To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/sparc/sparc/timer.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: maxv Date: Fri Jan 12 09:12:02 UTC 2018 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Split svs_page_add in two, one half will be used for other purposes, and update a comment. To generate a diff of this commit: cvs rdiff -u -r1.289 -r1.290 src/sys/arch/amd64/amd64/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.289 src/sys/arch/amd64/amd64/machdep.c:1.290 --- src/sys/arch/amd64/amd64/machdep.c:1.289 Thu Jan 11 13:35:15 2018 +++ src/sys/arch/amd64/amd64/machdep.c Fri Jan 12 09:12:01 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.289 2018/01/11 13:35:15 maxv Exp $ */ +/* $NetBSD: machdep.c,v 1.290 2018/01/12 09:12:01 maxv Exp $ */ /* * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011 @@ -110,7 +110,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.289 2018/01/11 13:35:15 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.290 2018/01/12 09:12:01 maxv Exp $"); /* #define XENDEBUG_LOW */ @@ -2261,11 +2261,16 @@ mm_md_direct_mapped_phys(paddr_t paddr, * remote CPUs that execute other threads of the user process we just * left will keep synchronizing us against their changes. * - * TODO: for now, only PMAP_SLOT_PTE is unmapped. + * List of areas that are removed from userland: + * PTE Space [OK] + * Direct Map[OK] + * Remote PCPU Areas [OK] + * Kernel Heap [TODO] + * Kernel Image [TODO] */ -static void -svs_page_add(struct cpu_info *ci, vaddr_t va) +static pd_entry_t * +svs_tree_add(struct cpu_info *ci, vaddr_t va) { extern pd_entry_t * const normal_pdes[]; extern const vaddr_t ptp_masks[]; @@ -2276,8 +2281,6 @@ svs_page_add(struct cpu_info *ci, vaddr_ struct vm_page *pg; paddr_t pa; - KASSERT(va % PAGE_SIZE == 0); - dstpde = ci->ci_svs_updir; mod = (size_t)-1; @@ -2305,13 +2308,25 @@ svs_page_add(struct cpu_info *ci, vaddr_ mod = nbpd[i-1]; } - /* Do the last level manually */ - idx = pl_i(va, 1); + return dstpde; +} + +static void +svs_page_add(struct cpu_info *ci, vaddr_t va) +{ + pd_entry_t *srcpde, *dstpde; + size_t idx, pidx; + + /* Create levels L4, L3 and L2. */ + dstpde = svs_tree_add(ci, va); + + /* Enter L1. */ + idx = pl1_i(va); srcpde = L1_BASE; if (!pmap_valid_entry(srcpde[idx])) { panic("%s: L1 page not mapped", __func__); } - pidx = pl_i(va % mod, 1); + pidx = pl1_i(va % NBPD_L2); if (pmap_valid_entry(dstpde[pidx])) { panic("%s: L1 page already mapped", __func__); }
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: maxv Date: Fri Jan 12 09:12:02 UTC 2018 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Split svs_page_add in two, one half will be used for other purposes, and update a comment. To generate a diff of this commit: cvs rdiff -u -r1.289 -r1.290 src/sys/arch/amd64/amd64/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.