CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: skrll Date: Wed Jun 1 06:18:04 UTC 2022 Modified Files: src/sys/arch/hppa/include: asm.h Log Message: delay slot indentation To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hppa/include/asm.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/hppa/include/asm.h diff -u src/sys/arch/hppa/include/asm.h:1.17 src/sys/arch/hppa/include/asm.h:1.18 --- src/sys/arch/hppa/include/asm.h:1.17 Fri Apr 17 14:19:43 2020 +++ src/sys/arch/hppa/include/asm.h Wed Jun 1 06:18:04 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.17 2020/04/17 14:19:43 joerg Exp $ */ +/* $NetBSD: asm.h,v 1.18 2022/06/01 06:18:04 skrll Exp $ */ /* $OpenBSD: asm.h,v 1.12 2001/03/29 02:15:57 mickey Exp $ */ @@ -68,7 +68,7 @@ ldo HPPA_FRAME_SIZE(%sp), %sp !\ copy %rp, %arg0 !\ bl 2f, %arg1 !\ - depi 0, 31, 2, %arg1 !\ + depi 0, 31, 2, %arg1 !\ 2: !\ bl _mcount, %rp !\ ldo 1b - 2b(%arg1), %arg1 !\
CVS commit: src/sys/arch/hppa/include
Module Name:src Committed By: skrll Date: Wed Jun 1 06:18:04 UTC 2022 Modified Files: src/sys/arch/hppa/include: asm.h Log Message: delay slot indentation To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hppa/include/asm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/macppc/dev
Module Name:src Committed By: martin Date: Wed Jun 1 06:05:47 UTC 2022 Modified Files: src/sys/arch/macppc/dev: snapper.c Log Message: Revert previous, the mask is intented to be like sc_output_mask, a bitmask of active ports. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/arch/macppc/dev/snapper.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/macppc/dev
Module Name:src Committed By: martin Date: Wed Jun 1 06:05:47 UTC 2022 Modified Files: src/sys/arch/macppc/dev: snapper.c Log Message: Revert previous, the mask is intented to be like sc_output_mask, a bitmask of active ports. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/arch/macppc/dev/snapper.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/macppc/dev/snapper.c diff -u src/sys/arch/macppc/dev/snapper.c:1.63 src/sys/arch/macppc/dev/snapper.c:1.64 --- src/sys/arch/macppc/dev/snapper.c:1.63 Wed Jun 1 05:47:37 2022 +++ src/sys/arch/macppc/dev/snapper.c Wed Jun 1 06:05:47 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: snapper.c,v 1.63 2022/06/01 05:47:37 martin Exp $ */ +/* $NetBSD: snapper.c,v 1.64 2022/06/01 06:05:47 martin Exp $ */ /* Id: snapper.c,v 1.11 2002/10/31 17:42:13 tsubai Exp */ /* Id: i2s.c,v 1.12 2005/01/15 14:32:35 tsubai Exp */ @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.63 2022/06/01 05:47:37 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.64 2022/06/01 06:05:47 martin Exp $"); #include #include @@ -1274,11 +1274,11 @@ snapper_query_devinfo(void *h, mixer_dev dip->prev = dip->next = AUDIO_MIXER_LAST; dip->un.s.num_mem = 3; strcpy(dip->un.s.member[0].label.name, AudioNspeaker); - dip->un.s.member[0].mask = (1 << 1)|(1 << 2); + dip->un.s.member[0].mask = 1 << 0; strcpy(dip->un.s.member[1].label.name, AudioNheadphone); - dip->un.s.member[1].mask = (1 << 0)|(1 << 2); + dip->un.s.member[1].mask = 1 << 1; strcpy(dip->un.s.member[2].label.name, AudioNline); - dip->un.s.member[2].mask = (1 << 0)|(1 << 1); + dip->un.s.member[2].mask = 1 << 2; return 0; case SNAPPER_VOL_OUTPUT:
CVS commit: src/sys/arch/macppc/dev
Module Name:src Committed By: martin Date: Wed Jun 1 05:47:37 UTC 2022 Modified Files: src/sys/arch/macppc/dev: snapper.c Log Message: In SNAPPER_OUTPUT_SELECT the "mask" is a bitmap of muted outputs, not active outputs. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/arch/macppc/dev/snapper.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/macppc/dev/snapper.c diff -u src/sys/arch/macppc/dev/snapper.c:1.62 src/sys/arch/macppc/dev/snapper.c:1.63 --- src/sys/arch/macppc/dev/snapper.c:1.62 Wed Jun 1 05:42:52 2022 +++ src/sys/arch/macppc/dev/snapper.c Wed Jun 1 05:47:37 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: snapper.c,v 1.62 2022/06/01 05:42:52 martin Exp $ */ +/* $NetBSD: snapper.c,v 1.63 2022/06/01 05:47:37 martin Exp $ */ /* Id: snapper.c,v 1.11 2002/10/31 17:42:13 tsubai Exp */ /* Id: i2s.c,v 1.12 2005/01/15 14:32:35 tsubai Exp */ @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.62 2022/06/01 05:42:52 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.63 2022/06/01 05:47:37 martin Exp $"); #include #include @@ -1274,11 +1274,11 @@ snapper_query_devinfo(void *h, mixer_dev dip->prev = dip->next = AUDIO_MIXER_LAST; dip->un.s.num_mem = 3; strcpy(dip->un.s.member[0].label.name, AudioNspeaker); - dip->un.s.member[0].mask = 1 << 0; + dip->un.s.member[0].mask = (1 << 1)|(1 << 2); strcpy(dip->un.s.member[1].label.name, AudioNheadphone); - dip->un.s.member[1].mask = 1 << 1; + dip->un.s.member[1].mask = (1 << 0)|(1 << 2); strcpy(dip->un.s.member[2].label.name, AudioNline); - dip->un.s.member[2].mask = 1 << 2; + dip->un.s.member[2].mask = (1 << 0)|(1 << 1); return 0; case SNAPPER_VOL_OUTPUT:
CVS commit: src/sys/arch/macppc/dev
Module Name:src Committed By: martin Date: Wed Jun 1 05:47:37 UTC 2022 Modified Files: src/sys/arch/macppc/dev: snapper.c Log Message: In SNAPPER_OUTPUT_SELECT the "mask" is a bitmap of muted outputs, not active outputs. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/arch/macppc/dev/snapper.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/macppc/dev
Module Name:src Committed By: martin Date: Wed Jun 1 05:42:52 UTC 2022 Modified Files: src/sys/arch/macppc/dev: snapper.c Log Message: Recognize the OF labels used for line output and headphone output on a G5 powermac 7,3. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/arch/macppc/dev/snapper.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/macppc/dev/snapper.c diff -u src/sys/arch/macppc/dev/snapper.c:1.61 src/sys/arch/macppc/dev/snapper.c:1.62 --- src/sys/arch/macppc/dev/snapper.c:1.61 Sat Aug 7 16:18:58 2021 +++ src/sys/arch/macppc/dev/snapper.c Wed Jun 1 05:42:52 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: snapper.c,v 1.61 2021/08/07 16:18:58 thorpej Exp $ */ +/* $NetBSD: snapper.c,v 1.62 2022/06/01 05:42:52 martin Exp $ */ /* Id: snapper.c,v 1.11 2002/10/31 17:42:13 tsubai Exp */ /* Id: i2s.c,v 1.12 2005/01/15 14:32:35 tsubai Exp */ @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.61 2021/08/07 16:18:58 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.62 2022/06/01 05:42:52 martin Exp $"); #include #include @@ -2200,10 +2200,12 @@ snapper_init(struct snapper_softc *sc, i } } if (strcmp(audio_gpio, "lineout-mute") == 0 || - strcmp(name, "lineout-mute") == 0) + strcmp(name, "lineout-mute") == 0 || + strcmp(name, "line-output-mute") == 0) lineout_mute = addr; if (strcmp(audio_gpio, "lineout-detect") == 0 || - strcmp(name, "lineout-detect") == 0) { + strcmp(name, "lineout-detect") == 0 || + strcmp(name, "line-output-detect") == 0) { uint32_t act = 0; lineout_detect = addr; OF_getprop(gpio, "audio-gpio-active-state", &act, 4);
CVS commit: src/sys/arch/macppc/dev
Module Name:src Committed By: martin Date: Wed Jun 1 05:42:52 UTC 2022 Modified Files: src/sys/arch/macppc/dev: snapper.c Log Message: Recognize the OF labels used for line output and headphone output on a G5 powermac 7,3. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/arch/macppc/dev/snapper.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/ixgbe
Module Name:src Committed By: msaitoh Date: Wed Jun 1 05:06:45 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c Log Message: Correctly enter the recovery mode. Not tested. To generate a diff of this commit: cvs rdiff -u -r1.317 -r1.318 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.317 src/sys/dev/pci/ixgbe/ixgbe.c:1.318 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.317 Wed Jun 1 04:15:41 2022 +++ src/sys/dev/pci/ixgbe/ixgbe.c Wed Jun 1 05:06:45 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.317 2022/06/01 04:15:41 msaitoh Exp $ */ +/* $NetBSD: ixgbe.c,v 1.318 2022/06/01 05:06:45 msaitoh Exp $ */ /** @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.317 2022/06/01 04:15:41 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.318 2022/06/01 05:06:45 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -4742,7 +4742,7 @@ ixgbe_handle_recovery_mode_timer(struct IXGBE_CORE_LOCK(adapter); if (ixgbe_fw_recovery_mode(hw)) { - if (atomic_cas_uint(&adapter->recovery_mode, 0, 1)) { + if (atomic_cas_uint(&adapter->recovery_mode, 0, 1) == 0) { /* Firmware error detected, entering recovery mode */ device_printf(adapter->dev, "Firmware recovery mode detected. Limiting functionality. Refer to the Intel(R) Ethernet Adapters and Devices User Guide for details on firmware recovery mode.\n");
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Wed Jun 1 05:06:45 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c Log Message: Correctly enter the recovery mode. Not tested. To generate a diff of this commit: cvs rdiff -u -r1.317 -r1.318 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe
Module Name:src Committed By: msaitoh Date: Wed Jun 1 04:15:41 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c Log Message: Correctly re-enable queue interrupt in ixgbe_legacy_irq(). - Don't enable queue 1-15 interrupt. - Don't enable queue 0 interrupt when the queue work is being scheduled. - OK'd by knakahara. To generate a diff of this commit: cvs rdiff -u -r1.316 -r1.317 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.316 src/sys/dev/pci/ixgbe/ixgbe.c:1.317 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.316 Wed Jun 1 02:07:24 2022 +++ src/sys/dev/pci/ixgbe/ixgbe.c Wed Jun 1 04:15:41 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.316 2022/06/01 02:07:24 msaitoh Exp $ */ +/* $NetBSD: ixgbe.c,v 1.317 2022/06/01 04:15:41 msaitoh Exp $ */ /** @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.316 2022/06/01 02:07:24 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.317 2022/06/01 04:15:41 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -5320,7 +5320,7 @@ ixgbe_legacy_irq(void *arg) eims_disable |= 1UL << 0; } else - eims_enable |= IXGBE_EIMC_RTX_QUEUE; + eims_enable |= eims_orig & IXGBE_EIMC_RTX_QUEUE; ixgbe_intr_admin_common(adapter, eicr, &eims_disable);
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Wed Jun 1 04:15:41 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c Log Message: Correctly re-enable queue interrupt in ixgbe_legacy_irq(). - Don't enable queue 1-15 interrupt. - Don't enable queue 0 interrupt when the queue work is being scheduled. - OK'd by knakahara. To generate a diff of this commit: cvs rdiff -u -r1.316 -r1.317 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe
Module Name:src Committed By: msaitoh Date: Wed Jun 1 02:07:24 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c Log Message: Simplify ixgbe_msix_que(). No functional change. To generate a diff of this commit: cvs rdiff -u -r1.315 -r1.316 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.315 src/sys/dev/pci/ixgbe/ixgbe.c:1.316 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.315 Mon May 30 05:07:38 2022 +++ src/sys/dev/pci/ixgbe/ixgbe.c Wed Jun 1 02:07:24 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.315 2022/05/30 05:07:38 msaitoh Exp $ */ +/* $NetBSD: ixgbe.c,v 1.316 2022/06/01 02:07:24 msaitoh Exp $ */ /** @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.315 2022/05/30 05:07:38 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.316 2022/06/01 02:07:24 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -2799,7 +2799,6 @@ ixgbe_msix_que(void *arg) struct ifnet *ifp = adapter->ifp; struct tx_ring *txr = que->txr; struct rx_ring *rxr = que->rxr; - bool more; u32 newitr = 0; /* Protect against spurious interrupts */ @@ -2815,13 +2814,6 @@ ixgbe_msix_que(void *arg) */ que->txrx_use_workqueue = adapter->txrx_use_workqueue; -#ifdef __NetBSD__ - /* Don't run ixgbe_rxeof in interrupt context */ - more = true; -#else - more = ixgbe_rxeof(que); -#endif - IXGBE_TX_LOCK(txr); ixgbe_txeof(txr); IXGBE_TX_UNLOCK(txr); @@ -2882,10 +2874,7 @@ ixgbe_msix_que(void *arg) rxr->packets = 0; no_calc: - if (more) - ixgbe_sched_handle_que(adapter, que); - else - ixgbe_enable_queue(adapter, que->msix); + ixgbe_sched_handle_que(adapter, que); return 1; } /* ixgbe_msix_que */
CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Wed Jun 1 02:07:24 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c Log Message: Simplify ixgbe_msix_que(). No functional change. To generate a diff of this commit: cvs rdiff -u -r1.315 -r1.316 src/sys/dev/pci/ixgbe/ixgbe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/modules/acpiverbose
Module Name:src Committed By: mrg Date: Wed Jun 1 00:50:24 UTC 2022 Added Files: src/sys/modules/acpiverbose: pci.h Log Message: add now required pci.h / NPCI. (the ia64 version builds with PCI enabled, but i guess it won't be usable.) XXX: enable this on evbarm*? it is x86/ia64 only currently. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/modules/acpiverbose/pci.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/modules/acpiverbose
Module Name:src Committed By: mrg Date: Wed Jun 1 00:50:24 UTC 2022 Added Files: src/sys/modules/acpiverbose: pci.h Log Message: add now required pci.h / NPCI. (the ia64 version builds with PCI enabled, but i guess it won't be usable.) XXX: enable this on evbarm*? it is x86/ia64 only currently. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/modules/acpiverbose/pci.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/modules/acpiverbose/pci.h diff -u /dev/null src/sys/modules/acpiverbose/pci.h:1.1 --- /dev/null Wed Jun 1 00:50:24 2022 +++ src/sys/modules/acpiverbose/pci.h Wed Jun 1 00:50:24 2022 @@ -0,0 +1 @@ +#define NPCI 1
CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu
Module Name:src Committed By: mrg Date: Tue May 31 20:53:35 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu: nouveau_nvkm_subdev_mmu_mem.c Log Message: reorganise most of the NetBSD portion of nvkm_mem_dtor(). when nvkm_mem_new_host() is called via the in-kernel ioctl method, we copy the supplied dmamap, use it's dm_nsegs value for allocation of "mem->dma", and assume it remains valid until we're done. when this path is taken "mem->mem" remains NULL so all the code in nvkm_mem_dtor() is ignored, and the "mem->dma" is leaked. this is one leak seen in PR#56826. as "dmamap->dm_nsegs" can become invalid before the dtor call, store the value in "mem->nseg" for use in the dtor, and convert the dtor to free "mem->dma" if "mem->dma" is set. additionally, "mem->pages" should end up being the same value as "nseg" here, ASSERT() this. while here properly mark NetBSD specific code in nvkm_mem_new_host(). additionally, destroy the dmamap created in the non-ioctl path of nvkm_mem_new_host(). this is another leak seen in PR#56826. with both of these fixes my "kmem-04096" pool does not grow rapidly while using "mpv -vo gpu". infact, once i loaded the relevant file into memory, this pool remains stable after at least one minute of video playback. ok riastradh@ To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_mem.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/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_mem.c diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_mem.c:1.7 src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_mem.c:1.8 --- src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_mem.c:1.7 Sun Dec 19 11:06:44 2021 +++ src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_mem.c Tue May 31 20:53:35 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_nvkm_subdev_mmu_mem.c,v 1.7 2021/12/19 11:06:44 riastradh Exp $ */ +/* $NetBSD: nouveau_nvkm_subdev_mmu_mem.c,v 1.8 2022/05/31 20:53:35 mrg Exp $ */ /* * Copyright 2017 Red Hat Inc. @@ -22,7 +22,7 @@ * OTHER DEALINGS IN THE SOFTWARE. */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_mmu_mem.c,v 1.7 2021/12/19 11:06:44 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_mmu_mem.c,v 1.8 2022/05/31 20:53:35 mrg Exp $"); #define nvkm_mem(p) container_of((p), struct nvkm_mem, memory) #include "mem.h" @@ -97,16 +97,21 @@ static void * nvkm_mem_dtor(struct nvkm_memory *memory) { struct nvkm_mem *mem = nvkm_mem(memory); - if (mem->mem) { #ifdef __NetBSD__ + if (mem->dma) { + kmem_free(mem->dma, mem->nseg * sizeof(mem->dma[0])); + } + if (mem->mem) { struct nvkm_device *device = mem->mmu->subdev.device; bus_dma_tag_t dmat = device->func->dma_tag(device); - kmem_free(mem->dma, - mem->dmamap->dm_nsegs * sizeof(mem->dma[0])); + bus_dmamap_unload(dmat, mem->dmamap); bus_dmamem_free(dmat, mem->mem, mem->nseg); + bus_dmamap_destroy(dmat, mem->dmamap); kmem_free(mem->mem, mem->pages * sizeof(mem->mem[0])); + } #else + if (mem->mem) { while (mem->pages--) { dma_unmap_page(mem->mmu->subdev.device->dev, mem->dma[mem->pages], PAGE_SIZE, @@ -115,8 +120,8 @@ nvkm_mem_dtor(struct nvkm_memory *memory } kvfree(mem->dma); kvfree(mem->mem); -#endif } +#endif return mem; } @@ -218,7 +223,11 @@ nvkm_mem_new_host(struct nvkm_mmu *mmu, if (!(ret = nvif_unpack(ret, &argv, &argc, args->v0, 0, 0, false))) { if (args->v0.dma) { nvkm_memory_ctor(&nvkm_mem_dma, &mem->memory); +#ifndef __NetBSD__ + mem->dma = args->v0.dma; +#else mem->dmamap = args->v0.dma; + mem->nseg = mem->dmamap->dm_nsegs; mem->dma = kmem_zalloc(mem->dmamap->dm_nsegs * sizeof(mem->dma[0]), KM_SLEEP); for (unsigned i = 0; i < mem->dmamap->dm_nsegs; i++) { @@ -226,6 +235,7 @@ nvkm_mem_new_host(struct nvkm_mmu *mmu, PAGE_SIZE); mem->dma[i] = mem->dmamap->dm_segs[i].ds_addr; } +#endif } else { #ifdef __NetBSD__ return -ENODEV; @@ -238,6 +248,9 @@ nvkm_mem_new_host(struct nvkm_mmu *mmu, if (!IS_ALIGNED(size, PAGE_SIZE)) return -EINVAL; mem->pages = size >> PAGE_SHIFT; +#ifdef __NetBSD__ + KASSERT(mem->pages == mem->nseg); +#endif return 0; } else if ( (ret = nvif_unvers(ret, &argv, &argc, args->vn))) { @@ -283,6 +296,7 @@ fail2: __unused mem->dma[i] = mem->dmamap->dm_segs[i].ds_addr; } mem->pages = size; + KASSERT(mem->pages == mem->nseg); #else if (!(mem->mem = kvmalloc_array(size, sizeof(*mem->mem), GFP_KERNEL))) return -ENOMEM;
CVS commit: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu
Module Name:src Committed By: mrg Date: Tue May 31 20:53:35 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu: nouveau_nvkm_subdev_mmu_mem.c Log Message: reorganise most of the NetBSD portion of nvkm_mem_dtor(). when nvkm_mem_new_host() is called via the in-kernel ioctl method, we copy the supplied dmamap, use it's dm_nsegs value for allocation of "mem->dma", and assume it remains valid until we're done. when this path is taken "mem->mem" remains NULL so all the code in nvkm_mem_dtor() is ignored, and the "mem->dma" is leaked. this is one leak seen in PR#56826. as "dmamap->dm_nsegs" can become invalid before the dtor call, store the value in "mem->nseg" for use in the dtor, and convert the dtor to free "mem->dma" if "mem->dma" is set. additionally, "mem->pages" should end up being the same value as "nseg" here, ASSERT() this. while here properly mark NetBSD specific code in nvkm_mem_new_host(). additionally, destroy the dmamap created in the non-ioctl path of nvkm_mem_new_host(). this is another leak seen in PR#56826. with both of these fixes my "kmem-04096" pool does not grow rapidly while using "mpv -vo gpu". infact, once i loaded the relevant file into memory, this pool remains stable after at least one minute of video playback. ok riastradh@ To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_mem.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/acpi
Module Name:src Committed By: mrg Date: Tue May 31 20:28:57 UTC 2022 Modified Files: src/sys/dev/acpi: acpi.c acpi_power.c acpi_verbose.c acpi_wakedev.c src/sys/dev/acpi/acpica: OsdHardware.c Log Message: allow ACPI to compile without PCI support. fixes ia64 build. To generate a diff of this commit: cvs rdiff -u -r1.297 -r1.298 src/sys/dev/acpi/acpi.c cvs rdiff -u -r1.35 -r1.36 src/sys/dev/acpi/acpi_power.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/acpi/acpi_verbose.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/acpi/acpi_wakedev.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/acpi/acpica/OsdHardware.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/acpi
Module Name:src Committed By: mrg Date: Tue May 31 20:28:57 UTC 2022 Modified Files: src/sys/dev/acpi: acpi.c acpi_power.c acpi_verbose.c acpi_wakedev.c src/sys/dev/acpi/acpica: OsdHardware.c Log Message: allow ACPI to compile without PCI support. fixes ia64 build. To generate a diff of this commit: cvs rdiff -u -r1.297 -r1.298 src/sys/dev/acpi/acpi.c cvs rdiff -u -r1.35 -r1.36 src/sys/dev/acpi/acpi_power.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/acpi/acpi_verbose.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/acpi/acpi_wakedev.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/acpi/acpica/OsdHardware.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.c diff -u src/sys/dev/acpi/acpi.c:1.297 src/sys/dev/acpi/acpi.c:1.298 --- src/sys/dev/acpi/acpi.c:1.297 Sun Feb 27 21:22:09 2022 +++ src/sys/dev/acpi/acpi.c Tue May 31 20:28:57 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.297 2022/02/27 21:22:09 riastradh Exp $ */ +/* $NetBSD: acpi.c,v 1.298 2022/05/31 20:28:57 mrg Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -100,7 +100,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.297 2022/02/27 21:22:09 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.298 2022/05/31 20:28:57 mrg Exp $"); #include "pci.h" #include "opt_acpi.h" @@ -698,10 +698,12 @@ acpi_build_tree(struct acpi_softc *sc) (void)AcpiWalkNamespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, UINT32_MAX, acpi_make_devnode, acpi_make_devnode_post, &awc, NULL); +#if NPCI > 0 /* * Scan the internal namespace. */ (void)acpi_pcidev_scan(sc->sc_root); +#endif } static void Index: src/sys/dev/acpi/acpi_power.c diff -u src/sys/dev/acpi/acpi_power.c:1.35 src/sys/dev/acpi/acpi_power.c:1.36 --- src/sys/dev/acpi/acpi_power.c:1.35 Thu Jun 1 02:45:09 2017 +++ src/sys/dev/acpi/acpi_power.c Tue May 31 20:28:57 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_power.c,v 1.35 2017/06/01 02:45:09 chs Exp $ */ +/* $NetBSD: acpi_power.c,v 1.36 2022/05/31 20:28:57 mrg Exp $ */ /*- * Copyright (c) 2009, 2010, 2011 The NetBSD Foundation, Inc. @@ -56,7 +56,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_power.c,v 1.35 2017/06/01 02:45:09 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_power.c,v 1.36 2022/05/31 20:28:57 mrg Exp $"); + +#include "pci.h" #include #include @@ -670,7 +672,6 @@ void acpi_power_add(struct acpi_devnode *ad) { const char *str = NULL; - device_t dev; int err; KASSERT(ad != NULL && ad->ad_root != NULL); @@ -682,12 +683,14 @@ acpi_power_add(struct acpi_devnode *ad) if (ad->ad_device != NULL) str = device_xname(ad->ad_device); +#if NPCI > 0 else { - dev = acpi_pcidev_find_dev(ad); + device_t dev = acpi_pcidev_find_dev(ad); if (dev != NULL) str = device_xname(dev); } +#endif if (str == NULL) return; Index: src/sys/dev/acpi/acpi_verbose.c diff -u src/sys/dev/acpi/acpi_verbose.c:1.20 src/sys/dev/acpi/acpi_verbose.c:1.21 --- src/sys/dev/acpi/acpi_verbose.c:1.20 Mon Dec 20 11:17:40 2021 +++ src/sys/dev/acpi/acpi_verbose.c Tue May 31 20:28:57 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_verbose.c,v 1.20 2021/12/20 11:17:40 skrll Exp $ */ +/* $NetBSD: acpi_verbose.c,v 1.21 2022/05/31 20:28:57 mrg Exp $ */ /*- * Copyright (c) 2003, 2007, 2010 The NetBSD Foundation, Inc. @@ -65,7 +65,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_verbose.c,v 1.20 2021/12/20 11:17:40 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_verbose.c,v 1.21 2022/05/31 20:28:57 mrg Exp $"); + +#include "pci.h" #include #include @@ -515,6 +517,7 @@ acpi_print_tree(struct acpi_devnode *ad, if (ad->ad_device != NULL) aprint_normal(" <%s>", device_xname(ad->ad_device)); +#if NPCI > 0 if (ad->ad_pciinfo != NULL) { aprint_normal(" (PCI)"); @@ -539,6 +542,7 @@ acpi_print_tree(struct acpi_devnode *ad, if (dev != NULL) aprint_normal(" <%s>", device_xname(dev)); } +#endif aprint_normal("\n"); Index: src/sys/dev/acpi/acpi_wakedev.c diff -u src/sys/dev/acpi/acpi_wakedev.c:1.28 src/sys/dev/acpi/acpi_wakedev.c:1.29 --- src/sys/dev/acpi/acpi_wakedev.c:1.28 Mon Dec 20 11:17:40 2021 +++ src/sys/dev/acpi/acpi_wakedev.c Tue May 31 20:28:57 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_wakedev.c,v 1.28 2021/12/20 11:17:40 skrll Exp $ */ +/* $NetBSD: acpi_wakedev.c,v 1.29 2022/05/31 20:28:57 mrg Exp $ */ /*- * Copyright (c) 2009, 2010, 2011 Jared D. McNeill @@ -27,7 +27,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_wakedev.c,v 1.28 2021/12/20 11:17:40 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_wakedev.c,v 1.29 2022/05/31 20:28:57 mrg Exp $"); + +#include "pci.h" #include #include @@ -210,7 +212,6 @@ acpi_wakedev_add(struct acpi_devnode *ad { struct acpi_wakedev *aw; const char *str = NULL; - device_t dev; int err; KASSERT(ad != NULL && ad->ad_wakedev != NULL); @@ -228,12 +229,14 @@ acpi_wakedev_ad
CVS commit: src/doc
Module Name:src Committed By: christos Date: Tue May 31 19:14:10 UTC 2022 Modified Files: src/doc: HACKS Log Message: document gomoku To generate a diff of this commit: cvs rdiff -u -r1.228 -r1.229 src/doc/HACKS Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/HACKS diff -u src/doc/HACKS:1.228 src/doc/HACKS:1.229 --- src/doc/HACKS:1.228 Sun Apr 10 15:54:57 2022 +++ src/doc/HACKS Tue May 31 15:14:10 2022 @@ -1,4 +1,4 @@ -# $NetBSD: HACKS,v 1.228 2022/04/10 19:54:57 rillig Exp $ +# $NetBSD: HACKS,v 1.229 2022/05/31 19:14:10 christos Exp $ # # This file is intended to document workarounds for currently unsolved # (mostly) compiler bugs. @@ -583,6 +583,15 @@ port vax Besides, some clients, e.g., pkgsrc/x11/kterm, receive SIGSEGV. kcah + hack gomoku compiler crash + date Tue May 31 15:11:39 EDT 2022 + who christos + file src/games/gomoku/Makefile : 1.12 + descr + pickmove.c crashes with -O2, warns about ovi.o_intersect being + unitialized with -O1, works with -O0 + kcah + port arm hack gcc-unsigned-compare
CVS commit: src/doc
Module Name:src Committed By: christos Date: Tue May 31 19:14:10 UTC 2022 Modified Files: src/doc: HACKS Log Message: document gomoku To generate a diff of this commit: cvs rdiff -u -r1.228 -r1.229 src/doc/HACKS Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/games/gomoku
Module Name:src Committed By: christos Date: Tue May 31 19:11:58 UTC 2022 Modified Files: src/games/gomoku: Makefile Log Message: Elide vax breakage To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/games/gomoku/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/gomoku/Makefile diff -u src/games/gomoku/Makefile:1.11 src/games/gomoku/Makefile:1.12 --- src/games/gomoku/Makefile:1.11 Sun May 29 13:01:42 2022 +++ src/games/gomoku/Makefile Tue May 31 15:11:58 2022 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2022/05/29 17:01:42 rillig Exp $ +# $NetBSD: Makefile,v 1.12 2022/05/31 19:11:58 christos Exp $ # @(#)Makefile 8.1 (Berkeley) 7/24/94 PROG= gomoku @@ -9,6 +9,10 @@ LDADD= -lcurses -lterminfo HIDEGAME=hidegame CPPFLAGS+= ${DEBUG:D-DDEBUG} +.if ${MACHINE} == "vax" +COPTS.pickmove.c += -O0 +.endif + #WARNS= 6 # would produce warnings about small integer types LINTFLAGS+= -w # treat warnings as errors LINTFLAGS+= -T # strict bool mode
CVS commit: src/games/gomoku
Module Name:src Committed By: christos Date: Tue May 31 19:11:58 UTC 2022 Modified Files: src/games/gomoku: Makefile Log Message: Elide vax breakage To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/games/gomoku/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/i386/i386
Module Name:src Committed By: bouyer Date: Tue May 31 18:04:11 UTC 2022 Modified Files: src/sys/arch/i386/i386: locore.S machdep.c Log Message: For some reason on my system, the guest starts with a pending event in the shared structure. On i386, this cause hypervisor_callback to be entered before cpu_info_primary is fully initialised, especially on i386 ci_intrstack is still NULL, which cause a crash when we try to use it. Work around by recycling the boot's tmp stack for this until cpu_attach() is called. To generate a diff of this commit: cvs rdiff -u -r1.187 -r1.188 src/sys/arch/i386/i386/locore.S cvs rdiff -u -r1.834 -r1.835 src/sys/arch/i386/i386/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/i386/locore.S diff -u src/sys/arch/i386/i386/locore.S:1.187 src/sys/arch/i386/i386/locore.S:1.188 --- src/sys/arch/i386/i386/locore.S:1.187 Wed Nov 10 15:59:08 2021 +++ src/sys/arch/i386/i386/locore.S Tue May 31 18:04:11 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.187 2021/11/10 15:59:08 msaitoh Exp $ */ +/* $NetBSD: locore.S,v 1.188 2022/05/31 18:04:11 bouyer Exp $ */ /* * Copyright-o-rama! @@ -128,7 +128,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.187 2021/11/10 15:59:08 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.188 2022/05/31 18:04:11 bouyer Exp $"); #include "opt_copy_symtab.h" #include "opt_ddb.h" @@ -326,6 +326,7 @@ LABEL(PDPpaddr) .long 0 /* paddr of PDP END(PDPpaddr) /* Space for the temporary stack */ + .globl _C_LABEL(tmpstk) .size tmpstk, tmpstk - . .space 512 tmpstk: Index: src/sys/arch/i386/i386/machdep.c diff -u src/sys/arch/i386/i386/machdep.c:1.834 src/sys/arch/i386/i386/machdep.c:1.835 --- src/sys/arch/i386/i386/machdep.c:1.834 Sun Dec 26 21:33:48 2021 +++ src/sys/arch/i386/i386/machdep.c Tue May 31 18:04:11 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.834 2021/12/26 21:33:48 riastradh Exp $ */ +/* $NetBSD: machdep.c,v 1.835 2022/05/31 18:04:11 bouyer Exp $ */ /* * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009, 2017 @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.834 2021/12/26 21:33:48 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.835 2022/05/31 18:04:11 bouyer Exp $"); #include "opt_beep.h" #include "opt_compat_freebsd.h" @@ -1423,6 +1423,8 @@ init386(paddr_t first_avail) #endif #ifdef XENPV + extern int tmpstk; + cpu_info_primary.ci_intrstack = &tmpstk; events_default_setup(); #else intr_default_setup();
CVS commit: src/sys/arch/i386/i386
Module Name:src Committed By: bouyer Date: Tue May 31 18:04:11 UTC 2022 Modified Files: src/sys/arch/i386/i386: locore.S machdep.c Log Message: For some reason on my system, the guest starts with a pending event in the shared structure. On i386, this cause hypervisor_callback to be entered before cpu_info_primary is fully initialised, especially on i386 ci_intrstack is still NULL, which cause a crash when we try to use it. Work around by recycling the boot's tmp stack for this until cpu_attach() is called. To generate a diff of this commit: cvs rdiff -u -r1.187 -r1.188 src/sys/arch/i386/i386/locore.S cvs rdiff -u -r1.834 -r1.835 src/sys/arch/i386/i386/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/xen/x86
Module Name:src Committed By: bouyer Date: Tue May 31 18:01:22 UTC 2022 Modified Files: src/sys/arch/xen/x86: hypervisor_machdep.c Log Message: When we have pending events in stipending(), evt_set_pending() has to set the ih_pending flag for each handler too. Xen/i386 should be stable again. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/xen/x86/hypervisor_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/xen/x86/hypervisor_machdep.c diff -u src/sys/arch/xen/x86/hypervisor_machdep.c:1.42 src/sys/arch/xen/x86/hypervisor_machdep.c:1.43 --- src/sys/arch/xen/x86/hypervisor_machdep.c:1.42 Tue May 31 14:21:44 2022 +++ src/sys/arch/xen/x86/hypervisor_machdep.c Tue May 31 18:01:22 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: hypervisor_machdep.c,v 1.42 2022/05/31 14:21:44 bouyer Exp $ */ +/* $NetBSD: hypervisor_machdep.c,v 1.43 2022/05/31 18:01:22 bouyer Exp $ */ /* * @@ -54,7 +54,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.42 2022/05/31 14:21:44 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.43 2022/05/31 18:01:22 bouyer Exp $"); #include #include @@ -159,10 +159,17 @@ evt_set_pending(unsigned int port, unsig KASSERT(args != NULL); int *ret = args; + struct intrhand *ih; if (evtsource[port]) { hypervisor_set_ipending(evtsource[port]->ev_imask, l1i, l2i); evtsource[port]->ev_evcnt.ev_count++; + ih = evtsource[port]->ev_handlers; + while (ih != NULL) { + ih->ih_pending++; + ih = ih->ih_evt_next; + } + if (*ret == 0 && curcpu()->ci_ilevel < evtsource[port]->ev_maxlevel) *ret = 1;
CVS commit: src/sys/arch/xen/x86
Module Name:src Committed By: bouyer Date: Tue May 31 18:01:22 UTC 2022 Modified Files: src/sys/arch/xen/x86: hypervisor_machdep.c Log Message: When we have pending events in stipending(), evt_set_pending() has to set the ih_pending flag for each handler too. Xen/i386 should be stable again. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/xen/x86/hypervisor_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/lgpl3/gmp/dist
Module Name:src Committed By: christos Date: Tue May 31 17:52:35 UTC 2022 Modified Files: src/external/lgpl3/gmp/dist: longlong.h Log Message: fix lint build on vax To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/lgpl3/gmp/dist/longlong.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/lgpl3/gmp/dist
Module Name:src Committed By: christos Date: Tue May 31 17:52:35 UTC 2022 Modified Files: src/external/lgpl3/gmp/dist: longlong.h Log Message: fix lint build on vax To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/external/lgpl3/gmp/dist/longlong.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/lgpl3/gmp/dist/longlong.h diff -u src/external/lgpl3/gmp/dist/longlong.h:1.5 src/external/lgpl3/gmp/dist/longlong.h:1.6 --- src/external/lgpl3/gmp/dist/longlong.h:1.5 Sun Jul 11 17:15:45 2021 +++ src/external/lgpl3/gmp/dist/longlong.h Tue May 31 13:52:35 2022 @@ -371,7 +371,7 @@ long __MPN(count_leading_zeros) (UDItype #endif -#if defined (__GNUC__) +#if defined (__GNUC__) || defined(__lint__) /* We sometimes need to clobber "cc" with gcc2, but that would not be understood by gcc1. Use cpp to avoid major code duplication. */
CVS commit: src/sys/arch/atari/atari
Module Name:src Committed By: tsutsui Date: Tue May 31 15:24:59 UTC 2022 Modified Files: src/sys/arch/atari/atari: stalloc.c Log Message: Restore NULL pointer checks lost in rev 1.16. Fixes PR port-atari/56859, ok'ed mlelstv@, and confirmed on TT030. Should be pulled up to netbsd-9 and netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/atari/atari/stalloc.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/atari/atari/stalloc.c diff -u src/sys/arch/atari/atari/stalloc.c:1.16 src/sys/arch/atari/atari/stalloc.c:1.17 --- src/sys/arch/atari/atari/stalloc.c:1.16 Fri Jan 3 07:14:20 2014 +++ src/sys/arch/atari/atari/stalloc.c Tue May 31 15:24:59 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: stalloc.c,v 1.16 2014/01/03 07:14:20 mlelstv Exp $ */ +/* $NetBSD: stalloc.c,v 1.17 2022/05/31 15:24:59 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman (Atari modifications) @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: stalloc.c,v 1.16 2014/01/03 07:14:20 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: stalloc.c,v 1.17 2022/05/31 15:24:59 tsutsui Exp $"); #include #include @@ -163,7 +163,7 @@ free_stmem(void *mem) /* * check ahead of us. */ - if (next->type == MNODE_FREE) { + if (next != NULL && next->type == MNODE_FREE) { /* * if next is: a valid node and a free node. ==> merge */ @@ -174,7 +174,7 @@ free_stmem(void *mem) stmem_total += mn->size + sizeof(struct mem_node); mn->size += next->size + sizeof(struct mem_node); } - if (prev->type == MNODE_FREE) { + if (prev != NULL && prev->type == MNODE_FREE) { /* * if prev is: a valid node and a free node. ==> merge */
CVS commit: src/sys/arch/atari/atari
Module Name:src Committed By: tsutsui Date: Tue May 31 15:24:59 UTC 2022 Modified Files: src/sys/arch/atari/atari: stalloc.c Log Message: Restore NULL pointer checks lost in rev 1.16. Fixes PR port-atari/56859, ok'ed mlelstv@, and confirmed on TT030. Should be pulled up to netbsd-9 and netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/atari/atari/stalloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libpthread
Module Name:src Committed By: riastradh Date: Tue May 31 14:23:39 UTC 2022 Modified Files: src/lib/libpthread: pthread.c Log Message: libpthread(3): Fix a marvellous interaction with rtld. Patch from chs@. Comment explaining the story by me. This patch may not be optimal -- maybe it would be better in pthread__init, or better for rtld to call _lwp_unpark after _lwp_park in the contened case -- but we've tested this version and it's annoying to reproduce, so let's take this version and worry about testing improvements later. To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.181 src/lib/libpthread/pthread.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libpthread/pthread.c diff -u src/lib/libpthread/pthread.c:1.180 src/lib/libpthread/pthread.c:1.181 --- src/lib/libpthread/pthread.c:1.180 Sat Feb 12 14:59:32 2022 +++ src/lib/libpthread/pthread.c Tue May 31 14:23:39 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread.c,v 1.180 2022/02/12 14:59:32 riastradh Exp $ */ +/* $NetBSD: pthread.c,v 1.181 2022/05/31 14:23:39 riastradh Exp $ */ /*- * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008, 2020 @@ -31,7 +31,7 @@ */ #include -__RCSID("$NetBSD: pthread.c,v 1.180 2022/02/12 14:59:32 riastradh Exp $"); +__RCSID("$NetBSD: pthread.c,v 1.181 2022/05/31 14:23:39 riastradh Exp $"); #define __EXPOSE_STACK 1 @@ -414,6 +414,34 @@ pthread_create(pthread_t *thread, const else return EINVAL; + if (!pthread__started) { + /* + * Force the _lwp_park symbol to be resolved before we + * begin any activity that might rely on concurrent + * wakeups. + * + * This is necessary because rtld itself uses _lwp_park + * and _lwp_unpark internally for its own locking: If + * we wait to resolve _lwp_park until there is an + * _lwp_unpark from another thread pending in the + * current lwp (for example, pthread_mutex_unlock or + * pthread_cond_signal), rtld's internal use of + * _lwp_park might consume the pending unpark. The + * result is a deadlock where libpthread and rtld have + * both correctly used _lwp_park and _lwp_unpark for + * themselves, but rtld has consumed the wakeup meant + * for libpthread so it is lost to libpthread. + * + * For the very first thread, before pthread__started + * is set to true, pthread__self()->pt_lid should have + * been initialized in pthread__init by the time we get + * here to the correct lid so we go to sleep and wake + * ourselves at the same time as a no-op. + */ + _lwp_park(CLOCK_REALTIME, 0, NULL, pthread__self()->pt_lid, + NULL, NULL); + } + pthread__started = 1; /* Fetch misc. attributes from the attr structure. */
CVS commit: src/lib/libpthread
Module Name:src Committed By: riastradh Date: Tue May 31 14:23:39 UTC 2022 Modified Files: src/lib/libpthread: pthread.c Log Message: libpthread(3): Fix a marvellous interaction with rtld. Patch from chs@. Comment explaining the story by me. This patch may not be optimal -- maybe it would be better in pthread__init, or better for rtld to call _lwp_unpark after _lwp_park in the contened case -- but we've tested this version and it's annoying to reproduce, so let's take this version and worry about testing improvements later. To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.181 src/lib/libpthread/pthread.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/xen/x86
Module Name:src Committed By: bouyer Date: Tue May 31 14:21:44 UTC 2022 Modified Files: src/sys/arch/xen/x86: hypervisor_machdep.c Log Message: Revert previous; evt_set_pending() will set ret to 1 if needed to this was not our bug. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/xen/x86/hypervisor_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/xen/x86/hypervisor_machdep.c diff -u src/sys/arch/xen/x86/hypervisor_machdep.c:1.41 src/sys/arch/xen/x86/hypervisor_machdep.c:1.42 --- src/sys/arch/xen/x86/hypervisor_machdep.c:1.41 Tue May 31 12:52:59 2022 +++ src/sys/arch/xen/x86/hypervisor_machdep.c Tue May 31 14:21:44 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: hypervisor_machdep.c,v 1.41 2022/05/31 12:52:59 bouyer Exp $ */ +/* $NetBSD: hypervisor_machdep.c,v 1.42 2022/05/31 14:21:44 bouyer Exp $ */ /* * @@ -54,7 +54,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.41 2022/05/31 12:52:59 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.42 2022/05/31 14:21:44 bouyer Exp $"); #include #include @@ -208,7 +208,6 @@ stipending(void) */ while (vci->evtchn_upcall_pending) { - ret = 1; x86_disable_intr(); vci->evtchn_upcall_pending = 0;
CVS commit: src/sys/arch/xen/x86
Module Name:src Committed By: bouyer Date: Tue May 31 14:21:44 UTC 2022 Modified Files: src/sys/arch/xen/x86: hypervisor_machdep.c Log Message: Revert previous; evt_set_pending() will set ret to 1 if needed to this was not our bug. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/xen/x86/hypervisor_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev
Module Name:src Committed By: riastradh Date: Tue May 31 14:13:31 UTC 2022 Modified Files: src/sys/dev: vnd.c Log Message: vnd(4): Work around deadlock in VNDIOCCLR. Since the changes this year to eliminate a host of races and deadlocks in open, close, revoke, attach, and detach, closing the last instance of a device special node has the side effect of waiting for all concurrent I/O operations (read, write, ioctl, strategy, &c.) on the device to complete. Unfortunately, while this works for physical devices which revoke open device nodes in their autoconf detach functions, as invoked by some hardware interrupt indicating that the device is no longer present, pseudo-devices like vnd(4) work differently -- or, work by luck, or don't work any more. VNDIOCCLR acts kind of like an autoconf detach function in that it revokes open device nodes, which closes the last instance. But VNDIOCCLR is itself called via ioctl, which is an I/O operation that close waits for. So we end up with a deadlock, spec_io_drain waiting for spec_close lower down in the call stack: > spec_io_drain() at netbsd:spec_io_drain+0x84 > spec_close() at netbsd:spec_close+0x1c6 > VOP_CLOSE() at netbsd:VOP_CLOSE+0x38 > spec_node_revoke() at netbsd:spec_node_revoke+0x14d > vcache_reclaim() at netbsd:vcache_reclaim+0x4e7 > vgone() at netbsd:vgone+0xcd > vrevoke() at netbsd:vrevoke+0xfa > genfs_revoke() at netbsd:genfs_revoke+0x13 > VOP_REVOKE() at netbsd:VOP_REVOKE+0x35 > vdevgone() at netbsd:vdevgone+0x64 > vnddoclear.part.0() at netbsd:vnddoclear.part.0+0xaa > vndioctl() at netbsd:vndioctl+0x78c > bdev_ioctl() at netbsd:bdev_ioctl+0x91 > spec_ioctl() at netbsd:spec_ioctl+0xa5 > VOP_IOCTL() at netbsd:VOP_IOCTL+0x41 > vn_ioctl() at netbsd:vn_ioctl+0xb3 > sys_ioctl() at netbsd:sys_ioctl+0x555 In the past, there was a workaround for what was presumably a crash instead of a deadlock here: don't issue revoke (vdevgone) on the open character devices for the minor number in use by the ioctl. If you use, e.g., `vnconfig -u vnd0', and vnconfig(8) picks /dev/rvnd0c or /dev/rvnd0d, that special case kicks in. But if you use `vnconfig -u /dev/vnd0d', the ioctl will be issued on the block device instead, so the special case doesn't kick in, so the operation deadlocks. It is actually probably safe not to revoke the block device if what the ioctl caller holds open is that, because specfs(9) forbids more than one open of a block device, so nothing else can have it open anyway. Unclear what the consequences of failing to revoke the character device are -- but this is what vnd(4) has done all along. cgd(4) and ccd(4) also don't bother to revoke. We don't have a notion of `revoke every file descriptor _except_ this one'; only a vnode as a whole can be revoked, including all references to it. This is a stop-gap measure to avoid a deadlock we are definitely hitting on some users. A slightly better measure would be to revoke the block or character device according to which one is being used, but that requires a little more work with two different d_ioctl functions -- and wouldn't address isues with the character device. A proper solution requires identifying the appropriate protocol for all of these pseudo-device disk drivers and using it uniformly for them. Reported on current-users: https://mail-index.netbsd.org/current-users/2022/05/27/msg042437.html To generate a diff of this commit: cvs rdiff -u -r1.285 -r1.286 src/sys/dev/vnd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev
Module Name:src Committed By: riastradh Date: Tue May 31 14:13:31 UTC 2022 Modified Files: src/sys/dev: vnd.c Log Message: vnd(4): Work around deadlock in VNDIOCCLR. Since the changes this year to eliminate a host of races and deadlocks in open, close, revoke, attach, and detach, closing the last instance of a device special node has the side effect of waiting for all concurrent I/O operations (read, write, ioctl, strategy, &c.) on the device to complete. Unfortunately, while this works for physical devices which revoke open device nodes in their autoconf detach functions, as invoked by some hardware interrupt indicating that the device is no longer present, pseudo-devices like vnd(4) work differently -- or, work by luck, or don't work any more. VNDIOCCLR acts kind of like an autoconf detach function in that it revokes open device nodes, which closes the last instance. But VNDIOCCLR is itself called via ioctl, which is an I/O operation that close waits for. So we end up with a deadlock, spec_io_drain waiting for spec_close lower down in the call stack: > spec_io_drain() at netbsd:spec_io_drain+0x84 > spec_close() at netbsd:spec_close+0x1c6 > VOP_CLOSE() at netbsd:VOP_CLOSE+0x38 > spec_node_revoke() at netbsd:spec_node_revoke+0x14d > vcache_reclaim() at netbsd:vcache_reclaim+0x4e7 > vgone() at netbsd:vgone+0xcd > vrevoke() at netbsd:vrevoke+0xfa > genfs_revoke() at netbsd:genfs_revoke+0x13 > VOP_REVOKE() at netbsd:VOP_REVOKE+0x35 > vdevgone() at netbsd:vdevgone+0x64 > vnddoclear.part.0() at netbsd:vnddoclear.part.0+0xaa > vndioctl() at netbsd:vndioctl+0x78c > bdev_ioctl() at netbsd:bdev_ioctl+0x91 > spec_ioctl() at netbsd:spec_ioctl+0xa5 > VOP_IOCTL() at netbsd:VOP_IOCTL+0x41 > vn_ioctl() at netbsd:vn_ioctl+0xb3 > sys_ioctl() at netbsd:sys_ioctl+0x555 In the past, there was a workaround for what was presumably a crash instead of a deadlock here: don't issue revoke (vdevgone) on the open character devices for the minor number in use by the ioctl. If you use, e.g., `vnconfig -u vnd0', and vnconfig(8) picks /dev/rvnd0c or /dev/rvnd0d, that special case kicks in. But if you use `vnconfig -u /dev/vnd0d', the ioctl will be issued on the block device instead, so the special case doesn't kick in, so the operation deadlocks. It is actually probably safe not to revoke the block device if what the ioctl caller holds open is that, because specfs(9) forbids more than one open of a block device, so nothing else can have it open anyway. Unclear what the consequences of failing to revoke the character device are -- but this is what vnd(4) has done all along. cgd(4) and ccd(4) also don't bother to revoke. We don't have a notion of `revoke every file descriptor _except_ this one'; only a vnode as a whole can be revoked, including all references to it. This is a stop-gap measure to avoid a deadlock we are definitely hitting on some users. A slightly better measure would be to revoke the block or character device according to which one is being used, but that requires a little more work with two different d_ioctl functions -- and wouldn't address isues with the character device. A proper solution requires identifying the appropriate protocol for all of these pseudo-device disk drivers and using it uniformly for them. Reported on current-users: https://mail-index.netbsd.org/current-users/2022/05/27/msg042437.html To generate a diff of this commit: cvs rdiff -u -r1.285 -r1.286 src/sys/dev/vnd.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/vnd.c diff -u src/sys/dev/vnd.c:1.285 src/sys/dev/vnd.c:1.286 --- src/sys/dev/vnd.c:1.285 Thu Mar 31 19:30:15 2022 +++ src/sys/dev/vnd.c Tue May 31 14:13:31 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: vnd.c,v 1.285 2022/03/31 19:30:15 pgoyette Exp $ */ +/* $NetBSD: vnd.c,v 1.286 2022/05/31 14:13:31 riastradh Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008, 2020 The NetBSD Foundation, Inc. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.285 2022/03/31 19:30:15 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.286 2022/05/31 14:13:31 riastradh Exp $"); #if defined(_KERNEL_OPT) #include "opt_vnd.h" @@ -1767,9 +1767,10 @@ vndclear(struct vnd_softc *vnd, int mymi /* Nuke the vnodes for any open instances */ for (i = 0; i < MAXPARTITIONS; i++) { mn = DISKMINOR(device_unit(vnd->sc_dev), i); - vdevgone(bmaj, mn, mn, VBLK); - if (mn != myminor) /* XXX avoid to kill own vnode */ + if (mn != myminor) { /* XXX avoid to kill own vnode */ + vdevgone(bmaj, mn, mn, VBLK); vdevgone(cmaj, mn, mn, VCHR); + } } if ((vnd->sc_flags & VNF_READONLY) == 0)
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Tue May 31 14:08:47 UTC 2022 Modified Files: src/doc [netbsd-8]: CHANGES-8.3 Log Message: Ticket #1745 To generate a diff of this commit: cvs rdiff -u -r1.1.2.131 -r1.1.2.132 src/doc/CHANGES-8.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.3 diff -u src/doc/CHANGES-8.3:1.1.2.131 src/doc/CHANGES-8.3:1.1.2.132 --- src/doc/CHANGES-8.3:1.1.2.131 Mon May 30 17:08:06 2022 +++ src/doc/CHANGES-8.3 Tue May 31 14:08:47 2022 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.3,v 1.1.2.131 2022/05/30 17:08:06 martin Exp $ +# $NetBSD: CHANGES-8.3,v 1.1.2.132 2022/05/31 14:08:47 martin Exp $ A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3 release: @@ -2632,3 +2632,14 @@ sys/dev/pci/ixgbe/ixv.c1.179-1.180 v - Use cached rx_copy_len in ixgbe_rxeof(). [msaitoh, ticket #1744] +sys/dev/pci/ixgbe/ix_txrx.c 1.98 +sys/dev/pci/ixgbe/ixgbe.c 1.315 +sys/dev/pci/ixgbe/ixgbe.h 1.86 +sys/dev/pci/ixgbe/ixv.c1.181 + + ixg(4): bus_dmamem_unmap() before bus_dmamem_free(), otherwise we + may give back memory which is still (and will stay) mapped. + PR 56857: fix a bug that the legacy interrupt doesn't work when MSI-X + allocation failed. + [msaitoh, ticket #1745] +
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Tue May 31 14:08:47 UTC 2022 Modified Files: src/doc [netbsd-8]: CHANGES-8.3 Log Message: Ticket #1745 To generate a diff of this commit: cvs rdiff -u -r1.1.2.131 -r1.1.2.132 src/doc/CHANGES-8.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/dev/pci/ixgbe
Module Name:src Committed By: martin Date: Tue May 31 14:07:52 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe [netbsd-8]: ix_txrx.c ixgbe.c ixgbe.h ixv.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1745): sys/dev/pci/ixgbe/ix_txrx.c: revision 1.98 sys/dev/pci/ixgbe/ixv.c: revision 1.181 sys/dev/pci/ixgbe/ixgbe.c: revision 1.315 sys/dev/pci/ixgbe/ixgbe.h: revision 1.86 bus_dmamem_unmap() before bus_dmamem_free(), otherwise we may give back meomry which is still (and will stay) mapped. Fixes one instance of "panic: HYPERVISOR_mmu_update failed" on Xen. There may be others. Fix a bug that the legacy interrupt doesn't work when MSI-X allocation failed. Fixes PR kern/56857. Remove unused adapter->msix_mem. To generate a diff of this commit: cvs rdiff -u -r1.24.2.24 -r1.24.2.25 src/sys/dev/pci/ixgbe/ix_txrx.c cvs rdiff -u -r1.88.2.50 -r1.88.2.51 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.24.6.24 -r1.24.6.25 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.56.2.37 -r1.56.2.38 src/sys/dev/pci/ixgbe/ixv.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/ixgbe/ix_txrx.c diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.24.2.24 src/sys/dev/pci/ixgbe/ix_txrx.c:1.24.2.25 --- src/sys/dev/pci/ixgbe/ix_txrx.c:1.24.2.24 Mon May 30 17:05:51 2022 +++ src/sys/dev/pci/ixgbe/ix_txrx.c Tue May 31 14:07:51 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ix_txrx.c,v 1.24.2.24 2022/05/30 17:05:51 martin Exp $ */ +/* $NetBSD: ix_txrx.c,v 1.24.2.25 2022/05/31 14:07:51 martin Exp $ */ /** @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.24.2.24 2022/05/30 17:05:51 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.24.2.25 2022/05/31 14:07:51 martin Exp $"); #include "opt_inet.h" #include "opt_inet6.h" @@ -2322,6 +2322,7 @@ ixgbe_dma_free(struct adapter *adapter, bus_dmamap_sync(dma->dma_tag->dt_dmat, dma->dma_map, 0, dma->dma_size, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); ixgbe_dmamap_unload(dma->dma_tag, dma->dma_map); + bus_dmamem_unmap(dma->dma_tag->dt_dmat, dma->dma_vaddr, dma->dma_size); bus_dmamem_free(dma->dma_tag->dt_dmat, &dma->dma_seg, 1); ixgbe_dma_tag_destroy(dma->dma_tag); } /* ixgbe_dma_free */ Index: src/sys/dev/pci/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.50 src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.51 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.50 Mon May 30 17:05:51 2022 +++ src/sys/dev/pci/ixgbe/ixgbe.c Tue May 31 14:07:51 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.88.2.50 2022/05/30 17:05:51 martin Exp $ */ +/* $NetBSD: ixgbe.c,v 1.88.2.51 2022/05/31 14:07:51 martin Exp $ */ /** @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.88.2.50 2022/05/30 17:05:51 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.88.2.51 2022/05/31 14:07:51 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1091,7 +1091,6 @@ ixgbe_attach(device_t parent, device_t d ixgbe_free_queues(adapter); /* Fallback to legacy interrupt */ - adapter->feat_en &= ~IXGBE_FEATURE_MSIX; if (adapter->feat_cap & IXGBE_FEATURE_MSI) adapter->feat_en |= IXGBE_FEATURE_MSI; adapter->num_queues = 1; @@ -5033,7 +5032,7 @@ ixgbe_enable_intr(struct adapter *adapte IXGBE_WRITE_REG(hw, IXGBE_EIMS, mask); /* With MSI-X we use auto clear */ - if (adapter->msix_mem) { + if ((adapter->feat_en & IXGBE_FEATURE_MSIX) != 0) { /* * We use auto clear for RTX_QUEUE only. Don't use other * interrupts (e.g. link interrupt). BTW, we don't use @@ -5065,7 +5064,7 @@ ixgbe_disable_intr_internal(struct adapt /* disable interrupts other than queues */ IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, ~IXGBE_EIMC_RTX_QUEUE); - if (adapter->msix_mem) + if ((adapter->feat_en & IXGBE_FEATURE_MSIX) != 0) IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIAC, 0); for (int i = 0; i < adapter->num_queues; i++, que++) @@ -6710,6 +6709,7 @@ ixgbe_allocate_msix(struct adapter *adap adapter->osdep.nintrs) != 0) { aprint_error_dev(dev, "failed to allocate MSI-X interrupt\n"); + adapter->feat_en &= ~IXGBE_FEATURE_MSIX; return (ENXIO); } @@ -6909,7 +6909,7 @@ ixgbe_configure_interrupts(struct adapte if (msgs < 2) goto msi; - adapter->msix_mem = (void *)1; /* XXX */ + adapter->feat_en |= IXGBE_FEATURE_MSIX; /* Figure out a reasonable auto config value */ queues = (ncpu > (msgs - 1)) ? (msgs - 1) : ncpu; @@ -6963,7 +6963,7 @@ msi: adapter->feat_en &= ~IXGBE_FEATURE_SRIOV; msgs = pci_msi_count(adapter->osdep.pc, adapter->osdep.tag); - adapter->msix_mem = NULL; /* XXX */ + adapter->feat_en &= ~IXGBE_FEATURE_MSIX; if (msgs > 1) msgs = 1; if (msgs != 0) { Index: src
CVS commit: [netbsd-8] src/sys/dev/pci/ixgbe
Module Name:src Committed By: martin Date: Tue May 31 14:07:52 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe [netbsd-8]: ix_txrx.c ixgbe.c ixgbe.h ixv.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1745): sys/dev/pci/ixgbe/ix_txrx.c: revision 1.98 sys/dev/pci/ixgbe/ixv.c: revision 1.181 sys/dev/pci/ixgbe/ixgbe.c: revision 1.315 sys/dev/pci/ixgbe/ixgbe.h: revision 1.86 bus_dmamem_unmap() before bus_dmamem_free(), otherwise we may give back meomry which is still (and will stay) mapped. Fixes one instance of "panic: HYPERVISOR_mmu_update failed" on Xen. There may be others. Fix a bug that the legacy interrupt doesn't work when MSI-X allocation failed. Fixes PR kern/56857. Remove unused adapter->msix_mem. To generate a diff of this commit: cvs rdiff -u -r1.24.2.24 -r1.24.2.25 src/sys/dev/pci/ixgbe/ix_txrx.c cvs rdiff -u -r1.88.2.50 -r1.88.2.51 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.24.6.24 -r1.24.6.25 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.56.2.37 -r1.56.2.38 src/sys/dev/pci/ixgbe/ixv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Tue May 31 14:04:24 UTC 2022 Modified Files: src/doc [netbsd-9]: CHANGES-9.3 Log Message: Ticket #1458 To generate a diff of this commit: cvs rdiff -u -r1.1.2.97 -r1.1.2.98 src/doc/CHANGES-9.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.3 diff -u src/doc/CHANGES-9.3:1.1.2.97 src/doc/CHANGES-9.3:1.1.2.98 --- src/doc/CHANGES-9.3:1.1.2.97 Mon May 30 17:03:54 2022 +++ src/doc/CHANGES-9.3 Tue May 31 14:04:24 2022 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.3,v 1.1.2.97 2022/05/30 17:03:54 martin Exp $ +# $NetBSD: CHANGES-9.3,v 1.1.2.98 2022/05/31 14:04:24 martin Exp $ A complete list of changes from the NetBSD 9.2 release to the NetBSD 9.3 release: @@ -1695,3 +1695,12 @@ sys/dev/pci/ixgbe/ixv.c1.158,1.179-1 - Modify comment for consistency. - Use cached rx_copy_len in ixgbe_rxeof(). [msaitoh, ticket #1457] + +sys/dev/pci/ixgbe/ixgbe.c 1.315 +sys/dev/pci/ixgbe/ixgbe.h 1.86 +sys/dev/pci/ixgbe/ixv.c1.181 + + PR 56857: fix a bug that the legacy interrupt doesn't work when MSI-X + allocation failed. + [msaitoh, ticket #1458] +
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Tue May 31 14:04:24 UTC 2022 Modified Files: src/doc [netbsd-9]: CHANGES-9.3 Log Message: Ticket #1458 To generate a diff of this commit: cvs rdiff -u -r1.1.2.97 -r1.1.2.98 src/doc/CHANGES-9.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci/ixgbe
Module Name:src Committed By: martin Date: Tue May 31 14:03:27 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe [netbsd-9]: ixgbe.c ixgbe.h ixv.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1458): sys/dev/pci/ixgbe/ixv.c: revision 1.181 sys/dev/pci/ixgbe/ixgbe.c: revision 1.315 sys/dev/pci/ixgbe/ixgbe.h: revision 1.86 Fix a bug that the legacy interrupt doesn't work when MSI-X allocation failed. Fixes PR kern/56857. Remove unused adapter->msix_mem. To generate a diff of this commit: cvs rdiff -u -r1.199.2.21 -r1.199.2.22 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.56.2.7 -r1.56.2.8 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.125.2.18 -r1.125.2.19 src/sys/dev/pci/ixgbe/ixv.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/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.21 src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.22 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.21 Mon May 30 17:01:06 2022 +++ src/sys/dev/pci/ixgbe/ixgbe.c Tue May 31 14:03:26 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.199.2.21 2022/05/30 17:01:06 martin Exp $ */ +/* $NetBSD: ixgbe.c,v 1.199.2.22 2022/05/31 14:03:26 martin Exp $ */ /** @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.199.2.21 2022/05/30 17:01:06 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.199.2.22 2022/05/31 14:03:26 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1096,7 +1096,6 @@ ixgbe_attach(device_t parent, device_t d ixgbe_free_queues(adapter); /* Fallback to legacy interrupt */ - adapter->feat_en &= ~IXGBE_FEATURE_MSIX; if (adapter->feat_cap & IXGBE_FEATURE_MSI) adapter->feat_en |= IXGBE_FEATURE_MSI; adapter->num_queues = 1; @@ -5054,7 +5053,7 @@ ixgbe_enable_intr(struct adapter *adapte IXGBE_WRITE_REG(hw, IXGBE_EIMS, mask); /* With MSI-X we use auto clear */ - if (adapter->msix_mem) { + if ((adapter->feat_en & IXGBE_FEATURE_MSIX) != 0) { /* * We use auto clear for RTX_QUEUE only. Don't use other * interrupts (e.g. link interrupt). BTW, we don't use @@ -5086,7 +5085,7 @@ ixgbe_disable_intr_internal(struct adapt /* disable interrupts other than queues */ IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, ~IXGBE_EIMC_RTX_QUEUE); - if (adapter->msix_mem) + if ((adapter->feat_en & IXGBE_FEATURE_MSIX) != 0) IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIAC, 0); for (int i = 0; i < adapter->num_queues; i++, que++) @@ -6743,6 +6742,7 @@ ixgbe_allocate_msix(struct adapter *adap adapter->osdep.nintrs) != 0) { aprint_error_dev(dev, "failed to allocate MSI-X interrupt\n"); + adapter->feat_en &= ~IXGBE_FEATURE_MSIX; return (ENXIO); } @@ -6942,7 +6942,7 @@ ixgbe_configure_interrupts(struct adapte if (msgs < 2) goto msi; - adapter->msix_mem = (void *)1; /* XXX */ + adapter->feat_en |= IXGBE_FEATURE_MSIX; /* Figure out a reasonable auto config value */ queues = (ncpu > (msgs - 1)) ? (msgs - 1) : ncpu; @@ -6996,7 +6996,7 @@ msi: adapter->feat_en &= ~IXGBE_FEATURE_SRIOV; msgs = pci_msi_count(adapter->osdep.pc, adapter->osdep.tag); - adapter->msix_mem = NULL; /* XXX */ + adapter->feat_en &= ~IXGBE_FEATURE_MSIX; if (msgs > 1) msgs = 1; if (msgs != 0) { Index: src/sys/dev/pci/ixgbe/ixgbe.h diff -u src/sys/dev/pci/ixgbe/ixgbe.h:1.56.2.7 src/sys/dev/pci/ixgbe/ixgbe.h:1.56.2.8 --- src/sys/dev/pci/ixgbe/ixgbe.h:1.56.2.7 Sun Jan 30 15:58:28 2022 +++ src/sys/dev/pci/ixgbe/ixgbe.h Tue May 31 14:03:27 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.h,v 1.56.2.7 2022/01/30 15:58:28 martin Exp $ */ +/* $NetBSD: ixgbe.h,v 1.56.2.8 2022/05/31 14:03:27 martin Exp $ */ /** SPDX-License-Identifier: BSD-3-Clause @@ -479,7 +479,6 @@ struct adapter { struct if_percpuq *ipq; /* softint-based input queues */ struct resource *pci_mem; - struct resource *msix_mem; /* NetBSD: Interrupt resources are in osdep */ Index: src/sys/dev/pci/ixgbe/ixv.c diff -u src/sys/dev/pci/ixgbe/ixv.c:1.125.2.18 src/sys/dev/pci/ixgbe/ixv.c:1.125.2.19 --- src/sys/dev/pci/ixgbe/ixv.c:1.125.2.18 Mon May 30 17:01:06 2022 +++ src/sys/dev/pci/ixgbe/ixv.c Tue May 31 14:03:26 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ixv.c,v 1.125.2.18 2022/05/30 17:01:06 martin Exp $ */ +/* $NetBSD: ixv.c,v 1.125.2.19 2022/05/31 14:03:26 martin Exp $ */ /** @@ -35,7 +35,7 @@ /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 331224 2018-03-19 20:55:05Z erj $*/ #include -__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.125.2.18 2022/05/30 17:01:06 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.125.2.19 2022/05/31 14:03:26 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@
CVS commit: [netbsd-9] src/sys/dev/pci/ixgbe
Module Name:src Committed By: martin Date: Tue May 31 14:03:27 UTC 2022 Modified Files: src/sys/dev/pci/ixgbe [netbsd-9]: ixgbe.c ixgbe.h ixv.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1458): sys/dev/pci/ixgbe/ixv.c: revision 1.181 sys/dev/pci/ixgbe/ixgbe.c: revision 1.315 sys/dev/pci/ixgbe/ixgbe.h: revision 1.86 Fix a bug that the legacy interrupt doesn't work when MSI-X allocation failed. Fixes PR kern/56857. Remove unused adapter->msix_mem. To generate a diff of this commit: cvs rdiff -u -r1.199.2.21 -r1.199.2.22 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.56.2.7 -r1.56.2.8 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.125.2.18 -r1.125.2.19 src/sys/dev/pci/ixgbe/ixv.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: riastradh Date: Tue May 31 13:42:59 UTC 2022 Modified Files: src/distrib/sets/lists/comp: mi src/distrib/sets/lists/debug: mi src/distrib/sets/lists/tests: mi src/include: limits.h unistd.h src/lib/libc/gen: Makefile.inc src/lib/libc/include: namespace.h src/tests/lib/libc/gen: Makefile Added Files: src/lib/libc/gen: getentropy.3 getentropy.c src/tests/lib/libc/gen: t_getentropy.c Log Message: libc: Reintroduce getentropy. This was introduced two years ago when the getrandom/getentropy API question was still open, and removed because the discussion was ongoing. Now getentropy is more widely adopted and soon to be in POSIX. So reintroduce the symbol into libc since we'll be keeping it anyway. Discussion of details of the semantics, as interpreted by NetBSD, is ongoing, but the symbol needs to get in before the netbsd-10 branch. The draft POSIX text is (https://www.opengroup.org/austin/docs/austin_1110.pdf): SYNOPSIS #include int getentropy(void *buffer, size_t length); DESCRIPTION The getentropy() function shall write length bytes of data starting at the location pointed to by buffer. The output shall be unpredictable high quality random data, generated by a cryptographically secure pseudo-random number generator. The maximum permitted value for the length argument is given by the {GETENTROPY_MAX} symbolic constant defined in . RETURN VALUES Upon successful completion, getentropy() shall return 0; otherwise, -1 shall be retunred and errno set to indicate the error. ERRORS The getentropy() function shall fail if: [EINVAL]The value of length is greater than {GETENTROPY_MAX}. The getentropy() function may fail if: [ENOSYS]The system does not provide the necessary source of entropy. RATIONALE The getentropy() function is not a cancellation point. Minor changes from the previous introduction of getentropy into libc: - Return EINVAL, not EIO, on buflen > 256. - Define GETENTROPY_MAX in limits.h. The declaration of getentropy in unistd.h and definition of GETENTROPY_MAX in limits.h are currently conditional on _NETBSD_SOURCE. When the next revision of POSIX is finalized, we can expose them also under _POSIX_C_SOURCE > 20yymmL as usual -- and this can be done as a pullup without breaking existing compiled programs. To generate a diff of this commit: cvs rdiff -u -r1.2414 -r1.2415 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.385 -r1.386 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.1208 -r1.1209 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.42 -r1.43 src/include/limits.h cvs rdiff -u -r1.162 -r1.163 src/include/unistd.h cvs rdiff -u -r1.215 -r1.216 src/lib/libc/gen/Makefile.inc cvs rdiff -u -r0 -r1.4 src/lib/libc/gen/getentropy.3 cvs rdiff -u -r0 -r1.3 src/lib/libc/gen/getentropy.c cvs rdiff -u -r1.202 -r1.203 src/lib/libc/include/namespace.h cvs rdiff -u -r1.54 -r1.55 src/tests/lib/libc/gen/Makefile cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/gen/t_getentropy.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: riastradh Date: Tue May 31 13:42:59 UTC 2022 Modified Files: src/distrib/sets/lists/comp: mi src/distrib/sets/lists/debug: mi src/distrib/sets/lists/tests: mi src/include: limits.h unistd.h src/lib/libc/gen: Makefile.inc src/lib/libc/include: namespace.h src/tests/lib/libc/gen: Makefile Added Files: src/lib/libc/gen: getentropy.3 getentropy.c src/tests/lib/libc/gen: t_getentropy.c Log Message: libc: Reintroduce getentropy. This was introduced two years ago when the getrandom/getentropy API question was still open, and removed because the discussion was ongoing. Now getentropy is more widely adopted and soon to be in POSIX. So reintroduce the symbol into libc since we'll be keeping it anyway. Discussion of details of the semantics, as interpreted by NetBSD, is ongoing, but the symbol needs to get in before the netbsd-10 branch. The draft POSIX text is (https://www.opengroup.org/austin/docs/austin_1110.pdf): SYNOPSIS #include int getentropy(void *buffer, size_t length); DESCRIPTION The getentropy() function shall write length bytes of data starting at the location pointed to by buffer. The output shall be unpredictable high quality random data, generated by a cryptographically secure pseudo-random number generator. The maximum permitted value for the length argument is given by the {GETENTROPY_MAX} symbolic constant defined in . RETURN VALUES Upon successful completion, getentropy() shall return 0; otherwise, -1 shall be retunred and errno set to indicate the error. ERRORS The getentropy() function shall fail if: [EINVAL]The value of length is greater than {GETENTROPY_MAX}. The getentropy() function may fail if: [ENOSYS]The system does not provide the necessary source of entropy. RATIONALE The getentropy() function is not a cancellation point. Minor changes from the previous introduction of getentropy into libc: - Return EINVAL, not EIO, on buflen > 256. - Define GETENTROPY_MAX in limits.h. The declaration of getentropy in unistd.h and definition of GETENTROPY_MAX in limits.h are currently conditional on _NETBSD_SOURCE. When the next revision of POSIX is finalized, we can expose them also under _POSIX_C_SOURCE > 20yymmL as usual -- and this can be done as a pullup without breaking existing compiled programs. To generate a diff of this commit: cvs rdiff -u -r1.2414 -r1.2415 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.385 -r1.386 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.1208 -r1.1209 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.42 -r1.43 src/include/limits.h cvs rdiff -u -r1.162 -r1.163 src/include/unistd.h cvs rdiff -u -r1.215 -r1.216 src/lib/libc/gen/Makefile.inc cvs rdiff -u -r0 -r1.4 src/lib/libc/gen/getentropy.3 cvs rdiff -u -r0 -r1.3 src/lib/libc/gen/getentropy.c cvs rdiff -u -r1.202 -r1.203 src/lib/libc/include/namespace.h cvs rdiff -u -r1.54 -r1.55 src/tests/lib/libc/gen/Makefile cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/gen/t_getentropy.c 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/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2414 src/distrib/sets/lists/comp/mi:1.2415 --- src/distrib/sets/lists/comp/mi:1.2414 Fri May 27 07:28:21 2022 +++ src/distrib/sets/lists/comp/mi Tue May 31 13:42:58 2022 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2414 2022/05/27 07:28:21 nia Exp $ +# $NetBSD: mi,v 1.2415 2022/05/31 13:42:58 riastradh Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -7698,7 +7698,7 @@ ./usr/share/man/cat3/getdiskrawname.0 comp-c-catman .cat ./usr/share/man/cat3/getdomainname.0 comp-c-catman .cat ./usr/share/man/cat3/getdtablesize.0 comp-c-catman .cat -./usr/share/man/cat3/getentropy.0 comp-c-catman obsolete +./usr/share/man/cat3/getentropy.0 comp-c-catman .cat ./usr/share/man/cat3/getenv.0 comp-c-catman .cat ./usr/share/man/cat3/getenv_r.0 comp-c-catman .cat ./usr/share/man/cat3/getfsent.0 comp-c-catman .cat @@ -16018,7 +16018,7 @@ ./usr/share/man/html3/getdiskrawname.html comp-c-htmlman html ./usr/share/man/html3/getdomainname.html comp-c-htmlman html ./usr/share/man/html3/getdtablesize.html comp-c-htmlman html -./usr/share/man/html3/getentropy.html comp-c-htmlman obsolete +./usr/share/man/html3/getentropy.html comp-c-htmlman html ./usr/share/man/html3/getenv.html comp-c-htmlman html ./usr/share/man/html3/getenv_r.html comp-c-htmlman html ./usr/share/man/html3/getfsent.html comp-c-htmlman html @@ -24276,7 +24276,7 @@ ./usr/share/man/man3/getdiskrawname.3 comp-c-man .man ./usr/share/man/man3/get
CVS commit: src/sys/dev/ic
Module Name:src Committed By: andvar Date: Tue May 31 12:59:00 UTC 2022 Modified Files: src/sys/dev/ic: dm9000reg.h Log Message: s/longeset/longest/ and s/collsion/collision/ in comments. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/dm9000reg.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/dm9000reg.h diff -u src/sys/dev/ic/dm9000reg.h:1.9 src/sys/dev/ic/dm9000reg.h:1.10 --- src/sys/dev/ic/dm9000reg.h:1.9 Tue May 31 11:22:33 2022 +++ src/sys/dev/ic/dm9000reg.h Tue May 31 12:59:00 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: dm9000reg.h,v 1.9 2022/05/31 11:22:33 andvar Exp $ */ +/* $NetBSD: dm9000reg.h,v 1.10 2022/05/31 12:59:00 andvar Exp $ */ /* * Copyright (c) 2009 Paul Fleischer @@ -171,8 +171,8 @@ #define DM9000_OTCR 0x2E /* operation test control */ #define DM9000_SMCR 0x2F /* special mode control */ #define DM9000_FB0 (1<<0) /* force shortest back-off time */ -#define DM9000_FB1 (1<<1) /* force longeset back-off time */ -#define DM9000_FLC (1<<2) /* force late collsion */ +#define DM9000_FB1 (1<<1) /* force longest back-off time */ +#define DM9000_FLC (1<<2) /* force late collision */ #define DM9000_SM_EN (1<<7) /* serial mode enable */ #define DM9000_ETXCSR 0x30 /* early xmit control and status */ #define DM9000_TCSCR 0x31 /* xmit checksum control */
CVS commit: src/sys/dev/ic
Module Name:src Committed By: andvar Date: Tue May 31 12:59:00 UTC 2022 Modified Files: src/sys/dev/ic: dm9000reg.h Log Message: s/longeset/longest/ and s/collsion/collision/ in comments. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/dm9000reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/xen/x86
Module Name:src Committed By: bouyer Date: Tue May 31 12:52:59 UTC 2022 Modified Files: src/sys/arch/xen/x86: hypervisor_machdep.c Log Message: stipending(): if we're going to process some interrupts don't return 0. Hopefully fixes random hang seen in i386 Xen PV. The bug has been there ~forever but was masked by the fact that spllower() did call event handlers much more often. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/arch/xen/x86/hypervisor_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/xen/x86/hypervisor_machdep.c diff -u src/sys/arch/xen/x86/hypervisor_machdep.c:1.40 src/sys/arch/xen/x86/hypervisor_machdep.c:1.41 --- src/sys/arch/xen/x86/hypervisor_machdep.c:1.40 Thu May 19 09:54:27 2022 +++ src/sys/arch/xen/x86/hypervisor_machdep.c Tue May 31 12:52:59 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: hypervisor_machdep.c,v 1.40 2022/05/19 09:54:27 bouyer Exp $ */ +/* $NetBSD: hypervisor_machdep.c,v 1.41 2022/05/31 12:52:59 bouyer Exp $ */ /* * @@ -54,7 +54,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.40 2022/05/19 09:54:27 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.41 2022/05/31 12:52:59 bouyer Exp $"); #include #include @@ -208,6 +208,7 @@ stipending(void) */ while (vci->evtchn_upcall_pending) { + ret = 1; x86_disable_intr(); vci->evtchn_upcall_pending = 0;
CVS commit: src/sys/arch/xen/x86
Module Name:src Committed By: bouyer Date: Tue May 31 12:52:59 UTC 2022 Modified Files: src/sys/arch/xen/x86: hypervisor_machdep.c Log Message: stipending(): if we're going to process some interrupts don't return 0. Hopefully fixes random hang seen in i386 Xen PV. The bug has been there ~forever but was masked by the fact that spllower() did call event handlers much more often. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/arch/xen/x86/hypervisor_machdep.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: andvar Date: Tue May 31 11:22:34 UTC 2022 Modified Files: src/sys/arch/arm/marvell: armadaxp.c src/sys/arch/hpcmips/dev: plumicureg.h src/sys/dev/ic: dm9000reg.h src/sys/dev/pci/ixgbe: ixgbe_x550.c src/tests/lib/libc/gen/posix_spawn: t_spawn.c Log Message: s/disbale/disable/ and s/enbale/enable/ in comments. also one more typo fix. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/marvell/armadaxp.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hpcmips/dev/plumicureg.h cvs rdiff -u -r1.8 -r1.9 src/sys/dev/ic/dm9000reg.h cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/ixgbe/ixgbe_x550.c cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libc/gen/posix_spawn/t_spawn.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/marvell/armadaxp.c diff -u src/sys/arch/arm/marvell/armadaxp.c:1.24 src/sys/arch/arm/marvell/armadaxp.c:1.25 --- src/sys/arch/arm/marvell/armadaxp.c:1.24 Mon Aug 30 00:04:30 2021 +++ src/sys/arch/arm/marvell/armadaxp.c Tue May 31 11:22:33 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: armadaxp.c,v 1.24 2021/08/30 00:04:30 rin Exp $ */ +/* $NetBSD: armadaxp.c,v 1.25 2022/05/31 11:22:33 andvar Exp $ */ /*** Copyright (C) Marvell International Ltd. and its affiliates @@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI ***/ #include -__KERNEL_RCSID(0, "$NetBSD: armadaxp.c,v 1.24 2021/08/30 00:04:30 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: armadaxp.c,v 1.25 2022/05/31 11:22:33 andvar Exp $"); #define _INTR_PRIVATE @@ -1149,7 +1149,7 @@ armadaxp_init_mbus(void) reg |= MVSOC_MLMB_WCR_TARGET(def->target); reg |= MVSOC_MLMB_WCR_ATTR(def->attr); #ifdef AURORA_IO_CACHE_COHERENCY - reg |= MVSOC_MLMB_WCR_SYNC; /* enbale I/O coherency barrior */ + reg |= MVSOC_MLMB_WCR_SYNC; /* enable I/O coherency barrier */ #endif reg |= MVSOC_MLMB_WCR_WINEN; write_mlmbreg(MVSOC_MLMB_WCR(def->window), reg); Index: src/sys/arch/hpcmips/dev/plumicureg.h diff -u src/sys/arch/hpcmips/dev/plumicureg.h:1.4 src/sys/arch/hpcmips/dev/plumicureg.h:1.5 --- src/sys/arch/hpcmips/dev/plumicureg.h:1.4 Mon Apr 28 20:23:21 2008 +++ src/sys/arch/hpcmips/dev/plumicureg.h Tue May 31 11:22:33 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: plumicureg.h,v 1.4 2008/04/28 20:23:21 martin Exp $ */ +/* $NetBSD: plumicureg.h,v 1.5 2022/05/31 11:22:33 andvar Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -124,7 +124,7 @@ /* master-enables the USB interrupts */ #define PLUM_INT_USBINTEN_IEN 0x0002 -/* enbales the clock restart request interrupts */ +/* enables the clock restart request interrupts */ #define PLUM_INT_USBINTEN_WIEN 0x0001 /* Index: src/sys/dev/ic/dm9000reg.h diff -u src/sys/dev/ic/dm9000reg.h:1.8 src/sys/dev/ic/dm9000reg.h:1.9 --- src/sys/dev/ic/dm9000reg.h:1.8 Tue May 31 08:43:15 2022 +++ src/sys/dev/ic/dm9000reg.h Tue May 31 11:22:33 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: dm9000reg.h,v 1.8 2022/05/31 08:43:15 andvar Exp $ */ +/* $NetBSD: dm9000reg.h,v 1.9 2022/05/31 11:22:33 andvar Exp $ */ /* * Copyright (c) 2009 Paul Fleischer @@ -68,9 +68,9 @@ #define DM9000_TCR 0x02 /* Tx control */ #define DM9000_TCR_TXREQ (1<<0) /* request to start Tx, self clear */ #define DM9000_TCR_CRC_DIS1 (1<<1) /* disable PAD op on Tx1 */ -#define DM9000_TCR_PAD_DIS1 (1<<2) /* disbale CRC append on Tx1 */ +#define DM9000_TCR_PAD_DIS1 (1<<2) /* disable CRC append on Tx1 */ #define DM9000_TCR_CRC_DIS2 (1<<3) /* disable PAD op on Tx2 */ -#define DM9000_TCR_PAD_DIS2 (1<<4) /* disbale CRC append on Tx2 */ +#define DM9000_TCR_PAD_DIS2 (1<<4) /* disable CRC append on Tx2 */ #define DM9000_TCR_EXCECM (1<<5) /* allow infinite colli. retries */ #define DM9000_TCR_TJDIS (1<<6) /* disable xmit jabber, otherwise on */ #define DM9000_TSR1 0x03 /* transmit completion status 1 */ Index: src/sys/dev/pci/ixgbe/ixgbe_x550.c diff -u src/sys/dev/pci/ixgbe/ixgbe_x550.c:1.25 src/sys/dev/pci/ixgbe/ixgbe_x550.c:1.26 --- src/sys/dev/pci/ixgbe/ixgbe_x550.c:1.25 Fri Dec 24 05:02:11 2021 +++ src/sys/dev/pci/ixgbe/ixgbe_x550.c Tue May 31 11:22:33 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe_x550.c,v 1.25 2021/12/24 05:02:11 msaitoh Exp $ */ +/* $NetBSD: ixgbe_x550.c,v 1.26 2022/05/31 11:22:33 andvar Exp $ */ /** @@ -35,7 +35,7 @@ /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_x550.c 331224 2018-03-19 20:55:05Z erj $*/ #include -__KERNEL_RCSID(0, "$NetBSD: ixgbe_x550.c,v 1.25 2021/12/24 05:02:11 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixgbe_x550.c,v 1.26 2022/05/31 11:22:33 andvar Exp $"); #include "ixgbe_x550.h" #include "ixgbe_x540.h" @@ -1215,7 +1215,7 @@ s32 ixgbe_init_eeprom_params_X550(s
CVS commit: src
Module Name:src Committed By: andvar Date: Tue May 31 11:22:34 UTC 2022 Modified Files: src/sys/arch/arm/marvell: armadaxp.c src/sys/arch/hpcmips/dev: plumicureg.h src/sys/dev/ic: dm9000reg.h src/sys/dev/pci/ixgbe: ixgbe_x550.c src/tests/lib/libc/gen/posix_spawn: t_spawn.c Log Message: s/disbale/disable/ and s/enbale/enable/ in comments. also one more typo fix. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/arm/marvell/armadaxp.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hpcmips/dev/plumicureg.h cvs rdiff -u -r1.8 -r1.9 src/sys/dev/ic/dm9000reg.h cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/ixgbe/ixgbe_x550.c cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libc/gen/posix_spawn/t_spawn.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: andvar Date: Tue May 31 08:43:17 UTC 2022 Modified Files: src/bin/sh: memalloc.c src/lib/libc/gen: pthread_atfork.c src/lib/libc/stdlib: bsearch.c src/lib/librt: pset.3 src/libexec/ld.elf_so/arch/aarch64: mdreloc.c src/sbin/iscsid: iscsid_lists.c src/share/man/man9: LWP_CACHE_CREDS.9 src/sys/arch/amiga/dev: if_esreg.h src/sys/arch/ia64/include: cpu.h src/sys/arch/mips/mips: mipsX_subr.S src/sys/arch/powerpc/booke: e500_tlb.c src/sys/arch/powerpc/ibm4xx: 4xx_locore.S src/sys/arch/sun3/sun3x: pmap.c src/sys/dev/ata: ata.c src/sys/dev/ic: arcofi.c dm9000reg.h mpt_debug.c wdc.c src/sys/dev/isa: sbreg.h src/sys/dev/microcode/aic7xxx: aic79xx.reg src/sys/dev/pci: ahcisata_pci.c cmpci.c if_age.c src/sys/dev/pckbport: synaptics.c src/sys/dev/ppbus: ppbus_msq.c src/sys/kern: kern_hook.c subr_blist.c subr_vmem.c src/sys/netinet: ip_reass.c sctp_output.c src/sys/uvm: uvm_aobj.c src/tests/dev/audio: audiotest.c src/usr.bin/nbsvtool: nbsvtool.c src/usr.bin/sed: defs.h Log Message: fix various typos in comments, documentation and messages. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/bin/sh/memalloc.c cvs rdiff -u -r1.15 -r1.16 src/lib/libc/gen/pthread_atfork.c cvs rdiff -u -r1.15 -r1.16 src/lib/libc/stdlib/bsearch.c cvs rdiff -u -r1.13 -r1.14 src/lib/librt/pset.3 cvs rdiff -u -r1.14 -r1.15 src/libexec/ld.elf_so/arch/aarch64/mdreloc.c cvs rdiff -u -r1.9 -r1.10 src/sbin/iscsid/iscsid_lists.c cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/LWP_CACHE_CREDS.9 cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amiga/dev/if_esreg.h cvs rdiff -u -r1.20 -r1.21 src/sys/arch/ia64/include/cpu.h cvs rdiff -u -r1.114 -r1.115 src/sys/arch/mips/mips/mipsX_subr.S cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/booke/e500_tlb.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/ibm4xx/4xx_locore.S cvs rdiff -u -r1.120 -r1.121 src/sys/arch/sun3/sun3x/pmap.c cvs rdiff -u -r1.168 -r1.169 src/sys/dev/ata/ata.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ic/arcofi.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/ic/dm9000reg.h cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ic/mpt_debug.c cvs rdiff -u -r1.309 -r1.310 src/sys/dev/ic/wdc.c cvs rdiff -u -r1.31 -r1.32 src/sys/dev/isa/sbreg.h cvs rdiff -u -r1.15 -r1.16 src/sys/dev/microcode/aic7xxx/aic79xx.reg cvs rdiff -u -r1.64 -r1.65 src/sys/dev/pci/ahcisata_pci.c cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/cmpci.c cvs rdiff -u -r1.69 -r1.70 src/sys/dev/pci/if_age.c cvs rdiff -u -r1.78 -r1.79 src/sys/dev/pckbport/synaptics.c cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ppbus/ppbus_msq.c cvs rdiff -u -r1.12 -r1.13 src/sys/kern/kern_hook.c cvs rdiff -u -r1.14 -r1.15 src/sys/kern/subr_blist.c cvs rdiff -u -r1.107 -r1.108 src/sys/kern/subr_vmem.c cvs rdiff -u -r1.22 -r1.23 src/sys/netinet/ip_reass.c cvs rdiff -u -r1.30 -r1.31 src/sys/netinet/sctp_output.c cvs rdiff -u -r1.155 -r1.156 src/sys/uvm/uvm_aobj.c cvs rdiff -u -r1.21 -r1.22 src/tests/dev/audio/audiotest.c cvs rdiff -u -r1.4 -r1.5 src/usr.bin/nbsvtool/nbsvtool.c cvs rdiff -u -r1.13 -r1.14 src/usr.bin/sed/defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/memalloc.c diff -u src/bin/sh/memalloc.c:1.36 src/bin/sh/memalloc.c:1.37 --- src/bin/sh/memalloc.c:1.36 Sun Apr 10 09:50:44 2022 +++ src/bin/sh/memalloc.c Tue May 31 08:43:13 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: memalloc.c,v 1.36 2022/04/10 09:50:44 andvar Exp $ */ +/* $NetBSD: memalloc.c,v 1.37 2022/05/31 08:43:13 andvar Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)memalloc.c 8.3 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: memalloc.c,v 1.36 2022/04/10 09:50:44 andvar Exp $"); +__RCSID("$NetBSD: memalloc.c,v 1.37 2022/05/31 08:43:13 andvar Exp $"); #endif #endif /* not lint */ @@ -325,7 +325,7 @@ makestrspace(void) * of the string we have stored beyond there and are now releasing. * (ie: "p" should be the same as in the call to grabstackstr()). * - * stunalloc(s) and ungrabstackstr(s, p) are almost interchangable after + * stunalloc(s) and ungrabstackstr(s, p) are almost interchangeable after * a grabstackstr(), however the latter also returns string space so we * can just continue with STPUTC() etc without needing a new STARTSTACKSTR(s) */ Index: src/lib/libc/gen/pthread_atfork.c diff -u src/lib/libc/gen/pthread_atfork.c:1.15 src/lib/libc/gen/pthread_atfork.c:1.16 --- src/lib/libc/gen/pthread_atfork.c:1.15 Fri May 15 14:37:21 2020 +++ src/lib/libc/gen/pthread_atfork.c Tue May 31 08:43:13 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_atfork.c,v 1.15 2020/05/15 14:37:21 joerg Exp $ */ +/* $NetBSD: pthread_atfork.c,v 1.16 2022/05/31 08:43:13 andvar Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundat
CVS commit: src
Module Name:src Committed By: andvar Date: Tue May 31 08:43:17 UTC 2022 Modified Files: src/bin/sh: memalloc.c src/lib/libc/gen: pthread_atfork.c src/lib/libc/stdlib: bsearch.c src/lib/librt: pset.3 src/libexec/ld.elf_so/arch/aarch64: mdreloc.c src/sbin/iscsid: iscsid_lists.c src/share/man/man9: LWP_CACHE_CREDS.9 src/sys/arch/amiga/dev: if_esreg.h src/sys/arch/ia64/include: cpu.h src/sys/arch/mips/mips: mipsX_subr.S src/sys/arch/powerpc/booke: e500_tlb.c src/sys/arch/powerpc/ibm4xx: 4xx_locore.S src/sys/arch/sun3/sun3x: pmap.c src/sys/dev/ata: ata.c src/sys/dev/ic: arcofi.c dm9000reg.h mpt_debug.c wdc.c src/sys/dev/isa: sbreg.h src/sys/dev/microcode/aic7xxx: aic79xx.reg src/sys/dev/pci: ahcisata_pci.c cmpci.c if_age.c src/sys/dev/pckbport: synaptics.c src/sys/dev/ppbus: ppbus_msq.c src/sys/kern: kern_hook.c subr_blist.c subr_vmem.c src/sys/netinet: ip_reass.c sctp_output.c src/sys/uvm: uvm_aobj.c src/tests/dev/audio: audiotest.c src/usr.bin/nbsvtool: nbsvtool.c src/usr.bin/sed: defs.h Log Message: fix various typos in comments, documentation and messages. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/bin/sh/memalloc.c cvs rdiff -u -r1.15 -r1.16 src/lib/libc/gen/pthread_atfork.c cvs rdiff -u -r1.15 -r1.16 src/lib/libc/stdlib/bsearch.c cvs rdiff -u -r1.13 -r1.14 src/lib/librt/pset.3 cvs rdiff -u -r1.14 -r1.15 src/libexec/ld.elf_so/arch/aarch64/mdreloc.c cvs rdiff -u -r1.9 -r1.10 src/sbin/iscsid/iscsid_lists.c cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/LWP_CACHE_CREDS.9 cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amiga/dev/if_esreg.h cvs rdiff -u -r1.20 -r1.21 src/sys/arch/ia64/include/cpu.h cvs rdiff -u -r1.114 -r1.115 src/sys/arch/mips/mips/mipsX_subr.S cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/booke/e500_tlb.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/ibm4xx/4xx_locore.S cvs rdiff -u -r1.120 -r1.121 src/sys/arch/sun3/sun3x/pmap.c cvs rdiff -u -r1.168 -r1.169 src/sys/dev/ata/ata.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ic/arcofi.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/ic/dm9000reg.h cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ic/mpt_debug.c cvs rdiff -u -r1.309 -r1.310 src/sys/dev/ic/wdc.c cvs rdiff -u -r1.31 -r1.32 src/sys/dev/isa/sbreg.h cvs rdiff -u -r1.15 -r1.16 src/sys/dev/microcode/aic7xxx/aic79xx.reg cvs rdiff -u -r1.64 -r1.65 src/sys/dev/pci/ahcisata_pci.c cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/cmpci.c cvs rdiff -u -r1.69 -r1.70 src/sys/dev/pci/if_age.c cvs rdiff -u -r1.78 -r1.79 src/sys/dev/pckbport/synaptics.c cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ppbus/ppbus_msq.c cvs rdiff -u -r1.12 -r1.13 src/sys/kern/kern_hook.c cvs rdiff -u -r1.14 -r1.15 src/sys/kern/subr_blist.c cvs rdiff -u -r1.107 -r1.108 src/sys/kern/subr_vmem.c cvs rdiff -u -r1.22 -r1.23 src/sys/netinet/ip_reass.c cvs rdiff -u -r1.30 -r1.31 src/sys/netinet/sctp_output.c cvs rdiff -u -r1.155 -r1.156 src/sys/uvm/uvm_aobj.c cvs rdiff -u -r1.21 -r1.22 src/tests/dev/audio/audiotest.c cvs rdiff -u -r1.4 -r1.5 src/usr.bin/nbsvtool/nbsvtool.c cvs rdiff -u -r1.13 -r1.14 src/usr.bin/sed/defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: ryo Date: Tue May 31 07:40:25 UTC 2022 Modified Files: src/sys/arch/aarch64/aarch64: cpuswitch.S Log Message: make a frame pointer to show a backtrace correctly. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/aarch64/aarch64/cpuswitch.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/aarch64/cpuswitch.S diff -u src/sys/arch/aarch64/aarch64/cpuswitch.S:1.34 src/sys/arch/aarch64/aarch64/cpuswitch.S:1.35 --- src/sys/arch/aarch64/aarch64/cpuswitch.S:1.34 Fri May 6 06:09:50 2022 +++ src/sys/arch/aarch64/aarch64/cpuswitch.S Tue May 31 07:40:25 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuswitch.S,v 1.34 2022/05/06 06:09:50 ryo Exp $ */ +/* $NetBSD: cpuswitch.S,v 1.35 2022/05/31 07:40:25 ryo Exp $ */ /*- * Copyright (c) 2014, 2020 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include "opt_ddb.h" #include "opt_kasan.h" -RCSID("$NetBSD: cpuswitch.S,v 1.34 2022/05/06 06:09:50 ryo Exp $") +RCSID("$NetBSD: cpuswitch.S,v 1.35 2022/05/31 07:40:25 ryo Exp $") ARMV8_DEFINE_OPTIONS @@ -315,7 +315,10 @@ END(lwp_trampoline) #ifdef DDB ENTRY_NP(cpu_Debugger) + stp fp, lr, [sp, #-16]! + mov fp, sp brk #0x + ldp fp, lr, [sp], #16 ret END(cpu_Debugger) #endif /* DDB */
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: ryo Date: Tue May 31 07:40:25 UTC 2022 Modified Files: src/sys/arch/aarch64/aarch64: cpuswitch.S Log Message: make a frame pointer to show a backtrace correctly. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/aarch64/aarch64/cpuswitch.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libc
Module Name:src Committed By: skrll Date: Tue May 31 07:12:15 UTC 2022 Modified Files: src/tests/lib/libc/arch/hppa: return_one.S src/tests/lib/libc/common: exec_prot.h src/tests/lib/libc/sys: t_mprotect_helper.c t_mprotect_helper.h Log Message: Avoid plabels on hppa to make some tests not crash To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/arch/hppa/return_one.S cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/common/exec_prot.h cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/sys/t_mprotect_helper.c \ src/tests/lib/libc/sys/t_mprotect_helper.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/arch/hppa/return_one.S diff -u src/tests/lib/libc/arch/hppa/return_one.S:1.3 src/tests/lib/libc/arch/hppa/return_one.S:1.4 --- src/tests/lib/libc/arch/hppa/return_one.S:1.3 Tue May 31 07:10:50 2022 +++ src/tests/lib/libc/arch/hppa/return_one.S Tue May 31 07:12:15 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: return_one.S,v 1.3 2022/05/31 07:10:50 skrll Exp $ */ +/* $NetBSD: return_one.S,v 1.4 2022/05/31 07:12:15 skrll Exp $ */ #include @@ -8,3 +8,24 @@ return_one: bv %r0(%r2) ldi 1,%r28 return_one_end: + +.globl return_1, return_1_end; + +return_1: + bv %r0(%r2) + ldi 1,%r28 +return_1_end: + +.globl return_2, return_2_end; + +return_2: + bv %r0(%r2) + ldi 2,%r28 +return_2_end: + +.globl return_3, return_3_end; + +return_3: + bv %r0(%r2) + ldi 3,%r28 +return_3_end: Index: src/tests/lib/libc/common/exec_prot.h diff -u src/tests/lib/libc/common/exec_prot.h:1.1 src/tests/lib/libc/common/exec_prot.h:1.2 --- src/tests/lib/libc/common/exec_prot.h:1.1 Mon Jul 18 23:16:11 2011 +++ src/tests/lib/libc/common/exec_prot.h Tue May 31 07:12:15 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_prot.h,v 1.1 2011/07/18 23:16:11 jym Exp $ */ +/* $NetBSD: exec_prot.h,v 1.2 2022/05/31 07:12:15 skrll Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -40,8 +40,13 @@ /* * Trivial MD shellcode that justs returns 1. */ +#ifdef __hppa__ +extern char return_one[]; +extern char return_one_end[]; +#else int return_one(void); /* begin marker -- shellcode entry */ int return_one_end(void); /* end marker */ +#endif /* * MD callback to verify whether host offers executable space protection. Index: src/tests/lib/libc/sys/t_mprotect_helper.c diff -u src/tests/lib/libc/sys/t_mprotect_helper.c:1.1 src/tests/lib/libc/sys/t_mprotect_helper.c:1.2 --- src/tests/lib/libc/sys/t_mprotect_helper.c:1.1 Sat Apr 18 17:44:53 2020 +++ src/tests/lib/libc/sys/t_mprotect_helper.c Tue May 31 07:12:15 2022 @@ -1,5 +1,6 @@ #include "t_mprotect_helper.h" +#ifndef __hppa__ int return_1(void) { @@ -15,3 +16,4 @@ return_3(void) { return 3; } +#endif Index: src/tests/lib/libc/sys/t_mprotect_helper.h diff -u src/tests/lib/libc/sys/t_mprotect_helper.h:1.1 src/tests/lib/libc/sys/t_mprotect_helper.h:1.2 --- src/tests/lib/libc/sys/t_mprotect_helper.h:1.1 Sat Apr 18 17:45:16 2020 +++ src/tests/lib/libc/sys/t_mprotect_helper.h Tue May 31 07:12:15 2022 @@ -1,3 +1,9 @@ +#ifdef __hppa__ +extern char return_1[]; +extern char return_2[]; +extern char return_3[]; +#else int return_1(void); int return_2(void); int return_3(void); +#endif
CVS commit: src/tests/lib/libc
Module Name:src Committed By: skrll Date: Tue May 31 07:12:15 UTC 2022 Modified Files: src/tests/lib/libc/arch/hppa: return_one.S src/tests/lib/libc/common: exec_prot.h src/tests/lib/libc/sys: t_mprotect_helper.c t_mprotect_helper.h Log Message: Avoid plabels on hppa to make some tests not crash To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/arch/hppa/return_one.S cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/common/exec_prot.h cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/sys/t_mprotect_helper.c \ src/tests/lib/libc/sys/t_mprotect_helper.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libc/arch/hppa
Module Name:src Committed By: skrll Date: Tue May 31 07:10:50 UTC 2022 Modified Files: src/tests/lib/libc/arch/hppa: return_one.S Log Message: whitespace including space before delay slot instruction. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/arch/hppa/return_one.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/arch/hppa/return_one.S diff -u src/tests/lib/libc/arch/hppa/return_one.S:1.2 src/tests/lib/libc/arch/hppa/return_one.S:1.3 --- src/tests/lib/libc/arch/hppa/return_one.S:1.2 Thu Feb 14 10:36:33 2019 +++ src/tests/lib/libc/arch/hppa/return_one.S Tue May 31 07:10:50 2022 @@ -1,10 +1,10 @@ -/* $NetBSD: return_one.S,v 1.2 2019/02/14 10:36:33 mrg Exp $ */ +/* $NetBSD: return_one.S,v 1.3 2022/05/31 07:10:50 skrll Exp $ */ #include .globl return_one, return_one_end; return_one: - bv %r0(%r2) - ldi 1,%r28 + bv %r0(%r2) + ldi 1,%r28 return_one_end:
CVS commit: src/tests/lib/libc/arch/hppa
Module Name:src Committed By: skrll Date: Tue May 31 07:10:50 UTC 2022 Modified Files: src/tests/lib/libc/arch/hppa: return_one.S Log Message: whitespace including space before delay slot instruction. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/arch/hppa/return_one.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.