CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: mrg Date: Fri Oct 27 06:31:49 UTC 2023 Modified Files: src/sys/arch/x86/include: specialreg.h Log Message: add MSR stuff for AMD errata 1474. To generate a diff of this commit: cvs rdiff -u -r1.208 -r1.209 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.208 src/sys/arch/x86/include/specialreg.h:1.209 --- src/sys/arch/x86/include/specialreg.h:1.208 Thu Jul 27 00:34:07 2023 +++ src/sys/arch/x86/include/specialreg.h Fri Oct 27 06:31:48 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: specialreg.h,v 1.208 2023/07/27 00:34:07 msaitoh Exp $ */ +/* $NetBSD: specialreg.h,v 1.209 2023/10/27 06:31:48 mrg Exp $ */ /* * Copyright (c) 2014-2020 The NetBSD Foundation, Inc. @@ -1363,6 +1363,10 @@ #define NB_CFG_DISDATMSK 0x0010ULL #define NB_CFG_INITAPICCPUIDLO (1ULL << 54) +/* AMD Errata 1474. */ +#define MSR_CC6_CFG 0xc0010296 +#define CC6_CFG_DISABLE_BITS (__BIT(22) | __BIT(14) | __BIT(6)) + #define MSR_LS_CFG 0xc0011020 #define LS_CFG_ERRATA_1033 __BIT(4) #define LS_CFG_ERRATA_793 __BIT(15)
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: mrg Date: Fri Oct 27 06:31:49 UTC 2023 Modified Files: src/sys/arch/x86/include: specialreg.h Log Message: add MSR stuff for AMD errata 1474. To generate a diff of this commit: cvs rdiff -u -r1.208 -r1.209 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/x86/x86
Module Name:src Committed By: mrg Date: Fri Oct 27 05:45:00 UTC 2023 Modified Files: src/sys/arch/x86/x86: errata.c Log Message: x86: handle AMD errata 1474: A CPU core may hang after about 1044 days from the new comment: * This requires disabling CC6 power level, which can be a performance * issue since it stops full turbo in some implementations (eg, half the * cores must be in CC6 to achieve the highest boost level.) Set a timer * to fire in 1000 days -- except NetBSD timers end up having a signed * 32-bit hz-based value, which rolls over in under 25 days with HZ=1000, * and doing xcall(9) or kthread(9) from a callout is not allowed anyway, * so just have a kthread wait 1 day for 1000 times. documented in: https://www.amd.com/content/dam/amd/en/documents/processor-tech-docs/revision-guides/56323-PUB_1_01.pdf To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/x86/x86/errata.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/errata.c diff -u src/sys/arch/x86/x86/errata.c:1.34 src/sys/arch/x86/x86/errata.c:1.35 --- src/sys/arch/x86/x86/errata.c:1.34 Fri Oct 27 03:06:04 2023 +++ src/sys/arch/x86/x86/errata.c Fri Oct 27 05:45:00 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: errata.c,v 1.34 2023/10/27 03:06:04 mrg Exp $ */ +/* $NetBSD: errata.c,v 1.35 2023/10/27 05:45:00 mrg Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -47,10 +47,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: errata.c,v 1.34 2023/10/27 03:06:04 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: errata.c,v 1.35 2023/10/27 05:45:00 mrg Exp $"); -#include +#include #include +#include +#include +#include #include #include @@ -255,6 +258,7 @@ static const uint8_t x86_errata_zen2[] = static bool x86_errata_setmsr(struct cpu_info *, errata_t *); static bool x86_errata_testmsr(struct cpu_info *, errata_t *); +static bool x86_errata_amd_1474(struct cpu_info *, errata_t *); static errata_t errata[] = { /* @@ -453,6 +457,13 @@ static errata_t errata[] = { x86_errata_setmsr, LS_CFG_ERRATA_1095, NULL }, /* + * 1474: A CPU core may hang after about 1044 days + */ + { + 1474, FALSE, MSR_CC6_CFG, x86_errata_zen2, + x86_errata_amd_1474, CC6_CFG_DISABLE_BITS, NULL + }, + /* * Zenbleed: * https://www.amd.com/en/resources/product-security/bulletin/amd-sb-7008.html * https://github.com/google/security-research/security/advisories/GHSA-v6wh-rxpg-cmm8 @@ -465,6 +476,96 @@ static errata_t errata[] = { }, }; +/* + * 1474: A CPU core may hang after about 1044 days + * + * This requires disabling CC6 power level, which can be a performance + * issue since it stops full turbo in some implementations (eg, half the + * cores must be in CC6 to achieve the highest boost level.) Set a timer + * to fire in 1000 days -- except NetBSD timers end up having a signed + * 32-bit hz-based value, which rolls over in under 25 days with HZ=1000, + * and doing xcall(9) or kthread(9) from a callout is not allowed anyway, + * so just have a kthread wait 1 day for 1000 times. + */ + +#define AMD_ERRATA_1474_WARN_DAYS 950 +#define AMD_ERRATA_1474_BAD_DAYS 1000 + +static void +amd_errata_1474_disable_cc6(void *a1, void *a2) +{ + errata_t *e = a1; + uint64_t val; + + val = rdmsr_locked(e->e_data1); + if ((val & e->e_data2) == 0) + return; + wrmsr_locked(e->e_data1, val & ~e->e_data2); + aprint_debug_dev(curcpu()->ci_dev, "erratum %u patched\n", + e->e_num); +} + +static void +amd_errata_1474_thread(void *arg) +{ + int loops = 0; + int ticks; + + ticks = hz * SECS_PER_DAY; +#ifdef X86_ERRATA_TEST_AMD_1474 + /* + * Make this trigger warning after 50 seconds, and workaround + * at 100 seconds, for easy testing. + */ + ticks = hz; + loops = 900; +#endif + + while (loops++ < AMD_ERRATA_1474_BAD_DAYS) { + if (loops == AMD_ERRATA_1474_WARN_DAYS) { + printf("warning: AMD Errata 1474 workaround scheduled " + "for %u days.\n", AMD_ERRATA_1474_BAD_DAYS - + AMD_ERRATA_1474_WARN_DAYS); + printf("warning: reboot required to avoid.\n"); + } + kpause("amd1474", false, ticks, NULL); + } + + /* Been 1000 days, disable CC6 and warn about it. */ + uint64_t xc = xc_broadcast(0, amd_errata_1474_disable_cc6, arg, NULL); + xc_wait(xc); + + printf("warning: AMD CC6 disabled due to errata 1474.\n"); + printf("warning: reboot required to restore full turbo speeds.\n"); + + kthread_exit(0); +} + +static bool +x86_errata_amd_1474(struct cpu_info *ci, errata_t *e) +{ + int error; + + /* Don't do anything on non-primary CPUs. */ + if (!CPU_IS_PRIMARY(ci)) + return FALSE; + + error = kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL, + amd_errata_1474_thread, e, NULL, "amd1474"); + if (error) { + printf("WARNING: Unable to disable AMD errata 1474!\n"); + printf("WARNING: reboot system after %u days to avoid CPU " + "hangs.\n", AMD_ERRATA_1474_BAD_DAYS); +
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: mrg Date: Fri Oct 27 05:45:00 UTC 2023 Modified Files: src/sys/arch/x86/x86: errata.c Log Message: x86: handle AMD errata 1474: A CPU core may hang after about 1044 days from the new comment: * This requires disabling CC6 power level, which can be a performance * issue since it stops full turbo in some implementations (eg, half the * cores must be in CC6 to achieve the highest boost level.) Set a timer * to fire in 1000 days -- except NetBSD timers end up having a signed * 32-bit hz-based value, which rolls over in under 25 days with HZ=1000, * and doing xcall(9) or kthread(9) from a callout is not allowed anyway, * so just have a kthread wait 1 day for 1000 times. documented in: https://www.amd.com/content/dam/amd/en/documents/processor-tech-docs/revision-guides/56323-PUB_1_01.pdf To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/x86/x86/errata.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/cdb
Module Name:src Committed By: simonb Date: Fri Oct 27 04:05:55 UTC 2023 Modified Files: src/lib/libc/cdb: cdbr.3 Log Message: Add #include to the synopsis. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/cdb/cdbr.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/cdb/cdbr.3 diff -u src/lib/libc/cdb/cdbr.3:1.6 src/lib/libc/cdb/cdbr.3:1.7 --- src/lib/libc/cdb/cdbr.3:1.6 Sat Dec 1 02:43:43 2018 +++ src/lib/libc/cdb/cdbr.3 Fri Oct 27 04:05:55 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: cdbr.3,v 1.6 2018/12/01 02:43:43 kamil Exp $ +.\" $NetBSD: cdbr.3,v 1.7 2023/10/27 04:05:55 simonb Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -41,6 +41,7 @@ .Nm cdbr_close .Nd constant database access methods .Sh SYNOPSIS +.In cdbr.h .Ft "struct cdbr *" .Fn cdbr_open "const char *path" "int flags" .Ft "struct cdbr *"
CVS commit: src/lib/libc/cdb
Module Name:src Committed By: simonb Date: Fri Oct 27 04:05:55 UTC 2023 Modified Files: src/lib/libc/cdb: cdbr.3 Log Message: Add #include to the synopsis. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/cdb/cdbr.3 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: mrg Date: Fri Oct 27 03:06:04 UTC 2023 Modified Files: src/sys/arch/x86/x86: errata.c Log Message: x86: add names for errata that don't have actual numbers zenbleed is reported as "erratum 65535" currently, this adds a name for it, and enables the name for any others as well. pull logging into a function with a tag message. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/x86/x86/errata.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/errata.c diff -u src/sys/arch/x86/x86/errata.c:1.33 src/sys/arch/x86/x86/errata.c:1.34 --- src/sys/arch/x86/x86/errata.c:1.33 Fri Jul 28 05:02:13 2023 +++ src/sys/arch/x86/x86/errata.c Fri Oct 27 03:06:04 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: errata.c,v 1.33 2023/07/28 05:02:13 mrg Exp $ */ +/* $NetBSD: errata.c,v 1.34 2023/10/27 03:06:04 mrg Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -47,7 +47,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: errata.c,v 1.33 2023/07/28 05:02:13 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: errata.c,v 1.34 2023/10/27 03:06:04 mrg Exp $"); #include #include @@ -66,6 +66,7 @@ typedef struct errata { const uint8_t *e_set; bool (*e_act)(struct cpu_info *, struct errata *); uint64_t e_data2; + const char *e_name; /* use if e_num == 0 */ } errata_t; /* These names match names from various AMD Errata/Revision Guides. */ @@ -248,7 +249,7 @@ static const uint8_t x86_errata_set15[] KB_A1, ML_A1, OINK }; -static const uint8_t x86_errata_set16[] = { +static const uint8_t x86_errata_zen2[] = { Rome_B0, Z2_XB, Z2_Ren, Z2_Luc, Z2_Mat, Z2_VG, Z2_Men, OINK }; @@ -262,21 +263,21 @@ static errata_t errata[] = { */ { 81, FALSE, MSR_DC_CFG, x86_errata_set5, - x86_errata_testmsr, DC_CFG_DIS_SMC_CHK_BUF + x86_errata_testmsr, DC_CFG_DIS_SMC_CHK_BUF, NULL }, /* * 86: DRAM Data Masking Feature Can Cause ECC Failures */ { 86, FALSE, MSR_NB_CFG, x86_errata_set1, - x86_errata_testmsr, NB_CFG_DISDATMSK + x86_errata_testmsr, NB_CFG_DISDATMSK, NULL }, /* * 89: Potential Deadlock With Locked Transactions */ { 89, FALSE, MSR_NB_CFG, x86_errata_set8, - x86_errata_testmsr, NB_CFG_DISIOREQLOCK + x86_errata_testmsr, NB_CFG_DISIOREQLOCK, NULL }, /* * 94: Sequential Prefetch Feature May Cause Incorrect @@ -284,7 +285,7 @@ static errata_t errata[] = { */ { 94, FALSE, MSR_IC_CFG, x86_errata_set1, - x86_errata_testmsr, IC_CFG_DIS_SEQ_PREFETCH + x86_errata_testmsr, IC_CFG_DIS_SEQ_PREFETCH, NULL }, /* * 97: 128-Bit Streaming Stores May Cause Coherency @@ -296,7 +297,7 @@ static errata_t errata[] = { */ { 97, FALSE, MSR_DC_CFG, x86_errata_set6, - x86_errata_testmsr, DC_CFG_DIS_CNV_WC_SSO + x86_errata_testmsr, DC_CFG_DIS_CNV_WC_SSO, NULL }, /* * 104: DRAM Data Masking Feature Causes ChipKill ECC @@ -304,14 +305,14 @@ static errata_t errata[] = { */ { 104, FALSE, MSR_NB_CFG, x86_errata_set7, - x86_errata_testmsr, NB_CFG_DISDATMSK + x86_errata_testmsr, NB_CFG_DISDATMSK, NULL }, /* * 113: Enhanced Write-Combining Feature Causes System Hang */ { 113, FALSE, MSR_BU_CFG, x86_errata_set3, - x86_errata_setmsr, BU_CFG_WBENHWSBDIS + x86_errata_setmsr, BU_CFG_WBENHWSBDIS, NULL }, /* * 69: Multiprocessor Coherency Problem with Hardware @@ -319,7 +320,7 @@ static errata_t errata[] = { */ { 69, FALSE, MSR_BU_CFG, x86_errata_set5, - x86_errata_setmsr, BU_CFG_WBPFSMCCHKDIS + x86_errata_setmsr, BU_CFG_WBPFSMCCHKDIS, NULL }, /* * 101: DRAM Scrubber May Cause Data Corruption When Using @@ -327,7 +328,7 @@ static errata_t errata[] = { */ { 101, FALSE, 0, x86_errata_set2, - NULL, 0 + NULL, 0, NULL }, /* * 106: Potential Deadlock with Tightly Coupled Semaphores @@ -335,7 +336,7 @@ static errata_t errata[] = { */ { 106, FALSE, MSR_LS_CFG, x86_errata_set2, - x86_errata_testmsr, LS_CFG_DIS_LS2_SQUISH + x86_errata_testmsr, LS_CFG_DIS_LS2_SQUISH, NULL }, /* * 107: Possible Multiprocessor Coherency Problem with @@ -343,7 +344,7 @@ static errata_t errata[] = { */ { 107, FALSE, MSR_BU_CFG, x86_errata_set2, - x86_errata_testmsr, BU_CFG_THRL2IDXCMPDIS + x86_errata_testmsr, BU_CFG_THRL2IDXCMPDIS, NULL }, /* * 122: TLB Flush Filter May Cause Coherency Problem in @@ -351,14 +352,14 @@ static errata_t errata[] = { */ { 122, FALSE, MSR_HWCR, x86_errata_set4, - x86_errata_setmsr, HWCR_FFDIS + x86_errata_setmsr, HWCR_FFDIS, NULL }, /* * 254: Internal Resource Livelock Involving Cached TLB Reload */ { 254, FALSE, MSR_BU_CFG, x86_errata_set9, - x86_errata_testmsr, BU_CFG_ERRATA_254 + x86_errata_testmsr, BU_CFG_ERRATA_254, NULL }, /* * 261: Processor May Stall Entering Stop-Grant Due to Pending Data @@ -366,7 +367,7 @@ static errata_t errata[] = { */ { 261, FALSE,
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: mrg Date: Fri Oct 27 03:06:04 UTC 2023 Modified Files: src/sys/arch/x86/x86: errata.c Log Message: x86: add names for errata that don't have actual numbers zenbleed is reported as "erratum 65535" currently, this adds a name for it, and enables the name for any others as well. pull logging into a function with a tag message. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/x86/x86/errata.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/xlint
Module Name:src Committed By: rillig Date: Thu Oct 26 20:21:13 UTC 2023 Modified Files: src/usr.bin/xlint/xlint: xlint.c Log Message: lint: reduce number of negations, fix variable name No functional change. To generate a diff of this commit: cvs rdiff -u -r1.116 -r1.117 src/usr.bin/xlint/xlint/xlint.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/xlint
Module Name:src Committed By: rillig Date: Thu Oct 26 20:21:13 UTC 2023 Modified Files: src/usr.bin/xlint/xlint: xlint.c Log Message: lint: reduce number of negations, fix variable name No functional change. To generate a diff of this commit: cvs rdiff -u -r1.116 -r1.117 src/usr.bin/xlint/xlint/xlint.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/xlint/xlint/xlint.c diff -u src/usr.bin/xlint/xlint/xlint.c:1.116 src/usr.bin/xlint/xlint/xlint.c:1.117 --- src/usr.bin/xlint/xlint/xlint.c:1.116 Thu Oct 26 19:56:31 2023 +++ src/usr.bin/xlint/xlint/xlint.c Thu Oct 26 20:21:13 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: xlint.c,v 1.116 2023/10/26 19:56:31 rillig Exp $ */ +/* $NetBSD: xlint.c,v 1.117 2023/10/26 20:21:13 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,7 +38,7 @@ #include #if defined(__RCSID) -__RCSID("$NetBSD: xlint.c,v 1.116 2023/10/26 19:56:31 rillig Exp $"); +__RCSID("$NetBSD: xlint.c,v 1.117 2023/10/26 20:21:13 rillig Exp $"); #endif #include @@ -97,7 +97,7 @@ static list library_search_path; static const char *libexec_dir; static bool Cflag, dflag, Fflag, iflag, sflag, tflag, Vflag; static char *output_filename; /* filename for -o */ -static bool seen_c_source; +static bool seen_filename; /* * name of a file which is currently written by a child and should @@ -427,13 +427,13 @@ handle_filename(const char *name) return; } - if (strcmp(suff, "c") != 0 && - (strncmp(base, "llib-l", 6) != 0 || base != suff)) { + if (!(strcmp(suff, "c") == 0 || + (strncmp(base, "llib-l", 6) == 0 && base == suff))) { warnx("unknown file type: %s", name); return; } - if (!iflag || seen_c_source) + if (!iflag || seen_filename) (void)printf("%s:\n", Fflag ? name : base); /* build the name of the output file of lint1 */ @@ -794,11 +794,11 @@ main(int argc, char *argv[]) usage("Missing argument for l or L"); } else { handle_filename(arg); - seen_c_source = true; + seen_filename = true; } } - if (!seen_c_source) + if (!seen_filename) usage("Missing filename"); if (iflag)
CVS commit: src/usr.bin/xlint/xlint
Module Name:src Committed By: rillig Date: Thu Oct 26 19:56:31 UTC 2023 Modified Files: src/usr.bin/xlint/xlint: xlint.c Log Message: lint: merge redundant variables No functional change. To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/usr.bin/xlint/xlint/xlint.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/xlint/xlint/xlint.c diff -u src/usr.bin/xlint/xlint/xlint.c:1.115 src/usr.bin/xlint/xlint/xlint.c:1.116 --- src/usr.bin/xlint/xlint/xlint.c:1.115 Wed Oct 25 23:05:14 2023 +++ src/usr.bin/xlint/xlint/xlint.c Thu Oct 26 19:56:31 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: xlint.c,v 1.115 2023/10/25 23:05:14 rillig Exp $ */ +/* $NetBSD: xlint.c,v 1.116 2023/10/26 19:56:31 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,7 +38,7 @@ #include #if defined(__RCSID) -__RCSID("$NetBSD: xlint.c,v 1.115 2023/10/25 23:05:14 rillig Exp $"); +__RCSID("$NetBSD: xlint.c,v 1.116 2023/10/26 19:56:31 rillig Exp $"); #endif #include @@ -95,8 +95,8 @@ static list default_libraries; static list additional_libraries; static list library_search_path; static const char *libexec_dir; -static bool Cflag, dflag, Fflag, iflag, oflag, sflag, tflag, Vflag; -static char *outputfn; /* filename for oflag */ +static bool Cflag, dflag, Fflag, iflag, sflag, tflag, Vflag; +static char *output_filename; /* filename for -o */ static bool seen_c_source; /* @@ -438,10 +438,9 @@ handle_filename(const char *name) /* build the name of the output file of lint1 */ char *ofn; - if (oflag) { - ofn = outputfn; - outputfn = NULL; - oflag = false; + if (output_filename != NULL) { + ofn = output_filename; + output_filename = NULL; } else if (iflag) { size_t len = base == suff ? strlen(base) @@ -702,7 +701,7 @@ main(int argc, char *argv[]) case 'C': if (Cflag) usage("%c flag already specified", 'C'); - if (oflag || iflag) + if (output_filename != NULL || iflag) usage("%c and %s flags cannot be specified " "together", 'C', "o or i"); Cflag = true; @@ -734,13 +733,12 @@ main(int argc, char *argv[]) break; case 'o': - if (oflag) + if (output_filename != NULL) usage("%c flag already specified", 'o'); if (Cflag) usage("%c and %s flags cannot be specified " "together", 'C', "o"); - oflag = true; - outputfn = xstrdup(optarg); + output_filename = xstrdup(optarg); break; case 'L': @@ -806,7 +804,7 @@ main(int argc, char *argv[]) if (iflag) terminate(0); - if (!oflag) { + if (output_filename == NULL) { const char *ks = getenv("LIBDIR"); if (ks == NULL || ks[0] == '\0') ks = PATH_LINTLIB; @@ -817,8 +815,8 @@ main(int argc, char *argv[]) run_lint2(); - if (oflag) - cat(&lint2.infiles, outputfn); + if (output_filename != NULL) + cat(&lint2.infiles, output_filename); if (Cflag) lint2.outlib = NULL;
CVS commit: src/usr.bin/xlint/xlint
Module Name:src Committed By: rillig Date: Thu Oct 26 19:56:31 UTC 2023 Modified Files: src/usr.bin/xlint/xlint: xlint.c Log Message: lint: merge redundant variables No functional change. To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/usr.bin/xlint/xlint/xlint.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev
Module Name:src Committed By: msaitoh Date: Thu Oct 26 18:02:51 UTC 2023 Modified Files: src/sys/dev/ic: dwc_eqos.c dwc_eqos_reg.h dwc_eqos_var.h src/sys/dev/pci: if_eqos_pci.c Log Message: eqos(4): Set TX/RX DMA burst length to improve performance. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/dev/ic/dwc_eqos.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/ic/dwc_eqos_reg.h cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/dwc_eqos_var.h cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/if_eqos_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/ic/dwc_eqos.c diff -u src/sys/dev/ic/dwc_eqos.c:1.26 src/sys/dev/ic/dwc_eqos.c:1.27 --- src/sys/dev/ic/dwc_eqos.c:1.26 Thu Oct 26 13:00:13 2023 +++ src/sys/dev/ic/dwc_eqos.c Thu Oct 26 18:02:50 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc_eqos.c,v 1.26 2023/10/26 13:00:13 msaitoh Exp $ */ +/* $NetBSD: dwc_eqos.c,v 1.27 2023/10/26 18:02:50 msaitoh Exp $ */ /*- * Copyright (c) 2022 Jared McNeill @@ -38,7 +38,7 @@ #include "opt_net_mpsafe.h" #include -__KERNEL_RCSID(0, "$NetBSD: dwc_eqos.c,v 1.26 2023/10/26 13:00:13 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwc_eqos.c,v 1.27 2023/10/26 18:02:50 msaitoh Exp $"); #include #include @@ -612,12 +612,16 @@ eqos_init_locked(struct eqos_softc *sc) val |= GMAC_DMA_CHAN0_CONTROL_PBLX8; WR4(sc, GMAC_DMA_CHAN0_CONTROL, val); val = RD4(sc, GMAC_DMA_CHAN0_TX_CONTROL); + val &= ~GMAC_DMA_CHAN0_TX_CONTROL_TXPBL_MASK; + val |= (sc->sc_dma_txpbl << GMAC_DMA_CHAN0_TX_CONTROL_TXPBL_SHIFT); val |= GMAC_DMA_CHAN0_TX_CONTROL_OSP; val |= GMAC_DMA_CHAN0_TX_CONTROL_START; WR4(sc, GMAC_DMA_CHAN0_TX_CONTROL, val); val = RD4(sc, GMAC_DMA_CHAN0_RX_CONTROL); - val &= ~GMAC_DMA_CHAN0_RX_CONTROL_RBSZ_MASK; + val &= ~(GMAC_DMA_CHAN0_RX_CONTROL_RBSZ_MASK | + GMAC_DMA_CHAN0_RX_CONTROL_RXPBL_MASK); val |= (MCLBYTES << GMAC_DMA_CHAN0_RX_CONTROL_RBSZ_SHIFT); + val |= (sc->sc_dma_rxpbl << GMAC_DMA_CHAN0_RX_CONTROL_RXPBL_SHIFT); val |= GMAC_DMA_CHAN0_RX_CONTROL_START; WR4(sc, GMAC_DMA_CHAN0_RX_CONTROL, val); @@ -1259,6 +1263,24 @@ eqos_get_eaddr(struct eqos_softc *sc, ui } static void +eqos_get_dma_pbl(struct eqos_softc *sc) +{ + prop_dictionary_t prop = device_properties(sc->sc_dev); + uint32_t pbl; + + /* Set default values. */ + sc->sc_dma_txpbl = sc->sc_dma_rxpbl = EQOS_DMA_PBL_DEFAULT; + + /* Get values from props. */ + if (prop_dictionary_get_uint32(prop, "snps,pbl", &pbl) && pbl) + sc->sc_dma_txpbl = sc->sc_dma_rxpbl = pbl; + if (prop_dictionary_get_uint32(prop, "snps,txpbl", &pbl) && pbl) + sc->sc_dma_txpbl = pbl; + if (prop_dictionary_get_uint32(prop, "snps,rxpbl", &pbl) && pbl) + sc->sc_dma_rxpbl = pbl; +} + +static void eqos_axi_configure(struct eqos_softc *sc) { prop_dictionary_t prop = device_properties(sc->sc_dev); @@ -1493,6 +1515,9 @@ eqos_attach(struct eqos_softc *sc) return error; } + /* Get DMA burst length */ + eqos_get_dma_pbl(sc); + /* Configure AXI Bus mode parameters */ eqos_axi_configure(sc); Index: src/sys/dev/ic/dwc_eqos_reg.h diff -u src/sys/dev/ic/dwc_eqos_reg.h:1.7 src/sys/dev/ic/dwc_eqos_reg.h:1.8 --- src/sys/dev/ic/dwc_eqos_reg.h:1.7 Tue Oct 17 10:23:00 2023 +++ src/sys/dev/ic/dwc_eqos_reg.h Thu Oct 26 18:02:50 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc_eqos_reg.h,v 1.7 2023/10/17 10:23:00 msaitoh Exp $ */ +/* $NetBSD: dwc_eqos_reg.h,v 1.8 2023/10/26 18:02:50 msaitoh Exp $ */ /*- * Copyright (c) 2022 Jared McNeill @@ -250,9 +250,13 @@ #define GMAC_DMA_CHAN0_CONTROL_DSL_MASK (0x7U << GMAC_DMA_CHAN0_CONTROL_DSL_SHIFT) #define GMAC_DMA_CHAN0_CONTROL_PBLX8 (1U << 16) #define GMAC_DMA_CHAN0_TX_CONTROL 0x1104 +#define GMAC_DMA_CHAN0_TX_CONTROL_TXPBL_SHIFT 16 +#define GMAC_DMA_CHAN0_TX_CONTROL_TXPBL_MASK (0x3FU << GMAC_DMA_CHAN0_TX_CONTROL_TXPBL_SHIFT) #define GMAC_DMA_CHAN0_TX_CONTROL_OSP (1U << 4) #define GMAC_DMA_CHAN0_TX_CONTROL_START (1U << 0) #define GMAC_DMA_CHAN0_RX_CONTROL 0x1108 +#define GMAC_DMA_CHAN0_RX_CONTROL_RXPBL_SHIFT 16 +#define GMAC_DMA_CHAN0_RX_CONTROL_RXPBL_MASK (0x3FU << GMAC_DMA_CHAN0_RX_CONTROL_RXPBL_SHIFT) #define GMAC_DMA_CHAN0_RX_CONTROL_RBSZ_SHIFT 1 #define GMAC_DMA_CHAN0_RX_CONTROL_RBSZ_MASK (0x3FFFU << GMAC_DMA_CHAN0_RX_CONTROL_RBSZ_SHIFT) #define GMAC_DMA_CHAN0_RX_CONTROL_START (1U << 0) Index: src/sys/dev/ic/dwc_eqos_var.h diff -u src/sys/dev/ic/dwc_eqos_var.h:1.5 src/sys/dev/ic/dwc_eqos_var.h:1.6 --- src/sys/dev/ic/dwc_eqos_var.h:1.5 Mon Oct 23 15:29:38 2023 +++ src/sys/dev/ic/dwc_eqos_var.h Thu Oct 26 18:02:50 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc_eqos_var.h,v 1.5 2023/10/23 15:29:38 msaitoh Exp $ */ +/* $NetBSD: dwc_eqos_var.h,v 1.6 2023/10/26 18:02:50 msaitoh Exp $ */ /*- * Copyright (c) 2022 Jared McNeill @@ -36,6 +36,7 @@ #include #define EQOS_DMA_DESC_COUNT 256 +#define EQOS_DMA_PBL_DEFAULT 8 struct eqos_bufmap { bus_dmamap_t map; @@ -60,8 +61,9 @@ struct
CVS commit: src/sys/dev
Module Name:src Committed By: msaitoh Date: Thu Oct 26 18:02:51 UTC 2023 Modified Files: src/sys/dev/ic: dwc_eqos.c dwc_eqos_reg.h dwc_eqos_var.h src/sys/dev/pci: if_eqos_pci.c Log Message: eqos(4): Set TX/RX DMA burst length to improve performance. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/dev/ic/dwc_eqos.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/ic/dwc_eqos_reg.h cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/dwc_eqos_var.h cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/if_eqos_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/doc
Module Name:src Committed By: martin Date: Thu Oct 26 15:24:13 UTC 2023 Modified Files: src/doc [netbsd-10]: CHANGES-10.0 Log Message: Tickets #435 and #436 To generate a diff of this commit: cvs rdiff -u -r1.1.2.146 -r1.1.2.147 src/doc/CHANGES-10.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-10.0 diff -u src/doc/CHANGES-10.0:1.1.2.146 src/doc/CHANGES-10.0:1.1.2.147 --- src/doc/CHANGES-10.0:1.1.2.146 Sun Oct 22 06:26:19 2023 +++ src/doc/CHANGES-10.0 Thu Oct 26 15:24:13 2023 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-10.0,v 1.1.2.146 2023/10/22 06:26:19 martin Exp $ +# $NetBSD: CHANGES-10.0,v 1.1.2.147 2023/10/26 15:24:13 martin Exp $ A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16 until the 10.0 release: @@ -12651,3 +12651,129 @@ sys/dev/pci/if_rge.c1.26,1.28 rge(4): properly handle allocation failures in rx interrupts. [mrg, ticket #434] +sys/dev/pci/mpii.c1.30 + + mpii(4): PR 57133: fix a regression introduce in rev. 1.22. + Do not reset xs->resid when encountering a + MPII_SCSIIO_STATUS_CHECK_COND condition. + [buhrow, ticket #435] + +xsrc/external/mit/xorg-server/dist/ChangeLog up to 1.1.1.25 +xsrc/external/mit/xorg-server/dist/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/aclocal.m4up to 1.1.1.20 +xsrc/external/mit/xorg-server/dist/config.guess up to 1.1.1.15 +xsrc/external/mit/xorg-server/dist/config.subup to 1.1.1.15 +xsrc/external/mit/xorg-server/dist/configure up to 1.18 +xsrc/external/mit/xorg-server/dist/configure.ac up to 1.20 +xsrc/external/mit/xorg-server/dist/meson.build up to 1.1.1.15 +xsrc/external/mit/xorg-server/dist/Xext/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/Xi/Makefile.inup to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/Xi/xiproperty.c up to 1.7 +xsrc/external/mit/xorg-server/dist/composite/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/config/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/damageext/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/dbe/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/dix/Makefile.in up to 1.1.1.18 +xsrc/external/mit/xorg-server/dist/dix/enterleave.h up to 1.1.1.4 +xsrc/external/mit/xorg-server/dist/doc/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/doc/dtrace/Makefile.in up to 1.1.1.11 +xsrc/external/mit/xorg-server/dist/dri3/Makefile.in up to 1.1.1.11 +xsrc/external/mit/xorg-server/dist/exa/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/fb/Makefile.inup to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/glamor/Makefile.in up to 1.1.1.11 +xsrc/external/mit/xorg-server/dist/glx/Makefile.in up to 1.1.1.16 +xsrc/external/mit/xorg-server/dist/hw/Makefile.inup to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/hw/kdrive/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/hw/kdrive/ephyr/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/hw/kdrive/ephyr/man/Makefile.in up to 1.1.1.13 +xsrc/external/mit/xorg-server/dist/hw/kdrive/src/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/hw/vfb/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/hw/vfb/man/Makefile.in up to 1.1.1.13 +xsrc/external/mit/xorg-server/dist/hw/xfree86/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/hw/xfree86/common/Makefile.in up to 1.1.1.18 +xsrc/external/mit/xorg-server/dist/hw/xfree86/ddc/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/hw/xfree86/dixmods/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/hw/xfree86/doc/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/hw/xfree86/dri/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/hw/xfree86/dri2/Makefile.in up to 1.1.1.16 +xsrc/external/mit/xorg-server/dist/hw/xfree86/dri2/pci_ids/Makefile.in up to 1.1.1.11 +xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/Makefile.in up to 1.1.1.11 +xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/inputtest/Makefile.in up to 1.1.1.5 +xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting/Makefile.in up to 1.1.1.12 +xsrc/external/mit/xorg-server/dist/hw/xfree86/exa/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/hw/xfree86/exa/man/Makefile.in up to 1.1.1.13 +xsrc/external/mit/xorg-server/dist/hw/xfree86/fbdevhw/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/hw/xfree86/fbdevhw/man/Makefile.in up to 1.1.1.13 +xsrc/external/mit/xorg-server/dist/hw/xfree86/glamor_egl/Makefile.in up to 1.1.1.11 +xsrc/external/mit/xorg-server/dist/hw/xfree86/i2c/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/hw/xfree86/int10/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/dist/hw/xfree86/loader/Makefile.in up to 1.1.1.17 +xsrc/external/mit/xorg-server/
CVS commit: [netbsd-10] src/doc
Module Name:src Committed By: martin Date: Thu Oct 26 15:24:13 UTC 2023 Modified Files: src/doc [netbsd-10]: CHANGES-10.0 Log Message: Tickets #435 and #436 To generate a diff of this commit: cvs rdiff -u -r1.1.2.146 -r1.1.2.147 src/doc/CHANGES-10.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/share/mk
Module Name:src Committed By: martin Date: Thu Oct 26 15:23:02 UTC 2023 Modified Files: src/share/mk [netbsd-10]: bsd.x11.mk Log Message: Pull up following revision(s) (requested by mrg in ticket #436): share/mk/bsd.x11.mk: revision 1.151 bump xorg server version. To generate a diff of this commit: cvs rdiff -u -r1.145.2.4 -r1.145.2.5 src/share/mk/bsd.x11.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.x11.mk diff -u src/share/mk/bsd.x11.mk:1.145.2.4 src/share/mk/bsd.x11.mk:1.145.2.5 --- src/share/mk/bsd.x11.mk:1.145.2.4 Sun Jul 30 12:06:55 2023 +++ src/share/mk/bsd.x11.mk Thu Oct 26 15:23:02 2023 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.x11.mk,v 1.145.2.4 2023/07/30 12:06:55 martin Exp $ +# $NetBSD: bsd.x11.mk,v 1.145.2.5 2023/10/26 15:23:02 martin Exp $ .include @@ -134,7 +134,7 @@ XORG_VERSION_CURRENT="(((${XORG_SERVER_M .else XORG_SERVER_MAJOR= 21 XORG_SERVER_MINOR= 1 -XORG_SERVER_TEENY= 8 +XORG_SERVER_TEENY= 9 XORG_VERSION_CURRENT="((1000) + ((${XORG_SERVER_MAJOR}) * 10) + ((${XORG_SERVER_MINOR}) * 1000) + ${XORG_SERVER_TEENY})" .endif
CVS commit: [netbsd-10] src/share/mk
Module Name:src Committed By: martin Date: Thu Oct 26 15:23:02 UTC 2023 Modified Files: src/share/mk [netbsd-10]: bsd.x11.mk Log Message: Pull up following revision(s) (requested by mrg in ticket #436): share/mk/bsd.x11.mk: revision 1.151 bump xorg server version. To generate a diff of this commit: cvs rdiff -u -r1.145.2.4 -r1.145.2.5 src/share/mk/bsd.x11.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] xsrc/external/mit/xorg-server
Module Name:xsrc Committed By: martin Date: Thu Oct 26 15:21:35 UTC 2023 Modified Files: xsrc/external/mit/xorg-server/dist [netbsd-10]: ChangeLog Makefile.in aclocal.m4 config.guess config.sub configure configure.ac meson.build xsrc/external/mit/xorg-server/dist/Xext [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/Xi [netbsd-10]: Makefile.in xiproperty.c xsrc/external/mit/xorg-server/dist/composite [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/config [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/damageext [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/dbe [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/dix [netbsd-10]: Makefile.in enterleave.h xsrc/external/mit/xorg-server/dist/doc [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/doc/dtrace [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/dri3 [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/exa [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/fb [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/glamor [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/glx [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/kdrive [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/kdrive/ephyr [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/kdrive/ephyr/man [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/kdrive/src [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/vfb [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/vfb/man [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86 [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/common [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/ddc [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/dixmods [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/doc [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/dri [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/dri2 [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/dri2/pci_ids [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/inputtest [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/exa [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/exa/man [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/fbdevhw [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/fbdevhw/man [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/glamor_egl [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/i2c [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/int10 [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/loader [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/man [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/modes [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bus [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/hurd [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/linux [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/misc [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/solaris [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/stub [netbsd-10]: Makefile.in xsrc/external/mit/xorg-server/dist/hw/xfree86/parser [netbsd-10]: Makefile.in xsrc/external/mit
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Thu Oct 26 15:14:28 UTC 2023 Modified Files: src/doc [netbsd-8]: CHANGES-8.3 Log Message: Ticket #1916 To generate a diff of this commit: cvs rdiff -u -r1.1.2.204 -r1.1.2.205 src/doc/CHANGES-8.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.3 diff -u src/doc/CHANGES-8.3:1.1.2.204 src/doc/CHANGES-8.3:1.1.2.205 --- src/doc/CHANGES-8.3:1.1.2.204 Wed Oct 18 14:46:35 2023 +++ src/doc/CHANGES-8.3 Thu Oct 26 15:14:28 2023 @@ -1,4 +1,4 @@ -$NetBSD: CHANGES-8.3,v 1.1.2.204 2023/10/18 14:46:35 martin Exp $ +$NetBSD: CHANGES-8.3,v 1.1.2.205 2023/10/26 15:14:28 martin Exp $ A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3 release: @@ -4064,3 +4064,10 @@ sys/dev/pci/if_wmvar.h 1.51 - Add I219{V,LM}({22,23}) devices (Raptor Lake). [msaitoh, ticket #1915] +sys/dev/pci/mpii.c1.30 + + mpii(4): PR 57133: fix a regression introduce in rev. 1.22. + Do not reset xs->resid when encountering a + MPII_SCSIIO_STATUS_CHECK_COND condition. + [buhrow, ticket #1916] +
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Thu Oct 26 15:14:28 UTC 2023 Modified Files: src/doc [netbsd-8]: CHANGES-8.3 Log Message: Ticket #1916 To generate a diff of this commit: cvs rdiff -u -r1.1.2.204 -r1.1.2.205 src/doc/CHANGES-8.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/dev/pci
Module Name:src Committed By: martin Date: Thu Oct 26 15:13:38 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-8]: mpii.c Log Message: Pull up following revision(s) (requested by buhrow in ticket #1916): sys/dev/pci/mpii.c: revision 1.30 Fixes for PR kern/57133: I can now explain why this assert is firing and have a fix for it. It is a regression introduced in R1.22 of mpii.c. If a request comes in and the IOC returns a MPII_SCSIIO_STATUS_CHECK_COND condition, after a successful transfer, or one that is a recovered error, mpii(4) correctly sets the xs->error to XS_SENSE, but incorrectly sets xs->resid to 0 before returning the xfer to the upper scsi layers. Once the upper layers get it, they notice the XS_SENSE check condition and because it's a retryable error, they increment xs_requeuecnt, set ERESTART and send the xfer request down to the mpii(4) layer again for a retry. What they do not do is reset xs->resid equal to xs->datalen. When the xfer comes down to mpii(4) again, the assert happens. The fix is for the mpii(4) driver to leave xs->resid alone when it encounters a MPII_SCSIIO_STATUS_CHECK_COND condition. This bug affects NetBSD-10, netbsd-9 and netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.8.10.7 -r1.8.10.8 src/sys/dev/pci/mpii.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/mpii.c diff -u src/sys/dev/pci/mpii.c:1.8.10.7 src/sys/dev/pci/mpii.c:1.8.10.8 --- src/sys/dev/pci/mpii.c:1.8.10.7 Thu Sep 29 14:38:24 2022 +++ src/sys/dev/pci/mpii.c Thu Oct 26 15:13:38 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: mpii.c,v 1.8.10.7 2022/09/29 14:38:24 snj Exp $ */ +/* $NetBSD: mpii.c,v 1.8.10.8 2023/10/26 15:13:38 martin Exp $ */ /* OpenBSD: mpii.c,v 1.115 2012/04/11 13:29:14 naddy Exp */ /* * Copyright (c) 2010 Mike Belopuhov @@ -20,7 +20,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.8.10.7 2022/09/29 14:38:24 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.8.10.8 2023/10/26 15:13:38 martin Exp $"); #include "bio.h" @@ -3225,7 +3225,6 @@ mpii_scsi_cmd_done(struct mpii_ccb *ccb) } KASSERT(xs->error == XS_NOERROR); - KASSERT(xs->resid == xs->datalen); KASSERT(xs->status == SCSI_OK); if (ccb->ccb_rcb == NULL) { @@ -3284,7 +3283,6 @@ mpii_scsi_cmd_done(struct mpii_ccb *ccb) break; case MPII_SCSIIO_STATUS_CHECK_COND: - xs->resid = 0; xs->error = XS_SENSE; break;
CVS commit: [netbsd-8] src/sys/dev/pci
Module Name:src Committed By: martin Date: Thu Oct 26 15:13:38 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-8]: mpii.c Log Message: Pull up following revision(s) (requested by buhrow in ticket #1916): sys/dev/pci/mpii.c: revision 1.30 Fixes for PR kern/57133: I can now explain why this assert is firing and have a fix for it. It is a regression introduced in R1.22 of mpii.c. If a request comes in and the IOC returns a MPII_SCSIIO_STATUS_CHECK_COND condition, after a successful transfer, or one that is a recovered error, mpii(4) correctly sets the xs->error to XS_SENSE, but incorrectly sets xs->resid to 0 before returning the xfer to the upper scsi layers. Once the upper layers get it, they notice the XS_SENSE check condition and because it's a retryable error, they increment xs_requeuecnt, set ERESTART and send the xfer request down to the mpii(4) layer again for a retry. What they do not do is reset xs->resid equal to xs->datalen. When the xfer comes down to mpii(4) again, the assert happens. The fix is for the mpii(4) driver to leave xs->resid alone when it encounters a MPII_SCSIIO_STATUS_CHECK_COND condition. This bug affects NetBSD-10, netbsd-9 and netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.8.10.7 -r1.8.10.8 src/sys/dev/pci/mpii.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Thu Oct 26 15:13:05 UTC 2023 Modified Files: src/doc [netbsd-9]: CHANGES-9.4 Log Message: Ticket #1756 To generate a diff of this commit: cvs rdiff -u -r1.1.2.111 -r1.1.2.112 src/doc/CHANGES-9.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.4 diff -u src/doc/CHANGES-9.4:1.1.2.111 src/doc/CHANGES-9.4:1.1.2.112 --- src/doc/CHANGES-9.4:1.1.2.111 Wed Oct 18 15:08:41 2023 +++ src/doc/CHANGES-9.4 Thu Oct 26 15:13:05 2023 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.4,v 1.1.2.111 2023/10/18 15:08:41 martin Exp $ +# $NetBSD: CHANGES-9.4,v 1.1.2.112 2023/10/26 15:13:05 martin Exp $ A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4 release: @@ -2350,3 +2350,10 @@ sys/kern/subr_thmap.c1.14,1.15 thmap(9): PR 57666, PR 57208: fix allocation failure issues. [riastradh, ticket #1755] +sys/dev/pci/mpii.c1.30 + + mpii(4): PR 57133: fix a regression introduce in rev. 1.22. + Do not reset xs->resid when encountering a + MPII_SCSIIO_STATUS_CHECK_COND condition. + [buhrow, ticket #1756] +
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Thu Oct 26 15:13:05 UTC 2023 Modified Files: src/doc [netbsd-9]: CHANGES-9.4 Log Message: Ticket #1756 To generate a diff of this commit: cvs rdiff -u -r1.1.2.111 -r1.1.2.112 src/doc/CHANGES-9.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Thu Oct 26 15:12:10 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-9]: mpii.c Log Message: Pull up following revision(s) (requested by buhrow in ticket #1756): sys/dev/pci/mpii.c: revision 1.30 Fixes for PR kern/57133: I can now explain why this assert is firing and have a fix for it. It is a regression introduced in R1.22 of mpii.c. If a request comes in and the IOC returns a MPII_SCSIIO_STATUS_CHECK_COND condition, after a successful transfer, or one that is a recovered error, mpii(4) correctly sets the xs->error to XS_SENSE, but incorrectly sets xs->resid to 0 before returning the xfer to the upper scsi layers. Once the upper layers get it, they notice the XS_SENSE check condition and because it's a retryable error, they increment xs_requeuecnt, set ERESTART and send the xfer request down to the mpii(4) layer again for a retry. What they do not do is reset xs->resid equal to xs->datalen. When the xfer comes down to mpii(4) again, the assert happens. The fix is for the mpii(4) driver to leave xs->resid alone when it encounters a MPII_SCSIIO_STATUS_CHECK_COND condition. This bug affects NetBSD-10, netbsd-9 and netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.22.4.1 -r1.22.4.2 src/sys/dev/pci/mpii.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/mpii.c diff -u src/sys/dev/pci/mpii.c:1.22.4.1 src/sys/dev/pci/mpii.c:1.22.4.2 --- src/sys/dev/pci/mpii.c:1.22.4.1 Sun Aug 9 14:14:34 2020 +++ src/sys/dev/pci/mpii.c Thu Oct 26 15:12:10 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: mpii.c,v 1.22.4.1 2020/08/09 14:14:34 martin Exp $ */ +/* $NetBSD: mpii.c,v 1.22.4.2 2023/10/26 15:12:10 martin Exp $ */ /* $OpenBSD: mpii.c,v 1.115 2018/08/14 05:22:21 jmatthew Exp $ */ /* * Copyright (c) 2010, 2012 Mike Belopuhov @@ -20,7 +20,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.22.4.1 2020/08/09 14:14:34 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.22.4.2 2023/10/26 15:12:10 martin Exp $"); #include "bio.h" @@ -3225,7 +3225,6 @@ mpii_scsi_cmd_done(struct mpii_ccb *ccb) } KASSERT(xs->error == XS_NOERROR); - KASSERT(xs->resid == xs->datalen); KASSERT(xs->status == SCSI_OK); if (ccb->ccb_rcb == NULL) { @@ -3285,7 +3284,6 @@ mpii_scsi_cmd_done(struct mpii_ccb *ccb) break; case MPII_SCSIIO_STATUS_CHECK_COND: - xs->resid = 0; xs->error = XS_SENSE; break;
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Thu Oct 26 15:12:10 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-9]: mpii.c Log Message: Pull up following revision(s) (requested by buhrow in ticket #1756): sys/dev/pci/mpii.c: revision 1.30 Fixes for PR kern/57133: I can now explain why this assert is firing and have a fix for it. It is a regression introduced in R1.22 of mpii.c. If a request comes in and the IOC returns a MPII_SCSIIO_STATUS_CHECK_COND condition, after a successful transfer, or one that is a recovered error, mpii(4) correctly sets the xs->error to XS_SENSE, but incorrectly sets xs->resid to 0 before returning the xfer to the upper scsi layers. Once the upper layers get it, they notice the XS_SENSE check condition and because it's a retryable error, they increment xs_requeuecnt, set ERESTART and send the xfer request down to the mpii(4) layer again for a retry. What they do not do is reset xs->resid equal to xs->datalen. When the xfer comes down to mpii(4) again, the assert happens. The fix is for the mpii(4) driver to leave xs->resid alone when it encounters a MPII_SCSIIO_STATUS_CHECK_COND condition. This bug affects NetBSD-10, netbsd-9 and netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.22.4.1 -r1.22.4.2 src/sys/dev/pci/mpii.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/sys/dev/pci
Module Name:src Committed By: martin Date: Thu Oct 26 15:11:02 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-10]: mpii.c Log Message: Pull up following revision(s) (requested by buhrow in ticket #435): sys/dev/pci/mpii.c: revision 1.30 Fixes for PR kern/57133: I can now explain why this assert is firing and have a fix for it. It is a regression introduced in R1.22 of mpii.c. If a request comes in and the IOC returns a MPII_SCSIIO_STATUS_CHECK_COND condition, after a successful transfer, or one that is a recovered error, mpii(4) correctly sets the xs->error to XS_SENSE, but incorrectly sets xs->resid to 0 before returning the xfer to the upper scsi layers. Once the upper layers get it, they notice the XS_SENSE check condition and because it's a retryable error, they increment xs_requeuecnt, set ERESTART and send the xfer request down to the mpii(4) layer again for a retry. What they do not do is reset xs->resid equal to xs->datalen. When the xfer comes down to mpii(4) again, the assert happens. The fix is for the mpii(4) driver to leave xs->resid alone when it encounters a MPII_SCSIIO_STATUS_CHECK_COND condition. This bug affects NetBSD-10, netbsd-9 and netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.29.6.1 src/sys/dev/pci/mpii.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/mpii.c diff -u src/sys/dev/pci/mpii.c:1.29 src/sys/dev/pci/mpii.c:1.29.6.1 --- src/sys/dev/pci/mpii.c:1.29 Sat Aug 7 16:19:14 2021 +++ src/sys/dev/pci/mpii.c Thu Oct 26 15:11:02 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: mpii.c,v 1.29 2021/08/07 16:19:14 thorpej Exp $ */ +/* $NetBSD: mpii.c,v 1.29.6.1 2023/10/26 15:11:02 martin Exp $ */ /* $OpenBSD: mpii.c,v 1.115 2018/08/14 05:22:21 jmatthew Exp $ */ /* * Copyright (c) 2010, 2012 Mike Belopuhov @@ -20,7 +20,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.29 2021/08/07 16:19:14 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.29.6.1 2023/10/26 15:11:02 martin Exp $"); #include "bio.h" @@ -3204,7 +3204,6 @@ mpii_scsi_cmd_done(struct mpii_ccb *ccb) } KASSERT(xs->error == XS_NOERROR); - KASSERT(xs->resid == xs->datalen); KASSERT(xs->status == SCSI_OK); if (ccb->ccb_rcb == NULL) { @@ -3264,7 +3263,6 @@ mpii_scsi_cmd_done(struct mpii_ccb *ccb) break; case MPII_SCSIIO_STATUS_CHECK_COND: - xs->resid = 0; xs->error = XS_SENSE; break;
CVS commit: [netbsd-10] src/sys/dev/pci
Module Name:src Committed By: martin Date: Thu Oct 26 15:11:02 UTC 2023 Modified Files: src/sys/dev/pci [netbsd-10]: mpii.c Log Message: Pull up following revision(s) (requested by buhrow in ticket #435): sys/dev/pci/mpii.c: revision 1.30 Fixes for PR kern/57133: I can now explain why this assert is firing and have a fix for it. It is a regression introduced in R1.22 of mpii.c. If a request comes in and the IOC returns a MPII_SCSIIO_STATUS_CHECK_COND condition, after a successful transfer, or one that is a recovered error, mpii(4) correctly sets the xs->error to XS_SENSE, but incorrectly sets xs->resid to 0 before returning the xfer to the upper scsi layers. Once the upper layers get it, they notice the XS_SENSE check condition and because it's a retryable error, they increment xs_requeuecnt, set ERESTART and send the xfer request down to the mpii(4) layer again for a retry. What they do not do is reset xs->resid equal to xs->datalen. When the xfer comes down to mpii(4) again, the assert happens. The fix is for the mpii(4) driver to leave xs->resid alone when it encounters a MPII_SCSIIO_STATUS_CHECK_COND condition. This bug affects NetBSD-10, netbsd-9 and netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.29.6.1 src/sys/dev/pci/mpii.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/crypto/external/bsd/openssh/dist
Module Name:src Committed By: christos Date: Thu Oct 26 15:10:14 UTC 2023 Added Files: src/crypto/external/bsd/openssh/dist: moduli Log Message: Put back module from 9.5p1 To generate a diff of this commit: cvs rdiff -u -r0 -r1.10 src/crypto/external/bsd/openssh/dist/moduli Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: jschauma Date: Thu Oct 26 14:04:46 UTC 2023 Modified Files: src/sys/sys: clock.h Log Message: change include to sys/stdint.h, as suggested by simonb@ This avoids the need for #ifdefs, and stdint.h turns out to be a symlink to sys/stdint.h to begin with. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/sys/clock.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/clock.h diff -u src/sys/sys/clock.h:1.5 src/sys/sys/clock.h:1.6 --- src/sys/sys/clock.h:1.5 Thu Oct 26 00:59:16 2023 +++ src/sys/sys/clock.h Thu Oct 26 14:04:45 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: clock.h,v 1.5 2023/10/26 00:59:16 jschauma Exp $ */ +/* $NetBSD: clock.h,v 1.6 2023/10/26 14:04:45 jschauma Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -32,9 +32,7 @@ #ifndef _SYS_CLOCK_H_ #define _SYS_CLOCK_H_ -#if !defined(_KERNEL) && !defined(_STANDALONE) -#include -#endif +#include /* Some handy constants. */ #define SECS_PER_MINUTE 60
CVS commit: src/sys/sys
Module Name:src Committed By: jschauma Date: Thu Oct 26 14:04:46 UTC 2023 Modified Files: src/sys/sys: clock.h Log Message: change include to sys/stdint.h, as suggested by simonb@ This avoids the need for #ifdefs, and stdint.h turns out to be a symlink to sys/stdint.h to begin with. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/sys/clock.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/misc
Module Name:src Committed By: jschauma Date: Thu Oct 26 13:43:17 UTC 2023 Modified Files: src/share/misc: acronyms.comp Log Message: +DFZ default-free zone To generate a diff of this commit: cvs rdiff -u -r1.375 -r1.376 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.375 src/share/misc/acronyms.comp:1.376 --- src/share/misc/acronyms.comp:1.375 Wed Oct 11 01:21:21 2023 +++ src/share/misc/acronyms.comp Thu Oct 26 13:43:17 2023 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.375 2023/10/11 01:21:21 jschauma Exp $ +$NetBSD: acronyms.comp,v 1.376 2023/10/26 13:43:17 jschauma Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -417,6 +417,7 @@ DFS distributed file system DFSAN Data Flow Sanitizer DFT diagnostic function test DFT discrete Fourier transform +DFZ default-free zone DGL data generation language DGEMM double precision general matrix multiply DH Diffie-Hellman
CVS commit: src/share/misc
Module Name:src Committed By: jschauma Date: Thu Oct 26 13:43:17 UTC 2023 Modified Files: src/share/misc: acronyms.comp Log Message: +DFZ default-free zone To generate a diff of this commit: cvs rdiff -u -r1.375 -r1.376 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: msaitoh Date: Thu Oct 26 13:00:13 UTC 2023 Modified Files: src/sys/dev/ic: dwc_eqos.c Log Message: eqos(4): Use EQOS_TXLOCK() more to be stable. Fix a bug that sc_tx.{cur,next,queued} become inconsitent. Use txlock when accessing TX data. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/dev/ic/dwc_eqos.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: msaitoh Date: Thu Oct 26 13:00:13 UTC 2023 Modified Files: src/sys/dev/ic: dwc_eqos.c Log Message: eqos(4): Use EQOS_TXLOCK() more to be stable. Fix a bug that sc_tx.{cur,next,queued} become inconsitent. Use txlock when accessing TX data. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/dev/ic/dwc_eqos.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/dwc_eqos.c diff -u src/sys/dev/ic/dwc_eqos.c:1.25 src/sys/dev/ic/dwc_eqos.c:1.26 --- src/sys/dev/ic/dwc_eqos.c:1.25 Mon Oct 23 15:29:38 2023 +++ src/sys/dev/ic/dwc_eqos.c Thu Oct 26 13:00:13 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc_eqos.c,v 1.25 2023/10/23 15:29:38 msaitoh Exp $ */ +/* $NetBSD: dwc_eqos.c,v 1.26 2023/10/26 13:00:13 msaitoh Exp $ */ /*- * Copyright (c) 2022 Jared McNeill @@ -38,7 +38,7 @@ #include "opt_net_mpsafe.h" #include -__KERNEL_RCSID(0, "$NetBSD: dwc_eqos.c,v 1.25 2023/10/23 15:29:38 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwc_eqos.c,v 1.26 2023/10/26 13:00:13 msaitoh Exp $"); #include #include @@ -269,6 +269,8 @@ eqos_setup_txdesc(struct eqos_softc *sc, DPRINTF(EDEB_TXRING, "preparing desc %u\n", index); + EQOS_ASSERT_TXLOCKED(sc); + if (paddr == 0 || len == 0) { DPRINTF(EDEB_TXRING, "tx for desc %u done!\n", index); @@ -924,6 +926,7 @@ eqos_txintr(struct eqos_softc *sc, int q DPRINTF(EDEB_INTR, "qid: %u\n", qid); EQOS_ASSERT_LOCKED(sc); + EQOS_ASSERT_TXLOCKED(sc); for (i = sc->sc_tx.next; sc->sc_tx.queued > 0; i = TX_NEXT(i)) { KASSERT(sc->sc_tx.queued > 0); @@ -1128,7 +1131,9 @@ eqos_intr(void *arg) } if ((dma_status & GMAC_DMA_CHAN0_STATUS_TI) != 0) { + EQOS_TXLOCK(sc); eqos_txintr(sc, 0); + EQOS_TXUNLOCK(sc); if_schedule_deferred_start(ifp); sc->sc_ev_txintr.ev_count++; } @@ -1336,7 +1341,9 @@ eqos_setup_dma(struct eqos_softc *sc, in "cannot create TX buffer map\n"); return error; } + EQOS_TXLOCK(sc); eqos_setup_txdesc(sc, i, 0, 0, 0, 0); + EQOS_TXUNLOCK(sc); } /* Setup RX ring */
CVS commit: src/sys/arch/sparc
Module Name:src Committed By: andvar Date: Thu Oct 26 10:41:03 UTC 2023 Modified Files: src/sys/arch/sparc/conf: files.sparc src/sys/arch/sparc/include: db_machdep.h src/sys/arch/sparc/sparc: db_interface.c Log Message: Build db_machdep.c when KGDB option is enabled. Do not cast (regs)->db_tf.tf_pc to db_addr_t (thus ifdef block is redundant). Adjust ifdef conditions in db_interface.c to make it build with KGDB option. While here, add #endif comments for longer blocks. These changes should make sparc build with KGDB option, once ddb/db_access.c code will be fixed to build with it. To generate a diff of this commit: cvs rdiff -u -r1.163 -r1.164 src/sys/arch/sparc/conf/files.sparc cvs rdiff -u -r1.29 -r1.30 src/sys/arch/sparc/include/db_machdep.h cvs rdiff -u -r1.97 -r1.98 src/sys/arch/sparc/sparc/db_interface.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc/conf/files.sparc diff -u src/sys/arch/sparc/conf/files.sparc:1.163 src/sys/arch/sparc/conf/files.sparc:1.164 --- src/sys/arch/sparc/conf/files.sparc:1.163 Sat Apr 24 23:36:48 2021 +++ src/sys/arch/sparc/conf/files.sparc Thu Oct 26 10:41:03 2023 @@ -1,4 +1,4 @@ -# $NetBSD: files.sparc,v 1.163 2021/04/24 23:36:48 thorpej Exp $ +# $NetBSD: files.sparc,v 1.164 2023/10/26 10:41:03 andvar Exp $ # @(#)files.sparc 8.1 (Berkeley) 7/19/93 # sparc-specific configuration info @@ -317,7 +317,7 @@ file arch/sparc/sparc/trap.c file arch/sparc/sparc/vm_machdep.c file arch/sparc/sparc/db_interface.c ddb | kgdb -file arch/sparc/sparc/db_machdep.c ddb +file arch/sparc/sparc/db_machdep.c ddb | kgdb file arch/sparc/sparc/db_trace.c ddb file arch/sparc/sparc/db_disasm.c ddb Index: src/sys/arch/sparc/include/db_machdep.h diff -u src/sys/arch/sparc/include/db_machdep.h:1.29 src/sys/arch/sparc/include/db_machdep.h:1.30 --- src/sys/arch/sparc/include/db_machdep.h:1.29 Sun Jan 24 07:36:54 2021 +++ src/sys/arch/sparc/include/db_machdep.h Thu Oct 26 10:41:03 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: db_machdep.h,v 1.29 2021/01/24 07:36:54 mrg Exp $ */ +/* $NetBSD: db_machdep.h,v 1.30 2023/10/26 10:41:03 andvar Exp $ */ /* * Mach Operating System @@ -58,12 +58,7 @@ extern db_regs_t *ddb_regp; #define DDB_TF (&ddb_regp->db_tf) #define DDB_FR (&ddb_regp->db_fr) - -#if defined(lint) #define PC_REGS(regs) ((regs)->db_tf.tf_pc) -#else -#define PC_REGS(regs) ((db_addr_t)(regs)->db_tf.tf_pc) -#endif #define PC_ADVANCE(regs) do {\ int n = (regs)->db_tf.tf_npc; \ (regs)->db_tf.tf_pc = n; \ Index: src/sys/arch/sparc/sparc/db_interface.c diff -u src/sys/arch/sparc/sparc/db_interface.c:1.97 src/sys/arch/sparc/sparc/db_interface.c:1.98 --- src/sys/arch/sparc/sparc/db_interface.c:1.97 Wed Oct 26 23:38:08 2022 +++ src/sys/arch/sparc/sparc/db_interface.c Thu Oct 26 10:41:03 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: db_interface.c,v 1.97 2022/10/26 23:38:08 riastradh Exp $ */ +/* $NetBSD: db_interface.c,v 1.98 2023/10/26 10:41:03 andvar Exp $ */ /* * Mach Operating System @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.97 2022/10/26 23:38:08 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.98 2023/10/26 10:41:03 andvar Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -68,6 +68,9 @@ __KERNEL_RCSID(0, "$NetBSD: db_interface #include #include #endif +#ifdef KGDB +#include +#endif #include #if defined(_KERNEL) @@ -221,7 +224,7 @@ ddb_suspend(struct trapframe *tf) } #endif /* MULTIPROCESSOR */ -#if defined(DDB) +#if defined(DDB) || defined(KGDB) /* * kdb_trap - field a TRACE or BPT trap */ @@ -286,7 +289,7 @@ kdb_trap(int type, struct trapframe *tf) return (1); } -#endif /* DDB */ +#endif /* DDB || KGDB */ #ifdef _KERNEL void @@ -388,7 +391,7 @@ db_page_cmd(db_expr_t addr, bool have_ad db_printf("pa %llx pg %p\n", (unsigned long long)addr, PHYS_TO_VM_PAGE(addr)); } -#endif +#endif /* _KERNEL */ #if defined(MULTIPROCESSOR) @@ -456,8 +459,7 @@ const struct db_command db_machine_comma #endif { DDB_END_CMD }, }; -#endif /* DDB */ - +#endif /* DDB || _KMEMUSER */ /* * support for SOFTWARE_SSTEP:
CVS commit: src/sys/arch/sparc
Module Name:src Committed By: andvar Date: Thu Oct 26 10:41:03 UTC 2023 Modified Files: src/sys/arch/sparc/conf: files.sparc src/sys/arch/sparc/include: db_machdep.h src/sys/arch/sparc/sparc: db_interface.c Log Message: Build db_machdep.c when KGDB option is enabled. Do not cast (regs)->db_tf.tf_pc to db_addr_t (thus ifdef block is redundant). Adjust ifdef conditions in db_interface.c to make it build with KGDB option. While here, add #endif comments for longer blocks. These changes should make sparc build with KGDB option, once ddb/db_access.c code will be fixed to build with it. To generate a diff of this commit: cvs rdiff -u -r1.163 -r1.164 src/sys/arch/sparc/conf/files.sparc cvs rdiff -u -r1.29 -r1.30 src/sys/arch/sparc/include/db_machdep.h cvs rdiff -u -r1.97 -r1.98 src/sys/arch/sparc/sparc/db_interface.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.