DragonFlyBSD/src a372369share/mk bsd.sys.mk

bsd.sys.mk: Fix comment.
DeltaFile
+1-1share/mk/bsd.sys.mk
+1-11 files

DragonFlyBSD/src f278f02doc porting_drivers.txt, sys/bus/cam cam_sim.c

kernel: Use lockowned() instead of (lockstatus(&lock, curthread) != 0).

It is sufficient and more lightweight.

Most of these lockstatus() were added by me.

Discussed-with: aly
DeltaFile
+9-9sys/dev/raid/mps/mps_sas.c
+6-6sys/dev/raid/tws/tws_services.c
+6-4doc/porting_drivers.txt
+4-5sys/dev/raid/mps/mps.c
+4-4sys/dev/raid/tws/tws_cam.c
+3-3sys/bus/cam/cam_sim.c
+32-3126 files not shown
+65-6832 files

DragonFlyBSD/src b200855doc porting_drivers.txt

porting_drivers.txt: Improve wording a bit.
DeltaFile
+10-8doc/porting_drivers.txt
+10-81 files

DragonFlyBSD/src f403c94sys/kern subr_gtaskqueue.c

kernel/gtaskqueue: Fix a macro. It's not used in current code.
DeltaFile
+1-1sys/kern/subr_gtaskqueue.c
+1-11 files

DragonFlyBSD/src c582a7ashare/man/man4 acpi.4, sys/dev/acpica acpi.c

kernel/acpi: Sync hw.acpi.apple_darwin_osi tunable handling with FreeBSD.

Better comments, a few missing braces and a failure message for
unsupported machines.
DeltaFile
+43-8sys/dev/acpica/acpi.c
+5-1share/man/man4/acpi.4
+48-92 files

DragonFlyBSD/src 281390ashare/man/man4 acpi.4

acpi.4: Sort tunables alphabetically.
DeltaFile
+4-4share/man/man4/acpi.4
+4-41 files

DragonFlyBSD/src ecf1968share/man/man4 sdhci.4, sys/dev/disk/sdhci sdhci.c sdhci_pci.c

sdhci - Add quirk for ADMA2 use to make O2 Micro OZ620 and OZ777 work.

- This adds a quirk flag, for SDHC controllers that don't support ADMA2 for
  transfers with a length that is not a multiple of full 512 byte blocks.
- On those controllers, we'll fall back to PIO when we get such a transfer
  request.
DeltaFile
+9-0sys/dev/disk/sdhci/sdhci.c
+6-0sys/dev/disk/sdhci/sdhci_pci.c
+5-1share/man/man4/sdhci.4
+2-0sys/dev/disk/sdhci/sdhci.h
+22-14 files

DragonFlyBSD/src 726d491usr.bin/tr cset.h cmap.h

tr(1): Mark two functions __always_inline to silence GCC 12.5 -Winline.

Suggested-by: aly
DeltaFile
+1-1usr.bin/tr/cset.h
+1-1usr.bin/tr/cmap.h
+2-22 files

DragonFlyBSD/src 1c84c5cshare/man/man4 sdhci.4

sdhci.4: Mention all tunables and sysctls, and other updates.

- Mention sdhci_acpi attaching controllers via ACPI.
- Be more technically correct on what kinds of cards it can support.
- Add some definitely working chips to list of actually tested devices.
- Mention fastest supported speeds: 50MHz HighSpeed, and DDR52 only on eMMC.
DeltaFile
+22-3share/man/man4/sdhci.4
+22-31 files

DragonFlyBSD/src ab8a932sys/dev/disk/sdhci sdhci_acpi.c

sdhci: Recognize AMD eMMC controller IDs AMDI0040 and AMDI0041.

Tested-with: IGEL M350C Thin Client (Ryzen R1505G SoC) using AMDI0040 ID.
DeltaFile
+5-0sys/dev/disk/sdhci/sdhci_acpi.c
+5-01 files

DragonFlyBSD/src 03cb7cesys/sys cdefs.h

<sys/cdefs.h>: Copy attributes for strong/weak references.

GCC 9 and later take issue with mismatched attributes between aliased
functions. At the same time, the 'copy' attribute was added to copy
the attributes for these cases.

Change __{strong,weak}_reference() to use it. Fixes GCC 12.5's
-Wmissing-attribute warnings.

This is based on a patch by Scott Parlane <scott at parlanenz.com>, which
was based on the change made in linux for the same issue.
DeltaFile
+10-3sys/sys/cdefs.h
+10-31 files

DragonFlyBSD/src 99f0646gnu/usr.bin/gdb/kgdb trgt.c

refactor: remove dead i386/ILP32 code from kernel, userland, and tests (2)

* Put the platform fall-through test in kgdb back in, just removing
  the i386 part.
DeltaFile
+4-0gnu/usr.bin/gdb/kgdb/trgt.c
+4-01 files

DragonFlyBSD/src 404aa64lib/libefivar efi-osdep.h, sbin/disklabel32 disklabel.c

refactor: remove dead i386/ILP32 code from kernel, userland, and tests

