CVS commit: src/sys/dev/dm
Module Name:src Committed By: andvar Date: Thu Oct 13 06:10:48 UTC 2022 Modified Files: src/sys/dev/dm: dm_ioctl.c Log Message: s/exaple/example/ To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/dev/dm/dm_ioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/dm/dm_ioctl.c diff -u src/sys/dev/dm/dm_ioctl.c:1.55 src/sys/dev/dm/dm_ioctl.c:1.56 --- src/sys/dev/dm/dm_ioctl.c:1.55 Sat Aug 21 22:23:33 2021 +++ src/sys/dev/dm/dm_ioctl.c Thu Oct 13 06:10:48 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: dm_ioctl.c,v 1.55 2021/08/21 22:23:33 andvar Exp $ */ +/* $NetBSD: dm_ioctl.c,v 1.56 2022/10/13 06:10:48 andvar Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: dm_ioctl.c,v 1.55 2021/08/21 22:23:33 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dm_ioctl.c,v 1.56 2022/10/13 06:10:48 andvar Exp $"); /* * Locking is used to synchronise between ioctl calls and between dm_table's @@ -74,7 +74,7 @@ __KERNEL_RCSID(0, "$NetBSD: dm_ioctl.c,v * * Example: dm_table_get_entry * dm_table_destroy/dm_table_switch_tables - * This exaple will lead to deadlock situation because after dm_table_get_entry + * This example will lead to deadlock situation because after dm_table_get_entry * table reference counter is != 0 and dm_table_destroy have to wait on cv until * reference counter is 0. *
CVS commit: src/sys/dev/dm
Module Name:src Committed By: andvar Date: Thu Oct 13 06:10:48 UTC 2022 Modified Files: src/sys/dev/dm: dm_ioctl.c Log Message: s/exaple/example/ To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/dev/dm/dm_ioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: andvar Date: Wed Oct 12 20:50:43 UTC 2022 Modified Files: src/sys/arch/powerpc/powerpc: ofw_machdep.c src/sys/compat/ultrix: ultrix_pathname.c src/sys/dev/ic: nvmereg.h Log Message: fix few typos in comments. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/powerpc/powerpc/ofw_machdep.c cvs rdiff -u -r1.39 -r1.40 src/sys/compat/ultrix/ultrix_pathname.c cvs rdiff -u -r1.18 -r1.19 src/sys/dev/ic/nvmereg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: andvar Date: Wed Oct 12 20:50:43 UTC 2022 Modified Files: src/sys/arch/powerpc/powerpc: ofw_machdep.c src/sys/compat/ultrix: ultrix_pathname.c src/sys/dev/ic: nvmereg.h Log Message: fix few typos in comments. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/powerpc/powerpc/ofw_machdep.c cvs rdiff -u -r1.39 -r1.40 src/sys/compat/ultrix/ultrix_pathname.c cvs rdiff -u -r1.18 -r1.19 src/sys/dev/ic/nvmereg.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/powerpc/ofw_machdep.c diff -u src/sys/arch/powerpc/powerpc/ofw_machdep.c:1.30 src/sys/arch/powerpc/powerpc/ofw_machdep.c:1.31 --- src/sys/arch/powerpc/powerpc/ofw_machdep.c:1.30 Tue Mar 2 02:28:45 2021 +++ src/sys/arch/powerpc/powerpc/ofw_machdep.c Wed Oct 12 20:50:43 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ofw_machdep.c,v 1.30 2021/03/02 02:28:45 thorpej Exp $ */ +/* $NetBSD: ofw_machdep.c,v 1.31 2022/10/12 20:50:43 andvar Exp $ */ /*- * Copyright (c) 2007, 2021 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.30 2021/03/02 02:28:45 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.31 2022/10/12 20:50:43 andvar Exp $"); #include #include @@ -471,7 +471,7 @@ ofw_bootstrap(void) aprint_normal("OpenFirmware running in %s-mode\n", ofw_real_mode ? "real" : "virtual"); - /* Get #address-cells and #size-cells to fething memory info. */ + /* Get #address-cells and #size-cells to fetching memory info. */ if (OF_getprop(ofw_root, "#address-cells", &ofw_address_cells, sizeof(ofw_address_cells)) <= 0) ofw_address_cells = 1; Index: src/sys/compat/ultrix/ultrix_pathname.c diff -u src/sys/compat/ultrix/ultrix_pathname.c:1.39 src/sys/compat/ultrix/ultrix_pathname.c:1.40 --- src/sys/compat/ultrix/ultrix_pathname.c:1.39 Fri Sep 5 09:21:55 2014 +++ src/sys/compat/ultrix/ultrix_pathname.c Wed Oct 12 20:50:43 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ultrix_pathname.c,v 1.39 2014/09/05 09:21:55 matt Exp $ */ +/* $NetBSD: ultrix_pathname.c,v 1.40 2022/10/12 20:50:43 andvar Exp $ */ /* * Copyright (c) 1992, 1993 @@ -47,19 +47,19 @@ /* * Ultrix emulation filesystem-namespace compatibility module. * - * Ultrix system calls that examine the filesysten namespace + * Ultrix system calls that examine the filesystem namespace * are implemented here. Each system call has a wrapper that * first checks if the given file exists at a special `emulation' - * pathname: the given path, prefixex with '/emul/ultrix', and - * if that pathname exists, it is used instead of the providd pathname. + * pathname: the given path, prefixed with '/emul/ultrix', and + * if that pathname exists, it is used instead of the provided pathname. * * Used to locate OS-specific files (shared libraries, config files, * etc) used by emul processes at their `normal' pathnames, without - * polluting, or conflicting with, the native filesysten namespace. + * polluting, or conflicting with, the native filesystem namespace. */ #include -__KERNEL_RCSID(0, "$NetBSD: ultrix_pathname.c,v 1.39 2014/09/05 09:21:55 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ultrix_pathname.c,v 1.40 2022/10/12 20:50:43 andvar Exp $"); #include #include Index: src/sys/dev/ic/nvmereg.h diff -u src/sys/dev/ic/nvmereg.h:1.18 src/sys/dev/ic/nvmereg.h:1.19 --- src/sys/dev/ic/nvmereg.h:1.18 Mon Aug 1 07:34:28 2022 +++ src/sys/dev/ic/nvmereg.h Wed Oct 12 20:50:43 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: nvmereg.h,v 1.18 2022/08/01 07:34:28 mlelstv Exp $ */ +/* $NetBSD: nvmereg.h,v 1.19 2022/10/12 20:50:43 andvar Exp $ */ /* $OpenBSD: nvmereg.h,v 1.10 2016/04/14 11:18:32 dlg Exp $ */ /* @@ -214,7 +214,7 @@ struct nvme_sqe_io { #define NVM_SQE_IO_FREQ_FRR_FRW 0x5 /* Freq. read and writes */ #define NVM_SQE_IO_FREQ_ONCE 0x6 /* One time i/o operation */ /* Extra Access Frequency bits for read operations */ -#define NVM_SQE_IO_FREQ_SPEC 0x7 /* Speculative read - prefech */ +#define NVM_SQE_IO_FREQ_SPEC 0x7 /* Speculative read - prefetch */ #define NVM_SQE_IO_FREQ_OVERWRITE 0x8 /* Will be overwritten soon */ uint8_t _reserved2[3]; @@ -320,8 +320,8 @@ NVME_CTASSERT(sizeof(struct nvme_cqe) == #define NVM_ADMIN_DEV_SELFTEST 0x14 /* Device Self Test */ #define NVM_ADMIN_NS_ATTACHMENT 0x15 /* Namespace Attachment */ #define NVM_ADMIN_KEEP_ALIVE 0x18 /* Keep Alive */ -#define NVM_ADMIN_DIRECTIVE_SND 0x19 /* Derective Send */ -#define NVM_ADMIN_DIRECTIVE_RCV 0x1a /* Derective Receive */ +#define NVM_ADMIN_DIRECTIVE_SND 0x19 /* Directive Send */ +#define NVM_ADMIN_DIRECTIVE_RCV 0x1a /* Directive Receive */ #define NVM_ADMIN_VIRT_MGMT 0x1c /* Virtualization Management */ #define NVM_ADMIN_NVME_MI_SEND 0x1d /* NVMe-MI Send */ #define NVM_ADMIN_NVME_MI_RECV 0x1e /* NVMe-MI Receive */
CVS commit: src/external/bsd/blocklist/libexec
Module Name:src Committed By: christos Date: Wed Oct 12 19:50:29 UTC 2022 Modified Files: src/external/bsd/blocklist/libexec: blocklistd-helper Log Message: fix typo (jlduran) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/blocklist/libexec/blocklistd-helper Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/blocklist/libexec/blocklistd-helper diff -u src/external/bsd/blocklist/libexec/blocklistd-helper:1.4 src/external/bsd/blocklist/libexec/blocklistd-helper:1.5 --- src/external/bsd/blocklist/libexec/blocklistd-helper:1.4 Wed Oct 12 14:34:43 2022 +++ src/external/bsd/blocklist/libexec/blocklistd-helper Wed Oct 12 15:50:29 2022 @@ -152,7 +152,7 @@ add) /sbin/pfctl -a "$2/$6" -f - # insert $ip/$mask into per-protocol/port anchored table /sbin/pfctl -qa "$2/$6" -t "port$6" -T add "$addr/$mask" && \ - /sbin/pcftl -qk "$addr" && echo OK + /sbin/pfctl -qk "$addr" && echo OK ;; esac
CVS commit: src/external/bsd/blocklist/libexec
Module Name:src Committed By: christos Date: Wed Oct 12 19:50:29 UTC 2022 Modified Files: src/external/bsd/blocklist/libexec: blocklistd-helper Log Message: fix typo (jlduran) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/blocklist/libexec/blocklistd-helper Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys
In article <20221011220338.17a48f...@cvs.netbsd.org>, Andrius Varanavicius wrote: >-=-=-=-=-=- > >Module Name: src >Committed By: andvar >Date: Tue Oct 11 22:03:37 UTC 2022 > >Modified Files: > src/sys/arch/arm/arm32: bus_dma.c > src/sys/arch/hppa/hppa: mainbus.c > src/sys/arch/vax/vax: bus_dma.c > src/sys/dev/pci: if_bge.c vioscsi.c > >Log Message: >fix typos in log messages s/bus_dmamem_create/bus_dmamap_create/ and >s/bus_dmamem_load/bus_dmamap_load/. >Inspired by recent similar fixes in OpenBSD. Yes, but we have __func__ now :-) christos
CVS commit: src/external/bsd/blocklist/bin
Module Name:src Committed By: christos Date: Wed Oct 12 18:36:02 UTC 2022 Modified Files: src/external/bsd/blocklist/bin: blocklistd.c Log Message: fix logging function which should have used function pointer (jlduran at github) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/blocklist/bin/blocklistd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/blocklist/bin/blocklistd.c diff -u src/external/bsd/blocklist/bin/blocklistd.c:1.2 src/external/bsd/blocklist/bin/blocklistd.c:1.3 --- src/external/bsd/blocklist/bin/blocklistd.c:1.2 Sat Jun 11 15:15:58 2022 +++ src/external/bsd/blocklist/bin/blocklistd.c Wed Oct 12 14:36:02 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: blocklistd.c,v 1.2 2022/06/11 19:15:58 christos Exp $ */ +/* $NetBSD: blocklistd.c,v 1.3 2022/10/12 18:36:02 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include "config.h" #endif #include -__RCSID("$NetBSD: blocklistd.c,v 1.2 2022/06/11 19:15:58 christos Exp $"); +__RCSID("$NetBSD: blocklistd.c,v 1.3 2022/10/12 18:36:02 christos Exp $"); #include #include @@ -322,7 +322,7 @@ again: if (dbi.id[0]) { run_change("rem", &c, dbi.id, 0); sockaddr_snprintf(buf, sizeof(buf), "%a", ss); - syslog(LOG_INFO, "released %s/%d:%d after %d seconds", + (*lfun)(LOG_INFO, "released %s/%d:%d after %d seconds", buf, c.c_lmask, c.c_port, c.c_duration); } state_del(state, &c);
CVS commit: src/external/bsd/blocklist/bin
Module Name:src Committed By: christos Date: Wed Oct 12 18:36:02 UTC 2022 Modified Files: src/external/bsd/blocklist/bin: blocklistd.c Log Message: fix logging function which should have used function pointer (jlduran at github) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/blocklist/bin/blocklistd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/blocklist/libexec
Module Name:src Committed By: christos Date: Wed Oct 12 18:34:43 UTC 2022 Modified Files: src/external/bsd/blocklist/libexec: blocklistd-helper Log Message: >From pjuran at github: - Be quiet - Kill active tcp connections from the blocked address - Fix purge operation for pf, which must dynamically determine which filters have been created, so the filters can be flushed by name. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/blocklist/libexec/blocklistd-helper Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/blocklist/libexec/blocklistd-helper diff -u src/external/bsd/blocklist/libexec/blocklistd-helper:1.3 src/external/bsd/blocklist/libexec/blocklistd-helper:1.4 --- src/external/bsd/blocklist/libexec/blocklistd-helper:1.3 Mon Mar 8 16:48:22 2021 +++ src/external/bsd/blocklist/libexec/blocklistd-helper Wed Oct 12 14:34:43 2022 @@ -151,8 +151,8 @@ add) echo "block in quick $proto from to any $port" | \ /sbin/pfctl -a "$2/$6" -f - # insert $ip/$mask into per-protocol/port anchored table - /sbin/pfctl -a "$2/$6" -t "port$6" -T add "$addr/$mask" && \ - echo OK + /sbin/pfctl -qa "$2/$6" -t "port$6" -T add "$addr/$mask" && \ + /sbin/pcftl -qk "$addr" && echo OK ;; esac @@ -184,7 +184,7 @@ rem) ;; pf) - /sbin/pfctl -a "$2/$6" -t "port$6" -T delete "$addr/$mask" && \ + /sbin/pfctl -qa "$2/$6" -t "port$6" -T delete "$addr/$mask" && \ echo OK ;; @@ -224,7 +224,12 @@ flush) ;; pf) - /sbin/pfctl -a "$2/$6" -t "port$6" -T flush && echo OK + # dynamically determine which anchors exist + for anchor in $(/sbin/pfctl -a "$2" -s Anchors); do + /sbin/pfctl -a "$anchor" -t "port${anchor##*/}" -T flush + /sbin/pfctl -a "$anchor" -F rules + done + echo OK ;; esac ;;
CVS commit: src/external/bsd/blocklist/libexec
Module Name:src Committed By: christos Date: Wed Oct 12 18:34:43 UTC 2022 Modified Files: src/external/bsd/blocklist/libexec: blocklistd-helper Log Message: >From pjuran at github: - Be quiet - Kill active tcp connections from the blocked address - Fix purge operation for pf, which must dynamically determine which filters have been created, so the filters can be flushed by name. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/blocklist/libexec/blocklistd-helper Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: taca Date: Wed Oct 12 14:46:17 UTC 2022 Modified Files: src/doc: 3RDPARTY Log Message: Revert previous commit. "Withdrawal of OpenSSL 3.0.6 and 1.1.1r" https://mta.openssl.org/pipermail/openssl-announce/2022-October/000237.html To generate a diff of this commit: cvs rdiff -u -r1.1888 -r1.1889 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1888 src/doc/3RDPARTY:1.1889 --- src/doc/3RDPARTY:1.1888 Tue Oct 11 15:22:16 2022 +++ src/doc/3RDPARTY Wed Oct 12 14:46:17 2022 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1888 2022/10/11 15:22:16 taca Exp $ +# $NetBSD: 3RDPARTY,v 1.1889 2022/10/12 14:46:17 taca Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1115,7 +1115,7 @@ markus is very cooperative about it): Package: OpenSSL Version: 1.0.2o/1.1.1n -Current Vers: 1.0.2zd/1.1.1r/3.0.6 +Current Vers: 1.0.2zd/1.1.1q/3.0.5 Maintainer: The OpenSSL Project Archive Site: ftp://ftp.openssl.org/source/ Home Page: http://www.openssl.org/
CVS commit: src/doc
Module Name:src Committed By: taca Date: Wed Oct 12 14:46:17 UTC 2022 Modified Files: src/doc: 3RDPARTY Log Message: Revert previous commit. "Withdrawal of OpenSSL 3.0.6 and 1.1.1r" https://mta.openssl.org/pipermail/openssl-announce/2022-October/000237.html To generate a diff of this commit: cvs rdiff -u -r1.1888 -r1.1889 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Wed Oct 12 12:50:02 UTC 2022 Modified Files: src/sys/dev/pci: ahcisata_pci.c Log Message: set AHCI_QUIRK_EXTRA_DELAY for ASMedia ASM1061 - now it reliably attaches old 1.5GBit/s only disks To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/dev/pci/ahcisata_pci.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/ahcisata_pci.c diff -u src/sys/dev/pci/ahcisata_pci.c:1.67 src/sys/dev/pci/ahcisata_pci.c:1.68 --- src/sys/dev/pci/ahcisata_pci.c:1.67 Sun Oct 2 10:40:29 2022 +++ src/sys/dev/pci/ahcisata_pci.c Wed Oct 12 12:50:02 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ahcisata_pci.c,v 1.67 2022/10/02 10:40:29 martin Exp $ */ +/* $NetBSD: ahcisata_pci.c,v 1.68 2022/10/12 12:50:02 macallan Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.67 2022/10/02 10:40:29 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.68 2022/10/12 12:50:02 macallan Exp $"); #ifdef _KERNEL_OPT #include "opt_ahcisata_pci.h" @@ -197,7 +197,7 @@ static const struct ahci_pci_quirk ahci_ { PCI_VENDOR_ASMEDIA, PCI_PRODUCT_ASMEDIA_ASM1061_11, AHCI_PCI_QUIRK_FORCE }, { PCI_VENDOR_ASMEDIA, PCI_PRODUCT_ASMEDIA_ASM1061_12, - AHCI_PCI_QUIRK_FORCE }, + AHCI_PCI_QUIRK_FORCE | AHCI_QUIRK_EXTRA_DELAY }, { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_HUDSON_SATA, AHCI_PCI_QUIRK_FORCE }, { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_HUDSON_SATA_AHCI,
CVS commit: src/sys/dev/pci
Module Name:src Committed By: macallan Date: Wed Oct 12 12:50:02 UTC 2022 Modified Files: src/sys/dev/pci: ahcisata_pci.c Log Message: set AHCI_QUIRK_EXTRA_DELAY for ASMedia ASM1061 - now it reliably attaches old 1.5GBit/s only disks To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/dev/pci/ahcisata_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: msaitoh Date: Wed Oct 12 10:26:09 UTC 2022 Modified Files: src/sys/arch/x86/x86: cpu_topology.c Log Message: Use macros. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/x86/x86/cpu_topology.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/cpu_topology.c diff -u src/sys/arch/x86/x86/cpu_topology.c:1.20 src/sys/arch/x86/x86/cpu_topology.c:1.21 --- src/sys/arch/x86/x86/cpu_topology.c:1.20 Wed Oct 27 04:15:41 2021 +++ src/sys/arch/x86/x86/cpu_topology.c Wed Oct 12 10:26:09 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_topology.c,v 1.20 2021/10/27 04:15:41 mrg Exp $ */ +/* $NetBSD: cpu_topology.c,v 1.21 2022/10/12 10:26:09 msaitoh Exp $ */ /*- * Copyright (c) 2009 Mindaugas Rasiukevicius , @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu_topology.c,v 1.20 2021/10/27 04:15:41 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu_topology.c,v 1.21 2022/10/12 10:26:09 msaitoh Exp $"); #include "acpica.h" @@ -143,11 +143,11 @@ x86_cpu_topology(struct cpu_info *ci) break; } - /* Number of Cores (NC) per package (ecx[7:0]). */ + /* Number of Cores (NC) per package. */ x86_cpuid(0x8008, descs); - core_max = (descs[2] & 0xff) + 1; + core_max = __SHIFTOUT(descs[2], CPUID_CAPEX_NC) + 1; /* Amount of bits representing Core ID (ecx[15:12]). */ - n = (descs[2] >> 12) & 0x0f; + n = __SHIFTOUT(descs[2], CPUID_CAPEX_ApicIdSize); if (n != 0) { /* * Extended Method. @@ -188,7 +188,8 @@ x86_cpu_topology(struct cpu_info *ci) /* Family 0x17 and above support SMT */ if (cpu_vendor == CPUVENDOR_AMD && cpu_family >= 0x17) { /* XXX */ x86_cpuid(0x801e, descs); - const u_int threads = ((descs[1] >> 8) & 0xff) + 1; + const u_int threads = __SHIFTOUT(descs[1], + CPUID_AMD_PROCT_THREADS_PER_CORE) + 1; KASSERT(smt_bits == 0); smt_bits = ilog2(threads);
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: msaitoh Date: Wed Oct 12 10:26:09 UTC 2022 Modified Files: src/sys/arch/x86/x86: cpu_topology.c Log Message: Use macros. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/x86/x86/cpu_topology.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: msaitoh Date: Wed Oct 12 10:25:41 UTC 2022 Modified Files: src/sys/arch/x86/include: specialreg.h Log Message: Add CPUID Fn8000_001e Processor Topology Information. To generate a diff of this commit: cvs rdiff -u -r1.192 -r1.193 src/sys/arch/x86/include/specialreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/include/specialreg.h diff -u src/sys/arch/x86/include/specialreg.h:1.192 src/sys/arch/x86/include/specialreg.h:1.193 --- src/sys/arch/x86/include/specialreg.h:1.192 Thu Oct 6 00:22:16 2022 +++ src/sys/arch/x86/include/specialreg.h Wed Oct 12 10:25:41 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: specialreg.h,v 1.192 2022/10/06 00:22:16 msaitoh Exp $ */ +/* $NetBSD: specialreg.h,v 1.193 2022/10/12 10:25:41 msaitoh Exp $ */ /* * Copyright (c) 2014-2020 The NetBSD Foundation, Inc. @@ -886,6 +886,22 @@ */ /* + * AMD Processor Topology Information. + * CPUID Fn8000_001e + * %eax: Extended APIC ID. + * %ebx: Core Identifiers. + * %ecx: Node Identifiers. + */ + +/* %ebx */ +#define CPUID_AMD_PROCT_COREID __BITS(7,0) /* Core ID */ +#define CPUID_AMD_PROCT_THREADS_PER_CORE __BITS(15,8) /* Threads/Core - 1 */ + +/* %ecx */ +#define CPUID_AMD_PROCT_NODEID __BITS(7,0) /* Node ID */ +#define CPUID_AMD_PROCT_NODE_PER_PROCESSOR __BITS(10,8) /* Node/Processor -1 */ + +/* * AMD Encrypted Memory Capabilities. * CPUID Fn8000_001f * %eax: flags
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: msaitoh Date: Wed Oct 12 10:25:41 UTC 2022 Modified Files: src/sys/arch/x86/include: specialreg.h Log Message: Add CPUID Fn8000_001e Processor Topology Information. To generate a diff of this commit: cvs rdiff -u -r1.192 -r1.193 src/sys/arch/x86/include/specialreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/riscv/conf
Module Name:src Committed By: simonb Date: Wed Oct 12 07:56:46 UTC 2022 Modified Files: src/sys/arch/riscv/conf: GENERIC Log Message: "options" To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/riscv/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/riscv/conf
Module Name:src Committed By: simonb Date: Wed Oct 12 07:56:46 UTC 2022 Modified Files: src/sys/arch/riscv/conf: GENERIC Log Message: "options" To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/riscv/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/riscv/conf/GENERIC diff -u src/sys/arch/riscv/conf/GENERIC:1.16 src/sys/arch/riscv/conf/GENERIC:1.17 --- src/sys/arch/riscv/conf/GENERIC:1.16 Thu Sep 29 10:10:09 2022 +++ src/sys/arch/riscv/conf/GENERIC Wed Oct 12 07:56:46 2022 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.16 2022/09/29 10:10:09 riastradh Exp $ +# $NetBSD: GENERIC,v 1.17 2022/10/12 07:56:46 simonb Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/riscv/conf/std.riscv64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.16 $" +#ident "GENERIC-$Revision: 1.17 $" maxusers 64 # estimated number of users @@ -77,7 +77,7 @@ options DIAGNOSTIC # inexpensive kernel makeoptions COPTS="-O2 -fno-omit-frame-pointer" makeoptions COPY_SYMTAB=1 options DDB # in-kernel debugger -#options DDB_COMMANDONENTER="bt" # execute command when ddb is entered +#options DDB_COMMANDONENTER="bt" # execute command when ddb is entered options DDB_ONPANIC=1 # see also sysctl(7): `ddb.onpanic' options DDB_HISTORY_SIZE=512 # enable history editing in DDB #options KGDB # remote debugger @@ -97,8 +97,8 @@ options DKWEDGE_AUTODISCOVER # Automati options DKWEDGE_METHOD_GPT # Supports GPT partitions as wedges options DKWEDGE_METHOD_BSDLABEL # Support disklabel entries as wedges options DKWEDGE_METHOD_MBR # Support MBR partitions as wedges -options DKWEDGE_METHOD_APPLE# Support Apple partitions as wedges -#options DKWEDGE_METHOD_RDB # Support RDB partitions as wedges +options DKWEDGE_METHOD_APPLE# Support Apple partitions as wedges +#options DKWEDGE_METHOD_RDB # Support RDB partitions as wedges include "conf/filesystems.config"
CVS commit: src/sys/arch/riscv/riscv
Module Name:src Committed By: simonb Date: Wed Oct 12 07:53:56 UTC 2022 Modified Files: src/sys/arch/riscv/riscv: db_machdep.c Log Message: Nuke funny trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/riscv/riscv/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/riscv/riscv/db_machdep.c diff -u src/sys/arch/riscv/riscv/db_machdep.c:1.9 src/sys/arch/riscv/riscv/db_machdep.c:1.10 --- src/sys/arch/riscv/riscv/db_machdep.c:1.9 Tue Sep 27 08:18:21 2022 +++ src/sys/arch/riscv/riscv/db_machdep.c Wed Oct 12 07:53:56 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: db_machdep.c,v 1.9 2022/09/27 08:18:21 skrll Exp $ */ +/* $NetBSD: db_machdep.c,v 1.10 2022/10/12 07:53:56 simonb Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__RCSID("$NetBSD: db_machdep.c,v 1.9 2022/09/27 08:18:21 skrll Exp $"); +__RCSID("$NetBSD: db_machdep.c,v 1.10 2022/10/12 07:53:56 simonb Exp $"); #include @@ -274,6 +274,3 @@ db_write_bytes(vaddr_t addr, size_t len, } __asm("fence rw,rw; fence.i"); } - - -
CVS commit: src/sys/arch/riscv/riscv
Module Name:src Committed By: simonb Date: Wed Oct 12 07:53:56 UTC 2022 Modified Files: src/sys/arch/riscv/riscv: db_machdep.c Log Message: Nuke funny trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/riscv/riscv/db_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/riscv/include
Module Name:src Committed By: simonb Date: Wed Oct 12 07:53:15 UTC 2022 Modified Files: src/sys/arch/riscv/include: vmparam.h Log Message: Set RISCV_DIRECTMAP_SIZE to 2^64-PAGESIZE, since 2^64 is effectively 0 for a 64bit constant. Bump VM_PHYSSEG_MAX from 1 to 16. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/riscv/include/vmparam.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/riscv/include/vmparam.h diff -u src/sys/arch/riscv/include/vmparam.h:1.10 src/sys/arch/riscv/include/vmparam.h:1.11 --- src/sys/arch/riscv/include/vmparam.h:1.10 Tue Sep 20 07:18:23 2022 +++ src/sys/arch/riscv/include/vmparam.h Wed Oct 12 07:53:15 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.10 2022/09/20 07:18:23 skrll Exp $ */ +/* $NetBSD: vmparam.h,v 1.11 2022/10/12 07:53:15 simonb Exp $ */ /*- * Copyright (c) 2014, 2020 The NetBSD Foundation, Inc. @@ -142,10 +142,10 @@ #ifdef _LP64 /* * Since we have the address space, we map all of physical memory (RAM) - * using block page table entries. + * using gigapages on SV39, terapages on SV48 and petapages on SV57. */ #define RISCV_DIRECTMAP_MASK ((vaddr_t) 0xffe0L) -#define RISCV_DIRECTMAP_SIZE (-RISCV_DIRECTMAP_MASK) /* 128GiB */ +#define RISCV_DIRECTMAP_SIZE (-RISCV_DIRECTMAP_MASK - PAGE_SIZE) /* 128GiB */ #define RISCV_DIRECTMAP_START RISCV_DIRECTMAP_MASK #define RISCV_DIRECTMAP_END (RISCV_DIRECTMAP_START + RISCV_DIRECTMAP_SIZE) #define RISCV_KVA_P(va) (((vaddr_t) (va) & RISCV_DIRECTMAP_MASK) != 0) @@ -173,7 +173,7 @@ /* VM_PHYSSEG_MAX defined by platform-dependent code. */ #ifndef VM_PHYSSEG_MAX -#define VM_PHYSSEG_MAX 1 +#define VM_PHYSSEG_MAX 16 #endif #if VM_PHYSSEG_MAX == 1 #define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
CVS commit: src/sys/arch/riscv/include
Module Name:src Committed By: simonb Date: Wed Oct 12 07:53:15 UTC 2022 Modified Files: src/sys/arch/riscv/include: vmparam.h Log Message: Set RISCV_DIRECTMAP_SIZE to 2^64-PAGESIZE, since 2^64 is effectively 0 for a 64bit constant. Bump VM_PHYSSEG_MAX from 1 to 16. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/riscv/include/vmparam.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/riscv/include
Module Name:src Committed By: simonb Date: Wed Oct 12 07:50:57 UTC 2022 Modified Files: src/sys/arch/riscv/include: reg.h Log Message: Fix a tyop regname in a comment. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/riscv/include/reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/riscv/include
Module Name:src Committed By: simonb Date: Wed Oct 12 07:50:57 UTC 2022 Modified Files: src/sys/arch/riscv/include: reg.h Log Message: Fix a tyop regname in a comment. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/riscv/include/reg.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/riscv/include/reg.h diff -u src/sys/arch/riscv/include/reg.h:1.8 src/sys/arch/riscv/include/reg.h:1.9 --- src/sys/arch/riscv/include/reg.h:1.8 Sat Nov 7 10:48:17 2020 +++ src/sys/arch/riscv/include/reg.h Wed Oct 12 07:50:56 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: reg.h,v 1.8 2020/11/07 10:48:17 skrll Exp $ */ +/* $NetBSD: reg.h,v 1.9 2022/10/12 07:50:56 simonb Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ // x10 - x11 = a0 - a1 (arguments/return values) Caller // x12 - x17 = a2 - a7 (arguments) Caller // x18 - x27 = s2 - s11 (saved registers) Callee -// x28 - x31 = t3 - r6 (temporaries) Caller +// x28 - x31 = t3 - t6 (temporaries) Caller struct reg { // synced with register_t in #ifdef _LP64
CVS commit: src/sys/arch/riscv/include
Module Name:src Committed By: simonb Date: Wed Oct 12 07:50:00 UTC 2022 Modified Files: src/sys/arch/riscv/include: param.h Log Message: NKMEMPAGES_MIN_DEFAULT is in pages not bytes (hint is in the name). Also set NKMEMPAGES_MAX_UNLIMITED while we're here. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/riscv/include/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/riscv/include/param.h diff -u src/sys/arch/riscv/include/param.h:1.6 src/sys/arch/riscv/include/param.h:1.7 --- src/sys/arch/riscv/include/param.h:1.6 Mon Jul 19 10:28:58 2021 +++ src/sys/arch/riscv/include/param.h Wed Oct 12 07:50:00 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.6 2021/07/19 10:28:58 christos Exp $ */ +/* $NetBSD: param.h,v 1.7 2022/10/12 07:50:00 simonb Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -67,8 +67,8 @@ #define STACK_ALIGNBYTES (__BIGGEST_ALIGNMENT__ - 1) #define ALIGNBYTES32 __BIGGEST_ALIGNMENT__ -#define NKMEMPAGES_MAX_DEFAULT (2048UL * 1024 * 1024) -#define NKMEMPAGES_MIN_DEFAULT (128UL * 1024 * 1024) +#define NKMEMPAGES_MIN_DEFAULT ((128UL * 1024 * 1024) >> PAGE_SHIFT) +#define NKMEMPAGES_MAX_UNLIMITED 1 #define PGSHIFT 12 #define NBPG (1 << PGSHIFT)
CVS commit: src/sys/arch/riscv/include
Module Name:src Committed By: simonb Date: Wed Oct 12 07:50:00 UTC 2022 Modified Files: src/sys/arch/riscv/include: param.h Log Message: NKMEMPAGES_MIN_DEFAULT is in pages not bytes (hint is in the name). Also set NKMEMPAGES_MAX_UNLIMITED while we're here. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/riscv/include/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.