CVS commit: [jdolecek-ncqfixes] src/sys/dev/ic
Module Name:src Committed By: jdolecek Date: Sat Oct 13 07:23:34 UTC 2018 Modified Files: src/sys/dev/ic [jdolecek-ncqfixes]: mvsata.c Log Message: add C_TIMEOUT KASSERT() on fail path of mvsata_bio_poll() for clarity To generate a diff of this commit: cvs rdiff -u -r1.41.2.7 -r1.41.2.8 src/sys/dev/ic/mvsata.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/mvsata.c diff -u src/sys/dev/ic/mvsata.c:1.41.2.7 src/sys/dev/ic/mvsata.c:1.41.2.8 --- src/sys/dev/ic/mvsata.c:1.41.2.7 Thu Oct 11 20:57:51 2018 +++ src/sys/dev/ic/mvsata.c Sat Oct 13 07:23:34 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: mvsata.c,v 1.41.2.7 2018/10/11 20:57:51 jdolecek Exp $ */ +/* $NetBSD: mvsata.c,v 1.41.2.8 2018/10/13 07:23:34 jdolecek Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.41.2.7 2018/10/11 20:57:51 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.41.2.8 2018/10/13 07:23:34 jdolecek Exp $"); #include "opt_mvsata.h" @@ -1281,8 +1281,10 @@ mvsata_bio_poll(struct ata_channel *chp, chp->ch_flags &= ~ATACH_DMA_WAIT; } - if ((xfer->c_bio.flags & ATA_ITSDONE) == 0) + if ((xfer->c_bio.flags & ATA_ITSDONE) == 0) { + KASSERT(xfer->c_flags & C_TIMEOU); mvsata_bio_intr(chp, xfer, 0); + } } static int
CVS commit: src/sys/arch/aarch64
Module Name:src Committed By: ryo Date: Sat Oct 13 08:32:36 UTC 2018 Modified Files: src/sys/arch/aarch64/aarch64: aarch64_machdep.c src/sys/arch/aarch64/include: pmap.h types.h Log Message: - define PMAP_{MAP,UNMAP}_POOLPAGE for performance - define __HAVE_MM_MD_KERNACC and add mm_md_kernacc() To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/aarch64/aarch64/aarch64_machdep.c cvs rdiff -u -r1.14 -r1.15 src/sys/arch/aarch64/include/pmap.h cvs rdiff -u -r1.11 -r1.12 src/sys/arch/aarch64/include/types.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/aarch64/aarch64_machdep.c diff -u src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.13 src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.14 --- src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.13 Fri Oct 12 21:44:20 2018 +++ src/sys/arch/aarch64/aarch64/aarch64_machdep.c Sat Oct 13 08:32:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: aarch64_machdep.c,v 1.13 2018/10/12 21:44:20 jmcneill Exp $ */ +/* $NetBSD: aarch64_machdep.c,v 1.14 2018/10/13 08:32:36 ryo Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.13 2018/10/12 21:44:20 jmcneill Exp $"); +__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.14 2018/10/13 08:32:36 ryo Exp $"); #include "opt_arm_debug.h" #include "opt_ddb.h" @@ -528,6 +528,45 @@ mm_md_physacc(paddr_t pa, vm_prot_t prot KAUTH_MACHDEP_UNMANAGEDMEM, NULL, NULL, NULL, NULL); } +#ifdef __HAVE_MM_MD_KERNACC +int +mm_md_kernacc(void *ptr, vm_prot_t prot, bool *handled) +{ + extern char __kernel_text[]; + extern char _end[]; + extern char __data_start[]; + extern char __rodata_start[]; + + vaddr_t kernstart = trunc_page((vaddr_t)__kernel_text); + vaddr_t kernend = round_page((vaddr_t)_end); + paddr_t kernstart_phys = KERN_VTOPHYS(kernstart); + vaddr_t data_start = (vaddr_t)__data_start; + vaddr_t rodata_start = (vaddr_t)__rodata_start; + vsize_t rosize = kernend - rodata_start; + + const vaddr_t v = (vaddr_t)ptr; + +#define IN_RANGE(addr,sta,end) (((sta) <= (addr)) && ((addr) < (end))) + + *handled = false; + if (IN_RANGE(v, kernstart, kernend + kernend_extra)) { + *handled = true; + if ((v < data_start) && (prot & VM_PROT_WRITE)) + return EFAULT; + } else if (IN_RANGE(v, AARCH64_KSEG_START, AARCH64_KSEG_END)) { + paddr_t pa = AARCH64_KVA_TO_PA(v); + if (IN_RANGE(pa, physical_start, physical_end)) { + *handled = true; + if (IN_RANGE(pa, kernstart_phys, + kernstart_phys + rosize) && + (prot & VM_PROT_WRITE)) +return EFAULT; + } + } + return 0; +} +#endif + void cpu_startup(void) { Index: src/sys/arch/aarch64/include/pmap.h diff -u src/sys/arch/aarch64/include/pmap.h:1.14 src/sys/arch/aarch64/include/pmap.h:1.15 --- src/sys/arch/aarch64/include/pmap.h:1.14 Fri Oct 12 01:28:58 2018 +++ src/sys/arch/aarch64/include/pmap.h Sat Oct 13 08:32:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.14 2018/10/12 01:28:58 ryo Exp $ */ +/* $NetBSD: pmap.h,v 1.15 2018/10/13 08:32:36 ryo Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -47,6 +47,10 @@ #define __HAVE_VM_PAGE_MD +#define PMAP_MAP_POOLPAGE(pa) AARCH64_PA_TO_KVA(pa) +#define PMAP_UNMAP_POOLPAGE(va) AARCH64_KVA_TO_PA(va) + + struct pmap { kmutex_t pm_lock; struct pool *pm_pvpool; Index: src/sys/arch/aarch64/include/types.h diff -u src/sys/arch/aarch64/include/types.h:1.11 src/sys/arch/aarch64/include/types.h:1.12 --- src/sys/arch/aarch64/include/types.h:1.11 Tue Jul 17 11:55:55 2018 +++ src/sys/arch/aarch64/include/types.h Sat Oct 13 08:32:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.11 2018/07/17 11:55:55 joerg Exp $ */ +/* $NetBSD: types.h,v 1.12 2018/10/13 08:32:36 ryo Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -94,6 +94,7 @@ typedef __uint64_t __register_t; #define __HAVE_FAST_SOFTINTS #define __HAVE_MM_MD_DIRECT_MAPPED_PHYS +#define __HAVE_MM_MD_KERNACC #define __HAVE_CPU_COUNTER #define __HAVE_SYSCALL_INTERN #define __HAVE_NEW_STYLE_BUS_H
CVS commit: [jdolecek-ncqfixes] src/sys/dev/ic
Module Name:src Committed By: jdolecek Date: Sat Oct 13 09:31:46 UTC 2018 Modified Files: src/sys/dev/ic [jdolecek-ncqfixes]: mvsata.c Log Message: make compile again with MVSATA_WITHOUTDMA To generate a diff of this commit: cvs rdiff -u -r1.41.2.8 -r1.41.2.9 src/sys/dev/ic/mvsata.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/mvsata.c diff -u src/sys/dev/ic/mvsata.c:1.41.2.8 src/sys/dev/ic/mvsata.c:1.41.2.9 --- src/sys/dev/ic/mvsata.c:1.41.2.8 Sat Oct 13 07:23:34 2018 +++ src/sys/dev/ic/mvsata.c Sat Oct 13 09:31:46 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: mvsata.c,v 1.41.2.8 2018/10/13 07:23:34 jdolecek Exp $ */ +/* $NetBSD: mvsata.c,v 1.41.2.9 2018/10/13 09:31:46 jdolecek Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.41.2.8 2018/10/13 07:23:34 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.41.2.9 2018/10/13 09:31:46 jdolecek Exp $"); #include "opt_mvsata.h" @@ -107,9 +107,9 @@ int mvsata_debug = 0; static void mvsata_probe_drive(struct ata_channel *); -static void mvsata_reset_channel(struct ata_channel *, int); #ifndef MVSATA_WITHOUTDMA +static void mvsata_reset_channel(struct ata_channel *, int); static int mvsata_bio(struct ata_drive_datas *, struct ata_xfer *); static void mvsata_reset_drive(struct ata_drive_datas *, int, uint32_t *); static int mvsata_exec_command(struct ata_drive_datas *, struct ata_xfer *); @@ -651,7 +651,6 @@ mvsata_reset_drive(struct ata_drive_data mvsata_edma_enable(mvport); } } -#endif /* MVSATA_WITHOUTDMA */ static void mvsata_reset_channel(struct ata_channel *chp, int flags) @@ -689,14 +688,11 @@ mvsata_reset_channel(struct ata_channel ata_kill_active(chp, KILL_RESET, flags); -#ifndef MVSATA_WITHOUTDMA mvsata_edma_config(mvport, mvport->port_edmamode_curr); mvsata_edma_reset_qptr(mvport); mvsata_edma_enable(mvport); -#endif } -#ifndef MVSATA_WITHOUTDMA static int mvsata_addref(struct ata_drive_datas *drvp) { @@ -896,23 +892,19 @@ mvsata_atapi_kill_pending(struct scsipi_ static void mvsata_setup_channel(struct ata_channel *chp) { -#if !defined(MVSATA_WITHOUTDMA) || defined(MVSATA_DEBUG) +#ifndef MVSATA_WITHOUTDMA struct mvsata_port *mvport = (struct mvsata_port *)chp; -#endif struct ata_drive_datas *drvp; - uint32_t edma_mode; int drive, s; -#ifndef MVSATA_WITHOUTDMA + uint32_t edma_mode = nodma; int i; const int crqb_size = sizeof(union mvsata_crqb) * MVSATA_EDMAQ_LEN; const int crpb_size = sizeof(struct crpb) * MVSATA_EDMAQ_LEN; const int eprd_buf_size = MVSATA_EPRD_MAX_SIZE * MVSATA_EDMAQ_LEN; -#endif DPRINTF(DEBUG_FUNCS, ("%s:%d: mvsata_setup_channel: ", device_xname(MVSATA_DEV2(mvport)), chp->ch_channel)); - edma_mode = nodma; for (drive = 0; drive < chp->ch_ndrives; drive++) { drvp = &chp->ch_drive[drive]; @@ -938,7 +930,6 @@ mvsata_setup_channel(struct ata_channel DPRINTF(DEBUG_FUNCS, ("EDMA %sactive mode\n", (edma_mode == nodma) ? "not " : "")); -#ifndef MVSATA_WITHOUTDMA if (edma_mode == nodma) { no_edma: if (mvport->port_crqb != NULL)
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jmcneill Date: Sat Oct 13 13:32:50 UTC 2018 Modified Files: src/sys/dev/acpi: acpi_mcfg.c Log Message: acpimcfg_scan_bus: Assign the pci_softc's sc_pc to the passed in PCI chipset tag -- pci_enumerate_bus depends on this being initialized. This happened to work on x86 because the pci_* md code allows for NULL pc. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/acpi/acpi_mcfg.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/acpi_mcfg.c diff -u src/sys/dev/acpi/acpi_mcfg.c:1.6 src/sys/dev/acpi/acpi_mcfg.c:1.7 --- src/sys/dev/acpi/acpi_mcfg.c:1.6 Fri Apr 6 17:30:25 2018 +++ src/sys/dev/acpi/acpi_mcfg.c Sat Oct 13 13:32:50 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_mcfg.c,v 1.6 2018/04/06 17:30:25 maxv Exp $ */ +/* $NetBSD: acpi_mcfg.c,v 1.7 2018/10/13 13:32:50 jmcneill Exp $ */ /*- * Copyright (C) 2015 NONAKA Kimihiro @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_mcfg.c,v 1.6 2018/04/06 17:30:25 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_mcfg.c,v 1.7 2018/10/13 13:32:50 jmcneill Exp $"); #include #include @@ -527,6 +527,7 @@ acpimcfg_scan_bus(struct pci_softc *sc, }; sc->sc_bus = bus; /* XXX */ + sc->sc_pc = pc; pci_enumerate_bus(sc, wildcard, acpimcfg_device_probe, NULL); }
CVS commit: src/sys/dev
Module Name:src Committed By: mlelstv Date: Sat Oct 13 14:24:35 UTC 2018 Modified Files: src/sys/dev: ld.c Log Message: take kernel lock for ioctl calls when backend isn't tagged MPSAFE. To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/sys/dev/ld.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/ld.c diff -u src/sys/dev/ld.c:1.104 src/sys/dev/ld.c:1.105 --- src/sys/dev/ld.c:1.104 Sat Oct 28 03:47:24 2017 +++ src/sys/dev/ld.c Sat Oct 13 14:24:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ld.c,v 1.104 2017/10/28 03:47:24 riastradh Exp $ */ +/* $NetBSD: ld.c,v 1.105 2018/10/13 14:24:35 mlelstv Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.104 2017/10/28 03:47:24 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.105 2018/10/13 14:24:35 mlelstv Exp $"); #include #include @@ -369,7 +369,11 @@ ldioctl(dev_t dev, u_long cmd, void *add return (error); if (sc->sc_ioctl) { + if ((sc->sc_flags & LDF_MPSAFE) == 0) + KERNEL_LOCK(1, curlwp); error = (*sc->sc_ioctl)(sc, cmd, addr, flag, 0); + if ((sc->sc_flags & LDF_MPSAFE) == 0) + KERNEL_UNLOCK_ONE(curlwp); if (error != EPASSTHROUGH) return (error); } @@ -388,7 +392,11 @@ ld_flush(device_t self, bool poll) struct ld_softc *sc = device_private(self); if (sc->sc_ioctl) { + if ((sc->sc_flags & LDF_MPSAFE) == 0) + KERNEL_LOCK(1, curlwp); error = (*sc->sc_ioctl)(sc, DIOCCACHESYNC, NULL, 0, poll); + if ((sc->sc_flags & LDF_MPSAFE) == 0) + KERNEL_UNLOCK_ONE(curlwp); if (error != 0) device_printf(self, "unable to flush cache\n"); }
CVS commit: src/crypto/dist/ipsec-tools
Module Name:src Committed By: maxv Date: Sat Oct 13 15:08:51 UTC 2018 Modified Files: src/crypto/dist/ipsec-tools: NEWS README Removed Files: src/crypto/dist/ipsec-tools: netbsd-import.sh Log Message: Reduce the diff against the latest release. Also remove netbsd-import.sh, since we are upstream now. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/crypto/dist/ipsec-tools/NEWS \ src/crypto/dist/ipsec-tools/README cvs rdiff -u -r1.3 -r0 src/crypto/dist/ipsec-tools/netbsd-import.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/dist/ipsec-tools/NEWS diff -u src/crypto/dist/ipsec-tools/NEWS:1.4 src/crypto/dist/ipsec-tools/NEWS:1.5 --- src/crypto/dist/ipsec-tools/NEWS:1.4 Fri Jan 23 09:40:56 2009 +++ src/crypto/dist/ipsec-tools/NEWS Sat Oct 13 15:08:51 2018 @@ -1,6 +1,24 @@ Version history: -0.8 CVS (no official release yet) +0.8.x CVS (no official release yet) + o A lot of code cleanup + o XXX TODO + +0.8.2 - 27 February 2014 + o Fix admin port establish-sa for tunnel mode SAs (Alexander Sbitnev) + o Fix source port selection regression from version 0.8.1 + o Various logging improvements + o Additional compliance and build fixes + +0.8.1 - 08 January 2013 + o Improved X.509 subject name comparation (Götz Babin-Ebell) + o Relax DPD cookie check for Cisco IOS compatibility (Roman Antink) + o Allow simplified syntax for inherited remote blocks (Roman Antink) + o Never shring pfkey socket buffer (Marcelo Leitner) + o Privilege separation child process exit fix + o Multiple memory allocation and use-after-free fixes + +0.8 - 18 March 2011 o Fix authentication method ambiguity with kerberos and xauth o RFC2253 compliant escaping of asn1dn identifiers (Cyrus Rahman) o Local address code rewrite to speed things up Index: src/crypto/dist/ipsec-tools/README diff -u src/crypto/dist/ipsec-tools/README:1.4 src/crypto/dist/ipsec-tools/README:1.5 --- src/crypto/dist/ipsec-tools/README:1.4 Sun May 20 09:14:18 2018 +++ src/crypto/dist/ipsec-tools/README Sat Oct 13 15:08:51 2018 @@ -56,5 +56,6 @@ The mailing lists from SourceForge still ipsec-tools-de...@lists.sourceforge.net ipsec-tools-us...@lists.sourceforge.net - http://sf.net/mailarchive/forum.php?forum_name=ipsec-tools-devel +You can also browse the list archive: + http://sf.net/mailarchive/forum.php?forum_name=ipsec-tools-devel
CVS commit: src/crypto/dist/ipsec-tools/src/racoon
Module Name:src Committed By: maxv Date: Sat Oct 13 15:17:45 UTC 2018 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: logger.c Log Message: Fix ticket SF#91: pass the correct size for tbuf. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/crypto/dist/ipsec-tools/src/racoon/logger.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/dist/ipsec-tools/src/racoon/logger.c diff -u src/crypto/dist/ipsec-tools/src/racoon/logger.c:1.4 src/crypto/dist/ipsec-tools/src/racoon/logger.c:1.5 --- src/crypto/dist/ipsec-tools/src/racoon/logger.c:1.4 Sat Sep 9 16:22:09 2006 +++ src/crypto/dist/ipsec-tools/src/racoon/logger.c Sat Oct 13 15:17:45 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: logger.c,v 1.4 2006/09/09 16:22:09 manu Exp $ */ +/* $NetBSD: logger.c,v 1.5 2018/10/13 15:17:45 maxv Exp $ */ /* $KAME: logger.c,v 1.9 2002/09/03 14:37:03 itojun Exp $ */ @@ -79,13 +79,13 @@ log_open(siz, fname) } memset(p->buf, 0, sizeof(char *) * siz); - p->tbuf = (time_t *)racoon_malloc(sizeof(time_t *) * siz); + p->tbuf = (time_t *)racoon_malloc(sizeof(time_t) * siz); if (p->tbuf == NULL) { racoon_free(p->buf); racoon_free(p); return NULL; } - memset(p->tbuf, 0, sizeof(time_t *) * siz); + memset(p->tbuf, 0, sizeof(time_t) * siz); p->siz = siz; if (fname)
CVS commit: src/crypto/dist/ipsec-tools/src/racoon
Module Name:src Committed By: maxv Date: Sat Oct 13 15:38:28 UTC 2018 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: racoon.conf.5 Log Message: Fix SF#24: incorrect authentication algorithms, copy-pasto. To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 \ src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5 diff -u src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5:1.67 src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5:1.68 --- src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5:1.67 Thu Jun 20 15:41:18 2013 +++ src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5 Sat Oct 13 15:38:28 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: racoon.conf.5,v 1.67 2013/06/20 15:41:18 christos Exp $ +.\" $NetBSD: racoon.conf.5,v 1.68 2018/10/13 15:38:28 maxv Exp $ .\" .\" Id: racoon.conf.5,v 1.54 2006/08/22 18:17:17 manubsd Exp .\" @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 17, 2013 +.Dd October 13, 2018 .Dt RACOON.CONF 5 .Os .\" @@ -1106,7 +1106,6 @@ Note that the kernel may not support the .Pq used with ESP .\" .It Ic authentication_algorithm Ar algorithms ; -.Ic des , 3des , des_iv64 , des_iv32 , .Ic hmac_md5 , hmac_sha1 , hmac_sha256, hmac_sha384, hmac_sha512, non_auth .Pq used with ESP authentication and AH .\"
CVS commit: [netbsd-8] src/sys/dev/dm
Module Name:src Committed By: martin Date: Sat Oct 13 17:09:41 UTC 2018 Modified Files: src/sys/dev/dm [netbsd-8]: device-mapper.c Log Message: Pull up following revision(s) (requested by mlelstv in ticket #1055): sys/dev/dm/device-mapper.c: revision 1.40 Add ioctls to query geometry. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.38.10.1 src/sys/dev/dm/device-mapper.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.38 src/sys/dev/dm/device-mapper.c:1.38.10.1 --- src/sys/dev/dm/device-mapper.c:1.38 Mon Jul 11 11:31:50 2016 +++ src/sys/dev/dm/device-mapper.c Sat Oct 13 17:09:41 2018 @@ -1,4 +1,4 @@ -/*$NetBSD: device-mapper.c,v 1.38 2016/07/11 11:31:50 msaitoh Exp $ */ +/*$NetBSD: device-mapper.c,v 1.38.10.1 2018/10/13 17:09:41 martin Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -510,6 +510,42 @@ disk_ioctl_switch(dev_t dev, u_long cmd, break; } + case DIOCGSECTORSIZE: + { + u_int *valp = data; + uint64_t numsec; + unsigned int secsize; + + if ((dmv = dm_dev_lookup(NULL, NULL, minor(dev))) == NULL) + return ENODEV; + + aprint_debug("DIOCGSECTORSIZE ioctl called\n"); + + dm_table_disksize(&dmv->table_head, &numsec, &secsize); + *valp = secsize; + + dm_dev_unbusy(dmv); + break; + } + + case DIOCGMEDIASIZE: + { + off_t *valp = data; + uint64_t numsec; + unsigned int secsize; + + if ((dmv = dm_dev_lookup(NULL, NULL, minor(dev))) == NULL) + return ENODEV; + + aprint_debug("DIOCGMEDIASIZE ioctl called\n"); + + dm_table_disksize(&dmv->table_head, &numsec, &secsize); + *valp = numsec; + + dm_dev_unbusy(dmv); + break; + } + default: aprint_debug("unknown disk_ioctl called\n");
CVS commit: [netbsd-8] src/sys/kern
Module Name:src Committed By: martin Date: Sat Oct 13 17:14:13 UTC 2018 Modified Files: src/sys/kern [netbsd-8]: kern_subr.c Log Message: Pull up following revision(s) (requested by mlelstv in ticket #1056): sys/kern/kern_subr.c: revision 1.220 Set rootdev for wedges. To generate a diff of this commit: cvs rdiff -u -r1.217 -r1.217.10.1 src/sys/kern/kern_subr.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_subr.c diff -u src/sys/kern/kern_subr.c:1.217 src/sys/kern/kern_subr.c:1.217.10.1 --- src/sys/kern/kern_subr.c:1.217 Thu May 12 02:24:16 2016 +++ src/sys/kern/kern_subr.c Sat Oct 13 17:14:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_subr.c,v 1.217 2016/05/12 02:24:16 ozaki-r Exp $ */ +/* $NetBSD: kern_subr.c,v 1.217.10.1 2018/10/13 17:14:13 martin Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2002, 2007, 2008 The NetBSD Foundation, Inc. @@ -79,7 +79,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.217 2016/05/12 02:24:16 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_subr.c,v 1.217.10.1 2018/10/13 17:14:13 martin Exp $"); #include "opt_ddb.h" #include "opt_md.h" @@ -430,11 +430,13 @@ setroot(device_t bootdv, int bootpartiti goto haveroot; } - if (rootdev == NODEV && - dv != NULL && device_class(dv) == DV_DISK && - device_is_a(dv, "dk") && - (majdev = devsw_name2blk(device_xname(dv), NULL, 0)) >= 0) + if (dv != NULL && device_class(dv) == DV_DISK && + !DEV_USES_PARTITIONS(dv) && + (majdev = devsw_name2blk(device_xname(dv), NULL, 0)) >= 0) { + rootdv = dv; rootdev = makedev(majdev, device_unit(dv)); + goto haveroot; + } rootdevname = devsw_blk2name(major(rootdev)); if (rootdevname == NULL) {
CVS commit: [netbsd-8] src/sys/arch/xen
Module Name:src Committed By: martin Date: Sat Oct 13 17:16:12 UTC 2018 Modified Files: src/sys/arch/xen/include [netbsd-8]: xen.h src/sys/arch/xen/x86 [netbsd-8]: autoconf.c Log Message: Pull up following revision(s) (requested by mlelstv in ticket #1057): sys/arch/xen/x86/autoconf.c: revision 1.20 sys/arch/xen/include/xen.h: revision 1.40 Support bootspec. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.37.10.1 src/sys/arch/xen/include/xen.h cvs rdiff -u -r1.18 -r1.18.2.1 src/sys/arch/xen/x86/autoconf.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/xen/include/xen.h diff -u src/sys/arch/xen/include/xen.h:1.37 src/sys/arch/xen/include/xen.h:1.37.10.1 --- src/sys/arch/xen/include/xen.h:1.37 Thu Jul 7 06:55:40 2016 +++ src/sys/arch/xen/include/xen.h Sat Oct 13 17:16:12 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: xen.h,v 1.37 2016/07/07 06:55:40 msaitoh Exp $ */ +/* $NetBSD: xen.h,v 1.37.10.1 2018/10/13 17:16:12 martin Exp $ */ /* * @@ -44,7 +44,7 @@ struct xen_netinfo { }; union xen_cmdline_parseinfo { - char xcp_bootdev[16]; /* sizeof(dv_xname) */ + char xcp_bootdev[144]; struct xen_netinfo xcp_netinfo; char xcp_console[16]; char xcp_pcidevs[64]; Index: src/sys/arch/xen/x86/autoconf.c diff -u src/sys/arch/xen/x86/autoconf.c:1.18 src/sys/arch/xen/x86/autoconf.c:1.18.2.1 --- src/sys/arch/xen/x86/autoconf.c:1.18 Tue May 23 08:48:35 2017 +++ src/sys/arch/xen/x86/autoconf.c Sat Oct 13 17:16:12 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.18 2017/05/23 08:48:35 nonaka Exp $ */ +/* $NetBSD: autoconf.c,v 1.18.2.1 2018/10/13 17:16:12 martin Exp $ */ /* NetBSD: autoconf.c,v 1.75 2003/12/30 12:33:22 pk Exp */ /*- @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.18 2017/05/23 08:48:35 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.18.2.1 2018/10/13 17:16:12 martin Exp $"); #include "opt_xen.h" #include "opt_compat_oldboot.h" @@ -154,7 +154,8 @@ cpu_rootconf(void) cpu_bootconf(); printf("boot device: %s\n", - booted_device ? device_xname(booted_device) : ""); + booted_device ? device_xname(booted_device) : + bootspec ? bootspec : ""); rootconf(); } @@ -168,6 +169,7 @@ cpu_bootconf(void) device_t dv; deviter_t di; union xen_cmdline_parseinfo xcp; + static char bootspecbuf[sizeof(xcp.xcp_bootdev)]; if (booted_device) return; @@ -204,6 +206,18 @@ cpu_bootconf(void) break; } deviter_release(&di); + + if (booted_device) + return; + + /* + * not a boot device name, pass through to MI code + */ + if (xcp.xcp_bootdev[0] != '\0') { + strlcpy(bootspecbuf, xcp.xcp_bootdev, sizeof(bootspecbuf)); + bootspec = bootspecbuf; + return; + } } #include "pci.h"
CVS commit: [netbsd-8] src/sys/dev
Module Name:src Committed By: martin Date: Sat Oct 13 17:19:05 UTC 2018 Modified Files: src/sys/dev [netbsd-8]: vnd.c Log Message: Pull up following revision(s) (requested by mlelstv in ticket #1058): sys/dev/vnd.c: revision 1.268 Calculate a missing cylinder count in the geometry spec from image size. To generate a diff of this commit: cvs rdiff -u -r1.259.6.2 -r1.259.6.3 src/sys/dev/vnd.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/vnd.c diff -u src/sys/dev/vnd.c:1.259.6.2 src/sys/dev/vnd.c:1.259.6.3 --- src/sys/dev/vnd.c:1.259.6.2 Tue Oct 9 09:58:09 2018 +++ src/sys/dev/vnd.c Sat Oct 13 17:19:05 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: vnd.c,v 1.259.6.2 2018/10/09 09:58:09 martin Exp $ */ +/* $NetBSD: vnd.c,v 1.259.6.3 2018/10/13 17:19:05 martin Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.259.6.2 2018/10/09 09:58:09 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.259.6.3 2018/10/13 17:19:05 martin Exp $"); #if defined(_KERNEL_OPT) #include "opt_vnd.h" @@ -1419,7 +1419,6 @@ vndioctl(dev_t dev, u_long cmd, void *da * Sanity-check the sector size. */ if (!DK_DEV_BSIZE_OK(vnd->sc_geom.vng_secsize) || - vnd->sc_geom.vng_ncylinders == 0 || vnd->sc_geom.vng_ntracks == 0 || vnd->sc_geom.vng_nsectors == 0) { error = EINVAL; @@ -1427,6 +1426,14 @@ vndioctl(dev_t dev, u_long cmd, void *da } /* + * Compute missing cylinder count from size + */ + if (vnd->sc_geom.vng_ncylinders == 0) +vnd->sc_geom.vng_ncylinders = vnd->sc_size / + (vnd->sc_geom.vng_ntracks * + vnd->sc_geom.vng_nsectors); + + /* * Compute the size (in DEV_BSIZE blocks) specified * by the geometry. */
CVS commit: [netbsd-8] src/sys/dev
Module Name:src Committed By: martin Date: Sat Oct 13 17:21:51 UTC 2018 Modified Files: src/sys/dev [netbsd-8]: vnd.c vndvar.h Log Message: Pull up following revision(s) (requested by mlelstv in ticket #1059): sys/dev/vnd.c: revision 1.265 sys/dev/vndvar.h: revision 1.37 getdisksize only operates on device vnodes. Use the ioctl on the underlying device instead. To generate a diff of this commit: cvs rdiff -u -r1.259.6.3 -r1.259.6.4 src/sys/dev/vnd.c cvs rdiff -u -r1.35 -r1.35.10.1 src/sys/dev/vndvar.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/vnd.c diff -u src/sys/dev/vnd.c:1.259.6.3 src/sys/dev/vnd.c:1.259.6.4 --- src/sys/dev/vnd.c:1.259.6.3 Sat Oct 13 17:19:05 2018 +++ src/sys/dev/vnd.c Sat Oct 13 17:21:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: vnd.c,v 1.259.6.3 2018/10/13 17:19:05 martin Exp $ */ +/* $NetBSD: vnd.c,v 1.259.6.4 2018/10/13 17:21:51 martin Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.259.6.3 2018/10/13 17:19:05 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.259.6.4 2018/10/13 17:21:51 martin Exp $"); #if defined(_KERNEL_OPT) #include "opt_vnd.h" @@ -575,20 +575,18 @@ vnode_has_strategy(struct vnd_softc *vnd vnode_has_op(vnd->sc_vp, VOFFSET(vop_strategy)); } +/* Verify that I/O requests cannot be smaller than the + * smallest I/O size supported by the backend. + */ static bool vnode_has_large_blocks(struct vnd_softc *vnd) { - u_int32_t vnd_secsize, mnt_secsize; - uint64_t numsec; - unsigned secsize; - - if (getdisksize(vnd->sc_vp, &numsec, &secsize)) - return true; + u_int32_t vnd_secsize, iosize; + iosize = vnd->sc_iosize; vnd_secsize = vnd->sc_geom.vng_secsize; - mnt_secsize = secsize; - return vnd_secsize % mnt_secsize != 0; + return vnd_secsize % iosize != 0; } /* XXX this function needs a reliable check to detect @@ -1406,6 +1404,13 @@ vndioctl(dev_t dev, u_long cmd, void *da vnd->sc_vp = nd.ni_vp; vnd->sc_size = btodb(vattr.va_size); /* note truncation */ + /* get smallest I/O size for underlying device, fall back to + * fundamental I/O size of underlying filesystem + */ + error = bdev_ioctl(vattr.va_fsid, DIOCGSECTORSIZE, &vnd->sc_iosize, FKIOCTL, l); + if (error) + vnd->sc_iosize = vnd->sc_vp->v_mount->mnt_stat.f_frsize; + /* * Use pseudo-geometry specified. If none was provided, * use "standard" Adaptec fictitious geometry. Index: src/sys/dev/vndvar.h diff -u src/sys/dev/vndvar.h:1.35 src/sys/dev/vndvar.h:1.35.10.1 --- src/sys/dev/vndvar.h:1.35 Sun Sep 6 06:00:59 2015 +++ src/sys/dev/vndvar.h Sat Oct 13 17:21:51 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: vndvar.h,v 1.35 2015/09/06 06:00:59 dholland Exp $ */ +/* $NetBSD: vndvar.h,v 1.35.10.1 2018/10/13 17:21:51 martin Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -111,6 +111,7 @@ struct vnd_softc { int sc_flags; /* flags */ uint64_t sc_size; /* size of vnd */ struct vnode *sc_vp; /* vnode */ + u_int sc_iosize; /* smallest I/O size for backend */ kauth_cred_t sc_cred; /* credentials */ int sc_maxactive; /* max # of active requests */ struct bufq_state *sc_tab; /* transfer queue */
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Sat Oct 13 17:32:32 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.1 Log Message: Tickets #1055 - #1060 To generate a diff of this commit: cvs rdiff -u -r1.1.2.32 -r1.1.2.33 src/doc/CHANGES-8.1 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.1 diff -u src/doc/CHANGES-8.1:1.1.2.32 src/doc/CHANGES-8.1:1.1.2.33 --- src/doc/CHANGES-8.1:1.1.2.32 Tue Oct 9 10:11:08 2018 +++ src/doc/CHANGES-8.1 Sat Oct 13 17:32:32 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.1,v 1.1.2.32 2018/10/09 10:11:08 martin Exp $ +# $NetBSD: CHANGES-8.1,v 1.1.2.33 2018/10/13 17:32:32 martin Exp $ A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1 release: @@ -1260,3 +1260,122 @@ sys/dev/hdaudio/hdafg.c1.16 to make e.g. the built-in speaker work on Dell OptiPlex 5060. [manu, ticket #1053] +sys/dev/dm/device-mapper.c 1.40 + + Add ioctls to query geometry. + [mlelstv, ticket #1055] + +sys/kern/kern_subr.c1.220 + + Set rootdev for wedges. + [mlelstv, ticket #1056] + +sys/arch/xen/include/xen.h 1.40 +sys/arch/xen/x86/autoconf.c 1.20 + + Support bootspec. + [mlelstv, ticket #1057] + +sys/dev/vnd.c 1.268 + + Calculate a missing cylinder count in the geometry spec from + image size. + [mlelstv, ticket #1058] + +sys/dev/vnd.c 1.265 +sys/dev/vndvar.h1.37 + + getdisksize only operates on device vnodes. Use the ioctl on + the underlying device instead. + [mlelstv, ticket #1059] + +external/bsd/nsd/dist/contrib/nsd.service up to 1.1.1.1 +external/bsd/nsd/dist/contrib/nsd.socketup to 1.1.1.1 +external/bsd/nsd/dist/xfr-inspect.c up to 1.1.1.2 +external/bsd/nsd/dist/systemd.m4up to 1.1.1.1 +external/bsd/nsd/Makefile.inc up to 1.5 +external/bsd/nsd/dist/Makefile.in up to 1.1.1.3 +external/bsd/nsd/dist/axfr.cup to 1.1.1.2 +external/bsd/nsd/dist/config.h.in up to 1.1.1.3 +external/bsd/nsd/dist/configlexer.c up to 1.3 +external/bsd/nsd/dist/configlexer.lex up to 1.1.1.3 +external/bsd/nsd/dist/configparser.cup to 1.3 +external/bsd/nsd/dist/configparser.hup to 1.3 +external/bsd/nsd/dist/configparser.yup to 1.1.1.3 +external/bsd/nsd/dist/configure up to 1.1.1.3 +external/bsd/nsd/dist/configure.ac up to 1.1.1.3 +external/bsd/nsd/dist/dbaccess.cup to 1.1.1.2 +external/bsd/nsd/dist/dbcreate.cup to 1.1.1.3 +external/bsd/nsd/dist/difffile.cup to 1.1.1.3 +external/bsd/nsd/dist/difffile.hup to 1.1.1.2 +external/bsd/nsd/dist/dns.c up to 1.1.1.3 +external/bsd/nsd/dist/dns.h up to 1.1.1.3 +external/bsd/nsd/dist/ipc.c up to 1.1.1.3 +external/bsd/nsd/dist/lookup3.c up to 1.1.1.2 +external/bsd/nsd/dist/mini_event.c up to 1.1.1.2 +external/bsd/nsd/dist/mini_event.h up to 1.1.1.2 +external/bsd/nsd/dist/namedb.c up to 1.1.1.3 +external/bsd/nsd/dist/namedb.h up to 1.1.1.2 +external/bsd/nsd/dist/netio.c up to 1.1.1.2 +external/bsd/nsd/dist/nsd-checkconf.8.inup to 1.1.1.3 +external/bsd/nsd/dist/nsd-checkconf.c up to 1.1.1.3 +external/bsd/nsd/dist/nsd-checkzone.8.inup to 1.1.1.3 +external/bsd/nsd/dist/nsd-checkzone.c up to 1.1.1.2 +external/bsd/nsd/dist/nsd-control.8.in up to 1.1.1.3 +external/bsd/nsd/dist/nsd-control.c up to 1.1.1.3 +external/bsd/nsd/dist/nsd-mem.c up to 1.1.1.3 +external/bsd/nsd/dist/nsd.8.in up to 1.1.1.3 +external/bsd/nsd/dist/nsd.c up to 1.1.1.3 +external/bsd/nsd/dist/nsd.conf.5.in up to 1.1.1.3 +external/bsd/nsd/dist/nsd.conf.sample.inup to 1.1.1.3 +external/bsd/nsd/dist/nsd.h up to 1.1.1.3 +external/bsd/nsd/dist/nsec3.c up to 1.1.1.3 +external/bsd/nsd/dist/nsec3.h up to 1.1.1.2 +external/bsd/nsd/dist/options.c up to 1.1.1.3 +external/bsd/nsd/dist/options.h up to 1.1.1.3 +external/bsd/nsd/dist/packet.c up to 1.1.1.2 +external/bsd/nsd/dist/packet.h up to 1.1.1.2 +external/bsd/nsd/dist/query.c up to 1.1.1.3 +external/bsd/nsd/dist/query.h up to 1.1.1.2 +external/bsd/nsd/dist/radtree.c up to 1.1.1.2 +external/bsd/nsd/dist/radtree.h up to 1.1.1.2 +external/bsd/nsd/dist/rbtree.c up to 1.1.1.2 +external/bsd/nsd/dist/rbtree.h up to 1.1.1.2 +external/bsd/nsd/dist/rdata.c up to 1.1.1.2 +external/bsd/nsd/dist/region-allocator.cup to 1.1.1.2 +external/bsd
CVS commit: src/sys/arch/sparc64/dev
Module Name:src Committed By: macallan Date: Sat Oct 13 19:53:43 UTC 2018 Modified Files: src/sys/arch/sparc64/dev: tadpmu.c tadpmureg.h tadpmuvar.h Log Message: - use interrupts - report power button to sysmon To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sparc64/dev/tadpmu.c \ src/sys/arch/sparc64/dev/tadpmureg.h src/sys/arch/sparc64/dev/tadpmuvar.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/sparc64/dev/tadpmu.c diff -u src/sys/arch/sparc64/dev/tadpmu.c:1.1 src/sys/arch/sparc64/dev/tadpmu.c:1.2 --- src/sys/arch/sparc64/dev/tadpmu.c:1.1 Fri Oct 12 21:44:32 2018 +++ src/sys/arch/sparc64/dev/tadpmu.c Sat Oct 13 19:53:43 2018 @@ -1,4 +1,4 @@ -/*/* $NetBSD: tadpmu.c,v 1.1 2018/10/12 21:44:32 macallan Exp $ */ +/*/* $NetBSD: tadpmu.c,v 1.2 2018/10/13 19:53:43 macallan Exp $ */ /*- * Copyright (c) 2018 Michael Lorenz @@ -33,19 +33,31 @@ #include #include #include +#include #include #include #include +#include #include #include +#ifdef TADPMU_DEBUG +#define DPRINTF printf +#else +#define DPRINTF while (0) printf +#endif + static bus_space_tag_t tadpmu_iot; static bus_space_handle_t tadpmu_hcmd; static bus_space_handle_t tadpmu_hdata; static struct sysmon_envsys *tadpmu_sme; static envsys_data_t tadpmu_sensors[5]; +static uint8_t idata = 0xff; +static uint8_t ivalid = 0; +static wchan_t tadpmu; +static struct sysmon_pswitch tadpmu_pbutton; static inline void tadpmu_cmd(uint8_t d) @@ -111,6 +123,7 @@ tadpmu_send_cmd(uint8_t cmd) int bail = 0; uint8_t d; + ivalid = 0; tadpmu_cmd(cmd); d = tadpmu_status(); @@ -132,17 +145,24 @@ tadpmu_recv(void) int bail = 0; uint8_t d; - d = tadpmu_status(); - while ((d & STATUS_HAVE_DATA) == 0) { - delay(10); - bail++; - if (bail > 1000) { - printf("%s: timeout waiting for data %02x\n", __func__, d); - break; + if (cold) { + d = tadpmu_status(); + while ((d & STATUS_HAVE_DATA) == 0) { + delay(10); + bail++; + if (bail > 1000) { +printf("%s: timeout waiting for data %02x\n", +__func__, d); +break; + } + d = tadpmu_status(); } - d = tadpmu_status(); + return bus_space_read_1(tadpmu_iot, tadpmu_hdata, 0); + } else { + while (ivalid == 0) + tsleep(tadpmu, 0, "pmucmd", 1); + return idata; } - return bus_space_read_1(tadpmu_iot, tadpmu_hdata, 0); } static void @@ -194,6 +214,35 @@ tadpmu_sensors_refresh(struct sysmon_env } } +int +tadpmu_intr(void *cookie) +{ + uint8_t s = tadpmu_status(), d; + if (s & STATUS_INTR) { + /* interrupt message */ + d = tadpmu_data(); + DPRINTF("status change %02x\n", d); + switch (d) { + case TADPMU_POWERBUTTON: +sysmon_pswitch_event(&tadpmu_pbutton, +PSWITCH_EVENT_PRESSED); +break; + case TADPMU_LID: +/* read genstat and report lid */ +break; + } + } + s = tadpmu_status(); + if (s & STATUS_HAVE_DATA) { + idata = tadpmu_data(); + ivalid = 1; + wakeup(tadpmu); + DPRINTF("%s data %02x\n", __func__, idata); + } + + return 1; +} + int tadpmu_init(bus_space_tag_t t, bus_space_handle_t hcmd, bus_space_handle_t hdata) { @@ -256,6 +305,14 @@ tadpmu_init(bus_space_tag_t t, bus_space #endif sysmon_envsys_register(tadpmu_sme); + sysmon_task_queue_init(); + memset(&tadpmu_pbutton, 0, sizeof(struct sysmon_pswitch)); + tadpmu_pbutton.smpsw_name = "tadpmu"; + tadpmu_pbutton.smpsw_type = PSWITCH_TYPE_POWER; + if (sysmon_pswitch_register(&tadpmu_pbutton) != 0) + aprint_error( + "unable to register power button with sysmon\n"); + return 0; } Index: src/sys/arch/sparc64/dev/tadpmureg.h diff -u src/sys/arch/sparc64/dev/tadpmureg.h:1.1 src/sys/arch/sparc64/dev/tadpmureg.h:1.2 --- src/sys/arch/sparc64/dev/tadpmureg.h:1.1 Fri Oct 12 21:44:32 2018 +++ src/sys/arch/sparc64/dev/tadpmureg.h Sat Oct 13 19:53:43 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: tadpmureg.h,v 1.1 2018/10/12 21:44:32 macallan Exp $ */ +/* $NetBSD: tadpmureg.h,v 1.2 2018/10/13 19:53:43 macallan Exp $ */ /*- * Copyright (c) 2018 Michael Lorenz @@ -38,9 +38,10 @@ #define TADPMU_STATUS 0x6 #define TADPMU_DATA 0x2 -#define STATUS_HAVE_DATA 0x01 +#define STATUS_HAVE_DATA 0x01 /* response from command */ #define STATUS_CMD_IN_PROGRESS 0x02 -#define STATUS_SEND_DATA 0x08 +#define STATUS_INTR 0x04 /* interrupt happened, read data to ack */ +#define STATUS_SEND_DATA 0x08 /* cmd waiting for data */ #define CMD_SET_OPMODE 0x41 /* not sure what exactly this does... */ #define OPMODE_UNIX 0x75 /* other than toggling the UNIX mode */ @@ -80,6 +81,8 @@ #define GENSTAT2_MUTE 0x02 - +/* messages from interrupts */ +#define TADPMU_LID 0x05 +#define TADPMU_POWERBUTTON 0x06 #endif /* TADPMUREG_H */ \ No newline at end of file Index: src/sys/arch/sparc64/dev/tadpmuvar.h diff -u src/sys/arch/sparc64/dev/tadpmuvar.h:1.1 src/sys/arch/sparc64/dev/tadpmuvar.h:1.2 --- src/sys/arch/sparc
CVS commit: src/sys/arch/sparc64
Module Name:src Committed By: macallan Date: Sat Oct 13 20:11:48 UTC 2018 Modified Files: src/sys/arch/sparc64/conf: files.sparc64 src/sys/arch/sparc64/dev: pckbc_ebus.c tadpmu.c Log Message: config and attachment goop for tadpmu To generate a diff of this commit: cvs rdiff -u -r1.154 -r1.155 src/sys/arch/sparc64/conf/files.sparc64 cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sparc64/dev/pckbc_ebus.c \ src/sys/arch/sparc64/dev/tadpmu.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/sparc64/conf/files.sparc64 diff -u src/sys/arch/sparc64/conf/files.sparc64:1.154 src/sys/arch/sparc64/conf/files.sparc64:1.155 --- src/sys/arch/sparc64/conf/files.sparc64:1.154 Tue Dec 19 14:34:08 2017 +++ src/sys/arch/sparc64/conf/files.sparc64 Sat Oct 13 20:11:48 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.sparc64,v 1.154 2017/12/19 14:34:08 nakayama Exp $ +# $NetBSD: files.sparc64,v 1.155 2018/10/13 20:11:48 macallan Exp $ # @(#)files.sparc64 8.1 (Berkeley) 7/19/93 # sparc64-specific configuration info @@ -164,8 +164,10 @@ file arch/sparc64/dev/com_ebus.c com_eb # ebus PS/2 keyboard attachment for Tadpole SPARCle, etc. include "dev/pckbport/files.pckbport" -attach pckbc at ebus with pckbc_ebus +attach pckbc at ebus with pckbc_ebus : sysmon_envsys file arch/sparc64/dev/pckbc_ebus.c pckbc_ebus +defflag opt_tadpmu.h HAVE_TADPMU +file arch/sparc64/dev/tadpmu.c pckbc_ebus device zstty {}: tty attach zstty at zs Index: src/sys/arch/sparc64/dev/pckbc_ebus.c diff -u src/sys/arch/sparc64/dev/pckbc_ebus.c:1.2 src/sys/arch/sparc64/dev/pckbc_ebus.c:1.3 --- src/sys/arch/sparc64/dev/pckbc_ebus.c:1.2 Fri Aug 14 10:59:27 2015 +++ src/sys/arch/sparc64/dev/pckbc_ebus.c Sat Oct 13 20:11:48 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pckbc_ebus.c,v 1.2 2015/08/14 10:59:27 nakayama Exp $ */ +/* $NetBSD: pckbc_ebus.c,v 1.3 2018/10/13 20:11:48 macallan Exp $ */ /* * Copyright (c) 2002 Valeriy E. Ushakov @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pckbc_ebus.c,v 1.2 2015/08/14 10:59:27 nakayama Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pckbc_ebus.c,v 1.3 2018/10/13 20:11:48 macallan Exp $"); #include #include @@ -47,9 +47,13 @@ __KERNEL_RCSID(0, "$NetBSD: pckbc_ebus.c #include #include +#include "opt_tadpmu.h" +#include +#include + struct pckbc_ebus_softc { struct pckbc_softc psc_pckbc; /* real "pckbc" softc */ - uint32_t psc_intr[PCKBC_NSLOTS]; + uint32_t psc_intr[5]; /* Tadpole Viper's pckbc has 3 slots */ }; static int pckbc_ebus_match(device_t, cfdata_t, void *); @@ -118,7 +122,7 @@ pckbc_ebus_attach(device_t parent, devic return; } } else { - for (i = 0; i < PCKBC_NSLOTS; i++) + for (i = 0; i < ea->ea_nintr; i++) sc->psc_intr[i] = ea->ea_intr[i]; } @@ -182,8 +186,42 @@ pckbc_ebus_attach(device_t parent, devic /* finish off the attach */ aprint_normal("\n"); pckbc_attach(psc); -} +#ifdef HAVE_TADPMU + /* now look for a tadpmu child device */ + char name[64], *p; + int pmu = 0; + for (node = prom_firstchild(ea->ea_node); + node != 0; node = prom_nextsibling(node)) { + if((p = prom_getpropstringA(node, "name", name, 64)) != NULL) { + if (strcmp(name, "tadpmu") == 0) { +pmu = node; +break; + } + } + } + if (pmu != 0) { + void *irq; + bus_space_handle_t hcmd, hdata; + if (bus_space_map(iot, ioaddr + TADPMU_CMD, 1, 0, &hcmd) != 0) { + bus_space_unmap(iot, hcmd, 1); + aprint_error(": unable to map PMU cmd register\n"); + return; + } + if (bus_space_map(iot, ioaddr + TADPMU_DATA, 1, 0, &hdata) != 0) { + bus_space_unmap(iot, hdata, 1); + aprint_error(": unable to map PMU data register\n"); + return; + } + tadpmu_init(iot, hcmd, hdata); + irq = bus_intr_establish(iot, sc->psc_intr[2], IPL_TTY, + tadpmu_intr, sc); + if (irq == NULL) { + aprint_error("failed to establish tadpmu interrupt\n"); + } + } +#endif +} static void pckbc_ebus_intr_establish(struct pckbc_softc *sc, pckbport_slot_t slot) Index: src/sys/arch/sparc64/dev/tadpmu.c diff -u src/sys/arch/sparc64/dev/tadpmu.c:1.2 src/sys/arch/sparc64/dev/tadpmu.c:1.3 --- src/sys/arch/sparc64/dev/tadpmu.c:1.2 Sat Oct 13 19:53:43 2018 +++ src/sys/arch/sparc64/dev/tadpmu.c Sat Oct 13 20:11:48 2018 @@ -1,4 +1,4 @@ -/*/* $NetBSD: tadpmu.c,v 1.2 2018/10/13 19:53:43 macallan Exp $ */ +/*/* $NetBSD: tadpmu.c,v 1.3 2018/10/13 20:11:48 macallan Exp $ */ /*- * Copyright (c) 2018 Michael Lorenz @@ -28,6 +28,8 @@ /* a driver for the PMU found in Tadpole Wiper and possibly SPARCle laptops */ +#include "opt_tadpmu.h" +#ifdef HAVE_TADPMU #include #include #include @@ -315,4 +317,4 @@ tadpmu_init(bus_space_tag_t t, bus_space return 0; } - +#endif /* HAVE_TADPMU */
CVS commit: src/sys/arch/sparc64/conf
Module Name:src Committed By: macallan Date: Sat Oct 13 21:02:34 UTC 2018 Modified Files: src/sys/arch/sparc64/conf: GENERIC Log Message: add tadpmu To generate a diff of this commit: cvs rdiff -u -r1.207 -r1.208 src/sys/arch/sparc64/conf/GENERIC 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/sparc64/conf/GENERIC diff -u src/sys/arch/sparc64/conf/GENERIC:1.207 src/sys/arch/sparc64/conf/GENERIC:1.208 --- src/sys/arch/sparc64/conf/GENERIC:1.207 Thu Sep 6 05:36:50 2018 +++ src/sys/arch/sparc64/conf/GENERIC Sat Oct 13 21:02:34 2018 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.207 2018/09/06 05:36:50 maxv Exp $ +# $NetBSD: GENERIC,v 1.208 2018/10/13 21:02:34 macallan Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/sparc64/conf/std.sparc64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.207 $" +#ident "GENERIC-$Revision: 1.208 $" maxusers 64 @@ -282,6 +282,7 @@ ms0 at com? # mouse ## Tadpole SPARCle PS/2 keyboard and mouse pckbc* at ebus? # PC keyboard controller +options HAVE_TADPMU # include support for Tadpole Viper PMU pckbd* at pckbc? # PC keyboard pms* at pckbc? # PS/2 mouse for wsmouse options PMS_SYNAPTICS_TOUCHPAD # Enable support for Synaptics Touchpads
CVS commit: src/sys/arch/newsmips
Module Name:src Committed By: tsutsui Date: Sun Oct 14 00:10:11 UTC 2018 Modified Files: src/sys/arch/newsmips/apbus: apbus.c apbusvar.h if_sn.c if_sn_ap.c if_snvar.h kb_ap.c spifi.c zs_ap.c src/sys/arch/newsmips/conf: GENERIC files.newsmips std.newsmips src/sys/arch/newsmips/include: adrsmap.h apbus.h cpu.h intr.h src/sys/arch/newsmips/newsmips: cpu_cons.c machdep.c machid.h news5000.c src/sys/arch/newsmips/stand/boot: boot.c version Added Files: src/sys/arch/newsmips/newsmips: news4000.c Log Message: Add NWS-4000 support. Based on nonaka@'s porting effort back in 2002. See announcement on port-newsmips@ for more details: http://mail-index.netbsd.org/port-newsmips/2018/10/13/msg000231.html To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/newsmips/apbus/apbus.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/newsmips/apbus/apbusvar.h cvs rdiff -u -r1.42 -r1.43 src/sys/arch/newsmips/apbus/if_sn.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/newsmips/apbus/if_sn_ap.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/newsmips/apbus/if_snvar.h cvs rdiff -u -r1.11 -r1.12 src/sys/arch/newsmips/apbus/kb_ap.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/newsmips/apbus/spifi.c cvs rdiff -u -r1.28 -r1.29 src/sys/arch/newsmips/apbus/zs_ap.c cvs rdiff -u -r1.135 -r1.136 src/sys/arch/newsmips/conf/GENERIC cvs rdiff -u -r1.30 -r1.31 src/sys/arch/newsmips/conf/files.newsmips cvs rdiff -u -r1.18 -r1.19 src/sys/arch/newsmips/conf/std.newsmips cvs rdiff -u -r1.8 -r1.9 src/sys/arch/newsmips/include/adrsmap.h cvs rdiff -u -r1.5 -r1.6 src/sys/arch/newsmips/include/apbus.h cvs rdiff -u -r1.16 -r1.17 src/sys/arch/newsmips/include/cpu.h cvs rdiff -u -r1.26 -r1.27 src/sys/arch/newsmips/include/intr.h cvs rdiff -u -r1.13 -r1.14 src/sys/arch/newsmips/newsmips/cpu_cons.c cvs rdiff -u -r1.119 -r1.120 src/sys/arch/newsmips/newsmips/machdep.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/newsmips/newsmips/machid.h cvs rdiff -u -r0 -r1.1 src/sys/arch/newsmips/newsmips/news4000.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/newsmips/newsmips/news5000.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/newsmips/stand/boot/boot.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/newsmips/stand/boot/version 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/newsmips/apbus/apbus.c diff -u src/sys/arch/newsmips/apbus/apbus.c:1.24 src/sys/arch/newsmips/apbus/apbus.c:1.25 --- src/sys/arch/newsmips/apbus/apbus.c:1.24 Sun Sep 30 14:09:35 2018 +++ src/sys/arch/newsmips/apbus/apbus.c Sun Oct 14 00:10:11 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: apbus.c,v 1.24 2018/09/30 14:09:35 tsutsui Exp $ */ +/* $NetBSD: apbus.c,v 1.25 2018/10/14 00:10:11 tsutsui Exp $ */ /*- * Copyright (C) 1999 SHIMIZU Ryo. All rights reserved. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: apbus.c,v 1.24 2018/09/30 14:09:35 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: apbus.c,v 1.25 2018/10/14 00:10:11 tsutsui Exp $"); #define __INTR_PRIVATE @@ -78,6 +78,8 @@ CFATTACH_DECL_NEW(ap, 0, #define NLEVEL 2 static struct newsmips_intr apintr_tab[NLEVEL]; +volatile uint32_t *news_wbflush; + static int apbusmatch(device_t parent, cfdata_t cf, void *aux) { @@ -102,10 +104,17 @@ apbusattach(device_t parent, device_t se apbus_map_romwork(); mips_set_wbflush(apbus_wbflush); - *(volatile uint32_t *)(NEWS5000_APBUS_INTST) = 0x; - *(volatile uint32_t *)(NEWS5000_APBUS_INTMSK) = 0x; - *(volatile uint32_t *)(NEWS5000_APBUS_CTRL) = 0x0004; - *(volatile uint32_t *)(NEWS5000_APBUS_DMA) = 0x; + if (systype == NEWS5000) { + *(volatile uint32_t *)(NEWS5000_APBUS_INTST) = 0x; + *(volatile uint32_t *)(NEWS5000_APBUS_INTMSK) = 0x; + *(volatile uint32_t *)(NEWS5000_APBUS_CTRL) = 0x0004; + *(volatile uint32_t *)(NEWS5000_APBUS_DMA) = 0x; + } + if (systype == NEWS4000) { + *(volatile uint32_t *)0xb6a4 = 0x1fff; + *(volatile uint32_t *)0xb670 = 0x; + *(volatile uint32_t *)0xb698 = 0x; + } aprint_normal("\n"); @@ -181,10 +190,9 @@ aptokseg0(void *va) void apbus_wbflush(void) { - volatile int32_t * const our_wbflush = (int32_t *)NEWS5000_WBFLUSH; (*mips_locore_jumpvec.ljv_wbflush)(); - (void)*our_wbflush; + (void)*news_wbflush; } /* @@ -249,13 +257,19 @@ apbus_intr_establish(int level, int mask LIST_INSERT_AFTER(curih, ih, ih_q); done: + if (systype == NEWS5000) { + inten0 = (uint32_t *)NEWS5000_INTEN0; + inten1 = (uint32_t *)NEWS5000_INTEN1; + } + if (systype == NEWS4000) { + inten0 = (uint32_t *)NEWS4000_INTEN0; + inten1 = (uint32_t *)NEWS4000_INTEN1; + } switch (level) { case 0: - inten0 = (volatile uint32_t *)NEWS5000_INTEN0; *inten0 |= mask; break; case 1: - inten1 = (volatile uint32_t *)NEWS5000_INTEN1; *inten1 |= mask; break; } Index: src/sys/arch/newsmips/apbus/apbusvar.
CVS commit: src/doc
Module Name:src Committed By: tsutsui Date: Sun Oct 14 00:11:59 UTC 2018 Modified Files: src/doc: CHANGES Log Message: Note newsmips NWS-4000 support. To generate a diff of this commit: cvs rdiff -u -r1.2446 -r1.2447 src/doc/CHANGES 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 diff -u src/doc/CHANGES:1.2446 src/doc/CHANGES:1.2447 --- src/doc/CHANGES:1.2446 Fri Oct 12 04:09:09 2018 +++ src/doc/CHANGES Sun Oct 14 00:11:59 2018 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2446 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2447 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -231,3 +231,5 @@ Changes from NetBSD 8.0 to NetBSD 9.0: npf: Converted to use libnv [rmind 20180929] ntp: Import ntp 4.2.8p12. [christos 20180929] aarch64: add support for compat_netbsd32(8). [ryo 20181012] + newsmips: Add support for NWS-4000. Based on nonaka@'s porting effort + back in 2002. [tsutsui 20181014]
CVS commit: src/sys/arch/sparc64/dev
Module Name:src Committed By: macallan Date: Sun Oct 14 05:08:40 UTC 2018 Modified Files: src/sys/arch/sparc64/dev: tadpmu.c Log Message: - protect PMU transactions with a mutex - report lid switch events to powerd To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sparc64/dev/tadpmu.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/sparc64/dev/tadpmu.c diff -u src/sys/arch/sparc64/dev/tadpmu.c:1.3 src/sys/arch/sparc64/dev/tadpmu.c:1.4 --- src/sys/arch/sparc64/dev/tadpmu.c:1.3 Sat Oct 13 20:11:48 2018 +++ src/sys/arch/sparc64/dev/tadpmu.c Sun Oct 14 05:08:39 2018 @@ -1,4 +1,4 @@ -/*/* $NetBSD: tadpmu.c,v 1.3 2018/10/13 20:11:48 macallan Exp $ */ +/*/* $NetBSD: tadpmu.c,v 1.4 2018/10/14 05:08:39 macallan Exp $ */ /*- * Copyright (c) 2018 Michael Lorenz @@ -38,6 +38,8 @@ #include #include #include +#include +#include #include #include @@ -58,8 +60,11 @@ static struct sysmon_envsys *tadpmu_sme; static envsys_data_t tadpmu_sensors[5]; static uint8_t idata = 0xff; static uint8_t ivalid = 0; -static wchan_t tadpmu; -static struct sysmon_pswitch tadpmu_pbutton; +static wchan_t tadpmu, tadpmuev; +static struct sysmon_pswitch tadpmu_pbutton, tadpmu_lidswitch; +static kmutex_t tadpmu_lock; +static lwp_t *tadpmu_thread; +static int tadpmu_dying = 0; static inline void tadpmu_cmd(uint8_t d) @@ -202,9 +207,11 @@ tadpmu_sensors_refresh(struct sysmon_env { int res; if (edata->private > 0) { + mutex_enter(&tadpmu_lock); tadpmu_flush(); tadpmu_send_cmd(edata->private); res = tadpmu_recv(); + mutex_exit(&tadpmu_lock); if (edata->units == ENVSYS_STEMP) { edata->value_cur = res * 100 + 27315; } else { @@ -216,6 +223,30 @@ tadpmu_sensors_refresh(struct sysmon_env } } +static void +tadpmu_events(void *cookie) +{ + uint8_t res, ores = 0; + while (!tadpmu_dying) { + mutex_enter(&tadpmu_lock); + tadpmu_flush(); + tadpmu_send_cmd(CMD_READ_GENSTAT); + res = tadpmu_recv(); + mutex_exit(&tadpmu_lock); + res &= GENSTAT_LID_CLOSED; + if (res != ores) { + ores = res; + sysmon_pswitch_event(&tadpmu_lidswitch, +(res & GENSTAT_LID_CLOSED) ? +PSWITCH_EVENT_PRESSED : +PSWITCH_EVENT_RELEASED); + } + tsleep(tadpmuev, 0, "tadpmuev", hz); + } + kthread_exit(0); +} + + int tadpmu_intr(void *cookie) { @@ -231,6 +262,7 @@ tadpmu_intr(void *cookie) break; case TADPMU_LID: /* read genstat and report lid */ +wakeup(tadpmuev); break; } } @@ -276,6 +308,8 @@ tadpmu_init(bus_space_tag_t t, bus_space ver = tadpmu_recv(); printf("status %02x\n", ver); + mutex_init(&tadpmu_lock, MUTEX_DEFAULT, IPL_NONE); + tadpmu_sme = sysmon_envsys_create(); tadpmu_sme->sme_name = "tadpmu"; tadpmu_sme->sme_cookie = NULL; @@ -309,12 +343,21 @@ tadpmu_init(bus_space_tag_t t, bus_space sysmon_task_queue_init(); memset(&tadpmu_pbutton, 0, sizeof(struct sysmon_pswitch)); - tadpmu_pbutton.smpsw_name = "tadpmu"; + tadpmu_pbutton.smpsw_name = "power"; tadpmu_pbutton.smpsw_type = PSWITCH_TYPE_POWER; if (sysmon_pswitch_register(&tadpmu_pbutton) != 0) aprint_error( "unable to register power button with sysmon\n"); + tadpmu_lidswitch.smpsw_name = "lid"; + tadpmu_lidswitch.smpsw_type = PSWITCH_TYPE_LID; + if (sysmon_pswitch_register(&tadpmu_lidswitch) != 0) + aprint_error( + "unable to register lid switch with sysmon\n"); + + kthread_create(PRI_NONE, 0, curcpu(), tadpmu_events, NULL, + &tadpmu_thread, "tadpmu_events"); + return 0; } #endif /* HAVE_TADPMU */