CVS commit: src/sys/arch/arm/pic
Module Name:src Committed By: skrll Date: Tue Dec 21 07:11:02 UTC 2021 Modified Files: src/sys/arch/arm/pic: pic.c Log Message: Fix a bug where pic_establish_intr would fail to call pic_establish_irq if a free pic__iplsources slot was found, i.e. an interrupt handler at the same ipl had been disestablished previously. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/arch/arm/pic/pic.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/pic/pic.c diff -u src/sys/arch/arm/pic/pic.c:1.77 src/sys/arch/arm/pic/pic.c:1.78 --- src/sys/arch/arm/pic/pic.c:1.77 Tue Dec 21 07:07:32 2021 +++ src/sys/arch/arm/pic/pic.c Tue Dec 21 07:11:02 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pic.c,v 1.77 2021/12/21 07:07:32 skrll Exp $ */ +/* $NetBSD: pic.c,v 1.78 2021/12/21 07:11:02 skrll Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.77 2021/12/21 07:07:32 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.78 2021/12/21 07:11:02 skrll Exp $"); #include #include @@ -754,42 +754,44 @@ pic_establish_intr(struct pic_softc *pic /* * First try to use an existing slot which is empty. */ + bool found = false; for (off = pic_ipl_offset[ipl]; off < pic_ipl_offset[ipl + 1]; off++) { if (pic__iplsources[off] == NULL) { - is->is_iplidx = off - pic_ipl_offset[ipl]; - pic__iplsources[off] = is; - goto unblock; + found = true; + break; } } - /* - * Move up all the sources by one. - */ - if (ipl < NIPL) { - off = pic_ipl_offset[ipl + 1]; - memmove(__iplsources[off + 1], __iplsources[off], - sizeof(pic__iplsources[0]) * (pic_ipl_offset[NIPL] - off)); - } + if (!found) { + /* + * Move up all the sources by one. + */ + if (ipl < NIPL) { + off = pic_ipl_offset[ipl + 1]; + memmove(__iplsources[off + 1], __iplsources[off], + sizeof(pic__iplsources[0]) * (pic_ipl_offset[NIPL] - off)); + } - /* - * Advance the offset of all IPLs higher than this. Include an - * extra one as well. Thus the number of sources per ipl is - * pic_ipl_offset[ipl + 1] - pic_ipl_offset[ipl]. - */ - for (nipl = ipl + 1; nipl <= NIPL; nipl++) - pic_ipl_offset[nipl]++; + /* + * Advance the offset of all IPLs higher than this. Include an + * extra one as well. Thus the number of sources per ipl is + * pic_ipl_offset[ipl + 1] - pic_ipl_offset[ipl]. + */ + for (nipl = ipl + 1; nipl <= NIPL; nipl++) + pic_ipl_offset[nipl]++; + + off = pic_ipl_offset[ipl + 1] - 1; + } /* - * Insert into the previously made position at the end of this IPL's - * sources. + * Insert into the 'found' or the just made slot position at the end + * of this IPL's sources. */ - off = pic_ipl_offset[ipl + 1] - 1; is->is_iplidx = off - pic_ipl_offset[ipl]; pic__iplsources[off] = is; (*pic->pic_ops->pic_establish_irq)(pic, is); -unblock: if (!mp_online || !is->is_mpsafe || !is->is_percpu) { (*pic->pic_ops->pic_unblock_irqs)(pic, is->is_irq & ~0x1f, __BIT(is->is_irq & 0x1f));
CVS commit: src/sys/arch/arm/pic
Module Name:src Committed By: skrll Date: Tue Dec 21 07:11:02 UTC 2021 Modified Files: src/sys/arch/arm/pic: pic.c Log Message: Fix a bug where pic_establish_intr would fail to call pic_establish_irq if a free pic__iplsources slot was found, i.e. an interrupt handler at the same ipl had been disestablished previously. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/arch/arm/pic/pic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/pic
Module Name:src Committed By: skrll Date: Tue Dec 21 07:07:32 UTC 2021 Modified Files: src/sys/arch/arm/pic: pic.c Log Message: G/C pic_iplsource To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/arch/arm/pic/pic.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/pic/pic.c diff -u src/sys/arch/arm/pic/pic.c:1.76 src/sys/arch/arm/pic/pic.c:1.77 --- src/sys/arch/arm/pic/pic.c:1.76 Tue Dec 21 06:51:16 2021 +++ src/sys/arch/arm/pic/pic.c Tue Dec 21 07:07:32 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pic.c,v 1.76 2021/12/21 06:51:16 skrll Exp $ */ +/* $NetBSD: pic.c,v 1.77 2021/12/21 07:07:32 skrll Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.76 2021/12/21 06:51:16 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.77 2021/12/21 07:07:32 skrll Exp $"); #include #include @@ -83,9 +83,6 @@ struct pic_softc *pic_list[PIC_MAXPICS]; #endif struct intrsource *pic_sources[PIC_MAXMAXSOURCES]; struct intrsource *pic__iplsources[PIC_MAXMAXSOURCES]; -struct intrsource **pic_iplsource[NIPL] = { - [0 ... NIPL - 1] = pic__iplsources, -}; size_t pic_ipl_offset[NIPL + 1]; static kmutex_t pic_lock;
CVS commit: src/sys/arch/arm/pic
Module Name:src Committed By: skrll Date: Tue Dec 21 07:07:32 UTC 2021 Modified Files: src/sys/arch/arm/pic: pic.c Log Message: G/C pic_iplsource To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/arch/arm/pic/pic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/pic
Module Name:src Committed By: skrll Date: Tue Dec 21 06:51:17 UTC 2021 Modified Files: src/sys/arch/arm/pic: pic.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/sys/arch/arm/pic/pic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/pic
Module Name:src Committed By: skrll Date: Tue Dec 21 06:51:17 UTC 2021 Modified Files: src/sys/arch/arm/pic: pic.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/sys/arch/arm/pic/pic.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/pic/pic.c diff -u src/sys/arch/arm/pic/pic.c:1.75 src/sys/arch/arm/pic/pic.c:1.76 --- src/sys/arch/arm/pic/pic.c:1.75 Sun Oct 31 16:29:18 2021 +++ src/sys/arch/arm/pic/pic.c Tue Dec 21 06:51:16 2021 @@ -1,4 +1,5 @@ -/* $NetBSD: pic.c,v 1.75 2021/10/31 16:29:18 skrll Exp $ */ +/* $NetBSD: pic.c,v 1.76 2021/12/21 06:51:16 skrll Exp $ */ + /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. @@ -33,7 +34,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.75 2021/10/31 16:29:18 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pic.c,v 1.76 2021/12/21 06:51:16 skrll Exp $"); #include #include @@ -83,9 +84,9 @@ struct pic_softc *pic_list[PIC_MAXPICS]; struct intrsource *pic_sources[PIC_MAXMAXSOURCES]; struct intrsource *pic__iplsources[PIC_MAXMAXSOURCES]; struct intrsource **pic_iplsource[NIPL] = { - [0 ... NIPL-1] = pic__iplsources, + [0 ... NIPL - 1] = pic__iplsources, }; -size_t pic_ipl_offset[NIPL+1]; +size_t pic_ipl_offset[NIPL + 1]; static kmutex_t pic_lock; static size_t pic_sourcebase; @@ -756,7 +757,7 @@ pic_establish_intr(struct pic_softc *pic /* * First try to use an existing slot which is empty. */ - for (off = pic_ipl_offset[ipl]; off < pic_ipl_offset[ipl+1]; off++) { + for (off = pic_ipl_offset[ipl]; off < pic_ipl_offset[ipl + 1]; off++) { if (pic__iplsources[off] == NULL) { is->is_iplidx = off - pic_ipl_offset[ipl]; pic__iplsources[off] = is; @@ -768,15 +769,15 @@ pic_establish_intr(struct pic_softc *pic * Move up all the sources by one. */ if (ipl < NIPL) { - off = pic_ipl_offset[ipl+1]; - memmove(__iplsources[off+1], __iplsources[off], + off = pic_ipl_offset[ipl + 1]; + memmove(__iplsources[off + 1], __iplsources[off], sizeof(pic__iplsources[0]) * (pic_ipl_offset[NIPL] - off)); } /* * Advance the offset of all IPLs higher than this. Include an * extra one as well. Thus the number of sources per ipl is - * pic_ipl_offset[ipl+1] - pic_ipl_offset[ipl]. + * pic_ipl_offset[ipl + 1] - pic_ipl_offset[ipl]. */ for (nipl = ipl + 1; nipl <= NIPL; nipl++) pic_ipl_offset[nipl]++;
CVS commit: src/sys/arch/arm/sociox
Module Name:src Committed By: nisimura Date: Tue Dec 21 06:00:45 UTC 2021 Modified Files: src/sys/arch/arm/sociox: sni_emmc.c sni_gpio.c sni_i2c.c Log Message: improve consistency when attach error cases. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/sociox/sni_emmc.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/sociox/sni_gpio.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/sociox/sni_i2c.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/sociox/sni_emmc.c diff -u src/sys/arch/arm/sociox/sni_emmc.c:1.9 src/sys/arch/arm/sociox/sni_emmc.c:1.10 --- src/sys/arch/arm/sociox/sni_emmc.c:1.9 Wed Nov 10 17:23:46 2021 +++ src/sys/arch/arm/sociox/sni_emmc.c Tue Dec 21 06:00:45 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: sni_emmc.c,v 1.9 2021/11/10 17:23:46 msaitoh Exp $ */ +/* $NetBSD: sni_emmc.c,v 1.10 2021/12/21 06:00:45 nisimura Exp $ */ /*- * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sni_emmc.c,v 1.9 2021/11/10 17:23:46 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sni_emmc.c,v 1.10 2021/12/21 06:00:45 nisimura Exp $"); #include #include @@ -87,6 +87,10 @@ static const struct device_compatible_en { .compat = "fujitsu,mb86s70-sdhci-3.0" }, DEVICE_COMPAT_EOL }; +static const struct device_compatible_entry compatible[] = { + { .compat = "SCX0002" }, + DEVICE_COMPAT_EOL +}; static int sniemmc_fdt_match(device_t parent, struct cfdata *match, void *aux) @@ -107,13 +111,16 @@ sniemmc_fdt_attach(device_t parent, devi bus_size_t size; char intrstr[128]; + aprint_naive("\n"); + aprint_normal_dev(self, "Socionext eMMC controller\n"); + if (fdtbus_get_reg(phandle, 0, , ) != 0 || bus_space_map(faa->faa_bst, addr, size, 0, ) != 0) { - aprint_error(": unable to map device\n"); + aprint_error_dev(self, "unable to map device\n"); return; } if (!fdtbus_intr_str(phandle, 0, intrstr, sizeof(intrstr))) { - aprint_error(": failed to decode interrupt\n"); + aprint_error_dev(self, "failed to decode interrupt\n"); goto fail; } sc->sc_ih = fdtbus_intr_establish(phandle, 0, IPL_SDMMC, 0, @@ -123,19 +130,16 @@ sniemmc_fdt_attach(device_t parent, devi intrstr); goto fail; } - - aprint_naive("\n"); - aprint_normal_dev(self, "Socionext eMMC controller\n"); aprint_normal_dev(self, "interrupting on %s\n", intrstr); sc->sc.sc_dev = self; sc->sc.sc_dmat = faa->faa_dmat; sc->sc.sc_host = sc->sc_hosts; - sc->sc_phandle = phandle; sc->sc_iot = faa->faa_bst; sc->sc_ioh = ioh; sc->sc_iob = addr; sc->sc_ios = size; + sc->sc_phandle = phandle; config_defer(self, sniemmc_attach_i); return; @@ -147,15 +151,9 @@ sniemmc_fdt_attach(device_t parent, devi static int sniemmc_acpi_match(device_t parent, struct cfdata *match, void *aux) { - static const char * compatible[] = { - "SCX0002", - NULL - }; struct acpi_attach_args *aa = aux; - if (aa->aa_node->ad_type != ACPI_TYPE_DEVICE) - return 0; - return acpi_match_hid(aa->aa_node->ad_devinfo, compatible); + return acpi_compatible_match(aa, compatible); } static void @@ -163,12 +161,16 @@ sniemmc_acpi_attach(device_t parent, dev { struct sniemmc_softc * const sc = device_private(self); struct acpi_attach_args *aa = aux; + ACPI_HANDLE handle = aa->aa_node->ad_handle; bus_space_handle_t ioh; struct acpi_resources res; struct acpi_mem *mem; struct acpi_irq *irq; ACPI_STATUS rv; + aprint_naive("\n"); + aprint_normal(": Socionext eMMC controller\n"); + rv = acpi_resource_parse(self, aa->aa_node->ad_handle, "_CRS", , _resource_parse_ops_default); if (ACPI_FAILURE(rv)) @@ -176,31 +178,28 @@ sniemmc_acpi_attach(device_t parent, dev mem = acpi_res_mem(, 0); irq = acpi_res_irq(, 0); if (mem == NULL || irq == NULL || mem->ar_length == 0) { - aprint_error(": incomplete resources\n"); + aprint_error_dev(self, "incomplete resources\n"); return; } if (bus_space_map(aa->aa_memt, mem->ar_base, mem->ar_length, 0, )) { - aprint_error(": couldn't map registers\n"); + aprint_error_dev(self, "couldn't map registers\n"); return; } - sc->sc_ih = acpi_intr_establish(self, - (uint64_t)(uintptr_t)aa->aa_node->ad_handle, + sc->sc_ih = acpi_intr_establish(self, (uint64_t)handle, IPL_BIO, false, sdhc_intr, >sc, device_xname(self)); if (sc->sc_ih == NULL) { aprint_error_dev(self, "couldn't establish interrupt\n"); goto fail; } - aprint_naive("\n"); - aprint_normal_dev(self, "Socionext eMMC controller\n"); - sc->sc.sc_dev = self; sc->sc.sc_dmat = aa->aa_dmat; sc->sc.sc_host = sc->sc_hosts; sc->sc_iot = aa->aa_memt; sc->sc_ioh = ioh; sc->sc_ios = mem->ar_length; + sc->sc_phandle = 0; config_defer(self, sniemmc_attach_i); @@ -228,7 +227,8 @@ sniemmc_attach_i(device_t self) #endif error = 0; if (error) { - aprint_error_dev(self,
CVS commit: src/sys/arch/arm/sociox
Module Name:src Committed By: nisimura Date: Tue Dec 21 06:00:45 UTC 2021 Modified Files: src/sys/arch/arm/sociox: sni_emmc.c sni_gpio.c sni_i2c.c Log Message: improve consistency when attach error cases. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/sociox/sni_emmc.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/sociox/sni_gpio.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/sociox/sni_i2c.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: knakahara Date: Tue Dec 21 04:09:32 UTC 2021 Modified Files: src/sys/net: pktqueue.c Log Message: Fix net.*.rps_hash=toeplitz-othercpus on one CPU systems. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/net/pktqueue.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/net/pktqueue.c diff -u src/sys/net/pktqueue.c:1.15 src/sys/net/pktqueue.c:1.16 --- src/sys/net/pktqueue.c:1.15 Wed Dec 15 07:47:22 2021 +++ src/sys/net/pktqueue.c Tue Dec 21 04:09:32 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pktqueue.c,v 1.15 2021/12/15 07:47:22 knakahara Exp $ */ +/* $NetBSD: pktqueue.c,v 1.16 2021/12/21 04:09:32 knakahara Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pktqueue.c,v 1.15 2021/12/15 07:47:22 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pktqueue.c,v 1.16 2021/12/21 04:09:32 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -284,6 +284,9 @@ pktq_rps_hash_toeplitz_othercpus(const s { uint32_t hash; + if (ncpu == 1) + return 0; + hash = pktq_rps_hash_toeplitz(m); hash %= ncpu - 1; if (hash >= cpu_index(curcpu()))
CVS commit: src/sys/net
Module Name:src Committed By: knakahara Date: Tue Dec 21 04:09:32 UTC 2021 Modified Files: src/sys/net: pktqueue.c Log Message: Fix net.*.rps_hash=toeplitz-othercpus on one CPU systems. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/net/pktqueue.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: riastradh Date: Mon Dec 20 23:05:55 UTC 2021 Modified Files: src/sys/dev/ic: tpm.c tpmvar.h Log Message: tpm(4): Fix disabling of rnd source if tpm is deactivated. Nothing prevents a second worker from being queued when the first one is about to do rnd_detach_source. Instead, just set a flag so future requests don't bother running a new thread; if there's a concurrent one that's already been scheduled on another CPU, well, too bad, we get a couple extra log messages but that's fine. A better way to do this would probably be to detect whether the tpm is deactivated at attach time, but that requires reading more of the tpm spec than I care to do when there are alternative ways to procrastinate like scrubbing the toilet. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/dev/ic/tpm.c cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/tpmvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/tpm.c diff -u src/sys/dev/ic/tpm.c:1.22 src/sys/dev/ic/tpm.c:1.23 --- src/sys/dev/ic/tpm.c:1.22 Wed Jun 2 21:35:17 2021 +++ src/sys/dev/ic/tpm.c Mon Dec 20 23:05:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tpm.c,v 1.22 2021/06/02 21:35:17 riastradh Exp $ */ +/* $NetBSD: tpm.c,v 1.23 2021/12/20 23:05:55 riastradh Exp $ */ /* * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tpm.c,v 1.22 2021/06/02 21:35:17 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tpm.c,v 1.23 2021/12/20 23:05:55 riastradh Exp $"); #include #include @@ -650,7 +650,7 @@ tpm_rng_work(struct work *wk, void *cook */ if (rv) { device_printf(sc->sc_dev, "deactivating entropy source\n"); - rnd_detach_source(>sc_rnd); + atomic_store_relaxed(>sc_rnddisabled, true); /* XXX worker thread can't workqueue_destroy its own queue */ } @@ -666,6 +666,8 @@ tpm_rng_get(size_t nbytes, void *cookie) { struct tpm_softc *sc = cookie; + if (atomic_load_relaxed(>sc_rnddisabled)) + return; /* tough */ if (atomic_swap_uint(>sc_rndpending, MIN(nbytes, UINT_MAX/NBBY)) == 0) workqueue_enqueue(sc->sc_rndwq, >sc_rndwk, NULL); Index: src/sys/dev/ic/tpmvar.h diff -u src/sys/dev/ic/tpmvar.h:1.9 src/sys/dev/ic/tpmvar.h:1.10 --- src/sys/dev/ic/tpmvar.h:1.9 Mon Jan 4 18:26:59 2021 +++ src/sys/dev/ic/tpmvar.h Mon Dec 20 23:05:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tpmvar.h,v 1.9 2021/01/04 18:26:59 riastradh Exp $ */ +/* $NetBSD: tpmvar.h,v 1.10 2021/12/20 23:05:55 riastradh Exp $ */ /* * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -98,6 +98,7 @@ struct tpm_softc { struct workqueue *sc_rndwq; struct work sc_rndwk; volatile unsigned sc_rndpending; + bool sc_rnddisabled; }; bool tpm_suspend(device_t, const pmf_qual_t *);
CVS commit: src/sys/dev/ic
Module Name:src Committed By: riastradh Date: Mon Dec 20 23:05:55 UTC 2021 Modified Files: src/sys/dev/ic: tpm.c tpmvar.h Log Message: tpm(4): Fix disabling of rnd source if tpm is deactivated. Nothing prevents a second worker from being queued when the first one is about to do rnd_detach_source. Instead, just set a flag so future requests don't bother running a new thread; if there's a concurrent one that's already been scheduled on another CPU, well, too bad, we get a couple extra log messages but that's fine. A better way to do this would probably be to detect whether the tpm is deactivated at attach time, but that requires reading more of the tpm spec than I care to do when there are alternative ways to procrastinate like scrubbing the toilet. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/dev/ic/tpm.c cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/tpmvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/uvm
Module Name:src Committed By: skrll Date: Mon Dec 20 22:40:47 UTC 2021 Modified Files: src/sys/uvm: uvm_pglist.c Log Message: Slight code re-structure and wrap a long line. Interestingly this gives the same binary before and after. To generate a diff of this commit: cvs rdiff -u -r1.88 -r1.89 src/sys/uvm/uvm_pglist.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/uvm/uvm_pglist.c diff -u src/sys/uvm/uvm_pglist.c:1.88 src/sys/uvm/uvm_pglist.c:1.89 --- src/sys/uvm/uvm_pglist.c:1.88 Fri Mar 26 09:35:18 2021 +++ src/sys/uvm/uvm_pglist.c Mon Dec 20 22:40:46 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pglist.c,v 1.88 2021/03/26 09:35:18 chs Exp $ */ +/* $NetBSD: uvm_pglist.c,v 1.89 2021/12/20 22:40:46 skrll Exp $ */ /*- * Copyright (c) 1997, 2019 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.88 2021/03/26 09:35:18 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.89 2021/12/20 22:40:46 skrll Exp $"); #include #include @@ -125,18 +125,19 @@ uvm_pglistalloc_c_ps(uvm_physseg_t psi, low = atop(low); high = atop(high); - alignment = atop(alignment); /* * Make sure that physseg falls within with range to be allocated from. */ - if (high <= uvm_physseg_get_avail_start(psi) || low >= uvm_physseg_get_avail_end(psi)) + if (high <= uvm_physseg_get_avail_start(psi) || + low >= uvm_physseg_get_avail_end(psi)) return 0; /* * We start our search at the just after where the last allocation * succeeded. */ + alignment = atop(alignment); candidate = roundup2(uimax(low, uvm_physseg_get_avail_start(psi) + uvm_physseg_get_start_hint(psi)), alignment); limit = uimin(high, uvm_physseg_get_avail_end(psi)); @@ -527,12 +528,6 @@ uvm_pglistalloc_s_ps(uvm_physseg_t psi, low = atop(low); high = atop(high); - todo = num; - candidate = uimax(low, uvm_physseg_get_avail_start(psi) + - uvm_physseg_get_start_hint(psi)); - limit = uimin(high, uvm_physseg_get_avail_end(psi)); - pg = uvm_physseg_get_pg(psi, candidate - uvm_physseg_get_start(psi)); - second_pass = false; /* * Make sure that physseg falls within with range to be allocated from. @@ -541,6 +536,13 @@ uvm_pglistalloc_s_ps(uvm_physseg_t psi, low >= uvm_physseg_get_avail_end(psi)) return 0; + todo = num; + candidate = uimax(low, uvm_physseg_get_avail_start(psi) + + uvm_physseg_get_start_hint(psi)); + limit = uimin(high, uvm_physseg_get_avail_end(psi)); + pg = uvm_physseg_get_pg(psi, candidate - uvm_physseg_get_start(psi)); + second_pass = false; + again: for (;; candidate++, pg++) { if (candidate >= limit) {
CVS commit: src/sys/uvm
Module Name:src Committed By: skrll Date: Mon Dec 20 22:40:47 UTC 2021 Modified Files: src/sys/uvm: uvm_pglist.c Log Message: Slight code re-structure and wrap a long line. Interestingly this gives the same binary before and after. To generate a diff of this commit: cvs rdiff -u -r1.88 -r1.89 src/sys/uvm/uvm_pglist.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2
Module Name:src Committed By: chs Date: Mon Dec 20 20:34:59 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu: amdgpu_fb.c src/sys/external/bsd/drm2/dist/drm/i915/display: intel_fbdev.c src/sys/external/bsd/drm2/dist/drm/nouveau: nouveau_fbcon.c src/sys/external/bsd/drm2/dist/drm/radeon: radeon_fb.c src/sys/external/bsd/drm2/drm: drmfb.c Log Message: drm: add missing KERNEL_LOCK around calls to config_found(). To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fb.c cvs rdiff -u -r1.9 -r1.10 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c cvs rdiff -u -r1.15 -r1.16 \ src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c cvs rdiff -u -r1.14 -r1.15 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fb.c cvs rdiff -u -r1.11 -r1.12 src/sys/external/bsd/drm2/drm/drmfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2
Module Name:src Committed By: chs Date: Mon Dec 20 20:34:59 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu: amdgpu_fb.c src/sys/external/bsd/drm2/dist/drm/i915/display: intel_fbdev.c src/sys/external/bsd/drm2/dist/drm/nouveau: nouveau_fbcon.c src/sys/external/bsd/drm2/dist/drm/radeon: radeon_fb.c src/sys/external/bsd/drm2/drm: drmfb.c Log Message: drm: add missing KERNEL_LOCK around calls to config_found(). To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fb.c cvs rdiff -u -r1.9 -r1.10 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c cvs rdiff -u -r1.15 -r1.16 \ src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c cvs rdiff -u -r1.14 -r1.15 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fb.c cvs rdiff -u -r1.11 -r1.12 src/sys/external/bsd/drm2/drm/drmfb.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/drm2/dist/drm/amd/amdgpu/amdgpu_fb.c diff -u src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fb.c:1.10 src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fb.c:1.11 --- src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fb.c:1.10 Sun Dec 19 12:02:39 2021 +++ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_fb.c Mon Dec 20 20:34:58 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: amdgpu_fb.c,v 1.10 2021/12/19 12:02:39 riastradh Exp $ */ +/* $NetBSD: amdgpu_fb.c,v 1.11 2021/12/20 20:34:58 chs Exp $ */ /* * Copyright © 2007 David Airlie @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: amdgpu_fb.c,v 1.10 2021/12/19 12:02:39 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amdgpu_fb.c,v 1.11 2021/12/20 20:34:58 chs Exp $"); #include #include @@ -274,8 +274,10 @@ static int amdgpufb_create(struct drm_fb afa.afa_fb_ptr = amdgpu_bo_kptr(abo); afa.afa_fb_linebytes = mode_cmd.pitches[0]; + KERNEL_LOCK(1, NULL); helper->fbdev = config_found(adev->ddev->dev, , NULL, CFARGS(.iattr = "amdgpufbbus")); + KERNEL_UNLOCK_ONE(NULL); if (helper->fbdev == NULL) { DRM_ERROR("failed to attach amdgpufb\n"); goto out; Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c:1.9 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c:1.10 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c:1.9 Sun Dec 19 12:32:15 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c Mon Dec 20 20:34:58 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_fbdev.c,v 1.9 2021/12/19 12:32:15 riastradh Exp $ */ +/* $NetBSD: intel_fbdev.c,v 1.10 2021/12/20 20:34:58 chs Exp $ */ /* * Copyright © 2007 David Airlie @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_fbdev.c,v 1.9 2021/12/19 12:32:15 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_fbdev.c,v 1.10 2021/12/20 20:34:58 chs Exp $"); #include #include @@ -264,8 +264,10 @@ static int intelfb_create(struct drm_fb_ * XXX Should do this asynchronously, since we hold * dev->struct_mutex. */ + KERNEL_LOCK(1, NULL); helper->fbdev = config_found(dev->dev, , NULL, CFARGS(.iattr = "intelfbbus")); + KERNEL_UNLOCK_ONE(NULL); if (helper->fbdev == NULL) { DRM_ERROR("unable to attach intelfb\n"); ret = -ENXIO; Index: src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c:1.15 src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c:1.16 --- src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c:1.15 Sun Dec 19 11:34:44 2021 +++ src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c Mon Dec 20 20:34:58 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_fbcon.c,v 1.15 2021/12/19 11:34:44 riastradh Exp $ */ +/* $NetBSD: nouveau_fbcon.c,v 1.16 2021/12/20 20:34:58 chs Exp $ */ /* * Copyright © 2007 David Airlie @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_fbcon.c,v 1.15 2021/12/19 11:34:44 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_fbcon.c,v 1.16 2021/12/20 20:34:58 chs Exp $"); #include #include @@ -420,8 +420,10 @@ nouveau_fbcon_create(struct drm_fb_helpe nfa.nfa_fb_ptr = nvbo_kmap_obj_iovirtual(nvbo); nfa.nfa_fb_linebytes = mode_cmd.pitches[0]; + KERNEL_LOCK(1, NULL); helper->fbdev = config_found(dev->dev, , nouveau_fbcon_print, CFARGS(.iattr = "nouveaufbbus")); + KERNEL_UNLOCK_ONE(NULL); if (helper->fbdev == NULL) { goto out_unlock; } Index: src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fb.c diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fb.c:1.14 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fb.c:1.15 --- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fb.c:1.14 Sun Dec 19 10:46:44 2021 +++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_fb.c Mon
CVS commit: src
Module Name:src Committed By: christos Date: Mon Dec 20 20:33:20 UTC 2021 Modified Files: src: BUILDING src/share/man/man5: mk.conf.5 src/share/mk: bsd.README bsd.host.mk bsd.own.mk src/sys/conf: Makefile.kern.inc Log Message: Rename: MKKDEBUG -> MKDEBUGKERNEL MKTOOLSDEBUG -> MKDEBUGTOOLS while keeping compatibility with the old names. Add missing documentation. Now all debugging tunables are prefixed with MKDEBUG. To generate a diff of this commit: cvs rdiff -u -r1.140 -r1.141 src/BUILDING cvs rdiff -u -r1.84 -r1.85 src/share/man/man5/mk.conf.5 cvs rdiff -u -r1.426 -r1.427 src/share/mk/bsd.README cvs rdiff -u -r1.5 -r1.6 src/share/mk/bsd.host.mk cvs rdiff -u -r1.1271 -r1.1272 src/share/mk/bsd.own.mk cvs rdiff -u -r1.284 -r1.285 src/sys/conf/Makefile.kern.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/BUILDING diff -u src/BUILDING:1.140 src/BUILDING:1.141 --- src/BUILDING:1.140 Tue Nov 10 16:47:40 2020 +++ src/BUILDING Mon Dec 20 15:33:20 2021 @@ -264,12 +264,28 @@ CONFIGURATION Default: "no" + MKDEBUGKERNEL + Can be set to "yes" or "no". Force generation of full-debug + symbol versions of all kernels compiled. Alongside of the + netbsd kernel file, an unstripped version netbsd.gdb is + created. This is useful if a cross-gdb is built as well (see + MKCROSSGDB). + + Default: "no" + MKDEBUGLIB Can be set to "yes" or "no". Indicates whether debug information (see MKDEBUG) should also be generated for all libraries built. Default: "no" + MKDEBUGTOOLS + Can be set to "yes" or "no". Indicates whether debug + information (see MKDEBUG) should also be generated for all + tools built. + + Default: "no" + MKDOC Can be set to "yes" or "no". Indicates whether system documentation destined for DESTDIR/usr/share/doc will be installed during a build. @@ -304,14 +320,6 @@ CONFIGURATION Default: "yes" - MKKDEBUGCan be set to "yes" or "no". Force generation of full-debug - symbol versions of all kernels compiled. Alongside of the - netbsd kernel file, an unstripped version netbsd.gdb is - created. This is useful if a cross-gdb is built as well (see - MKCROSSGDB). - - Default: "no" - MKKMOD Can be set to "yes" or "no". Indicates whether kernel modules are built and installed. Index: src/share/man/man5/mk.conf.5 diff -u src/share/man/man5/mk.conf.5:1.84 src/share/man/man5/mk.conf.5:1.85 --- src/share/man/man5/mk.conf.5:1.84 Thu Jan 14 18:32:12 2021 +++ src/share/man/man5/mk.conf.5 Mon Dec 20 15:33:20 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: mk.conf.5,v 1.84 2021/01/14 23:32:12 pgoyette Exp $ +.\" $NetBSD: mk.conf.5,v 1.85 2021/12/20 20:33:20 christos Exp $ .\" .\" Copyright (c) 1999-2003 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 27, 2020 +.Dd December 20, 2021 .Dt MK.CONF 5 .Os .\" turn off hyphenation @@ -376,6 +376,18 @@ Indicates whether separate debugging sym .Sy DESTDIR Ns Pa /usr/libdata/debug . .DFLTn . +.It Sy MKDEBUGKERNEL +.YorN +Indicates whether debugging symbols will be built for kernels +by default; pretend as if +.Em makeoptions DEBUG="-g" +is specified in kernel configuration files. +This will also put the debug kernel in the kernel sets. +See +.Xr options 4 +for details. +.DFLTn +. .It Sy MKDEBUGLIB .YorN Indicates whether debug libraries @@ -385,6 +397,13 @@ Debug libraries are compiled with .Dq Li -g -DDEBUG . .DFLTn . +.It Sy MKDEBUGTOOLS +.YorN +Indicates whether debug information +.Sy ( lib*_g.a ) +will be included in the build toolchain. +.DFLTn +. .It Sy MKDOC .YorN Indicates whether system documentation destined for @@ -506,17 +525,6 @@ Indicates whether the iSCSI library and built and installed. .DFLTy . -.It Sy MKKDEBUG -.YorN -Indicates whether debugging symbols will be built for kernels -by default; pretend as if -.Em makeoptions DEBUG="-g" -is specified in kernel configuration files. -See -.Xr options 4 -for details. -.DFLTn -. .It Sy MKKERBEROS .YorN Indicates whether the Kerberos v5 infrastructure Index: src/share/mk/bsd.README diff -u src/share/mk/bsd.README:1.426 src/share/mk/bsd.README:1.427 --- src/share/mk/bsd.README:1.426 Mon Dec 20 09:41:26 2021 +++ src/share/mk/bsd.README Mon Dec 20 15:33:20 2021 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.426 2021/12/20 14:41:26 christos Exp $ +# $NetBSD: bsd.README,v 1.427 2021/12/20
CVS commit: src
Module Name:src Committed By: christos Date: Mon Dec 20 20:33:20 UTC 2021 Modified Files: src: BUILDING src/share/man/man5: mk.conf.5 src/share/mk: bsd.README bsd.host.mk bsd.own.mk src/sys/conf: Makefile.kern.inc Log Message: Rename: MKKDEBUG -> MKDEBUGKERNEL MKTOOLSDEBUG -> MKDEBUGTOOLS while keeping compatibility with the old names. Add missing documentation. Now all debugging tunables are prefixed with MKDEBUG. To generate a diff of this commit: cvs rdiff -u -r1.140 -r1.141 src/BUILDING cvs rdiff -u -r1.84 -r1.85 src/share/man/man5/mk.conf.5 cvs rdiff -u -r1.426 -r1.427 src/share/mk/bsd.README cvs rdiff -u -r1.5 -r1.6 src/share/mk/bsd.host.mk cvs rdiff -u -r1.1271 -r1.1272 src/share/mk/bsd.own.mk cvs rdiff -u -r1.284 -r1.285 src/sys/conf/Makefile.kern.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc
Module Name:src Committed By: christos Date: Mon Dec 20 20:20:35 UTC 2021 Modified Files: src/etc: Makefile Log Message: Revert previous, not needed MKKDEBUG does it. To generate a diff of this commit: cvs rdiff -u -r1.453 -r1.454 src/etc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc
Module Name:src Committed By: christos Date: Mon Dec 20 20:20:35 UTC 2021 Modified Files: src/etc: Makefile Log Message: Revert previous, not needed MKKDEBUG does it. To generate a diff of this commit: cvs rdiff -u -r1.453 -r1.454 src/etc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/Makefile diff -u src/etc/Makefile:1.453 src/etc/Makefile:1.454 --- src/etc/Makefile:1.453 Mon Dec 20 09:41:26 2021 +++ src/etc/Makefile Mon Dec 20 15:20:35 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.453 2021/12/20 14:41:26 christos Exp $ +# $NetBSD: Makefile,v 1.454 2021/12/20 20:20:35 christos Exp $ # from: @(#)Makefile 8.7 (Berkeley) 5/25/95 # Environment variables without default values: @@ -590,7 +590,6 @@ build_kernels: .PHONY build_kernels: kern-${configfile} kern-${configfile}: .PHONY .MAKE cd ${KERNCONFDIR} && ${TOOL_CONFIG} ${CONFIGOPTS} -s ${KERNSRCDIR} \ - ${MKDEBUGKERNEL == "yes" :? -DDEBUG=-g :} \ -b ${KERNOBJDIR}/${configfile:C/.*\///} ${configfile} .if ${MKUPDATE} == "no" ${MAKE} -C ${KERNOBJDIR}/${configfile:C/.*\///} distclean @@ -623,9 +622,6 @@ kernset-${configfile}: .PHONY build_kern kernels="$${kernels} $${ks}"; \ [ -z "$${newest}" -o $${ks} \ -nt "$${newest}" ] && newest=$${ks}; \ -[ ${MKDEBUGKERNEL} = "no" -o \ - ! -f $${ks}.gdb ] continue; \ -kernels="$${kernels} $${ks}.gdb"; \ done; \ done; \ [ $${kern_tgz} -nt "$${newest}" ] || { \
CVS commit: src/sys/dev/ieee1394
Module Name:src Committed By: riastradh Date: Mon Dec 20 19:56:42 UTC 2021 Modified Files: src/sys/dev/ieee1394: firewire.c Log Message: ieee1394: Need kernel lock around config_found. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/dev/ieee1394/firewire.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/ieee1394/firewire.c diff -u src/sys/dev/ieee1394/firewire.c:1.53 src/sys/dev/ieee1394/firewire.c:1.54 --- src/sys/dev/ieee1394/firewire.c:1.53 Mon Oct 4 20:48:05 2021 +++ src/sys/dev/ieee1394/firewire.c Mon Dec 20 19:56:42 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: firewire.c,v 1.53 2021/10/04 20:48:05 andvar Exp $ */ +/* $NetBSD: firewire.c,v 1.54 2021/12/20 19:56:42 riastradh Exp $ */ /*- * Copyright (c) 2003 Hidetoshi Shimokawa * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: firewire.c,v 1.53 2021/10/04 20:48:05 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: firewire.c,v 1.54 2021/12/20 19:56:42 riastradh Exp $"); #include #include @@ -2041,9 +2041,11 @@ fw_attach_dev(struct firewire_comm *fc) fwa.name = fw_get_devclass(fwdev); fwa.fwdev = fwdev; + KERNEL_LOCK(1, NULL); fwdev->dev = config_found(sc->dev, , firewire_print, CFARGS(.submatch = config_stdsubmatch, .locators = locs)); + KERNEL_UNLOCK_ONE(NULL); if (fwdev->dev == NULL) { free(devlist, M_DEVBUF); break;
CVS commit: src/sys/dev/ieee1394
Module Name:src Committed By: riastradh Date: Mon Dec 20 19:56:42 UTC 2021 Modified Files: src/sys/dev/ieee1394: firewire.c Log Message: ieee1394: Need kernel lock around config_found. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/dev/ieee1394/firewire.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: riastradh Date: Mon Dec 20 19:54:07 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: i915_gem.h Log Message: i915: Obviate need for __diagused on variables in GEM_BUG_ON. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.h diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.h:1.6 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.h:1.7 --- src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.h:1.6 Sun Dec 19 12:08:54 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.h Mon Dec 20 19:54:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: i915_gem.h,v 1.6 2021/12/19 12:08:54 riastradh Exp $ */ +/* $NetBSD: i915_gem.h,v 1.7 2021/12/20 19:54:07 riastradh Exp $ */ /* * Copyright © 2016 Intel Corporation @@ -42,8 +42,12 @@ struct drm_i915_private; #define GEM_SHOW_DEBUG() drm_debug_enabled(DRM_UT_DRIVER) #ifdef __NetBSD__ +#ifdef DIAGNOSTIC #define GEM_BUG_ON(condition) KASSERT(!(condition)) #else +#define GEM_BUG_ON(condition) BUILD_BUG_ON_INVALID(condition) +#endif +#else #define GEM_BUG_ON(condition) do { if (unlikely((condition))) { \ GEM_TRACE_ERR("%s:%d GEM_BUG_ON(%s)\n", \ __func__, __LINE__, __stringify(condition)); \
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: riastradh Date: Mon Dec 20 19:54:07 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: i915_gem.h Log Message: i915: Obviate need for __diagused on variables in GEM_BUG_ON. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: rillig Date: Mon Dec 20 19:48:05 UTC 2021 Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/xlint/lint1: Makefile Added Files: src/tests/usr.bin/xlint/lint1: init_braces.c init_braces.exp Log Message: tests/lint: test excess braces around initializers To generate a diff of this commit: cvs rdiff -u -r1.1178 -r1.1179 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.116 -r1.117 src/tests/usr.bin/xlint/lint1/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/init_braces.c \ src/tests/usr.bin/xlint/lint1/init_braces.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.1178 src/distrib/sets/lists/tests/mi:1.1179 --- src/distrib/sets/lists/tests/mi:1.1178 Tue Dec 14 00:02:57 2021 +++ src/distrib/sets/lists/tests/mi Mon Dec 20 19:48:05 2021 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1178 2021/12/14 00:02:57 rillig Exp $ +# $NetBSD: mi,v 1.1179 2021/12/20 19:48:05 rillig Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -6490,6 +6490,8 @@ ./usr/tests/usr.bin/xlint/lint1/gcc_typeof_after_statement.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/init.ctests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/init.exp tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/init_braces.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/init_braces.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/init_c90.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/init_c90.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/lex_char.c tests-usr.bin-tests compattestfile,atf Index: src/tests/usr.bin/xlint/lint1/Makefile diff -u src/tests/usr.bin/xlint/lint1/Makefile:1.116 src/tests/usr.bin/xlint/lint1/Makefile:1.117 --- src/tests/usr.bin/xlint/lint1/Makefile:1.116 Thu Dec 16 11:00:15 2021 +++ src/tests/usr.bin/xlint/lint1/Makefile Mon Dec 20 19:48:05 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.116 2021/12/16 11:00:15 rillig Exp $ +# $NetBSD: Makefile,v 1.117 2021/12/20 19:48:05 rillig Exp $ NOMAN= # defined MAX_MESSAGE= 348 # see lint1/err.c @@ -191,6 +191,8 @@ FILES+= gcc_typeof_after_statement.c FILES+= gcc_typeof_after_statement.exp FILES+= init.c FILES+= init.exp +FILES+= init_braces.c +FILES+= init_braces.exp FILES+= init_c90.c FILES+= init_c90.exp FILES+= lex_char.c Added files: Index: src/tests/usr.bin/xlint/lint1/init_braces.c diff -u /dev/null src/tests/usr.bin/xlint/lint1/init_braces.c:1.1 --- /dev/null Mon Dec 20 19:48:06 2021 +++ src/tests/usr.bin/xlint/lint1/init_braces.c Mon Dec 20 19:48:05 2021 @@ -0,0 +1,63 @@ +/* $NetBSD: init_braces.c,v 1.1 2021/12/20 19:48:05 rillig Exp $ */ +# 3 "init_braces.c" + +/* + * Test initialization with excess braces around expressions. + * + * See also: + * C99 6.7.8 + * C11 6.7.9 + */ + +void +init_int(void) +{ + /* gcc-expect+2: error: invalid initializer */ + /* clang-expect+1: error: array initializer must be an initializer list */ + /* expect+2: error: {}-enclosed initializer required [181] */ + /* expect+1: error: empty array declaration: num0 [190] */ + int num0[] = 0; + int num1[] = { 1 }; + /* gcc-expect+2: warning: braces around scalar initializer */ + /* clang-expect+1: warning: braces around scalar initializer */ + int num2[] = {{ 1 }}; + /* gcc-expect+3: warning: braces around scalar initializer */ + /* gcc-expect+2: warning: braces around scalar initializer */ + /* clang-expect+1: warning: too many braces around scalar initializer */ + int num3[] = {{{ 1 }}}; + /* gcc-expect+5: warning: braces around scalar initializer */ + /* gcc-expect+4: warning: braces around scalar initializer */ + /* gcc-expect+3: warning: braces around scalar initializer */ + /* clang-expect+2: warning: too many braces around scalar initializer */ + /* clang-expect+1: warning: too many braces around scalar initializer */ + int num4[] = 1 ; +} + +void +init_string(void) +{ + char name0[] = ""; + char name1[] = { "" }; + /* gcc-expect+5: warning: braces around scalar initializer */ + /* gcc-expect+4: warning: initialization of 'char' from 'char *' makes integer from pointer without a cast */ + /* clang-expect+3: warning: incompatible pointer to integer conversion initializing 'char' with an expression of type 'char [1]' */ + /* clang-expect+2: warning: braces around scalar initializer */ + /* expect+1: warning: illegal combination of integer (char) and pointer (pointer to char) [183] */ + char name2[] = {{ "" }}; + /* gcc-expect+6: warning: braces around scalar initializer */ + /* gcc-expect+5: warning: braces around scalar initializer */ + /* gcc-expect+4: warning: initialization of 'char' from
CVS commit: src
Module Name:src Committed By: rillig Date: Mon Dec 20 19:48:05 UTC 2021 Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/xlint/lint1: Makefile Added Files: src/tests/usr.bin/xlint/lint1: init_braces.c init_braces.exp Log Message: tests/lint: test excess braces around initializers To generate a diff of this commit: cvs rdiff -u -r1.1178 -r1.1179 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.116 -r1.117 src/tests/usr.bin/xlint/lint1/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/init_braces.c \ src/tests/usr.bin/xlint/lint1/init_braces.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Mon Dec 20 19:34:01 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y externs1.h init.c Log Message: lint: add grammar rule for the beginning of a designation This will be necessary to properly implement handling of initializers and braced initializer-lists. No functional change for now since the designation is already reset after each expression and '}'. To handle initializations properly, the designation must not be reset after each expression, it must advance to the next member instead. To generate a diff of this commit: cvs rdiff -u -r1.376 -r1.377 src/usr.bin/xlint/lint1/cgram.y cvs rdiff -u -r1.142 -r1.143 src/usr.bin/xlint/lint1/externs1.h cvs rdiff -u -r1.222 -r1.223 src/usr.bin/xlint/lint1/init.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/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.376 src/usr.bin/xlint/lint1/cgram.y:1.377 --- src/usr.bin/xlint/lint1/cgram.y:1.376 Sat Dec 18 11:37:00 2021 +++ src/usr.bin/xlint/lint1/cgram.y Mon Dec 20 19:34:01 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.376 2021/12/18 11:37:00 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.377 2021/12/20 19:34:01 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.376 2021/12/18 11:37:00 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.377 2021/12/20 19:34:01 rillig Exp $"); #endif #include @@ -1561,14 +1561,21 @@ initializer_list_item: /* helper */ ; designation: /* C99 6.7.8 "Initialization" */ - designator_list T_ASSIGN + begin_designation designator_list T_ASSIGN | identifier T_COLON { /* GCC style struct or union member name in initializer */ gnuism(315); + begin_designation(); add_designator_member($1); } ; +begin_designation: /* lint-specific helper */ + /* empty */ { + begin_designation(); + } + ; + designator_list: /* C99 6.7.8 "Initialization" */ designator | designator_list designator Index: src/usr.bin/xlint/lint1/externs1.h diff -u src/usr.bin/xlint/lint1/externs1.h:1.142 src/usr.bin/xlint/lint1/externs1.h:1.143 --- src/usr.bin/xlint/lint1/externs1.h:1.142 Thu Dec 16 23:46:21 2021 +++ src/usr.bin/xlint/lint1/externs1.h Mon Dec 20 19:34:01 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: externs1.h,v 1.142 2021/12/16 23:46:21 rillig Exp $ */ +/* $NetBSD: externs1.h,v 1.143 2021/12/20 19:34:01 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -332,6 +332,7 @@ extern sym_t **current_initsym(void); extern void init_rbrace(void); extern void init_lbrace(void); extern void init_expr(tnode_t *); +extern void begin_designation(void); extern void add_designator_member(sbuf_t *); extern void add_designator_subscript(range_t); Index: src/usr.bin/xlint/lint1/init.c diff -u src/usr.bin/xlint/lint1/init.c:1.222 src/usr.bin/xlint/lint1/init.c:1.223 --- src/usr.bin/xlint/lint1/init.c:1.222 Sun Dec 19 23:50:27 2021 +++ src/usr.bin/xlint/lint1/init.c Mon Dec 20 19:34:01 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.222 2021/12/19 23:50:27 rillig Exp $ */ +/* $NetBSD: init.c,v 1.223 2021/12/20 19:34:01 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -38,7 +38,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: init.c,v 1.222 2021/12/19 23:50:27 rillig Exp $"); +__RCSID("$NetBSD: init.c,v 1.223 2021/12/20 19:34:01 rillig Exp $"); #endif #include @@ -988,6 +988,16 @@ end_initialization(void) } void +begin_designation(void) +{ + brace_level *bl; + + bl = current_init()->in_brace_level; + lint_assert(bl != NULL); + designation_reset(>bl_designation); +} + +void add_designator_member(sbuf_t *sb) {
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Mon Dec 20 19:34:01 UTC 2021 Modified Files: src/usr.bin/xlint/lint1: cgram.y externs1.h init.c Log Message: lint: add grammar rule for the beginning of a designation This will be necessary to properly implement handling of initializers and braced initializer-lists. No functional change for now since the designation is already reset after each expression and '}'. To handle initializations properly, the designation must not be reset after each expression, it must advance to the next member instead. To generate a diff of this commit: cvs rdiff -u -r1.376 -r1.377 src/usr.bin/xlint/lint1/cgram.y cvs rdiff -u -r1.142 -r1.143 src/usr.bin/xlint/lint1/externs1.h cvs rdiff -u -r1.222 -r1.223 src/usr.bin/xlint/lint1/init.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/qbus
Module Name:src Committed By: rhialto Date: Mon Dec 20 17:12:41 UTC 2021 Modified Files: src/sys/dev/qbus: if_qt.c if_qtreg.h Log Message: Set up multicast (input) filter on qt (DELQA-Turbo). To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/dev/qbus/if_qt.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/qbus/if_qtreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/qbus/if_qt.c diff -u src/sys/dev/qbus/if_qt.c:1.25 src/sys/dev/qbus/if_qt.c:1.26 --- src/sys/dev/qbus/if_qt.c:1.25 Wed Jan 29 05:57:21 2020 +++ src/sys/dev/qbus/if_qt.c Mon Dec 20 17:12:41 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_qt.c,v 1.25 2020/01/29 05:57:21 thorpej Exp $ */ +/* $NetBSD: if_qt.c,v 1.26 2021/12/20 17:12:41 rhialto Exp $ */ /* * Copyright (c) 1992 Steven M. Schultz * All rights reserved. @@ -80,7 +80,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_qt.c,v 1.25 2020/01/29 05:57:21 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_qt.c,v 1.26 2021/12/20 17:12:41 rhialto Exp $"); #include "opt_inet.h" @@ -162,6 +162,7 @@ struct qt_softc { static int qtmatch(device_t, cfdata_t, void *); static void qtattach(device_t, device_t, void *); +static void lance_setladrf(struct ethercom *ec, uint16_t *af); static void qtintr(void *); static int qtinit(struct ifnet *); static int qtioctl(struct ifnet *, u_long, void *); @@ -332,6 +333,67 @@ qtturbo(struct qt_softc *sc) return(1); } +#define ETHER_CMP(a,b) memcmp((a), (b), 6) + +/* + * Set up the logical address filter. + */ +void +lance_setladrf(struct ethercom *ec, uint16_t *af) +{ + struct ifnet *ifp = >ec_if; + struct ether_multi *enm; + uint32_t crc; + struct ether_multistep step; + + /* + * Set up multicast address filter by passing all multicast addresses + * through a crc generator, and then using the high order 6 bits as an + * index into the 64 bit logical address filter. The high order bit + * selects the word, while the rest of the bits select the bit within + * the word. + */ + + if (ifp->if_flags & IFF_PROMISC) + goto allmulti; + + af[0] = af[1] = af[2] = af[3] = 0x; + + ETHER_LOCK(ec); + ETHER_FIRST_MULTI(step, ec, enm); + while (enm != NULL) { + if (ETHER_CMP(enm->enm_addrlo, enm->enm_addrhi)) { + /* + * We must listen to a range of multicast addresses. + * For now, just accept all multicasts, rather than + * trying to set only those filter bits needed to match + * the range. (At this time, the only use of address + * ranges is for IP multicast routing, for which the + * range is big enough to require all bits set.) + */ + ETHER_UNLOCK(ec); + goto allmulti; + } + + crc = ether_crc32_le(enm->enm_addrlo, ETHER_ADDR_LEN); + + /* Just want the 6 most significant bits. */ + crc >>= 26; + + /* Set the corresponding bit in the filter. */ + af[crc >> 4] |= 1 << (crc & 0xf); + + ETHER_NEXT_MULTI(step, enm); + } + ETHER_UNLOCK(ec); + ifp->if_flags &= ~IFF_ALLMULTI; + return; + +allmulti: + ifp->if_flags |= IFF_ALLMULTI; + af[0] = af[1] = af[2] = af[3] = 0x; +} + int qtinit(struct ifnet *ifp) { @@ -388,7 +450,10 @@ qtinit(struct ifnet *ifp) } iniblk = >sc_ib->qc_init; iniblk->mode = ifp->if_flags & IFF_PROMISC ? INIT_MODE_PRO : 0; - +/* + * The multicast filter works "like LANCE". + */ + lance_setladrf(>is_ec, iniblk->laddr); /* * Now initialize the receive ring descriptors. Because this routine can be Index: src/sys/dev/qbus/if_qtreg.h diff -u src/sys/dev/qbus/if_qtreg.h:1.5 src/sys/dev/qbus/if_qtreg.h:1.6 --- src/sys/dev/qbus/if_qtreg.h:1.5 Sun Dec 11 12:23:29 2005 +++ src/sys/dev/qbus/if_qtreg.h Mon Dec 20 17:12:41 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_qtreg.h,v 1.5 2005/12/11 12:23:29 christos Exp $ */ +/* $NetBSD: if_qtreg.h,v 1.6 2021/12/20 17:12:41 rhialto Exp $ */ /* * Copyright (c) 1992 Steven M. Schultz * All rights reserved. @@ -207,18 +207,18 @@ struct qt_init { - short mode; - u_char paddr[6]; /* 48 bit physical address */ - u_char laddr[8]; /* 64 bit logical address filter */ - u_short rx_lo; /* low 16 bits of receive ring addr */ - u_short rx_hi; /* high 6 bits of receive ring addr */ - u_short tx_lo; /* low 16 bits of transmit ring addr */ - u_short tx_hi; /* high 6 bits of transmit ring addr */ - u_short options; - u_short vector; - u_short hit; - char passwd[6]; - char pad[4]; /* even on 40 byte for alignment */ + int16_t mode; + u_char paddr[6]; /* 48 bit physical address */ + uint16_t laddr[4]; /* 64 bit logical address filter */ + uint16_t rx_lo; /* low 16 bits of receive ring addr */ + uint16_t rx_hi; /* high 6 bits of receive ring addr */ + uint16_t tx_lo; /* low 16 bits of transmit ring addr */ + uint16_t tx_hi; /* high 6 bits of transmit ring addr */ + uint16_t options; + uint16_t vector; + uint16_t hit; + char passwd[6]; + char pad[4]; /* even on 40 byte for alignment */ };
CVS commit: src/sys/dev/qbus
Module Name:src Committed By: rhialto Date: Mon Dec 20 17:12:41 UTC 2021 Modified Files: src/sys/dev/qbus: if_qt.c if_qtreg.h Log Message: Set up multicast (input) filter on qt (DELQA-Turbo). To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/dev/qbus/if_qt.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/qbus/if_qtreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/i915drm
Module Name:src Committed By: riastradh Date: Mon Dec 20 14:52:25 UTC 2021 Modified Files: src/sys/external/bsd/drm2/i915drm: i915_pci_autoconf.c Log Message: i915: Mark a KASSERT-only variable __diagused. Minor KNF fix while here. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/sys/external/bsd/drm2/i915drm/i915_pci_autoconf.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/drm2/i915drm/i915_pci_autoconf.c diff -u src/sys/external/bsd/drm2/i915drm/i915_pci_autoconf.c:1.10 src/sys/external/bsd/drm2/i915drm/i915_pci_autoconf.c:1.11 --- src/sys/external/bsd/drm2/i915drm/i915_pci_autoconf.c:1.10 Sun Dec 19 12:28:12 2021 +++ src/sys/external/bsd/drm2/i915drm/i915_pci_autoconf.c Mon Dec 20 14:52:25 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: i915_pci_autoconf.c,v 1.10 2021/12/19 12:28:12 riastradh Exp $ */ +/* $NetBSD: i915_pci_autoconf.c,v 1.11 2021/12/20 14:52:25 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: i915_pci_autoconf.c,v 1.10 2021/12/19 12:28:12 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i915_pci_autoconf.c,v 1.11 2021/12/20 14:52:25 riastradh Exp $"); #include #include @@ -104,7 +104,8 @@ i915drmkms_pci_lookup(const struct pci_a return NULL; const struct pci_device_id *ent = _device_ids[i]; - const struct intel_device_info *const info = (struct intel_device_info *) ent->driver_data; + const struct intel_device_info *const info = + (struct intel_device_info *)ent->driver_data; if (info->require_force_probe) { printf("i915drmkms: preliminary hardware support disabled\n"); @@ -171,7 +172,8 @@ i915drmkms_attach_real(device_t self) struct i915drmkms_softc *const sc = device_private(self); struct pci_attach_args *const pa = >sc_pa; const struct pci_device_id *ent = i915drmkms_pci_lookup(pa); - const struct intel_device_info *const info = (struct intel_device_info *) ent->driver_data; + const struct intel_device_info *const info __diagused = + (struct intel_device_info *)ent->driver_data; int error; KASSERT(info != NULL);
CVS commit: src/sys/external/bsd/drm2/i915drm
Module Name:src Committed By: riastradh Date: Mon Dec 20 14:52:25 UTC 2021 Modified Files: src/sys/external/bsd/drm2/i915drm: i915_pci_autoconf.c Log Message: i915: Mark a KASSERT-only variable __diagused. Minor KNF fix while here. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/sys/external/bsd/drm2/i915drm/i915_pci_autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: christos Date: Mon Dec 20 14:41:26 UTC 2021 Modified Files: src/etc: Makefile src/share/mk: bsd.README bsd.own.mk Log Message: PR/7: Andreas Gustafsson" Introduce a new variable MKDEBUGKERNEL which as the name implies, includes a netbsd.gdb inside each kernel set: $ tar -tzvf kern-GENERIC.tgz -rwxr-xr-x 0 root wheel 29398264 Dec 19 12:50 ./netbsd -rwxr-xr-x 0 root wheel 208125880 Dec 19 12:50 ./netbsd.gdb To generate a diff of this commit: cvs rdiff -u -r1.452 -r1.453 src/etc/Makefile cvs rdiff -u -r1.425 -r1.426 src/share/mk/bsd.README cvs rdiff -u -r1.1270 -r1.1271 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/Makefile diff -u src/etc/Makefile:1.452 src/etc/Makefile:1.453 --- src/etc/Makefile:1.452 Sun Sep 26 11:52:40 2021 +++ src/etc/Makefile Mon Dec 20 09:41:26 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.452 2021/09/26 15:52:40 maya Exp $ +# $NetBSD: Makefile,v 1.453 2021/12/20 14:41:26 christos Exp $ # from: @(#)Makefile 8.7 (Berkeley) 5/25/95 # Environment variables without default values: @@ -590,6 +590,7 @@ build_kernels: .PHONY build_kernels: kern-${configfile} kern-${configfile}: .PHONY .MAKE cd ${KERNCONFDIR} && ${TOOL_CONFIG} ${CONFIGOPTS} -s ${KERNSRCDIR} \ + ${MKDEBUGKERNEL == "yes" :? -DDEBUG=-g :} \ -b ${KERNOBJDIR}/${configfile:C/.*\///} ${configfile} .if ${MKUPDATE} == "no" ${MAKE} -C ${KERNOBJDIR}/${configfile:C/.*\///} distclean @@ -622,6 +623,9 @@ kernset-${configfile}: .PHONY build_kern kernels="$${kernels} $${ks}"; \ [ -z "$${newest}" -o $${ks} \ -nt "$${newest}" ] && newest=$${ks}; \ +[ ${MKDEBUGKERNEL} = "no" -o \ + ! -f $${ks}.gdb ] continue; \ +kernels="$${kernels} $${ks}.gdb"; \ done; \ done; \ [ $${kern_tgz} -nt "$${newest}" ] || { \ Index: src/share/mk/bsd.README diff -u src/share/mk/bsd.README:1.425 src/share/mk/bsd.README:1.426 --- src/share/mk/bsd.README:1.425 Sun Dec 5 02:53:57 2021 +++ src/share/mk/bsd.README Mon Dec 20 09:41:26 2021 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.425 2021/12/05 07:53:57 msaitoh Exp $ +# $NetBSD: bsd.README,v 1.426 2021/12/20 14:41:26 christos Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the make "include" files for the NetBSD @@ -185,6 +185,9 @@ MKDEBUGLIB Build *_g.a debugging librari with -DDEBUG. Default: no +MKDEBUGKERNEL Build .gdb kernels to be included with the kernel sets. + Default: no + MKDEPINCLUDES If "yes" issue .include statements in the .depend file instead of inlining the contents of the .d files. Useful when stale dependencies are present, to list the exact Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1270 src/share/mk/bsd.own.mk:1.1271 --- src/share/mk/bsd.own.mk:1.1270 Sun Dec 12 15:33:22 2021 +++ src/share/mk/bsd.own.mk Mon Dec 20 09:41:26 2021 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1270 2021/12/12 20:33:22 maya Exp $ +# $NetBSD: bsd.own.mk,v 1.1271 2021/12/20 14:41:26 christos Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -1292,7 +1292,7 @@ _MKVARS.no= \ MKARZERO \ MKBSDGREP \ MKCATPAGES MKCOMPATTESTS MKCOMPATX11 MKCTF \ - MKDEBUG MKDEBUGLIB MKDTB MKDTRACE \ + MKDEBUG MKDEBUGKERNEL MKDEBUGLIB MKDTB MKDTRACE \ MKEXTSRC \ MKFIRMWARE \ MKGROFFHTMLDOC \
CVS commit: src
Module Name:src Committed By: christos Date: Mon Dec 20 14:41:26 UTC 2021 Modified Files: src/etc: Makefile src/share/mk: bsd.README bsd.own.mk Log Message: PR/7: Andreas Gustafsson" Introduce a new variable MKDEBUGKERNEL which as the name implies, includes a netbsd.gdb inside each kernel set: $ tar -tzvf kern-GENERIC.tgz -rwxr-xr-x 0 root wheel 29398264 Dec 19 12:50 ./netbsd -rwxr-xr-x 0 root wheel 208125880 Dec 19 12:50 ./netbsd.gdb To generate a diff of this commit: cvs rdiff -u -r1.452 -r1.453 src/etc/Makefile cvs rdiff -u -r1.425 -r1.426 src/share/mk/bsd.README cvs rdiff -u -r1.1270 -r1.1271 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Mon Dec 20 13:58:58 UTC 2021 Modified Files: src/sys/arch/arm/arm32: bus_dma.c Log Message: _bus_dmatag_subregion is always EOPNOTSUPP for !_ARM32_NEED_BUS_DMA_BOUNCE No need to check {min,max}_addr. Compiler did the right thing, but... To generate a diff of this commit: cvs rdiff -u -r1.133 -r1.134 src/sys/arch/arm/arm32/bus_dma.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm32/bus_dma.c diff -u src/sys/arch/arm/arm32/bus_dma.c:1.133 src/sys/arch/arm/arm32/bus_dma.c:1.134 --- src/sys/arch/arm/arm32/bus_dma.c:1.133 Mon Aug 30 22:56:26 2021 +++ src/sys/arch/arm/arm32/bus_dma.c Mon Dec 20 13:58:58 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.133 2021/08/30 22:56:26 jmcneill Exp $ */ +/* $NetBSD: bus_dma.c,v 1.134 2021/12/20 13:58:58 skrll Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2020 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #include "opt_cputypes.h" #include -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.133 2021/08/30 22:56:26 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.134 2021/12/20 13:58:58 skrll Exp $"); #include @@ -1889,10 +1889,10 @@ int _bus_dmatag_subregion(bus_dma_tag_t tag, bus_addr_t min_addr, bus_addr_t max_addr, bus_dma_tag_t *newtag, int flags) { +#ifdef _ARM32_NEED_BUS_DMA_BOUNCE if (min_addr >= max_addr) return EOPNOTSUPP; -#ifdef _ARM32_NEED_BUS_DMA_BOUNCE struct arm32_dma_range *dr; bool psubset = true; size_t nranges = 0;
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Mon Dec 20 13:58:58 UTC 2021 Modified Files: src/sys/arch/arm/arm32: bus_dma.c Log Message: _bus_dmatag_subregion is always EOPNOTSUPP for !_ARM32_NEED_BUS_DMA_BOUNCE No need to check {min,max}_addr. Compiler did the right thing, but... To generate a diff of this commit: cvs rdiff -u -r1.133 -r1.134 src/sys/arch/arm/arm32/bus_dma.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: skrll Date: Mon Dec 20 13:19:09 UTC 2021 Modified Files: src/sys/dev/pci: if_wm.c Log Message: aprint_verbose the DMA range used. To generate a diff of this commit: cvs rdiff -u -r1.723 -r1.724 src/sys/dev/pci/if_wm.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/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.723 src/sys/dev/pci/if_wm.c:1.724 --- src/sys/dev/pci/if_wm.c:1.723 Mon Dec 20 12:56:25 2021 +++ src/sys/dev/pci/if_wm.c Mon Dec 20 13:19:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.723 2021/12/20 12:56:25 skrll Exp $ */ +/* $NetBSD: if_wm.c,v 1.724 2021/12/20 13:19:09 skrll Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.723 2021/12/20 12:56:25 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.724 2021/12/20 13:19:09 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -1929,10 +1929,13 @@ wm_attach(device_t parent, device_t self sc->sc_pc = pa->pa_pc; sc->sc_pcitag = pa->pa_tag; - if (pci_dma64_available(pa)) + if (pci_dma64_available(pa)) { + aprint_verbose(", 64-bit DMA"); sc->sc_dmat = pa->pa_dmat64; - else + } else { + aprint_verbose(", 32-bit DMA"); sc->sc_dmat = pa->pa_dmat; + } sc->sc_pcidevid = PCI_PRODUCT(pa->pa_id); sc->sc_rev = PCI_REVISION(pci_conf_read(pc, pa->pa_tag,PCI_CLASS_REG));
CVS commit: src/sys/dev/pci
Module Name:src Committed By: skrll Date: Mon Dec 20 13:19:09 UTC 2021 Modified Files: src/sys/dev/pci: if_wm.c Log Message: aprint_verbose the DMA range used. To generate a diff of this commit: cvs rdiff -u -r1.723 -r1.724 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: skrll Date: Mon Dec 20 12:56:25 UTC 2021 Modified Files: src/sys/dev/pci: if_wm.c Log Message: whitespace in a comment To generate a diff of this commit: cvs rdiff -u -r1.722 -r1.723 src/sys/dev/pci/if_wm.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/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.722 src/sys/dev/pci/if_wm.c:1.723 --- src/sys/dev/pci/if_wm.c:1.722 Sat Dec 11 17:05:50 2021 +++ src/sys/dev/pci/if_wm.c Mon Dec 20 12:56:25 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.722 2021/12/11 17:05:50 skrll Exp $ */ +/* $NetBSD: if_wm.c,v 1.723 2021/12/20 12:56:25 skrll Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.722 2021/12/11 17:05:50 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.723 2021/12/20 12:56:25 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -4895,7 +4895,7 @@ wm_flush_desc_rings(struct wm_softc *sc) * Remove all descriptors from the tx_ring. * * We want to clear all pending descriptors from the TX ring. Zeroing - * happens when the HW reads the regs. We assign the ring itself as + * happens when the HW reads the regs. We assign the ring itself as * the data of the next descriptor. We don't care about the data we are * about to reset the HW. */
CVS commit: src/sys/dev/pci
Module Name:src Committed By: skrll Date: Mon Dec 20 12:56:25 UTC 2021 Modified Files: src/sys/dev/pci: if_wm.c Log Message: whitespace in a comment To generate a diff of this commit: cvs rdiff -u -r1.722 -r1.723 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/include
Module Name:src Committed By: riastradh Date: Mon Dec 20 12:56:08 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/include/drm: drm_vblank.h intel_lpe_audio.h src/sys/external/bsd/drm2/dist/include/uapi/drm: drm.h Log Message: drm: Apply the Intel pipe_drmhack in more places. See sys/external/bsd/drm2/dist/drm/i915/intel/intel_display.h for details. Should reduce ctf type duplication a fair bit, maybe even enough to get us under the 2^15 type limit. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 \ src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.h cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/include/drm/intel_lpe_audio.h cvs rdiff -u -r1.6 -r1.7 \ src/sys/external/bsd/drm2/dist/include/uapi/drm/drm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/include
Module Name:src Committed By: riastradh Date: Mon Dec 20 12:56:08 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/include/drm: drm_vblank.h intel_lpe_audio.h src/sys/external/bsd/drm2/dist/include/uapi/drm: drm.h Log Message: drm: Apply the Intel pipe_drmhack in more places. See sys/external/bsd/drm2/dist/drm/i915/intel/intel_display.h for details. Should reduce ctf type duplication a fair bit, maybe even enough to get us under the 2^15 type limit. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 \ src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.h cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/include/drm/intel_lpe_audio.h cvs rdiff -u -r1.6 -r1.7 \ src/sys/external/bsd/drm2/dist/include/uapi/drm/drm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.h diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.h:1.11 src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.h:1.12 --- src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.h:1.11 Sun Dec 19 12:05:09 2021 +++ src/sys/external/bsd/drm2/dist/include/drm/drm_vblank.h Mon Dec 20 12:56:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_vblank.h,v 1.11 2021/12/19 12:05:09 riastradh Exp $ */ +/* $NetBSD: drm_vblank.h,v 1.12 2021/12/20 12:56:07 riastradh Exp $ */ /* * Copyright 2016 Intel Corp. @@ -26,6 +26,12 @@ #ifndef _DRM_VBLANK_H_ #define _DRM_VBLANK_H_ +#ifdef __NetBSD__ +#include +#include +#define pipe pipe_drmhack /* see intel_display.h */ +#endif + #include #include #include Index: src/sys/external/bsd/drm2/dist/include/drm/intel_lpe_audio.h diff -u src/sys/external/bsd/drm2/dist/include/drm/intel_lpe_audio.h:1.2 src/sys/external/bsd/drm2/dist/include/drm/intel_lpe_audio.h:1.3 --- src/sys/external/bsd/drm2/dist/include/drm/intel_lpe_audio.h:1.2 Sat Dec 18 23:45:46 2021 +++ src/sys/external/bsd/drm2/dist/include/drm/intel_lpe_audio.h Mon Dec 20 12:56:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_lpe_audio.h,v 1.2 2021/12/18 23:45:46 riastradh Exp $ */ +/* $NetBSD: intel_lpe_audio.h,v 1.3 2021/12/20 12:56:07 riastradh Exp $ */ /* * Copyright © 2016 Intel Corporation @@ -26,6 +26,12 @@ #ifndef _INTEL_LPE_AUDIO_H_ #define _INTEL_LPE_AUDIO_H_ +#ifdef __NetBSD__ +#include +#include +#define pipe pipe_drmhack /* see intel_display.h */ +#endif + #include #include Index: src/sys/external/bsd/drm2/dist/include/uapi/drm/drm.h diff -u src/sys/external/bsd/drm2/dist/include/uapi/drm/drm.h:1.6 src/sys/external/bsd/drm2/dist/include/uapi/drm/drm.h:1.7 --- src/sys/external/bsd/drm2/dist/include/uapi/drm/drm.h:1.6 Sun Dec 19 01:54:43 2021 +++ src/sys/external/bsd/drm2/dist/include/uapi/drm/drm.h Mon Dec 20 12:56:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: drm.h,v 1.6 2021/12/19 01:54:43 riastradh Exp $ */ +/* $NetBSD: drm.h,v 1.7 2021/12/20 12:56:07 riastradh Exp $ */ /** * \file drm.h @@ -61,6 +61,11 @@ typedef unsigned int drm_handle_t; #include #ifdef _KERNEL + +#include +#include +#define pipe pipe_drmhack /* see intel_display.h */ + #include #include #else
CVS commit: src/sys/dev/pci
Module Name:src Committed By: skrll Date: Mon Dec 20 12:50:35 UTC 2021 Modified Files: src/sys/dev/pci: if_wmreg.h if_wmvar.h Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/sys/dev/pci/if_wmreg.h cvs rdiff -u -r1.47 -r1.48 src/sys/dev/pci/if_wmvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wmreg.h diff -u src/sys/dev/pci/if_wmreg.h:1.121 src/sys/dev/pci/if_wmreg.h:1.122 --- src/sys/dev/pci/if_wmreg.h:1.121 Fri Nov 5 06:15:42 2021 +++ src/sys/dev/pci/if_wmreg.h Mon Dec 20 12:50:35 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wmreg.h,v 1.121 2021/11/05 06:15:42 msaitoh Exp $ */ +/* $NetBSD: if_wmreg.h,v 1.122 2021/12/20 12:50:35 skrll Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -37,32 +37,32 @@ /** - Copyright (c) 2001-2012, Intel Corporation + Copyright (c) 2001-2012, Intel Corporation All rights reserved. - - Redistribution and use in source and binary forms, with or without + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - 3. Neither the name of the Intel Corporation nor the names of its - contributors may be used to endorse or promote products derived from + + 3. Neither the name of the Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Index: src/sys/dev/pci/if_wmvar.h diff -u src/sys/dev/pci/if_wmvar.h:1.47 src/sys/dev/pci/if_wmvar.h:1.48 --- src/sys/dev/pci/if_wmvar.h:1.47 Fri Oct 30 06:29:47 2020 +++ src/sys/dev/pci/if_wmvar.h Mon Dec 20 12:50:35 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wmvar.h,v 1.47 2020/10/30 06:29:47 msaitoh Exp $ */ +/* $NetBSD: if_wmvar.h,v 1.48 2021/12/20 12:50:35 skrll Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -37,32 +37,32 @@ /*** - Copyright (c) 2001-2005, Intel Corporation + Copyright (c) 2001-2005, Intel Corporation All rights reserved. - - Redistribution and use in source and binary forms, with or without + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the + + 2.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: skrll Date: Mon Dec 20 12:50:35 UTC 2021 Modified Files: src/sys/dev/pci: if_wmreg.h if_wmvar.h Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/sys/dev/pci/if_wmreg.h cvs rdiff -u -r1.47 -r1.48 src/sys/dev/pci/if_wmvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: skrll Date: Mon Dec 20 12:01:01 UTC 2021 Modified Files: src/sys/dev/acpi: acpi_pci_link.c Log Message: KNF. Same binary before and after. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/acpi/acpi_pci_link.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi_pci_link.c diff -u src/sys/dev/acpi/acpi_pci_link.c:1.28 src/sys/dev/acpi/acpi_pci_link.c:1.29 --- src/sys/dev/acpi/acpi_pci_link.c:1.28 Sun Dec 19 19:26:48 2021 +++ src/sys/dev/acpi/acpi_pci_link.c Mon Dec 20 12:01:01 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_pci_link.c,v 1.28 2021/12/19 19:26:48 skrll Exp $ */ +/* $NetBSD: acpi_pci_link.c,v 1.29 2021/12/20 12:01:01 skrll Exp $ */ /*- * Copyright (c) 2002 Mitsuru IWASAKI @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_pci_link.c,v 1.28 2021/12/19 19:26:48 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_pci_link.c,v 1.29 2021/12/20 12:01:01 skrll Exp $"); #include #include @@ -182,7 +182,7 @@ acpi_count_irq_resources(ACPI_RESOURCE * if (req->in_dpf != DPF_IGNORE) req->count++; } - return (AE_OK); + return AE_OK; } static ACPI_STATUS @@ -246,7 +246,7 @@ link_add_crs(ACPI_RESOURCE *res, void *c default: req->res_index++; } - return (AE_OK); + return AE_OK; } /* @@ -361,7 +361,7 @@ link_add_prs(ACPI_RESOURCE *res, void *c req->res_index); req->res_index++; } - return (AE_OK); + return AE_OK; } static int @@ -371,12 +371,12 @@ link_valid_irq(struct link *link, int ir /* Invalid interrupts are never valid. */ if (!PCI_INTERRUPT_VALID(irq)) - return (FALSE); + return FALSE; /* Any interrupt in the list of possible interrupts is valid. */ for (i = 0; i < link->l_num_irqs; i++) if (link->l_irqs[i] == irq) - return (TRUE); + return TRUE; /* * For links routed via an ISA interrupt, if the SCI is routed via @@ -384,10 +384,10 @@ link_valid_irq(struct link *link, int ir */ if (link->l_isa_irq && AcpiGbl_FADT.SciInterrupt == irq && irq < NUM_ISA_INTERRUPTS) - return (TRUE); + return TRUE; /* If the interrupt wasn't found in the list it is not valid. */ - return (FALSE); + return FALSE; } void @@ -450,13 +450,13 @@ acpi_pci_link_attach(struct acpi_pci_lin aprint_error("%s: Unable to parse _CRS or _PRS: %s\n", sc->pl_name, AcpiFormatException(status)); ACPI_SERIAL_END(pci_link); - return (ENXIO); + return ENXIO; } } sc->pl_num_links = creq.count; if (creq.count == 0) { ACPI_SERIAL_END(pci_link); - return (0); + return 0; } sc->pl_links = malloc(sizeof(struct link) * sc->pl_num_links, M_ACPI, M_WAITOK | M_ZERO); @@ -545,7 +545,7 @@ acpi_pci_link_attach(struct acpi_pci_lin acpi_pci_link_dump(sc); } ACPI_SERIAL_END(pci_link); - return (0); + return 0; fail: ACPI_SERIAL_END(pci_link); for (i = 0; i < sc->pl_num_links; i++) { @@ -555,7 +555,7 @@ fail: free(sc->pl_links[i].l_devices, M_ACPI); } free(sc->pl_links, M_ACPI); - return (ENXIO); + return ENXIO; } static void @@ -613,7 +613,7 @@ acpi_pci_link_search_irq(struct acpi_pci /* See if we have a valid device at function 0. */ value = pci_conf_read(pc, tag, PCI_BHLC_REG); if (PCI_HDRTYPE_TYPE(value) > PCI_HDRTYPE_PCB) - return (PCI_INVALID_IRQ); + return PCI_INVALID_IRQ; if (PCI_HDRTYPE_MULTIFN(value)) maxfunc = 7; else @@ -642,9 +642,9 @@ acpi_pci_link_search_irq(struct acpi_pci " at func %d: %d\n", sc->pl_name, bus, device, pin + 'A', func, iline); if (PCI_INTERRUPT_VALID(iline)) - return (iline); + return iline; } - return (PCI_INVALID_IRQ); + return PCI_INVALID_IRQ; } /* @@ -658,8 +658,8 @@ acpi_pci_link_lookup(struct acpi_pci_lin for (i = 0; i < sc->pl_num_links; i++) if (sc->pl_links[i].l_res_index == source_index) - return (>pl_links[i]); - return (NULL); + return >pl_links[i]; + return NULL; } void @@ -749,7 +749,7 @@ acpi_pci_link_srs_from_crs(struct acpi_p if (ACPI_FAILURE(status)) { aprint_verbose("%s: Unable to fetch current resources: %s\n", sc->pl_name, AcpiFormatException(status)); - return (status); + return status; } /* Fill in IRQ resources via link structures. */ @@ -811,7 +811,7 @@ acpi_pci_link_srs_from_crs(struct acpi_p if (res >= end) break; } - return (AE_OK); + return AE_OK; } static ACPI_STATUS @@ -868,10 +868,10 @@ acpi_pci_link_srs_from_links(struct acpi sc->pl_name, AcpiFormatException(status)); if (srsbuf->Pointer != NULL) ACPI_FREE(srsbuf->Pointer); - return (status); + return status; } } - return (AE_OK); + return AE_OK; } static ACPI_STATUS @@ -906,7 +906,7 @@ acpi_pci_link_route_irqs(struct acpi_pci if (ACPI_FAILURE(status)) { printf("%s: _SRS failed: %s\n", sc->pl_name, AcpiFormatException(status)); - return
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: skrll Date: Mon Dec 20 12:01:01 UTC 2021 Modified Files: src/sys/dev/acpi: acpi_pci_link.c Log Message: KNF. Same binary before and after. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/acpi/acpi_pci_link.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/dwc2/conf
Module Name:src Committed By: simonb Date: Mon Dec 20 11:54:33 UTC 2021 Modified Files: src/sys/external/bsd/dwc2/conf: files.dwc2 Log Message: Explicitly use -I$S/external/bsd/dwc2/dist for dwc2 instead of possibly getting that include path via DRM. Fixes evbmips cavium kernel build. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/dwc2/conf/files.dwc2 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/dwc2/conf/files.dwc2 diff -u src/sys/external/bsd/dwc2/conf/files.dwc2:1.3 src/sys/external/bsd/dwc2/conf/files.dwc2:1.4 --- src/sys/external/bsd/dwc2/conf/files.dwc2:1.3 Wed Feb 24 22:17:54 2016 +++ src/sys/external/bsd/dwc2/conf/files.dwc2 Mon Dec 20 11:54:32 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.dwc2,v 1.3 2016/02/24 22:17:54 skrll Exp $ +# $NetBSD: files.dwc2,v 1.4 2021/12/20 11:54:32 simonb Exp $ # DesignWare HS OTG Controller # @@ -6,7 +6,9 @@ device dwctwo: usbus, usbroothub, usb_dma, linux file external/bsd/dwc2/dwc2.c dwctwo needs-flag -makeoptions dwctwo CPPFLAGS+="-I$S/external/bsd -I$S/external/bsd/dwc2/dist" +makeoptions dwctwo CPPFLAGS+="-I$S/external/bsd" +makeoptions dwctwo CPPFLAGS+="-I$S/external/bsd/common/include" +makeoptions dwctwo CPPFLAGS+="-I$S/external/bsd/dwc2/dist" file external/bsd/dwc2/dist/dwc2_core.c dwctwo file external/bsd/dwc2/dist/dwc2_coreintr.c dwctwo
CVS commit: src/sys/external/bsd/dwc2/conf
Module Name:src Committed By: simonb Date: Mon Dec 20 11:54:33 UTC 2021 Modified Files: src/sys/external/bsd/dwc2/conf: files.dwc2 Log Message: Explicitly use -I$S/external/bsd/dwc2/dist for dwc2 instead of possibly getting that include path via DRM. Fixes evbmips cavium kernel build. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/dwc2/conf/files.dwc2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: skrll Date: Mon Dec 20 11:17:40 UTC 2021 Modified Files: src/sys/dev/acpi: acpi.c acpi_pci.c acpi_util.c acpi_verbose.c acpi_wakedev.c acpivar.h Log Message: Fix struct member prefix to be consistent. same code before and after. To generate a diff of this commit: cvs rdiff -u -r1.293 -r1.294 src/sys/dev/acpi/acpi.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/acpi/acpi_pci.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/acpi/acpi_util.c cvs rdiff -u -r1.19 -r1.20 src/sys/dev/acpi/acpi_verbose.c cvs rdiff -u -r1.27 -r1.28 src/sys/dev/acpi/acpi_wakedev.c cvs rdiff -u -r1.87 -r1.88 src/sys/dev/acpi/acpivar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi.c diff -u src/sys/dev/acpi/acpi.c:1.293 src/sys/dev/acpi/acpi.c:1.294 --- src/sys/dev/acpi/acpi.c:1.293 Sat Aug 7 16:19:09 2021 +++ src/sys/dev/acpi/acpi.c Mon Dec 20 11:17:40 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.293 2021/08/07 16:19:09 thorpej Exp $ */ +/* $NetBSD: acpi.c,v 1.294 2021/12/20 11:17:40 skrll Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -100,7 +100,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.293 2021/08/07 16:19:09 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.294 2021/12/20 11:17:40 skrll Exp $"); #include "pci.h" #include "opt_acpi.h" @@ -471,7 +471,7 @@ acpi_attach(device_t parent, device_t se sc->sc_dmat = aa->aa_dmat; sc->sc_dmat64 = aa->aa_dmat64; - SIMPLEQ_INIT(>ad_head); + SIMPLEQ_INIT(>sc_head); acpi_softc = sc; @@ -635,7 +635,7 @@ acpi_childdet(device_t self, device_t ch if (sc->sc_wdrt == child) sc->sc_wdrt = NULL; - SIMPLEQ_FOREACH(ad, >ad_head, ad_list) { + SIMPLEQ_FOREACH(ad, >sc_head, ad_list) { if (ad->ad_device == child) ad->ad_device = NULL; @@ -730,12 +730,13 @@ acpi_config_tree(struct acpi_softc *sc) (void)config_defer(sc->sc_dev, acpi_rescan_capabilities); } +// XXXNH? static void acpi_config_dma(struct acpi_softc *sc) { struct acpi_devnode *ad; - SIMPLEQ_FOREACH(ad, >ad_head, ad_list) { + SIMPLEQ_FOREACH(ad, >sc_head, ad_list) { if (ad->ad_device != NULL) continue; @@ -801,7 +802,7 @@ acpi_make_devnode(ACPI_HANDLE handle, ui acpi_wakedev_init(ad); SIMPLEQ_INIT(>ad_child_head); - SIMPLEQ_INSERT_TAIL(>ad_head, ad, ad_list); + SIMPLEQ_INSERT_TAIL(>sc_head, ad, ad_list); if (ad->ad_parent != NULL) { @@ -934,7 +935,7 @@ acpi_rescan_early(struct acpi_softc *sc) * We want these devices to attach regardless of * the device status and other restrictions. */ - SIMPLEQ_FOREACH(ad, >ad_head, ad_list) { + SIMPLEQ_FOREACH(ad, >sc_head, ad_list) { if (ad->ad_device != NULL) continue; @@ -972,7 +973,7 @@ acpi_rescan_nodes(struct acpi_softc *sc) struct acpi_devnode *ad; ACPI_DEVICE_INFO *di; - SIMPLEQ_FOREACH(ad, >ad_head, ad_list) { + SIMPLEQ_FOREACH(ad, >sc_head, ad_list) { if (ad->ad_device != NULL) continue; @@ -1039,7 +1040,7 @@ acpi_rescan_capabilities(device_t self) ACPI_HANDLE tmp; ACPI_STATUS rv; - SIMPLEQ_FOREACH(ad, >ad_head, ad_list) { + SIMPLEQ_FOREACH(ad, >sc_head, ad_list) { if (ad->ad_devinfo->Type != ACPI_TYPE_DEVICE) continue; @@ -1183,7 +1184,7 @@ acpi_notify_handler(ACPI_HANDLE handle, * that have registered a handler with us. * The opaque pointer is always the device_t. */ - SIMPLEQ_FOREACH(ad, >ad_head, ad_list) { + SIMPLEQ_FOREACH(ad, >sc_head, ad_list) { if (ad->ad_device == NULL) continue; Index: src/sys/dev/acpi/acpi_pci.c diff -u src/sys/dev/acpi/acpi_pci.c:1.32 src/sys/dev/acpi/acpi_pci.c:1.33 --- src/sys/dev/acpi/acpi_pci.c:1.32 Wed Sep 15 17:33:08 2021 +++ src/sys/dev/acpi/acpi_pci.c Mon Dec 20 11:17:40 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_pci.c,v 1.32 2021/09/15 17:33:08 thorpej Exp $ */ +/* $NetBSD: acpi_pci.c,v 1.33 2021/12/20 11:17:40 skrll Exp $ */ /* * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_pci.c,v 1.32 2021/09/15 17:33:08 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_pci.c,v 1.33 2021/12/20 11:17:40 skrll Exp $"); #include #include @@ -379,7 +379,7 @@ acpi_pcidev_find(uint16_t segment, uint1 if (sc == NULL) return NULL; - SIMPLEQ_FOREACH(ad, >ad_head, ad_list) { + SIMPLEQ_FOREACH(ad, >sc_head, ad_list) { if (ad->ad_pciinfo != NULL && (ad->ad_pciinfo->ap_flags & ACPI_PCI_INFO_DEVICE) && @@ -427,7 +427,7 @@ acpi_pciroot_find(uint16_t segment, uint if (sc == NULL) return NULL; - SIMPLEQ_FOREACH(ad, >ad_head, ad_list) { + SIMPLEQ_FOREACH(ad, >sc_head, ad_list) { if (ad->ad_pciinfo != NULL && (ad->ad_pciinfo->ap_flags & ACPI_PCI_INFO_BRIDGE) && Index: src/sys/dev/acpi/acpi_util.c diff -u src/sys/dev/acpi/acpi_util.c:1.26 src/sys/dev/acpi/acpi_util.c:1.27 --- src/sys/dev/acpi/acpi_util.c:1.26 Wed
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: skrll Date: Mon Dec 20 11:17:40 UTC 2021 Modified Files: src/sys/dev/acpi: acpi.c acpi_pci.c acpi_util.c acpi_verbose.c acpi_wakedev.c acpivar.h Log Message: Fix struct member prefix to be consistent. same code before and after. To generate a diff of this commit: cvs rdiff -u -r1.293 -r1.294 src/sys/dev/acpi/acpi.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/acpi/acpi_pci.c cvs rdiff -u -r1.26 -r1.27 src/sys/dev/acpi/acpi_util.c cvs rdiff -u -r1.19 -r1.20 src/sys/dev/acpi/acpi_verbose.c cvs rdiff -u -r1.27 -r1.28 src/sys/dev/acpi/acpi_wakedev.c cvs rdiff -u -r1.87 -r1.88 src/sys/dev/acpi/acpivar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.