CVS commit: src/usr.bin/xlint
Module Name:src Committed By: rillig Date: Sat Jan 16 02:40:03 UTC 2021 Modified Files: src/usr.bin/xlint/common: emit.c externs.h lint.h tyname.c src/usr.bin/xlint/lint1: cgram.y decl.c emit1.c externs1.h func.c init.c lint1.h main1.c mem1.c oper.c scan.l tree.c src/usr.bin/xlint/lint2: chk.c externs2.h hash.c main2.c msg.c read.c src/usr.bin/xlint/xlint: xlint.c Log Message: lint: replace 0 and 1 with false and true, where appropriate Change in behavior: Passing the option -h exactly 4294967296 times or any multiple thereof is no longer equivalent to passing it never at all, it is now equivalent to passing it once. See main2.c, hflag++ for the actual change. Other than that, no functional change intended. A very large portion of the code already conformed to the requirements of the strict bool mode. The only missing thing was using the constant literals false and true instead of 0 and 1. For sure there are some integer literals left that can be converted. For now, all literals that appeared in the form " = 0" or " = 1" have been replaced. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.bin/xlint/common/emit.c cvs rdiff -u -r1.13 -r1.14 src/usr.bin/xlint/common/externs.h cvs rdiff -u -r1.24 -r1.25 src/usr.bin/xlint/common/lint.h cvs rdiff -u -r1.22 -r1.23 src/usr.bin/xlint/common/tyname.c cvs rdiff -u -r1.139 -r1.140 src/usr.bin/xlint/lint1/cgram.y cvs rdiff -u -r1.121 -r1.122 src/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.36 -r1.37 src/usr.bin/xlint/lint1/emit1.c cvs rdiff -u -r1.55 -r1.56 src/usr.bin/xlint/lint1/externs1.h cvs rdiff -u -r1.58 -r1.59 src/usr.bin/xlint/lint1/func.c cvs rdiff -u -r1.61 -r1.62 src/usr.bin/xlint/lint1/init.c cvs rdiff -u -r1.54 -r1.55 src/usr.bin/xlint/lint1/lint1.h cvs rdiff -u -r1.35 -r1.36 src/usr.bin/xlint/lint1/main1.c cvs rdiff -u -r1.22 -r1.23 src/usr.bin/xlint/lint1/mem1.c cvs rdiff -u -r1.3 -r1.4 src/usr.bin/xlint/lint1/oper.c cvs rdiff -u -r1.117 -r1.118 src/usr.bin/xlint/lint1/scan.l cvs rdiff -u -r1.153 -r1.154 src/usr.bin/xlint/lint1/tree.c cvs rdiff -u -r1.33 -r1.34 src/usr.bin/xlint/lint2/chk.c cvs rdiff -u -r1.8 -r1.9 src/usr.bin/xlint/lint2/externs2.h cvs rdiff -u -r1.12 -r1.13 src/usr.bin/xlint/lint2/hash.c \ src/usr.bin/xlint/lint2/main2.c cvs rdiff -u -r1.13 -r1.14 src/usr.bin/xlint/lint2/msg.c cvs rdiff -u -r1.36 -r1.37 src/usr.bin/xlint/lint2/read.c cvs rdiff -u -r1.53 -r1.54 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/common/emit.c diff -u src/usr.bin/xlint/common/emit.c:1.9 src/usr.bin/xlint/common/emit.c:1.10 --- src/usr.bin/xlint/common/emit.c:1.9 Wed Dec 30 11:47:15 2020 +++ src/usr.bin/xlint/common/emit.c Sat Jan 16 02:40:02 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: emit.c,v 1.9 2020/12/30 11:47:15 rillig Exp $ */ +/* $NetBSD: emit.c,v 1.10 2021/01/16 02:40:02 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: emit.c,v 1.9 2020/12/30 11:47:15 rillig Exp $"); +__RCSID("$NetBSD: emit.c,v 1.10 2021/01/16 02:40:02 rillig Exp $"); #endif #include @@ -139,7 +139,7 @@ void outqchar(int c) { - if (isprint(c) && c != '\\' && c != '"' && c != '\'') { + if (ch_isprint(c) && c != '\\' && c != '"' && c != '\'') { outchar(c); } else { outchar('\\'); Index: src/usr.bin/xlint/common/externs.h diff -u src/usr.bin/xlint/common/externs.h:1.13 src/usr.bin/xlint/common/externs.h:1.14 --- src/usr.bin/xlint/common/externs.h:1.13 Tue Jan 12 20:42:00 2021 +++ src/usr.bin/xlint/common/externs.h Sat Jan 16 02:40:02 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: externs.h,v 1.13 2021/01/12 20:42:00 rillig Exp $ */ +/* $NetBSD: externs.h,v 1.14 2021/01/16 02:40:02 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -34,7 +34,7 @@ /* * main[12].c */ -extern int pflag; +extern bool pflag; /* Treat _Bool as incompatible to all other scalar types. */ extern bool Tflag; @@ -47,7 +47,7 @@ extern void inittyp(void); * tyname.c */ extern const char *type_name(const type_t *); -extern int sametype(const type_t *, const type_t *); +extern bool sametype(const type_t *, const type_t *); extern const char *tspec_name(tspec_t); /* Index: src/usr.bin/xlint/common/lint.h diff -u src/usr.bin/xlint/common/lint.h:1.24 src/usr.bin/xlint/common/lint.h:1.25 --- src/usr.bin/xlint/common/lint.h:1.24 Sun Jan 10 00:05:45 2021 +++ src/usr.bin/xlint/common/lint.h Sat Jan 16 02:40:02 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: lint.h,v 1.24 2021/01/10 00:05:45 rillig Exp $ */ +/* $NetBSD: lint.h,v 1.25 2021/01/16 02:40:02 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -38,6 +38,7 @@ #endif #include +#include #include #include #include @@ -137,3 +138,12 @@ typedef struct ob { typedef struct type type_t; #include
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Sat Jan 16 02:21:26 UTC 2021 Modified Files: src/sys/kern: kern_entropy.c Log Message: entropy: Record number of time and data samples for userland. This more or less follows the semantics of the RNDGETESTNUM and RNDGETESTNAME ioctls to restore useful `rndctl -lv' output. Specifically: We count the number of time or data samples entered with rnd_add_*. Previously it would count the total number of 32-bit words in the data, rather than the number of rnd_add_* calls that enter data, but I think the number of calls makes more sense here. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/kern/kern_entropy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_entropy.c diff -u src/sys/kern/kern_entropy.c:1.27 src/sys/kern/kern_entropy.c:1.28 --- src/sys/kern/kern_entropy.c:1.27 Wed Jan 13 23:53:23 2021 +++ src/sys/kern/kern_entropy.c Sat Jan 16 02:21:26 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_entropy.c,v 1.27 2021/01/13 23:53:23 riastradh Exp $ */ +/* $NetBSD: kern_entropy.c,v 1.28 2021/01/16 02:21:26 riastradh Exp $ */ /*- * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -75,7 +75,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.27 2021/01/13 23:53:23 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.28 2021/01/16 02:21:26 riastradh Exp $"); #include #include @@ -141,7 +141,9 @@ struct entropy_cpu { * Per-CPU rndsource state. */ struct rndsource_cpu { - unsigned rc_nbits; /* bits of entropy added */ + unsigned rc_entropybits; + unsigned rc_timesamples; + unsigned rc_datasamples; }; /* @@ -250,11 +252,12 @@ static void filt_entropy_read_detach(str static int filt_entropy_read_event(struct knote *, long); static void entropy_request(size_t); static void rnd_add_data_1(struct krndsource *, const void *, uint32_t, - uint32_t); + uint32_t, uint32_t); static unsigned rndsource_entropybits(struct krndsource *); static void rndsource_entropybits_cpu(void *, void *, struct cpu_info *); static void rndsource_to_user(struct krndsource *, rndsource_t *); static void rndsource_to_user_est(struct krndsource *, rndsource_est_t *); +static void rndsource_to_user_est_cpu(void *, void *, struct cpu_info *); /* * entropy_timer() @@ -1545,6 +1548,8 @@ rnd_attach_source(struct krndsource *rs, /* Initialize the random source. */ memset(rs->name, 0, sizeof(rs->name)); /* paranoia */ strlcpy(rs->name, name, sizeof(rs->name)); + memset(>time_delta, 0, sizeof(rs->time_delta)); + memset(>value_delta, 0, sizeof(rs->value_delta)); rs->total = 0; rs->type = type; rs->flags = flags; @@ -1817,17 +1822,27 @@ rnd_add_data(struct krndsource *rs, cons /* If we are collecting data, enter them. */ if (ISSET(flags, RND_FLAG_COLLECT_VALUE)) - rnd_add_data_1(rs, buf, len, entropybits); + rnd_add_data_1(rs, buf, len, entropybits, + RND_FLAG_COLLECT_VALUE); /* If we are collecting timings, enter one. */ if (ISSET(flags, RND_FLAG_COLLECT_TIME)) { extra = entropy_timer(); - rnd_add_data_1(rs, , sizeof extra, 0); + rnd_add_data_1(rs, , sizeof extra, 0, + RND_FLAG_COLLECT_TIME); } } +static unsigned +add_sat(unsigned a, unsigned b) +{ + unsigned c = a + b; + + return (c < a ? UINT_MAX : c); +} + /* - * rnd_add_data_1(rs, buf, len, entropybits) + * rnd_add_data_1(rs, buf, len, entropybits, flag) * * Internal subroutine to call either entropy_enter_intr, if we're * in interrupt context, or entropy_enter if not, and to count the @@ -1835,7 +1850,7 @@ rnd_add_data(struct krndsource *rs, cons */ static void rnd_add_data_1(struct krndsource *rs, const void *buf, uint32_t len, -uint32_t entropybits) +uint32_t entropybits, uint32_t flag) { bool fullyused; @@ -1859,15 +1874,34 @@ rnd_add_data_1(struct krndsource *rs, co if (E->stage < ENTROPY_HOT) { if (E->stage >= ENTROPY_WARM) mutex_enter(>lock); - rs->total += MIN(UINT_MAX - rs->total, entropybits); + rs->total = add_sat(rs->total, entropybits); + switch (flag) { + case RND_FLAG_COLLECT_TIME: +rs->time_delta.insamples = +add_sat(rs->time_delta.insamples, 1); +break; + case RND_FLAG_COLLECT_VALUE: +rs->value_delta.insamples = +add_sat(rs->value_delta.insamples, 1); +break; + } if (E->stage >= ENTROPY_WARM) mutex_exit(>lock); } else { struct rndsource_cpu *rc = percpu_getref(rs->state); - unsigned nbits = rc->rc_nbits; - nbits += MIN(UINT_MAX - nbits, entropybits); - atomic_store_relaxed(>rc_nbits, nbits); + atomic_store_relaxed(>rc_entropybits, + add_sat(rc->rc_entropybits, entropybits)); + switch (flag) { + case RND_FLAG_COLLECT_TIME: +atomic_store_relaxed(>rc_timesamples, +add_sat(rc->rc_timesamples, 1)); +break; + case RND_FLAG_COLLECT_VALUE: +
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Sat Jan 16 02:20:00 UTC 2021 Modified Files: src/sys/kern: kern_clock.c Log Message: entropy: Sample cycle counter or timecounter in hardclock. Only do so when we're short on entropy, in order to minimize performance impact. The sampling should stay close to the time of the actual hardclock timer interrupt, so that the oscillator driving it determines when we sample the cycle counter or timecounter, which we hope is driven by an independent oscillator. If we used a callout, there might be many other influences -- such as spin lock delays possibly synchronized with this core's cycle counter -- that could get between the timer interrupt and the sample. In the glorious tickless future, this should instead be wired up to the timer interrupt handler, however that manifests in the future tickless API. To generate a diff of this commit: cvs rdiff -u -r1.143 -r1.144 src/sys/kern/kern_clock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_clock.c diff -u src/sys/kern/kern_clock.c:1.143 src/sys/kern/kern_clock.c:1.144 --- src/sys/kern/kern_clock.c:1.143 Sat Dec 5 18:17:01 2020 +++ src/sys/kern/kern_clock.c Sat Jan 16 02:20:00 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_clock.c,v 1.143 2020/12/05 18:17:01 thorpej Exp $ */ +/* $NetBSD: kern_clock.c,v 1.144 2021/01/16 02:20:00 riastradh Exp $ */ /*- * Copyright (c) 2000, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -69,7 +69,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_clock.c,v 1.143 2020/12/05 18:17:01 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_clock.c,v 1.144 2021/01/16 02:20:00 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_dtrace.h" @@ -90,6 +90,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_clock.c #include #include #include +#include #ifdef GPROF #include @@ -138,6 +139,61 @@ static int hardscheddiv; /* hard => sche static int psdiv; /* prof => stat divider */ int psratio; /* ratio: prof / stat */ +struct clockrnd { + struct krndsource source; + unsigned needed; +}; + +static struct clockrnd hardclockrnd __aligned(COHERENCY_UNIT); +static struct clockrnd statclockrnd __aligned(COHERENCY_UNIT); + +static void +clockrnd_get(size_t needed, void *cookie) +{ + struct clockrnd *C = cookie; + + /* Start sampling. */ + atomic_store_relaxed(>needed, 2*NBBY*needed); +} + +static void +clockrnd_sample(struct clockrnd *C) +{ + struct cpu_info *ci = curcpu(); + + /* If there's nothing needed right now, stop here. */ + if (__predict_true(C->needed == 0)) + return; + + /* + * If we're not the primary core of a package, we're probably + * driven by the same clock as the primary core, so don't + * bother. + */ + if (ci != ci->ci_package1st) + return; + + /* Take a sample and enter it into the pool. */ + rnd_add_uint32(>source, 0); + + /* + * On the primary CPU, count down. Using an atomic decrement + * here isn't really necessary -- on every platform we care + * about, stores to unsigned int are atomic, and the only other + * memory operation that could happen here is for another CPU + * to store a higher value for needed. But using an atomic + * decrement avoids giving the impression of data races, and is + * unlikely to hurt because only one CPU will ever be writing + * to the location. + */ + if (CPU_IS_PRIMARY(curcpu())) { + unsigned needed __diagused; + + needed = atomic_dec_uint_nv(>needed); + KASSERT(needed != UINT_MAX); + } +} + static u_int get_intr_timecount(struct timecounter *); static struct timecounter intr_timecounter = { @@ -224,6 +280,16 @@ initclocks(void) SYSCTL_DESCR("Number of hardclock ticks"), NULL, 0, _ticks, sizeof(hardclock_ticks), CTL_KERN, KERN_HARDCLOCK_TICKS, CTL_EOL); + + rndsource_setcb(, clockrnd_get, ); + rnd_attach_source(, "hardclock", RND_TYPE_SKEW, + RND_FLAG_COLLECT_TIME|RND_FLAG_HASCB); + if (stathz) { + rndsource_setcb(, clockrnd_get, + ); + rnd_attach_source(, "statclock", + RND_TYPE_SKEW, RND_FLAG_COLLECT_TIME|RND_FLAG_HASCB); + } } /* @@ -235,6 +301,8 @@ hardclock(struct clockframe *frame) struct lwp *l; struct cpu_info *ci; + clockrnd_sample(); + ci = curcpu(); l = ci->ci_onproc; @@ -338,6 +406,9 @@ statclock(struct clockframe *frame) struct proc *p; struct lwp *l; + if (stathz) + clockrnd_sample(); + /* * Notice changes in divisor frequency, and adjust clock * frequency accordingly.
CVS commit: src/share/man/man4
Module Name:src Committed By: thorpej Date: Sat Jan 16 01:47:23 UTC 2021 Modified Files: src/share/man/man4: tpm.4 Log Message: Note that TPM 1.2 devices can attach to ACPI, as well. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/tpm.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/tpm.4 diff -u src/share/man/man4/tpm.4:1.5 src/share/man/man4/tpm.4:1.6 --- src/share/man/man4/tpm.4:1.5 Tue Oct 8 18:43:03 2019 +++ src/share/man/man4/tpm.4 Sat Jan 16 01:47:23 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: tpm.4,v 1.5 2019/10/08 18:43:03 maxv Exp $ +.\" $NetBSD: tpm.4,v 1.6 2021/01/16 01:47:23 thorpej Exp $ .\" .\" Copyright (c) 2019 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. .\" -.Dd October 6, 2019 +.Dd January 15, 2021 .Dt TPM 4 .Os .Sh NAME @@ -47,7 +47,7 @@ Supported modules: .It TPM 2.0 chips over ACPI .It -TPM 1.2 chips over ISA +TPM 1.2 chips over ACPI and ISA .El .Pp Note that the supported interface version is TIS1.2 in each case.
CVS commit: src/sys/arch/amd64/conf
Module Name:src Committed By: thorpej Date: Sat Jan 16 01:43:42 UTC 2021 Modified Files: src/sys/arch/amd64/conf: GENERIC Log Message: Enable tpm @ acpi (now that it can match TPM 1.2 devices, which are not, as the comment implies, experimental). To generate a diff of this commit: cvs rdiff -u -r1.580 -r1.581 src/sys/arch/amd64/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/conf/GENERIC diff -u src/sys/arch/amd64/conf/GENERIC:1.580 src/sys/arch/amd64/conf/GENERIC:1.581 --- src/sys/arch/amd64/conf/GENERIC:1.580 Sun Sep 27 13:48:49 2020 +++ src/sys/arch/amd64/conf/GENERIC Sat Jan 16 01:43:42 2021 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.580 2020/09/27 13:48:49 roy Exp $ +# $NetBSD: GENERIC,v 1.581 2021/01/16 01:43:42 thorpej Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.580 $" +#ident "GENERIC-$Revision: 1.581 $" maxusers 64 # estimated number of users @@ -354,7 +354,7 @@ sony* at acpi? # Sony Notebook Control spic* at acpi? # Sony Programmable I/O Controller wsmouse* at spic? # mouse thinkpad* at acpi? # IBM/Lenovo Thinkpad hotkeys -#tpm* at acpi? # ACPI TPM (Experimental) +tpm* at acpi? # ACPI TPM (Experimental) ug* at acpi? # Abit uGuru Hardware monitor valz* at acpi? # Toshiba Dynabook hotkeys wb* at acpi? # Winbond W83L518D SD/MMC reader
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: thorpej Date: Sat Jan 16 01:23:04 UTC 2021 Modified Files: src/sys/dev/acpi: tpm_acpi.c Log Message: Match PNP0C31 as a TPM 1.2 device. Works on my ThinkPad X260, and eliminates the last of the devices that attach to "isa". To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/acpi/tpm_acpi.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/tpm_acpi.c diff -u src/sys/dev/acpi/tpm_acpi.c:1.11 src/sys/dev/acpi/tpm_acpi.c:1.12 --- src/sys/dev/acpi/tpm_acpi.c:1.11 Wed Oct 9 14:03:57 2019 +++ src/sys/dev/acpi/tpm_acpi.c Sat Jan 16 01:23:04 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tpm_acpi.c,v 1.11 2019/10/09 14:03:57 maxv Exp $ */ +/* $NetBSD: tpm_acpi.c,v 1.12 2021/01/16 01:23:04 thorpej Exp $ */ /* * Copyright (c) 2012, 2019 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tpm_acpi.c,v 1.11 2019/10/09 14:03:57 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tpm_acpi.c,v 1.12 2021/01/16 01:23:04 thorpej Exp $"); #include #include @@ -56,6 +56,14 @@ CFATTACH_DECL_NEW(tpm_acpi, sizeof(struc tpm_acpi_attach, NULL, NULL); /* + * Supported TPM 1.2 devices. + */ +static const char * const tpm_1_2_acpi_ids[] = { + "PNP0C31", + NULL +}; + +/* * Supported TPM 2.0 devices. */ static const char * const tpm2_acpi_ids[] = { @@ -77,6 +85,11 @@ tpm_acpi_match(device_t parent, cfdata_t if (tpm_cd.cd_devs && tpm_cd.cd_devs[0]) return 0; + if (acpi_match_hid(aa->aa_node->ad_devinfo, tpm_1_2_acpi_ids)) { + /* XXX assume TPM 1.2 devices are memory-mapped. */ + return 1; + } + if (!acpi_match_hid(aa->aa_node->ad_devinfo, tpm2_acpi_ids)) return 0; @@ -122,7 +135,11 @@ tpm_acpi_attach(device_t parent, device_ size = mem->ar_length; sc->sc_dev = self; - sc->sc_ver = TPM_2_0; + if (acpi_match_hid(aa->aa_node->ad_devinfo, tpm_1_2_acpi_ids)) { + sc->sc_ver = TPM_1_2; + } else { + sc->sc_ver = TPM_2_0; + } mutex_init(>sc_lock, MUTEX_DEFAULT, IPL_NONE); sc->sc_busy = false; sc->sc_intf = _intf_tis12;
CVS commit: src/sys/dev/isa
Module Name:src Committed By: thorpej Date: Sat Jan 16 00:43:04 UTC 2021 Modified Files: src/sys/dev/isa: tpm_isa.c Log Message: Add missing printing-of-newlines in the attach routine. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/isa/tpm_isa.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/isa/tpm_isa.c diff -u src/sys/dev/isa/tpm_isa.c:1.7 src/sys/dev/isa/tpm_isa.c:1.8 --- src/sys/dev/isa/tpm_isa.c:1.7 Wed Oct 9 14:03:58 2019 +++ src/sys/dev/isa/tpm_isa.c Sat Jan 16 00:43:03 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tpm_isa.c,v 1.7 2019/10/09 14:03:58 maxv Exp $ */ +/* $NetBSD: tpm_isa.c,v 1.8 2021/01/16 00:43:03 thorpej Exp $ */ /* * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tpm_isa.c,v 1.7 2019/10/09 14:03:58 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tpm_isa.c,v 1.8 2021/01/16 00:43:03 thorpej Exp $"); #include #include @@ -113,6 +113,9 @@ tpm_isa_attach(device_t parent, device_t base = (unsigned int)ia->ia_iomem[0].ir_addr; size = TPM_SPACE_SIZE; + aprint_normal("\n"); + aprint_naive("\n"); + sc->sc_dev = self; sc->sc_ver = TPM_1_2; mutex_init(>sc_lock, MUTEX_DEFAULT, IPL_NONE);
CVS commit: src/usr.bin/xlint/lint2
Module Name:src Committed By: rillig Date: Sat Jan 16 00:09:28 UTC 2021 Modified Files: src/usr.bin/xlint/lint2: Makefile Log Message: lint: fix LINTFLAGS for lint2 These have never worked since they report a syntax error in just because there is an __inline over there. I wonder why it has been necessary at all to have custom LINTFLAGS for lint itself. It's just an ordinary program. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.bin/xlint/lint2/Makefile 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/lint2/Makefile diff -u src/usr.bin/xlint/lint2/Makefile:1.17 src/usr.bin/xlint/lint2/Makefile:1.18 --- src/usr.bin/xlint/lint2/Makefile:1.17 Sun Oct 8 17:52:29 2006 +++ src/usr.bin/xlint/lint2/Makefile Sat Jan 16 00:09:28 2021 @@ -1,11 +1,10 @@ -# $NetBSD: Makefile,v 1.17 2006/10/08 17:52:29 peter Exp $ +# $NetBSD: Makefile,v 1.18 2021/01/16 00:09:28 rillig Exp $ NOMAN= # defined PROG= lint2 SRCS= main2.c hash.c read.c mem.c mem2.c chk.c msg.c emit.c emit2.c \ inittyp.c tyname.c -LINTFLAGS= -abehrz BINDIR= /usr/libexec CPPFLAGS+= -DPASS=\"${PROG}.h\" -I${.CURDIR}
CVS commit: src/sys/arch/arm/nxp
Module Name:src Committed By: jmcneill Date: Fri Jan 15 23:58:18 UTC 2021 Modified Files: src/sys/arch/arm/nxp: if_enet_imx.c imx6_pcie.c imx6_pwm.c imx6_spi.c imx6_usb.c imx_ahcisata.c imx_com.c imx_gpio.c imx_sdhc.c imxwdog.c Log Message: use fdtbus_intr_establish_xname To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nxp/if_enet_imx.c \ src/sys/arch/arm/nxp/imx6_pcie.c src/sys/arch/arm/nxp/imx6_pwm.c \ src/sys/arch/arm/nxp/imx6_usb.c src/sys/arch/arm/nxp/imx_ahcisata.c \ src/sys/arch/arm/nxp/imx_com.c src/sys/arch/arm/nxp/imx_sdhc.c \ src/sys/arch/arm/nxp/imxwdog.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/nxp/imx6_spi.c \ src/sys/arch/arm/nxp/imx_gpio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/nxp/if_enet_imx.c diff -u src/sys/arch/arm/nxp/if_enet_imx.c:1.1 src/sys/arch/arm/nxp/if_enet_imx.c:1.2 --- src/sys/arch/arm/nxp/if_enet_imx.c:1.1 Wed Dec 23 14:42:38 2020 +++ src/sys/arch/arm/nxp/if_enet_imx.c Fri Jan 15 23:58:18 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_enet_imx.c,v 1.1 2020/12/23 14:42:38 skrll Exp $ */ +/* $NetBSD: if_enet_imx.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $ */ /*- * Copyright (c) 2019 Genetec Corporation. All rights reserved. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_enet_imx.c,v 1.1 2020/12/23 14:42:38 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_enet_imx.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $"); #include "opt_fdt.h" @@ -183,6 +183,7 @@ static void * enet_intr_establish(struct enet_softc *sc, int phandle, u_int index) { char intrstr[128]; + char xname[16]; void *ih; if (!fdtbus_intr_str(phandle, index, intrstr, sizeof(intrstr))) { @@ -191,7 +192,10 @@ enet_intr_establish(struct enet_softc *s return NULL; } - ih = fdtbus_intr_establish(phandle, index, IPL_NET, 0, enet_intr, sc); + snprintf(xname, sizeof(xname), "%s #%u", device_xname(sc->sc_dev), + index); + ih = fdtbus_intr_establish_xname(phandle, index, IPL_NET, 0, + enet_intr, sc, xname); if (ih == NULL) { aprint_error_dev(sc->sc_dev, "failed to establish interrupt on %s\n", intrstr); Index: src/sys/arch/arm/nxp/imx6_pcie.c diff -u src/sys/arch/arm/nxp/imx6_pcie.c:1.1 src/sys/arch/arm/nxp/imx6_pcie.c:1.2 --- src/sys/arch/arm/nxp/imx6_pcie.c:1.1 Wed Dec 23 14:42:38 2020 +++ src/sys/arch/arm/nxp/imx6_pcie.c Fri Jan 15 23:58:18 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_pcie.c,v 1.1 2020/12/23 14:42:38 skrll Exp $ */ +/* $NetBSD: imx6_pcie.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $ */ /*- * Copyright (c) 2019 Genetec Corporation. All rights reserved. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: imx6_pcie.c,v 1.1 2020/12/23 14:42:38 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx6_pcie.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $"); #include "opt_pci.h" #include "opt_fdt.h" @@ -208,8 +208,8 @@ imx6_pcie_attach(device_t parent, device return; } - sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_VM, - FDT_INTR_MPSAFE, imxpcie_intr, sc); + sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_VM, + FDT_INTR_MPSAFE, imxpcie_intr, sc, device_xname(self)); if (sc->sc_ih == NULL) { aprint_error_dev(self, "failed to establish interrupt on %s\n", intrstr); Index: src/sys/arch/arm/nxp/imx6_pwm.c diff -u src/sys/arch/arm/nxp/imx6_pwm.c:1.1 src/sys/arch/arm/nxp/imx6_pwm.c:1.2 --- src/sys/arch/arm/nxp/imx6_pwm.c:1.1 Wed Dec 23 14:42:38 2020 +++ src/sys/arch/arm/nxp/imx6_pwm.c Fri Jan 15 23:58:18 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_pwm.c,v 1.1 2020/12/23 14:42:38 skrll Exp $ */ +/* $NetBSD: imx6_pwm.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $ */ /*- * Copyright (c) 2019 Genetec Corporation. All rights reserved. * Written by Hashimoto Kenichi for Genetec Corporation. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: imx6_pwm.c,v 1.1 2020/12/23 14:42:38 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: imx6_pwm.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $"); #include #include @@ -116,8 +116,8 @@ imx6_pwm_attach(device_t parent, device_ return; } - sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_VM, - 0, imxpwm_intr, sc); + sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_VM, + 0, imxpwm_intr, sc, device_xname(self)); if (sc->sc_ih == NULL) { aprint_error_dev(self, "failed to establish interrupt on %s\n", intrstr); Index: src/sys/arch/arm/nxp/imx6_usb.c diff -u src/sys/arch/arm/nxp/imx6_usb.c:1.1 src/sys/arch/arm/nxp/imx6_usb.c:1.2 --- src/sys/arch/arm/nxp/imx6_usb.c:1.1 Wed Dec 23 14:42:38 2020 +++ src/sys/arch/arm/nxp/imx6_usb.c Fri Jan 15 23:58:18 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: imx6_usb.c,v 1.1 2020/12/23 14:42:38 skrll Exp $ */ +/* $NetBSD: imx6_usb.c,v 1.2 2021/01/15 23:58:18 jmcneill Exp $ */ /*- * Copyright (c) 2019 Genetec Corporation. All rights
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Fri Jan 15 23:43:51 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: func.c lint1.h tree.c Log Message: lint: merge duplicate code for non-zero detection To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/usr.bin/xlint/lint1/func.c cvs rdiff -u -r1.53 -r1.54 src/usr.bin/xlint/lint1/lint1.h cvs rdiff -u -r1.152 -r1.153 src/usr.bin/xlint/lint1/tree.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/lint1/func.c diff -u src/usr.bin/xlint/lint1/func.c:1.57 src/usr.bin/xlint/lint1/func.c:1.58 --- src/usr.bin/xlint/lint1/func.c:1.57 Tue Jan 12 20:42:01 2021 +++ src/usr.bin/xlint/lint1/func.c Fri Jan 15 23:43:51 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: func.c,v 1.57 2021/01/12 20:42:01 rillig Exp $ */ +/* $NetBSD: func.c,v 1.58 2021/01/15 23:43:51 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: func.c,v 1.57 2021/01/12 20:42:01 rillig Exp $"); +__RCSID("$NetBSD: func.c,v 1.58 2021/01/15 23:43:51 rillig Exp $"); #endif #include @@ -725,13 +725,8 @@ while1(tnode_t *tn) pushctrl(T_WHILE); cstmt->c_loop = 1; - if (tn != NULL && tn->tn_op == CON) { - if (is_integer(tn->tn_type->t_tspec)) { - cstmt->c_infinite = tn->tn_val->v_quad != 0; - } else { - cstmt->c_infinite = tn->tn_val->v_ldbl != 0.0; - } - } + if (tn != NULL && tn->tn_op == CON) + cstmt->c_infinite = is_nonzero(tn); expr(tn, 0, 1, 1); } @@ -790,11 +785,7 @@ do2(tnode_t *tn) tn = check_controlling_expression(tn); if (tn != NULL && tn->tn_op == CON) { - if (is_integer(tn->tn_type->t_tspec)) { - cstmt->c_infinite = tn->tn_val->v_quad != 0; - } else { - cstmt->c_infinite = tn->tn_val->v_ldbl != 0.0; - } + cstmt->c_infinite = is_nonzero(tn); if (!cstmt->c_infinite && cstmt->c_cont) /* continue in 'do ... while (0)' loop */ error(323); @@ -850,15 +841,8 @@ for1(tnode_t *tn1, tnode_t *tn2, tnode_t if (tn2 != NULL) expr(tn2, 0, 1, 1); - if (tn2 == NULL) { - cstmt->c_infinite = 1; - } else if (tn2->tn_op == CON) { - if (is_integer(tn2->tn_type->t_tspec)) { - cstmt->c_infinite = tn2->tn_val->v_quad != 0; - } else { - cstmt->c_infinite = tn2->tn_val->v_ldbl != 0.0; - } - } + cstmt->c_infinite = + tn2 == NULL || (tn2->tn_op == CON && is_nonzero(tn2)); /* Checking the reinitialisation expression is done in for2() */ Index: src/usr.bin/xlint/lint1/lint1.h diff -u src/usr.bin/xlint/lint1/lint1.h:1.53 src/usr.bin/xlint/lint1/lint1.h:1.54 --- src/usr.bin/xlint/lint1/lint1.h:1.53 Mon Jan 4 22:26:50 2021 +++ src/usr.bin/xlint/lint1/lint1.h Fri Jan 15 23:43:51 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: lint1.h,v 1.53 2021/01/04 22:26:50 rillig Exp $ */ +/* $NetBSD: lint1.h,v 1.54 2021/01/15 23:43:51 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -459,3 +459,20 @@ check_printf(const char *fmt, ...) # define gnuism(id, args...) wrap_check_printf(gnuism, id, ##args) # define c99ism(id, args...) wrap_check_printf(c99ism, id, ##args) #endif + +static inline bool +is_nonzero_val(tspec_t t, const val_t *val) +{ + return is_floating(t) ? val->v_ldbl != 0.0 : val->v_quad != 0; +} + +static inline bool +is_nonzero(const tnode_t *tn) +{ + /* + * XXX: It's strange that val_t doesn't know itself whether it + * holds a floating-point or an integer value. + */ + lint_assert(tn->tn_op == CON); + return is_nonzero_val(tn->tn_type->t_tspec, tn->tn_val); +} Index: src/usr.bin/xlint/lint1/tree.c diff -u src/usr.bin/xlint/lint1/tree.c:1.152 src/usr.bin/xlint/lint1/tree.c:1.153 --- src/usr.bin/xlint/lint1/tree.c:1.152 Thu Jan 14 07:42:31 2021 +++ src/usr.bin/xlint/lint1/tree.c Fri Jan 15 23:43:51 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tree.c,v 1.152 2021/01/14 07:42:31 rillig Exp $ */ +/* $NetBSD: tree.c,v 1.153 2021/01/15 23:43:51 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: tree.c,v 1.152 2021/01/14 07:42:31 rillig Exp $"); +__RCSID("$NetBSD: tree.c,v 1.153 2021/01/15 23:43:51 rillig Exp $"); #endif #include @@ -2234,9 +2234,7 @@ convert_constant(op_t op, int arg, type_ if (nt == BOOL) { /* C99 6.3.1.2 */ nv->v_ansiu = 0; - nv->v_quad = ot == FLOAT || ot == DOUBLE || ot == LDOUBLE - ? v->v_ldbl != 0.0 - : v->v_quad != 0; + nv->v_quad = is_nonzero_val(ot, v) ? 1 : 0; return; } @@ -3142,26 +3140,15 @@ fold(tnode_t *tn) static tnode_t * fold_test(tnode_t *tn) { - int l, r = 0; + bool l, r; val_t *v; v = xcalloc(1, sizeof (val_t)); v->v_tspec = tn->tn_type->t_tspec; lint_assert(v->v_tspec == INT || (Tflag && v->v_tspec == BOOL)); - if (is_floating(tn->tn_left->tn_type->t_tspec)) { - l = tn->tn_left->tn_val->v_ldbl != 0.0; - } else { - l =
CVS commit: src/sys/arch/arm/ti
Module Name:src Committed By: jmcneill Date: Fri Jan 15 23:19:33 UTC 2021 Modified Files: src/sys/arch/arm/ti: if_cpsw.c ti_com.c ti_ehci.c ti_gpio.c ti_iic.c ti_motg.c ti_omaptimer.c ti_sdhc.c Log Message: use fdtbus_intr_establish_xname To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/ti/if_cpsw.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/ti/ti_com.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/ti/ti_ehci.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/ti/ti_gpio.c \ src/sys/arch/arm/ti/ti_sdhc.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/ti/ti_iic.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/ti/ti_motg.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/ti/ti_omaptimer.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/ti/if_cpsw.c diff -u src/sys/arch/arm/ti/if_cpsw.c:1.12 src/sys/arch/arm/ti/if_cpsw.c:1.13 --- src/sys/arch/arm/ti/if_cpsw.c:1.12 Tue Feb 4 05:15:45 2020 +++ src/sys/arch/arm/ti/if_cpsw.c Fri Jan 15 23:19:33 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_cpsw.c,v 1.12 2020/02/04 05:15:45 thorpej Exp $ */ +/* $NetBSD: if_cpsw.c,v 1.13 2021/01/15 23:19:33 jmcneill Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -53,7 +53,7 @@ */ #include -__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.12 2020/02/04 05:15:45 thorpej Exp $"); +__KERNEL_RCSID(1, "$NetBSD: if_cpsw.c,v 1.13 2021/01/15 23:19:33 jmcneill Exp $"); #include #include @@ -398,6 +398,7 @@ cpsw_attach(device_t parent, device_t se bus_addr_t addr; bus_size_t size; int error, slave, len; + char xname[16]; u_int i; KERNHIST_INIT(cpswhist, 4096); @@ -462,10 +463,21 @@ cpsw_attach(device_t parent, device_t se memcpy(sc->sc_enaddr, macaddr, ETHER_ADDR_LEN); } - sc->sc_rxthih = fdtbus_intr_establish(phandle, CPSW_INTROFF_RXTH, IPL_VM, FDT_INTR_FLAGS, cpsw_rxthintr, sc); - sc->sc_rxih = fdtbus_intr_establish(phandle, CPSW_INTROFF_RX, IPL_VM, FDT_INTR_FLAGS, cpsw_rxintr, sc); - sc->sc_txih = fdtbus_intr_establish(phandle, CPSW_INTROFF_TX, IPL_VM, FDT_INTR_FLAGS, cpsw_txintr, sc); - sc->sc_miscih = fdtbus_intr_establish(phandle, CPSW_INTROFF_MISC, IPL_VM, FDT_INTR_FLAGS, cpsw_miscintr, sc); + snprintf(xname, sizeof(xname), "%s rxth", device_xname(self)); + sc->sc_rxthih = fdtbus_intr_establish_xname(phandle, CPSW_INTROFF_RXTH, + IPL_VM, FDT_INTR_FLAGS, cpsw_rxthintr, sc, xname); + + snprintf(xname, sizeof(xname), "%s rx", device_xname(self)); + sc->sc_rxih = fdtbus_intr_establish_xname(phandle, CPSW_INTROFF_RX, + IPL_VM, FDT_INTR_FLAGS, cpsw_rxintr, sc, xname); + + snprintf(xname, sizeof(xname), "%s tx", device_xname(self)); + sc->sc_txih = fdtbus_intr_establish_xname(phandle, CPSW_INTROFF_TX, + IPL_VM, FDT_INTR_FLAGS, cpsw_txintr, sc, xname); + + snprintf(xname, sizeof(xname), "%s misc", device_xname(self)); + sc->sc_miscih = fdtbus_intr_establish_xname(phandle, CPSW_INTROFF_MISC, + IPL_VM, FDT_INTR_FLAGS, cpsw_miscintr, sc, xname); sc->sc_bst = faa->faa_bst; sc->sc_bss = size; Index: src/sys/arch/arm/ti/ti_com.c diff -u src/sys/arch/arm/ti/ti_com.c:1.9 src/sys/arch/arm/ti/ti_com.c:1.10 --- src/sys/arch/arm/ti/ti_com.c:1.9 Mon Sep 28 11:54:23 2020 +++ src/sys/arch/arm/ti/ti_com.c Fri Jan 15 23:19:33 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ti_com.c,v 1.9 2020/09/28 11:54:23 jmcneill Exp $ */ +/* $NetBSD: ti_com.c,v 1.10 2021/01/15 23:19:33 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: ti_com.c,v 1.9 2020/09/28 11:54:23 jmcneill Exp $"); +__KERNEL_RCSID(1, "$NetBSD: ti_com.c,v 1.10 2021/01/15 23:19:33 jmcneill Exp $"); #include #include @@ -118,8 +118,8 @@ ti_com_attach(device_t parent, device_t return; } - ssc->ssc_ih = fdtbus_intr_establish(phandle, 0, IPL_SERIAL, - FDT_INTR_MPSAFE, comintr, sc); + ssc->ssc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_SERIAL, + FDT_INTR_MPSAFE, comintr, sc, device_xname(self)); if (ssc->ssc_ih == NULL) { aprint_error_dev(self, "failed to establish interrupt on %s\n", intrstr); Index: src/sys/arch/arm/ti/ti_ehci.c diff -u src/sys/arch/arm/ti/ti_ehci.c:1.1 src/sys/arch/arm/ti/ti_ehci.c:1.2 --- src/sys/arch/arm/ti/ti_ehci.c:1.1 Wed Oct 30 21:41:40 2019 +++ src/sys/arch/arm/ti/ti_ehci.c Fri Jan 15 23:19:33 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ti_ehci.c,v 1.1 2019/10/30 21:41:40 jmcneill Exp $ */ +/* $NetBSD: ti_ehci.c,v 1.2 2021/01/15 23:19:33 jmcneill Exp $ */ /*- * Copyright (c) 2015-2019 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ti_ehci.c,v 1.1 2019/10/30 21:41:40 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ti_ehci.c,v 1.2 2021/01/15 23:19:33 jmcneill Exp $"); #include #include @@ -136,8 +136,8 @@ ti_ehci_attach(device_t parent, device_t return; } - ih = fdtbus_intr_establish(phandle, 0, IPL_USB, FDT_INTR_MPSAFE, - ehci_intr, sc);
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Fri Jan 15 23:15:28 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.c d_c99_bool_strict.exp Log Message: lint: add test for bool bit fields as operands of '|' To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.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/d_c99_bool_strict.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.6 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.7 --- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.6 Fri Jan 15 22:07:54 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c Fri Jan 15 23:15:28 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_bool_strict.c,v 1.6 2021/01/15 22:07:54 rillig Exp $ */ +/* $NetBSD: d_c99_bool_strict.c,v 1.7 2021/01/15 23:15:28 rillig Exp $ */ # 3 "d_c99_bool_strict.c" /* @@ -529,3 +529,17 @@ SB003_operand_comma(bool b, int i) i = (i, i + 1); return b; } + +void +bit_field_as_operator_argument(void) +{ + struct s { + bool ordinary; + bool bit_field: 1; + }; + + struct s s = { 0 }; + + s.ordinary = s.ordinary | s.ordinary; + s.bit_field = s.bit_field | s.bit_field; /* FIXME *//* expect: 107 */ +} Index: src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.5 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.6 --- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.5 Fri Jan 15 22:07:54 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp Fri Jan 15 23:15:28 2021 @@ -101,3 +101,4 @@ d_c99_bool_strict.c(453): warning: illeg d_c99_bool_strict.c(456): argument #1 expects '_Bool', gets passed 'pointer' [334] d_c99_bool_strict.c(456): warning: illegal combination of integer (int) and pointer (pointer to const char), arg #2 [154] d_c99_bool_strict.c(468): argument #1 expects '_Bool', gets passed 'int' [334] +d_c99_bool_strict.c(544): operands of '=' have incompatible types (_Bool != int) [107]
CVS commit: src/sys/arch/arm/nvidia
Module Name:src Committed By: jmcneill Date: Fri Jan 15 23:11:59 UTC 2021 Modified Files: src/sys/arch/arm/nvidia: tegra_ahcisata.c tegra_apbdma.c tegra_cec.c tegra_com.c tegra_drm_mode.c tegra_ehci.c tegra_hdaudio.c tegra_i2c.c tegra_mc.c tegra_nouveau.c tegra_pcie.c tegra_sdhc.c tegra_xusb.c Log Message: use fdtbus_intr_establish_xname To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/nvidia/tegra_ahcisata.c \ src/sys/arch/arm/nvidia/tegra_com.c \ src/sys/arch/arm/nvidia/tegra_hdaudio.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/nvidia/tegra_apbdma.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/nvidia/tegra_cec.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/nvidia/tegra_drm_mode.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/nvidia/tegra_ehci.c cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/nvidia/tegra_i2c.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/nvidia/tegra_mc.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/nvidia/tegra_nouveau.c cvs rdiff -u -r1.31 -r1.32 src/sys/arch/arm/nvidia/tegra_pcie.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/nvidia/tegra_sdhc.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/nvidia/tegra_xusb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/nvidia/tegra_ahcisata.c diff -u src/sys/arch/arm/nvidia/tegra_ahcisata.c:1.13 src/sys/arch/arm/nvidia/tegra_ahcisata.c:1.14 --- src/sys/arch/arm/nvidia/tegra_ahcisata.c:1.13 Mon Dec 28 14:08:42 2020 +++ src/sys/arch/arm/nvidia/tegra_ahcisata.c Fri Jan 15 23:11:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_ahcisata.c,v 1.13 2020/12/28 14:08:42 jmcneill Exp $ */ +/* $NetBSD: tegra_ahcisata.c,v 1.14 2021/01/15 23:11:59 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tegra_ahcisata.c,v 1.13 2020/12/28 14:08:42 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tegra_ahcisata.c,v 1.14 2021/01/15 23:11:59 jmcneill Exp $"); #include #include @@ -231,8 +231,8 @@ tegra_ahcisata_attach(device_t parent, d return; } - sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_BIO, 0, - ahci_intr, >sc); + sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_BIO, 0, + ahci_intr, >sc, device_xname(self)); if (sc->sc_ih == NULL) { aprint_error_dev(self, "failed to establish interrupt on %s\n", intrstr); Index: src/sys/arch/arm/nvidia/tegra_com.c diff -u src/sys/arch/arm/nvidia/tegra_com.c:1.13 src/sys/arch/arm/nvidia/tegra_com.c:1.14 --- src/sys/arch/arm/nvidia/tegra_com.c:1.13 Mon Sep 28 11:54:23 2020 +++ src/sys/arch/arm/nvidia/tegra_com.c Fri Jan 15 23:11:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_com.c,v 1.13 2020/09/28 11:54:23 jmcneill Exp $ */ +/* $NetBSD: tegra_com.c,v 1.14 2021/01/15 23:11:59 jmcneill Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: tegra_com.c,v 1.13 2020/09/28 11:54:23 jmcneill Exp $"); +__KERNEL_RCSID(1, "$NetBSD: tegra_com.c,v 1.14 2021/01/15 23:11:59 jmcneill Exp $"); #include #include @@ -130,8 +130,8 @@ tegra_com_attach(device_t parent, device return; } - tsc->tsc_ih = fdtbus_intr_establish(faa->faa_phandle, 0, IPL_SERIAL, - FDT_INTR_MPSAFE, comintr, sc); + tsc->tsc_ih = fdtbus_intr_establish_xname(faa->faa_phandle, 0, + IPL_SERIAL, FDT_INTR_MPSAFE, comintr, sc, device_xname(self)); if (tsc->tsc_ih == NULL) { aprint_error_dev(self, "failed to establish interrupt on %s\n", intrstr); Index: src/sys/arch/arm/nvidia/tegra_hdaudio.c diff -u src/sys/arch/arm/nvidia/tegra_hdaudio.c:1.13 src/sys/arch/arm/nvidia/tegra_hdaudio.c:1.14 --- src/sys/arch/arm/nvidia/tegra_hdaudio.c:1.13 Sun Oct 13 06:11:31 2019 +++ src/sys/arch/arm/nvidia/tegra_hdaudio.c Fri Jan 15 23:11:59 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_hdaudio.c,v 1.13 2019/10/13 06:11:31 skrll Exp $ */ +/* $NetBSD: tegra_hdaudio.c,v 1.14 2021/01/15 23:11:59 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tegra_hdaudio.c,v 1.13 2019/10/13 06:11:31 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tegra_hdaudio.c,v 1.14 2021/01/15 23:11:59 jmcneill Exp $"); #include #include @@ -165,8 +165,8 @@ tegra_hdaudio_attach(device_t parent, de return; } - sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_AUDIO, 0, - tegra_hdaudio_intr, sc); + sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_AUDIO, 0, + tegra_hdaudio_intr, sc, device_xname(self)); if (sc->sc_ih == NULL) { aprint_error_dev(self, "couldn't establish interrupt on %s\n", intrstr); Index: src/sys/arch/arm/nvidia/tegra_apbdma.c diff -u src/sys/arch/arm/nvidia/tegra_apbdma.c:1.7 src/sys/arch/arm/nvidia/tegra_apbdma.c:1.8 --- src/sys/arch/arm/nvidia/tegra_apbdma.c:1.7 Sun Oct 13 06:11:31 2019 +++
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Fri Jan 15 23:02:38 UTC 2021 Modified Files: src/sys/arch/arm/sunxi: sun6i_spi.c Log Message: trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/sunxi/sun6i_spi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sunxi/sun6i_spi.c diff -u src/sys/arch/arm/sunxi/sun6i_spi.c:1.6 src/sys/arch/arm/sunxi/sun6i_spi.c:1.7 --- src/sys/arch/arm/sunxi/sun6i_spi.c:1.6 Fri Jan 15 23:02:07 2021 +++ src/sys/arch/arm/sunxi/sun6i_spi.c Fri Jan 15 23:02:38 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sun6i_spi.c,v 1.6 2021/01/15 23:02:07 jmcneill Exp $ */ +/* $NetBSD: sun6i_spi.c,v 1.7 2021/01/15 23:02:38 jmcneill Exp $ */ /* * Copyright (c) 2019 Tobias Nygren @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sun6i_spi.c,v 1.6 2021/01/15 23:02:07 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sun6i_spi.c,v 1.7 2021/01/15 23:02:38 jmcneill Exp $"); #include #include @@ -158,7 +158,7 @@ sun6ispi_attach(device_t parent, device_ aprint_naive("\n"); aprint_normal(": SPI\n"); - + aprint_normal_dev(self, "interrupting on %s\n", intrstr); gcr = SPI_GCR_SRST; @@ -205,7 +205,7 @@ sun6ispi_configure(void *cookie, int sla if (slave >= sc->sc_spi.sct_nslaves) return EINVAL; - + tcr = SPI_TCR_SS_LEVEL | SPI_TCR_SPOL; switch (mode) {
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Fri Jan 15 23:02:07 UTC 2021 Modified Files: src/sys/arch/arm/sunxi: sun6i_spi.c Log Message: use fdtbus_intr_establish_xname To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/sunxi/sun6i_spi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sunxi/sun6i_spi.c diff -u src/sys/arch/arm/sunxi/sun6i_spi.c:1.5 src/sys/arch/arm/sunxi/sun6i_spi.c:1.6 --- src/sys/arch/arm/sunxi/sun6i_spi.c:1.5 Tue Aug 13 17:03:10 2019 +++ src/sys/arch/arm/sunxi/sun6i_spi.c Fri Jan 15 23:02:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sun6i_spi.c,v 1.5 2019/08/13 17:03:10 tnn Exp $ */ +/* $NetBSD: sun6i_spi.c,v 1.6 2021/01/15 23:02:07 jmcneill Exp $ */ /* * Copyright (c) 2019 Tobias Nygren @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sun6i_spi.c,v 1.5 2019/08/13 17:03:10 tnn Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sun6i_spi.c,v 1.6 2021/01/15 23:02:07 jmcneill Exp $"); #include #include @@ -149,8 +149,8 @@ sun6ispi_attach(device_t parent, device_ return; } - sc->sc_intrh = fdtbus_intr_establish(phandle, 0, IPL_VM, 0, - sun6ispi_intr, sc); + sc->sc_intrh = fdtbus_intr_establish_xname(phandle, 0, IPL_VM, 0, + sun6ispi_intr, sc, device_xname(self)); if (sc->sc_intrh == NULL) { aprint_error(": unable to establish interrupt\n"); return;
CVS commit: src/sys
Module Name:src Committed By: jmcneill Date: Fri Jan 15 22:59:50 UTC 2021 Modified Files: src/sys/arch/arm/rockchip: rk3399_pcie.c src/sys/arch/arm/ti: ti_edma.c src/sys/dev/fdt: fdt_intr.c fdtvar.h Log Message: Add 'const char *xname' param to fdtbus_intr_establish_byname To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/rockchip/rk3399_pcie.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/ti/ti_edma.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/fdt/fdt_intr.c cvs rdiff -u -r1.66 -r1.67 src/sys/dev/fdt/fdtvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/rockchip/rk3399_pcie.c diff -u src/sys/arch/arm/rockchip/rk3399_pcie.c:1.13 src/sys/arch/arm/rockchip/rk3399_pcie.c:1.14 --- src/sys/arch/arm/rockchip/rk3399_pcie.c:1.13 Fri Jan 15 00:38:23 2021 +++ src/sys/arch/arm/rockchip/rk3399_pcie.c Fri Jan 15 22:59:50 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: rk3399_pcie.c,v 1.13 2021/01/15 00:38:23 jmcneill Exp $ */ +/* $NetBSD: rk3399_pcie.c,v 1.14 2021/01/15 22:59:50 jmcneill Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -17,7 +17,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: rk3399_pcie.c,v 1.13 2021/01/15 00:38:23 jmcneill Exp $"); +__KERNEL_RCSID(1, "$NetBSD: rk3399_pcie.c,v 1.14 2021/01/15 22:59:50 jmcneill Exp $"); #include #include @@ -629,7 +629,7 @@ rkpcie_intx_establish(device_t dev, u_in PCIM_INTx_ENAB(2) | PCIM_INTx_ENAB(3)); cookie = fdtbus_intr_establish_byname(sc->sc_phsc.sc_phandle, - "legacy", ipl, flags, func, arg); + "legacy", ipl, flags, func, arg, xname); return cookie; } Index: src/sys/arch/arm/ti/ti_edma.c diff -u src/sys/arch/arm/ti/ti_edma.c:1.1 src/sys/arch/arm/ti/ti_edma.c:1.2 --- src/sys/arch/arm/ti/ti_edma.c:1.1 Sun Oct 27 12:14:51 2019 +++ src/sys/arch/arm/ti/ti_edma.c Fri Jan 15 22:59:50 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ti_edma.c,v 1.1 2019/10/27 12:14:51 jmcneill Exp $ */ +/* $NetBSD: ti_edma.c,v 1.2 2021/01/15 22:59:50 jmcneill Exp $ */ /*- * Copyright (c) 2014 Jared D. McNeill @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ti_edma.c,v 1.1 2019/10/27 12:14:51 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ti_edma.c,v 1.2 2021/01/15 22:59:50 jmcneill Exp $"); #include #include @@ -159,7 +159,7 @@ edma_attach(device_t parent, device_t se edma_init(sc); sc->sc_ih = fdtbus_intr_establish_byname(phandle, "edma3_ccint", - IPL_VM, FDT_INTR_MPSAFE, edma_intr, sc); + IPL_VM, FDT_INTR_MPSAFE, edma_intr, sc, device_xname(self)); if (sc->sc_ih == NULL) { aprint_error_dev(self, "failed to establish interrupt\n"); return; Index: src/sys/dev/fdt/fdt_intr.c diff -u src/sys/dev/fdt/fdt_intr.c:1.28 src/sys/dev/fdt/fdt_intr.c:1.29 --- src/sys/dev/fdt/fdt_intr.c:1.28 Fri Jan 15 17:17:04 2021 +++ src/sys/dev/fdt/fdt_intr.c Fri Jan 15 22:59:49 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_intr.c,v 1.28 2021/01/15 17:17:04 ryo Exp $ */ +/* $NetBSD: fdt_intr.c,v 1.29 2021/01/15 22:59:49 jmcneill Exp $ */ /*- * Copyright (c) 2015-2018 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdt_intr.c,v 1.28 2021/01/15 17:17:04 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdt_intr.c,v 1.29 2021/01/15 22:59:49 jmcneill Exp $"); #include #include @@ -202,7 +202,7 @@ fdtbus_intr_establish_xname(int phandle, void * fdtbus_intr_establish_byname(int phandle, const char *name, int ipl, -int flags, int (*func)(void *), void *arg) +int flags, int (*func)(void *), void *arg, const char *xname) { u_int index; int err; @@ -211,7 +211,8 @@ fdtbus_intr_establish_byname(int phandle if (err != 0) return NULL; - return fdtbus_intr_establish(phandle, index, ipl, flags, func, arg); + return fdtbus_intr_establish_xname(phandle, index, ipl, flags, func, + arg, xname); } void * Index: src/sys/dev/fdt/fdtvar.h diff -u src/sys/dev/fdt/fdtvar.h:1.66 src/sys/dev/fdt/fdtvar.h:1.67 --- src/sys/dev/fdt/fdtvar.h:1.66 Fri Jan 15 17:17:04 2021 +++ src/sys/dev/fdt/fdtvar.h Fri Jan 15 22:59:49 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: fdtvar.h,v 1.66 2021/01/15 17:17:04 ryo Exp $ */ +/* $NetBSD: fdtvar.h,v 1.67 2021/01/15 22:59:49 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -322,7 +322,7 @@ void * fdtbus_intr_establish(int, u_int void * fdtbus_intr_establish_xname(int, u_int, int, int, int (*func)(void *), void *arg, const char *); void * fdtbus_intr_establish_byname(int, const char *, int, int, - int (*func)(void *), void *arg); + int (*func)(void *), void *arg, const char *); void * fdtbus_intr_establish_raw(int, const u_int *, int, int, int (*func)(void *), void *arg, const char *); void fdtbus_intr_mask(int, void *);
CVS commit: src/sys/external/bsd/vchiq/dist/interface/vchiq_arm
Module Name:src Committed By: jmcneill Date: Fri Jan 15 22:58:49 UTC 2021 Modified Files: src/sys/external/bsd/vchiq/dist/interface/vchiq_arm: vchiq_netbsd_fdt.c Log Message: use fdtbus_intr_establish_xname To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_netbsd_fdt.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/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_netbsd_fdt.c diff -u src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_netbsd_fdt.c:1.3 src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_netbsd_fdt.c:1.4 --- src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_netbsd_fdt.c:1.3 Tue Dec 1 04:19:04 2020 +++ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_netbsd_fdt.c Fri Jan 15 22:58:49 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: vchiq_netbsd_fdt.c,v 1.3 2020/12/01 04:19:04 rin Exp $ */ +/* $NetBSD: vchiq_netbsd_fdt.c,v 1.4 2021/01/15 22:58:49 jmcneill Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vchiq_netbsd_fdt.c,v 1.3 2020/12/01 04:19:04 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vchiq_netbsd_fdt.c,v 1.4 2021/01/15 22:58:49 jmcneill Exp $"); #include #include @@ -130,8 +130,8 @@ vchiq_fdt_defer(device_t self) return; } - sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_VM, FDT_INTR_MPSAFE, - vchiq_intr, sc); + sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_VM, + FDT_INTR_MPSAFE, vchiq_intr, sc, device_xname(self)); if (sc->sc_ih == NULL) { aprint_error_dev(self, "failed to establish interrupt %s\n", intrstr);
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Fri Jan 15 22:47:33 UTC 2021 Modified Files: src/sys/arch/arm/sunxi: sun4i_dma.c sun4i_emac.c sun4i_spi.c sun6i_dma.c sun8i_codec.c sun8i_crypto.c sunxi_can.c sunxi_emac.c sunxi_gmac.c sunxi_gpio.c sunxi_hstimer.c sunxi_lcdc.c sunxi_lradc.c sunxi_mmc.c sunxi_musb.c sunxi_nand.c sunxi_nmi.c sunxi_rsb.c sunxi_sata.c sunxi_thermal.c sunxi_timer.c sunxi_ts.c sunxi_twi.c Log Message: use fdtbus_intr_establish_xname To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sunxi/sun4i_dma.c \ src/sys/arch/arm/sunxi/sunxi_can.c src/sys/arch/arm/sunxi/sunxi_ts.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/sunxi/sun4i_emac.c \ src/sys/arch/arm/sunxi/sunxi_twi.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/sunxi/sun4i_spi.c \ src/sys/arch/arm/sunxi/sunxi_musb.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/sunxi/sun6i_dma.c \ src/sys/arch/arm/sunxi/sunxi_rsb.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/sunxi/sun8i_codec.c \ src/sys/arch/arm/sunxi/sunxi_gmac.c src/sys/arch/arm/sunxi/sunxi_lcdc.c \ src/sys/arch/arm/sunxi/sunxi_timer.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/sunxi/sun8i_crypto.c cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arm/sunxi/sunxi_emac.c \ src/sys/arch/arm/sunxi/sunxi_gpio.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sunxi_hstimer.c \ src/sys/arch/arm/sunxi/sunxi_sata.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sunxi/sunxi_lradc.c cvs rdiff -u -r1.41 -r1.42 src/sys/arch/arm/sunxi/sunxi_mmc.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/sunxi/sunxi_nand.c \ src/sys/arch/arm/sunxi/sunxi_thermal.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/sunxi/sunxi_nmi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/sunxi/sun4i_dma.c diff -u src/sys/arch/arm/sunxi/sun4i_dma.c:1.3 src/sys/arch/arm/sunxi/sun4i_dma.c:1.4 --- src/sys/arch/arm/sunxi/sun4i_dma.c:1.3 Fri Apr 20 18:04:12 2018 +++ src/sys/arch/arm/sunxi/sun4i_dma.c Fri Jan 15 22:47:32 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sun4i_dma.c,v 1.3 2018/04/20 18:04:12 bouyer Exp $ */ +/* $NetBSD: sun4i_dma.c,v 1.4 2021/01/15 22:47:32 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -29,7 +29,7 @@ #include "opt_ddb.h" #include -__KERNEL_RCSID(0, "$NetBSD: sun4i_dma.c,v 1.3 2018/04/20 18:04:12 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sun4i_dma.c,v 1.4 2021/01/15 22:47:32 jmcneill Exp $"); #include #include @@ -408,8 +408,8 @@ sun4idma_attach(device_t parent, device_ } } - sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_SCHED, - FDT_INTR_MPSAFE, sun4idma_intr, sc); + sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_SCHED, + FDT_INTR_MPSAFE, sun4idma_intr, sc, device_xname(sc->sc_dev)); if (sc->sc_ih == NULL) { aprint_error_dev(sc->sc_dev, "couldn't establish interrupt on %s\n", intrstr); Index: src/sys/arch/arm/sunxi/sunxi_can.c diff -u src/sys/arch/arm/sunxi/sunxi_can.c:1.3 src/sys/arch/arm/sunxi/sunxi_can.c:1.4 --- src/sys/arch/arm/sunxi/sunxi_can.c:1.3 Wed Jan 29 06:05:31 2020 +++ src/sys/arch/arm/sunxi/sunxi_can.c Fri Jan 15 22:47:32 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_can.c,v 1.3 2020/01/29 06:05:31 thorpej Exp $ */ +/* $NetBSD: sunxi_can.c,v 1.4 2021/01/15 22:47:32 jmcneill Exp $ */ /*- * Copyright (c) 2017,2018 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: sunxi_can.c,v 1.3 2020/01/29 06:05:31 thorpej Exp $"); +__KERNEL_RCSID(1, "$NetBSD: sunxi_can.c,v 1.4 2021/01/15 22:47:32 jmcneill Exp $"); #include #include @@ -202,8 +202,8 @@ sunxi_can_attach(device_t parent, device sunxi_can_write(sc, SUNXI_CAN_INT_REG, sunxi_can_read(sc, SUNXI_CAN_INT_REG)); - sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_NET, 0, - sunxi_can_intr, sc); + sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_NET, 0, + sunxi_can_intr, sc, device_xname(self)); if (sc->sc_ih == NULL) { aprint_error_dev(self, "failed to establish interrupt on %s\n", intrstr); Index: src/sys/arch/arm/sunxi/sunxi_ts.c diff -u src/sys/arch/arm/sunxi/sunxi_ts.c:1.3 src/sys/arch/arm/sunxi/sunxi_ts.c:1.4 --- src/sys/arch/arm/sunxi/sunxi_ts.c:1.3 Tue Jun 4 03:03:34 2019 +++ src/sys/arch/arm/sunxi/sunxi_ts.c Fri Jan 15 22:47:32 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_ts.c,v 1.3 2019/06/04 03:03:34 thorpej Exp $ */ +/* $NetBSD: sunxi_ts.c,v 1.4 2021/01/15 22:47:32 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_ts.c,v 1.3 2019/06/04 03:03:34 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_ts.c,v 1.4 2021/01/15 22:47:32 jmcneill Exp $"); #include #include @@ -388,7 +388,8 @@ sunxi_ts_attach(device_t parent, device_ sunxi_ts_init(sc); - ih = fdtbus_intr_establish(phandle, 0,
CVS commit: src/sys/dev/fdt
Module Name:src Committed By: jmcneill Date: Fri Jan 15 22:35:40 UTC 2021 Modified Files: src/sys/dev/fdt: ahcisata_fdt.c dwc2_fdt.c dwiic_fdt.c genet_fdt.c ns8250_uart.c virtio_mmio_fdt.c Log Message: use fdtbus_intr_establish_xname To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/fdt/ahcisata_fdt.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/fdt/dwc2_fdt.c cvs rdiff -u -r1.2 -r1.3 src/sys/dev/fdt/dwiic_fdt.c \ src/sys/dev/fdt/genet_fdt.c src/sys/dev/fdt/ns8250_uart.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/fdt/virtio_mmio_fdt.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/fdt/ahcisata_fdt.c diff -u src/sys/dev/fdt/ahcisata_fdt.c:1.1 src/sys/dev/fdt/ahcisata_fdt.c:1.2 --- src/sys/dev/fdt/ahcisata_fdt.c:1.1 Mon Sep 3 23:15:12 2018 +++ src/sys/dev/fdt/ahcisata_fdt.c Fri Jan 15 22:35:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ahcisata_fdt.c,v 1.1 2018/09/03 23:15:12 jmcneill Exp $ */ +/* $NetBSD: ahcisata_fdt.c,v 1.2 2021/01/15 22:35:39 jmcneill Exp $ */ /*- * Copyright (c) 2018 Jared McNeill @@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: ahcisata_fdt.c,v 1.1 2018/09/03 23:15:12 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahcisata_fdt.c,v 1.2 2021/01/15 22:35:39 jmcneill Exp $"); #include #include @@ -103,8 +103,10 @@ ahcisata_fdt_attach(device_t parent, dev aprint_naive("\n"); aprint_normal(": AHCI SATA controller\n"); - if (fdtbus_intr_establish(phandle, 0, IPL_BIO, 0, ahci_intr, sc) == NULL) { - aprint_error_dev(self, "failed to establish interrupt on %s\n", intrstr); + if (fdtbus_intr_establish_xname(phandle, 0, IPL_BIO, 0, + ahci_intr, sc, device_xname(self)) == NULL) { + aprint_error_dev(self, + "failed to establish interrupt on %s\n", intrstr); return; } aprint_normal_dev(self, "interrupting on %s\n", intrstr); Index: src/sys/dev/fdt/dwc2_fdt.c diff -u src/sys/dev/fdt/dwc2_fdt.c:1.5 src/sys/dev/fdt/dwc2_fdt.c:1.6 --- src/sys/dev/fdt/dwc2_fdt.c:1.5 Sat Mar 2 13:21:08 2019 +++ src/sys/dev/fdt/dwc2_fdt.c Fri Jan 15 22:35:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc2_fdt.c,v 1.5 2019/03/02 13:21:08 jmcneill Exp $ */ +/* $NetBSD: dwc2_fdt.c,v 1.6 2021/01/15 22:35:39 jmcneill Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dwc2_fdt.c,v 1.5 2019/03/02 13:21:08 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwc2_fdt.c,v 1.6 2021/01/15 22:35:39 jmcneill Exp $"); #include #include @@ -166,9 +166,8 @@ dwc2_fdt_attach(device_t parent, device_ aprint_naive("\n"); aprint_normal(": DesignWare USB2 OTG\n"); - sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_VM, FDT_INTR_MPSAFE, - dwc2_intr, >sc_dwc2); - + sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_VM, + FDT_INTR_MPSAFE, dwc2_intr, >sc_dwc2, device_xname(self)); if (sc->sc_ih == NULL) { aprint_error_dev(self, "failed to establish interrupt %s\n", intrstr); Index: src/sys/dev/fdt/dwiic_fdt.c diff -u src/sys/dev/fdt/dwiic_fdt.c:1.2 src/sys/dev/fdt/dwiic_fdt.c:1.3 --- src/sys/dev/fdt/dwiic_fdt.c:1.2 Wed Dec 23 16:02:11 2020 +++ src/sys/dev/fdt/dwiic_fdt.c Fri Jan 15 22:35:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: dwiic_fdt.c,v 1.2 2020/12/23 16:02:11 thorpej Exp $ */ +/* $NetBSD: dwiic_fdt.c,v 1.3 2021/01/15 22:35:39 jmcneill Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dwiic_fdt.c,v 1.2 2020/12/23 16:02:11 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwiic_fdt.c,v 1.3 2021/01/15 22:35:39 jmcneill Exp $"); #include #include @@ -98,8 +98,8 @@ dwiic_fdt_attach(device_t parent, device } aprint_normal_dev(self, "interrupting on %s\n", intrstr); - sc->sc_dwiic.sc_ih = fdtbus_intr_establish(phandle, 0, IPL_VM, 0, - dwiic_intr, >sc_dwiic); + sc->sc_dwiic.sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_VM, 0, + dwiic_intr, >sc_dwiic, device_xname(self)); if (sc->sc_dwiic.sc_ih == NULL) { aprint_error_dev(self, "couldn't establish interrupt\n"); goto out; Index: src/sys/dev/fdt/genet_fdt.c diff -u src/sys/dev/fdt/genet_fdt.c:1.2 src/sys/dev/fdt/genet_fdt.c:1.3 --- src/sys/dev/fdt/genet_fdt.c:1.2 Mon May 25 19:49:28 2020 +++ src/sys/dev/fdt/genet_fdt.c Fri Jan 15 22:35:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: genet_fdt.c,v 1.2 2020/05/25 19:49:28 jmcneill Exp $ */ +/* $NetBSD: genet_fdt.c,v 1.3 2021/01/15 22:35:39 jmcneill Exp $ */ /*- * Copyright (c) 2020 Jared McNeill @@ -29,7 +29,7 @@ #include "opt_net_mpsafe.h" #include -__KERNEL_RCSID(0, "$NetBSD: genet_fdt.c,v 1.2 2020/05/25 19:49:28 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: genet_fdt.c,v 1.3 2021/01/15 22:35:39 jmcneill Exp $"); #include #include @@ -125,8 +125,8 @@ genet_fdt_attach(device_t parent, device if (genet_attach(sc) != 0) return; - ih =
CVS commit: src
Module Name:src Committed By: rillig Date: Fri Jan 15 22:07:54 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.c d_c99_bool_strict.exp src/usr.bin/xlint/lint1: ops.def Log Message: lint: in strict bool mode, allow bool as operands of the comma operator To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp cvs rdiff -u -r1.10 -r1.11 src/usr.bin/xlint/lint1/ops.def 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/d_c99_bool_strict.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.5 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.6 --- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.5 Fri Jan 15 22:04:27 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c Fri Jan 15 22:07:54 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_bool_strict.c,v 1.5 2021/01/15 22:04:27 rillig Exp $ */ +/* $NetBSD: d_c99_bool_strict.c,v 1.6 2021/01/15 22:07:54 rillig Exp $ */ # 3 "d_c99_bool_strict.c" /* @@ -523,8 +523,9 @@ compare_var_with_constant(bool b) } bool -SB003_operand_comma(bool b) +SB003_operand_comma(bool b, int i) { - b = (b, !b); /* FIXME *//* expect: 336, 337 */ + b = (b, !b); + i = (i, i + 1); return b; } Index: src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.4 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.5 --- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.4 Fri Jan 15 22:04:27 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp Fri Jan 15 22:07:54 2021 @@ -101,5 +101,3 @@ d_c99_bool_strict.c(453): warning: illeg d_c99_bool_strict.c(456): argument #1 expects '_Bool', gets passed 'pointer' [334] d_c99_bool_strict.c(456): warning: illegal combination of integer (int) and pointer (pointer to const char), arg #2 [154] d_c99_bool_strict.c(468): argument #1 expects '_Bool', gets passed 'int' [334] -d_c99_bool_strict.c(528): left operand of ',' must not be bool [336] -d_c99_bool_strict.c(528): right operand of ',' must not be bool [337] Index: src/usr.bin/xlint/lint1/ops.def diff -u src/usr.bin/xlint/lint1/ops.def:1.10 src/usr.bin/xlint/lint1/ops.def:1.11 --- src/usr.bin/xlint/lint1/ops.def:1.10 Tue Jan 12 20:42:01 2021 +++ src/usr.bin/xlint/lint1/ops.def Fri Jan 15 22:07:54 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ops.def,v 1.10 2021/01/12 20:42:01 rillig Exp $ */ +/* $NetBSD: ops.def,v 1.11 2021/01/15 22:07:54 rillig Exp $ */ begin_ops() @@ -66,7 +66,7 @@ op( CON, "const", , , , , , , , , , , , op( STRING, "string", , , , , , , , , , , , , , , , , , , , ,1) op( FSEL, "fsel", , , , , , , , , , , , , , , , , , , , ,1) op( CALL, "call", 1, , , , , , , , , , , ,1, , , , , , , ,1) -op( COMMA, ",", 1, , , , , , , , , , , , , , , , , , ,1,1) +op( COMMA, ",", 1, ,1, , , , , , , , , , , , , , , , ,1,1) op( CVT, "convert", , , , , , , , , ,1, , , , , , , , , , ,1) op( ICALL, "icall", 1, , , , , , , , , , , ,1, , , , , , , ,1) op( LOAD, "load", , , , , , , , , , , , , , , , , , , , ,1)
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Fri Jan 15 22:04:27 UTC 2021 Modified Files: src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.c d_c99_bool_strict.exp Log Message: lint: demonstrate wrong message for comma operator To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.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/d_c99_bool_strict.c diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.4 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.5 --- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.4 Tue Jan 12 20:42:01 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c Fri Jan 15 22:04:27 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: d_c99_bool_strict.c,v 1.4 2021/01/12 20:42:01 rillig Exp $ */ +/* $NetBSD: d_c99_bool_strict.c,v 1.5 2021/01/15 22:04:27 rillig Exp $ */ # 3 "d_c99_bool_strict.c" /* @@ -521,3 +521,10 @@ compare_var_with_constant(bool b) bool t4 = t3 != 1; return t4 ^ t3; } + +bool +SB003_operand_comma(bool b) +{ + b = (b, !b); /* FIXME *//* expect: 336, 337 */ + return b; +} Index: src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.3 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.4 --- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp:1.3 Tue Jan 12 20:42:01 2021 +++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.exp Fri Jan 15 22:04:27 2021 @@ -101,3 +101,5 @@ d_c99_bool_strict.c(453): warning: illeg d_c99_bool_strict.c(456): argument #1 expects '_Bool', gets passed 'pointer' [334] d_c99_bool_strict.c(456): warning: illegal combination of integer (int) and pointer (pointer to const char), arg #2 [154] d_c99_bool_strict.c(468): argument #1 expects '_Bool', gets passed 'int' [334] +d_c99_bool_strict.c(528): left operand of ',' must not be bool [336] +d_c99_bool_strict.c(528): right operand of ',' must not be bool [337]
CVS commit: src/distrib/amd64/installimage
Module Name:src Committed By: pgoyette Date: Fri Jan 15 21:14:53 UTC 2021 Modified Files: src/distrib/amd64/installimage: Makefile Log Message: Install image built with all of MKDEBUG, MKKDEBUG, and MKDEBUGLIB all set to "yes" is a bit larger, so bump the image size accordingly. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/distrib/amd64/installimage/Makefile 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/installimage/Makefile diff -u src/distrib/amd64/installimage/Makefile:1.12 src/distrib/amd64/installimage/Makefile:1.13 --- src/distrib/amd64/installimage/Makefile:1.12 Thu May 28 15:13:21 2020 +++ src/distrib/amd64/installimage/Makefile Fri Jan 15 21:14:53 2021 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.12 2020/05/28 15:13:21 jmcneill Exp $ +# $NetBSD: Makefile,v 1.13 2021/01/15 21:14:53 pgoyette Exp $ .include INSTIMGBASE= NetBSD-${DISTRIBVER}-amd64-install # gives ${IMGBASE}.img -INSTIMAGEMB?= 1550 # for all installation binaries +INSTIMAGEMB?= 1580 # for all installation binaries PRIMARY_BOOT= bootxx_ffsv1 SECONDARY_BOOT= boot
CVS commit: src/sys/dev/fdt
Module Name:src Committed By: ryo Date: Fri Jan 15 20:50:49 UTC 2021 Modified Files: src/sys/dev/fdt: arasan_sdhc_fdt.c dw_apb_uart.c dwc3_fdt.c dwcmmc_fdt.c ehci_fdt.c ohci_fdt.c Log Message: use fdtbus_intr_establish_xname To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/fdt/arasan_sdhc_fdt.c \ src/sys/dev/fdt/ohci_fdt.c cvs rdiff -u -r1.8 -r1.9 src/sys/dev/fdt/dw_apb_uart.c cvs rdiff -u -r1.11 -r1.12 src/sys/dev/fdt/dwc3_fdt.c \ src/sys/dev/fdt/dwcmmc_fdt.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/fdt/ehci_fdt.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/fdt/arasan_sdhc_fdt.c diff -u src/sys/dev/fdt/arasan_sdhc_fdt.c:1.3 src/sys/dev/fdt/arasan_sdhc_fdt.c:1.4 --- src/sys/dev/fdt/arasan_sdhc_fdt.c:1.3 Wed Jul 3 23:10:43 2019 +++ src/sys/dev/fdt/arasan_sdhc_fdt.c Fri Jan 15 20:50:49 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: arasan_sdhc_fdt.c,v 1.3 2019/07/03 23:10:43 jmcneill Exp $ */ +/* $NetBSD: arasan_sdhc_fdt.c,v 1.4 2021/01/15 20:50:49 ryo Exp $ */ /*- * Copyright (c) 2019 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: arasan_sdhc_fdt.c,v 1.3 2019/07/03 23:10:43 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arasan_sdhc_fdt.c,v 1.4 2021/01/15 20:50:49 ryo Exp $"); #include #include @@ -306,7 +306,8 @@ arasan_sdhc_attach(device_t parent, devi fdtbus_register_clock_controller(self, phandle, _sdhc_fdt_clk_funcs); - ih = fdtbus_intr_establish(phandle, 0, IPL_SDMMC, 0, sdhc_intr, >sc_base); + ih = fdtbus_intr_establish_xname(phandle, 0, IPL_SDMMC, 0, + sdhc_intr, >sc_base, device_xname(self)); if (ih == NULL) { aprint_error_dev(self, "couldn't establish interrupt on %s\n", intrstr); return; Index: src/sys/dev/fdt/ohci_fdt.c diff -u src/sys/dev/fdt/ohci_fdt.c:1.3 src/sys/dev/fdt/ohci_fdt.c:1.4 --- src/sys/dev/fdt/ohci_fdt.c:1.3 Sun Aug 12 16:33:58 2018 +++ src/sys/dev/fdt/ohci_fdt.c Fri Jan 15 20:50:49 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: ohci_fdt.c,v 1.3 2018/08/12 16:33:58 jmcneill Exp $ */ +/* $NetBSD: ohci_fdt.c,v 1.4 2021/01/15 20:50:49 ryo Exp $ */ /*- * Copyright (c) 2015-2017 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ohci_fdt.c,v 1.3 2018/08/12 16:33:58 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ohci_fdt.c,v 1.4 2021/01/15 20:50:49 ryo Exp $"); #include #include @@ -128,8 +128,8 @@ ohci_fdt_attach(device_t parent, device_ return; } - ih = fdtbus_intr_establish(phandle, 0, IPL_USB, FDT_INTR_MPSAFE, - ohci_intr, sc); + ih = fdtbus_intr_establish_xname(phandle, 0, IPL_USB, FDT_INTR_MPSAFE, + ohci_intr, sc, device_xname(self)); if (ih == NULL) { aprint_error_dev(self, "couldn't establish interrupt on %s\n", intrstr); Index: src/sys/dev/fdt/dw_apb_uart.c diff -u src/sys/dev/fdt/dw_apb_uart.c:1.8 src/sys/dev/fdt/dw_apb_uart.c:1.9 --- src/sys/dev/fdt/dw_apb_uart.c:1.8 Fri Oct 2 14:59:56 2020 +++ src/sys/dev/fdt/dw_apb_uart.c Fri Jan 15 20:50:49 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: dw_apb_uart.c,v 1.8 2020/10/02 14:59:56 rin Exp $ */ +/* $NetBSD: dw_apb_uart.c,v 1.9 2021/01/15 20:50:49 ryo Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: dw_apb_uart.c,v 1.8 2020/10/02 14:59:56 rin Exp $"); +__KERNEL_RCSID(1, "$NetBSD: dw_apb_uart.c,v 1.9 2021/01/15 20:50:49 ryo Exp $"); #include #include @@ -136,8 +136,8 @@ dw_apb_uart_attach(device_t parent, devi return; } - ssc->ssc_ih = fdtbus_intr_establish(faa->faa_phandle, 0, IPL_SERIAL, - FDT_INTR_MPSAFE, comintr, sc); + ssc->ssc_ih = fdtbus_intr_establish_xname(faa->faa_phandle, 0, + IPL_SERIAL, FDT_INTR_MPSAFE, comintr, sc, device_xname(self)); if (ssc->ssc_ih == NULL) { aprint_error_dev(self, "failed to establish interrupt on %s\n", intrstr); Index: src/sys/dev/fdt/dwc3_fdt.c diff -u src/sys/dev/fdt/dwc3_fdt.c:1.11 src/sys/dev/fdt/dwc3_fdt.c:1.12 --- src/sys/dev/fdt/dwc3_fdt.c:1.11 Thu Oct 15 09:33:44 2020 +++ src/sys/dev/fdt/dwc3_fdt.c Fri Jan 15 20:50:49 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc3_fdt.c,v 1.11 2020/10/15 09:33:44 jmcneill Exp $ */ +/* $NetBSD: dwc3_fdt.c,v 1.12 2021/01/15 20:50:49 ryo Exp $ */ /*- * Copyright (c) 2018 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dwc3_fdt.c,v 1.11 2020/10/15 09:33:44 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwc3_fdt.c,v 1.12 2021/01/15 20:50:49 ryo Exp $"); #include #include @@ -306,8 +306,8 @@ dwc3_fdt_attach(device_t parent, device_ return; } - ih = fdtbus_intr_establish(dwc3_phandle, 0, IPL_USB, FDT_INTR_MPSAFE, - xhci_intr, sc); + ih = fdtbus_intr_establish_xname(dwc3_phandle, 0, IPL_USB, + FDT_INTR_MPSAFE, xhci_intr, sc, device_xname(self)); if (ih == NULL) { aprint_error_dev(self, "couldn't establish interrupt on %s\n", intrstr); Index:
CVS commit: src/sys/arch/arm
Module Name:src Committed By: ryo Date: Fri Jan 15 18:42:41 UTC 2021 Modified Files: src/sys/arch/arm/amlogic: meson_dwmac.c meson_sdhc.c meson_sdio.c meson_uart.c mesongx_mmc.c src/sys/arch/arm/fdt: a9ptmr_fdt.c a9tmr_fdt.c aaci_fdt.c gtmr_fdt.c plcom_fdt.c plkmi_fdt.c plmmc_fdt.c pmu_fdt.c smsh_fdt.c src/sys/arch/arm/rockchip: rk_gmac.c rk_i2s.c rk_spi.c rk_tsadc.c Log Message: use fdtbus_intr_establish_xname To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/amlogic/meson_dwmac.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/amlogic/meson_sdhc.c \ src/sys/arch/arm/amlogic/meson_sdio.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/amlogic/meson_uart.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/amlogic/mesongx_mmc.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/fdt/a9ptmr_fdt.c \ src/sys/arch/arm/fdt/aaci_fdt.c src/sys/arch/arm/fdt/plkmi_fdt.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/fdt/a9tmr_fdt.c \ src/sys/arch/arm/fdt/plcom_fdt.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/fdt/gtmr_fdt.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/fdt/plmmc_fdt.c \ src/sys/arch/arm/fdt/smsh_fdt.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/fdt/pmu_fdt.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/rockchip/rk_gmac.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/rockchip/rk_i2s.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/rockchip/rk_spi.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/rockchip/rk_tsadc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/amlogic/meson_dwmac.c diff -u src/sys/arch/arm/amlogic/meson_dwmac.c:1.9 src/sys/arch/arm/amlogic/meson_dwmac.c:1.10 --- src/sys/arch/arm/amlogic/meson_dwmac.c:1.9 Fri Jan 1 07:18:23 2021 +++ src/sys/arch/arm/amlogic/meson_dwmac.c Fri Jan 15 18:42:40 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: meson_dwmac.c,v 1.9 2021/01/01 07:18:23 ryo Exp $ */ +/* $NetBSD: meson_dwmac.c,v 1.10 2021/01/15 18:42:40 ryo Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: meson_dwmac.c,v 1.9 2021/01/01 07:18:23 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: meson_dwmac.c,v 1.10 2021/01/15 18:42:40 ryo Exp $"); #include #include @@ -229,8 +229,9 @@ meson_dwmac_attach(device_t parent, devi aprint_naive("\n"); aprint_normal(": Gigabit Ethernet Controller\n"); - if (fdtbus_intr_establish(phandle, 0, IPL_NET, DWCGMAC_FDT_INTR_MPSAFE, - meson_dwmac_intr, sc) == NULL) { + if (fdtbus_intr_establish_xname(phandle, 0, IPL_NET, + DWCGMAC_FDT_INTR_MPSAFE, meson_dwmac_intr, sc, + device_xname(sc->sc_dev)) == NULL) { aprint_error_dev(self, "failed to establish interrupt on %s\n", intrstr); return; } Index: src/sys/arch/arm/amlogic/meson_sdhc.c diff -u src/sys/arch/arm/amlogic/meson_sdhc.c:1.1 src/sys/arch/arm/amlogic/meson_sdhc.c:1.2 --- src/sys/arch/arm/amlogic/meson_sdhc.c:1.1 Sun Jan 20 00:44:01 2019 +++ src/sys/arch/arm/amlogic/meson_sdhc.c Fri Jan 15 18:42:40 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: meson_sdhc.c,v 1.1 2019/01/20 00:44:01 jmcneill Exp $ */ +/* $NetBSD: meson_sdhc.c,v 1.2 2021/01/15 18:42:40 ryo Exp $ */ /*- * Copyright (c) 2015-2019 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: meson_sdhc.c,v 1.1 2019/01/20 00:44:01 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: meson_sdhc.c,v 1.2 2021/01/15 18:42:40 ryo Exp $"); #include #include @@ -244,8 +244,8 @@ meson_sdhc_attach(device_t parent, devic sc->sc_non_removable = of_hasprop(sc->sc_slot_phandle, "non-removable"); sc->sc_broken_cd = of_hasprop(sc->sc_slot_phandle, "broken-cd"); - sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_BIO, 0, - meson_sdhc_intr, sc); + sc->sc_ih = fdtbus_intr_establish_xname(phandle, 0, IPL_BIO, 0, + meson_sdhc_intr, sc, device_xname(self)); if (sc->sc_ih == NULL) { aprint_error_dev(self, "couldn't establish interrupt on %s\n", intrstr); Index: src/sys/arch/arm/amlogic/meson_sdio.c diff -u src/sys/arch/arm/amlogic/meson_sdio.c:1.1 src/sys/arch/arm/amlogic/meson_sdio.c:1.2 --- src/sys/arch/arm/amlogic/meson_sdio.c:1.1 Sat Jan 19 20:56:03 2019 +++ src/sys/arch/arm/amlogic/meson_sdio.c Fri Jan 15 18:42:40 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: meson_sdio.c,v 1.1 2019/01/19 20:56:03 jmcneill Exp $ */ +/* $NetBSD: meson_sdio.c,v 1.2 2021/01/15 18:42:40 ryo Exp $ */ /*- * Copyright (c) 2015-2019 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: meson_sdio.c,v 1.1 2019/01/19 20:56:03 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: meson_sdio.c,v 1.2 2021/01/15 18:42:40 ryo Exp $"); #include #include @@ -224,7 +224,8 @@ meson_sdio_attach(device_t parent, devic sc->sc_non_removable = of_hasprop(sc->sc_slot_phandle, "non-removable"); sc->sc_broken_cd = of_hasprop(sc->sc_slot_phandle, "broken-cd"); - sc->sc_ih = fdtbus_intr_establish(phandle, 0,
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Fri Jan 15 17:47:48 UTC 2021 Modified Files: src/doc [netbsd-9]: CHANGES-9.2 Log Message: Ticket #1185 To generate a diff of this commit: cvs rdiff -u -r1.1.2.34 -r1.1.2.35 src/doc/CHANGES-9.2 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.2 diff -u src/doc/CHANGES-9.2:1.1.2.34 src/doc/CHANGES-9.2:1.1.2.35 --- src/doc/CHANGES-9.2:1.1.2.34 Sat Jan 9 19:31:08 2021 +++ src/doc/CHANGES-9.2 Fri Jan 15 17:47:48 2021 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.2,v 1.1.2.34 2021/01/09 19:31:08 martin Exp $ +# $NetBSD: CHANGES-9.2,v 1.1.2.35 2021/01/15 17:47:48 martin Exp $ A complete list of changes from the NetBSD 9.1 release to the NetBSD 9.2 release: @@ -1406,3 +1406,8 @@ sbin/fsck/partutil.c1.17 Deal with disk devices not supporting DIOCGDISKINFO. [tsutsui, ticket #1184] +share/man/man9/pci_msi.9 1.18 + + PR 55920: add documentation for pci_msi_count() and pci_msix_count(). + [knakahara, ticket #1185] +
CVS commit: [netbsd-9] src/share/man/man9
Module Name:src Committed By: martin Date: Fri Jan 15 17:46:40 UTC 2021 Modified Files: src/share/man/man9 [netbsd-9]: pci_msi.9 Log Message: Pull up following revision(s) (requested by knakahara in ticket #1185): share/man/man9/pci_msi.9: revision 1.18 Fix PR kern/55920 . Add pci_msi_count() and pci_msix_count() description. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.17.2.1 src/share/man/man9/pci_msi.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/pci_msi.9 diff -u src/share/man/man9/pci_msi.9:1.17 src/share/man/man9/pci_msi.9:1.17.2.1 --- src/share/man/man9/pci_msi.9:1.17 Tue Nov 27 20:13:43 2018 +++ src/share/man/man9/pci_msi.9 Fri Jan 15 17:46:40 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: pci_msi.9,v 1.17 2018/11/27 20:13:43 jdolecek Exp $ +.\" $NetBSD: pci_msi.9,v 1.17.2.1 2021/01/15 17:46:40 martin Exp $ .\" .\" Copyright (c) 2015 Internet Initiative Japan Inc. .\" All rights reserved. @@ -24,7 +24,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 27, 2018 +.Dd January 12, 2021 .Dt PCI_MSI 9 .Os .Sh NAME @@ -96,6 +96,14 @@ which contains, among other things, info of the device in the PCI bus topology sufficient to allow interrupts from the device to be handled. .Pp +.Fn pci_msi_count +returns the max number of the device's MSI. +If the device can not use MSI, +.Fn pci_msi_count +returns zero. +.Fn pci_msix_count +works in the same manner for MSI-X. +.Pp If a driver wishes to establish an MSI handler for the device, it should pass the .Ft struct pci_attach_args *
CVS commit: src/sys
Module Name:src Committed By: ryo Date: Fri Jan 15 17:17:05 UTC 2021 Modified Files: src/sys/arch/arm/fdt: pcihost_fdt.c src/sys/dev/fdt: fdt_intr.c fdtvar.h Log Message: add fdtbus_intr_establish_xname() function To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/fdt/pcihost_fdt.c cvs rdiff -u -r1.27 -r1.28 src/sys/dev/fdt/fdt_intr.c cvs rdiff -u -r1.65 -r1.66 src/sys/dev/fdt/fdtvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/fdt/pcihost_fdt.c diff -u src/sys/arch/arm/fdt/pcihost_fdt.c:1.18 src/sys/arch/arm/fdt/pcihost_fdt.c:1.19 --- src/sys/arch/arm/fdt/pcihost_fdt.c:1.18 Sat Oct 10 09:58:16 2020 +++ src/sys/arch/arm/fdt/pcihost_fdt.c Fri Jan 15 17:17:04 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pcihost_fdt.c,v 1.18 2020/10/10 09:58:16 jmcneill Exp $ */ +/* $NetBSD: pcihost_fdt.c,v 1.19 2021/01/15 17:17:04 ryo Exp $ */ /*- * Copyright (c) 2018 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pcihost_fdt.c,v 1.18 2020/10/10 09:58:16 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcihost_fdt.c,v 1.19 2021/01/15 17:17:04 ryo Exp $"); #include @@ -612,7 +612,8 @@ pcihost_intr_establish(void *v, pci_intr if (specifier == NULL) return NULL; - return fdtbus_intr_establish_raw(ihandle, specifier, ipl, flags, callback, arg); + return fdtbus_intr_establish_raw(ihandle, specifier, ipl, flags, + callback, arg, xname); } static void Index: src/sys/dev/fdt/fdt_intr.c diff -u src/sys/dev/fdt/fdt_intr.c:1.27 src/sys/dev/fdt/fdt_intr.c:1.28 --- src/sys/dev/fdt/fdt_intr.c:1.27 Fri Jan 15 00:38:23 2021 +++ src/sys/dev/fdt/fdt_intr.c Fri Jan 15 17:17:04 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_intr.c,v 1.27 2021/01/15 00:38:23 jmcneill Exp $ */ +/* $NetBSD: fdt_intr.c,v 1.28 2021/01/15 17:17:04 ryo Exp $ */ /*- * Copyright (c) 2015-2018 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdt_intr.c,v 1.27 2021/01/15 00:38:23 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdt_intr.c,v 1.28 2021/01/15 17:17:04 ryo Exp $"); #include #include @@ -181,6 +181,14 @@ void * fdtbus_intr_establish(int phandle, u_int index, int ipl, int flags, int (*func)(void *), void *arg) { + return fdtbus_intr_establish_xname(phandle, index, ipl, flags, + func, arg, NULL); +} + +void * +fdtbus_intr_establish_xname(int phandle, u_int index, int ipl, int flags, +int (*func)(void *), void *arg, const char *xname) +{ const u_int *specifier; int ihandle; @@ -189,7 +197,7 @@ fdtbus_intr_establish(int phandle, u_int return NULL; return fdtbus_intr_establish_raw(ihandle, specifier, ipl, - flags, func, arg); + flags, func, arg, xname); } void * @@ -208,7 +216,7 @@ fdtbus_intr_establish_byname(int phandle void * fdtbus_intr_establish_raw(int ihandle, const u_int *specifier, int ipl, -int flags, int (*func)(void *), void *arg) +int flags, int (*func)(void *), void *arg, const char *xname) { struct fdtbus_interrupt_controller *ic; struct fdtbus_interrupt_cookie *c; @@ -235,7 +243,7 @@ fdtbus_intr_establish_raw(int ihandle, c * and hope that the device won't actually interrupt until we return. */ ih = ic->ic_funcs->establish(ic->ic_dev, __UNCONST(specifier), - ipl, flags, func, arg, NULL); + ipl, flags, func, arg, xname); if (ih != NULL) { atomic_store_release(>c_ih, ih); } else { Index: src/sys/dev/fdt/fdtvar.h diff -u src/sys/dev/fdt/fdtvar.h:1.65 src/sys/dev/fdt/fdtvar.h:1.66 --- src/sys/dev/fdt/fdtvar.h:1.65 Fri Jan 15 00:38:23 2021 +++ src/sys/dev/fdt/fdtvar.h Fri Jan 15 17:17:04 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: fdtvar.h,v 1.65 2021/01/15 00:38:23 jmcneill Exp $ */ +/* $NetBSD: fdtvar.h,v 1.66 2021/01/15 17:17:04 ryo Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -77,6 +77,8 @@ struct fdtbus_interrupt_controller_func bool (*intrstr)(device_t, u_int *, char *, size_t); void (*mask)(device_t, void *); void (*unmask)(device_t, void *); + void * (*establish_xname)(device_t, u_int *, int, int, + int (*)(void *), void *, const char *); }; struct fdtbus_spi_controller_func { @@ -317,10 +319,12 @@ i2c_tag_t fdtbus_get_i2c_tag(int); i2c_tag_t fdtbus_i2c_acquire(int, const char *); void * fdtbus_intr_establish(int, u_int, int, int, int (*func)(void *), void *arg); +void * fdtbus_intr_establish_xname(int, u_int, int, int, + int (*func)(void *), void *arg, const char *); void * fdtbus_intr_establish_byname(int, const char *, int, int, int (*func)(void *), void *arg); void * fdtbus_intr_establish_raw(int, const u_int *, int, int, - int (*func)(void *), void *arg); + int (*func)(void *), void *arg, const char *); void fdtbus_intr_mask(int, void *); void fdtbus_intr_unmask(int, void *); void fdtbus_intr_disestablish(int, void *);
CVS commit: src/share/man/man4
Module Name:src Committed By: riastradh Date: Fri Jan 15 15:54:20 UTC 2021 Modified Files: src/share/man/man4: rnd.4 Log Message: rnd(4): Fix formatting of authors paragraph with `.An -nosplit'. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/share/man/man4/rnd.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/rnd.4 diff -u src/share/man/man4/rnd.4:1.36 src/share/man/man4/rnd.4:1.37 --- src/share/man/man4/rnd.4:1.36 Sun Jan 10 23:24:25 2021 +++ src/share/man/man4/rnd.4 Fri Jan 15 15:54:20 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: rnd.4,v 1.36 2021/01/10 23:24:25 riastradh Exp $ +.\" $NetBSD: rnd.4,v 1.37 2021/01/15 15:54:20 riastradh Exp $ .\" .\" Copyright (c) 2014-2020 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -698,6 +698,7 @@ devices first appeared in .Nx 1.3 . .\" .Sh AUTHORS +.An -nosplit The .Nm subsystem was first implemented by
CVS commit: src/share/man/man5
Module Name:src Committed By: riastradh Date: Fri Jan 15 15:18:32 UTC 2021 Modified Files: src/share/man/man5: rc.conf.5 Log Message: Tweak wording for consistency: `if empty or not set', not `if unset'. To generate a diff of this commit: cvs rdiff -u -r1.189 -r1.190 src/share/man/man5/rc.conf.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man5/rc.conf.5 diff -u src/share/man/man5/rc.conf.5:1.189 src/share/man/man5/rc.conf.5:1.190 --- src/share/man/man5/rc.conf.5:1.189 Fri Jan 15 15:17:08 2021 +++ src/share/man/man5/rc.conf.5 Fri Jan 15 15:18:32 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: rc.conf.5,v 1.189 2021/01/15 15:17:08 riastradh Exp $ +.\" $NetBSD: rc.conf.5,v 1.190 2021/01/15 15:18:32 riastradh Exp $ .\" .\" Copyright (c) 1996 Matthew R. Green .\" All rights reserved. @@ -469,9 +469,9 @@ may cause the system to hang indefinitel random seed nor any hardware random number generators \(em use with care. .Pp -If unset, the system may come to multiuser without entropy, which is -unsafe to use on the internet; it is the operator's responsibility to -heed warnings from the kernel and the daily +If empty or not set, the system may come to multiuser without entropy, +which is unsafe to use on the internet; it is the operator's +responsibility to heed warnings from the kernel and the daily .Xr security.conf 5 report to remedy the problem \(em see .Xr entropy 7 .
CVS commit: src/share/man
Module Name:src Committed By: riastradh Date: Fri Jan 15 15:17:09 UTC 2021 Modified Files: src/share/man/man5: rc.conf.5 src/share/man/man7: entropy.7 Log Message: Clarify that `entropy' may be left unset in rc.conf. To generate a diff of this commit: cvs rdiff -u -r1.188 -r1.189 src/share/man/man5/rc.conf.5 cvs rdiff -u -r1.2 -r1.3 src/share/man/man7/entropy.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man5/rc.conf.5 diff -u src/share/man/man5/rc.conf.5:1.188 src/share/man/man5/rc.conf.5:1.189 --- src/share/man/man5/rc.conf.5:1.188 Sun Jan 10 23:24:26 2021 +++ src/share/man/man5/rc.conf.5 Fri Jan 15 15:17:08 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: rc.conf.5,v 1.188 2021/01/10 23:24:26 riastradh Exp $ +.\" $NetBSD: rc.conf.5,v 1.189 2021/01/15 15:17:08 riastradh Exp $ .\" .\" Copyright (c) 1996 Matthew R. Green .\" All rights reserved. @@ -468,6 +468,13 @@ Note that may cause the system to hang indefinitely at boot if it has neither a random seed nor any hardware random number generators \(em use with care. +.Pp +If unset, the system may come to multiuser without entropy, which is +unsafe to use on the internet; it is the operator's responsibility to +heed warnings from the kernel and the daily +.Xr security.conf 5 +report to remedy the problem \(em see +.Xr entropy 7 . .It Sy envsys Boolean value. Sets preferences for the environmental systems framework, Index: src/share/man/man7/entropy.7 diff -u src/share/man/man7/entropy.7:1.2 src/share/man/man7/entropy.7:1.3 --- src/share/man/man7/entropy.7:1.2 Wed Jan 13 05:21:34 2021 +++ src/share/man/man7/entropy.7 Fri Jan 15 15:17:09 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: entropy.7,v 1.2 2021/01/13 05:21:34 riastradh Exp $ +.\" $NetBSD: entropy.7,v 1.3 2021/01/15 15:17:09 riastradh Exp $ .\" .\" Copyright (c) 2021 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -114,19 +114,27 @@ and takes measures to alert the operator enough for security: .Bl -bullet .It -Setting +.Nx +issues warnings on the console if there's not enough entropy when +programs need it; see +.Xr rnd 4 . +.It +The daily security report includes an alert if there's not enough +entropy; see +.Xr security.conf 5 . +.It +The operator can set .Sq Li entropy=check in .Xr rc.conf 5 -makes +so that .Nx -refuse to boot to multiuser unless there is enough entropy, or +will refuse to boot to multiuser unless there is enough entropy, or set .Sq Li entropy=wait -makes it wait for entropy before booting to multiuser (with the caveat -that it may cause boot to hang forever). -.It -The daily security script sends an alert if there is not enough entropy -.Pq see Xr security.conf 5 . +so that +.Nx +will wait for entropy before booting to multiuser (with the caveat that +it may cause boot to hang forever). .El .Pp Since it is difficult to confidently model the unpredictability of most
CVS commit: src/sys/dev/pci
Module Name:src Committed By: thorpej Date: Fri Jan 15 14:07:15 UTC 2021 Modified Files: src/sys/dev/pci: ichsmb.c Log Message: - Match 400-, 495-, and 500-series controllers. - Apply OpenBSD rev 1.38, which ignores the SMBALERT# interrupt that fires spuriously on some systems (ignored by Linux and FreeBSD, as well). To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/dev/pci/ichsmb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ichsmb.c diff -u src/sys/dev/pci/ichsmb.c:1.68 src/sys/dev/pci/ichsmb.c:1.69 --- src/sys/dev/pci/ichsmb.c:1.68 Wed Apr 22 07:17:01 2020 +++ src/sys/dev/pci/ichsmb.c Fri Jan 15 14:07:15 2021 @@ -1,5 +1,5 @@ -/* $NetBSD: ichsmb.c,v 1.68 2020/04/22 07:17:01 msaitoh Exp $ */ -/* $OpenBSD: ichiic.c,v 1.18 2007/05/03 09:36:26 dlg Exp $ */ +/* $NetBSD: ichsmb.c,v 1.69 2021/01/15 14:07:15 thorpej Exp $ */ +/* $OpenBSD: ichiic.c,v 1.44 2020/10/07 11:23:05 jsg Exp $ */ /* * Copyright (c) 2005, 2006 Alexander Yurchenko @@ -22,7 +22,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.68 2020/04/22 07:17:01 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.69 2021/01/15 14:07:15 thorpej Exp $"); #include #include @@ -30,7 +30,6 @@ __KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1 #include #include #include -#include #include #include @@ -128,6 +127,7 @@ ichsmb_match(device_t parent, cfdata_t m case PCI_PRODUCT_INTEL_2HS_SMB: case PCI_PRODUCT_INTEL_3HS_SMB: case PCI_PRODUCT_INTEL_3HS_U_SMB: + case PCI_PRODUCT_INTEL_4HS_H_SMB: case PCI_PRODUCT_INTEL_CORE4G_M_SMB: case PCI_PRODUCT_INTEL_CORE5G_M_SMB: case PCI_PRODUCT_INTEL_CMTLK_SMB: @@ -147,6 +147,8 @@ ichsmb_match(device_t parent, cfdata_t m case PCI_PRODUCT_INTEL_DH89XXCL_SMB: case PCI_PRODUCT_INTEL_C2000_PCU_SMBUS: case PCI_PRODUCT_INTEL_C3K_SMBUS_LEGACY: + case PCI_PRODUCT_INTEL_495_YU_SMB: + case PCI_PRODUCT_INTEL_5HS_LP_SMB: return 1; } } @@ -418,11 +420,6 @@ timeout: /* * Transfer timeout. Kill the transaction and clear status bits. */ - snprintb(fbuf, sizeof(fbuf), LPCIB_SMB_HS_BITS, st); - aprint_error_dev(sc->sc_dev, - "exec: op %d, addr 0x%02x, cmdlen %zd, len %zd, " - "flags 0x%02x: timeout, status %s\n", - op, addr, cmdlen, len, flags, fbuf); bus_space_write_1(sc->sc_iot, sc->sc_ioh, LPCIB_SMB_HC, LPCIB_SMB_HC_KILL); DELAY(ICHIIC_DELAY); @@ -450,9 +447,14 @@ ichsmb_intr(void *arg) /* Read status */ st = bus_space_read_1(sc->sc_iot, sc->sc_ioh, LPCIB_SMB_HS); + + /* Clear status bits */ + bus_space_write_1(sc->sc_iot, sc->sc_ioh, LPCIB_SMB_HS, st); + + /* XXX Ignore SMBALERT# for now */ if ((st & LPCIB_SMB_HS_BUSY) != 0 || (st & (LPCIB_SMB_HS_INTR | LPCIB_SMB_HS_DEVERR | LPCIB_SMB_HS_BUSERR | LPCIB_SMB_HS_FAILED | - LPCIB_SMB_HS_SMBAL | LPCIB_SMB_HS_BDONE)) == 0) + LPCIB_SMB_HS_BDONE)) == 0) /* Interrupt was not for us */ return (0); @@ -464,9 +466,6 @@ ichsmb_intr(void *arg) if ((sc->sc_i2c_xfer.flags & I2C_F_POLL) == 0) mutex_enter(>sc_exec_lock); - /* Clear status bits */ - bus_space_write_1(sc->sc_iot, sc->sc_ioh, LPCIB_SMB_HS, st); - /* Check for errors */ if (st & (LPCIB_SMB_HS_DEVERR | LPCIB_SMB_HS_BUSERR | LPCIB_SMB_HS_FAILED)) { sc->sc_i2c_xfer.error = EIO;