DragonFly is x86_64-only. Remove permanently dead #ifdef __i386__,
userland tools, and regression tests. The code is never compiled.
DeltaFile
+0-31sys/dev/misc/ppc/ppc.c
+0-27sbin/disklabel32/disklabel.c
+0-21sys/dev/misc/dcons/dcons_os.c
+0-18sys/dev/netif/sf/if_sfreg.h
+1-7lib/libefivar/efi-osdep.h
+0-8tools/regression/lib/libm/test-exponential.c
+1-1127 files not shown
+1-15013 files

DragonFlyBSD/src 5ab6a11sys/dev/raid/dpt dpt_scsi.c, sys/dev/sound unit.c

refactor: remove large #if 0 dead code blocks

Remove 3200+ lines of permanently dead code guarded by #if 0 across
kernel, drivers, VFS, and userland. Several blocks have author comments
explicitly requesting removal. Code can be inspected in git history.
DeltaFile
+0-845sys/dev/raid/dpt/dpt_scsi.c
+0-302sys/vfs/fuse/fuse_io.c
+0-227sys/vfs/hammer/hammer_btree.c
+0-173sys/platform/pc64/x86_64/npx.c
+0-172sys/platform/vkernel64/x86_64/npx.c
+0-164sys/dev/sound/unit.c
+0-1,88311 files not shown
+0-3,27417 files

DragonFlyBSD/src 8872584etc/defaults uuids

feat: etc/defaults/uuids: expand GPT partition type UUID database

Add comprehensive UUID-to-name mappings for:
- Plan 9, Haiku BFS, QNX6, Minix
- MidnightBSD (boot, data, swap, UFS, vinum, ZFS)
- HP-UX, Solaris/illumos (full set)
- Linux arch-specific root/usr partitions (x86, x86-64, ARM,
  AArch64, RISC-V, PPC, LoongArch, s390, Alpha, ARC, PA-RISC, MIPS)
- Linux /home, /srv, /var, /boot, dm-crypt, LUKS
- Ceph (OSD, journals, blocks, WAL, LUKS variants)
- Fuchsia, ChromeOS, Container Linux/CoreOS
- Android (common types)
- Apple APFS Preboot/Recovery
- VMware, ONIE, Atari TOS, OS/2 ArcaOS, AmigaOS/Emu68
- VeraCrypt, SPDK, barebox, U-Boot, SoftRAID
- Sony PlayStation 4 (Orbis OS) - all 13 partition types
- Generic: Intel Fast Flash, Sony Boot, Lenovo Boot, PowerPC PReP

Also fix VMware "Diagostic" typo and normalize NetBSD Swap case.
DeltaFile
+236-20etc/defaults/uuids
+236-201 files

DragonFlyBSD/src fa57f06sys/config LINT64

LINT64: Add apple_fw.
DeltaFile
+3-0sys/config/LINT64
+3-01 files

DragonFlyBSD/src 77a1380sys/dev/apple/fw apple_fw.c

kernel/apple_fw: Declare local vars at function start.
DeltaFile
+1-1sys/dev/apple/fw/apple_fw.c
+1-11 files

DragonFlyBSD/src f06a5a2sys/dev/apple/fw apple_fw.h, sys/dev/apple/smc debug.h smc.h

kernel/apple_{fw,smc}: Fix include guard comments.
DeltaFile
+1-1sys/dev/apple/fw/apple_fw.h
+1-1sys/dev/apple/smc/debug.h
+1-1sys/dev/apple/smc/smc.h
+3-33 files

DragonFlyBSD/src 3e5efcbsys/platform/pc64 Makefile.inc

kernel: Really hook apple_fw and apple_smc into the build.
DeltaFile
+1-1sys/platform/pc64/Makefile.inc
+1-11 files

DragonFlyBSD/src 059c494sys/dev/apple/smc smc_sysctl.c

kernel/apple_smc: Fix the build with APPLE_SMC_DEBUG.
DeltaFile
+1-1sys/dev/apple/smc/smc_sysctl.c
+1-11 files

DragonFlyBSD/src ea0f283lib/libc/sys kldunload.2, sbin/kldunload kldunload.8

kldunload.2, kldunload.8: Document the EPERM return by security level
DeltaFile
+9-1sbin/kldunload/kldunload.8
+6-2lib/libc/sys/kldunload.2
+15-32 files

DragonFlyBSD/src b1d1770lib/libc/sys kldload.2

kldload.2: Document the behavior of 'file' argument

Also document another case of EPERM return.
DeltaFile
+15-2lib/libc/sys/kldload.2
+15-21 files

DragonFlyBSD/src 6138279lib/libc/sys kldstat.2, sys/sys linker.h

kldstat.2: Fix wrong comment for kld_file_stat.version field
DeltaFile
+2-2lib/libc/sys/kldstat.2
+1-1sys/sys/linker.h
+3-32 files

DragonFlyBSD/src 73e6225sbin/kldload kldload.8 kldload.c

kldload(8): Warn when a module exists in current dir but not loaded

When a bare filename is specified, kldload(8) only searches it in the
paths defined by 'kern.module_path' kenv/sysctl.  When the same module
exists in the current directory, it will not be loaded.  This can cause
surprise and confusion.

