CVS commit: src/sys/ufs/lfs
Module Name:src Committed By: skrll Date: Sun Jul 25 06:10:01 UTC 2021 Modified Files: src/sys/ufs/lfs: ulfs_quota1_subr.c Log Message: #include for COHERENCY_UNIT (and KNF) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/ufs/lfs/ulfs_quota1_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/ufs/lfs/ulfs_quota1_subr.c diff -u src/sys/ufs/lfs/ulfs_quota1_subr.c:1.3 src/sys/ufs/lfs/ulfs_quota1_subr.c:1.4 --- src/sys/ufs/lfs/ulfs_quota1_subr.c:1.3 Thu Jun 6 00:49:28 2013 +++ src/sys/ufs/lfs/ulfs_quota1_subr.c Sun Jul 25 06:10:01 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ulfs_quota1_subr.c,v 1.3 2013/06/06 00:49:28 dholland Exp $ */ +/* $NetBSD: ulfs_quota1_subr.c,v 1.4 2021/07/25 06:10:01 skrll Exp $ */ /* from NetBSD: quota1_subr.c,v 1.7 2012/01/29 06:23:20 dholland Exp */ /*- @@ -28,12 +28,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ulfs_quota1_subr.c,v 1.3 2013/06/06 00:49:28 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ulfs_quota1_subr.c,v 1.4 2021/07/25 06:10:01 skrll Exp $"); +#include #include -#include - #include + #include static uint64_t
CVS commit: src/external/cddl/osnet/sys/kern
Module Name:src Committed By: skrll Date: Sun Jul 25 06:07:42 UTC 2021 Modified Files: src/external/cddl/osnet/sys/kern: opensolaris.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/sys/kern/opensolaris.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/cddl/osnet/sys/kern/opensolaris.c diff -u src/external/cddl/osnet/sys/kern/opensolaris.c:1.2 src/external/cddl/osnet/sys/kern/opensolaris.c:1.3 --- src/external/cddl/osnet/sys/kern/opensolaris.c:1.2 Mon May 28 21:05:09 2018 +++ src/external/cddl/osnet/sys/kern/opensolaris.c Sun Jul 25 06:07:42 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: opensolaris.c,v 1.2 2018/05/28 21:05:09 chs Exp $ */ +/* $NetBSD: opensolaris.c,v 1.3 2021/07/25 06:07:42 skrll Exp $ */ /*- * Copyright 2007 John Birrell * @@ -28,11 +28,12 @@ */ #include +#include #include + #include #include #include -#include #include #include #include
CVS commit: src/sys/kern
Module Name:src Committed By: simonb Date: Sun Jul 25 06:06:40 UTC 2021 Modified Files: src/sys/kern: vfs_bio.c Log Message: If we're only doing a count-only kern.buf sysctl, just return the number of active members in the pool cache (plus some slop) instead of looking in all the free buffer list. Should reduce CPU usage for "systat vm" to << 1% especially for machines with a larger number of buffers. To generate a diff of this commit: cvs rdiff -u -r1.300 -r1.301 src/sys/kern/vfs_bio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/vfs_bio.c diff -u src/sys/kern/vfs_bio.c:1.300 src/sys/kern/vfs_bio.c:1.301 --- src/sys/kern/vfs_bio.c:1.300 Sat Jul 24 13:28:14 2021 +++ src/sys/kern/vfs_bio.c Sun Jul 25 06:06:40 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_bio.c,v 1.300 2021/07/24 13:28:14 simonb Exp $ */ +/* $NetBSD: vfs_bio.c,v 1.301 2021/07/25 06:06:40 simonb Exp $ */ /*- * Copyright (c) 2007, 2008, 2009, 2019, 2020 The NetBSD Foundation, Inc. @@ -123,7 +123,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.300 2021/07/24 13:28:14 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.301 2021/07/25 06:06:40 simonb Exp $"); #ifdef _KERNEL_OPT #include "opt_bufcache.h" @@ -1804,6 +1804,14 @@ sysctl_dobuf(SYSCTLFN_ARGS) elem_size < 1 || elem_count < 0) return (EINVAL); + if (oldp == NULL) { + /* count only, don't run through the buffer queues */ + needed = pool_cache_nget(buf_cache) - pool_cache_nput(buf_cache); + *oldlenp = (needed + KERN_BUFSLOP) * elem_size; + + return 0; + } + error = 0; needed = 0; sysctl_unlock(); @@ -1848,8 +1856,6 @@ sysctl_dobuf(SYSCTLFN_ARGS) sysctl_relock(); *oldlenp = needed; - if (oldp == NULL) - *oldlenp += KERN_BUFSLOP * elem_size; return (error); }
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sun Jul 25 06:04:40 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: decl_arg.c decl_arg.exp Log Message: tests/lint: demonstrate internal error in parsing a declaration To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/decl_arg.c cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/decl_arg.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/xlint/lint1/decl_arg.c diff -u src/tests/usr.bin/xlint/lint1/decl_arg.c:1.5 src/tests/usr.bin/xlint/lint1/decl_arg.c:1.6 --- src/tests/usr.bin/xlint/lint1/decl_arg.c:1.5 Sat Jul 10 09:24:27 2021 +++ src/tests/usr.bin/xlint/lint1/decl_arg.c Sun Jul 25 06:04:40 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: decl_arg.c,v 1.5 2021/07/10 09:24:27 rillig Exp $ */ +/* $NetBSD: decl_arg.c,v 1.6 2021/07/25 06:04:40 rillig Exp $ */ # 3 "decl_arg.c" /* @@ -55,7 +55,8 @@ struct a_struct { int member; } a_struct } /* - * Just some unrealistic coverage for the grammar rule 'notype_direct_decl'. + * Just some unrealistic coverage for the grammar rule + * 'notype_direct_declarator'. */ extern int cover_notype_direct_decl(arg) @@ -129,3 +130,6 @@ void cover_asm_or_symbolrename_asm(void) void cover_asm_or_symbolrename_symbolrename(void) __symbolrename(alternate_name); + +// FIXME: internal error in decl.c:906 near decl_arg.c:134: length(0) +//void cover_abstract_declarator_typeof(void (*)(typeof(no_args))); Index: src/tests/usr.bin/xlint/lint1/decl_arg.exp diff -u src/tests/usr.bin/xlint/lint1/decl_arg.exp:1.2 src/tests/usr.bin/xlint/lint1/decl_arg.exp:1.3 --- src/tests/usr.bin/xlint/lint1/decl_arg.exp:1.2 Sat Jul 10 08:40:36 2021 +++ src/tests/usr.bin/xlint/lint1/decl_arg.exp Sun Jul 25 06:04:40 2021 @@ -14,15 +14,15 @@ decl_arg.c(30): warning: argument 'a_con decl_arg.c(30): warning: argument 'a_number' unused in function 'old_style' [231] decl_arg.c(30): warning: argument 'a_function' unused in function 'old_style' [231] decl_arg.c(30): warning: argument 'a_struct' unused in function 'old_style' [231] -decl_arg.c(64): error: declared argument name is missing [53] -decl_arg.c(66): error: declared argument parenthesized_name is missing [53] -decl_arg.c(68): error: declared argument array is missing [53] -decl_arg.c(70): error: declared argument array_size is missing [53] -decl_arg.c(73): error: null dimension [17] -decl_arg.c(73): error: declared argument multi_array is missing [53] -decl_arg.c(75): error: declared argument function is missing [53] -decl_arg.c(77): error: declared argument prefix_attribute is missing [53] -decl_arg.c(79): error: declared argument postfix_attribute is missing [53] -decl_arg.c(81): error: declared argument infix_attribute is missing [53] -decl_arg.c(90): error: declared argument pointer_prefix_attribute is missing [53] -decl_arg.c(119): error: only register valid as formal parameter storage class [9] +decl_arg.c(65): error: declared argument name is missing [53] +decl_arg.c(67): error: declared argument parenthesized_name is missing [53] +decl_arg.c(69): error: declared argument array is missing [53] +decl_arg.c(71): error: declared argument array_size is missing [53] +decl_arg.c(74): error: null dimension [17] +decl_arg.c(74): error: declared argument multi_array is missing [53] +decl_arg.c(76): error: declared argument function is missing [53] +decl_arg.c(78): error: declared argument prefix_attribute is missing [53] +decl_arg.c(80): error: declared argument postfix_attribute is missing [53] +decl_arg.c(82): error: declared argument infix_attribute is missing [53] +decl_arg.c(91): error: declared argument pointer_prefix_attribute is missing [53] +decl_arg.c(120): error: only register valid as formal parameter storage class [9]
CVS commit: src/sys
Module Name:src Committed By: simonb Date: Sun Jul 25 06:00:32 UTC 2021 Modified Files: src/sys/kern: subr_pool.c src/sys/sys: pool.h Log Message: Add accessor functions to get the number of gets and puts on pools and pool caches. To generate a diff of this commit: cvs rdiff -u -r1.276 -r1.277 src/sys/kern/subr_pool.c cvs rdiff -u -r1.93 -r1.94 src/sys/sys/pool.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/kern/subr_pool.c diff -u src/sys/kern/subr_pool.c:1.276 src/sys/kern/subr_pool.c:1.277 --- src/sys/kern/subr_pool.c:1.276 Wed Feb 24 05:36:02 2021 +++ src/sys/kern/subr_pool.c Sun Jul 25 06:00:31 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_pool.c,v 1.276 2021/02/24 05:36:02 mrg Exp $ */ +/* $NetBSD: subr_pool.c,v 1.277 2021/07/25 06:00:31 simonb Exp $ */ /* * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010, 2014, 2015, 2018, @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.276 2021/02/24 05:36:02 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.277 2021/07/25 06:00:31 simonb Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -1609,6 +1609,20 @@ pool_sethardlimit(struct pool *pp, int n mutex_exit(&pp->pr_lock); } +unsigned int +pool_nget(struct pool *pp) +{ + + return pp->pr_nget; +} + +unsigned int +pool_nput(struct pool *pp) +{ + + return pp->pr_nput; +} + /* * Release all complete pages that have not been used recently. * @@ -2459,6 +2473,20 @@ pool_cache_prime(pool_cache_t pc, int n) pool_prime(&pc->pc_pool, n); } +unsigned int +pool_cache_nget(pool_cache_t pc) +{ + + return pool_nget(&pc->pc_pool); +} + +unsigned int +pool_cache_nput(pool_cache_t pc) +{ + + return pool_nput(&pc->pc_pool); +} + /* * pool_pcg_get: * Index: src/sys/sys/pool.h diff -u src/sys/sys/pool.h:1.93 src/sys/sys/pool.h:1.94 --- src/sys/sys/pool.h:1.93 Wed Feb 24 06:11:38 2021 +++ src/sys/sys/pool.h Sun Jul 25 06:00:31 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pool.h,v 1.93 2021/02/24 06:11:38 simonb Exp $ */ +/* $NetBSD: pool.h,v 1.94 2021/07/25 06:00:31 simonb Exp $ */ /*- * Copyright (c) 1997, 1998, 1999, 2000, 2007, 2020 @@ -319,6 +319,9 @@ bool pool_drain(struct pool **); int pool_totalpages(void); int pool_totalpages_locked(void); +unsigned int pool_nget(struct pool *); +unsigned int pool_nput(struct pool *); + /* * Debugging and diagnostic aides. */ @@ -353,6 +356,9 @@ void pool_cache_sethardlimit(pool_cache void pool_cache_prime(pool_cache_t, int); void pool_cache_cpu_init(struct cpu_info *); +unsigned int pool_cache_nget(pool_cache_t); +unsigned int pool_cache_nput(pool_cache_t); + #define pool_cache_get(pc, f) pool_cache_get_paddr((pc), (f), NULL) #define pool_cache_put(pc, o) pool_cache_put_paddr((pc), (o), \ POOL_PADDR_INVALID)
CVS commit: src/games/fish
Module Name:src Committed By: dholland Date: Sun Jul 25 02:00:42 UTC 2021 Modified Files: src/games/fish: fish.c Log Message: Flush input to EOL correctly in games/fish. PR 54885 from Mouse, with a somewhat different patch. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/games/fish/fish.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/fish/fish.c diff -u src/games/fish/fish.c:1.26 src/games/fish/fish.c:1.27 --- src/games/fish/fish.c:1.26 Sun May 2 12:25:55 2021 +++ src/games/fish/fish.c Sun Jul 25 02:00:42 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: fish.c,v 1.26 2021/05/02 12:25:55 rillig Exp $ */ +/* $NetBSD: fish.c,v 1.27 2021/07/25 02:00:42 dholland Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 19 #if 0 static char sccsid[] = "@(#)fish.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: fish.c,v 1.26 2021/05/02 12:25:55 rillig Exp $"); +__RCSID("$NetBSD: fish.c,v 1.27 2021/07/25 02:00:42 dholland Exp $"); #endif #endif /* not lint */ @@ -432,15 +432,20 @@ init(void) static void instructions(void) { - int input; + int input, c; pid_t pid; int fd; const char *pager; int status; (void)printf("Would you like instructions (y or n)? "); - input = getchar(); - while (getchar() != '\n'); + input = c = getchar(); + while (c != '\n') { + c = getchar(); + if (c == EOF) { + exit(1); + } + } if (input != 'y') return;
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jmcneill Date: Sun Jul 25 01:43:08 UTC 2021 Modified Files: src/sys/dev/acpi: acpi_timer.c Log Message: acpi_timer: use ACPI-Fast if WAET timer one read flag is set The Windows ACPI Emulated Devices Table (WAET) has a hint to inform the OS that a single read of the PM timer is reliable. Honour this flag. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/dev/acpi/acpi_timer.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi_timer.c diff -u src/sys/dev/acpi/acpi_timer.c:1.26 src/sys/dev/acpi/acpi_timer.c:1.27 --- src/sys/dev/acpi/acpi_timer.c:1.26 Fri May 29 12:30:41 2020 +++ src/sys/dev/acpi/acpi_timer.c Sun Jul 25 01:43:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_timer.c,v 1.26 2020/05/29 12:30:41 rin Exp $ */ +/* $NetBSD: acpi_timer.c,v 1.27 2021/07/25 01:43:08 jmcneill Exp $ */ /*- * Copyright (c) 2006 Matthias Drochner @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_timer.c,v 1.26 2020/05/29 12:30:41 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_timer.c,v 1.27 2021/07/25 01:43:08 jmcneill Exp $"); #include #include @@ -61,6 +61,7 @@ int acpitimer_init(struct acpi_softc *sc) { #if (!ACPI_REDUCED_HARDWARE) + ACPI_TABLE_WAET *waet; ACPI_STATUS rv; uint32_t bits; int i, j; @@ -79,6 +80,18 @@ acpitimer_init(struct acpi_softc *sc) for (i = j = 0; i < 10; i++) j += acpitimer_test(); + rv = AcpiGetTable(ACPI_SIG_WAET, 0, (ACPI_TABLE_HEADER **)&waet); + if (ACPI_SUCCESS(rv)) { + /* + * Windows ACPI Emulated Devices Table (WAET) has a hint + * to let the OS know that a single read of the PM timer + * provides a reliable value. + */ + if ((waet->Flags & ACPI_WAET_TIMER_ONE_READ) != 0) { + j += 10; + } + } + if (j >= 10) { acpi_timecounter.tc_name = "ACPI-Fast"; acpi_timecounter.tc_get_timecount = acpitimer_read_fast;
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: macallan Date: Sun Jul 25 00:11:43 UTC 2021 Modified Files: src/sys/dev/i2c: fcu.c Log Message: don't put CPUs in separate zones, turns out there really isn't much that keeps the airflow apart around them To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/dev/i2c/fcu.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/i2c/fcu.c diff -u src/sys/dev/i2c/fcu.c:1.12 src/sys/dev/i2c/fcu.c:1.13 --- src/sys/dev/i2c/fcu.c:1.12 Wed Jan 27 02:29:48 2021 +++ src/sys/dev/i2c/fcu.c Sun Jul 25 00:11:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: fcu.c,v 1.12 2021/01/27 02:29:48 thorpej Exp $ */ +/* $NetBSD: fcu.c,v 1.13 2021/07/25 00:11:43 macallan Exp $ */ /*- * Copyright (c) 2018 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fcu.c,v 1.12 2021/01/27 02:29:48 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fcu.c,v 1.13 2021/07/25 00:11:43 macallan Exp $"); #include #include @@ -75,11 +75,10 @@ typedef struct _fcu_fan { int duty; /* for pwm fans */ } fcu_fan_t; -#define FCU_ZONE_CPU_A 0 -#define FCU_ZONE_CPU_B 1 -#define FCU_ZONE_CASE 2 -#define FCU_ZONE_DRIVEBAY 3 -#define FCU_ZONE_COUNT 4 +#define FCU_ZONE_CPU 0 +#define FCU_ZONE_CASE 1 +#define FCU_ZONE_DRIVEBAY 2 +#define FCU_ZONE_COUNT 3 struct fcu_softc { device_t sc_dev; @@ -103,8 +102,7 @@ static void fcu_attach(device_t, device_ static void fcu_sensors_refresh(struct sysmon_envsys *, envsys_data_t *); -static bool is_cpu_a(const envsys_data_t *); -static bool is_cpu_b(const envsys_data_t *); +static bool is_cpu(const envsys_data_t *); static bool is_case(const envsys_data_t *); static bool is_drive(const envsys_data_t *); @@ -162,12 +160,9 @@ fcu_attach(device_t parent, device_t sel have_eeprom1 = 0; /* init zones */ - sc->sc_zones[FCU_ZONE_CPU_A].filter = is_cpu_a; - sc->sc_zones[FCU_ZONE_CPU_A].threshold = 50; - sc->sc_zones[FCU_ZONE_CPU_A].nfans = 0; - sc->sc_zones[FCU_ZONE_CPU_B].filter = is_cpu_b; - sc->sc_zones[FCU_ZONE_CPU_B].threshold = 50; - sc->sc_zones[FCU_ZONE_CPU_B].nfans = 0; + sc->sc_zones[FCU_ZONE_CPU].filter = is_cpu; + sc->sc_zones[FCU_ZONE_CPU].threshold = 50; + sc->sc_zones[FCU_ZONE_CPU].nfans = 0; sc->sc_zones[FCU_ZONE_CASE].filter = is_case; sc->sc_zones[FCU_ZONE_CASE].threshold = 50; sc->sc_zones[FCU_ZONE_CASE].nfans = 0; @@ -282,12 +277,8 @@ fcu_attach(device_t parent, device_t sel descr, fan->base_rpm, fan->max_rpm, fan->step); /* now stuff them into zones */ - if (strstr(descr, "CPU A") != NULL) { -fcu_zone_t *z = &sc->sc_zones[FCU_ZONE_CPU_A]; -z->fans[z->nfans] = sc->sc_nfans; -z->nfans++; - } else if (strstr(descr, "CPU B") != NULL) { -fcu_zone_t *z = &sc->sc_zones[FCU_ZONE_CPU_B]; + if (strstr(descr, "CPU") != NULL) { +fcu_zone_t *z = &sc->sc_zones[FCU_ZONE_CPU]; z->fans[z->nfans] = sc->sc_nfans; z->nfans++; } else if ((strstr(descr, "BACKSIDE") != NULL) || @@ -358,21 +349,11 @@ fcu_sensors_refresh(struct sysmon_envsys } static bool -is_cpu_a(const envsys_data_t *edata) +is_cpu(const envsys_data_t *edata) { if (edata->units != ENVSYS_STEMP) return false; - if (strstr(edata->desc, "CPU A") != NULL) - return TRUE; - return false; -} - -static bool -is_cpu_b(const envsys_data_t *edata) -{ - if (edata->units != ENVSYS_STEMP) - return false; - if (strstr(edata->desc, "CPU B") != NULL) + if (strstr(edata->desc, "CPU") != NULL) return TRUE; return false; } @@ -462,7 +443,6 @@ fcu_adjust_zone(struct fcu_softc *sc, in fcu_fan_t *f; int temp, i, speed, diff; - if (z->nfans <= 0) return;
CVS commit: src/sys/arch/aarch64
Module Name:src Committed By: jmcneill Date: Sat Jul 24 23:38:41 UTC 2021 Modified Files: src/sys/arch/aarch64/conf: files.aarch64 Removed Files: src/sys/arch/aarch64/aarch64: cctr_machdep.c Log Message: aarch64: Remove empty source file and references to it. To generate a diff of this commit: cvs rdiff -u -r1.1 -r0 src/sys/arch/aarch64/aarch64/cctr_machdep.c cvs rdiff -u -r1.30 -r1.31 src/sys/arch/aarch64/conf/files.aarch64 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/conf/files.aarch64 diff -u src/sys/arch/aarch64/conf/files.aarch64:1.30 src/sys/arch/aarch64/conf/files.aarch64:1.31 --- src/sys/arch/aarch64/conf/files.aarch64:1.30 Wed Oct 21 13:31:50 2020 +++ src/sys/arch/aarch64/conf/files.aarch64 Sat Jul 24 23:38:41 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.aarch64,v 1.30 2020/10/21 13:31:50 christos Exp $ +# $NetBSD: files.aarch64,v 1.31 2021/07/24 23:38:41 jmcneill Exp $ defflag opt_cpuoptions.h AARCH64_ALIGNMENT_CHECK defflag opt_cpuoptions.h AARCH64_EL0_STACK_ALIGNMENT_CHECK @@ -53,7 +53,6 @@ defflag opt_pmapboot.h PMAPBOOT_DEBUG # MI support file dev/cons.c -#file kern/kern_cctr.c # DDB file arch/aarch64/aarch64/db_disasm.c ddb @@ -117,11 +116,6 @@ file uvm/pmap/pmap_pvt.c # EFI runtime (machdep) file arch/aarch64/aarch64/efi_machdep.c efi_runtime -# cyclecounter -#file arch/aarch64/aarch64/cctr_machdep.c -#file kern/kern_cctr.c - - # NetBSD 32-bit binary compatibility include "compat/netbsd32/files.netbsd32" file arch/aarch64/aarch64/netbsd32_machdep.c compat_netbsd32
CVS commit: src/sys/dev/eisa
Module Name:src Committed By: thorpej Date: Sat Jul 24 22:37:56 UTC 2021 Modified Files: src/sys/dev/eisa: eisadevs.h eisadevs_data.h Log Message: Regen: Add some Compaq display controllers. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/eisa/eisadevs.h cvs rdiff -u -r1.31 -r1.32 src/sys/dev/eisa/eisadevs_data.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/eisa/eisadevs.h diff -u src/sys/dev/eisa/eisadevs.h:1.30 src/sys/dev/eisa/eisadevs.h:1.31 --- src/sys/dev/eisa/eisadevs.h:1.30 Sun Dec 11 12:21:20 2005 +++ src/sys/dev/eisa/eisadevs.h Sat Jul 24 22:37:56 2021 @@ -1,10 +1,10 @@ -/* $NetBSD: eisadevs.h,v 1.30 2005/12/11 12:21:20 christos Exp $ */ +/* $NetBSD: eisadevs.h,v 1.31 2021/07/24 22:37:56 thorpej Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: eisadevs,v 1.27 2005/02/27 00:26:59 perry Exp + * NetBSD: eisadevs,v 1.30 2021/07/24 22:36:31 thorpej Exp */ /* @@ -38,6 +38,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + /* * List of known products, grouped and sorted by vendor code. */ @@ -65,6 +66,13 @@ #define EISA_PRODUCT_BUS6301 "BusLogic Bt763E Ethernet" /* Compaq products */ +#define EISA_PRODUCT_CPQ3001 "Compaq Advanced VGA" +#define EISA_PRODUCT_CPQ3011 "Compaq QVision 1024/E Video Controller" +#define EISA_PRODUCT_CPQ3021 "Compaq QVision 1024/I Video Controller" +#define EISA_PRODUCT_CPQ3111 "Compaq QVision 1024/E Graphics Controller" +#define EISA_PRODUCT_CPQ3112 "Compaq QVision 1280/E Graphics Controller" +#define EISA_PRODUCT_CPQ3121 "Compaq QVision 1024/I Graphics Controller" +#define EISA_PRODUCT_CPQ3122 "Compaq QVision 1280/I Graphics Controller" #define EISA_PRODUCT_CPQ4001 "Compaq IDA array controller" #define EISA_PRODUCT_CPQ4002 "Compaq IDA-2 array controller" #define EISA_PRODUCT_CPQ4010 "Compaq IEAS array controller" Index: src/sys/dev/eisa/eisadevs_data.h diff -u src/sys/dev/eisa/eisadevs_data.h:1.31 src/sys/dev/eisa/eisadevs_data.h:1.32 --- src/sys/dev/eisa/eisadevs_data.h:1.31 Sun Dec 11 12:21:20 2005 +++ src/sys/dev/eisa/eisadevs_data.h Sat Jul 24 22:37:56 2021 @@ -1,10 +1,10 @@ -/* $NetBSD: eisadevs_data.h,v 1.31 2005/12/11 12:21:20 christos Exp $ */ +/* $NetBSD: eisadevs_data.h,v 1.32 2021/07/24 22:37:56 thorpej Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: eisadevs,v 1.27 2005/02/27 00:26:59 perry Exp + * NetBSD: eisadevs,v 1.30 2021/07/24 22:36:31 thorpej Exp */ /* @@ -111,6 +111,41 @@ const struct eisa_knowndev eisa_knowndev }, { 0, + "CPQ3001", + EISA_PRODUCT_CPQ3001, + }, + { + 0, + "CPQ3011", + EISA_PRODUCT_CPQ3011, + }, + { + 0, + "CPQ3021", + EISA_PRODUCT_CPQ3021, + }, + { + 0, + "CPQ3111", + EISA_PRODUCT_CPQ3111, + }, + { + 0, + "CPQ3112", + EISA_PRODUCT_CPQ3112, + }, + { + 0, + "CPQ3121", + EISA_PRODUCT_CPQ3121, + }, + { + 0, + "CPQ3122", + EISA_PRODUCT_CPQ3122, + }, + { + 0, "CPQ4001", EISA_PRODUCT_CPQ4001, },
CVS commit: src/sys/dev/eisa
Module Name:src Committed By: thorpej Date: Sat Jul 24 22:36:31 UTC 2021 Modified Files: src/sys/dev/eisa: eisadevs Log Message: Add some Compaq display controllers. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/dev/eisa/eisadevs 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/eisa/eisadevs diff -u src/sys/dev/eisa/eisadevs:1.29 src/sys/dev/eisa/eisadevs:1.30 --- src/sys/dev/eisa/eisadevs:1.29 Wed Jan 21 14:18:44 2009 +++ src/sys/dev/eisa/eisadevs Sat Jul 24 22:36:31 2021 @@ -1,4 +1,4 @@ -$NetBSD: eisadevs,v 1.29 2009/01/21 14:18:44 jnemeth Exp $ +$NetBSD: eisadevs,v 1.30 2021/07/24 22:36:31 thorpej Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -86,6 +86,13 @@ product BUS 6001 Bt760 Ethernet product BUS 6301 Bt763E Ethernet /* Compaq products */ +product CPQ 3001 Advanced VGA +product CPQ 3011 QVision 1024/E Video Controller +product CPQ 3021 QVision 1024/I Video Controller +product CPQ 3111 QVision 1024/E Graphics Controller +product CPQ 3112 QVision 1280/E Graphics Controller +product CPQ 3121 QVision 1024/I Graphics Controller +product CPQ 3122 QVision 1280/I Graphics Controller product CPQ 4001 IDA array controller product CPQ 4002 IDA-2 array controller product CPQ 4010 IEAS array controller
CVS commit: src/sys/dev
Module Name:src Committed By: jmcneill Date: Sat Jul 24 22:33:23 UTC 2021 Modified Files: src/sys/dev: smbios.c Log Message: build fix To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/smbios.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/smbios.c diff -u src/sys/dev/smbios.c:1.2 src/sys/dev/smbios.c:1.3 --- src/sys/dev/smbios.c:1.2 Sat Jul 24 11:39:19 2021 +++ src/sys/dev/smbios.c Sat Jul 24 22:33:23 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: smbios.c,v 1.2 2021/07/24 11:39:19 jmcneill Exp $ */ +/* $NetBSD: smbios.c,v 1.3 2021/07/24 22:33:23 jmcneill Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -86,7 +86,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: smbios.c,v 1.2 2021/07/24 11:39:19 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smbios.c,v 1.3 2021/07/24 22:33:23 jmcneill Exp $"); #include #include @@ -138,7 +138,7 @@ smbios_map_memory(paddr_t pa, size_t siz } pmap_update(pmap_kernel()); - return (void *)(va + (pa - spa)); + return (void *)(uintptr_t)(va + (pa - spa)); } static void
CVS commit: src/sys
Module Name:src Committed By: andvar Date: Sat Jul 24 22:30:59 UTC 2021 Modified Files: src/sys/arch/acorn32/podulebus: if_ie.c src/sys/coda: coda_opstats.h src/sys/dev/pci: if_mcx.c if_vr.c Log Message: s/structres/structures + s/whenver/whenever To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/arch/acorn32/podulebus/if_ie.c cvs rdiff -u -r1.6 -r1.7 src/sys/coda/coda_opstats.h cvs rdiff -u -r1.17 -r1.18 src/sys/dev/pci/if_mcx.c cvs rdiff -u -r1.134 -r1.135 src/sys/dev/pci/if_vr.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/acorn32/podulebus/if_ie.c diff -u src/sys/arch/acorn32/podulebus/if_ie.c:1.48 src/sys/arch/acorn32/podulebus/if_ie.c:1.49 --- src/sys/arch/acorn32/podulebus/if_ie.c:1.48 Wed Feb 5 08:33:19 2020 +++ src/sys/arch/acorn32/podulebus/if_ie.c Sat Jul 24 22:30:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ie.c,v 1.48 2020/02/05 08:33:19 skrll Exp $ */ +/* $NetBSD: if_ie.c,v 1.49 2021/07/24 22:30:59 andvar Exp $ */ /* * Copyright (c) 1995 Melvin Tang-Richardson. @@ -53,7 +53,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.48 2020/02/05 08:33:19 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.49 2021/07/24 22:30:59 andvar Exp $"); #define IGNORE_ETHER1_IDROM_CHECKSUM @@ -94,7 +94,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1. #include #endif -/* Import our data structres */ +/* Import our data structures */ #include "if_iereg.h" Index: src/sys/coda/coda_opstats.h diff -u src/sys/coda/coda_opstats.h:1.6 src/sys/coda/coda_opstats.h:1.7 --- src/sys/coda/coda_opstats.h:1.6 Sun Dec 11 12:19:50 2005 +++ src/sys/coda/coda_opstats.h Sat Jul 24 22:30:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: coda_opstats.h,v 1.6 2005/12/11 12:19:50 christos Exp $ */ +/* $NetBSD: coda_opstats.h,v 1.7 2021/07/24 22:30:59 andvar Exp $ */ /* * @@ -104,7 +104,7 @@ #define CODA_VNODEOPS_SIZE 20 /* - * I propose the following structres: + * I propose the following structures: */ struct coda_op_stats { @@ -118,7 +118,7 @@ struct coda_op_stats { }; /* - * With each call to the minicache, we'll bump the counters whenver + * With each call to the minicache, we'll bump the counters whenever * a call is satisfied internally (through the cache or through a * redirect), and whenever an operation is caused internally. * Then, we can add the total operations caught by the minicache Index: src/sys/dev/pci/if_mcx.c diff -u src/sys/dev/pci/if_mcx.c:1.17 src/sys/dev/pci/if_mcx.c:1.18 --- src/sys/dev/pci/if_mcx.c:1.17 Sat Feb 20 13:31:35 2021 +++ src/sys/dev/pci/if_mcx.c Sat Jul 24 22:30:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_mcx.c,v 1.17 2021/02/20 13:31:35 jmcneill Exp $ */ +/* $NetBSD: if_mcx.c,v 1.18 2021/07/24 22:30:59 andvar Exp $ */ /* $OpenBSD: if_mcx.c,v 1.99 2021/02/15 03:42:00 dlg Exp $ */ /* @@ -23,7 +23,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: if_mcx.c,v 1.17 2021/02/20 13:31:35 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_mcx.c,v 1.18 2021/07/24 22:30:59 andvar Exp $"); #include #include @@ -332,7 +332,7 @@ struct mcx_cmdq_mailbox { #define MCX_CMDQ_MAILBOX_SIZE roundup(sizeof(struct mcx_cmdq_mailbox), \ MCX_CMDQ_MAILBOX_ALIGN) /* - * command mailbox structres + * command mailbox structures */ struct mcx_cmd_enable_hca_in { Index: src/sys/dev/pci/if_vr.c diff -u src/sys/dev/pci/if_vr.c:1.134 src/sys/dev/pci/if_vr.c:1.135 --- src/sys/dev/pci/if_vr.c:1.134 Sat May 8 00:27:02 2021 +++ src/sys/dev/pci/if_vr.c Sat Jul 24 22:30:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vr.c,v 1.134 2021/05/08 00:27:02 thorpej Exp $ */ +/* $NetBSD: if_vr.c,v 1.135 2021/07/24 22:30:59 andvar Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_vr.c,v 1.134 2021/05/08 00:27:02 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vr.c,v 1.135 2021/07/24 22:30:59 andvar Exp $"); @@ -174,7 +174,7 @@ static const struct device_compatible_en #define VR_NEXTRX(x) (((x) + 1) & VR_NRXDESC_MASK) /* - * Control data structres that are DMA'd to the Rhine chip. We allocate + * Control data structures that are DMA'd to the Rhine chip. We allocate * them in a single clump that maps to a single DMA segment to make several * things easier. *
CVS commit: src
Module Name:src Committed By: andvar Date: Sat Jul 24 21:31:39 UTC 2021 Modified Files: src/bin/ksh: tty.c src/common/dist/zlib: zlib.h src/crypto/dist/ipsec-tools/src/racoon: isakmp_cfg.c src/crypto/external/bsd/libsaslc/dist/src: error.h src/dist/pf/sbin/pfctl: pfctl_altq.c src/external/mit/lua/dist: lua2netbsd src/sys/arch/alpha/alpha: db_trace.c src/sys/arch/arm/broadcom: bcm2835_gpio.c src/sys/arch/arm/imx: imx51_ccm.c imx51_ccmreg.h src/sys/arch/arm/xscale: ixp425_npe.c ixp425_npereg.h src/sys/arch/cesfic/cesfic: pmap_bootstrap.c src/sys/arch/cobalt/stand/boot: tlp.c src/sys/arch/emips/ebus: ace_ebus.c flash_ebus.c src/sys/arch/emips/stand/common: ace.c raw.c src/sys/arch/evbmips/stand/sbmips/common: blkdev.c src/sys/arch/hp300/hp300: pmap_bootstrap.c src/sys/arch/hppa/dev: ssio.c src/sys/arch/ia64/ia64: trap.c src/sys/arch/m68k/060sp/dist: isp.s src/sys/arch/m68k/m68k: db_disasm.c src/sys/arch/mac68k/mac68k: pmap_bootstrap.c src/sys/arch/macppc/dev: pbms.c src/sys/arch/mips/rmi: rmixlreg.h src/sys/arch/mipsco/stand/common: saio.c src/sys/arch/mvme68k/dev: sbicvar.h src/sys/arch/pmax/ibus: sii.c src/sys/arch/pmax/stand/common: rz.c src/sys/arch/powerpc/booke: spe_subr.S src/sys/arch/powerpc/powerpc: db_interface.c src/sys/arch/powerpc/stand/mkbootimage: rs6000_bootrec.h src/sys/arch/prep/pnpbus: fdc_pnpbus.c src/sys/arch/prep/stand/boot: siop.c src/sys/arch/sgimips/sgimips: machdep.c src/sys/arch/sh3/sh3: exception_vector.S pmap.c src/sys/arch/sparc/stand/bootblk: bootblk.fth src/sys/arch/sparc64/dev: iommuvar.h src/sys/arch/usermode/usermode: pmap.c src/sys/arch/vax/vax: db_disasm.c src/sys/arch/xen/xen: xenevt.c src/sys/dev: vnd.c src/sys/dev/bi: kdbreg.h src/sys/dev/cardbus: fwohci_cardbus.c src/sys/dev/dm: dm_ioctl.c dm_target_flakey.c src/sys/dev/hpc: files.hpcio src/sys/dev/ic: adw.c ahcisatareg.h aic79xx.c aic7xxx.c cs89x0.c lemacreg.h mfireg.h mpt_mpilib.h src/sys/dev/ieee1394: fwdma.c src/sys/dev/isa: README.seagate sbdsp.c src/sys/dev/marvell: gtidmac.c src/sys/dev/microcode/aic7xxx: aicasm.c src/sys/dev/pci: if_ena.c if_vge.c if_vgereg.h src/sys/dev/pci/ixgbe: ixgbe_common.c src/sys/dev/spi: mcp23s17.c src/sys/fs/msdosfs: msdosfs_lookup.c src/sys/fs/nilfs: nilfs_vnops.c src/sys/fs/puffs: puffs_vnops.c src/sys/fs/udf: udf_allocation.c udf_subr.c udf_vfsops.c udf_vnops.c src/sys/net80211: ieee80211_ioctl.c ieee80211_output.c ieee80211_proto.c ieee80211_proto.h src/sys/netinet: sctp_output.c sctputil.c src/sys/sys: disk.h src/usr.bin/config: TODO src/usr.sbin/altq/altqstat: altqstat.c src/usr.sbin/lpr/lpd: recvjob.c src/usr.sbin/sysinst/arch/mac68k: menus.md.de menus.md.en menus.md.es menus.md.pl src/usr.sbin/ypserv/yppush: yppush.c Log Message: Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889. Also fixed some additional typos in comments, found on review of same files or typos. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/bin/ksh/tty.c cvs rdiff -u -r1.4 -r1.5 src/common/dist/zlib/zlib.h cvs rdiff -u -r1.28 -r1.29 \ src/crypto/dist/ipsec-tools/src/racoon/isakmp_cfg.c cvs rdiff -u -r1.3 -r1.4 src/crypto/external/bsd/libsaslc/dist/src/error.h cvs rdiff -u -r1.10 -r1.11 src/dist/pf/sbin/pfctl/pfctl_altq.c cvs rdiff -u -r1.2 -r1.3 src/external/mit/lua/dist/lua2netbsd cvs rdiff -u -r1.29 -r1.30 src/sys/arch/alpha/alpha/db_trace.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/broadcom/bcm2835_gpio.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/imx/imx51_ccm.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/imx/imx51_ccmreg.h cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/xscale/ixp425_npe.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/xscale/ixp425_npereg.h cvs rdiff -u -r1.34 -r1.35 src/sys/arch/cesfic/cesfic/pmap_bootstrap.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/cobalt/stand/boot/tlp.c cvs rdiff -u -r1.23 -r1.24 src/sys/arch/emips/ebus/ace_ebus.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/emips/ebus/flash_ebus.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/emips/stand/common/ace.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/emips/stand/common/raw.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbmips/stand/sbmips/common/blkdev.c cvs rdiff -u -r1.59 -r1.60 src/sys/arch/hp300/hp300/pmap_bootstrap.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hppa/dev/ssio.c cvs rdiff -u -r1.14 -r1.15 src/sys/arch/ia64/ia64/trap.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/m68k/060sp/dist/isp.s cvs rdiff -u -r
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: jmcneill Date: Sat Jul 24 20:45:45 UTC 2021 Modified Files: src/sys/arch/x86/x86: bios32.c Log Message: Build fix: vtophys takes vaddr_t, not a ptr To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x86/x86/bios32.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/bios32.c diff -u src/sys/arch/x86/x86/bios32.c:1.6 src/sys/arch/x86/x86/bios32.c:1.7 --- src/sys/arch/x86/x86/bios32.c:1.6 Sat Jul 24 11:39:19 2021 +++ src/sys/arch/x86/x86/bios32.c Sat Jul 24 20:45:45 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: bios32.c,v 1.6 2021/07/24 11:39:19 jmcneill Exp $ */ +/* $NetBSD: bios32.c,v 1.7 2021/07/24 20:45:45 jmcneill Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -86,7 +86,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bios32.c,v 1.6 2021/07/24 11:39:19 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bios32.c,v 1.7 2021/07/24 20:45:45 jmcneill Exp $"); #include #include @@ -252,7 +252,7 @@ smbios2_map_kva(const uint8_t *p) if (eva == 0) return; - smbios_entry.hdrphys = vtophys(p); + smbios_entry.hdrphys = vtophys((vaddr_t)p); smbios_entry.tabphys = sh->addr; smbios_entry.addr = (uint8_t *)(eva + (sh->addr & PGOFSET)); smbios_entry.len = sh->size; @@ -287,7 +287,7 @@ smbios3_map_kva(const uint8_t *p) if (eva == 0) return; - smbios_entry.hdrphys = vtophys(p); + smbios_entry.hdrphys = vtophys((vaddr_t)p); smbios_entry.tabphys = sh->addr; smbios_entry.addr = (uint8_t *)(eva + ((vaddr_t)sh->addr & PGOFSET)); smbios_entry.len = sh->size;
CVS commit: src/sys/dev/eisa
Module Name:src Committed By: thorpej Date: Sat Jul 24 19:14:35 UTC 2021 Modified Files: src/sys/dev/eisa: depca_eisa.c Log Message: Report our interrupt trigger type. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/dev/eisa/depca_eisa.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/eisa/depca_eisa.c diff -u src/sys/dev/eisa/depca_eisa.c:1.16 src/sys/dev/eisa/depca_eisa.c:1.17 --- src/sys/dev/eisa/depca_eisa.c:1.16 Mon Jul 12 16:44:52 2021 +++ src/sys/dev/eisa/depca_eisa.c Sat Jul 24 19:14:35 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: depca_eisa.c,v 1.16 2021/07/12 16:44:52 thorpej Exp $ */ +/* $NetBSD: depca_eisa.c,v 1.17 2021/07/24 19:14:35 thorpej Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: depca_eisa.c,v 1.16 2021/07/12 16:44:52 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: depca_eisa.c,v 1.17 2021/07/24 19:14:35 thorpej Exp $"); #include "opt_inet.h" @@ -175,9 +175,11 @@ depca_eisa_intr_establish(struct depca_s aprint_error("\n"); return (NULL); } - if (intrstr != NULL) - aprint_normal_dev(sc->sc_dev, "interrupting at %s\n", - intrstr); + if (intrstr != NULL) { + aprint_normal_dev(sc->sc_dev, + "interrupting at %s (%s trigger)\n", + (esc->sc_ist == IST_LEVEL) ? "level" : "edge", intrstr); + } return (rv); }
CVS commit: src/sys/dev/eisa
Module Name:src Committed By: thorpej Date: Sat Jul 24 19:06:25 UTC 2021 Modified Files: src/sys/dev/eisa: mlx_eisa.c Log Message: Noralize autoconfiguration messages, and report interrupt trigger type. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/eisa/mlx_eisa.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/eisa/mlx_eisa.c diff -u src/sys/dev/eisa/mlx_eisa.c:1.28 src/sys/dev/eisa/mlx_eisa.c:1.29 --- src/sys/dev/eisa/mlx_eisa.c:1.28 Sat Apr 24 23:36:53 2021 +++ src/sys/dev/eisa/mlx_eisa.c Sat Jul 24 19:06:25 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: mlx_eisa.c,v 1.28 2021/04/24 23:36:53 thorpej Exp $ */ +/* $NetBSD: mlx_eisa.c,v 1.29 2021/07/24 19:06:25 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mlx_eisa.c,v 1.28 2021/04/24 23:36:53 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mlx_eisa.c,v 1.29 2021/07/24 19:06:25 thorpej Exp $"); #include #include @@ -113,16 +113,32 @@ mlx_eisa_attach(device_t parent, device_ struct mlx_softc *mlx; bus_space_tag_t iot; const char *intrstr; - int irq, icfg; + int irq, ist, icfg; char intrbuf[EISA_INTRSTR_LEN]; mlx = device_private(self); iot = ea->ea_iot; ec = ea->ea_ec; + dce = eisa_compatible_lookup(ea, compat_data); + KASSERT(dce != NULL); + + mlx->mlx_ci.ci_nchan = (int)dce->value; + mlx->mlx_ci.ci_iftype = 1; + + mlx->mlx_submit = mlx_v1_submit; + mlx->mlx_findcomplete = mlx_v1_findcomplete; + mlx->mlx_intaction = mlx_v1_intaction; + mlx->mlx_fw_handshake = mlx_v1_fw_handshake; +#ifdef MLX_RESET + mlx->mlx_reset = mlx_v1_reset; +#endif + + aprint_normal(": Mylex RAID\n"); + if (bus_space_map(iot, EISA_SLOT_ADDR(ea->ea_slot) + MLX_EISA_SLOT_OFFSET, MLX_EISA_IOSIZE, 0, &ioh)) { - aprint_error(": can't map i/o space\n"); + aprint_error_dev(self, "can't map i/o space\n"); return; } @@ -150,42 +166,32 @@ mlx_eisa_attach(device_t parent, device_ irq = 15; break; default: - aprint_error(": controller on invalid IRQ\n"); + aprint_error_dev(self, + "controller on invalid IRQ (icfg=0x%02x)\n", icfg); return; } + ist = (icfg & 0x08) != 0 ? IST_LEVEL : IST_EDGE; + if (eisa_intr_map(ec, irq, &ih)) { - aprint_error(": can't map interrupt (%d)\n", irq); + aprint_error_dev(self, "can't map interrupt (%d)\n", irq); return; } intrstr = eisa_intr_string(ec, ih, intrbuf, sizeof(intrbuf)); - mlx->mlx_ih = eisa_intr_establish(ec, ih, - ((icfg & 0x08) != 0 ? IST_LEVEL : IST_EDGE), - IPL_BIO, mlx_intr, mlx); + mlx->mlx_ih = eisa_intr_establish(ec, ih, ist, IPL_BIO, mlx_intr, mlx); if (mlx->mlx_ih == NULL) { - aprint_error(": can't establish interrupt"); + aprint_error_dev(self, "can't establish interrupt"); if (intrstr != NULL) - aprint_normal(" at %s", intrstr); - aprint_normal("\n"); + aprint_error(" at %s", intrstr); + aprint_error("\n"); return; } + if (intrstr != NULL) { + aprint_normal_dev(self, "interrupting at %s (%s trigger)\n", + ist == IST_EDGE ? "edge" : "level", intrstr); + } - dce = eisa_compatible_lookup(ea, compat_data); - KASSERT(dce != NULL); - - mlx->mlx_ci.ci_nchan = (int)dce->value; - mlx->mlx_ci.ci_iftype = 1; - - mlx->mlx_submit = mlx_v1_submit; - mlx->mlx_findcomplete = mlx_v1_findcomplete; - mlx->mlx_intaction = mlx_v1_intaction; - mlx->mlx_fw_handshake = mlx_v1_fw_handshake; -#ifdef MLX_RESET - mlx->mlx_reset = mlx_v1_reset; -#endif - - aprint_normal(": Mylex RAID\n"); mlx_init(mlx, intrstr); }
CVS commit: src/sys/dev/eisa
Module Name:src Committed By: thorpej Date: Sat Jul 24 18:50:07 UTC 2021 Modified Files: src/sys/dev/eisa: if_tlp_eisa.c Log Message: Report which trigger type we're using for our interrupt. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/eisa/if_tlp_eisa.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/eisa/if_tlp_eisa.c diff -u src/sys/dev/eisa/if_tlp_eisa.c:1.28 src/sys/dev/eisa/if_tlp_eisa.c:1.29 --- src/sys/dev/eisa/if_tlp_eisa.c:1.28 Wed Jan 27 04:35:15 2021 +++ src/sys/dev/eisa/if_tlp_eisa.c Sat Jul 24 18:50:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tlp_eisa.c,v 1.28 2021/01/27 04:35:15 thorpej Exp $ */ +/* $NetBSD: if_tlp_eisa.c,v 1.29 2021/07/24 18:50:07 thorpej Exp $ */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_tlp_eisa.c,v 1.28 2021/01/27 04:35:15 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tlp_eisa.c,v 1.29 2021/07/24 18:50:07 thorpej Exp $"); #include "opt_inet.h" @@ -150,7 +150,7 @@ tlp_eisa_attach(device_t parent, device_ const struct tulip_eisa_product *tep; u_int8_t enaddr[ETHER_ADDR_LEN], tmpbuf[sizeof(testpat)]; u_int32_t val; - int irq, i, cnt; + int irq, ist, i, cnt; char intrbuf[EISA_INTRSTR_LEN]; /* @@ -244,6 +244,7 @@ tlp_eisa_attach(device_t parent, device_ */ val = bus_space_read_4(iot, ioh, DE425_CFG0); irq = tlp_eisa_irqs[(val >> 1) & 0x03]; + ist = (val & 0x01) ? IST_EDGE : IST_LEVEL; /* * Map and establish our interrupt. @@ -253,8 +254,7 @@ tlp_eisa_attach(device_t parent, device_ return; } intrstr = eisa_intr_string(ec, ih, intrbuf, sizeof(intrbuf)); - esc->sc_ih = eisa_intr_establish(ec, ih, - (val & 0x01) ? IST_EDGE : IST_LEVEL, IPL_NET, tlp_intr, sc); + esc->sc_ih = eisa_intr_establish(ec, ih, ist, IPL_NET, tlp_intr, sc); if (esc->sc_ih == NULL) { aprint_error_dev(self, "unable to establish interrupt"); if (intrstr != NULL) @@ -262,8 +262,10 @@ tlp_eisa_attach(device_t parent, device_ aprint_error("\n"); return; } - if (intrstr != NULL) - aprint_normal_dev(self, "interrupting at %s\n", intrstr); + if (intrstr != NULL) { + aprint_normal_dev(self, "interrupting at %s (%s trigger)\n", + ist == IST_EDGE ? "edge" : "level", intrstr); + } /* * Finish off the attach.
CVS commit: src/etc/etc.evbarm
Module Name:src Committed By: jmcneill Date: Sat Jul 24 17:07:59 UTC 2021 Modified Files: src/etc/etc.evbarm: Makefile.inc Log Message: aarch64: Restrict KERNEL_SUFFIXES to img only To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/etc/etc.evbarm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.evbarm/Makefile.inc diff -u src/etc/etc.evbarm/Makefile.inc:1.123 src/etc/etc.evbarm/Makefile.inc:1.124 --- src/etc/etc.evbarm/Makefile.inc:1.123 Thu May 27 08:43:02 2021 +++ src/etc/etc.evbarm/Makefile.inc Sat Jul 24 17:07:59 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.123 2021/05/27 08:43:02 rin Exp $ +# $NetBSD: Makefile.inc,v 1.124 2021/07/24 17:07:59 jmcneill Exp $ # # etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets # @@ -173,7 +173,11 @@ SNAP_MD_POST_DEPS+= smp_rpi_inst snap_md_post: check_DESTDIR check_RELEASEDIR snap_post .WAIT ${SNAP_MD_POST_DEPS} +.if !empty(MACHINE_ARCH:Maarch64*) +KERNEL_SUFFIXES= img +.else KERNEL_SUFFIXES= bin img srec ub +.endif INSTALLATION_DIRS+= binary/gzimg \ installation/instkernel
CVS commit: src/distrib/amd64/liveimage/emuimage
Module Name:src Committed By: jmcneill Date: Sat Jul 24 16:13:45 UTC 2021 Modified Files: src/distrib/amd64/liveimage/emuimage: Makefile spec.emuimage Added Files: src/distrib/amd64/liveimage/emuimage: rc.conf.emuimage Removed Files: src/distrib/amd64/liveimage/emuimage: dhcpcd ec2_init resize_disklabel resize_root sshd Log Message: amd64: liveimage: use RC_CONF_EXTRA instead of rc.conf.d To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/distrib/amd64/liveimage/emuimage/Makefile cvs rdiff -u -r1.1 -r0 src/distrib/amd64/liveimage/emuimage/dhcpcd \ src/distrib/amd64/liveimage/emuimage/resize_disklabel \ src/distrib/amd64/liveimage/emuimage/resize_root \ src/distrib/amd64/liveimage/emuimage/sshd cvs rdiff -u -r1.4 -r0 src/distrib/amd64/liveimage/emuimage/ec2_init cvs rdiff -u -r0 -r1.1 src/distrib/amd64/liveimage/emuimage/rc.conf.emuimage cvs rdiff -u -r1.1 -r1.2 src/distrib/amd64/liveimage/emuimage/spec.emuimage Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/amd64/liveimage/emuimage/Makefile diff -u src/distrib/amd64/liveimage/emuimage/Makefile:1.8 src/distrib/amd64/liveimage/emuimage/Makefile:1.9 --- src/distrib/amd64/liveimage/emuimage/Makefile:1.8 Wed Aug 5 01:35:18 2020 +++ src/distrib/amd64/liveimage/emuimage/Makefile Sat Jul 24 16:13:44 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2020/08/05 01:35:18 jmcneill Exp $ +# $NetBSD: Makefile,v 1.9 2021/07/24 16:13:44 jmcneill Exp $ LIVEIMGBASE= NetBSD-${DISTRIBVER}-amd64-live # gives ${IMGBASE}.img @@ -10,13 +10,9 @@ IMAGEHOSTNAME= netbsd FILESDIR!= cd ${.CURDIR}/../../../utils/embedded/files ; pwd SPEC_EXTRA= ${.CURDIR}/spec.emuimage +RC_CONF_EXTRA= ${.CURDIR}/rc.conf.emuimage IMGFILE_EXTRA=\ ${FILESDIR}/ec2_init etc/rc.d/ec2_init \ - ${FILESDIR}/resize_disklabel etc/rc.d/resize_disklabel \ - ${.CURDIR}/dhcpcd etc/rc.conf.d/dhcpcd \ - ${.CURDIR}/ec2_init etc/rc.conf.d/ec2_init \ - ${.CURDIR}/resize_disklabel etc/rc.conf.d/resize_disklabel \ - ${.CURDIR}/resize_root etc/rc.conf.d/resize_root \ - ${.CURDIR}/sshd etc/rc.conf.d/sshd + ${FILESDIR}/resize_disklabel etc/rc.d/resize_disklabel .include "${.CURDIR}/../Makefile.liveimage" Index: src/distrib/amd64/liveimage/emuimage/spec.emuimage diff -u src/distrib/amd64/liveimage/emuimage/spec.emuimage:1.1 src/distrib/amd64/liveimage/emuimage/spec.emuimage:1.2 --- src/distrib/amd64/liveimage/emuimage/spec.emuimage:1.1 Wed Aug 5 01:35:18 2020 +++ src/distrib/amd64/liveimage/emuimage/spec.emuimage Sat Jul 24 16:13:44 2021 @@ -1,8 +1,3 @@ -# $NetBSD: spec.emuimage,v 1.1 2020/08/05 01:35:18 jmcneill Exp $ -./etc/rc.conf.d/dhcpcd type=file mode=0644 uname=root gname=wheel -./etc/rc.conf.d/ec2_init type=file mode=0644 uname=root gname=wheel -./etc/rc.conf.d/resize_disklabel type=file mode=0644 uname=root gname=wheel -./etc/rc.conf.d/resize_root type=file mode=0644 uname=root gname=wheel -./etc/rc.conf.d/sshd type=file mode=0644 uname=root gname=wheel +# $NetBSD: spec.emuimage,v 1.2 2021/07/24 16:13:44 jmcneill Exp $ ./etc/rc.d/ec2_init type=file mode=0555 uname=root gname=wheel ./etc/rc.d/resize_disklabel type=file mode=0555 uname=root gname=wheel Added files: Index: src/distrib/amd64/liveimage/emuimage/rc.conf.emuimage diff -u /dev/null src/distrib/amd64/liveimage/emuimage/rc.conf.emuimage:1.1 --- /dev/null Sat Jul 24 16:13:45 2021 +++ src/distrib/amd64/liveimage/emuimage/rc.conf.emuimage Sat Jul 24 16:13:44 2021 @@ -0,0 +1,36 @@ +# $NetBSD: rc.conf.emuimage,v 1.1 2021/07/24 16:13:44 jmcneill Exp $ + +is_ec2() { + val=NO + # Look for the string "amazon" in one of these sysctl nodes + for node in machdep.dmi.system-vendor \ + machdep.dmi.system-version \ + machdep.dmi.bios-version \ + machdep.xen.version ; do + if /sbin/sysctl -q $node; then + nodeval="$(/sbin/sysctl -n $node | tr '[A-Z]' '[a-z]')" + case "$nodeval" in + *amazon*) +val=YES +;; + # OpenStack is not EC2 but it does have a metadata service. + *openstack*) +val=YES +;; + esac + fi + done + printf $val +} + +resize_disklabel=YES +resize_root=YES +resize_root_flags="-p" +resize_root_postcmd="/sbin/reboot -n" +dhcpcd=YES +sshd=YES +ec2_init=$(is_ec2) + +if checkyesno ec2_init; then + dhcpcd_flags="$dhcpcd_flags -w" +fi
CVS commit: src/tests/usr.sbin
Module Name:src Committed By: gson Date: Sat Jul 24 15:56:06 UTC 2021 Modified Files: src/tests/usr.sbin/execsnoop: t_execsnoop.sh src/tests/usr.sbin/opensnoop: t_opensnoop.sh Log Message: Create temporary files in . rather than /tmp so that they get cleaned up automatically by atf. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/usr.sbin/execsnoop/t_execsnoop.sh cvs rdiff -u -r1.4 -r1.5 src/tests/usr.sbin/opensnoop/t_opensnoop.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.sbin/execsnoop/t_execsnoop.sh diff -u src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.4 src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.5 --- src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.4 Sun Jul 18 06:24:58 2021 +++ src/tests/usr.sbin/execsnoop/t_execsnoop.sh Sat Jul 24 15:56:05 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_execsnoop.sh,v 1.4 2021/07/18 06:24:58 dholland Exp $ +# $NetBSD: t_execsnoop.sh,v 1.5 2021/07/24 15:56:05 gson Exp $ # # Copyright (c) 2020 The NetBSD Foundation, Inc. # All rights reserved. @@ -27,7 +27,7 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # -tmp="/tmp/execsnoop" +tmp="execsnoop.out" atf_test_case basic cleanup basic_head() { @@ -60,10 +60,6 @@ basic_body() { } basic_cleanup() { - - if [ -f $tmp ]; then - rm $tmp - fi } atf_init_test_cases() { Index: src/tests/usr.sbin/opensnoop/t_opensnoop.sh diff -u src/tests/usr.sbin/opensnoop/t_opensnoop.sh:1.4 src/tests/usr.sbin/opensnoop/t_opensnoop.sh:1.5 --- src/tests/usr.sbin/opensnoop/t_opensnoop.sh:1.4 Sat Jul 11 09:55:26 2020 +++ src/tests/usr.sbin/opensnoop/t_opensnoop.sh Sat Jul 24 15:56:05 2021 @@ -1,4 +1,4 @@ -# $NetBSD: t_opensnoop.sh,v 1.4 2020/07/11 09:55:26 jruoho Exp $ +# $NetBSD: t_opensnoop.sh,v 1.5 2021/07/24 15:56:05 gson Exp $ # # Copyright (c) 2020 The NetBSD Foundation, Inc. # All rights reserved. @@ -27,7 +27,7 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # -tmp="/tmp/opensnoop" +tmp="opensnoop.out" atf_test_case basic cleanup basic_head() { @@ -62,10 +62,6 @@ basic_body() { } basic_cleanup() { - - if [ -f $tmp ]; then - rm $tmp - fi } atf_init_test_cases() {
CVS commit: src/sys/dev/eisa
Module Name:src Committed By: thorpej Date: Sat Jul 24 15:52:16 UTC 2021 Modified Files: src/sys/dev/eisa: ahb.c Log Message: Don't blindly establish our interrupt handler as IST_LEVEL. If the INTDEF register has the INTHIGH bit set, the controller is going to keep the line low when *not* asserting an interrupt, and since EISA level-tiggered interrupts are active-low, this would result in a forever-interrupt-storm. So, if INTHIGH is set in INTDEF, establish our interrupt handler as IST_EDGE, which will program the EISA PIC to detect the interrupt on the rising edge of the IRQ line. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/dev/eisa/ahb.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/eisa/ahb.c diff -u src/sys/dev/eisa/ahb.c:1.66 src/sys/dev/eisa/ahb.c:1.67 --- src/sys/dev/eisa/ahb.c:1.66 Sat Apr 24 23:36:53 2021 +++ src/sys/dev/eisa/ahb.c Sat Jul 24 15:52:16 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ahb.c,v 1.66 2021/04/24 23:36:53 thorpej Exp $ */ +/* $NetBSD: ahb.c,v 1.67 2021/07/24 15:52:16 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ahb.c,v 1.66 2021/04/24 23:36:53 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahb.c,v 1.67 2021/07/24 15:52:16 thorpej Exp $"); #include "opt_ddb.h" @@ -112,6 +112,7 @@ struct ahb_softc { struct ahb_probe_data { int sc_irq; + int sc_ist; int sc_scsi_dev; }; @@ -251,7 +252,7 @@ ahbattach(device_t parent, device_t self return; } intrstr = eisa_intr_string(ec, ih, intrbuf, sizeof(intrbuf)); - sc->sc_ih = eisa_intr_establish(ec, ih, IST_LEVEL, IPL_BIO, + sc->sc_ih = eisa_intr_establish(ec, ih, apd.sc_ist, IPL_BIO, ahbintr, sc); if (sc->sc_ih == NULL) { aprint_error_dev(sc->sc_dev, "couldn't establish interrupt"); @@ -260,8 +261,11 @@ ahbattach(device_t parent, device_t self aprint_error("\n"); return; } - if (intrstr != NULL) - aprint_normal_dev(sc->sc_dev, "interrupting at %s\n", intrstr); + if (intrstr != NULL) { + aprint_normal_dev(sc->sc_dev, + "interrupting at %s (%s trigger)\n", intrstr, + apd.sc_ist == IST_EDGE ? "edge" : "level"); + } /* * ask the adapter what subunits are present @@ -609,7 +613,7 @@ ahb_find(bus_space_tag_t iot, bus_space_ struct ahb_probe_data *sc) { u_char intdef; - int i, irq, busid; + int i, irq, ist, busid; int wait = 1000; /* 1 sec enough? */ bus_space_write_1(iot, ioh, PORTADDR, PORTADDR_ENHANCED); @@ -676,6 +680,21 @@ ahb_find(bus_space_tag_t iot, bus_space_ return EIO; } + /* + * On EISA, edge triggered interrupts are signalled by the rising + * edge of the interrupt signal, while level tiggered interrupts + * are signalled so long as the interrupt signal is driven low. + * + * So, if the controller is configured for active-high interrupts, + * that is "edge trigger" in our parlance, while active-low would + * be "level trigger". + */ + if (intdef & INTHIGH) { + ist = IST_EDGE; + } else { + ist = IST_LEVEL; + } + bus_space_write_1(iot, ioh, INTDEF, (intdef | INTEN)); /* make sure we can interrupt */ /* who are we on the scsi bus? */ @@ -684,6 +703,7 @@ ahb_find(bus_space_tag_t iot, bus_space_ /* if we want to return data, do so now */ if (sc) { sc->sc_irq = irq; + sc->sc_ist = ist; sc->sc_scsi_dev = busid; }
CVS commit: src/sys/dev/eisa
Module Name:src Committed By: thorpej Date: Sat Jul 24 15:44:16 UTC 2021 Modified Files: src/sys/dev/eisa: ahbreg.h Log Message: Correct the comment about the INTHIGH bit in the INTDEF register. It does indeed mean "IRQ signal is active-high", but "else edge" is not correct; level-triggered EISA interrupt are active-low, and edge-triggered EISA interrupts are rising-edge, so INTHIGH would in fact mean "edge". To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/dev/eisa/ahbreg.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/eisa/ahbreg.h diff -u src/sys/dev/eisa/ahbreg.h:1.16 src/sys/dev/eisa/ahbreg.h:1.17 --- src/sys/dev/eisa/ahbreg.h:1.16 Mon Apr 28 20:23:48 2008 +++ src/sys/dev/eisa/ahbreg.h Sat Jul 24 15:44:16 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ahbreg.h,v 1.16 2008/04/28 20:23:48 martin Exp $ */ +/* $NetBSD: ahbreg.h,v 1.17 2021/07/24 15:44:16 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ typedef u_int32_t physlen; #define INT12 0x03 #define INT14 0x05 #define INT15 0x06 -#define INTHIGH 0x08 /* int high=ACTIVE (else edge) */ +#define INTHIGH 0x08 /* interrupt signal is active-high */ #define INTEN 0x10 / bit definitions for SCSIDEF / #define HSCSIID 0x0F /* our SCSI ID */
CVS commit: src/distrib/evbarm/liveimage/armimage
Module Name:src Committed By: jmcneill Date: Sat Jul 24 14:00:08 UTC 2021 Modified Files: src/distrib/evbarm/liveimage/armimage: Makefile spec.armimage Added Files: src/distrib/evbarm/liveimage/armimage: rc.conf.armimage Removed Files: src/distrib/evbarm/liveimage/armimage: dhcpcd ec2_init resize_gpt resize_root sshd Log Message: evbarm: liveimage: use RC_CONF_EXTRA instead of rc.conf.d To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/evbarm/liveimage/armimage/Makefile \ src/distrib/evbarm/liveimage/armimage/spec.armimage cvs rdiff -u -r1.1 -r0 src/distrib/evbarm/liveimage/armimage/dhcpcd \ src/distrib/evbarm/liveimage/armimage/ec2_init \ src/distrib/evbarm/liveimage/armimage/resize_gpt \ src/distrib/evbarm/liveimage/armimage/resize_root \ src/distrib/evbarm/liveimage/armimage/sshd cvs rdiff -u -r0 -r1.1 src/distrib/evbarm/liveimage/armimage/rc.conf.armimage Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/evbarm/liveimage/armimage/Makefile diff -u src/distrib/evbarm/liveimage/armimage/Makefile:1.1 src/distrib/evbarm/liveimage/armimage/Makefile:1.2 --- src/distrib/evbarm/liveimage/armimage/Makefile:1.1 Fri Jul 23 21:53:34 2021 +++ src/distrib/evbarm/liveimage/armimage/Makefile Sat Jul 24 14:00:08 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2021/07/23 21:53:34 jmcneill Exp $ +# $NetBSD: Makefile,v 1.2 2021/07/24 14:00:08 jmcneill Exp $ LIVEIMGBASE= NetBSD-${DISTRIBVER}-${MACHINE_ARCH}-live # gives ${IMGBASE}.img @@ -10,13 +10,9 @@ IMAGEHOSTNAME= netbsd FILESDIR!= cd ${.CURDIR}/../../../utils/embedded/files ; pwd SPEC_EXTRA= ${.CURDIR}/spec.armimage +RC_CONF_EXTRA= ${.CURDIR}/rc.conf.armimage IMGFILE_EXTRA=\ ${FILESDIR}/ec2_init etc/rc.d/ec2_init \ - ${FILESDIR}/resize_gpt etc/rc.d/resize_gpt \ - ${.CURDIR}/dhcpcd etc/rc.conf.d/dhcpcd \ - ${.CURDIR}/ec2_init etc/rc.conf.d/ec2_init \ - ${.CURDIR}/resize_gpt etc/rc.conf.d/resize_gpt \ - ${.CURDIR}/resize_root etc/rc.conf.d/resize_root \ - ${.CURDIR}/sshd etc/rc.conf.d/sshd + ${FILESDIR}/resize_gpt etc/rc.d/resize_gpt .include "${.CURDIR}/../Makefile.liveimage" Index: src/distrib/evbarm/liveimage/armimage/spec.armimage diff -u src/distrib/evbarm/liveimage/armimage/spec.armimage:1.1 src/distrib/evbarm/liveimage/armimage/spec.armimage:1.2 --- src/distrib/evbarm/liveimage/armimage/spec.armimage:1.1 Fri Jul 23 21:53:34 2021 +++ src/distrib/evbarm/liveimage/armimage/spec.armimage Sat Jul 24 14:00:08 2021 @@ -1,8 +1,3 @@ -# $NetBSD: spec.armimage,v 1.1 2021/07/23 21:53:34 jmcneill Exp $ -./etc/rc.conf.d/dhcpcd type=file mode=0644 uname=root gname=wheel -./etc/rc.conf.d/ec2_init type=file mode=0644 uname=root gname=wheel -./etc/rc.conf.d/resize_gpt type=file mode=0644 uname=root gname=wheel -./etc/rc.conf.d/resize_root type=file mode=0644 uname=root gname=wheel -./etc/rc.conf.d/sshd type=file mode=0644 uname=root gname=wheel +# $NetBSD: spec.armimage,v 1.2 2021/07/24 14:00:08 jmcneill Exp $ ./etc/rc.d/ec2_init type=file mode=0555 uname=root gname=wheel ./etc/rc.d/resize_gpt type=file mode=0555 uname=root gname=wheel Added files: Index: src/distrib/evbarm/liveimage/armimage/rc.conf.armimage diff -u /dev/null src/distrib/evbarm/liveimage/armimage/rc.conf.armimage:1.1 --- /dev/null Sat Jul 24 14:00:08 2021 +++ src/distrib/evbarm/liveimage/armimage/rc.conf.armimage Sat Jul 24 14:00:08 2021 @@ -0,0 +1,36 @@ +# $NetBSD: rc.conf.armimage,v 1.1 2021/07/24 14:00:08 jmcneill Exp $ + +is_ec2() { + val=NO + # Look for the string "amazon" in one of these sysctl nodes + for node in machdep.dmi.system-vendor \ + machdep.dmi.system-version \ + machdep.dmi.bios-version \ + machdep.xen.version ; do + if /sbin/sysctl -q $node; then + nodeval="$(/sbin/sysctl -n $node | tr '[A-Z]' '[a-z]')" + case "$nodeval" in + *amazon*) +val=YES +;; + # OpenStack is not EC2 but it does have a metadata service. + *openstack*) +val=YES +;; + esac + fi + done + printf $val +} + +resize_gpt=YES +resize_root=YES +resize_root_flags="-p" +resize_root_postcmd="/sbin/reboot -n" +dhcpcd=YES +sshd=YES +ec2_init=$(is_ec2) + +if checkyesno ec2_init; then + dhcpcd_flags="$dhcpcd_flags -w" +fi
CVS commit: src/distrib/common/bootimage
Module Name:src Committed By: jmcneill Date: Sat Jul 24 13:59:29 UTC 2021 Modified Files: src/distrib/common/bootimage: Makefile.bootimage Log Message: bootimage: allow appending additional rc.conf options If RC_CONF_EXTRA is defined, append the contents of this file to the target file-system's rc.conf To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/distrib/common/bootimage/Makefile.bootimage Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/common/bootimage/Makefile.bootimage diff -u src/distrib/common/bootimage/Makefile.bootimage:1.27 src/distrib/common/bootimage/Makefile.bootimage:1.28 --- src/distrib/common/bootimage/Makefile.bootimage:1.27 Fri Jun 4 17:09:36 2021 +++ src/distrib/common/bootimage/Makefile.bootimage Sat Jul 24 13:59:28 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.bootimage,v 1.27 2021/06/04 17:09:36 tsutsui Exp $ +# $NetBSD: Makefile.bootimage,v 1.28 2021/07/24 13:59:28 jmcneill Exp $ # # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui. All rights reserved. # @@ -366,6 +366,10 @@ ${TARGETFS}: prepare_md_post ${WORKFSTAB @echo Setting savecore=NO in /etc/rc.conf ... echo "savecore=NO" >> ${WORKRCCONF} .endif +.if defined(RC_CONF_EXTRA) + @echo Adding contents of ${RC_CONF_EXTRA} to /etc/rc.conf ... + cat ${RC_CONF_EXTRA} >> ${WORKRCCONF} +.endif ${INSTALL} ${COPY} -m 0644 ${WORKRCCONF} ${WORKDIR}/etc/rc.conf .if defined(IMGDIR_EXTRA) @echo Copying extra dirs...
CVS commit: src/usr.bin/systat
Module Name:src Committed By: simonb Date: Sat Jul 24 13:42:05 UTC 2021 Modified Files: src/usr.bin/systat: vmstat.c Log Message: Instead of getting an estimate of the number of kernel buffers, allocating memory for them, requesting all the metadata contents of these buffers (and repeating in the unlikely case of the number of buffers increasing too much since the estimate) and then straight away throwing all the contents out just to count how many buffers there were, just get the initial estimate from the kernel and subtract the slop. Reduces system CPU usage of "systat vm" by approx 80% for any system with a reasonable number of buffers. To generate a diff of this commit: cvs rdiff -u -r1.88 -r1.89 src/usr.bin/systat/vmstat.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.bin/systat/vmstat.c diff -u src/usr.bin/systat/vmstat.c:1.88 src/usr.bin/systat/vmstat.c:1.89 --- src/usr.bin/systat/vmstat.c:1.88 Mon Mar 2 09:50:12 2020 +++ src/usr.bin/systat/vmstat.c Sat Jul 24 13:42:05 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: vmstat.c,v 1.88 2020/03/02 09:50:12 mrg Exp $ */ +/* $NetBSD: vmstat.c,v 1.89 2021/07/24 13:42:05 simonb Exp $ */ /*- * Copyright (c) 1983, 1989, 1992, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94"; #endif -__RCSID("$NetBSD: vmstat.c,v 1.88 2020/03/02 09:50:12 mrg Exp $"); +__RCSID("$NetBSD: vmstat.c,v 1.89 2021/07/24 13:42:05 simonb Exp $"); #endif /* not lint */ /* @@ -481,10 +481,8 @@ showvmstat(void) static int relabel = 0; static int last_disks = 0; static u_long bufmem; - struct buf_sysctl *buffers; int mib[6]; size_t size; - int extraslop = 0; if (relabel) { labelvmstat(); @@ -528,14 +526,12 @@ showvmstat(void) /* Get number of metadata buffers */ size = 0; - buffers = NULL; mib[0] = CTL_KERN; mib[1] = KERN_BUF; mib[2] = KERN_BUF_ALL; mib[3] = KERN_BUF_ALL; mib[4] = (int)sizeof(struct buf_sysctl); mib[5] = INT_MAX; /* we want them all */ -again: if (sysctl(mib, 6, NULL, &size, NULL, 0) < 0) { error("can't get buffers size: %s\n", strerror(errno)); return; @@ -544,23 +540,8 @@ again: error("buffers size is zero: %s\n", strerror(errno)); return; } - size += extraslop * sizeof(struct buf_sysctl); - buffers = malloc(size); - if (buffers == NULL) { - error("can't allocate buffers: %s\n", strerror(errno)); - return; - } - if (sysctl(mib, 6, buffers, &size, NULL, 0) < 0) { - free(buffers); - if (extraslop < 1000) { - extraslop += 100; - goto again; - } - error("can't get buffers: %s\n", strerror(errno)); - return; - } - free(buffers); /* XXX there must be a better way! */ nbuf = size / sizeof(struct buf_sysctl); + nbuf -= KERN_BUFSLOP; putint((int) (bufmem / 1024), MEMROW + 3, MEMCOL + 5, 12); putint((int) ((bufmem * 100) + 0.5) / s.uvmexp.pagesize / s.uvmexp.npages,
CVS commit: src/sys
Module Name:src Committed By: simonb Date: Sat Jul 24 13:28:14 UTC 2021 Modified Files: src/sys/kern: vfs_bio.c src/sys/sys: sysctl.h Log Message: Expose KERN_BUFSLOP in . To generate a diff of this commit: cvs rdiff -u -r1.299 -r1.300 src/sys/kern/vfs_bio.c cvs rdiff -u -r1.233 -r1.234 src/sys/sys/sysctl.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/kern/vfs_bio.c diff -u src/sys/kern/vfs_bio.c:1.299 src/sys/kern/vfs_bio.c:1.300 --- src/sys/kern/vfs_bio.c:1.299 Sat Jul 24 13:27:39 2021 +++ src/sys/kern/vfs_bio.c Sat Jul 24 13:28:14 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_bio.c,v 1.299 2021/07/24 13:27:39 simonb Exp $ */ +/* $NetBSD: vfs_bio.c,v 1.300 2021/07/24 13:28:14 simonb Exp $ */ /*- * Copyright (c) 2007, 2008, 2009, 2019, 2020 The NetBSD Foundation, Inc. @@ -123,7 +123,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.299 2021/07/24 13:27:39 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.300 2021/07/24 13:28:14 simonb Exp $"); #ifdef _KERNEL_OPT #include "opt_bufcache.h" @@ -1765,7 +1765,6 @@ sysctl_fillbuf(const buf_t *i, struct bu o->b_lblkno = i->b_lblkno; } -#define KERN_BUFSLOP 20 static int sysctl_dobuf(SYSCTLFN_ARGS) { Index: src/sys/sys/sysctl.h diff -u src/sys/sys/sysctl.h:1.233 src/sys/sys/sysctl.h:1.234 --- src/sys/sys/sysctl.h:1.233 Tue Apr 13 01:10:24 2021 +++ src/sys/sys/sysctl.h Sat Jul 24 13:28:14 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sysctl.h,v 1.233 2021/04/13 01:10:24 mrg Exp $ */ +/* $NetBSD: sysctl.h,v 1.234 2021/07/24 13:28:14 simonb Exp $ */ /* * Copyright (c) 1989, 1993 @@ -662,6 +662,8 @@ struct buf_sysctl { uint64_t b_lblkno; /* DADDR_T: Logical block number */ }; +#define KERN_BUFSLOP 20 + /* * kern.file2 returns an array of these structures, which are designed * both to be immune to 32/64 bit emulation issues and to
CVS commit: src/sys/kern
Module Name:src Committed By: simonb Date: Sat Jul 24 13:27:39 UTC 2021 Modified Files: src/sys/kern: vfs_bio.c Log Message: Pad out the slop for kern.buf based on the passed in element size, rather than a size of an unrelated struct. To generate a diff of this commit: cvs rdiff -u -r1.298 -r1.299 src/sys/kern/vfs_bio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/vfs_bio.c diff -u src/sys/kern/vfs_bio.c:1.298 src/sys/kern/vfs_bio.c:1.299 --- src/sys/kern/vfs_bio.c:1.298 Thu Apr 1 06:25:59 2021 +++ src/sys/kern/vfs_bio.c Sat Jul 24 13:27:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_bio.c,v 1.298 2021/04/01 06:25:59 simonb Exp $ */ +/* $NetBSD: vfs_bio.c,v 1.299 2021/07/24 13:27:39 simonb Exp $ */ /*- * Copyright (c) 2007, 2008, 2009, 2019, 2020 The NetBSD Foundation, Inc. @@ -123,7 +123,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.298 2021/04/01 06:25:59 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.299 2021/07/24 13:27:39 simonb Exp $"); #ifdef _KERNEL_OPT #include "opt_bufcache.h" @@ -1850,7 +1850,7 @@ sysctl_dobuf(SYSCTLFN_ARGS) *oldlenp = needed; if (oldp == NULL) - *oldlenp += KERN_BUFSLOP * sizeof(buf_t); + *oldlenp += KERN_BUFSLOP * elem_size; return (error); }
CVS commit: src
Module Name:src Committed By: jmcneill Date: Sat Jul 24 11:39:19 UTC 2021 Modified Files: src/etc: MAKEDEV.tmpl src/etc/etc.aarch64: MAKEDEV.conf src/etc/etc.amd64: MAKEDEV.conf src/etc/etc.i386: MAKEDEV.conf src/sys/arch/arm/fdt: acpi_fdt.c src/sys/arch/x86/x86: bios32.c src/sys/conf: majors src/sys/dev: smbios.c smbiosvar.h Log Message: smbios: Add character device for accessing SMBIOS tables The /dev/smbios character device gives an aperture into physical memory that allows read-only access to the SMBIOS header and tables. To generate a diff of this commit: cvs rdiff -u -r1.223 -r1.224 src/etc/MAKEDEV.tmpl cvs rdiff -u -r1.8 -r1.9 src/etc/etc.aarch64/MAKEDEV.conf cvs rdiff -u -r1.32 -r1.33 src/etc/etc.amd64/MAKEDEV.conf cvs rdiff -u -r1.33 -r1.34 src/etc/etc.i386/MAKEDEV.conf cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/fdt/acpi_fdt.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/x86/bios32.c cvs rdiff -u -r1.97 -r1.98 src/sys/conf/majors cvs rdiff -u -r1.1 -r1.2 src/sys/dev/smbios.c src/sys/dev/smbiosvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/MAKEDEV.tmpl diff -u src/etc/MAKEDEV.tmpl:1.223 src/etc/MAKEDEV.tmpl:1.224 --- src/etc/MAKEDEV.tmpl:1.223 Tue Jun 29 10:22:33 2021 +++ src/etc/MAKEDEV.tmpl Sat Jul 24 11:39:18 2021 @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: MAKEDEV.tmpl,v 1.223 2021/06/29 10:22:33 nia Exp $ +# $NetBSD: MAKEDEV.tmpl,v 1.224 2021/07/24 11:39:18 jmcneill Exp $ # # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -2240,6 +2240,10 @@ acpi) mkdev acpi c %acpi_chr% 0 ;; +smbios) + mkdev smbios c %smbios_chr% 0 + ;; + midevend) %MI_DEVICES_END% local) Index: src/etc/etc.aarch64/MAKEDEV.conf diff -u src/etc/etc.aarch64/MAKEDEV.conf:1.8 src/etc/etc.aarch64/MAKEDEV.conf:1.9 --- src/etc/etc.aarch64/MAKEDEV.conf:1.8 Sun Dec 6 02:57:30 2020 +++ src/etc/etc.aarch64/MAKEDEV.conf Sat Jul 24 11:39:18 2021 @@ -1,4 +1,4 @@ -# $NetBSD: MAKEDEV.conf,v 1.8 2020/12/06 02:57:30 jmcneill Exp $ +# $NetBSD: MAKEDEV.conf,v 1.9 2021/07/24 11:39:18 jmcneill Exp $ all_md) makedev wscons fd0 fd1 wd0 wd1 wd2 wd3 sd0 sd1 sd2 sd3 @@ -21,6 +21,7 @@ all_md) makedev bpf makedev openfirm makedev acpi + makedev smbios ;; ramdisk|floppy) Index: src/etc/etc.amd64/MAKEDEV.conf diff -u src/etc/etc.amd64/MAKEDEV.conf:1.32 src/etc/etc.amd64/MAKEDEV.conf:1.33 --- src/etc/etc.amd64/MAKEDEV.conf:1.32 Sun Dec 6 02:57:30 2020 +++ src/etc/etc.amd64/MAKEDEV.conf Sat Jul 24 11:39:18 2021 @@ -1,4 +1,4 @@ -# $NetBSD: MAKEDEV.conf,v 1.32 2020/12/06 02:57:30 jmcneill Exp $ +# $NetBSD: MAKEDEV.conf,v 1.33 2021/07/24 11:39:18 jmcneill Exp $ # As of 2003-04-17, the "init" case must not create more than 890 entries. all_md) @@ -46,6 +46,7 @@ all_md) makedev bio makedev xmm0 makedev acpi + makedev smbios ;; xen) Index: src/etc/etc.i386/MAKEDEV.conf diff -u src/etc/etc.i386/MAKEDEV.conf:1.33 src/etc/etc.i386/MAKEDEV.conf:1.34 --- src/etc/etc.i386/MAKEDEV.conf:1.33 Sun Dec 6 02:57:30 2020 +++ src/etc/etc.i386/MAKEDEV.conf Sat Jul 24 11:39:19 2021 @@ -1,4 +1,4 @@ -# $NetBSD: MAKEDEV.conf,v 1.33 2020/12/06 02:57:30 jmcneill Exp $ +# $NetBSD: MAKEDEV.conf,v 1.34 2021/07/24 11:39:19 jmcneill Exp $ # As of 2005-03-15, the "init" case must not create more than 1024 entries. all_md) @@ -50,6 +50,7 @@ all_md) makedev bio makedev cfs makedev acpi + makedev smbios ;; xen) Index: src/sys/arch/arm/fdt/acpi_fdt.c diff -u src/sys/arch/arm/fdt/acpi_fdt.c:1.21 src/sys/arch/arm/fdt/acpi_fdt.c:1.22 --- src/sys/arch/arm/fdt/acpi_fdt.c:1.21 Fri Jul 23 21:33:35 2021 +++ src/sys/arch/arm/fdt/acpi_fdt.c Sat Jul 24 11:39:19 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_fdt.c,v 1.21 2021/07/23 21:33:35 jmcneill Exp $ */ +/* $NetBSD: acpi_fdt.c,v 1.22 2021/07/24 11:39:19 jmcneill Exp $ */ /*- * Copyright (c) 2015-2017 Jared McNeill @@ -30,7 +30,7 @@ #include "opt_efi.h" #include -__KERNEL_RCSID(0, "$NetBSD: acpi_fdt.c,v 1.21 2021/07/23 21:33:35 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_fdt.c,v 1.22 2021/07/24 11:39:19 jmcneill Exp $"); #include #include @@ -179,6 +179,8 @@ acpi_fdt_smbios_init(device_t dev) return; } + smbios_entry.hdrphys = smbios_table; + smbver = acpi_fdt_smbios_version(); if (smbver == 3) { struct smb3hdr *sh = AcpiOsMapMemory(smbios_table, sizeof(*sh)); @@ -188,6 +190,7 @@ acpi_fdt_smbios_init(device_t dev) ptr = AcpiOsMapMemory(sh->addr, sh->size); if (ptr != NULL) { + smbios_entry.tabphys = sh->addr; smbios_entry.addr = ptr; smbios_entry.len = sh->size; smbios_entry.rev = sh->eprev; @@ -208,6 +211,7 @@ acpi_fdt_smbios_init(device_t dev) ptr = AcpiOsMapMemory(sh->addr, sh->size); if (ptr != NULL) { + smbios_entry.tabphys = sh->addr; smbios_entry.addr = ptr; smbios_entry.len = sh->size; smbios
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jmcneill Date: Sat Jul 24 11:36:41 UTC 2021 Modified Files: src/sys/dev/acpi: acpi_dev.c Log Message: acpi: /dev/acpi: fix bounds check when reading tables To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/acpi_dev.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi_dev.c diff -u src/sys/dev/acpi/acpi_dev.c:1.1 src/sys/dev/acpi/acpi_dev.c:1.2 --- src/sys/dev/acpi/acpi_dev.c:1.1 Sun Dec 6 02:57:30 2020 +++ src/sys/dev/acpi/acpi_dev.c Sat Jul 24 11:36:41 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_dev.c,v 1.1 2020/12/06 02:57:30 jmcneill Exp $ */ +/* $NetBSD: acpi_dev.c,v 1.2 2021/07/24 11:36:41 jmcneill Exp $ */ /*- * Copyright (c) 2020 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_dev.c,v 1.1 2020/12/06 02:57:30 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_dev.c,v 1.2 2021/07/24 11:36:41 jmcneill Exp $"); #include #include @@ -208,7 +208,7 @@ acpi_read(dev_t dev, struct uio *uio, in /* Copy the contents of the table to user-space */ pa = uio->uio_offset; - len = uimin(pa - table_pa + table_len, uio->uio_resid); + len = uimin(table_len - (pa - table_pa), uio->uio_resid); data = AcpiOsMapMemory(pa, len); if (data == NULL) { return ENOMEM;
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: jmcneill Date: Sat Jul 24 10:22:28 UTC 2021 Modified Files: src/sys/stand/efiboot: boot.c Log Message: efiboot: Allow "fs" as alias for "initrd", for compat with x86 To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/stand/efiboot/boot.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/stand/efiboot/boot.c diff -u src/sys/stand/efiboot/boot.c:1.34 src/sys/stand/efiboot/boot.c:1.35 --- src/sys/stand/efiboot/boot.c:1.34 Wed Jun 23 21:43:38 2021 +++ src/sys/stand/efiboot/boot.c Sat Jul 24 10:22:28 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.34 2021/06/23 21:43:38 jmcneill Exp $ */ +/* $NetBSD: boot.c,v 1.35 2021/07/24 10:22:28 jmcneill Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka @@ -110,6 +110,7 @@ const struct boot_command commands[] = { { "dev", command_dev, "dev" }, { "dtb", command_dtb, "dtb [dev:][filename]" }, { "initrd", command_initrd, "initrd [dev:][filename]" }, + { "fs", command_initrd, NULL }, { "rndseed", command_rndseed, "rndseed [dev:][filename]" }, { "dtoverlay", command_dtoverlay, "dtoverlay [dev:][filename]" }, { "dtoverlays", command_dtoverlays, "dtoverlays [{on|off|reset}]" },
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: rin Date: Sat Jul 24 08:39:54 UTC 2021 Modified Files: src/tests/lib/libc/sys: t_ptrace_core_wait.h Log Message: For sh3, increment PC when PT_CONTINUE from trigger_trap(), as already done for aarch64, arm, and powerpc. Otherwise, child is trapped to the PTRACE_BREAKPOINT_ASM (== trapa) instruction indefinitely. Fix tests/lib/libc/sys/t_ptrace_wait*:core_dump_procinfo. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/sys/t_ptrace_core_wait.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_ptrace_core_wait.h diff -u src/tests/lib/libc/sys/t_ptrace_core_wait.h:1.3 src/tests/lib/libc/sys/t_ptrace_core_wait.h:1.4 --- src/tests/lib/libc/sys/t_ptrace_core_wait.h:1.3 Thu Oct 15 22:59:50 2020 +++ src/tests/lib/libc/sys/t_ptrace_core_wait.h Sat Jul 24 08:39:54 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ptrace_core_wait.h,v 1.3 2020/10/15 22:59:50 rin Exp $ */ +/* $NetBSD: t_ptrace_core_wait.h,v 1.4 2021/07/24 08:39:54 rin Exp $ */ /*- * Copyright (c) 2016, 2017, 2018, 2019, 2020 The NetBSD Foundation, Inc. @@ -208,7 +208,8 @@ ATF_TC_BODY(core_dump_procinfo, tc) DPRINTF("Before resuming the child process where it left off and " "without signal to be sent\n"); -#if defined(__aarch64__) || defined(__arm__) || defined(__powerpc__) +#if defined(__aarch64__) || defined(__arm__) || defined(__powerpc__) || \ +defined(__sh3__) /* * For these archs, program counter is not automatically incremented * by a trap instruction. We cannot increment PC in the trap handler, @@ -220,12 +221,7 @@ ATF_TC_BODY(core_dump_procinfo, tc) SYSCALL_REQUIRE(ptrace(PT_GETREGS, child, &r, 0) != -1); SYSCALL_REQUIRE(ptrace(PT_CONTINUE, child, -# if defined(__aarch64__) || defined(__arm__) - (void *)(r.r_pc + PTRACE_BREAKPOINT_SIZE), -# elif defined(__powerpc__) - (void *)(r.pc + PTRACE_BREAKPOINT_SIZE), -# endif - 0) != -1); + (void *)(PTRACE_REG_PC(&r) + PTRACE_BREAKPOINT_SIZE), 0) != -1); #else SYSCALL_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); #endif
CVS commit: src/sys/arch/epoc32/epoc32
Module Name:src Committed By: skrll Date: Sat Jul 24 07:59:10 UTC 2021 Modified Files: src/sys/arch/epoc32/epoc32: intr.c Log Message: #include for COHERENCY_UNIT To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/epoc32/epoc32/intr.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/epoc32/epoc32/intr.c diff -u src/sys/arch/epoc32/epoc32/intr.c:1.2 src/sys/arch/epoc32/epoc32/intr.c:1.3 --- src/sys/arch/epoc32/epoc32/intr.c:1.2 Sun Aug 18 21:57:01 2013 +++ src/sys/arch/epoc32/epoc32/intr.c Sat Jul 24 07:59:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.2 2013/08/18 21:57:01 matt Exp $ */ +/* $NetBSD: intr.c,v 1.3 2021/07/24 07:59:10 skrll Exp $ */ /* * Copyright (c) 2012 KIYOHARA Takashi * All rights reserved. @@ -26,8 +26,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.2 2013/08/18 21:57:01 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.3 2021/07/24 07:59:10 skrll Exp $"); +#include #include #include
CVS commit: src/sys/dev/dtv
Module Name:src Committed By: skrll Date: Sat Jul 24 07:48:38 UTC 2021 Modified Files: src/sys/dev/dtv: dtv_device.c Log Message: #include for COHERENCY_UNIT and some KNF while I'm here. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/dev/dtv/dtv_device.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/dtv/dtv_device.c diff -u src/sys/dev/dtv/dtv_device.c:1.12 src/sys/dev/dtv/dtv_device.c:1.13 --- src/sys/dev/dtv/dtv_device.c:1.12 Sat Oct 28 04:53:55 2017 +++ src/sys/dev/dtv/dtv_device.c Sat Jul 24 07:48:38 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: dtv_device.c,v 1.12 2017/10/28 04:53:55 riastradh Exp $ */ +/* $NetBSD: dtv_device.c,v 1.13 2021/07/24 07:48:38 skrll Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill @@ -33,12 +33,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dtv_device.c,v 1.12 2017/10/28 04:53:55 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dtv_device.c,v 1.13 2021/07/24 07:48:38 skrll Exp $"); +#include #include +#include #include #include -#include #include #include #include