re: CVS commit: src/sys/external/bsd/drm2/drm
"Taylor R Campbell" writes: > Module Name: src > Committed By: riastradh > Date: Tue Jul 19 23:19:35 UTC 2022 > > Modified Files: > src/sys/external/bsd/drm2/drm: files.drmkms > > Log Message: > drm: Undefine `alpha' in CPPFLAGS. Causes lotsa trouble! > > But don't undefine it outside drmkms; `#ifdef alpha' or equivalent is > used elsewhere in-tree. (Maybe it should be replaced by __alpha__.) welcome to -D${MACHINE}. this isn't the compiler, but our build framework we inherited a long long time ago :-) looks like only a small number of files check for "alpha" vs "__alpha__" currently, and all can likely be switched. .mrg.
CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting
Module Name:xsrc Committed By: mrg Date: Wed Jul 20 03:51:16 UTC 2022 Modified Files: xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting: drmmode_display.c Log Message: use PRIu64 and hopefully fix some clang builds. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting/drmmode_display.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting/drmmode_display.c diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting/drmmode_display.c:1.9 xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting/drmmode_display.c:1.10 --- xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting/drmmode_display.c:1.9 Fri Jul 15 05:08:55 2022 +++ xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting/drmmode_display.c Wed Jul 20 03:51:16 2022 @@ -3921,11 +3921,11 @@ drmmode_crtc_upgrade_lut(xf86CrtcPtr crt crtc->gamma_blue = gamma + size * 2; xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, MS_LOGLEVEL_DEBUG, - "Gamma ramp set to %ld entries on CRTC %d\n", + "Gamma ramp set to %" PRIu64 " entries on CRTC %d\n", size, num); } else { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "Failed to allocate memory for %ld gamma ramp entries " + "Failed to allocate memory for %" PRIu64 " gamma ramp entries " "on CRTC %d.\n", size, num); return FALSE;
CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting
Module Name:xsrc Committed By: mrg Date: Wed Jul 20 03:51:16 UTC 2022 Modified Files: xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting: drmmode_display.c Log Message: use PRIu64 and hopefully fix some clang builds. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/drivers/modesetting/drmmode_display.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/drm
Module Name:src Committed By: riastradh Date: Wed Jul 20 01:38:24 UTC 2022 Modified Files: src/sys/external/bsd/drm2/drm: files.drmkms Log Message: drm: Restore pollution of CPPFLAGS with include directories. Too much trouble to make this fine-grained. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/external/bsd/drm2/drm/files.drmkms 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/drm/files.drmkms diff -u src/sys/external/bsd/drm2/drm/files.drmkms:1.77 src/sys/external/bsd/drm2/drm/files.drmkms:1.78 --- src/sys/external/bsd/drm2/drm/files.drmkms:1.77 Tue Jul 19 23:19:35 2022 +++ src/sys/external/bsd/drm2/drm/files.drmkms Wed Jul 20 01:38:24 2022 @@ -1,4 +1,4 @@ -# $NetBSD: files.drmkms,v 1.77 2022/07/19 23:19:35 riastradh Exp $ +# $NetBSD: files.drmkms,v 1.78 2022/07/20 01:38:24 riastradh Exp $ version 20180827 @@ -17,15 +17,15 @@ define drmkms: drmkms_linux, drmkms_i2c, makeoptions drmkms "COPTS.drmkms"+="-fwrapv" # Overrides first. -makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/include" -makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/include/drm" +makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/drm2/include" +makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/drm2/include/drm" -makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/common/include" +makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/common/include" # Then upstream. -makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/dist/include" -makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/dist/include/drm" -makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/dist/include/uapi" +makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/drm2/dist/include" +makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/drm2/dist/include/drm" +makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/drm2/dist/include/uapi" makeoptions drmkms "CPPFLAGS.drmkms"+="-D__KERNEL__"
CVS commit: src/sys/external/bsd/drm2/drm
Module Name:src Committed By: riastradh Date: Wed Jul 20 01:38:24 UTC 2022 Modified Files: src/sys/external/bsd/drm2/drm: files.drmkms Log Message: drm: Restore pollution of CPPFLAGS with include directories. Too much trouble to make this fine-grained. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/external/bsd/drm2/drm/files.drmkms 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/include
Module Name:src Committed By: riastradh Date: Wed Jul 20 01:35:26 UTC 2022 Modified Files: src/sys/arch/aarch64/include: cpufunc.h Log Message: aarch64: Make cpufunc.h includable without sys/cpu.h first. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/aarch64/include/cpufunc.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/aarch64/include/cpufunc.h diff -u src/sys/arch/aarch64/include/cpufunc.h:1.23 src/sys/arch/aarch64/include/cpufunc.h:1.24 --- src/sys/arch/aarch64/include/cpufunc.h:1.23 Mon Jan 31 09:16:09 2022 +++ src/sys/arch/aarch64/include/cpufunc.h Wed Jul 20 01:35:25 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.h,v 1.23 2022/01/31 09:16:09 ryo Exp $ */ +/* $NetBSD: cpufunc.h,v 1.24 2022/07/20 01:35:25 riastradh Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu @@ -34,6 +34,7 @@ #include #include +#include extern u_int aarch64_cache_vindexsize; /* cachesize/way (VIVT/VIPT) */ extern u_int aarch64_cache_prefer_mask;
CVS commit: src/sys/arch/aarch64/include
Module Name:src Committed By: riastradh Date: Wed Jul 20 01:35:26 UTC 2022 Modified Files: src/sys/arch/aarch64/include: cpufunc.h Log Message: aarch64: Make cpufunc.h includable without sys/cpu.h first. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/aarch64/include/cpufunc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon
Module Name:src Committed By: riastradh Date: Wed Jul 20 01:22:38 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm/radeon: radeon_ttm.c Log Message: drm: Ifdef out alpha-specific logic in radeon. Guessing this is handled transparently by bus_space(9) when we ask for prefetchable linear mappings. Need an alpha wizard to review! To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/radeon
Module Name:src Committed By: riastradh Date: Wed Jul 20 01:22:38 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm/radeon: radeon_ttm.c Log Message: drm: Ifdef out alpha-specific logic in radeon. Guessing this is handled transparently by bus_space(9) when we ask for prefetchable linear mappings. Need an alpha wizard to review! To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 \ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.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/radeon/radeon_ttm.c diff -u src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c:1.25 src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c:1.26 --- src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c:1.25 Sat May 21 17:50:21 2022 +++ src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c Wed Jul 20 01:22:38 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: radeon_ttm.c,v 1.25 2022/05/21 17:50:21 riastradh Exp $ */ +/* $NetBSD: radeon_ttm.c,v 1.26 2022/07/20 01:22:38 riastradh Exp $ */ /* * Copyright 2009 Jerome Glisse. @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: radeon_ttm.c,v 1.25 2022/05/21 17:50:21 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeon_ttm.c,v 1.26 2022/07/20 01:22:38 riastradh Exp $"); #include #include @@ -453,6 +453,7 @@ static int radeon_ttm_io_mem_reserve(str return -EINVAL; mem->bus.base = rdev->mc.aper_base; mem->bus.is_iomem = true; +#ifndef __NetBSD__ /* alpha hose handled through bus_space(9) */ #ifdef __alpha__ /* * Alpha: use bus.addr to hold the ioremap() return, @@ -478,6 +479,7 @@ static int radeon_ttm_io_mem_reserve(str mem->bus.base = (mem->bus.base & 0x0UL) + rdev->ddev->hose->dense_mem_base; #endif +#endif KASSERTMSG((mem->bus.base & (PAGE_SIZE - 1)) == 0, "mc aperture is not page-aligned: %" PRIx64 "", (uint64_t)mem->bus.base);
CVS commit: src/sys/external/bsd/drm2
Module Name:src Committed By: riastradh Date: Wed Jul 20 01:20:20 UTC 2022 Modified Files: src/sys/external/bsd/drm2/linux: linux_pci.c src/sys/external/bsd/drm2/pci: drm_pci_busid.c Log Message: drm: Use real pci segment number, not pciN device unit. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/external/bsd/drm2/linux/linux_pci.c cvs rdiff -u -r1.1 -r1.2 src/sys/external/bsd/drm2/pci/drm_pci_busid.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/linux/linux_pci.c diff -u src/sys/external/bsd/drm2/linux/linux_pci.c:1.22 src/sys/external/bsd/drm2/linux/linux_pci.c:1.23 --- src/sys/external/bsd/drm2/linux/linux_pci.c:1.22 Tue Jul 19 22:24:34 2022 +++ src/sys/external/bsd/drm2/linux/linux_pci.c Wed Jul 20 01:20:20 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_pci.c,v 1.22 2022/07/19 22:24:34 riastradh Exp $ */ +/* $NetBSD: linux_pci.c,v 1.23 2022/07/20 01:20:20 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: linux_pci.c,v 1.22 2022/07/19 22:24:34 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_pci.c,v 1.23 2022/07/20 01:20:20 riastradh Exp $"); #if NACPICA > 0 #include @@ -724,7 +724,7 @@ int pci_domain_nr(struct pci_bus *bus) { - return device_unit(bus->pb_dev); + return pci_get_segment(bus->pb_pc); } /* Index: src/sys/external/bsd/drm2/pci/drm_pci_busid.c diff -u src/sys/external/bsd/drm2/pci/drm_pci_busid.c:1.1 src/sys/external/bsd/drm2/pci/drm_pci_busid.c:1.2 --- src/sys/external/bsd/drm2/pci/drm_pci_busid.c:1.1 Sun Dec 19 11:09:48 2021 +++ src/sys/external/bsd/drm2/pci/drm_pci_busid.c Wed Jul 20 01:20:20 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_pci_busid.c,v 1.1 2021/12/19 11:09:48 riastradh Exp $ */ +/* $NetBSD: drm_pci_busid.c,v 1.2 2022/07/20 01:20:20 riastradh Exp $ */ /*- * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: drm_pci_busid.c,v 1.1 2021/12/19 11:09:48 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: drm_pci_busid.c,v 1.2 2022/07/20 01:20:20 riastradh Exp $"); #include #include @@ -52,7 +52,7 @@ drm_pci_set_busid(struct drm_device *dev KASSERT(dev_is_pci(dev->dev)); master->unique = kasprintf(GFP_KERNEL, "pci:%04x:%02x:%02x.%d", - device_unit(device_parent(dev->dev)), + pci_domain_nr(dev->pdev->bus), pa->pa_bus, pa->pa_device, pa->pa_function); if (master->unique == NULL) return -ENOMEM;
CVS commit: src/sys/external/bsd/drm2
Module Name:src Committed By: riastradh Date: Wed Jul 20 01:20:20 UTC 2022 Modified Files: src/sys/external/bsd/drm2/linux: linux_pci.c src/sys/external/bsd/drm2/pci: drm_pci_busid.c Log Message: drm: Use real pci segment number, not pciN device unit. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/external/bsd/drm2/linux/linux_pci.c cvs rdiff -u -r1.1 -r1.2 src/sys/external/bsd/drm2/pci/drm_pci_busid.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/ttm
Module Name:src Committed By: riastradh Date: Wed Jul 20 01:12:14 UTC 2022 Modified Files: src/sys/external/bsd/drm2/ttm: ttm_bo_vm.c Log Message: drm/ttm: Handle io_mem_pfn, used by amdgpu. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/external/bsd/drm2/ttm/ttm_bo_vm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/ttm
Module Name:src Committed By: riastradh Date: Wed Jul 20 01:12:14 UTC 2022 Modified Files: src/sys/external/bsd/drm2/ttm: ttm_bo_vm.c Log Message: drm/ttm: Handle io_mem_pfn, used by amdgpu. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/external/bsd/drm2/ttm/ttm_bo_vm.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/ttm/ttm_bo_vm.c diff -u src/sys/external/bsd/drm2/ttm/ttm_bo_vm.c:1.20 src/sys/external/bsd/drm2/ttm/ttm_bo_vm.c:1.21 --- src/sys/external/bsd/drm2/ttm/ttm_bo_vm.c:1.20 Sun Dec 19 11:34:14 2021 +++ src/sys/external/bsd/drm2/ttm/ttm_bo_vm.c Wed Jul 20 01:12:14 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ttm_bo_vm.c,v 1.20 2021/12/19 11:34:14 riastradh Exp $ */ +/* $NetBSD: ttm_bo_vm.c,v 1.21 2022/07/20 01:12:14 riastradh Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ttm_bo_vm.c,v 1.20 2021/12/19 11:34:14 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ttm_bo_vm.c,v 1.21 2022/07/20 01:12:14 riastradh Exp $"); #include @@ -192,14 +192,17 @@ ttm_bo_uvm_fault(struct uvm_faultinfo *u /* XXX PGO_ALLPAGES? */ if (pps[i] == PGO_DONTCARE) continue; - if (bo->mem.bus.is_iomem) { + if (!bo->mem.bus.is_iomem) { + paddr = page_to_phys(u.ttm->pages[startpage + i]); + } else if (bdev->driver->io_mem_pfn) { + paddr = (*bdev->driver->io_mem_pfn)(bo, startpage + i) + << PAGE_SHIFT; + } else { const paddr_t cookie = bus_space_mmap(bdev->memt, u.base, ((startpage + i) << PAGE_SHIFT), vm_prot, 0); paddr = pmap_phys_address(cookie); - } else { - paddr = page_to_phys(u.ttm->pages[startpage + i]); } ret = -pmap_enter(ufi->orig_map->pmap, vaddr + i*PAGE_SIZE, paddr, vm_prot, (PMAP_CANFAIL | pgprot));
CVS commit: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu
Module Name:src Committed By: riastradh Date: Wed Jul 20 01:11:54 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu: amdgpu_ttm.c Log Message: amdgpu: Write amdgpu_ttm_io_mem_pfn in terms of bus_space_mmap. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_ttm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_ttm.c diff -u src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_ttm.c:1.10 src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_ttm.c:1.11 --- src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_ttm.c:1.10 Sun Dec 19 12:31:45 2021 +++ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_ttm.c Wed Jul 20 01:11:54 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: amdgpu_ttm.c,v 1.10 2021/12/19 12:31:45 riastradh Exp $ */ +/* $NetBSD: amdgpu_ttm.c,v 1.11 2022/07/20 01:11:54 riastradh Exp $ */ /* * Copyright 2009 Jerome Glisse. @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: amdgpu_ttm.c,v 1.10 2021/12/19 12:31:45 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amdgpu_ttm.c,v 1.11 2022/07/20 01:11:54 riastradh Exp $"); #include #include @@ -764,8 +764,24 @@ static unsigned long amdgpu_ttm_io_mem_p unsigned long offset = (page_offset << PAGE_SHIFT); mm = amdgpu_find_mm_node(>mem, ); +#ifdef __NetBSD__ + /* + * vm_prot and flags are encoded in the pmap cookie, but we + * then discard them; the caller will reapply them as + * appropriate before it gets to pmap_enter. + * + * XXX What if the flags determine not just extra bits in the + * cookie, but the address itself, in case different mapping + * types (like prefetchable) are exposed through different + * ranges instead of different page table entry bit? + */ + const paddr_t cookie = bus_space_mmap(bo->bdev->memt, bo->mem.bus.base, + (mm->start + page_offset) << PAGE_SHIFT, /*vm_prot*/0, /*flags*/0); + return pmap_phys_address(cookie); +#else return (bo->mem.bus.base >> PAGE_SHIFT) + mm->start + (offset >> PAGE_SHIFT); +#endif } /*
CVS commit: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu
Module Name:src Committed By: riastradh Date: Wed Jul 20 01:11:54 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm/amd/amdgpu: amdgpu_ttm.c Log Message: amdgpu: Write amdgpu_ttm_io_mem_pfn in terms of bus_space_mmap. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_ttm.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/drmkms
Module Name:src Committed By: riastradh Date: Wed Jul 20 01:11:39 UTC 2022 Modified Files: src/sys/modules/drmkms: Makefile.inc Log Message: drm: Undefine `alpha' in the module build too. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/modules/drmkms/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/drmkms/Makefile.inc diff -u src/sys/modules/drmkms/Makefile.inc:1.8 src/sys/modules/drmkms/Makefile.inc:1.9 --- src/sys/modules/drmkms/Makefile.inc:1.8 Sun Jul 17 15:05:09 2022 +++ src/sys/modules/drmkms/Makefile.inc Wed Jul 20 01:11:39 2022 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.8 2022/07/17 15:05:09 riastradh Exp $ +# $NetBSD: Makefile.inc,v 1.9 2022/07/20 01:11:39 riastradh Exp $ # Common makefile cruft for drm2 code. @@ -31,6 +31,8 @@ CPPFLAGS+= -DCONFIG_X86_PAT CPPFLAGS+= -DCONFIG_ARM .elif ${MACHINE_ARCH} == "aarch64" CPPFLAGS+= -DCONFIG_ARM64 +.elif ${MACHINE_ARCH} == "alpha" +CPPFLAGS+= -Ualpha .endif CPPFLAGS+= -DCONFIG_BACKLIGHT_CLASS_DEVICE=0
CVS commit: src/sys/modules/drmkms
Module Name:src Committed By: riastradh Date: Wed Jul 20 01:11:39 UTC 2022 Modified Files: src/sys/modules/drmkms: Makefile.inc Log Message: drm: Undefine `alpha' in the module build too. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/modules/drmkms/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/include/drm
Module Name:src Committed By: riastradh Date: Tue Jul 19 23:19:44 UTC 2022 Modified Files: src/sys/external/bsd/drm2/include/drm: bus_dma_hacks.h Log Message: drm: Teach bus_dma_hacks.h about alpha. Not sure if this is correct! Someone who knows alpha should vet. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 \ src/sys/external/bsd/drm2/include/drm/bus_dma_hacks.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/include/drm/bus_dma_hacks.h diff -u src/sys/external/bsd/drm2/include/drm/bus_dma_hacks.h:1.24 src/sys/external/bsd/drm2/include/drm/bus_dma_hacks.h:1.25 --- src/sys/external/bsd/drm2/include/drm/bus_dma_hacks.h:1.24 Sun Dec 19 12:03:21 2021 +++ src/sys/external/bsd/drm2/include/drm/bus_dma_hacks.h Tue Jul 19 23:19:44 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma_hacks.h,v 1.24 2021/12/19 12:03:21 riastradh Exp $ */ +/* $NetBSD: bus_dma_hacks.h,v 1.25 2022/07/19 23:19:44 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -85,6 +85,11 @@ BUS_MEM_TO_PHYS(bus_dma_tag_t dmat, bus_ # define PHYS_TO_BUS_MEM(dmat, paddr) ((bus_addr_t)(paddr)) # define BUS_MEM_TO_PHYS(dmat, baddr) ((paddr_t)(baddr)) #elif defined(__powerpc__) +#elif defined(__alpha__) +# define PHYS_TO_BUS_MEM(dmat, paddr) \ + ((bus_addr_t)(paddr) | (dmat)->_wbase) +# define BUS_MEM_TO_PHYS(dmat, baddr) \ + ((paddr_t)((baddr) & ~(bus_addr_t)(dmat)->_wbase)) #else # error DRM GEM/TTM need new MI bus_dma APIs! Halp! #endif @@ -117,6 +122,8 @@ bus_dmatag_bounces_paddr(bus_dma_tag_t d return dmat->_bounce_thresh && pa >= dmat->_bounce_thresh; #elif defined(__sparc__) || defined(__sparc64__) return false; /* no bounce buffers ever */ +#elif defined(__alpha__) + return (dmat->_wsize == 0 ? false : pa >= dmat->_wsize); #endif }
CVS commit: src/sys/external/bsd/drm2/include/drm
Module Name:src Committed By: riastradh Date: Tue Jul 19 23:19:44 UTC 2022 Modified Files: src/sys/external/bsd/drm2/include/drm: bus_dma_hacks.h Log Message: drm: Teach bus_dma_hacks.h about alpha. Not sure if this is correct! Someone who knows alpha should vet. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 \ src/sys/external/bsd/drm2/include/drm/bus_dma_hacks.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/drm
Module Name:src Committed By: riastradh Date: Tue Jul 19 23:19:35 UTC 2022 Modified Files: src/sys/external/bsd/drm2/drm: files.drmkms Log Message: drm: Undefine `alpha' in CPPFLAGS. Causes lotsa trouble! But don't undefine it outside drmkms; `#ifdef alpha' or equivalent is used elsewhere in-tree. (Maybe it should be replaced by __alpha__.) To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/external/bsd/drm2/drm/files.drmkms 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/drm/files.drmkms diff -u src/sys/external/bsd/drm2/drm/files.drmkms:1.76 src/sys/external/bsd/drm2/drm/files.drmkms:1.77 --- src/sys/external/bsd/drm2/drm/files.drmkms:1.76 Tue Jul 19 23:19:17 2022 +++ src/sys/external/bsd/drm2/drm/files.drmkms Tue Jul 19 23:19:35 2022 @@ -1,4 +1,4 @@ -# $NetBSD: files.drmkms,v 1.76 2022/07/19 23:19:17 riastradh Exp $ +# $NetBSD: files.drmkms,v 1.77 2022/07/19 23:19:35 riastradh Exp $ version 20180827 @@ -40,6 +40,8 @@ elifdef arm makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_ARM" elifdef aarch64 makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_ARM64" +elifdef alpha +makeoptions drmkms "CPPFLAGS.drmkms"+="-Ualpha" endif makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_BACKLIGHT_CLASS_DEVICE=0"
CVS commit: src/sys/external/bsd/drm2/drm
Module Name:src Committed By: riastradh Date: Tue Jul 19 23:19:35 UTC 2022 Modified Files: src/sys/external/bsd/drm2/drm: files.drmkms Log Message: drm: Undefine `alpha' in CPPFLAGS. Causes lotsa trouble! But don't undefine it outside drmkms; `#ifdef alpha' or equivalent is used elsewhere in-tree. (Maybe it should be replaced by __alpha__.) To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/external/bsd/drm2/drm/files.drmkms Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/drm
Module Name:src Committed By: riastradh Date: Tue Jul 19 23:19:27 UTC 2022 Modified Files: src/sys/external/bsd/drm2/drm: drm_cache.c Log Message: drm: Make drm_clflush_* noop on alpha. As far as I know there is no need for this; the CPU has weak ordering on loads and stores requiring ordering barriers, but I/O devices participate in the CPU's cache protocol for access to main memory so there's never any need for explicit cache flushes. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/external/bsd/drm2/drm/drm_cache.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/drm/drm_cache.c diff -u src/sys/external/bsd/drm2/drm/drm_cache.c:1.18 src/sys/external/bsd/drm2/drm/drm_cache.c:1.19 --- src/sys/external/bsd/drm2/drm/drm_cache.c:1.18 Sun Dec 19 11:33:30 2021 +++ src/sys/external/bsd/drm2/drm/drm_cache.c Tue Jul 19 23:19:27 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_cache.c,v 1.18 2021/12/19 11:33:30 riastradh Exp $ */ +/* $NetBSD: drm_cache.c,v 1.19 2022/07/19 23:19:27 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: drm_cache.c,v 1.18 2021/12/19 11:33:30 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: drm_cache.c,v 1.19 2022/07/19 23:19:27 riastradh Exp $"); #include #include @@ -43,7 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: drm_cache.c, #include -#if !defined(__arm__) && !defined(__aarch64__) +#if !defined(__arm__) && !defined(__aarch64__) && !defined(__alpha__) #define DRM_CLFLUSH 1 #endif
CVS commit: src/sys/external/bsd/drm2/drm
Module Name:src Committed By: riastradh Date: Tue Jul 19 23:19:27 UTC 2022 Modified Files: src/sys/external/bsd/drm2/drm: drm_cache.c Log Message: drm: Make drm_clflush_* noop on alpha. As far as I know there is no need for this; the CPU has weak ordering on loads and stores requiring ordering barriers, but I/O devices participate in the CPU's cache protocol for access to main memory so there's never any need for explicit cache flushes. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/external/bsd/drm2/drm/drm_cache.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/drm
Module Name:src Committed By: riastradh Date: Tue Jul 19 23:19:17 UTC 2022 Modified Files: src/sys/external/bsd/drm2/drm: files.drmkms Log Message: drm: Narrow scope of drm CPPLAGS just to drm files. No need for various Linux compat definitions elsewhere in the kernel. To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/sys/external/bsd/drm2/drm/files.drmkms 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/drm/files.drmkms diff -u src/sys/external/bsd/drm2/drm/files.drmkms:1.75 src/sys/external/bsd/drm2/drm/files.drmkms:1.76 --- src/sys/external/bsd/drm2/drm/files.drmkms:1.75 Tue Jul 19 23:19:06 2022 +++ src/sys/external/bsd/drm2/drm/files.drmkms Tue Jul 19 23:19:17 2022 @@ -1,4 +1,4 @@ -# $NetBSD: files.drmkms,v 1.75 2022/07/19 23:19:06 riastradh Exp $ +# $NetBSD: files.drmkms,v 1.76 2022/07/19 23:19:17 riastradh Exp $ version 20180827 @@ -17,38 +17,38 @@ define drmkms: drmkms_linux, drmkms_i2c, makeoptions drmkms "COPTS.drmkms"+="-fwrapv" # Overrides first. -makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/drm2/include" -makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/drm2/include/drm" +makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/include" +makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/include/drm" -makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/common/include" +makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/common/include" # Then upstream. -makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/drm2/dist/include" -makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/drm2/dist/include/drm" -makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/drm2/dist/include/uapi" +makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/dist/include" +makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/dist/include/drm" +makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/dist/include/uapi" -makeoptions drmkms CPPFLAGS+="-D__KERNEL__" +makeoptions drmkms "CPPFLAGS.drmkms"+="-D__KERNEL__" ifdef i386 -makeoptions drmkms CPPFLAGS+="-DCONFIG_X86" -makeoptions drmkms CPPFLAGS+="-DCONFIG_X86_PAT" +makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_X86" +makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_X86_PAT" elifdef amd64 -makeoptions drmkms CPPFLAGS+="-DCONFIG_X86" -makeoptions drmkms CPPFLAGS+="-DCONFIG_X86_64" -makeoptions drmkms CPPFLAGS+="-DCONFIG_X86_PAT" +makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_X86" +makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_X86_64" +makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_X86_PAT" elifdef arm -makeoptions drmkms CPPFLAGS+="-DCONFIG_ARM" +makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_ARM" elifdef aarch64 -makeoptions drmkms CPPFLAGS+="-DCONFIG_ARM64" +makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_ARM64" endif -makeoptions drmkms CPPFLAGS+="-DCONFIG_BACKLIGHT_CLASS_DEVICE=0" -makeoptions drmkms CPPFLAGS+="-DCONFIG_BACKLIGHT_CLASS_DEVICE_MODULE=0" -makeoptions drmkms CPPFLAGS+="-DCONFIG_DRM_FBDEV_EMULATION=1" -makeoptions drmkms CPPFLAGS+="-DCONFIG_DRM_FBDEV_OVERALLOC=100" -makeoptions drmkms CPPFLAGS+="-DCONFIG_FB=0" -makeoptions drmkms CPPFLAGS+="-DCONFIG_LOCKDEP=0" -makeoptions drmkms CPPFLAGS+="-DCONFIG_PCI=1" +makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_BACKLIGHT_CLASS_DEVICE=0" +makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_BACKLIGHT_CLASS_DEVICE_MODULE=0" +makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_DRM_FBDEV_EMULATION=1" +makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_DRM_FBDEV_OVERALLOC=100" +makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_FB=0" +makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_LOCKDEP=0" +makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_PCI=1" makeoptions drmkms "CWARNFLAGS.drmkms"+="-Wno-missing-field-initializers"
CVS commit: src/sys/external/bsd/drm2/drm
Module Name:src Committed By: riastradh Date: Tue Jul 19 23:19:17 UTC 2022 Modified Files: src/sys/external/bsd/drm2/drm: files.drmkms Log Message: drm: Narrow scope of drm CPPLAGS just to drm files. No need for various Linux compat definitions elsewhere in the kernel. To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/sys/external/bsd/drm2/drm/files.drmkms Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2
Module Name:src Committed By: riastradh Date: Tue Jul 19 23:19:07 UTC 2022 Modified Files: src/sys/external/bsd/drm2/amdgpu: files.amdgpu src/sys/external/bsd/drm2/drm: files.drmkms src/sys/external/bsd/drm2/i915drm: files.i915drmkms src/sys/external/bsd/drm2/nouveau: files.nouveau src/sys/external/bsd/drm2/pci: files.drmkms_pci src/sys/external/bsd/drm2/radeon: files.radeon src/sys/external/bsd/drm2/ttm: files.ttm src/sys/external/bsd/drm2/via: files.via src/sys/external/bsd/drm2/vmwgfx: files.vmwgfx Log Message: drm: Propagate CPPFLAGS.drmkms into all the drm drivers. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/external/bsd/drm2/amdgpu/files.amdgpu cvs rdiff -u -r1.74 -r1.75 src/sys/external/bsd/drm2/drm/files.drmkms cvs rdiff -u -r1.87 -r1.88 src/sys/external/bsd/drm2/i915drm/files.i915drmkms cvs rdiff -u -r1.37 -r1.38 src/sys/external/bsd/drm2/nouveau/files.nouveau cvs rdiff -u -r1.16 -r1.17 src/sys/external/bsd/drm2/pci/files.drmkms_pci cvs rdiff -u -r1.36 -r1.37 src/sys/external/bsd/drm2/radeon/files.radeon cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm2/ttm/files.ttm cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/via/files.via cvs rdiff -u -r1.1 -r1.2 src/sys/external/bsd/drm2/vmwgfx/files.vmwgfx 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/amdgpu/files.amdgpu diff -u src/sys/external/bsd/drm2/amdgpu/files.amdgpu:1.26 src/sys/external/bsd/drm2/amdgpu/files.amdgpu:1.27 --- src/sys/external/bsd/drm2/amdgpu/files.amdgpu:1.26 Sun Dec 19 12:39:48 2021 +++ src/sys/external/bsd/drm2/amdgpu/files.amdgpu Tue Jul 19 23:19:06 2022 @@ -1,10 +1,11 @@ -# $NetBSD: files.amdgpu,v 1.26 2021/12/19 12:39:48 riastradh Exp $ +# $NetBSD: files.amdgpu,v 1.27 2022/07/19 23:19:06 riastradh Exp $ version 20180827 define amdgpufbbus { } device amdgpu: drmkms, drmkms_pci, drmkms_ttm, amdgpufbbus, firmload attach amdgpu at pci +makeoptions amdgpu "CPPFLAGS.amdgpu"+="${CPPFLAGS.drmkms}" defflag opt_amdgpu_cik.h AMDGPU_CIK Index: src/sys/external/bsd/drm2/drm/files.drmkms diff -u src/sys/external/bsd/drm2/drm/files.drmkms:1.74 src/sys/external/bsd/drm2/drm/files.drmkms:1.75 --- src/sys/external/bsd/drm2/drm/files.drmkms:1.74 Tue Jul 19 22:24:47 2022 +++ src/sys/external/bsd/drm2/drm/files.drmkms Tue Jul 19 23:19:06 2022 @@ -1,4 +1,4 @@ -# $NetBSD: files.drmkms,v 1.74 2022/07/19 22:24:47 riastradh Exp $ +# $NetBSD: files.drmkms,v 1.75 2022/07/19 23:19:06 riastradh Exp $ version 20180827 @@ -67,6 +67,8 @@ file external/bsd/drm2/pci/drm_pci_busid define drmfb: genfb file external/bsd/drm2/drm/drmfb.c drmfb +makeoptions drmfb "CPPFLAGS.drmfb"+="${CPPFLAGS.drmkms}" + include "external/bsd/drm2/ttm/files.ttm" makeoptions drmkms "CWARNFLAGS.drm_atomic_helper.c"+="-Wno-shadow" @@ -84,7 +86,8 @@ makeoptions drmkms "CWARNFLAGS.drm_mod # Legacy user-mode setting define drmums: drmkms -makeoptions drmums CPPFLAGS+="-DCONFIG_DRM_LEGACY" +makeoptions drmums "CPPFLAGS.drmkms"+="-DCONFIG_DRM_LEGACY" +makeoptions drmums "CPPFLAGS.drmums"+="${CPPFLAGS.drmkms}" file external/bsd/drm2/dist/drm/drm_bufs.c drmums file external/bsd/drm2/dist/drm/drm_context.c drmums file external/bsd/drm2/dist/drm/drm_dma.c drmums Index: src/sys/external/bsd/drm2/i915drm/files.i915drmkms diff -u src/sys/external/bsd/drm2/i915drm/files.i915drmkms:1.87 src/sys/external/bsd/drm2/i915drm/files.i915drmkms:1.88 --- src/sys/external/bsd/drm2/i915drm/files.i915drmkms:1.87 Sun Jul 17 14:10:32 2022 +++ src/sys/external/bsd/drm2/i915drm/files.i915drmkms Tue Jul 19 23:19:06 2022 @@ -1,10 +1,11 @@ -# $NetBSD: files.i915drmkms,v 1.87 2022/07/17 14:10:32 riastradh Exp $ +# $NetBSD: files.i915drmkms,v 1.88 2022/07/19 23:19:06 riastradh Exp $ version 20180827 define intelfbbus { } device i915drmkms: acpivga, drmkms, drmkms_pci, intelfbbus, agp_i810, firmload attach i915drmkms at pci +makeoptions i915drmkms "CPPFLAGS.i915drmkms"+="${CPPFLAGS.drmkms}" device intelfb: intelfbbus, drmfb, drmfb_pci, wsemuldisplaydev attach intelfb at intelfbbus Index: src/sys/external/bsd/drm2/nouveau/files.nouveau diff -u src/sys/external/bsd/drm2/nouveau/files.nouveau:1.37 src/sys/external/bsd/drm2/nouveau/files.nouveau:1.38 --- src/sys/external/bsd/drm2/nouveau/files.nouveau:1.37 Tue Dec 21 12:55:24 2021 +++ src/sys/external/bsd/drm2/nouveau/files.nouveau Tue Jul 19 23:19:07 2022 @@ -1,9 +1,10 @@ -# $NetBSD: files.nouveau,v 1.37 2021/12/21 12:55:24 tnn Exp $ +# $NetBSD: files.nouveau,v 1.38 2022/07/19 23:19:07 riastradh Exp $ version 20180827 define nouveaufbbus { } device nouveau: drmkms, drmkms_ttm, nouveaufbbus, firmload +makeoptions nouveau "CPPFLAGS.nouveau"+="${CPPFLAGS.drmkms}" attach nouveau at pci with nouveau_pci: drmkms_pci file external/bsd/drm2/nouveau/nouveau_pci.c nouveau_pci
CVS commit: src/sys/external/bsd/drm2
Module Name:src Committed By: riastradh Date: Tue Jul 19 23:19:07 UTC 2022 Modified Files: src/sys/external/bsd/drm2/amdgpu: files.amdgpu src/sys/external/bsd/drm2/drm: files.drmkms src/sys/external/bsd/drm2/i915drm: files.i915drmkms src/sys/external/bsd/drm2/nouveau: files.nouveau src/sys/external/bsd/drm2/pci: files.drmkms_pci src/sys/external/bsd/drm2/radeon: files.radeon src/sys/external/bsd/drm2/ttm: files.ttm src/sys/external/bsd/drm2/via: files.via src/sys/external/bsd/drm2/vmwgfx: files.vmwgfx Log Message: drm: Propagate CPPFLAGS.drmkms into all the drm drivers. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/external/bsd/drm2/amdgpu/files.amdgpu cvs rdiff -u -r1.74 -r1.75 src/sys/external/bsd/drm2/drm/files.drmkms cvs rdiff -u -r1.87 -r1.88 src/sys/external/bsd/drm2/i915drm/files.i915drmkms cvs rdiff -u -r1.37 -r1.38 src/sys/external/bsd/drm2/nouveau/files.nouveau cvs rdiff -u -r1.16 -r1.17 src/sys/external/bsd/drm2/pci/files.drmkms_pci cvs rdiff -u -r1.36 -r1.37 src/sys/external/bsd/drm2/radeon/files.radeon cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm2/ttm/files.ttm cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/via/files.via cvs rdiff -u -r1.1 -r1.2 src/sys/external/bsd/drm2/vmwgfx/files.vmwgfx Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/drm
Module Name:src Committed By: riastradh Date: Tue Jul 19 22:24:48 UTC 2022 Modified Files: src/sys/external/bsd/drm2/drm: drm_module.c files.drmkms Log Message: drm: Note dependency on sysmon_power. drm uses this for pswitch events to notify of hotplug. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/external/bsd/drm2/drm/drm_module.c cvs rdiff -u -r1.73 -r1.74 src/sys/external/bsd/drm2/drm/files.drmkms 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/drm/drm_module.c diff -u src/sys/external/bsd/drm2/drm/drm_module.c:1.30 src/sys/external/bsd/drm2/drm/drm_module.c:1.31 --- src/sys/external/bsd/drm2/drm/drm_module.c:1.30 Sun Jul 17 14:11:40 2022 +++ src/sys/external/bsd/drm2/drm/drm_module.c Tue Jul 19 22:24:47 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_module.c,v 1.30 2022/07/17 14:11:40 riastradh Exp $ */ +/* $NetBSD: drm_module.c,v 1.31 2022/07/19 22:24:47 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: drm_module.c,v 1.30 2022/07/17 14:11:40 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: drm_module.c,v 1.31 2022/07/19 22:24:47 riastradh Exp $"); #include #include @@ -94,7 +94,7 @@ __KERNEL_RCSID(0, "$NetBSD: drm_module.c /* * XXX I2C stuff should be moved to a separate drmkms_i2c module. */ -MODULE(MODULE_CLASS_DRIVER, drmkms, "drmkms_linux"); +MODULE(MODULE_CLASS_DRIVER, drmkms, "drmkms_linux,sysmon_power"); struct mutex drm_global_mutex; Index: src/sys/external/bsd/drm2/drm/files.drmkms diff -u src/sys/external/bsd/drm2/drm/files.drmkms:1.73 src/sys/external/bsd/drm2/drm/files.drmkms:1.74 --- src/sys/external/bsd/drm2/drm/files.drmkms:1.73 Sun May 22 00:10:56 2022 +++ src/sys/external/bsd/drm2/drm/files.drmkms Tue Jul 19 22:24:47 2022 @@ -1,4 +1,4 @@ -# $NetBSD: files.drmkms,v 1.73 2022/05/22 00:10:56 tnn Exp $ +# $NetBSD: files.drmkms,v 1.74 2022/07/19 22:24:47 riastradh Exp $ version 20180827 @@ -10,7 +10,7 @@ include "external/bsd/drm2/linux/files.d # ARM SoC graphics drivers. define drmkms_i2c: drmkms_linux -define drmkms: drmkms_linux, drmkms_i2c, linux +define drmkms: drmkms_linux, drmkms_i2c, linux, sysmon_power # This code comes from the Linux kernel, which assumes signed # overflow is OK.
CVS commit: src/sys/external/bsd/drm2/drm
Module Name:src Committed By: riastradh Date: Tue Jul 19 22:24:48 UTC 2022 Modified Files: src/sys/external/bsd/drm2/drm: drm_module.c files.drmkms Log Message: drm: Note dependency on sysmon_power. drm uses this for pswitch events to notify of hotplug. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/external/bsd/drm2/drm/drm_module.c cvs rdiff -u -r1.73 -r1.74 src/sys/external/bsd/drm2/drm/files.drmkms Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2
Module Name:src Committed By: riastradh Date: Tue Jul 19 22:24:34 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm: drm_agpsupport.c src/sys/external/bsd/drm2/dist/include/drm: drm_agpsupport.h src/sys/external/bsd/drm2/drm: drm_agp_hook.c src/sys/external/bsd/drm2/linux: linux_pci.c Log Message: drm: Nix drm_agp_borrow. This horrible kludge dates from before I understood the relation of genfb_pci and pci drm drivers in the old and new worlds of drm. The only user of it, in i915, was changed to use agp_i810_borrow directly in the last drm update, so this hack can die. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 \ src/sys/external/bsd/drm2/dist/drm/drm_agpsupport.c cvs rdiff -u -r1.9 -r1.10 \ src/sys/external/bsd/drm2/dist/include/drm/drm_agpsupport.h cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/drm/drm_agp_hook.c cvs rdiff -u -r1.21 -r1.22 src/sys/external/bsd/drm2/linux/linux_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/drm_agpsupport.c diff -u src/sys/external/bsd/drm2/dist/drm/drm_agpsupport.c:1.12 src/sys/external/bsd/drm2/dist/drm/drm_agpsupport.c:1.13 --- src/sys/external/bsd/drm2/dist/drm/drm_agpsupport.c:1.12 Sat Dec 18 23:44:57 2021 +++ src/sys/external/bsd/drm2/dist/drm/drm_agpsupport.c Tue Jul 19 22:24:33 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_agpsupport.c,v 1.12 2021/12/18 23:44:57 riastradh Exp $ */ +/* $NetBSD: drm_agpsupport.c,v 1.13 2022/07/19 22:24:33 riastradh Exp $ */ /* * \file drm_agpsupport.c @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: drm_agpsupport.c,v 1.12 2021/12/18 23:44:57 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: drm_agpsupport.c,v 1.13 2022/07/19 22:24:33 riastradh Exp $"); #include #include @@ -527,24 +527,8 @@ static void drm_agp_clear_hook(struct dr dev->agp->acquired = 0; dev->agp->enabled = 0; } -#ifdef __NetBSD__ - -static void __pci_iomem * -drm_agp_borrow_hook(struct drm_device *dev, unsigned i, bus_size_t size) -{ - struct pci_dev *pdev = dev->pdev; - if (!agp_i810_borrow(pdev->pd_resources[i].addr, size, - >pd_resources[i].bsh)) - return NULL; - /* XXX Synchronize with pci_iomap in linux_pci.c. */ - pdev->pd_resources[i].bst = pdev->pd_pa.pa_memt; - pdev->pd_resources[i].kva = bus_space_vaddr(pdev->pd_resources[i].bst, - pdev->pd_resources[i].bsh); - pdev->pd_resources[i].mapped = true; - - return pdev->pd_resources[i].kva; -} +#ifdef __NetBSD__ static void drm_agp_flush_hook(void) @@ -572,7 +556,6 @@ static const struct drm_agp_hooks agp_ho .agph_free_ioctl = drm_agp_free_ioctl_hook, .agph_init = drm_agp_init_hook, .agph_clear = drm_agp_clear_hook, - .agph_borrow = drm_agp_borrow_hook, .agph_flush = drm_agp_flush_hook, }; @@ -622,6 +605,8 @@ drmkms_agp_modcmd(modcmd_t cmd, void *ar if (error) return error; return 0; + case MODULE_CMD_AUTOUNLOAD: + return EBUSY; case MODULE_CMD_FINI: error = drmkms_agp_fini(); if (error) Index: src/sys/external/bsd/drm2/dist/include/drm/drm_agpsupport.h diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_agpsupport.h:1.9 src/sys/external/bsd/drm2/dist/include/drm/drm_agpsupport.h:1.10 --- src/sys/external/bsd/drm2/dist/include/drm/drm_agpsupport.h:1.9 Sat Dec 18 23:45:45 2021 +++ src/sys/external/bsd/drm2/dist/include/drm/drm_agpsupport.h Tue Jul 19 22:24:34 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_agpsupport.h,v 1.9 2021/12/18 23:45:45 riastradh Exp $ */ +/* $NetBSD: drm_agpsupport.h,v 1.10 2022/07/19 22:24:34 riastradh Exp $ */ /* SPDX-License-Identifier: GPL-2.0 */ #ifndef _DRM_AGPSUPPORT_H_ @@ -20,8 +20,6 @@ struct drm_device; struct drm_file; struct drm_agp_hooks { - void __pci_iomem * - (*agph_borrow)(struct drm_device *, unsigned, bus_size_t); void (*agph_flush)(void); struct drm_agp_head * @@ -108,7 +106,6 @@ int drm_agp_bind_ioctl(struct drm_device struct drm_file *file_priv); #ifdef __NetBSD__ -void __pci_iomem *drm_agp_borrow(struct drm_device *, unsigned, bus_size_t); void drm_agp_flush(void); void drm_agp_fini(struct drm_device *); int drm_agp_register(const struct drm_agp_hooks *); Index: src/sys/external/bsd/drm2/drm/drm_agp_hook.c diff -u src/sys/external/bsd/drm2/drm/drm_agp_hook.c:1.6 src/sys/external/bsd/drm2/drm/drm_agp_hook.c:1.7 --- src/sys/external/bsd/drm2/drm/drm_agp_hook.c:1.6 Sun Dec 19 09:52:00 2021 +++ src/sys/external/bsd/drm2/drm/drm_agp_hook.c Tue Jul 19 22:24:34 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_agp_hook.c,v 1.6 2021/12/19 09:52:00 riastradh Exp $ */ +/* $NetBSD: drm_agp_hook.c,v 1.7 2022/07/19 22:24:34 riastradh Exp $ */ /*- * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: drm_agp_hook.c,v 1.6 2021/12/19 09:52:00 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: drm_agp_hook.c,v 1.7
CVS commit: src/sys/external/bsd/drm2
Module Name:src Committed By: riastradh Date: Tue Jul 19 22:24:34 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm: drm_agpsupport.c src/sys/external/bsd/drm2/dist/include/drm: drm_agpsupport.h src/sys/external/bsd/drm2/drm: drm_agp_hook.c src/sys/external/bsd/drm2/linux: linux_pci.c Log Message: drm: Nix drm_agp_borrow. This horrible kludge dates from before I understood the relation of genfb_pci and pci drm drivers in the old and new worlds of drm. The only user of it, in i915, was changed to use agp_i810_borrow directly in the last drm update, so this hack can die. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 \ src/sys/external/bsd/drm2/dist/drm/drm_agpsupport.c cvs rdiff -u -r1.9 -r1.10 \ src/sys/external/bsd/drm2/dist/include/drm/drm_agpsupport.h cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/drm/drm_agp_hook.c cvs rdiff -u -r1.21 -r1.22 src/sys/external/bsd/drm2/linux/linux_pci.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/alpha/include
Module Name:src Committed By: riastradh Date: Tue Jul 19 22:04:14 UTC 2022 Modified Files: src/sys/arch/alpha/include: pmap.h Log Message: alpha: Fix missing includes in pmap.h. To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.99 src/sys/arch/alpha/include/pmap.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/alpha/include/pmap.h diff -u src/sys/arch/alpha/include/pmap.h:1.98 src/sys/arch/alpha/include/pmap.h:1.99 --- src/sys/arch/alpha/include/pmap.h:1.98 Mon May 31 17:22:44 2021 +++ src/sys/arch/alpha/include/pmap.h Tue Jul 19 22:04:14 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.98 2021/05/31 17:22:44 thorpej Exp $ */ +/* $NetBSD: pmap.h,v 1.99 2022/07/19 22:04:14 riastradh Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007 The NetBSD Foundation, Inc. @@ -110,6 +110,9 @@ #include "opt_multiprocessor.h" #endif +#include +#include + #include #include
CVS commit: src/sys/arch/alpha/include
Module Name:src Committed By: riastradh Date: Tue Jul 19 22:04:14 UTC 2022 Modified Files: src/sys/arch/alpha/include: pmap.h Log Message: alpha: Fix missing includes in pmap.h. To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.99 src/sys/arch/alpha/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/common/include/asm
Module Name:src Committed By: riastradh Date: Tue Jul 19 21:30:40 UTC 2022 Modified Files: src/sys/external/bsd/common/include/asm: barrier.h Log Message: linux: Add alpha definitions of mb/wmb/rmb too for fun. Who wants to plug an amdgpu into their alpha? To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/external/bsd/common/include/asm/barrier.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/common/include/asm/barrier.h diff -u src/sys/external/bsd/common/include/asm/barrier.h:1.18 src/sys/external/bsd/common/include/asm/barrier.h:1.19 --- src/sys/external/bsd/common/include/asm/barrier.h:1.18 Tue Jul 19 16:40:26 2022 +++ src/sys/external/bsd/common/include/asm/barrier.h Tue Jul 19 21:30:40 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: barrier.h,v 1.18 2022/07/19 16:40:26 riastradh Exp $ */ +/* $NetBSD: barrier.h,v 1.19 2022/07/19 21:30:40 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -82,6 +82,11 @@ #define mb() wbflush() #define wmb() mb() #define rmb() mb() +#elif defined(__alpha__) +#include +#define mb() alpha_mb() +#define wmb() alpha_wmb() +#define rmb() mb() #else #error Missing Linux memory-mapped I/O barriers for this architecture. #endif
CVS commit: src/sys/external/bsd/common/include/asm
Module Name:src Committed By: riastradh Date: Tue Jul 19 21:30:40 UTC 2022 Modified Files: src/sys/external/bsd/common/include/asm: barrier.h Log Message: linux: Add alpha definitions of mb/wmb/rmb too for fun. Who wants to plug an amdgpu into their alpha? To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/external/bsd/common/include/asm/barrier.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/common/include/asm
Module Name:src Committed By: riastradh Date: Tue Jul 19 16:40:26 UTC 2022 Modified Files: src/sys/external/bsd/common/include/asm: barrier.h Log Message: linux: Clarify error message in asm/barrier.h. Not just for drm. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/external/bsd/common/include/asm/barrier.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/common/include/asm/barrier.h diff -u src/sys/external/bsd/common/include/asm/barrier.h:1.17 src/sys/external/bsd/common/include/asm/barrier.h:1.18 --- src/sys/external/bsd/common/include/asm/barrier.h:1.17 Tue Jul 19 16:38:39 2022 +++ src/sys/external/bsd/common/include/asm/barrier.h Tue Jul 19 16:40:26 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: barrier.h,v 1.17 2022/07/19 16:38:39 riastradh Exp $ */ +/* $NetBSD: barrier.h,v 1.18 2022/07/19 16:40:26 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -83,7 +83,7 @@ #define wmb() mb() #define rmb() mb() #else -#error Define machine-dependent memory-mapped I/O barriers for drm. +#error Missing Linux memory-mapped I/O barriers for this architecture. #endif /*
CVS commit: src/sys/external/bsd/common/include/asm
Module Name:src Committed By: riastradh Date: Tue Jul 19 16:40:26 UTC 2022 Modified Files: src/sys/external/bsd/common/include/asm: barrier.h Log Message: linux: Clarify error message in asm/barrier.h. Not just for drm. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/external/bsd/common/include/asm/barrier.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/common/include/asm
Module Name:src Committed By: riastradh Date: Tue Jul 19 16:38:39 UTC 2022 Modified Files: src/sys/external/bsd/common/include/asm: barrier.h Log Message: linux: Add mips definitions for mb, wmb, rmb. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/external/bsd/common/include/asm/barrier.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/common/include/asm
Module Name:src Committed By: riastradh Date: Tue Jul 19 16:38:39 UTC 2022 Modified Files: src/sys/external/bsd/common/include/asm: barrier.h Log Message: linux: Add mips definitions for mb, wmb, rmb. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/external/bsd/common/include/asm/barrier.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/common/include/asm/barrier.h diff -u src/sys/external/bsd/common/include/asm/barrier.h:1.16 src/sys/external/bsd/common/include/asm/barrier.h:1.17 --- src/sys/external/bsd/common/include/asm/barrier.h:1.16 Tue Jul 19 16:38:22 2022 +++ src/sys/external/bsd/common/include/asm/barrier.h Tue Jul 19 16:38:39 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: barrier.h,v 1.16 2022/07/19 16:38:22 riastradh Exp $ */ +/* $NetBSD: barrier.h,v 1.17 2022/07/19 16:38:39 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -77,6 +77,11 @@ #endif #define wmb() mb() /* XXX could maybe be __insn_barrier in TSO */ #define rmb() mb() /* XXX could maybe be __insn_barrier in TSO */ +#elif defined(__mips__) +#include +#define mb() wbflush() +#define wmb() mb() +#define rmb() mb() #else #error Define machine-dependent memory-mapped I/O barriers for drm. #endif
CVS commit: src/sys/external/bsd/common/include/asm
Module Name:src Committed By: riastradh Date: Tue Jul 19 16:38:22 UTC 2022 Modified Files: src/sys/external/bsd/common/include/asm: barrier.h Log Message: linux: Use dsb(sy/st/ld) from arm/cpufunc.h for mb/wmb/rmb. Works on more Arm CPU types this way. From skrll. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/external/bsd/common/include/asm/barrier.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/common/include/asm/barrier.h diff -u src/sys/external/bsd/common/include/asm/barrier.h:1.15 src/sys/external/bsd/common/include/asm/barrier.h:1.16 --- src/sys/external/bsd/common/include/asm/barrier.h:1.15 Sun Jul 17 22:02:23 2022 +++ src/sys/external/bsd/common/include/asm/barrier.h Tue Jul 19 16:38:22 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: barrier.h,v 1.15 2022/07/17 22:02:23 riastradh Exp $ */ +/* $NetBSD: barrier.h,v 1.16 2022/07/19 16:38:22 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -51,11 +51,13 @@ * doesn't pass around the bus space tag and handle needed for that. */ #if defined(__aarch64__) -#define mb() __asm __volatile ("dsb sy" ::: "memory") -#define wmb() __asm __volatile ("dsb st" ::: "memory") -#define rmb() __asm __volatile ("dsb ld" ::: "memory") +#include +#define mb() dsb(sy) +#define wmb() dsb(st) +#define rmb() dsb(ld) #elif defined(__arm__) -#define mb() __asm __volatile ("dsb" ::: "memory") +#include +#define mb() dsb() #define wmb() mb() #define rmb() mb() #elif defined(__i386__) || defined(__x86_64__)
CVS commit: src/sys/external/bsd/common/include/asm
Module Name:src Committed By: riastradh Date: Tue Jul 19 16:38:22 UTC 2022 Modified Files: src/sys/external/bsd/common/include/asm: barrier.h Log Message: linux: Use dsb(sy/st/ld) from arm/cpufunc.h for mb/wmb/rmb. Works on more Arm CPU types this way. From skrll. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/external/bsd/common/include/asm/barrier.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: riastradh Date: Tue Jul 19 08:22:34 UTC 2022 Modified Files: src/sys/dev/pci: if_wm.c Log Message: wm(4): Use CSR_WRITE_FLUSH, not bus_space_barrier. The bus space is mapped non-prefetchable and non-cacheable, so there is no need for bus_space_barrier and it might not even have any effect -- bus_space_read/write are totally ordered for non- prefetchable, non-cacheable mappings anyway. Presumably the intent here was to wait for acknowledgment of the write from the device -- which bus_space_barrier does not guarantee, and which I expect requires a read transaction as CSR_WRITE_FLUSH performs. ok msaitoh@, knakahara@ To generate a diff of this commit: cvs rdiff -u -r1.744 -r1.745 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.744 src/sys/dev/pci/if_wm.c:1.745 --- src/sys/dev/pci/if_wm.c:1.744 Tue Jul 19 08:21:02 2022 +++ src/sys/dev/pci/if_wm.c Tue Jul 19 08:22:34 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.744 2022/07/19 08:21:02 riastradh Exp $ */ +/* $NetBSD: if_wm.c,v 1.745 2022/07/19 08:22:34 riastradh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.744 2022/07/19 08:21:02 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.745 2022/07/19 08:22:34 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -4923,8 +4923,7 @@ wm_flush_desc_rings(struct wm_softc *sc) txq->txq_next = WM_NEXTTX(txq, txq->txq_next); CSR_WRITE(sc, WMREG_TDT(0), txq->txq_next); - bus_space_barrier(sc->sc_st, sc->sc_sh, 0, 0, - BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + CSR_WRITE_FLUSH(sc); delay(250); preg = pci_conf_read(sc->sc_pc, sc->sc_pcitag, WM_PCI_DESCRING_STATUS);
CVS commit: src/sys/dev/pci
Module Name:src Committed By: riastradh Date: Tue Jul 19 08:22:34 UTC 2022 Modified Files: src/sys/dev/pci: if_wm.c Log Message: wm(4): Use CSR_WRITE_FLUSH, not bus_space_barrier. The bus space is mapped non-prefetchable and non-cacheable, so there is no need for bus_space_barrier and it might not even have any effect -- bus_space_read/write are totally ordered for non- prefetchable, non-cacheable mappings anyway. Presumably the intent here was to wait for acknowledgment of the write from the device -- which bus_space_barrier does not guarantee, and which I expect requires a read transaction as CSR_WRITE_FLUSH performs. ok msaitoh@, knakahara@ To generate a diff of this commit: cvs rdiff -u -r1.744 -r1.745 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: riastradh Date: Tue Jul 19 08:21:02 UTC 2022 Modified Files: src/sys/dev/pci: if_wm.c Log Message: wm(4): Use bus_dmamap_sync, not bus_space_barrier, for tx desc. The newly written tx descriptor needs to be visible to the device before the TDT register is set. There's no bus space mappings that need any barriers, though -- nothing mapped prefetchable or cacheable here. So bus_dmamap_sync (via wm_cdtxsync) is necessary, not bus_space_barrier. By accident, bus_space_barrier implies the same barrier instructions as bus_dmamap_sync on some architectures, but it wouldn't work at all if we were bouncing. ok msaitoh@, knakahara@ To generate a diff of this commit: cvs rdiff -u -r1.743 -r1.744 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.743 src/sys/dev/pci/if_wm.c:1.744 --- src/sys/dev/pci/if_wm.c:1.743 Tue Jul 19 06:50:34 2022 +++ src/sys/dev/pci/if_wm.c Tue Jul 19 08:21:02 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.743 2022/07/19 06:50:34 skrll Exp $ */ +/* $NetBSD: if_wm.c,v 1.744 2022/07/19 08:21:02 riastradh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.743 2022/07/19 06:50:34 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.744 2022/07/19 08:21:02 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -4918,8 +4918,8 @@ wm_flush_desc_rings(struct wm_softc *sc) txd->wtx_fields.wtxu_options = 0; txd->wtx_fields.wtxu_vlan = 0; - bus_space_barrier(sc->sc_st, sc->sc_sh, 0, 0, - BUS_SPACE_BARRIER_WRITE); + wm_cdtxsync(txq, 0, WM_NTXDESC(txq), + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); txq->txq_next = WM_NEXTTX(txq, txq->txq_next); CSR_WRITE(sc, WMREG_TDT(0), txq->txq_next);
CVS commit: src/sys/dev/pci
Module Name:src Committed By: riastradh Date: Tue Jul 19 08:21:02 UTC 2022 Modified Files: src/sys/dev/pci: if_wm.c Log Message: wm(4): Use bus_dmamap_sync, not bus_space_barrier, for tx desc. The newly written tx descriptor needs to be visible to the device before the TDT register is set. There's no bus space mappings that need any barriers, though -- nothing mapped prefetchable or cacheable here. So bus_dmamap_sync (via wm_cdtxsync) is necessary, not bus_space_barrier. By accident, bus_space_barrier implies the same barrier instructions as bus_dmamap_sync on some architectures, but it wouldn't work at all if we were bouncing. ok msaitoh@, knakahara@ To generate a diff of this commit: cvs rdiff -u -r1.743 -r1.744 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: xsrc/external/mit/ctwm/dist
Module Name:xsrc Committed By: nia Date: Tue Jul 19 07:14:18 UTC 2022 Modified Files: xsrc/external/mit/ctwm/dist: ctwm.1 Log Message: Fix path in man page to system.ctwmrc. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 xsrc/external/mit/ctwm/dist/ctwm.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/ctwm/dist/ctwm.1 diff -u xsrc/external/mit/ctwm/dist/ctwm.1:1.1 xsrc/external/mit/ctwm/dist/ctwm.1:1.2 --- xsrc/external/mit/ctwm/dist/ctwm.1:1.1 Sun Apr 11 10:11:57 2021 +++ xsrc/external/mit/ctwm/dist/ctwm.1 Tue Jul 19 07:14:18 2022 @@ -220,7 +220,7 @@ $HOME/\&.twmrc\&.screennumber, $HOME/\&. The users twm startup file\&. .RE .PP -/usr/local/etc/system\&.ctwmrc +/etc/X11/ctwm/system\&.ctwmrc .RS 4 If none of the preceding files are found, ctwm will look in this file for a default configuration\&. This is often tailored by the site administrator to provide convenient menus or familiar bindings for novice users\&. .RE
CVS commit: xsrc/external/mit/ctwm/dist
Module Name:xsrc Committed By: nia Date: Tue Jul 19 07:14:18 UTC 2022 Modified Files: xsrc/external/mit/ctwm/dist: ctwm.1 Log Message: Fix path in man page to system.ctwmrc. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 xsrc/external/mit/ctwm/dist/ctwm.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: skrll Date: Tue Jul 19 06:50:34 UTC 2022 Modified Files: src/sys/dev/pci: if_wm.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.742 -r1.743 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.742 src/sys/dev/pci/if_wm.c:1.743 --- src/sys/dev/pci/if_wm.c:1.742 Tue Jul 19 06:47:34 2022 +++ src/sys/dev/pci/if_wm.c Tue Jul 19 06:50:34 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.742 2022/07/19 06:47:34 skrll Exp $ */ +/* $NetBSD: if_wm.c,v 1.743 2022/07/19 06:50:34 skrll Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.742 2022/07/19 06:47:34 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.743 2022/07/19 06:50:34 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -90,25 +90,25 @@ __KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1. #endif #include -#include + +#include #include -#include -#include -#include -#include -#include -#include +#include #include -#include -#include +#include #include -#include +#include +#include +#include +#include #include +#include +#include +#include #include +#include +#include #include -#include - -#include #include #include
CVS commit: src/sys/dev/pci
Module Name:src Committed By: skrll Date: Tue Jul 19 06:50:34 UTC 2022 Modified Files: src/sys/dev/pci: if_wm.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.742 -r1.743 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: skrll Date: Tue Jul 19 06:47:34 UTC 2022 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Don't need sys/malloc.h so remove the #include To generate a diff of this commit: cvs rdiff -u -r1.741 -r1.742 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: skrll Date: Tue Jul 19 06:47:34 UTC 2022 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Don't need sys/malloc.h so remove the #include To generate a diff of this commit: cvs rdiff -u -r1.741 -r1.742 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.741 src/sys/dev/pci/if_wm.c:1.742 --- src/sys/dev/pci/if_wm.c:1.741 Tue Jul 19 06:46:29 2022 +++ src/sys/dev/pci/if_wm.c Tue Jul 19 06:47:34 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.741 2022/07/19 06:46:29 skrll Exp $ */ +/* $NetBSD: if_wm.c,v 1.742 2022/07/19 06:47:34 skrll Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.741 2022/07/19 06:46:29 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.742 2022/07/19 06:47:34 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -93,7 +93,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1. #include #include #include -#include #include #include #include
CVS commit: src/sys/dev/pci
Module Name:src Committed By: skrll Date: Tue Jul 19 06:46:29 UTC 2022 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Turn a locking botch (shouldn't drop lock on error) into a KASSERT To generate a diff of this commit: cvs rdiff -u -r1.740 -r1.741 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: skrll Date: Tue Jul 19 06:46:29 UTC 2022 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Turn a locking botch (shouldn't drop lock on error) into a KASSERT To generate a diff of this commit: cvs rdiff -u -r1.740 -r1.741 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.740 src/sys/dev/pci/if_wm.c:1.741 --- src/sys/dev/pci/if_wm.c:1.740 Mon Jul 11 06:16:23 2022 +++ src/sys/dev/pci/if_wm.c Tue Jul 19 06:46:29 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.740 2022/07/11 06:16:23 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.741 2022/07/19 06:46:29 skrll Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.740 2022/07/11 06:16:23 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.741 2022/07/19 06:46:29 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -8927,11 +8927,7 @@ wm_deferred_start_locked(struct wm_txque int qid = wmq->wmq_id; KASSERT(mutex_owned(txq->txq_lock)); - - if (txq->txq_stopping) { - mutex_exit(txq->txq_lock); - return; - } + KASSERT(!txq->txq_stopping); if ((sc->sc_flags & WM_F_NEWQUEUE) != 0) { /* XXX need for ALTQ or one CPU system */