To not change the behavior as well as keep consistent with FreeBSD, emit
a warning in this case.  The FreeBSD implementation looks unnecessarily
complex, so I chose to do it in another way.

In addition, improve the verbose message to also print the actual module
path.

Sync the man page with FreeBSD's.
DeltaFile
+51-6sbin/kldload/kldload.8
+30-6sbin/kldload/kldload.c
+81-122 files

DragonFlyBSD/src 5dbc2f6sys/bus/u4b usb_device.h usb_transfer.h, sys/bus/u4b/uvc uvc_v4l2.c

u4b/uvc: Group UVC-related prototypes to help future sync

* Move three prototypes from usbdi.h to usb_device.h, because their
  implementations are in usb_device.c.
* Group the prototypes for UVC together, so it helps sync the other
  parts with FreeBSD.
DeltaFile
+5-1sys/bus/u4b/usb_device.h
+2-1sys/bus/u4b/usb_transfer.h
+0-3sys/bus/u4b/usbdi.h
+1-0sys/bus/u4b/uvc/uvc_v4l2.c
+8-54 files

DragonFlyBSD/src ebdd7desys/bus/u4b/uvc uvc_drv.c uvc_ctrls.c, sys/netproto/802_11 ieee80211_dragonfly.h

Define FreeBSD's _SAFE queue macros to be _MUTABLE

No need to reimplement it.  Our equivalents are called _MUTABLE since
it's a better name.
DeltaFile
+1-7sys/bus/u4b/uvc/uvc_drv.c
+1-7sys/bus/u4b/uvc/uvc_ctrls.c
+2-3sys/netproto/802_11/ieee80211_dragonfly.h
+4-173 files

DragonFlyBSD/src 147cec4sys/kern subr_log.c

kern: Fix logclose() to call callout_terminate() to avoid memory leak
DeltaFile
+1-1sys/kern/subr_log.c
+1-11 files

DragonFlyBSD/src a5bc467sys/bus/u4b/controller uhci_pci.c xhci_pci.c, sys/dev/pccard/pccbb pccbb.c

kern: Fix device_delete_child() to detach parent first

When detaching device trees parent devices must be detached prior to
detaching its children. This is because parent devices can have
pointers to the child devices in their softcs which are not
invalidated by device_delete_child(). This can cause use after free
issues and panic().

Obtained-from: FreeBSD (commit: d3bf5efc1ff19b102b176512a66110ec84ac982d)
DeltaFile
+3-15sys/dev/pccard/pccbb/pccbb.c
+5-3sys/kern/subr_bus.c
+0-6sys/bus/u4b/controller/uhci_pci.c
+0-6sys/bus/u4b/controller/xhci_pci.c
+0-6sys/bus/u4b/controller/ohci_pci.c
+0-6sys/bus/u4b/controller/ehci_pci.c
+8-421 files not shown
+9-457 files

DragonFlyBSD/src e00d227sys/bus/u4b usbdevs, sys/bus/u4b/quirk usb_quirk.c usb_quirk.h

u4b: Sync usbdevs and quirs with FreeBSD

* Keep a few our additions in usbdevs and usb_quirk.h.
* Fix usb_quirk_str[] to include new quirks added for uvc(4).
* Remove a few duplicate from usbdevs.
* Fix serial/u3g.c and serial/uftdi.c to use the new product defines.
DeltaFile
+471-416sys/bus/u4b/quirk/usb_quirk.c
+600-109sys/bus/u4b/usbdevs
+13-9sys/bus/u4b/quirk/usb_quirk.h
+9-9sys/bus/u4b/serial/uftdi.c
+6-6sys/bus/u4b/serial/u3g.c
+1,099-5495 files

DragonFlyBSD/src 01f0d53sys/bus/cam cam_xpt.c cam_xpt_sim.h, sys/bus/u4b/storage umass.c

cam: Fix xpt_bus_register()/xpt_bus_deregister() to return errno

xpt_bus_register and xpt_bus_deregister returns a hybrid error that's
neither a cam_status, nor an errno, but a mix of both.  Update
xpt_bus_register and xpt_bus_deregister to return an errno. The vast
majority of current users compare against zero, which can also be
spelled CAM_SUCCESS. Nobody uses CAM_FAILURE, so remove that symbol
to prevent comfusion (nothing returns it either).

Where the return value is saved, ensure that the variable 'error' is
used to store an errno and 'status' is used to store a cam_status where
it makes the code clearer (usually just in functions that already mix
and match). Where the return value isn't used at all, avoid storing it
at all.

Obtained-from: FreeBSD (commit 30f8afd0270e0bb70e1e0df1cf8de7a841797a30)
DeltaFile
+8-7sys/bus/cam/cam_xpt.c
+6-3sys/bus/u4b/storage/umass.c
+4-4sys/dev/virtual/vmware/pvscsi/pvscsi.c
+2-2sys/bus/cam/cam_xpt_sim.h
+1-1sys/dev/disk/ahci/ahci_cam.c
+1-1sys/dev/disk/nata/atapi-cam.c
+22-182 files not shown
+23-208 files