CVS commit: src/usr.sbin/tprof/arch
Module Name:src Committed By: knakahara Date: Fri Apr 17 03:15:51 UTC 2020 Modified Files: src/usr.sbin/tprof/arch: tprof_x86.c Log Message: Fix typo in a comment. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/tprof/arch/tprof_x86.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/tprof/arch/tprof_x86.c diff -u src/usr.sbin/tprof/arch/tprof_x86.c:1.9 src/usr.sbin/tprof/arch/tprof_x86.c:1.10 --- src/usr.sbin/tprof/arch/tprof_x86.c:1.9 Fri Oct 11 18:05:52 2019 +++ src/usr.sbin/tprof/arch/tprof_x86.c Fri Apr 17 03:15:50 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: tprof_x86.c,v 1.9 2019/10/11 18:05:52 jmcneill Exp $ */ +/* $NetBSD: tprof_x86.c,v 1.10 2020/04/17 03:15:50 knakahara Exp $ */ /* * Copyright (c) 2018-2019 The NetBSD Foundation, Inc. @@ -550,7 +550,7 @@ init_intel_generic(void) table->next = init_intel_silvermont_airmont(); break; case 0x5C: /* Goldmont (Apollo Lake) */ - case 0x5F: /* Goldmont (Denvertion) */ + case 0x5F: /* Goldmont (Denverton) */ table->next = init_intel_goldmont(); break; case 0x7A: /* Goldmont Plus (Gemini Lake) */
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Fri Apr 17 02:21:25 UTC 2020 Modified Files: src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.c ixgbe_netbsd.c ixgbe_phy.c ixv.c Log Message: No functional change: - modify comment - whitespace fix To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/dev/pci/ixgbe/ix_txrx.c cvs rdiff -u -r1.227 -r1.228 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/ixgbe/ixgbe_netbsd.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/pci/ixgbe/ixgbe_phy.c cvs rdiff -u -r1.147 -r1.148 src/sys/dev/pci/ixgbe/ixv.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/ixgbe/ix_txrx.c diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.62 src/sys/dev/pci/ixgbe/ix_txrx.c:1.63 --- src/sys/dev/pci/ixgbe/ix_txrx.c:1.62 Wed Feb 5 07:45:46 2020 +++ src/sys/dev/pci/ixgbe/ix_txrx.c Fri Apr 17 02:21:25 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ix_txrx.c,v 1.62 2020/02/05 07:45:46 msaitoh Exp $ */ +/* $NetBSD: ix_txrx.c,v 1.63 2020/04/17 02:21:25 msaitoh Exp $ */ /** @@ -919,7 +919,7 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, vlan_macip_lens |= ip_hlen; /* No support for offloads for non-L4 next headers */ - switch (ipproto) { + switch (ipproto) { case IPPROTO_TCP: if (mp->m_pkthdr.csum_flags & (M_CSUM_TCPv4 | M_CSUM_TCPv6)) @@ -2220,7 +2220,7 @@ ixgbe_allocate_queues(struct adapter *ad /* First, allocate the top level queue structs */ adapter->queues = (struct ix_queue *)malloc(sizeof(struct ix_queue) * -adapter->num_queues, M_DEVBUF, M_WAITOK | M_ZERO); + adapter->num_queues, M_DEVBUF, M_WAITOK | M_ZERO); /* Second, allocate the TX ring struct memory */ adapter->tx_rings = malloc(sizeof(struct tx_ring) * @@ -2272,7 +2272,7 @@ ixgbe_allocate_queues(struct adapter *ad "Critical Failure setting up transmit buffers\n"); error = ENOMEM; goto err_tx_desc; - } + } if (!(adapter->feat_en & IXGBE_FEATURE_LEGACY_TX)) { /* Allocate a buf ring */ txr->txr_interq = pcq_create(IXGBE_BR_SIZE, KM_SLEEP); Index: src/sys/dev/pci/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.227 src/sys/dev/pci/ixgbe/ixgbe.c:1.228 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.227 Sun Mar 15 23:04:50 2020 +++ src/sys/dev/pci/ixgbe/ixgbe.c Fri Apr 17 02:21:25 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.227 2020/03/15 23:04:50 thorpej Exp $ */ +/* $NetBSD: ixgbe.c,v 1.228 2020/04/17 02:21:25 msaitoh Exp $ */ /** @@ -3227,7 +3227,7 @@ ixgbe_sysctl_interrupt_rate_handler(SYSC if (rate > 0 && rate < 50) { if (rate < 1000) rate = 1000; - reg |= ((400/rate) & 0xff8); + reg |= ((400 / rate) & 0xff8); /* * When RSC is used, ITR interval must be larger than * RSC_DELAY. Currently, we use 2us for RSC_DELAY. Index: src/sys/dev/pci/ixgbe/ixgbe_netbsd.c diff -u src/sys/dev/pci/ixgbe/ixgbe_netbsd.c:1.13 src/sys/dev/pci/ixgbe/ixgbe_netbsd.c:1.14 --- src/sys/dev/pci/ixgbe/ixgbe_netbsd.c:1.13 Sat Feb 1 02:33:08 2020 +++ src/sys/dev/pci/ixgbe/ixgbe_netbsd.c Fri Apr 17 02:21:25 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe_netbsd.c,v 1.13 2020/02/01 02:33:08 riastradh Exp $ */ +/* $NetBSD: ixgbe_netbsd.c,v 1.14 2020/04/17 02:21:25 msaitoh Exp $ */ /* * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -79,7 +79,7 @@ ixgbe_dmamap_destroy(ixgbe_dma_tag_t *dt void ixgbe_dmamap_sync(ixgbe_dma_tag_t *dt, bus_dmamap_t dmam, int ops) { -bus_dmamap_sync(dt->dt_dmat, dmam, 0, dt->dt_maxsize, ops); + bus_dmamap_sync(dt->dt_dmat, dmam, 0, dt->dt_maxsize, ops); } void Index: src/sys/dev/pci/ixgbe/ixgbe_phy.c diff -u src/sys/dev/pci/ixgbe/ixgbe_phy.c:1.20 src/sys/dev/pci/ixgbe/ixgbe_phy.c:1.21 --- src/sys/dev/pci/ixgbe/ixgbe_phy.c:1.20 Mon Dec 23 09:36:18 2019 +++ src/sys/dev/pci/ixgbe/ixgbe_phy.c Fri Apr 17 02:21:25 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe_phy.c,v 1.20 2019/12/23 09:36:18 msaitoh Exp $ */ +/* $NetBSD: ixgbe_phy.c,v 1.21 2020/04/17 02:21:25 msaitoh Exp $ */ /** SPDX-License-Identifier: BSD-3-Clause @@ -1786,7 +1786,7 @@ s32 ixgbe_identify_qsfp_module_generic(s /* Determine PHY vendor for optical modules */ if (comp_codes_10g & (IXGBE_SFF_10GBASESR_CAPABLE | - IXGBE_SFF_10GBASELR_CAPABLE)) { + IXGBE_SFF_10GBASELR_CAPABLE)) { status = hw->phy.ops.read_i2c_eeprom(hw, IXGBE_SFF_QSFP_VENDOR_OUI_BYTE0, _bytes[0]); Index: src/sys/dev/pci/ixgbe/ixv.c diff -u src/sys/dev/pci/ixgbe/ixv.c:1.147 src/sys/dev/pci/ixgbe/ixv.c:1.148 --- src/sys/dev/pci/ixgbe/ixv.c:1.147 Sun Mar 15 23:04:50 2020 +++ src/sys/dev/pci/ixgbe/ixv.c Fri Apr 17 02:21:25 2020 @@ -1,4 +1,4 @@
CVS commit: src/sys
Module Name:src Committed By: rin Date: Thu Apr 16 23:29:54 UTC 2020 Modified Files: src/sys/arch/arm/omap: omap3_sdmareg.h omap3_sdmavar.h omapfbreg.h src/sys/arch/arm/ti: omap3_dssreg.h src/sys/arch/macppc/dev: batteryvar.h cudavar.h deqvar.h obiovar.h platinumfbreg.h pmuvar.h valkyriefbreg.h videopllvar.h src/sys/arch/mips/adm5120/dev: if_admswvar.h src/sys/arch/powerpc/include: intr.h src/sys/arch/powerpc/pic: ipivar.h picvar.h src/sys/dev/acpi/wmi: wmi_acpivar.h src/sys/dev/adb: adbvar.h src/sys/dev/i2c: adm1026reg.h dbcool_reg.h dbcool_var.h sgsmixvar.h src/sys/dev/ic: i128reg.h i128var.h src/sys/dev/pci: gffbreg.h ppbvar.h voyagervar.h src/sys/dev/qbus: rlvar.h src/sys/external/bsd/ena-com: ena_plat.h src/sys/lib/libkern: crc16.h src/sys/ufs/ext2fs: ext2fs_xattr.h Log Message: Revert previous for now: http://mail-index.netbsd.org/source-changes/2020/04/16/msg116278.html The reasoning turned out to be wrong; __KERNEL_RCSID() in header files does *not* overwrite RCSID in main source files. The real problem is that it inserts its RCSID into *every* object files. However, it can be still useful even if heavily duplicated. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/omap/omap3_sdmareg.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/omap/omap3_sdmavar.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/omap/omapfbreg.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/ti/omap3_dssreg.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/macppc/dev/batteryvar.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/macppc/dev/cudavar.h \ src/sys/arch/macppc/dev/deqvar.h src/sys/arch/macppc/dev/obiovar.h \ src/sys/arch/macppc/dev/valkyriefbreg.h \ src/sys/arch/macppc/dev/videopllvar.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/macppc/dev/platinumfbreg.h cvs rdiff -u -r1.10 -r1.11 src/sys/arch/macppc/dev/pmuvar.h cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/adm5120/dev/if_admswvar.h cvs rdiff -u -r1.16 -r1.17 src/sys/arch/powerpc/include/intr.h cvs rdiff -u -r1.11 -r1.12 src/sys/arch/powerpc/pic/ipivar.h \ src/sys/arch/powerpc/pic/picvar.h cvs rdiff -u -r1.6 -r1.7 src/sys/dev/acpi/wmi/wmi_acpivar.h cvs rdiff -u -r1.3 -r1.4 src/sys/dev/adb/adbvar.h cvs rdiff -u -r1.4 -r1.5 src/sys/dev/i2c/adm1026reg.h cvs rdiff -u -r1.8 -r1.9 src/sys/dev/i2c/dbcool_reg.h cvs rdiff -u -r1.15 -r1.16 src/sys/dev/i2c/dbcool_var.h cvs rdiff -u -r1.3 -r1.4 src/sys/dev/i2c/sgsmixvar.h cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/i128reg.h src/sys/dev/ic/i128var.h cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/gffbreg.h cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/ppbvar.h cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/voyagervar.h cvs rdiff -u -r1.10 -r1.11 src/sys/dev/qbus/rlvar.h cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/ena-com/ena_plat.h cvs rdiff -u -r1.2 -r1.3 src/sys/lib/libkern/crc16.h cvs rdiff -u -r1.3 -r1.4 src/sys/ufs/ext2fs/ext2fs_xattr.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/arm/omap/omap3_sdmareg.h diff -u src/sys/arch/arm/omap/omap3_sdmareg.h:1.5 src/sys/arch/arm/omap/omap3_sdmareg.h:1.6 --- src/sys/arch/arm/omap/omap3_sdmareg.h:1.5 Thu Apr 16 21:56:41 2020 +++ src/sys/arch/arm/omap/omap3_sdmareg.h Thu Apr 16 23:29:52 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: omap3_sdmareg.h,v 1.5 2020/04/16 21:56:41 rin Exp $ */ +/* $NetBSD: omap3_sdmareg.h,v 1.6 2020/04/16 23:29:52 rin Exp $ */ /* * Copyright (c) 2012 Michael Lorenz @@ -26,6 +26,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include +__KERNEL_RCSID(0, "$NetBSD: omap3_sdmareg.h,v 1.6 2020/04/16 23:29:52 rin Exp $"); + #ifndef OMAPDMA_REG_H #define OMAPDMA_REG_H Index: src/sys/arch/arm/omap/omap3_sdmavar.h diff -u src/sys/arch/arm/omap/omap3_sdmavar.h:1.2 src/sys/arch/arm/omap/omap3_sdmavar.h:1.3 --- src/sys/arch/arm/omap/omap3_sdmavar.h:1.2 Thu Apr 16 21:56:41 2020 +++ src/sys/arch/arm/omap/omap3_sdmavar.h Thu Apr 16 23:29:52 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: omap3_sdmavar.h,v 1.2 2020/04/16 21:56:41 rin Exp $ */ +/* $NetBSD: omap3_sdmavar.h,v 1.3 2020/04/16 23:29:52 rin Exp $ */ /* * Copyright (c) 2012 Michael Lorenz @@ -26,6 +26,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include +__KERNEL_RCSID(0, "$NetBSD: omap3_sdmavar.h,v 1.3 2020/04/16 23:29:52 rin Exp $"); + #ifndef OMAPDMA_VAR_H #define OMAPDMA_VAR_H @@ -35,4 +38,4 @@ void omapdma_write_ch_reg(int, int, uint uint32_t omapdma_read_ch_reg(int, int); -#endif /* OMAPDMA_VAR_H */ +#endif /* OMAPDMA_VAR_H */ \ No newline at end of file Index: src/sys/arch/arm/omap/omapfbreg.h diff -u src/sys/arch/arm/omap/omapfbreg.h:1.4 src/sys/arch/arm/omap/omapfbreg.h:1.5 --- src/sys/arch/arm/omap/omapfbreg.h:1.4 Thu Apr 16 21:56:41 2020 +++ src/sys/arch/arm/omap/omapfbreg.h Thu Apr 16 23:29:52 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: omapfbreg.h,v 1.4 2020/04/16 21:56:41 rin
CVS commit: src/sys/sys
Module Name:src Committed By: christos Date: Thu Apr 16 22:13:51 UTC 2020 Modified Files: src/sys/sys: ieee754.h Log Message: fix tense (Nelson Beebe) To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/sys/ieee754.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/ieee754.h diff -u src/sys/sys/ieee754.h:1.16 src/sys/sys/ieee754.h:1.17 --- src/sys/sys/ieee754.h:1.16 Fri Jun 3 11:15:22 2016 +++ src/sys/sys/ieee754.h Thu Apr 16 18:13:51 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ieee754.h,v 1.16 2016/06/03 15:15:22 dholland Exp $ */ +/* $NetBSD: ieee754.h,v 1.17 2020/04/16 22:13:51 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -52,7 +52,7 @@ /* * defines the layout of IEEE 754 floating point types. * Only single-precision and double-precision types are defined here; - * 128-bit long doubles are define here IFF __HAVE_LONG_DOUBLE equals 128. + * 128-bit long doubles are defined here IFF __HAVE_LONG_DOUBLE equals 128. * Otherwise extended types, if available, are defined in the machine-dependent * header. */
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: rin Date: Thu Apr 16 22:11:12 UTC 2020 Modified Files: src/sys/arch/powerpc/include: types.h Log Message: Discard __HAVE_UNLOCKED_PMAP for 4xx; 4xx is uniprocessor architecture, and everything gets more than 10 times slower by __HAVE_UNLOCKED_PMAP. Note that we support three supervisor-level architectures for powerpc: oea, booke, and 4xx. We have three different implementations of pmap as a result. Whereas oea and booke support multiprocessor, 4xx does not. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/arch/powerpc/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/powerpc/include/types.h diff -u src/sys/arch/powerpc/include/types.h:1.61 src/sys/arch/powerpc/include/types.h:1.62 --- src/sys/arch/powerpc/include/types.h:1.61 Sun Mar 22 17:33:58 2020 +++ src/sys/arch/powerpc/include/types.h Thu Apr 16 22:11:12 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.61 2020/03/22 17:33:58 ad Exp $ */ +/* $NetBSD: types.h,v 1.62 2020/04/16 22:11:12 rin Exp $ */ /*- * Copyright (C) 1995 Wolfgang Solfrank. @@ -34,6 +34,10 @@ #ifndef _POWERPC_TYPES_H_ #define _POWERPC_TYPES_H_ +#ifdef _KERNEL_OPT +#include "opt_ppcarch.h" +#endif + #include #include #include @@ -103,7 +107,9 @@ typedef __uint32_t tlb_asid_t; /* for b #define __HAVE_RAS #endif +#ifndef PPC_IBM4XX /* XXX temporary */ #define __HAVE_UNLOCKED_PMAP +#endif #endif /* _POWERPC_TYPES_H_ */
CVS commit: src/sys
Module Name:src Committed By: rin Date: Thu Apr 16 21:56:43 UTC 2020 Modified Files: src/sys/arch/arm/omap: omap3_sdmareg.h omap3_sdmavar.h omapfbreg.h src/sys/arch/arm/ti: omap3_dssreg.h src/sys/arch/macppc/dev: batteryvar.h cudavar.h deqvar.h obiovar.h platinumfbreg.h pmuvar.h valkyriefbreg.h videopllvar.h src/sys/arch/mips/adm5120/dev: if_admswvar.h src/sys/arch/powerpc/include: intr.h src/sys/arch/powerpc/pic: ipivar.h picvar.h src/sys/dev/acpi/wmi: wmi_acpivar.h src/sys/dev/adb: adbvar.h src/sys/dev/i2c: adm1026reg.h dbcool_reg.h dbcool_var.h sgsmixvar.h src/sys/dev/ic: i128reg.h i128var.h src/sys/dev/pci: gffbreg.h ppbvar.h voyagervar.h src/sys/dev/qbus: rlvar.h src/sys/external/bsd/ena-com: ena_plat.h src/sys/lib/libkern: crc16.h src/sys/ufs/ext2fs: ext2fs_xattr.h Log Message: Stop using __KERNEL_RCSID() in header files; it confuses ident(1) by overwriting RCSID in main source files. XXX The first argument of __KERNEL_RCSID() is neglected for ELF. If we wish to have RCSID of header files in kernel binary, we need something like __FBSDID() macro in FreeBSD. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/omap/omap3_sdmareg.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/omap/omap3_sdmavar.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/omap/omapfbreg.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/ti/omap3_dssreg.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/macppc/dev/batteryvar.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/macppc/dev/cudavar.h \ src/sys/arch/macppc/dev/deqvar.h src/sys/arch/macppc/dev/obiovar.h \ src/sys/arch/macppc/dev/valkyriefbreg.h \ src/sys/arch/macppc/dev/videopllvar.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/macppc/dev/platinumfbreg.h cvs rdiff -u -r1.9 -r1.10 src/sys/arch/macppc/dev/pmuvar.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/adm5120/dev/if_admswvar.h cvs rdiff -u -r1.15 -r1.16 src/sys/arch/powerpc/include/intr.h cvs rdiff -u -r1.10 -r1.11 src/sys/arch/powerpc/pic/ipivar.h \ src/sys/arch/powerpc/pic/picvar.h cvs rdiff -u -r1.5 -r1.6 src/sys/dev/acpi/wmi/wmi_acpivar.h cvs rdiff -u -r1.2 -r1.3 src/sys/dev/adb/adbvar.h cvs rdiff -u -r1.3 -r1.4 src/sys/dev/i2c/adm1026reg.h cvs rdiff -u -r1.7 -r1.8 src/sys/dev/i2c/dbcool_reg.h cvs rdiff -u -r1.14 -r1.15 src/sys/dev/i2c/dbcool_var.h cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/sgsmixvar.h cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ic/i128reg.h src/sys/dev/ic/i128var.h cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/gffbreg.h cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/ppbvar.h cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/voyagervar.h cvs rdiff -u -r1.9 -r1.10 src/sys/dev/qbus/rlvar.h cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/ena-com/ena_plat.h cvs rdiff -u -r1.1 -r1.2 src/sys/lib/libkern/crc16.h cvs rdiff -u -r1.2 -r1.3 src/sys/ufs/ext2fs/ext2fs_xattr.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/arm/omap/omap3_sdmareg.h diff -u src/sys/arch/arm/omap/omap3_sdmareg.h:1.4 src/sys/arch/arm/omap/omap3_sdmareg.h:1.5 --- src/sys/arch/arm/omap/omap3_sdmareg.h:1.4 Wed Jul 30 12:45:44 2014 +++ src/sys/arch/arm/omap/omap3_sdmareg.h Thu Apr 16 21:56:41 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: omap3_sdmareg.h,v 1.4 2014/07/30 12:45:44 macallan Exp $ */ +/* $NetBSD: omap3_sdmareg.h,v 1.5 2020/04/16 21:56:41 rin Exp $ */ /* * Copyright (c) 2012 Michael Lorenz @@ -26,9 +26,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include -__KERNEL_RCSID(0, "$NetBSD: omap3_sdmareg.h,v 1.4 2014/07/30 12:45:44 macallan Exp $"); - #ifndef OMAPDMA_REG_H #define OMAPDMA_REG_H Index: src/sys/arch/arm/omap/omap3_sdmavar.h diff -u src/sys/arch/arm/omap/omap3_sdmavar.h:1.1 src/sys/arch/arm/omap/omap3_sdmavar.h:1.2 --- src/sys/arch/arm/omap/omap3_sdmavar.h:1.1 Wed Jan 9 03:35:11 2013 +++ src/sys/arch/arm/omap/omap3_sdmavar.h Thu Apr 16 21:56:41 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: omap3_sdmavar.h,v 1.1 2013/01/09 03:35:11 macallan Exp $ */ +/* $NetBSD: omap3_sdmavar.h,v 1.2 2020/04/16 21:56:41 rin Exp $ */ /* * Copyright (c) 2012 Michael Lorenz @@ -26,9 +26,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include -__KERNEL_RCSID(0, "$NetBSD: omap3_sdmavar.h,v 1.1 2013/01/09 03:35:11 macallan Exp $"); - #ifndef OMAPDMA_VAR_H #define OMAPDMA_VAR_H @@ -38,4 +35,4 @@ void omapdma_write_ch_reg(int, int, uint uint32_t omapdma_read_ch_reg(int, int); -#endif /* OMAPDMA_VAR_H */ \ No newline at end of file +#endif /* OMAPDMA_VAR_H */ Index: src/sys/arch/arm/omap/omapfbreg.h diff -u src/sys/arch/arm/omap/omapfbreg.h:1.3 src/sys/arch/arm/omap/omapfbreg.h:1.4 --- src/sys/arch/arm/omap/omapfbreg.h:1.3 Tue Feb 12 21:17:17 2013 +++ src/sys/arch/arm/omap/omapfbreg.h Thu Apr 16 21:56:41 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: omapfbreg.h,v 1.3 2013/02/12 21:17:17 macallan Exp $ */ +/* $NetBSD: omapfbreg.h,v 1.4
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: ad Date: Thu Apr 16 21:20:43 UTC 2020 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: With the right timing, V->P operations could change stuff behind the back of callers working in the opposite direction - fix it. Tested by skrll@. To generate a diff of this commit: cvs rdiff -u -r1.404 -r1.405 src/sys/arch/arm/arm32/pmap.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/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.404 src/sys/arch/arm/arm32/pmap.c:1.405 --- src/sys/arch/arm/arm32/pmap.c:1.404 Tue Apr 14 07:31:52 2020 +++ src/sys/arch/arm/arm32/pmap.c Thu Apr 16 21:20:43 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.404 2020/04/14 07:31:52 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.405 2020/04/16 21:20:43 ad Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -64,7 +64,7 @@ */ /*- - * Copyright (c) 1999 The NetBSD Foundation, Inc. + * Copyright (c) 1999, 2020 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -198,7 +198,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.404 2020/04/14 07:31:52 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.405 2020/04/16 21:20:43 ad Exp $"); #include #include @@ -2405,7 +2405,7 @@ pmap_clearbit(struct vm_page_md *md, pad /* * Loop over all current mappings setting/clearing as appropos */ - SLIST_FOREACH(pv, >pvh_list, pv_link) { + for (pv = SLIST_FIRST(>pvh_list); pv != NULL;) { pmap_t pm = pv->pv_pmap; const vaddr_t va = pv->pv_va; const u_int oflags = pv->pv_flags; @@ -2414,19 +2414,43 @@ pmap_clearbit(struct vm_page_md *md, pad * Kernel entries are unmanaged and as such not to be changed. */ if (PV_IS_KENTRY_P(oflags)) + pv = SLIST_NEXT(pv, pv_link); continue; + } #endif - pv->pv_flags &= ~maskbits; - pmap_release_page_lock(md); - pmap_acquire_pmap_lock(pm); + /* + * Anything to do? + */ + if ((oflags & maskbits) == 0) { + pv = SLIST_NEXT(pv, pv_link); + continue; + } - struct l2_bucket * const l2b = pmap_get_l2_bucket(pm, va); - if (l2b == NULL) { + /* + * Try to get a hold on the pmap's lock. We must do this + * while still holding the page locked, to know that the + * page is still associated with the pmap and the mapping is + * in place. If a hold can't be had, unlock and wait for + * the pmap's lock to become available and retry. The pmap + * must be ref'd over this dance to stop it disappearing + * behind us. + */ + if (!mutex_tryenter(>pm_lock)) { + pmap_reference(pm); + pmap_release_page_lock(md); + pmap_acquire_pmap_lock(pm); + /* nothing, just wait for it */ pmap_release_pmap_lock(pm); + pmap_destroy(pm); + /* Restart from the beginning. */ pmap_acquire_page_lock(md); + pv = SLIST_FIRST(>pvh_list); continue; } + pv->pv_flags &= ~maskbits; + + struct l2_bucket * const l2b = pmap_get_l2_bucket(pm, va); KASSERTMSG(l2b != NULL, "%#lx", va); pt_entry_t * const ptep = >l2b_kva[l2pte_index(va)]; @@ -2476,11 +2500,7 @@ pmap_clearbit(struct vm_page_md *md, pad /* make the pte read only */ npte = l2pte_set_readonly(npte); - pmap_acquire_page_lock(md); -#ifdef MULTIPROCESSOR - pv = pmap_find_pv(md, pm, va); -#endif - if (pv != NULL && (maskbits & oflags & PVF_WRITE)) { + if ((maskbits & oflags & PVF_WRITE)) { /* * Keep alias accounting up to date */ @@ -2506,7 +2526,6 @@ pmap_clearbit(struct vm_page_md *md, pad #endif #endif /* PMAP_CACHE_VIPT */ } - pmap_release_page_lock(md); } if (maskbits & PVF_REF) { @@ -2548,11 +2567,13 @@ pmap_clearbit(struct vm_page_md *md, pad } pmap_release_pmap_lock(pm); - pmap_acquire_page_lock(md); NPDEBUG(PDB_BITS, printf("pmap_clearbit: pm %p va 0x%lx opte 0x%08x npte 0x%08x\n", pm, va, opte, npte)); + + /* Move to next entry. */ + pv = SLIST_NEXT(pv, pv_link); } #if defined(PMAP_CACHE_VIPT) @@ -2560,9 +2581,7 @@ pmap_clearbit(struct vm_page_md *md, pad * If we need to sync the I-cache and we haven't done it yet, do it. */ if (need_syncicache) { - pmap_release_page_lock(md); pmap_syncicache_page(md, pa); - pmap_acquire_page_lock(md); PMAPCOUNT(exec_synced_clearbit); } #ifndef ARM_MMU_EXTENDED @@ -2900,25 +2919,47 @@ pmap_page_remove(struct vm_page_md *md, pmap_clean_page(md, false); #endif - while ((pv = *pvp) != NULL) { + for (pv = *pvp; pv != NULL;) { pmap_t pm = pv->pv_pmap; #ifndef ARM_MMU_EXTENDED if (flush == false && pmap_is_current(pm)) flush = true; #endif +#ifdef PMAP_CACHE_VIPT + if (pm == pmap_kernel() && PV_IS_KENTRY_P(pv->pv_flags)) { + /* If this was unmanaged mapping, it must be ignored. */ + pvp = _NEXT(pv, pv_link); + pv = *pvp; + continue; + } +#endif + + /* + * Try to
CVS commit: [bouyer-xenpvh] src/sys/arch/xen/xen
Module Name:src Committed By: bouyer Date: Thu Apr 16 20:21:45 UTC 2020 Modified Files: src/sys/arch/xen/xen [bouyer-xenpvh]: xen_clock.c Log Message: MOve the #ifdef XENPV block to the end, so that XEN3_DOM0 builds again. To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/xen/xen/xen_clock.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/xen/xen_clock.c diff -u src/sys/arch/xen/xen/xen_clock.c:1.1.2.1 src/sys/arch/xen/xen/xen_clock.c:1.1.2.2 --- src/sys/arch/xen/xen/xen_clock.c:1.1.2.1 Thu Apr 16 19:23:50 2020 +++ src/sys/arch/xen/xen/xen_clock.c Thu Apr 16 20:21:44 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: xen_clock.c,v 1.1.2.1 2020/04/16 19:23:50 bouyer Exp $ */ +/* $NetBSD: xen_clock.c,v 1.1.2.2 2020/04/16 20:21:44 bouyer Exp $ */ /*- * Copyright (c) 2017, 2018 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: xen_clock.c,v 1.1.2.1 2020/04/16 19:23:50 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xen_clock.c,v 1.1.2.2 2020/04/16 20:21:44 bouyer Exp $"); #include #include @@ -114,128 +114,6 @@ static void xen_timepush_intr(void *); static int sysctl_xen_timepush(SYSCTLFN_ARGS); #endif -#ifdef XENPV -static int xen_rtc_get(struct todr_chip_handle *, struct timeval *); -static int xen_rtc_set(struct todr_chip_handle *, struct timeval *); -static void xen_wallclock_time(struct timespec *); -/* - * xen time of day register: - * - * Xen wall clock time, plus a Xen vCPU system time adjustment. - */ -static struct todr_chip_handle xen_todr_chip = { - .todr_gettime = xen_rtc_get, - .todr_settime = xen_rtc_set, -}; - -/* - * startrtclock() - * - * Initialize the real-time clock from x86 machdep autoconf. - */ -void -startrtclock(void) -{ - - todr_attach(_todr_chip); -} - -/* - * setstatclockrate(rate) - * - * Set the statclock to run at rate, in units of ticks per second. - * - * Currently Xen does not have a separate statclock, so this is a - * noop; instad the statclock runs in hardclock. - */ -void -setstatclockrate(int rate) -{ -} - -/* - * xen_rtc_get(todr, tv) - * - * Get the current real-time clock from the Xen wall clock time - * and vCPU system time adjustment. - */ -static int -xen_rtc_get(struct todr_chip_handle *todr, struct timeval *tvp) -{ - struct timespec ts; - - xen_wallclock_time(); - TIMESPEC_TO_TIMEVAL(tvp, ); - - return 0; -} - -/* - * xen_rtc_set(todr, tv) - * - * Set the Xen wall clock time, if we can. - */ -static int -xen_rtc_set(struct todr_chip_handle *todr, struct timeval *tvp) -{ -#ifdef DOM0OPS - struct clock_ymdhms dt; - xen_platform_op_t op; - uint64_t systime_ns; - - if (xendomain_is_privileged()) { - /* Convert to ymdhms and set the x86 ISA RTC. */ - clock_secs_to_ymdhms(tvp->tv_sec, ); - rtc_set_ymdhms(NULL, ); - - /* Get the global system time so we can preserve it. */ - systime_ns = xen_global_systime_ns(); - - /* Set the hypervisor wall clock time. */ - op.cmd = XENPF_settime; - op.u.settime.secs = tvp->tv_sec; - op.u.settime.nsecs = tvp->tv_usec * 1000; - op.u.settime.system_time = systime_ns; - return HYPERVISOR_platform_op(); - } -#endif - - /* XXX Should this fail if not on privileged dom0? */ - return 0; -} - -/* - * xen_wallclock_time(tsp) - * - * Return a snapshot of the current low-resolution wall clock - * time, as reported by the hypervisor, in tsp. - */ -static void -xen_wallclock_time(struct timespec *tsp) -{ - struct xen_wallclock_ticket ticket; - uint64_t systime_ns; - - int s = splsched(); /* make sure we won't be interrupted */ - /* Read the last wall clock sample from the hypervisor. */ - do { - xen_wallclock_enter(); - tsp->tv_sec = HYPERVISOR_shared_info->wc_sec; - tsp->tv_nsec = HYPERVISOR_shared_info->wc_nsec; - } while (!xen_wallclock_exit()); - - /* Get the global system time. */ - systime_ns = xen_global_systime_ns(); - splx(s); - - /* Add the system time to the wall clock time. */ - systime_ns += tsp->tv_nsec; - tsp->tv_sec += systime_ns / 10ull; - tsp->tv_nsec = systime_ns % 10ull; -} - -#endif /* XENPV */ - /* * idle_block() * @@ -1011,3 +889,125 @@ sysctl_xen_timepush(SYSCTLFN_ARGS) } #endif /* DOM0OPS */ + +#ifdef XENPV +static int xen_rtc_get(struct todr_chip_handle *, struct timeval *); +static int xen_rtc_set(struct todr_chip_handle *, struct timeval *); +static void xen_wallclock_time(struct timespec *); +/* + * xen time of day register: + * + * Xen wall clock time, plus a Xen vCPU system time adjustment. + */ +static struct todr_chip_handle xen_todr_chip = { + .todr_gettime = xen_rtc_get, + .todr_settime = xen_rtc_set, +}; + +/* + * startrtclock() + * + * Initialize the real-time clock from x86 machdep autoconf. + */ +void +startrtclock(void) +{ + + todr_attach(_todr_chip); +} + +/* + * setstatclockrate(rate) + * + * Set the statclock to run at rate, in units of ticks per second. + *
CVS commit: [bouyer-xenpvh] src/sys/arch/xen/xen
Module Name:src Committed By: bouyer Date: Thu Apr 16 20:21:04 UTC 2020 Modified Files: src/sys/arch/xen/xen [bouyer-xenpvh]: hypervisor.c Log Message: switch vm_guest to VM_GUEST_XENPVHVM only after all tests succeeded. To generate a diff of this commit: cvs rdiff -u -r1.73.2.4 -r1.73.2.5 src/sys/arch/xen/xen/hypervisor.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/xen/hypervisor.c diff -u src/sys/arch/xen/xen/hypervisor.c:1.73.2.4 src/sys/arch/xen/xen/hypervisor.c:1.73.2.5 --- src/sys/arch/xen/xen/hypervisor.c:1.73.2.4 Thu Apr 16 19:23:50 2020 +++ src/sys/arch/xen/xen/hypervisor.c Thu Apr 16 20:21:04 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: hypervisor.c,v 1.73.2.4 2020/04/16 19:23:50 bouyer Exp $ */ +/* $NetBSD: hypervisor.c,v 1.73.2.5 2020/04/16 20:21:04 bouyer Exp $ */ /* * Copyright (c) 2005 Manuel Bouyer. @@ -53,7 +53,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.73.2.4 2020/04/16 19:23:50 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.73.2.5 2020/04/16 20:21:04 bouyer Exp $"); #include #include @@ -251,8 +251,6 @@ hypervisor_match(device_t parent, cfdata /* XXX: vtophys(_page) */ wrmsr(descs[1], (uintptr_t)_page - KERNBASE); - vm_guest = VM_GUEST_XENPVHVM; /* Be more specific */ - } else { return 0; } @@ -427,7 +425,7 @@ hypervisor_match(device_t parent, cfdata bi.common.len = sizeof(struct btinfo_rootdevice); /* From i386/multiboot.c */ - /* $NetBSD: hypervisor.c,v 1.73.2.4 2020/04/16 19:23:50 bouyer Exp $ */ + /* $NetBSD: hypervisor.c,v 1.73.2.5 2020/04/16 20:21:04 bouyer Exp $ */ int i, len; vaddr_t data; extern struct bootinfo bootinfo; @@ -456,6 +454,8 @@ hypervisor_match(device_t parent, cfdata events_default_setup(); delay_func = xen_delay; initclock_func = xen_initclocks; + vm_guest = VM_GUEST_XENPVHVM; /* Be more specific */ + #endif /* XENPVHVM */ /* If we got here, it must mean we matched */
CVS commit: [bouyer-xenpvh] src/sys/arch/xen
Module Name:src Committed By: bouyer Date: Thu Apr 16 19:23:51 UTC 2020 Modified Files: src/sys/arch/xen/conf [bouyer-xenpvh]: files.xen files.xen.pv src/sys/arch/xen/xen [bouyer-xenpvh]: hypervisor.c Added Files: src/sys/arch/xen/xen [bouyer-xenpvh]: xen_clock.c Removed Files: src/sys/arch/xen/xen [bouyer-xenpvh]: clock.c Log Message: Rename xen/xen/clock.c to xen_clock.c, so that it can be compiled with x86/isa/clock.c call events_default_setup() from hypervisor_match to that event arrays are properly initialised. Use xen_delay() and xen's timecounter for PVHVM. To generate a diff of this commit: cvs rdiff -u -r1.180.2.3 -r1.180.2.4 src/sys/arch/xen/conf/files.xen cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/xen/conf/files.xen.pv cvs rdiff -u -r1.80.6.2 -r0 src/sys/arch/xen/xen/clock.c cvs rdiff -u -r1.73.2.3 -r1.73.2.4 src/sys/arch/xen/xen/hypervisor.c cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/xen/xen/xen_clock.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/conf/files.xen diff -u src/sys/arch/xen/conf/files.xen:1.180.2.3 src/sys/arch/xen/conf/files.xen:1.180.2.4 --- src/sys/arch/xen/conf/files.xen:1.180.2.3 Thu Apr 16 08:46:35 2020 +++ src/sys/arch/xen/conf/files.xen Thu Apr 16 19:23:50 2020 @@ -1,4 +1,4 @@ -# $NetBSD: files.xen,v 1.180.2.3 2020/04/16 08:46:35 bouyer Exp $ +# $NetBSD: files.xen,v 1.180.2.4 2020/04/16 19:23:50 bouyer Exp $ defflag opt_xen.h XEN XENPVH XENPVHVM @@ -9,7 +9,7 @@ file arch/xen/xen/evtchn.c xen file arch/xen/xen/xengnt.c xen file arch/xen/x86/xen_ipi.c multiprocessor & xen file arch/xen/x86/xen_mainbus.c xen - +file arch/xen/xen/xen_clock.c xen define hypervisorbus {} define xendevbus {} Index: src/sys/arch/xen/conf/files.xen.pv diff -u src/sys/arch/xen/conf/files.xen.pv:1.1.2.1 src/sys/arch/xen/conf/files.xen.pv:1.1.2.2 --- src/sys/arch/xen/conf/files.xen.pv:1.1.2.1 Thu Apr 16 08:46:35 2020 +++ src/sys/arch/xen/conf/files.xen.pv Thu Apr 16 19:23:50 2020 @@ -1,4 +1,4 @@ -# $NetBSD: files.xen.pv,v 1.1.2.1 2020/04/16 08:46:35 bouyer Exp $ +# $NetBSD: files.xen.pv,v 1.1.2.2 2020/04/16 19:23:50 bouyer Exp $ file arch/xen/x86/autoconf.c xenpv file arch/xen/x86/x86_xpmap.c xenpv @@ -6,7 +6,6 @@ file arch/xen/x86/xen_pmap.c xenpv file arch/xen/x86/xenfunc.c xenpv file arch/xen/xen/xen_acpi_machdep.c acpi & xenpv -file arch/xen/xen/clock.c xenpv file arch/xen/x86/xen_bus_dma.c machdep & xenpv file arch/xen/x86/consinit.c machdep & xenpv file arch/xen/x86/pintr.c machdep & dom0ops & xenpv Index: src/sys/arch/xen/xen/hypervisor.c diff -u src/sys/arch/xen/xen/hypervisor.c:1.73.2.3 src/sys/arch/xen/xen/hypervisor.c:1.73.2.4 --- src/sys/arch/xen/xen/hypervisor.c:1.73.2.3 Thu Apr 16 17:47:37 2020 +++ src/sys/arch/xen/xen/hypervisor.c Thu Apr 16 19:23:50 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: hypervisor.c,v 1.73.2.3 2020/04/16 17:47:37 bouyer Exp $ */ +/* $NetBSD: hypervisor.c,v 1.73.2.4 2020/04/16 19:23:50 bouyer Exp $ */ /* * Copyright (c) 2005 Manuel Bouyer. @@ -53,7 +53,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.73.2.3 2020/04/16 17:47:37 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.73.2.4 2020/04/16 19:23:50 bouyer Exp $"); #include #include @@ -186,6 +186,10 @@ paddr_t HYPERVISOR_shared_info_pa; union start_info_union start_info_union __aligned(PAGE_SIZE); #endif +extern void (*delay_func)(unsigned int); +extern void (*initclock_func)(void); + + int xen_version; /* power management, for save/restore */ @@ -423,7 +427,7 @@ hypervisor_match(device_t parent, cfdata bi.common.len = sizeof(struct btinfo_rootdevice); /* From i386/multiboot.c */ - /* $NetBSD: hypervisor.c,v 1.73.2.3 2020/04/16 17:47:37 bouyer Exp $ */ + /* $NetBSD: hypervisor.c,v 1.73.2.4 2020/04/16 19:23:50 bouyer Exp $ */ int i, len; vaddr_t data; extern struct bootinfo bootinfo; @@ -449,6 +453,9 @@ hypervisor_match(device_t parent, cfdata aprint_error("%s: Unable to disable emulated devices\n", haa->haa_busname); } + events_default_setup(); + delay_func = xen_delay; + initclock_func = xen_initclocks; #endif /* XENPVHVM */ /* If we got here, it must mean we matched */ Added files: Index: src/sys/arch/xen/xen/xen_clock.c diff -u /dev/null src/sys/arch/xen/xen/xen_clock.c:1.1.2.1 --- /dev/null Thu Apr 16 19:23:51 2020 +++ src/sys/arch/xen/xen/xen_clock.c Thu Apr 16 19:23:50 2020 @@ -0,0 +1,1013 @@ +/* $NetBSD: xen_clock.c,v 1.1.2.1 2020/04/16 19:23:50 bouyer Exp $ */ + +/*- + * Copyright (c) 2017, 2018 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Taylor R. Campbell. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of
CVS commit: src/share/man/man4/man4.x86
Module Name:src Committed By: pgoyette Date: Thu Apr 16 18:56:04 UTC 2020 Modified Files: src/share/man/man4/man4.x86: imcsmb.4 Log Message: Put the spaces back (they're part of the config(1) syntax) but quote them to avoid formatting errors To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/man4.x86/imcsmb.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/man4.x86/imcsmb.4 diff -u src/share/man/man4/man4.x86/imcsmb.4:1.8 src/share/man/man4/man4.x86/imcsmb.4:1.9 --- src/share/man/man4/man4.x86/imcsmb.4:1.8 Thu Apr 16 18:51:47 2020 +++ src/share/man/man4/man4.x86/imcsmb.4 Thu Apr 16 18:56:04 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: imcsmb.4,v 1.8 2020/04/16 18:51:47 pgoyette Exp $ +.\" $NetBSD: imcsmb.4,v 1.9 2020/04/16 18:56:04 pgoyette Exp $ .\" .\" Copyright (c) 2018 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -61,9 +61,9 @@ .Nm imcsmb .Nd Intel integrated Memory Controller (iMC) SMBus controller driver .Sh SYNOPSIS -.Cd imc* at pci? dev? func? -.Cd imcsmb* at imc? -.Cd iic* at i2cbus? +.Cd "imc* at pci? dev ? func ?" +.Cd "imcsmb* at imc?" +.Cd "iic* at i2cbus?" .Pp Alternatively, to load the driver as a module at boot time, place the following line in
CVS commit: src/share/man/man4/man4.x86
Module Name:src Committed By: pgoyette Date: Thu Apr 16 18:51:48 UTC 2020 Modified Files: src/share/man/man4/man4.x86: imcsmb.4 Log Message: Remove extraneous spaces To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/share/man/man4/man4.x86/imcsmb.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/man4.x86/imcsmb.4 diff -u src/share/man/man4/man4.x86/imcsmb.4:1.7 src/share/man/man4/man4.x86/imcsmb.4:1.8 --- src/share/man/man4/man4.x86/imcsmb.4:1.7 Wed Feb 28 05:47:00 2018 +++ src/share/man/man4/man4.x86/imcsmb.4 Thu Apr 16 18:51:47 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: imcsmb.4,v 1.7 2018/02/28 05:47:00 pgoyette Exp $ +.\" $NetBSD: imcsmb.4,v 1.8 2020/04/16 18:51:47 pgoyette Exp $ .\" .\" Copyright (c) 2018 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -54,14 +54,14 @@ .\" .\" $FreeBSD$ .\" -.Dd February 28, 2018 +.Dd April 16, 2020 .Dt IMCSMB 4 .Os .Sh NAME .Nm imcsmb .Nd Intel integrated Memory Controller (iMC) SMBus controller driver .Sh SYNOPSIS -.Cd imc* at pci? dev ? func ? +.Cd imc* at pci? dev? func? .Cd imcsmb* at imc? .Cd iic* at i2cbus? .Pp
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Apr 16 18:32:30 UTC 2020 Modified Files: src/sys/dev/pci: ichsmb.c Log Message: Add Comet Lake support. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/dev/pci/ichsmb.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/ichsmb.c diff -u src/sys/dev/pci/ichsmb.c:1.66 src/sys/dev/pci/ichsmb.c:1.67 --- src/sys/dev/pci/ichsmb.c:1.66 Tue Feb 18 04:09:31 2020 +++ src/sys/dev/pci/ichsmb.c Thu Apr 16 18:32:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ichsmb.c,v 1.66 2020/02/18 04:09:31 msaitoh Exp $ */ +/* $NetBSD: ichsmb.c,v 1.67 2020/04/16 18:32:29 msaitoh Exp $ */ /* $OpenBSD: ichiic.c,v 1.18 2007/05/03 09:36:26 dlg Exp $ */ /* @@ -22,7 +22,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.66 2020/02/18 04:09:31 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.67 2020/04/16 18:32:29 msaitoh Exp $"); #include #include @@ -129,6 +129,7 @@ ichsmb_match(device_t parent, cfdata_t m case PCI_PRODUCT_INTEL_3HS_SMB: case PCI_PRODUCT_INTEL_CORE4G_M_SMB: case PCI_PRODUCT_INTEL_CORE5G_M_SMB: + case PCI_PRODUCT_INTEL_CMTLK_SMB: case PCI_PRODUCT_INTEL_BAYTRAIL_PCU_SMB: case PCI_PRODUCT_INTEL_BSW_PCU_SMB: case PCI_PRODUCT_INTEL_APL_SMB:
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Apr 16 18:20:46 UTC 2020 Modified Files: src/sys/dev/pci: pcidevs Log Message: - Add some Intel UHD Graphics devices. Mainly taken from OpenBSD. - Add Comet Lake devices. - Modify description of Intel 0x591e from HD Graphics to UHD Graphics. - Add Western Digital WD Blue SN550 NVMe SSD To generate a diff of this commit: cvs rdiff -u -r1.1405 -r1.1406 src/sys/dev/pci/pcidevs 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/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1405 src/sys/dev/pci/pcidevs:1.1406 --- src/sys/dev/pci/pcidevs:1.1405 Fri Apr 10 18:23:22 2020 +++ src/sys/dev/pci/pcidevs Thu Apr 16 18:20:46 2020 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1405 2020/04/10 18:23:22 christos Exp $ +$NetBSD: pcidevs,v 1.1406 2020/04/16 18:20:46 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -3081,6 +3081,41 @@ product INTEL IVYBRIDGE_PCIE_3 0x015d Iv product INTEL IVYBRIDGE_IGD_1 0x0162 Ivy Bridge Integrated Graphics Device product INTEL IVYBRIDGE_M_IGD_1 0x0166 Ivy Bridge Integrated Graphics Device product INTEL IVYBRIDGE_S_IGD_1 0x016a Ivy Bridge Integrated Graphics Device +product INTEL CMTLK_U_LPC 0x0284 Comet Lake U LPC or eSPI +product INTEL CMTLK_SMB 0x02a3 Comet Lake SMBus +product INTEL CMTLK_SPI 0x02a4 Comet Lake SPI (FLASH) +product INTEL CMTLK_PCIE_9 0x02b0 Comet Lake PCIe Root Port 9 +product INTEL CMTLK_PCIE_10 0x02b1 Comet Lake PCIe Root Port 10 +product INTEL CMTLK_PCIE_11 0x02b2 Comet Lake PCIe Root Port 11 +product INTEL CMTLK_PCIE_12 0x02b3 Comet Lake PCIe Root Port 12 +product INTEL CMTLK_PCIE_13 0x02b4 Comet Lake PCIe Root Port 13 +product INTEL CMTLK_PCIE_14 0x02b5 Comet Lake PCIe Root Port 14 +product INTEL CMTLK_PCIE_15 0x02b6 Comet Lake PCIe Root Port 15 +product INTEL CMTLK_PCIE_16 0x02b7 Comet Lake PCIe Root Port 16 +product INTEL CMTLK_PCIE_1 0x02b8 Comet Lake PCIe Root Port 1 +product INTEL CMTLK_PCIE_2 0x02b9 Comet Lake PCIe Root Port 2 +product INTEL CMTLK_PCIE_3 0x02ba Comet Lake PCIe Root Port 3 +product INTEL CMTLK_PCIE_4 0x02bb Comet Lake PCIe Root Port 4 +product INTEL CMTLK_PCIE_5 0x02bc Comet Lake PCIe Root Port 5 +product INTEL CMTLK_PCIE_6 0x02bd Comet Lake PCIe Root Port 6 +product INTEL CMTLK_PCIE_7 0x02be Comet Lake PCIe Root Port 7 +product INTEL CMTLK_PCIE_8 0x02bf Comet Lake PCIe Root Port 8 +product INTEL CMTLK_HDA 0x02c8 Comet Lake HD Audio +product INTEL CMTLK_SATA_AHCI_0 0x02d3 Comet Lake SATA (AHCI) +product INTEL CMTLK_MEI_1 0x02e0 Comet Lake MEI Controller #1 +product INTEL CMTLK_MEI_2 0x02e1 Comet Lake MEI Controller #2 +product INTEL CMTLK_IDE_R 0x02e2 Comet Lake IDE-R +product INTEL CMTLK_KT 0x02e3 Comet Lake KT +product INTEL CMTLK_MEI_3 0x02e4 Comet Lake MEI Controller #3 +product INTEL CMTLK_MEI_4 0x02e5 Comet Lake MEI Controller #4 +product INTEL CMTLK_I2C_0 0x02e8 Comet Lake I2C #0 +product INTEL CMTLK_I2C_1 0x02e9 Comet Lake I2C #1 +product INTEL CMTLK_I2C_2 0x02ea Comet Lake I2C #2 +product INTEL CMTLK_I2C_3 0x02eb Comet Lake I2C #3 +product INTEL CMTLK_XHCI 0x02ed Comet Lake USB 3.2 Gen 2 xHCI +product INTEL CMTLK_SSRAM 0x02ef Comet Lake Shared SRAM +product INTEL CMTLK_CNVI_WIFI 0x02f0 Comet Lake CNVi Wi-Fi +product INTEL CMTLK_THERM 0x02f9 Comet Lake Thermal product INTEL 80312 0x030d 80312 I/O Companion Chip product INTEL 80321 0x0319 80321 I/O Processor product INTEL 6700PXH_IOXAPIC 0x0326 6700PXH IOxAPIC @@ -4867,11 +4902,19 @@ product INTEL COFLK_IGD_1 0x3e90 UHD Gra product INTEL COFLK_IGD_2 0x3e91 UHD Graphics 630 product INTEL COFLK_IGD_3 0x3e92 UHD Graphics 630 product INTEL COFLK_IGD_4 0x3e93 UHD Graphics 610 +product INTEL COFLK_H_GT2_4 0x3e94 UHD Graphics P630 product INTEL XEONE_IGD 0x3e96 UHD Graphics P630 +product INTEL COFLK_S_GT2_4 0x3e98 UHD Graphics 630 +product INTEL COFLK_S_GT1_3 0x3e99 UHD Graphics 610 +product INTEL COFLK_S_GT2_5 0x3e9a UHD Graphics P630 product INTEL COFLK_IGD_5 0x3e9b UHD Graphics 630 +product INTEL COFLK_H_GT1 0x3e9c UHD Graphics 610 product INTEL WHISKYLK_IGD_1 0x3ea0 UHD Graphics 620 product INTEL WHISKYLK_IGD_2 0x3ea1 UHD Graphics 610 product INTEL COFLK_IGD_6 0x3ea5 Iris Plus Graphics 655 +product INTEL COFLK_U_GT3_2 0x3ea6 Iris Plus Graphics 645 +product INTEL COFLK_U_GT3_4 0x3ea8 Iris Plus Graphics 655 +product INTEL COFLK_U_GT2_2 0x3ea9 UHD Graphics 620 product INTEL XEONE_S_D_HOST_DRAM_6C 0x3ec2 Xeon E (S, Desktop) Host Bridge, DRAM product INTEL CORE8G_H_H_HOST_DRAM_6C 0x3ec4 Core 8G (H, Halo) Host Bridge, DRAM product INTEL XEONE_S_W_HOST_DRAM_6C 0x3ec6 Xeon E (S, WS) Host Bridge, DRAM @@ -4965,8 +5008,9 @@ product INTEL CORE8G_U_GT2 0x5917 UHD Gr product INTEL CORE7G_H_SW_HOST_DRAM 0x5918 Core 7G (H, Server or Workstation) Host Bridge, DRAM product INTEL CORE7G_IU 0x5919 Core 7G Image Unit product INTEL CORE7G_H_M_GT2 0x591b HD Graphics 630 (GT2, Mobile) +product
CVS commit: [bouyer-xenpvh] src/sys/arch
Module Name:src Committed By: bouyer Date: Thu Apr 16 17:50:52 UTC 2020 Modified Files: src/sys/arch/amd64/amd64 [bouyer-xenpvh]: vector.S src/sys/arch/amd64/conf [bouyer-xenpvh]: GENERIC_XENHVM src/sys/arch/i386/i386 [bouyer-xenpvh]: vector.S src/sys/arch/xen/x86 [bouyer-xenpvh]: hypervisor_machdep.c Log Message: amd64: Xhypervisor_pvhvm_callback has to be in text.user for SVS. Thanks to maxv@ for helping me with this. Enable SVS again. While there, increase ci_idepth before calling do_hypervisor_callback, and don't touch ci_idepth while looping over pending events. To generate a diff of this commit: cvs rdiff -u -r1.73.6.4 -r1.73.6.5 src/sys/arch/amd64/amd64/vector.S cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/arch/amd64/conf/GENERIC_XENHVM cvs rdiff -u -r1.85.6.5 -r1.85.6.6 src/sys/arch/i386/i386/vector.S cvs rdiff -u -r1.36.8.2 -r1.36.8.3 src/sys/arch/xen/x86/hypervisor_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/vector.S diff -u src/sys/arch/amd64/amd64/vector.S:1.73.6.4 src/sys/arch/amd64/amd64/vector.S:1.73.6.5 --- src/sys/arch/amd64/amd64/vector.S:1.73.6.4 Thu Apr 16 08:46:34 2020 +++ src/sys/arch/amd64/amd64/vector.S Thu Apr 16 17:50:51 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: vector.S,v 1.73.6.4 2020/04/16 08:46:34 bouyer Exp $ */ +/* $NetBSD: vector.S,v 1.73.6.5 2020/04/16 17:50:51 bouyer Exp $ */ /* * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc. @@ -761,17 +761,20 @@ ENTRY(hypervisor_callback) movq (%rsp),%rcx movq 8(%rsp),%r11 addq $16,%rsp + jmp _C_LABEL(Xhypervisor_pvhvm_callback) + TEXT_USER_BEGIN IDTVEC(hypervisor_pvhvm_callback) pushq $0 /* Dummy error code */ pushq $T_ASTFLT INTRENTRY movlCPUVAR(ILEVEL),%edi pushq %rdi /* for Xdoreti */ + incl CPUVAR(IDEPTH) movq %rsp,%rdi call do_hypervisor_callback - incl CPUVAR(IDEPTH) jmp _C_LABEL(Xdoreti) IDTVEC_END(hypervisor_pvhvm_callback) + TEXT_USER_END END(hypervisor_callback) #endif /* XEN */ Index: src/sys/arch/amd64/conf/GENERIC_XENHVM diff -u src/sys/arch/amd64/conf/GENERIC_XENHVM:1.1.2.3 src/sys/arch/amd64/conf/GENERIC_XENHVM:1.1.2.4 --- src/sys/arch/amd64/conf/GENERIC_XENHVM:1.1.2.3 Thu Apr 16 10:42:26 2020 +++ src/sys/arch/amd64/conf/GENERIC_XENHVM Thu Apr 16 17:50:51 2020 @@ -1,14 +1,13 @@ -# $NetBSD: GENERIC_XENHVM,v 1.1.2.3 2020/04/16 10:42:26 bouyer Exp $ +# $NetBSD: GENERIC_XENHVM,v 1.1.2.4 2020/04/16 17:50:51 bouyer Exp $ include "arch/amd64/conf/GENERIC" options XENPVHVM options XEN -no options SVS # Separate Virtual Space options MAXPHYS=32768 #xbd doesn't handle 64k transfers hypervisor* at mainbus? # Xen hypervisor #vcpu* at hypervisor? # Xen virtual CPUs xenbus* at hypervisor? # Xen virtual bus xencons* at hypervisor? # Xen virtual console -xennet* at xenbus? # Xen virtual network interface +xennet* at xenbus? # Xen virtual network interface xbd* at xenbus? # Xen virtual block device Index: src/sys/arch/i386/i386/vector.S diff -u src/sys/arch/i386/i386/vector.S:1.85.6.5 src/sys/arch/i386/i386/vector.S:1.85.6.6 --- src/sys/arch/i386/i386/vector.S:1.85.6.5 Thu Apr 16 08:46:34 2020 +++ src/sys/arch/i386/i386/vector.S Thu Apr 16 17:50:52 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: vector.S,v 1.85.6.5 2020/04/16 08:46:34 bouyer Exp $ */ +/* $NetBSD: vector.S,v 1.85.6.6 2020/04/16 17:50:52 bouyer Exp $ */ /* * Copyright 2002 (c) Wasabi Systems, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vector.S,v 1.85.6.5 2020/04/16 08:46:34 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vector.S,v 1.85.6.6 2020/04/16 17:50:52 bouyer Exp $"); #include "opt_ddb.h" #include "opt_multiprocessor.h" @@ -1013,11 +1013,12 @@ IDTVEC(hypervisor_pvhvm_callback) pushl $T_ASTFLT INTRENTRY pushl CPUVAR(ILEVEL) - push %esp - call do_hypervisor_callback - add $4,%esp IDEPTH_INCR - CLI(%eax) + /* IDEPTH_INCR puts %esp on stack; we use it as argument to + * do_hypervisor_callback. But don't restore the stack after, + * Xdoreti needs it too. + */ + call do_hypervisor_callback jmp _C_LABEL(Xdoreti) IDTVEC_END(hypervisor_pvhvm_callback) END(hypervisor_callback) Index: src/sys/arch/xen/x86/hypervisor_machdep.c diff -u src/sys/arch/xen/x86/hypervisor_machdep.c:1.36.8.2 src/sys/arch/xen/x86/hypervisor_machdep.c:1.36.8.3 --- src/sys/arch/xen/x86/hypervisor_machdep.c:1.36.8.2 Thu Apr 16 08:46:35 2020 +++ src/sys/arch/xen/x86/hypervisor_machdep.c Thu Apr 16 17:50:52 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: hypervisor_machdep.c,v 1.36.8.2 2020/04/16 08:46:35 bouyer Exp $ */ +/* $NetBSD: hypervisor_machdep.c,v 1.36.8.3 2020/04/16 17:50:52 bouyer Exp $ */ /* * @@ -54,11 +54,12 @@ #include -__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.36.8.2 2020/04/16 08:46:35 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.36.8.3 2020/04/16 17:50:52 bouyer Exp
CVS commit: [bouyer-xenpvh] src/sys/arch/xen/xen
Module Name:src Committed By: bouyer Date: Thu Apr 16 17:47:37 UTC 2020 Modified Files: src/sys/arch/xen/xen [bouyer-xenpvh]: hypervisor.c Log Message: fail silently if hypervisor is not found. To generate a diff of this commit: cvs rdiff -u -r1.73.2.2 -r1.73.2.3 src/sys/arch/xen/xen/hypervisor.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/xen/hypervisor.c diff -u src/sys/arch/xen/xen/hypervisor.c:1.73.2.2 src/sys/arch/xen/xen/hypervisor.c:1.73.2.3 --- src/sys/arch/xen/xen/hypervisor.c:1.73.2.2 Sat Apr 11 21:21:16 2020 +++ src/sys/arch/xen/xen/hypervisor.c Thu Apr 16 17:47:37 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: hypervisor.c,v 1.73.2.2 2020/04/11 21:21:16 bouyer Exp $ */ +/* $NetBSD: hypervisor.c,v 1.73.2.3 2020/04/16 17:47:37 bouyer Exp $ */ /* * Copyright (c) 2005 Manuel Bouyer. @@ -53,7 +53,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.73.2.2 2020/04/11 21:21:16 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.73.2.3 2020/04/16 17:47:37 bouyer Exp $"); #include #include @@ -250,8 +250,6 @@ hypervisor_match(device_t parent, cfdata vm_guest = VM_GUEST_XENPVHVM; /* Be more specific */ } else { - aprint_normal("%s: Xen HVM mode not identified. Exiting.\n", - haa->haa_busname); return 0; } @@ -425,7 +423,7 @@ hypervisor_match(device_t parent, cfdata bi.common.len = sizeof(struct btinfo_rootdevice); /* From i386/multiboot.c */ - /* $NetBSD: hypervisor.c,v 1.73.2.2 2020/04/11 21:21:16 bouyer Exp $ */ + /* $NetBSD: hypervisor.c,v 1.73.2.3 2020/04/16 17:47:37 bouyer Exp $ */ int i, len; vaddr_t data; extern struct bootinfo bootinfo;
CVS commit: [bouyer-xenpvh] src/sys/arch/xen/x86
Module Name:src Committed By: bouyer Date: Thu Apr 16 17:46:44 UTC 2020 Modified Files: src/sys/arch/xen/x86 [bouyer-xenpvh]: xen_mainbus.c Log Message: Don't try to attach hypervisor on non Xen; no more error messages about hypervisor when booting on bare metal. To generate a diff of this commit: cvs rdiff -u -r1.6.12.1 -r1.6.12.2 src/sys/arch/xen/x86/xen_mainbus.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/x86/xen_mainbus.c diff -u src/sys/arch/xen/x86/xen_mainbus.c:1.6.12.1 src/sys/arch/xen/x86/xen_mainbus.c:1.6.12.2 --- src/sys/arch/xen/x86/xen_mainbus.c:1.6.12.1 Thu Apr 16 08:46:35 2020 +++ src/sys/arch/xen/x86/xen_mainbus.c Thu Apr 16 17:46:44 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: xen_mainbus.c,v 1.6.12.1 2020/04/16 08:46:35 bouyer Exp $ */ +/* $NetBSD: xen_mainbus.c,v 1.6.12.2 2020/04/16 17:46:44 bouyer Exp $ */ /* NetBSD: mainbus.c,v 1.19 2017/05/23 08:54:39 nonaka Exp */ /* NetBSD: mainbus.c,v 1.53 2003/10/27 14:11:47 junyoung Exp */ @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xen_mainbus.c,v 1.6.12.1 2020/04/16 08:46:35 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xen_mainbus.c,v 1.6.12.2 2020/04/16 17:46:44 bouyer Exp $"); #include #include @@ -121,20 +121,31 @@ xen_mainbus_attach(device_t parent, devi { union xen_mainbus_attach_args mba; + switch(vm_guest) { + case VM_GUEST_XENPV: #if NIPMI > 0 && defined(XENPV) - memset(_ipmi, 0, sizeof(mba.mba_ipmi)); - mba.mba_ipmi.iaa_iot = x86_bus_space_io; - mba.mba_ipmi.iaa_memt = x86_bus_space_mem; - if (ipmi_probe(_ipmi)) - config_found_ia(self, "ipmibus", _ipmi, 0); -#endif - - mba.mba_haa.haa_busname = "hypervisor"; - config_found_ia(self, "hypervisorbus", _haa, xen_mainbus_print); - - /* save/restore for Xen */ - if (!pmf_device_register(self, NULL, NULL)) - aprint_error_dev(self, "couldn't establish power handler\n"); + memset(_ipmi, 0, sizeof(mba.mba_ipmi)); + mba.mba_ipmi.iaa_iot = x86_bus_space_io; + mba.mba_ipmi.iaa_memt = x86_bus_space_mem; + if (ipmi_probe(_ipmi)) + config_found_ia(self, "ipmibus", _ipmi, 0); +#endif + /* FALLTHROUGH */ + case VM_GUEST_XENHVM: + mba.mba_haa.haa_busname = "hypervisor"; + config_found_ia(self, "hypervisorbus", + _haa, xen_mainbus_print); + break; + default: + return; + } + + if (vm_guest == VM_GUEST_XENPV) { + /* save/restore for Xen */ + if (!pmf_device_register(self, NULL, NULL)) + aprint_error_dev(self, + "couldn't establish power handler\n"); + } } static int
CVS commit: [bouyer-xenpvh] src/sys/arch
Module Name:src Committed By: bouyer Date: Thu Apr 16 17:44:54 UTC 2020 Modified Files: src/sys/arch/amd64/include [bouyer-xenpvh]: intrdefs.h src/sys/arch/i386/include [bouyer-xenpvh]: intrdefs.h src/sys/arch/x86/include [bouyer-xenpvh]: cpu.h Log Message: Avoid overflow of ci_ipi_events[] in the PVHVM case (it's size is XEN_NIPIS but we use x86 IPIs): size XEN_NIPIS only for PV, and CTASSERT that XEN_NIPIS <= X86_NIPI if we ever use Xen IPIs for PVHVM. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.64.1 src/sys/arch/amd64/include/intrdefs.h cvs rdiff -u -r1.4 -r1.4.64.1 src/sys/arch/i386/include/intrdefs.h cvs rdiff -u -r1.117.4.4 -r1.117.4.5 src/sys/arch/x86/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/include/intrdefs.h diff -u src/sys/arch/amd64/include/intrdefs.h:1.2 src/sys/arch/amd64/include/intrdefs.h:1.2.64.1 --- src/sys/arch/amd64/include/intrdefs.h:1.2 Wed Aug 10 06:30:59 2011 +++ src/sys/arch/amd64/include/intrdefs.h Thu Apr 16 17:44:54 2020 @@ -1,6 +1,4 @@ -/* $NetBSD: intrdefs.h,v 1.2 2011/08/10 06:30:59 cherry Exp $ */ +/* $NetBSD: intrdefs.h,v 1.2.64.1 2020/04/16 17:44:54 bouyer Exp $ */ #include -#ifdef XEN #include -#endif /* XEN */ Index: src/sys/arch/i386/include/intrdefs.h diff -u src/sys/arch/i386/include/intrdefs.h:1.4 src/sys/arch/i386/include/intrdefs.h:1.4.64.1 --- src/sys/arch/i386/include/intrdefs.h:1.4 Wed Aug 10 06:30:59 2011 +++ src/sys/arch/i386/include/intrdefs.h Thu Apr 16 17:44:54 2020 @@ -1,6 +1,4 @@ -/* $NetBSD: intrdefs.h,v 1.4 2011/08/10 06:30:59 cherry Exp $ */ +/* $NetBSD: intrdefs.h,v 1.4.64.1 2020/04/16 17:44:54 bouyer Exp $ */ #include -#ifdef XEN #include -#endif /* XEN */ Index: src/sys/arch/x86/include/cpu.h diff -u src/sys/arch/x86/include/cpu.h:1.117.4.4 src/sys/arch/x86/include/cpu.h:1.117.4.5 --- src/sys/arch/x86/include/cpu.h:1.117.4.4 Sun Apr 12 17:25:52 2020 +++ src/sys/arch/x86/include/cpu.h Thu Apr 16 17:44:54 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.117.4.4 2020/04/12 17:25:52 bouyer Exp $ */ +/* $NetBSD: cpu.h,v 1.117.4.5 2020/04/16 17:44:54 bouyer Exp $ */ /* * Copyright (c) 1990 The Regents of the University of California. @@ -262,9 +262,13 @@ struct cpu_info { vaddr_t ci_svs_utls; #endif +#ifndef XENPV + struct evcnt ci_ipi_events[X86_NIPI]; +#else + struct evcnt ci_ipi_events[XEN_NIPIS]; +#endif #ifdef XEN u_long ci_evtmask[NR_EVENT_CHANNELS]; /* events allowed on this CPU */ - struct evcnt ci_ipi_events[XEN_NIPIS]; evtchn_port_t ci_ipi_evtchn; #if defined(XENPV) #if defined(PAE) || defined(__x86_64__) @@ -299,9 +303,6 @@ struct cpu_info { */ uint64_t ci_xen_systime_ns_skew; - /* Xen periodic timer interrupt handle. */ - struct intrhand *ci_xen_timer_intrhand; - /* * Clockframe for timer interrupt handler. * Saved at entry via event callback. @@ -316,11 +317,11 @@ struct cpu_info { struct evcnt ci_xen_raw_systime_backwards_evcnt; struct evcnt ci_xen_systime_backwards_hardclock_evcnt; struct evcnt ci_xen_missed_hardclock_evcnt; -#else /* XEN */ - struct evcnt ci_ipi_events[X86_NIPI]; #endif /* XEN */ - }; +#ifndef XENPV + __CTASSERT(XEN_NIPIS <= X86_NIPI); +#endif /* * Macros to handle (some) trapframe registers for common x86 code.
CVS commit: [phil-wifi] src/sys/dev
Module Name:src Committed By: nat Date: Thu Apr 16 17:24:49 UTC 2020 Modified Files: src/sys/dev/ic [phil-wifi]: rtwnreg.h src/sys/dev/usb [phil-wifi]: if_urtwn.c Log Message: Update with 92EU changes from -current. To generate a diff of this commit: cvs rdiff -u -r1.1.8.3 -r1.1.8.4 src/sys/dev/ic/rtwnreg.h cvs rdiff -u -r1.59.2.10 -r1.59.2.11 src/sys/dev/usb/if_urtwn.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/rtwnreg.h diff -u src/sys/dev/ic/rtwnreg.h:1.1.8.3 src/sys/dev/ic/rtwnreg.h:1.1.8.4 --- src/sys/dev/ic/rtwnreg.h:1.1.8.3 Mon Apr 13 08:04:22 2020 +++ src/sys/dev/ic/rtwnreg.h Thu Apr 16 17:24:49 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rtwnreg.h,v 1.1.8.3 2020/04/13 08:04:22 martin Exp $ */ +/* $NetBSD: rtwnreg.h,v 1.1.8.4 2020/04/16 17:24:49 nat Exp $ */ /* $OpenBSD: r92creg.h,v 1.16 2017/09/22 13:41:56 kevlo Exp $ */ /*- @@ -1341,6 +1341,8 @@ struct r92c_rx_desc_usb { #define R92C_RXDW2_PKTCNT_M 0x00ff #define R92C_RXDW2_PKTCNT_S 16 +#define R92E_RXDW2_PKTCNT_M 0x3fc0 +#define R92E_RXDW2_PKTCNT_S 22 #define R92C_RXDW3_RATE_M 0x003f #define R92C_RXDW3_RATE_S 0 Index: src/sys/dev/usb/if_urtwn.c diff -u src/sys/dev/usb/if_urtwn.c:1.59.2.10 src/sys/dev/usb/if_urtwn.c:1.59.2.11 --- src/sys/dev/usb/if_urtwn.c:1.59.2.10 Thu Apr 16 15:33:07 2020 +++ src/sys/dev/usb/if_urtwn.c Thu Apr 16 17:24:49 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urtwn.c,v 1.59.2.10 2020/04/16 15:33:07 nat Exp $ */ +/* $NetBSD: if_urtwn.c,v 1.59.2.11 2020/04/16 17:24:49 nat Exp $ */ /* $OpenBSD: if_urtwn.c,v 1.42 2015/02/10 23:25:46 mpi Exp $ */ /*- @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.59.2.10 2020/04/16 15:33:07 nat Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.59.2.11 2020/04/16 17:24:49 nat Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -2923,7 +2923,10 @@ urtwn_rxeof(struct usbd_xfer *xfer, void /* Get the number of encapsulated frames. */ stat = (struct r92c_rx_desc_usb *)buf; - npkts = MS(le32toh(stat->rxdw2), R92C_RXDW2_PKTCNT); + if (ISSET(sc->chip, URTWN_CHIP_92EU)) + npkts = MS(le32toh(stat->rxdw2), R92E_RXDW2_PKTCNT); + else + npkts = MS(le32toh(stat->rxdw2), R92C_RXDW2_PKTCNT); DPRINTFN(DBG_RX, ("%s: %s: Rx %d frames in one chunk\n", device_xname(sc->sc_dev), __func__, npkts));
CVS commit: src/sys/dev
Module Name:src Committed By: nat Date: Thu Apr 16 17:18:28 UTC 2020 Modified Files: src/sys/dev/ic: rtwnreg.h src/sys/dev/usb: if_urtwn.c Log Message: Correct rx packet count for 8192EU. Tested OK. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/rtwnreg.h cvs rdiff -u -r1.85 -r1.86 src/sys/dev/usb/if_urtwn.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/rtwnreg.h diff -u src/sys/dev/ic/rtwnreg.h:1.2 src/sys/dev/ic/rtwnreg.h:1.3 --- src/sys/dev/ic/rtwnreg.h:1.2 Thu Jul 25 14:31:35 2019 +++ src/sys/dev/ic/rtwnreg.h Thu Apr 16 17:18:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rtwnreg.h,v 1.2 2019/07/25 14:31:35 msaitoh Exp $ */ +/* $NetBSD: rtwnreg.h,v 1.3 2020/04/16 17:18:27 nat Exp $ */ /* $OpenBSD: r92creg.h,v 1.16 2017/09/22 13:41:56 kevlo Exp $ */ /*- @@ -1341,6 +1341,8 @@ struct r92c_rx_desc_usb { #define R92C_RXDW2_PKTCNT_M 0x00ff #define R92C_RXDW2_PKTCNT_S 16 +#define R92E_RXDW2_PKTCNT_M 0x3fc0 +#define R92E_RXDW2_PKTCNT_S 22 #define R92C_RXDW3_RATE_M 0x003f #define R92C_RXDW3_RATE_S 0 Index: src/sys/dev/usb/if_urtwn.c diff -u src/sys/dev/usb/if_urtwn.c:1.85 src/sys/dev/usb/if_urtwn.c:1.86 --- src/sys/dev/usb/if_urtwn.c:1.85 Sat Apr 4 08:46:01 2020 +++ src/sys/dev/usb/if_urtwn.c Thu Apr 16 17:18:27 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urtwn.c,v 1.85 2020/04/04 08:46:01 skrll Exp $ */ +/* $NetBSD: if_urtwn.c,v 1.86 2020/04/16 17:18:27 nat Exp $ */ /* $OpenBSD: if_urtwn.c,v 1.42 2015/02/10 23:25:46 mpi Exp $ */ /*- @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.85 2020/04/04 08:46:01 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.86 2020/04/16 17:18:27 nat Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -2527,7 +2527,10 @@ urtwn_rxeof(struct usbd_xfer *xfer, void /* Get the number of encapsulated frames. */ stat = (struct r92c_rx_desc_usb *)buf; - npkts = MS(le32toh(stat->rxdw2), R92C_RXDW2_PKTCNT); + if (ISSET(sc->chip, URTWN_CHIP_92EU)) + npkts = MS(le32toh(stat->rxdw2), R92E_RXDW2_PKTCNT); + else + npkts = MS(le32toh(stat->rxdw2), R92C_RXDW2_PKTCNT); DPRINTFN(DBG_RX, "Rx %jd frames in one chunk", npkts, 0, 0, 0); if (npkts != 0)
CVS commit: src/sys/arch/xen/xen
Module Name:src Committed By: jdolecek Date: Thu Apr 16 16:38:43 UTC 2020 Modified Files: src/sys/arch/xen/xen: xbd_xenbus.c Log Message: if backend supports it, use indirect segment for I/O requests over 32KB there is some overhead for backend without persistent mappings (backend needs to map the extra indirect segment page), but this makes it possible to queue more I/O if using 64KB block size tested on NetBSD/amd64 DomU against Linux/amd64 Dom0 To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/arch/xen/xen/xbd_xenbus.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/xen/xbd_xenbus.c diff -u src/sys/arch/xen/xen/xbd_xenbus.c:1.115 src/sys/arch/xen/xen/xbd_xenbus.c:1.116 --- src/sys/arch/xen/xen/xbd_xenbus.c:1.115 Thu Apr 16 09:51:40 2020 +++ src/sys/arch/xen/xen/xbd_xenbus.c Thu Apr 16 16:38:43 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: xbd_xenbus.c,v 1.115 2020/04/16 09:51:40 jdolecek Exp $ */ +/* $NetBSD: xbd_xenbus.c,v 1.116 2020/04/16 16:38:43 jdolecek Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.115 2020/04/16 09:51:40 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.116 2020/04/16 16:38:43 jdolecek Exp $"); #include "opt_xen.h" @@ -103,6 +103,12 @@ __KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c CTASSERT((MAXPHYS <= 2*XBD_MAX_CHUNK)); CTASSERT(XEN_BSIZE == DEV_BSIZE); +struct xbd_indirect { + SLIST_ENTRY(xbd_indirect) in_next; + struct blkif_request_segment *in_addr; + grant_ref_t in_gntref; +}; + struct xbd_req { SLIST_ENTRY(xbd_req) req_next; uint16_t req_id; /* ID passed to backend */ @@ -114,6 +120,7 @@ struct xbd_req { grant_ref_t req_gntref[XBD_XFER_LIMIT >> PAGE_SHIFT]; struct buf *req_bp; /* buffer associated with this request */ void *req_data; /* pointer to the data buffer */ + struct xbd_indirect *req_indirect; /* indirect page */ } req_rw; struct { int s_error; @@ -124,6 +131,7 @@ struct xbd_req { #define req_gntref u.req_rw.req_gntref #define req_bp u.req_rw.req_bp #define req_data u.req_rw.req_data +#define req_indirect u.req_rw.req_indirect #define req_sync u.req_sync struct xbd_xenbus_softc { @@ -144,6 +152,9 @@ struct xbd_xenbus_softc { struct xbd_req sc_reqs[XBD_RING_SIZE]; SLIST_HEAD(,xbd_req) sc_xbdreq_head; /* list of free requests */ + struct xbd_indirect sc_indirect[XBD_RING_SIZE]; + SLIST_HEAD(,xbd_indirect) sc_indirect_head; + vmem_addr_t sc_unalign_buffer; struct xbd_req *sc_unalign_used; @@ -166,11 +177,13 @@ struct xbd_xenbus_softc { #define BLKIF_FEATURE_CACHE_FLUSH 0x1 #define BLKIF_FEATURE_BARRIER 0x2 #define BLKIF_FEATURE_PERSISTENT 0x4 +#define BLKIF_FEATURE_INDIRECT 0x8 #define BLKIF_FEATURE_BITS \ - "\20\1CACHE-FLUSH\2BARRIER\3PERSISTENT" + "\20\1CACHE-FLUSH\2BARRIER\3PERSISTENT\4INDIRECT" struct evcnt sc_cnt_map_unalign; struct evcnt sc_cnt_unalign_busy; struct evcnt sc_cnt_queue_full; + struct evcnt sc_cnt_indirect; }; #if 0 @@ -191,9 +204,12 @@ static int xbd_diskstart(device_t, stru static void xbd_iosize(device_t, int *); static void xbd_backend_changed(void *, XenbusState); static void xbd_connect(struct xbd_xenbus_softc *); +static void xbd_features(struct xbd_xenbus_softc *); static void xbd_diskstart_submit(struct xbd_xenbus_softc *, int, struct buf *bp, int, bus_dmamap_t, grant_ref_t *); +static void xbd_diskstart_submit_indirect(struct xbd_xenbus_softc *, + struct xbd_req *, struct buf *bp); static int xbd_map_align(struct xbd_xenbus_softc *, struct xbd_req *); static void xbd_unmap_align(struct xbd_xenbus_softc *, struct xbd_req *, bool); @@ -293,6 +309,8 @@ xbd_xenbus_attach(device_t parent, devic cv_init(>sc_detach_cv, "xbddetach"); cv_init(>sc_suspend_cv, "xbdsuspend"); + xbd_features(sc); + /* initialize free requests list */ SLIST_INIT(>sc_xbdreq_head); for (i = 0; i < XBD_RING_SIZE; i++) { @@ -301,6 +319,22 @@ xbd_xenbus_attach(device_t parent, devic req_next); } + if (sc->sc_features & BLKIF_FEATURE_INDIRECT) { + /* initialize indirect page list */ + for (i = 0; i < XBD_RING_SIZE; i++) { + vmem_addr_t va; + if (uvm_km_kmem_alloc(kmem_va_arena, + PAGE_SIZE, VM_SLEEP | VM_INSTANTFIT, ) != 0) { +aprint_error_dev(self, +"can't alloc indirect pages\n"); +return; + } + sc->sc_indirect[i].in_addr = (void *)va; + SLIST_INSERT_HEAD(>sc_indirect_head, + >sc_indirect[i], in_next); + } + } + sc->sc_backend_status = BLKIF_STATE_DISCONNECTED; sc->sc_shutdown = BLKIF_SHUTDOWN_REMOTE; @@ -315,6 +349,8 @@ xbd_xenbus_attach(device_t parent, devic NULL, device_xname(self), "map unaligned"); evcnt_attach_dynamic(>sc_cnt_queue_full, EVCNT_TYPE_MISC, NULL, device_xname(self), "queue full"); + evcnt_attach_dynamic(>sc_cnt_indirect,
CVS commit: src/sys/external/mit/xen-include-public/dist/xen/include/public/io
Module Name:src Committed By: jdolecek Date: Thu Apr 16 15:58:13 UTC 2020 Modified Files: src/sys/external/mit/xen-include-public/dist/xen/include/public/io: blkif.h Log Message: update padding within 'struct blkif_request_indirect' to be binary compatible with Linux/i386 - they changed padding so that there is no structure layout difference between i386 and amd64; there is no change for amd64 due to implicit padding since Linux seems to be the only xen blkback implementation supporting indirect segments, follow that rather than public xen includes; note their blkif_x86_32_request_indirect handling expect this layout, particularly padding for i386 before indirect_grefs[] To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/sys/external/mit/xen-include-public/dist/xen/include/public/io/blkif.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/external/mit/xen-include-public/dist/xen/include/public/io/blkif.h diff -u src/sys/external/mit/xen-include-public/dist/xen/include/public/io/blkif.h:1.1.1.1 src/sys/external/mit/xen-include-public/dist/xen/include/public/io/blkif.h:1.2 --- src/sys/external/mit/xen-include-public/dist/xen/include/public/io/blkif.h:1.1.1.1 Sat Feb 2 08:03:48 2019 +++ src/sys/external/mit/xen-include-public/dist/xen/include/public/io/blkif.h Thu Apr 16 15:58:13 2020 @@ -653,14 +653,20 @@ struct blkif_request_indirect { uint8_toperation;/* BLKIF_OP_INDIRECT*/ uint8_tindirect_op; /* BLKIF_OP_{READ/WRITE}*/ uint16_t nr_segments; /* number of segments */ +#ifndef __i386__ +uint32_t _pad1; +#endif uint64_t id; /* private guest value, echoed in resp */ blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */ blkif_vdev_t handle; /* same as for read/write requests */ +uint16_t _pad2; grant_ref_tindirect_grefs[BLKIF_MAX_INDIRECT_PAGES_PER_REQUEST]; -#ifdef __i386__ -uint64_t pad; /* Make it 64 byte aligned on i386 */ +#ifndef __i386__ +uint32_t _pad3;/* Make it 64 byte aligned */ +#else +uint64_t _pad3;/* Make it 64 byte aligned */ #endif -}; +} __packed; typedef struct blkif_request_indirect blkif_request_indirect_t; struct blkif_response {
CVS commit: src/external/gpl3/binutils/dist/ld/emultempl
Module Name:src Committed By: christos Date: Thu Apr 16 15:47:20 UTC 2020 Modified Files: src/external/gpl3/binutils/dist/ld/emultempl: elf.em Log Message: Restore --copy-dt-needed as default. There is too much fallout in pkgsrc mainly from -lcurses needing -lterminfo. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/gpl3/binutils/dist/ld/emultempl/elf.em Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils/dist/ld/emultempl/elf.em diff -u src/external/gpl3/binutils/dist/ld/emultempl/elf.em:1.1.1.1 src/external/gpl3/binutils/dist/ld/emultempl/elf.em:1.2 --- src/external/gpl3/binutils/dist/ld/emultempl/elf.em:1.1.1.1 Fri Apr 3 19:40:02 2020 +++ src/external/gpl3/binutils/dist/ld/emultempl/elf.em Thu Apr 16 11:47:19 2020 @@ -79,6 +79,7 @@ gld${EMULATION_NAME}_before_parse (void) { ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`); input_flags.dynamic = ${DYNAMIC_LINK-TRUE}; + input_flags.add_DT_NEEDED_for_dynamic = TRUE; config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`; config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`; link_info.check_relocs_after_open_input = TRUE;
CVS commit: [phil-wifi] src/sys/dev/usb
Module Name:src Committed By: nat Date: Thu Apr 16 15:33:08 UTC 2020 Modified Files: src/sys/dev/usb [phil-wifi]: if_urtwn.c Log Message: Use if_stat functions. To generate a diff of this commit: cvs rdiff -u -r1.59.2.9 -r1.59.2.10 src/sys/dev/usb/if_urtwn.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/usb/if_urtwn.c diff -u src/sys/dev/usb/if_urtwn.c:1.59.2.9 src/sys/dev/usb/if_urtwn.c:1.59.2.10 --- src/sys/dev/usb/if_urtwn.c:1.59.2.9 Mon Apr 13 08:04:49 2020 +++ src/sys/dev/usb/if_urtwn.c Thu Apr 16 15:33:07 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urtwn.c,v 1.59.2.9 2020/04/13 08:04:49 martin Exp $ */ +/* $NetBSD: if_urtwn.c,v 1.59.2.10 2020/04/16 15:33:07 nat Exp $ */ /* $OpenBSD: if_urtwn.c,v 1.42 2015/02/10 23:25:46 mpi Exp $ */ /*- @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.59.2.9 2020/04/13 08:04:49 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.59.2.10 2020/04/16 15:33:07 nat Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -2762,7 +2762,7 @@ urtwn_rx_frame(struct urtwn_softc *sc, u */ DPRINTFN(DBG_RX, ("%s: %s: CRC error\n", device_xname(sc->sc_dev), __func__)); - ifp->if_ierrors++; + if_statinc(ifp, if_ierrors); return; } @@ -2775,13 +2775,13 @@ urtwn_rx_frame(struct urtwn_softc *sc, u DPRINTFN(DBG_RX, ("%s: %s: packet too short %d\n", device_xname(sc->sc_dev), __func__, pktlen)); vap->iv_stats.is_rx_tooshort++; - ifp->if_ierrors++; + if_statinc(ifp,if_ierrors); return; } if (__predict_false(pktlen > MCLBYTES)) { DPRINTFN(DBG_RX, ("%s: %s: packet too big %d\n", device_xname(sc->sc_dev), __func__, pktlen)); - ifp->if_ierrors++; + if_statinc(ifp, if_ierrors); return; } @@ -2805,7 +2805,7 @@ urtwn_rx_frame(struct urtwn_softc *sc, u if (__predict_false(m == NULL)) { aprint_error_dev(sc->sc_dev, "couldn't allocate rx mbuf\n"); vap->iv_stats.is_rx_nobuf++; - ifp->if_ierrors++; + if_statinc(ifp, if_ierrors); return; } if (pktlen > (int)MHLEN) { @@ -2815,7 +2815,7 @@ urtwn_rx_frame(struct urtwn_softc *sc, u "couldn't allocate rx mbuf cluster\n"); m_freem(m); vap->iv_stats.is_rx_nobuf++; - ifp->if_ierrors++; + if_statinc(ifp, if_ierrors); return; } } @@ -3000,13 +3000,13 @@ urtwn_txeof(struct usbd_xfer *xfer, void usbd_clear_endpoint_stall_async(pipe); } printf("ERROR1\n"); - ifp->if_oerrors++; + if_statinc(ifp, if_oerrors); } splx(s); return; } - ifp->if_opackets++; + if_statinc(ifp, if_opackets); urtwn_start(ifp); splx(s); @@ -3308,7 +3308,7 @@ urtwn_start(struct ifnet *ifp) if (m->m_len < (int)sizeof(*eh) && (m = m_pullup(m, sizeof(*eh))) == NULL) { printf("ERROR6\n"); - ifp->if_oerrors++; + if_statinc(ifp, if_oerrors); continue; } eh = mtod(m, struct ether_header *); @@ -3316,7 +3316,7 @@ urtwn_start(struct ifnet *ifp) if (ni == NULL) { m_freem(m); printf("ERROR5\n"); - ifp->if_oerrors++; + if_statinc(ifp, if_oerrors); continue; } @@ -3327,7 +3327,7 @@ urtwn_start(struct ifnet *ifp) m_freem(m); ieee80211_free_node(ni); printf("ERROR3\n"); - ifp->if_oerrors++; + if_statinc(ifp, if_oerrors); continue; } m_freem(m); @@ -3352,7 +3352,7 @@ urtwn_watchdog(struct ifnet *ifp) aprint_error_dev(sc->sc_dev, "device timeout\n"); /* urtwn_init(ifp); XXX needs a process context! */ printf("ERROR2\n"); - ifp->if_oerrors++; + if_statinc(ifp, if_oerrors); return; } ifp->if_timer = 1; @@ -3449,7 +3449,7 @@ urtwn_parent(struct ieee80211com *ic) static void urtwn_scan_start(struct ieee80211com *ic) { - struct urtwn_softc *sc = ic->ic_softc; + //struct urtwn_softc *sc = ic->ic_softc; //uint32_t reg; //int s; @@ -3512,7 +3512,7 @@ urtwn_scan_start(struct ieee80211com *ic static void urtwn_scan_end(struct ieee80211com *ic) { - struct urtwn_softc *sc = ic->ic_softc; + //struct urtwn_softc *sc = ic->ic_softc; DPRINTFN(DBG_FN, ("%s: %s\n",device_xname(sc->sc_dev), __func__)); @@ -3565,9 +3565,9 @@ urtwn_transmit(struct ieee80211com *ic, IF_ENQUEUE(>sc_sendq, m); -vap->iv_ifp->if_obytes += pktlen; +if_statadd(vap->iv_ifp, if_obytes, pktlen); if (mcast) -vap->iv_ifp->if_omcasts++; +if_statinc(vap->iv_ifp, if_omcasts); if ((vap->iv_ifp->if_flags & IFF_OACTIVE) == 0) if_start_lock(vap->iv_ifp); @@ -3626,7 +3626,7 @@ urtwn_raw_xmit(struct ieee80211_node *ni error = urtwn_tx(sc, m, ni, data); if (error != 0) { printf("ERROR3\n"); - vap->iv_ifp->if_oerrors++; +if_statinc(vap->iv_ifp, if_oerrors); } else { sc->tx_timer = 5;
CVS commit: [phil-wifi] src/sys/dev/usb
Module Name:src Committed By: nat Date: Thu Apr 16 15:32:24 UTC 2020 Modified Files: src/sys/dev/usb [phil-wifi]: if_urtwnvar.h Log Message: Pull in To generate a diff of this commit: cvs rdiff -u -r1.10.16.5 -r1.10.16.6 src/sys/dev/usb/if_urtwnvar.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/usb/if_urtwnvar.h diff -u src/sys/dev/usb/if_urtwnvar.h:1.10.16.5 src/sys/dev/usb/if_urtwnvar.h:1.10.16.6 --- src/sys/dev/usb/if_urtwnvar.h:1.10.16.5 Mon Apr 13 08:04:49 2020 +++ src/sys/dev/usb/if_urtwnvar.h Thu Apr 16 15:32:24 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urtwnvar.h,v 1.10.16.5 2020/04/13 08:04:49 martin Exp $ */ +/* $NetBSD: if_urtwnvar.h,v 1.10.16.6 2020/04/16 15:32:24 nat Exp $ */ /* $OpenBSD: if_urtwnreg.h,v 1.3 2010/11/16 18:02:59 damien Exp $ */ /*- @@ -19,6 +19,8 @@ #ifndef _IF_URTWNVAR_H_ #define _IF_URTWNVAR_H_ +#include + /* * Driver definitions. */
CVS commit: [phil-wifi] src/sys/net80211
Module Name:src Committed By: nat Date: Thu Apr 16 15:30:00 UTC 2020 Modified Files: src/sys/net80211 [phil-wifi]: ieee80211.c ieee80211_netbsd.c ieee80211_netbsd.h Log Message: Use if_stat functions. To generate a diff of this commit: cvs rdiff -u -r1.56.18.8 -r1.56.18.9 src/sys/net80211/ieee80211.c cvs rdiff -u -r1.31.2.9 -r1.31.2.10 src/sys/net80211/ieee80211_netbsd.c cvs rdiff -u -r1.21.2.11 -r1.21.2.12 src/sys/net80211/ieee80211_netbsd.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/net80211/ieee80211.c diff -u src/sys/net80211/ieee80211.c:1.56.18.8 src/sys/net80211/ieee80211.c:1.56.18.9 --- src/sys/net80211/ieee80211.c:1.56.18.8 Mon Apr 13 08:05:15 2020 +++ src/sys/net80211/ieee80211.c Thu Apr 16 15:30:00 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ieee80211.c,v 1.56.18.8 2020/04/13 08:05:15 martin Exp $ */ +/* $NetBSD: ieee80211.c,v 1.56.18.9 2020/04/16 15:30:00 nat Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD @@ -30,7 +30,7 @@ #include #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: ieee80211.c,v 1.56.18.8 2020/04/13 08:05:15 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee80211.c,v 1.56.18.9 2020/04/16 15:30:00 nat Exp $"); #endif /* @@ -2016,7 +2016,13 @@ ieee80211_media_init(struct ieee80211com ifm_change_cb_t media_change, ifm_stat_cb_t media_stat) { - ieee80211_media_init_with_lock(ic, media_change, media_stat, NULL); + struct ieee80211vap *vap; + + vap = TAILQ_FIRST(>ic_vaps); + KASSERT(vap != NULL, ("media vap is null")); + + ifmedia_init_with_lock(>iv_media, 0, media_change, + media_stat, NULL); } void @@ -2030,8 +2036,8 @@ ieee80211_announce(struct ieee80211com * for (mode = IEEE80211_MODE_AUTO+1; mode < IEEE80211_MODE_11NA; mode++) { if (isclr(ic->ic_modecaps, mode)) continue; - aprint_debug("%s: %s rates: ", ifp->if_xname, - ieee80211_phymode_name[mode]); + //aprint_debug("%s: %s rates: ", ifp->if_xname, + // ieee80211_phymode_name[mode]); ic_printf(ic, "%s rates: ", ieee80211_phymode_name[mode]); rs = >ic_sup_rates[mode]; for (i = 0; i < rs->rs_nrates; i++) { Index: src/sys/net80211/ieee80211_netbsd.c diff -u src/sys/net80211/ieee80211_netbsd.c:1.31.2.9 src/sys/net80211/ieee80211_netbsd.c:1.31.2.10 --- src/sys/net80211/ieee80211_netbsd.c:1.31.2.9 Tue Nov 19 19:17:16 2019 +++ src/sys/net80211/ieee80211_netbsd.c Thu Apr 16 15:30:00 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ieee80211_netbsd.c,v 1.31.2.9 2019/11/19 19:17:16 phil Exp $ */ +/* $NetBSD: ieee80211_netbsd.c,v 1.31.2.10 2020/04/16 15:30:00 nat Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD @@ -29,7 +29,7 @@ #include #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: ieee80211_netbsd.c,v 1.31.2.9 2019/11/19 19:17:16 phil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee80211_netbsd.c,v 1.31.2.10 2020/04/16 15:30:00 nat Exp $"); #endif /* @@ -1183,45 +1183,59 @@ wlan_iflladdr(void *arg __unused, struct } #endif +int64_t +if_get_counter_default(struct ifnet * ifp, ift_counter cnt) +{ + struct if_data if_stats; + int64_t result; + + if_stats_to_if_data(ifp, _stats, false); + + result = (cnt == IFCOUNTER_OERRORS ? if_stats.ifi_oerrors : + (cnt == IFCOUNTER_IERRORS ? if_stats.ifi_ierrors : 0 )); + + return result; +} + void if_inc_counter(struct ifnet *ifp, ift_counter ifc, int64_t value) { switch (ifc) { case IFCOUNTER_IPACKETS: - ifp->if_data.ifi_ipackets += value; + if_statadd(ifp, if_ipackets, value); break; case IFCOUNTER_IERRORS: - ifp->if_data.ifi_ierrors += value; + if_statadd(ifp, if_ierrors, value); break; case IFCOUNTER_OPACKETS: - ifp->if_data.ifi_opackets += value; + if_statadd(ifp, if_opackets, value); break; case IFCOUNTER_OERRORS: - ifp->if_data.ifi_oerrors += value; + if_statadd(ifp, if_oerrors, value); break; case IFCOUNTER_COLLISIONS: - ifp->if_data.ifi_collisions += value; + if_statadd(ifp, if_collisions, value); break; case IFCOUNTER_IBYTES: - ifp->if_data.ifi_ibytes += value; + if_statadd(ifp, if_ibytes, value); break; case IFCOUNTER_OBYTES: - ifp->if_data.ifi_obytes += value; + if_statadd(ifp, if_obytes, value); break; case IFCOUNTER_IMCASTS: - ifp->if_data.ifi_imcasts += value; + if_statadd(ifp, if_imcasts, value); break; case IFCOUNTER_OMCASTS: - ifp->if_data.ifi_omcasts += value; + if_statadd(ifp, if_omcasts, value); break; case IFCOUNTER_IQDROPS: - ifp->if_data.ifi_iqdrops += value; + if_statadd(ifp, if_iqdrops, value); break; case IFCOUNTER_OQDROPS: /* ifp->if_data.ifi_oqdrops += value; No such field, just ignore it q*/ break; case IFCOUNTER_NOPROTO: - ifp->if_data.ifi_noproto += value; + if_statadd(ifp, if_noproto, value); break; default: panic("if_inc_counter: non-existant counter"); Index: src/sys/net80211/ieee80211_netbsd.h diff -u
CVS commit: src
Module Name:src Committed By: joerg Date: Thu Apr 16 14:39:58 UTC 2020 Modified Files: src/lib/libc/gen: pthread_atfork.c src/libexec/ld.elf_so: rtld.c rtld.h symbols.map Log Message: Introduce intermediate locking for fork, so that the dynamic linker is in a consistent state. This most importantly avoids races between dlopen and friends and fork, potentially resulting in dead locks in the child when it itself tries to acquire locks. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/lib/libc/gen/pthread_atfork.c cvs rdiff -u -r1.203 -r1.204 src/libexec/ld.elf_so/rtld.c cvs rdiff -u -r1.138 -r1.139 src/libexec/ld.elf_so/rtld.h cvs rdiff -u -r1.2 -r1.3 src/libexec/ld.elf_so/symbols.map Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/pthread_atfork.c diff -u src/lib/libc/gen/pthread_atfork.c:1.12 src/lib/libc/gen/pthread_atfork.c:1.13 --- src/lib/libc/gen/pthread_atfork.c:1.12 Sat Feb 1 18:14:16 2020 +++ src/lib/libc/gen/pthread_atfork.c Thu Apr 16 14:39:58 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_atfork.c,v 1.12 2020/02/01 18:14:16 kamil Exp $ */ +/* $NetBSD: pthread_atfork.c,v 1.13 2020/04/16 14:39:58 joerg Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: pthread_atfork.c,v 1.12 2020/02/01 18:14:16 kamil Exp $"); +__RCSID("$NetBSD: pthread_atfork.c,v 1.13 2020/04/16 14:39:58 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -48,6 +48,13 @@ __weak_alias(fork, _fork) #endif /* __weak_alias */ pid_t __fork(void); /* XXX */ +pid_t __atomic_fork(void) __weak; /* XXX */ + +pid_t +__atomic_fork(void) +{ + return __fork(); +} struct atfork_callback { SIMPLEQ_ENTRY(atfork_callback) next; @@ -157,7 +164,7 @@ fork(void) SIMPLEQ_FOREACH(iter, , next) (*iter->fn)(); - ret = __fork(); + ret = __atomic_fork(); if (ret != 0) { /* Index: src/libexec/ld.elf_so/rtld.c diff -u src/libexec/ld.elf_so/rtld.c:1.203 src/libexec/ld.elf_so/rtld.c:1.204 --- src/libexec/ld.elf_so/rtld.c:1.203 Wed Mar 4 01:21:17 2020 +++ src/libexec/ld.elf_so/rtld.c Thu Apr 16 14:39:58 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.c,v 1.203 2020/03/04 01:21:17 thorpej Exp $ */ +/* $NetBSD: rtld.c,v 1.204 2020/04/16 14:39:58 joerg Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include #ifndef lint -__RCSID("$NetBSD: rtld.c,v 1.203 2020/03/04 01:21:17 thorpej Exp $"); +__RCSID("$NetBSD: rtld.c,v 1.204 2020/04/16 14:39:58 joerg Exp $"); #endif /* not lint */ #include @@ -1532,6 +1532,21 @@ __dl_cxa_refcount(void *addr, ssize_t de _rtld_exclusive_exit(); } +pid_t __fork(void); + +__dso_public pid_t +__atomic_fork(void) +{ + sigset_t mask; + pid_t result; + + _rtld_exclusive_enter(); + result = __fork(); + _rtld_exclusive_exit(); + + return result; +} + /* * Error reporting function. Use it like printf. If formats the message * into a buffer, and sets things up so that the next call to dlerror() Index: src/libexec/ld.elf_so/rtld.h diff -u src/libexec/ld.elf_so/rtld.h:1.138 src/libexec/ld.elf_so/rtld.h:1.139 --- src/libexec/ld.elf_so/rtld.h:1.138 Sat Feb 29 04:24:33 2020 +++ src/libexec/ld.elf_so/rtld.h Thu Apr 16 14:39:58 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.h,v 1.138 2020/02/29 04:24:33 kamil Exp $ */ +/* $NetBSD: rtld.h,v 1.139 2020/04/16 14:39:58 joerg Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -370,6 +370,8 @@ __dso_public int dl_iterate_phdr(int (*) __dso_public void *_dlauxinfo(void) __pure; __dso_public void __dl_cxa_refcount(void *addr, ssize_t delta); +__dso_public pid_t __atomic_fork(void); + #if defined(__ARM_EABI__) && !defined(__ARM_DWARF_EH__) /* * This is used by libgcc to find the start and length of the exception table Index: src/libexec/ld.elf_so/symbols.map diff -u src/libexec/ld.elf_so/symbols.map:1.2 src/libexec/ld.elf_so/symbols.map:1.3 --- src/libexec/ld.elf_so/symbols.map:1.2 Tue Jul 11 15:21:35 2017 +++ src/libexec/ld.elf_so/symbols.map Thu Apr 16 14:39:58 2020 @@ -23,5 +23,6 @@ ___tls_get_addr; __gnu_Unwind_Find_exidx; __dl_cxa_refcount; +__atomic_fork; local: *; };
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Thu Apr 16 14:03:24 UTC 2020 Modified Files: src/doc [netbsd-9]: CHANGES-9.1 Log Message: Ticket #836 To generate a diff of this commit: cvs rdiff -u -r1.1.2.36 -r1.1.2.37 src/doc/CHANGES-9.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-9.1 diff -u src/doc/CHANGES-9.1:1.1.2.36 src/doc/CHANGES-9.1:1.1.2.37 --- src/doc/CHANGES-9.1:1.1.2.36 Wed Apr 15 14:16:27 2020 +++ src/doc/CHANGES-9.1 Thu Apr 16 14:03:24 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.1,v 1.1.2.36 2020/04/15 14:16:27 martin Exp $ +# $NetBSD: CHANGES-9.1,v 1.1.2.37 2020/04/16 14:03:24 martin Exp $ A complete list of changes from the NetBSD 9.0 release to the NetBSD 9.1 release: @@ -944,3 +944,9 @@ sys/dev/wsfb/genfb.c1.72 Get genfb's address offset correctly when the value >= 4G. [msaitoh, ticket #835] +sys/dev/pci/machfb.c1.98 + + port-sparc64/55173: cean up the video mode selection logic, + switch modes only when actually necessary. + [jdc, ticket #836] +
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Thu Apr 16 14:02:36 UTC 2020 Modified Files: src/sys/dev/pci [netbsd-9]: machfb.c Log Message: Pull up following revision(s) (requested by jdc in ticket #836): sys/dev/pci/machfb.c: revision 1.98 clean up the video mode selection logic, switch modes only when actually necessary while there make some debug output optional To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.97.4.1 src/sys/dev/pci/machfb.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/machfb.c diff -u src/sys/dev/pci/machfb.c:1.97 src/sys/dev/pci/machfb.c:1.97.4.1 --- src/sys/dev/pci/machfb.c:1.97 Tue Feb 5 06:12:39 2019 +++ src/sys/dev/pci/machfb.c Thu Apr 16 14:02:36 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: machfb.c,v 1.97 2019/02/05 06:12:39 mrg Exp $ */ +/* $NetBSD: machfb.c,v 1.97.4.1 2020/04/16 14:02:36 martin Exp $ */ /* * Copyright (c) 2002 Bang Jun-Young @@ -34,7 +34,7 @@ #include __KERNEL_RCSID(0, - "$NetBSD: machfb.c,v 1.97 2019/02/05 06:12:39 mrg Exp $"); + "$NetBSD: machfb.c,v 1.97.4.1 2020/04/16 14:02:36 martin Exp $"); #include #include @@ -68,6 +68,12 @@ __KERNEL_RCSID(0, #include "opt_machfb.h" #include "opt_glyphcache.h" +#ifdef MACHFB_DEBUG +#define DPRINTF printf +#else +#define DPRINTF while (0) printf +#endif + #define MACH64_REG_SIZE 0x800 #define MACH64_REG_OFF 0x7ff800 @@ -140,6 +146,7 @@ struct mach64_softc { int sc_edid_size; uint8_t sc_edid_data[1024]; struct edid_info sc_ei; + int sc_setmode; u_char sc_cmap_red[256]; u_char sc_cmap_green[256]; @@ -221,7 +228,9 @@ static void mach64_init(struct mach64_so static int mach64_get_memsize(struct mach64_softc *); static int mach64_get_max_ramdac(struct mach64_softc *); +#if 0 static void mach64_get_mode(struct mach64_softc *, struct videomode *); +#endif static int mach64_calc_crtcregs(struct mach64_softc *, struct mach64_crtcregs *, @@ -408,7 +417,7 @@ mach64_attach(device_t parent, device_t const char **memtype_names; struct wsemuldisplaydev_attach_args aa; long defattr; - int setmode = 0, width, height; + int width = 1024, height = 768; pcireg_t screg; uint32_t reg; const pcireg_t enables = PCI_COMMAND_MEM_ENABLE; @@ -426,6 +435,7 @@ mach64_attach(device_t parent, device_t sc->sc_iot = pa->pa_iot; sc->sc_accessops.ioctl = mach64_ioctl; sc->sc_accessops.mmap = mach64_mmap; + sc->sc_setmode = 0; pci_aprint_devinfo(pa, "Graphics processor"); #ifdef MACHFB_DEBUG @@ -498,6 +508,9 @@ mach64_attach(device_t parent, device_t prop_dictionary_get_uint32(device_properties(self), "width", ); prop_dictionary_get_uint32(device_properties(self), "height", ); + default_mode.hdisplay = width; + default_mode.vdisplay = height; + memset(>sc_ei, 0, sizeof(sc->sc_ei)); if ((edid_data = prop_dictionary_get(device_properties(self), "EDID")) != NULL) { @@ -513,7 +526,6 @@ mach64_attach(device_t parent, device_t edid_print(>sc_ei); #endif } - is_gx = 0; switch(mach64_chip_id) { case PCI_PRODUCT_ATI_MACH64_GX: @@ -561,9 +573,9 @@ mach64_attach(device_t parent, device_t aprint_debug("using clock %d\n", sc->sc_clock); sc->ref_div = regrb_pll(sc, PLL_REF_DIV); - aprint_error("ref_div: %d\n", sc->ref_div); + DPRINTF("ref_div: %d\n", sc->ref_div); sc->mclk_fb_div = regrb_pll(sc, MCLK_FB_DIV); - aprint_error("mclk_fb_div: %d\n", sc->mclk_fb_div); + DPRINTF("mclk_fb_div: %d\n", sc->mclk_fb_div); sc->mem_freq = (2 * sc->ref_freq * sc->mclk_fb_div) / (sc->ref_div * 2); sc->mclk_post_div = (sc->mclk_fb_div * 2 * sc->ref_freq) / @@ -572,7 +584,7 @@ mach64_attach(device_t parent, device_t { sc->minref = sc->ramdac_freq / 510; sc->m = sc->ref_freq / sc->minref; - aprint_error("minref: %d m: %d\n", sc->minref, sc->m); + DPRINTF("minref: %d m: %d\n", sc->minref, sc->m); } aprint_normal_dev(sc->sc_dev, "%ld KB %s %d.%d MHz, maximum RAMDAC clock %d MHz\n", @@ -604,10 +616,10 @@ mach64_attach(device_t parent, device_t aprint_debug("gen_cntl: %08x\n", regr(sc, CRTC_GEN_CNTL)); #define MODE_IS_VALID(m) ((sc->ramdac_freq >= (m)->dot_clock) && \ - ((m)->hdisplay <= 11280)) + ((m)->hdisplay <= 1280)) /* no mode setting support on ancient chips with external clocks */ - setmode = 0; + sc->sc_setmode = 0; if (!is_gx) { /* * Now pick a mode. @@ -617,7 +629,7 @@ mach64_attach(device_t parent, device_t if (MODE_IS_VALID(m)) { memcpy(_mode, m, sizeof(struct videomode)); -setmode = 1; +sc->sc_setmode = 1; } else { aprint_error_dev(sc->sc_dev, "unable to use preferred mode\n"); @@ -627,7 +639,7 @@ mach64_attach(device_t parent, device_t * if we can't use the preferred mode go look for the * best one we can support */ - if (setmode == 0) { + if (sc->sc_setmode == 0) { struct videomode *m =
CVS commit: [bouyer-xenpvh] src/sys/arch/amd64/conf
Module Name:src Committed By: bouyer Date: Thu Apr 16 10:42:26 UTC 2020 Modified Files: src/sys/arch/amd64/conf [bouyer-xenpvh]: GENERIC_XENHVM Log Message: Well, no, SVS does't quite work yet. To generate a diff of this commit: cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/amd64/conf/GENERIC_XENHVM 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/conf/GENERIC_XENHVM diff -u src/sys/arch/amd64/conf/GENERIC_XENHVM:1.1.2.2 src/sys/arch/amd64/conf/GENERIC_XENHVM:1.1.2.3 --- src/sys/arch/amd64/conf/GENERIC_XENHVM:1.1.2.2 Thu Apr 16 10:07:23 2020 +++ src/sys/arch/amd64/conf/GENERIC_XENHVM Thu Apr 16 10:42:26 2020 @@ -1,9 +1,10 @@ -# $NetBSD: GENERIC_XENHVM,v 1.1.2.2 2020/04/16 10:07:23 bouyer Exp $ +# $NetBSD: GENERIC_XENHVM,v 1.1.2.3 2020/04/16 10:42:26 bouyer Exp $ include "arch/amd64/conf/GENERIC" options XENPVHVM options XEN +no options SVS # Separate Virtual Space options MAXPHYS=32768 #xbd doesn't handle 64k transfers hypervisor* at mainbus? # Xen hypervisor #vcpu* at hypervisor? # Xen virtual CPUs
CVS commit: [bouyer-xenpvh] src/sys/arch/amd64/conf
Module Name:src Committed By: bouyer Date: Thu Apr 16 10:07:23 UTC 2020 Modified Files: src/sys/arch/amd64/conf [bouyer-xenpvh]: GENERIC_XENHVM Log Message: SVS is working with PVHVM now To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/amd64/conf/GENERIC_XENHVM 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/conf/GENERIC_XENHVM diff -u src/sys/arch/amd64/conf/GENERIC_XENHVM:1.1.2.1 src/sys/arch/amd64/conf/GENERIC_XENHVM:1.1.2.2 --- src/sys/arch/amd64/conf/GENERIC_XENHVM:1.1.2.1 Thu Apr 16 08:46:34 2020 +++ src/sys/arch/amd64/conf/GENERIC_XENHVM Thu Apr 16 10:07:23 2020 @@ -1,10 +1,9 @@ -# $NetBSD: GENERIC_XENHVM,v 1.1.2.1 2020/04/16 08:46:34 bouyer Exp $ +# $NetBSD: GENERIC_XENHVM,v 1.1.2.2 2020/04/16 10:07:23 bouyer Exp $ include "arch/amd64/conf/GENERIC" options XENPVHVM options XEN -no options SVS # Separate Virtual Space options MAXPHYS=32768 #xbd doesn't handle 64k transfers hypervisor* at mainbus? # Xen hypervisor #vcpu* at hypervisor? # Xen virtual CPUs
CVS commit: src/sys/arch/xen/xen
Module Name:src Committed By: jdolecek Date: Thu Apr 16 09:51:40 UTC 2020 Modified Files: src/sys/arch/xen/xen: xbd_xenbus.c Log Message: when checking for physio request check for B_PHYS in b_flags rather than an internal field, so this works when the original buf is wrapped by another one by e.g. dk(4) fixes misfired assert when doing newfs on a wedge, reported by Manuel Bouyer To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/sys/arch/xen/xen/xbd_xenbus.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/xen/xbd_xenbus.c diff -u src/sys/arch/xen/xen/xbd_xenbus.c:1.114 src/sys/arch/xen/xen/xbd_xenbus.c:1.115 --- src/sys/arch/xen/xen/xbd_xenbus.c:1.114 Wed Apr 15 10:16:47 2020 +++ src/sys/arch/xen/xen/xbd_xenbus.c Thu Apr 16 09:51:40 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: xbd_xenbus.c,v 1.114 2020/04/15 10:16:47 jdolecek Exp $ */ +/* $NetBSD: xbd_xenbus.c,v 1.115 2020/04/16 09:51:40 jdolecek Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.114 2020/04/15 10:16:47 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.115 2020/04/16 09:51:40 jdolecek Exp $"); #include "opt_xen.h" @@ -1207,8 +1207,11 @@ xbd_diskstart_submit(struct xbd_xenbus_s static int xbd_map_align(struct xbd_xenbus_softc *sc, struct xbd_req *req) { - /* Only can get here if this is physio() request */ - KASSERT(req->req_bp->b_saveaddr != NULL); + /* + * Only can get here if this is physio() request, block I/O + * uses DEV_BSIZE-aligned buffers. + */ + KASSERT((req->req_bp->b_flags & B_PHYS) != 0); sc->sc_cnt_map_unalign.ev_count++;
CVS commit: src/sys/arch/hppa
Module Name:src Committed By: skrll Date: Thu Apr 16 09:51:57 UTC 2020 Modified Files: src/sys/arch/hppa/hppa: pmap.c src/sys/arch/hppa/include: types.h Log Message: To allow concurrent page faults on the same set of pages lock the PV lists. From ad@ and fixed up by me. Remove __HAVE_UNLOCKED_PMAP To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/arch/hppa/hppa/pmap.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/hppa/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/hppa/hppa/pmap.c diff -u src/sys/arch/hppa/hppa/pmap.c:1.110 src/sys/arch/hppa/hppa/pmap.c:1.111 --- src/sys/arch/hppa/hppa/pmap.c:1.110 Thu Apr 16 05:22:59 2020 +++ src/sys/arch/hppa/hppa/pmap.c Thu Apr 16 09:51:56 2020 @@ -1,7 +1,7 @@ -/* $NetBSD: pmap.c,v 1.110 2020/04/16 05:22:59 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.111 2020/04/16 09:51:56 skrll Exp $ */ /*- - * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. + * Copyright (c) 2001, 2002, 2020 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -65,12 +65,14 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.110 2020/04/16 05:22:59 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.111 2020/04/16 09:51:56 skrll Exp $"); #include "opt_cputype.h" #include +#include #include +#include #include #include #include @@ -108,6 +110,14 @@ bool pmap_initialized = false; static kmutex_t pmaps_lock; +static union pmap_pv_locks { + kmutex_t lock; + char padding[COHERENCY_UNIT]; +} pmap_pv_locks[64] __aligned(COHERENCY_UNIT); + +#define PMAP_PV_LOCK(md) \ +((uintptr_t)(md) >> 7 & (__arraycount(pmap_pv_locks) - 1)) + u_int hppa_prot[8]; u_int sid_counter; @@ -140,6 +150,10 @@ static const struct uvm_pagerops pmap_pa struct vm_page *pmap_pagealloc(struct uvm_object *, voff_t); void pmap_pagefree(struct vm_page *); +static inline void pmap_lock(struct pmap *); +static inline void pmap_unlock(struct pmap *); +static inline bool pmap_trylock(struct pmap *); + static inline void pmap_sdir_set(pa_space_t, volatile uint32_t *); static inline uint32_t *pmap_sdir_get(pa_space_t); @@ -165,6 +179,9 @@ static inline void pmap_pv_enter(struct vaddr_t , struct vm_page *, u_int); static inline struct pv_entry *pmap_pv_remove(struct vm_page *, pmap_t, vaddr_t); +static inline void pmap_pv_lock(const struct vm_page_md *md); +static inline void pmap_pv_unlock(const struct vm_page_md *md); +static inline bool pmap_pv_locked(const struct vm_page_md *md); static inline void pmap_flush_page(struct vm_page *, bool); static int pmap_check_alias(struct vm_page *, vaddr_t, pt_entry_t); @@ -195,17 +212,47 @@ void pmap_dump_pv(paddr_t); #define pmap_pvh_attrs(a) \ (((a) & (PVF_MOD|PVF_REF)) ^ PVF_REF) -#define PMAP_LOCK(pm) \ - do { \ - if ((pm) != pmap_kernel()) \ - rw_enter((pm)->pm_lock, RW_WRITER); \ - } while (/*CONSTCOND*/0) - -#define PMAP_UNLOCK(pm) \ - do { \ - if ((pm) != pmap_kernel()) \ - rw_exit((pm)->pm_lock); \ - } while (/*CONSTCOND*/0) +static inline void +pmap_lock(struct pmap *pm) +{ + + rw_enter(pm->pm_lock, RW_WRITER); +} + +static inline void +pmap_unlock(struct pmap *pm) +{ + + rw_exit(pm->pm_lock); +} + +static inline bool +pmap_trylock(struct pmap *pm) +{ + + return rw_tryenter(pm->pm_lock, RW_WRITER); +} + +static inline void +pmap_pv_lock(const struct vm_page_md *md) +{ + + mutex_enter(_pv_locks[PMAP_PV_LOCK(md)].lock); +} + +static inline void +pmap_pv_unlock(const struct vm_page_md *md) +{ + + mutex_exit(_pv_locks[PMAP_PV_LOCK(md)].lock); +} + +static inline bool +pmap_pv_locked(const struct vm_page_md *md) +{ + + return mutex_owned(_pv_locks[PMAP_PV_LOCK(md)].lock); +} struct vm_page * pmap_pagealloc(struct uvm_object *obj, voff_t off) @@ -304,6 +351,7 @@ pmap_pde_alloc(pmap_t pm, vaddr_t va, st UVMHIST_CALLARGS(maphist, "pm %#jx va %#jx pdep %#jx", (uintptr_t)pm, va, (uintptr_t)pdep, 0); + KASSERT(pm != pmap_kernel()); KASSERT(rw_write_held(pm->pm_lock)); @@ -559,7 +607,7 @@ pmap_pv_enter(struct vm_page *pg, struct UVMHIST_LOG(maphist, "...pdep %#jx flags %#jx", (uintptr_t)pdep, flags, 0, 0); - KASSERT(pm == pmap_kernel() || uvm_page_owner_locked_p(pg, true)); + KASSERT(pmap_pv_locked(md)); pve->pv_pmap = pm; pve->pv_va = va | flags; @@ -578,7 +626,7 @@ pmap_pv_remove(struct vm_page *pg, pmap_ struct vm_page_md * const md = VM_PAGE_TO_MD(pg); struct pv_entry **pve, *pv; - KASSERT(pmap == pmap_kernel() || uvm_page_owner_locked_p(pg, true)); + KASSERT(pmap_pv_locked(md)); for (pv = *(pve = >pvh_list); pv; pv = *(pve = &(*pve)->pv_next)) { @@ -967,6 +1015,7 @@ pmap_init(void) { extern void gateway_page(void); volatile pt_entry_t *pde; + int i; UVMHIST_FUNC(__func__)
CVS commit: [bouyer-xenpvh] src/sys/arch
Module Name:src Committed By: bouyer Date: Thu Apr 16 09:45:57 UTC 2020 Modified Files: src/sys/arch/amd64/amd64 [bouyer-xenpvh]: locore.S machdep.c src/sys/arch/x86/include [bouyer-xenpvh]: pci_machdep_common.h src/sys/arch/x86/x86 [bouyer-xenpvh]: consinit.c cpu.c cpu_ucode_amd.c identcpu.c intr.c pmap.c x86_autoconf.c x86_machdep.c Log Message: More #ifndef XEN -> #ifndef XENPV To generate a diff of this commit: cvs rdiff -u -r1.200.4.1 -r1.200.4.2 src/sys/arch/amd64/amd64/locore.S cvs rdiff -u -r1.346.4.1 -r1.346.4.2 src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.23 -r1.23.28.1 src/sys/arch/x86/include/pci_machdep_common.h cvs rdiff -u -r1.31 -r1.31.8.1 src/sys/arch/x86/x86/consinit.c cvs rdiff -u -r1.181.4.1 -r1.181.4.2 src/sys/arch/x86/x86/cpu.c cvs rdiff -u -r1.10.6.1 -r1.10.6.2 src/sys/arch/x86/x86/cpu_ucode_amd.c cvs rdiff -u -r1.102.2.1 -r1.102.2.2 src/sys/arch/x86/x86/identcpu.c cvs rdiff -u -r1.150.6.2 -r1.150.6.3 src/sys/arch/x86/x86/intr.c cvs rdiff -u -r1.381 -r1.381.2.1 src/sys/arch/x86/x86/pmap.c cvs rdiff -u -r1.79 -r1.79.6.1 src/sys/arch/x86/x86/x86_autoconf.c cvs rdiff -u -r1.137.2.3 -r1.137.2.4 src/sys/arch/x86/x86/x86_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/locore.S diff -u src/sys/arch/amd64/amd64/locore.S:1.200.4.1 src/sys/arch/amd64/amd64/locore.S:1.200.4.2 --- src/sys/arch/amd64/amd64/locore.S:1.200.4.1 Wed Apr 8 17:59:16 2020 +++ src/sys/arch/amd64/amd64/locore.S Thu Apr 16 09:45:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.200.4.1 2020/04/08 17:59:16 bouyer Exp $ */ +/* $NetBSD: locore.S,v 1.200.4.2 2020/04/16 09:45:56 bouyer Exp $ */ /* * Copyright-o-rama! @@ -1110,7 +1110,7 @@ ENTRY(cpu_switchto) .Lskip_svs: #endif -#ifndef XEN +#ifndef XENPV movq %r13,%rdi movq %r12,%rsi callq _C_LABEL(speculation_barrier) Index: src/sys/arch/amd64/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.346.4.1 src/sys/arch/amd64/amd64/machdep.c:1.346.4.2 --- src/sys/arch/amd64/amd64/machdep.c:1.346.4.1 Thu Apr 9 16:12:50 2020 +++ src/sys/arch/amd64/amd64/machdep.c Thu Apr 16 09:45:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.346.4.1 2020/04/09 16:12:50 bouyer Exp $ */ +/* $NetBSD: machdep.c,v 1.346.4.2 2020/04/16 09:45:56 bouyer Exp $ */ /* * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011 @@ -110,7 +110,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.346.4.1 2020/04/09 16:12:50 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.346.4.2 2020/04/16 09:45:56 bouyer Exp $"); #include "opt_modular.h" #include "opt_user_ldt.h" @@ -1696,7 +1696,7 @@ init_x86_64(paddr_t first_avail) svs_init(); #endif cpu_init_msrs(_info_primary, true); -#ifndef XEN +#ifndef XENPV cpu_speculation_init(_info_primary); #endif Index: src/sys/arch/x86/include/pci_machdep_common.h diff -u src/sys/arch/x86/include/pci_machdep_common.h:1.23 src/sys/arch/x86/include/pci_machdep_common.h:1.23.28.1 --- src/sys/arch/x86/include/pci_machdep_common.h:1.23 Mon Jul 11 06:14:51 2016 +++ src/sys/arch/x86/include/pci_machdep_common.h Thu Apr 16 09:45:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep_common.h,v 1.23 2016/07/11 06:14:51 knakahara Exp $ */ +/* $NetBSD: pci_machdep_common.h,v 1.23.28.1 2020/04/16 09:45:56 bouyer Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -37,7 +37,7 @@ * Machine-specific definitions for PCI autoconfiguration. */ #define __HAVE_PCIIDE_MACHDEP_COMPAT_INTR_ESTABLISH -#ifndef XEN +#ifndef XENPV #define __HAVE_PCIIDE_MACHDEP_COMPAT_INTR_DISESTABLISH #endif Index: src/sys/arch/x86/x86/consinit.c diff -u src/sys/arch/x86/x86/consinit.c:1.31 src/sys/arch/x86/x86/consinit.c:1.31.8.1 --- src/sys/arch/x86/x86/consinit.c:1.31 Fri May 31 03:10:31 2019 +++ src/sys/arch/x86/x86/consinit.c Thu Apr 16 09:45:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: consinit.c,v 1.31 2019/05/31 03:10:31 nonaka Exp $ */ +/* $NetBSD: consinit.c,v 1.31.8.1 2020/04/16 09:45:56 bouyer Exp $ */ /* * Copyright (c) 1998 @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.31 2019/05/31 03:10:31 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.31.8.1 2020/04/16 09:45:56 bouyer Exp $"); #include "opt_kgdb.h" #include "opt_puc.h" @@ -91,7 +91,7 @@ __KERNEL_RCSID(0, "$NetBSD: consinit.c,v #include #endif -#ifndef XEN +#ifndef XENPV #include "hvkbd.h" #if NHVKBD > 0 #include Index: src/sys/arch/x86/x86/cpu.c diff -u src/sys/arch/x86/x86/cpu.c:1.181.4.1 src/sys/arch/x86/x86/cpu.c:1.181.4.2 --- src/sys/arch/x86/x86/cpu.c:1.181.4.1 Fri Apr 10 14:37:54 2020 +++ src/sys/arch/x86/x86/cpu.c Thu Apr 16 09:45:56 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.181.4.1 2020/04/10 14:37:54 bouyer Exp $ */ +/* $NetBSD: cpu.c,v 1.181.4.2 2020/04/16 09:45:56 bouyer Exp $ */ /*
CVS commit: src/sys/arch/hppa
Module Name:src Committed By: skrll Date: Thu Apr 16 09:28:52 UTC 2020 Modified Files: src/sys/arch/hppa/hppa: hppa_machdep.c src/sys/arch/hppa/include: cpu.h Log Message: Fix cur{lwp,cpu} and other bits for MODULES To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/hppa/hppa/hppa_machdep.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hppa/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/hppa_machdep.c diff -u src/sys/arch/hppa/hppa/hppa_machdep.c:1.30 src/sys/arch/hppa/hppa/hppa_machdep.c:1.31 --- src/sys/arch/hppa/hppa/hppa_machdep.c:1.30 Sat Nov 23 19:40:35 2019 +++ src/sys/arch/hppa/hppa/hppa_machdep.c Thu Apr 16 09:28:52 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: hppa_machdep.c,v 1.30 2019/11/23 19:40:35 ad Exp $ */ +/* $NetBSD: hppa_machdep.c,v 1.31 2020/04/16 09:28:52 skrll Exp $ */ /*- * Copyright (c) 1997, 2019 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hppa_machdep.c,v 1.30 2019/11/23 19:40:35 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hppa_machdep.c,v 1.31 2020/04/16 09:28:52 skrll Exp $"); #include #include @@ -303,3 +303,18 @@ cpu_need_resched(struct cpu_info *ci, st setsoftast(l); } } + +#ifdef MODULAR +struct lwp * +hppa_curlwp(void) +{ + return curlwp; +} + +struct cpu_info * +hppa_curcpu(void) +{ + return curcpu(); +} +#endif + Index: src/sys/arch/hppa/include/cpu.h diff -u src/sys/arch/hppa/include/cpu.h:1.9 src/sys/arch/hppa/include/cpu.h:1.10 --- src/sys/arch/hppa/include/cpu.h:1.9 Thu Dec 5 08:00:05 2019 +++ src/sys/arch/hppa/include/cpu.h Thu Apr 16 09:28:52 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.9 2019/12/05 08:00:05 skrll Exp $ */ +/* $NetBSD: cpu.h,v 1.10 2020/04/16 09:28:52 skrll Exp $ */ /* $OpenBSD: cpu.h,v 1.55 2008/07/23 17:39:35 kettenis Exp $ */ @@ -316,12 +316,20 @@ struct cpu_info { void cpu_proc_fork(struct proc *, struct proc *); -#ifdef MULTIPROCESSOR +struct lwp *hppa_curlwp(void); +struct cpu_info *hppa_curcpu(void); + +#if defined(_MODULE) +#define curcpu() hppa_curcpu() +#define curlwphppa_curlwp() +#endif +#if defined(MULTIPROCESSOR) || defined(_MODULE) /* Number of CPUs in the system */ extern int hppa_ncpu; #define HPPA_MAXCPUS 4 + #define cpu_number() (curcpu()->ci_cpuid) #define CPU_IS_PRIMARY(ci) ((ci)->ci_cpuid == 0) @@ -330,8 +338,9 @@ extern int hppa_ncpu; void cpu_boot_secondary_processors(void); +#if !defined(_MODULE) static __inline struct cpu_info * -hppa_curcpu(void) +_hppa_curcpu(void) { struct cpu_info *ci; @@ -340,7 +349,8 @@ hppa_curcpu(void) return ci; } -#define curcpu() hppa_curcpu() +#define curcpu() _hppa_curcpu() +#endif #else /* MULTIPROCESSOR */ @@ -349,7 +359,7 @@ hppa_curcpu(void) #define cpu_number() 0 static __inline struct lwp * -hppa_curlwp(void) +_hppa_curlwp(void) { struct lwp *l; @@ -358,7 +368,7 @@ hppa_curlwp(void) return l; } -#define curlwphppa_curlwp() +#define curlwp_hppa_curlwp() #endif /* MULTIPROCESSOR */
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: skrll Date: Thu Apr 16 08:59:16 UTC 2020 Modified Files: src/sys/arch/aarch64/aarch64: vectors.S Log Message: Shave off 3 instructions per trap To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/aarch64/aarch64/vectors.S 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/vectors.S diff -u src/sys/arch/aarch64/aarch64/vectors.S:1.14 src/sys/arch/aarch64/aarch64/vectors.S:1.15 --- src/sys/arch/aarch64/aarch64/vectors.S:1.14 Mon Apr 13 05:40:25 2020 +++ src/sys/arch/aarch64/aarch64/vectors.S Thu Apr 16 08:59:16 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: vectors.S,v 1.14 2020/04/13 05:40:25 maxv Exp $ */ +/* $NetBSD: vectors.S,v 1.15 2020/04/16 08:59:16 skrll Exp $ */ #include #include "assym.h" @@ -23,9 +23,10 @@ * Template for the handler functions. */ .macro vector_func, func, el, label, tpidr -ENTRY_NBTI(\func) .align 7 /* cacheline-aligned */ +ENTRY_NBTI(\func) + .if \el == 1 /* need to allocate stack on el1 */ sub sp, sp, #TRAP_FRAMESIZE
CVS commit: [bouyer-xenpvh] src/sys/arch
Module Name:src Committed By: bouyer Date: Thu Apr 16 08:46:36 UTC 2020 Modified Files: src/sys/arch/amd64/amd64 [bouyer-xenpvh]: vector.S src/sys/arch/amd64/conf [bouyer-xenpvh]: Makefile.amd64 XEN3_DOM0 files.amd64 std.amd64 std.xen src/sys/arch/i386/conf [bouyer-xenpvh]: Makefile.i386 XEN3PAE_DOM0 files.i386 std.i386 src/sys/arch/i386/i386 [bouyer-xenpvh]: machdep.c vector.S src/sys/arch/x86/conf [bouyer-xenpvh]: files.x86 src/sys/arch/x86/include [bouyer-xenpvh]: intr.h src/sys/arch/x86/x86 [bouyer-xenpvh]: cpu_ucode.c cpu_ucode_amd.c cpu_ucode_intel.c lapic.c mainbus.c src/sys/arch/xen/conf [bouyer-xenpvh]: Makefile.xen files.xen std.xen src/sys/arch/xen/include [bouyer-xenpvh]: hypervisor.h intr.h xenpmap.h src/sys/arch/xen/x86 [bouyer-xenpvh]: hypervisor_machdep.c xen_intr.c xen_ipi.c xen_mainbus.c src/sys/arch/xen/xen [bouyer-xenpvh]: evtchn.c if_xennet_xenbus.c xbd_xenbus.c xen_machdep.c xencons.c src/sys/arch/xen/xenbus [bouyer-xenpvh]: xenbus_comms.c xenbus_dev.c Added Files: src/sys/arch/amd64/conf [bouyer-xenpvh]: GENERIC_XENHVM src/sys/arch/amd64/include/xen [bouyer-xenpvh]: hypercalls.h src/sys/arch/i386/conf [bouyer-xenpvh]: GENERIC_XENHVM src/sys/arch/i386/include/xen [bouyer-xenpvh]: hypercalls.h src/sys/arch/xen/conf [bouyer-xenpvh]: files.xen.pv Removed Files: src/sys/arch/xen/include/amd64 [bouyer-xenpvh]: hypercalls.h src/sys/arch/xen/include/i386 [bouyer-xenpvh]: hypercalls.h Log Message: Reorganise sources to make it possible to include Xen PVHVM support in native kernels. Among others: - move xen/include/amd64/hypercall.h to amd64/include/xen and xen/include/i386/hypercall.h to i386/include/xen - exclude some native files from the build for xenpv - add xen to "machine" config statement for amd64 and i386 - split arch/xen/conf/files.xen to arch/xen/conf/files.xen (for pv drivers) and arch/xen/conf/files.xen.pv (for full pv support) - add GENERIC_XENHVM kernel config which includes GENERIC and add Xen PV drivers. To generate a diff of this commit: cvs rdiff -u -r1.73.6.3 -r1.73.6.4 src/sys/arch/amd64/amd64/vector.S cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/amd64/conf/GENERIC_XENHVM cvs rdiff -u -r1.82 -r1.82.2.1 src/sys/arch/amd64/conf/Makefile.amd64 cvs rdiff -u -r1.175.4.1 -r1.175.4.2 src/sys/arch/amd64/conf/XEN3_DOM0 cvs rdiff -u -r1.115 -r1.115.4.1 src/sys/arch/amd64/conf/files.amd64 cvs rdiff -u -r1.11 -r1.11.26.1 src/sys/arch/amd64/conf/std.amd64 cvs rdiff -u -r1.11 -r1.11.10.1 src/sys/arch/amd64/conf/std.xen cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/amd64/include/xen/hypercalls.h cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/i386/conf/GENERIC_XENHVM cvs rdiff -u -r1.194 -r1.194.10.1 src/sys/arch/i386/conf/Makefile.i386 cvs rdiff -u -r1.21.2.1 -r1.21.2.2 src/sys/arch/i386/conf/XEN3PAE_DOM0 cvs rdiff -u -r1.401 -r1.401.6.1 src/sys/arch/i386/conf/files.i386 cvs rdiff -u -r1.35 -r1.35.26.1 src/sys/arch/i386/conf/std.i386 cvs rdiff -u -r1.825.4.1 -r1.825.4.2 src/sys/arch/i386/i386/machdep.c cvs rdiff -u -r1.85.6.4 -r1.85.6.5 src/sys/arch/i386/i386/vector.S cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/i386/include/xen/hypercalls.h cvs rdiff -u -r1.107.10.1 -r1.107.10.2 src/sys/arch/x86/conf/files.x86 cvs rdiff -u -r1.61.6.2 -r1.61.6.3 src/sys/arch/x86/include/intr.h cvs rdiff -u -r1.12 -r1.12.10.1 src/sys/arch/x86/x86/cpu_ucode.c cvs rdiff -u -r1.10 -r1.10.6.1 src/sys/arch/x86/x86/cpu_ucode_amd.c cvs rdiff -u -r1.17 -r1.17.8.1 src/sys/arch/x86/x86/cpu_ucode_intel.c cvs rdiff -u -r1.76.6.1 -r1.76.6.2 src/sys/arch/x86/x86/lapic.c cvs rdiff -u -r1.3.12.1 -r1.3.12.2 src/sys/arch/x86/x86/mainbus.c cvs rdiff -u -r1.48 -r1.48.10.1 src/sys/arch/xen/conf/Makefile.xen cvs rdiff -u -r1.180.2.2 -r1.180.2.3 src/sys/arch/xen/conf/files.xen cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/xen/conf/files.xen.pv cvs rdiff -u -r1.10 -r1.10.10.1 src/sys/arch/xen/conf/std.xen cvs rdiff -u -r1.49.10.1 -r1.49.10.2 src/sys/arch/xen/include/hypervisor.h cvs rdiff -u -r1.53.6.1 -r1.53.6.2 src/sys/arch/xen/include/intr.h cvs rdiff -u -r1.42 -r1.42.6.1 src/sys/arch/xen/include/xenpmap.h cvs rdiff -u -r1.12 -r0 src/sys/arch/xen/include/amd64/hypercalls.h cvs rdiff -u -r1.19 -r0 src/sys/arch/xen/include/i386/hypercalls.h cvs rdiff -u -r1.36.8.1 -r1.36.8.2 src/sys/arch/xen/x86/hypervisor_machdep.c cvs rdiff -u -r1.21.2.4 -r1.21.2.5 src/sys/arch/xen/x86/xen_intr.c cvs rdiff -u -r1.35.6.2 -r1.35.6.3 src/sys/arch/xen/x86/xen_ipi.c cvs rdiff -u -r1.6 -r1.6.12.1 src/sys/arch/xen/x86/xen_mainbus.c cvs rdiff -u -r1.88.2.3 -r1.88.2.4 src/sys/arch/xen/xen/evtchn.c cvs rdiff -u -r1.109 -r1.109.2.1 src/sys/arch/xen/xen/if_xennet_xenbus.c cvs rdiff -u -r1.97 -r1.97.2.1 src/sys/arch/xen/xen/xbd_xenbus.c cvs rdiff -u -r1.22 -r1.22.10.1 src/sys/arch/xen/xen/xen_machdep.c cvs rdiff -u -r1.48 -r1.48.10.1
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: ryo Date: Thu Apr 16 08:03:30 UTC 2020 Modified Files: src/sys/arch/aarch64/aarch64: db_machdep.c Log Message: add the case of kdb_trap(-1) called from pic_ipi_ddb(). it depended on the update timing of 'db_recover'. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/aarch64/aarch64/db_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/aarch64/aarch64/db_machdep.c diff -u src/sys/arch/aarch64/aarch64/db_machdep.c:1.20 src/sys/arch/aarch64/aarch64/db_machdep.c:1.21 --- src/sys/arch/aarch64/aarch64/db_machdep.c:1.20 Sat Feb 29 21:30:19 2020 +++ src/sys/arch/aarch64/aarch64/db_machdep.c Thu Apr 16 08:03:30 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: db_machdep.c,v 1.20 2020/02/29 21:30:19 ryo Exp $ */ +/* $NetBSD: db_machdep.c,v 1.21 2020/04/16 08:03:30 ryo Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.20 2020/02/29 21:30:19 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.21 2020/04/16 08:03:30 ryo Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd32.h" @@ -936,6 +936,7 @@ kdb_trap(int type, struct trapframe *tf) case DB_TRAP_BKPT_INSN: case DB_TRAP_WATCHPOINT: case DB_TRAP_SW_STEP: + case -1: /* from pic_ipi_ddb() */ break; default: if (db_recover != 0) {
CVS commit: src/usr.sbin/rtsold
Module Name:src Committed By: wiz Date: Thu Apr 16 07:23:59 UTC 2020 Modified Files: src/usr.sbin/rtsold: rtsold.8 Log Message: Sort SEE ALSO. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/usr.sbin/rtsold/rtsold.8 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/rtsold/rtsold.8 diff -u src/usr.sbin/rtsold/rtsold.8:1.40 src/usr.sbin/rtsold/rtsold.8:1.41 --- src/usr.sbin/rtsold/rtsold.8:1.40 Wed Apr 15 20:31:58 2020 +++ src/usr.sbin/rtsold/rtsold.8 Thu Apr 16 07:23:58 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: rtsold.8,v 1.40 2020/04/15 20:31:58 kim Exp $ +.\" $NetBSD: rtsold.8,v 1.41 2020/04/16 07:23:58 wiz Exp $ .\" $KAME: rtsold.8,v 1.17 2001/07/09 22:30:37 itojun Exp $ .\" .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -64,5 +64,5 @@ keyword to invoke to send a router solicitation message, without running it as daemon. .\" .Sh SEE ALSO -.Xr dhcpcd 8 , -.Xr ifconfig.if 5 +.Xr ifconfig.if 5 , +.Xr dhcpcd 8