DragonFlyBSD/src 4414dacsys/conf kern.post.mk

kern.post.mk: Early fail the build in case of any duplicate objs

Since all the kernel objects are built and placed in the same directory,
a conflict is quite possible when two modules have a file with the same
name.  Another conflict possibility is that the source is specified
twice in conf/files.

In order to avoid running into mysterious/unexpected issues caused by
duplicate objects, simply abort the build when such a duplicate is
found.

Of course, a better solution is to refactor the build framework to
eliminate such a limitation, so that a module may choose whatever
filename it likes.
DeltaFile
+7-0sys/conf/kern.post.mk
+7-01 files

DragonFlyBSD/src 80c6dc3sys/conf bsd.kern.mk, sys/platform/pc64/conf kern.mk

bsd.kern.mk: Remove -finline-limit and related compiler parameters

These compiler flags/parameter were inherited from FreeBSD.  They
basically meant to ALWAYS inline the functions mark with the 'inline'
keyword.  Since modern GCC provides with the 'always_inline' attribute,
it's better to use '__always_inline' annotation for those functions that
must be inlined.  As a result, remove the '-finline-limit' and related
parameters to achieve better inlining results; e.g., it avoids
unnecessary over-inlining.
DeltaFile
+1-7sys/conf/bsd.kern.mk
+0-2sys/platform/pc64/conf/kern.mk
+0-2sys/platform/vkernel64/conf/kern.mk
+1-113 files

DragonFlyBSD/src ddf0679sys/kern vfs_cache.c kern_timeout.c, sys/sys spinlock2.h

kernel: Adjust inlining annotations for better results

We will be removing the '-finline-limit=8000 ...' compiler flags, which
can change the inlining results.  By adjusting the inlining annoations
with proper '__always_inline' annotations, the inlining results become
better and more deterministic.

In the meantime, a few unnecessary '__inline' annotations are removed.

Discussed-with: dillon
DeltaFile
+13-13sys/kern/vfs_cache.c
+4-4sys/sys/spinlock2.h
+3-3sys/kern/kern_timeout.c
+20-203 files

DragonFlyBSD/src 4c9946bsys/conf kern.pre.mk

kern.pre.mk: Remove 'gcc2_compiled.' symbol stripping

This was inherited from FreeBSD and has long been obsolete since GCC 3.

See also: FreeBSD (https://reviews.freebsd.org/D38764)
DeltaFile
+1-2sys/conf/kern.pre.mk
+1-21 files

DragonFlyBSD/src 0655fabsys/ddb db_command.c

ddb - Try AcpiReset() when invoking DDB's reset command.

- This allows some modern notebooks to successfully reset from DDB, where
  the classic outb(0x64, 0xFE) method no longer works. For some notebooks,
  we'll also need to support EFI Reset here, but that will require further
  work.
DeltaFile
+20-0sys/ddb/db_command.c
+20-01 files

DragonFlyBSD/src 2a63744sys/platform/pc64/x86_64 efirt.c

efirt - Register EFI Reset with the shutdown_final EVENTHANDLER.

- This adds a safeguard to efi_enter() to fail gracefully when called from
  a kernel thread, where curthread->td_lwp is NULL.
- Further work is needed to allow EFI Reset to work more simply without
  messing with the current LWP's vmspace.
DeltaFile
+22-0sys/platform/pc64/x86_64/efirt.c
+22-01 files

DragonFlyBSD/src 61db8c7sys/conf kern.pre.mk

kern.pre.mk: Remove unused and duplicate NORMAL_C_C

The 'NORMAL_C_C' macro is identical to 'NORMAL_C' and is unused, so just
remove it.
DeltaFile
+0-1sys/conf/kern.pre.mk
+0-11 files

DragonFlyBSD/src 7f6e301initrd/etc rc rcmount_local

initrd: Extract 'local' real root handling into rcmount_local script

Similar to the handling of 'crypt' and 'tcplay' types of real root.
DeltaFile
+1-7initrd/etc/rc
+7-0initrd/etc/rcmount_local
+1-1initrd/etc/Makefile
+9-83 files

DragonFlyBSD/src 7cbe736initrd/etc rcmount_crypt rcmount_tcplay

initrd: Update rcmount_* scripts to report more error info
DeltaFile
+12-3initrd/etc/rcmount_crypt
+8-2initrd/etc/rcmount_tcplay
+4-1initrd/etc/rcmount_local
+24-63 files

DragonFlyBSD/src 67ab468etc/periodic/daily 162.snapshot-hammer2

periodic: Do not use colon (:) in hammer2 snapshot names

As shown in the previous commit, a PFS label can be specified in
'vfs.root.realroot' to mount the root partition from a custom PFS,
including a snapshot.  However, such a PFS label cannot have the colon
(:) symbol, which is used as a field separator.  Therefore, adjust the
162.snapshot-hammer2 script to not name an auto created snapshot with a
colon in the names, so that those snapshots may be used to mount the
real root partition.

Note, the 'vfs.root.realroot' is only necessary to mount an encrypted
root partition or an LVM-based root partition.
DeltaFile
+3-1etc/periodic/daily/162.snapshot-hammer2
+3-11 files

DragonFlyBSD/src 468c26einitrd/etc rcmount_crypt rcmount_tcplay, share/man/man7 initrd.7

initrd: Support to specify a PFS label in 'vfs.root.realroot'

The 'vfs.root.realroot' syntax previously didn't support to specify a
PFS label for a HAMMER/HAMMER2 filesystem on an encrypted partition.
There was a hack to work around this limitation by naming the mapped
device with 'd' in the end (e.g., use 'rootd' rather than 'root'), so
the kernel would auto mount the '@ROOT' PFS from it.

However, it was impossible to work around the limitation when the target
PFS uses a custom label, e.g., '@ROOT.20260616'.

This commit fixes the limitation by extending the rcmount_{crypt,tcplay}
scripts to support to directly specify the PFS label in
'vfs.root.realroot'.

Update and improve the initrd(7) man page accordingly.

Reported-by: vjkarbo (via IRC)
DeltaFile
+41-14share/man/man7/initrd.7
+17-7initrd/etc/rcmount_crypt
+15-5initrd/etc/rcmount_tcplay
+73-263 files

DragonFlyBSD/src ccff7b1initrd/etc rc

initrd: Clean up etc/rc script
DeltaFile
+4-3initrd/etc/rc
+4-31 files

DragonFlyBSD/src ded5c3betc/periodic/daily 162.snapshot-hammer2

periodic: Do not use colon (:) in hammer2 snapshot names

As shown in the previous commit, a PFS label can be specified in
'vfs.root.realroot' to mount the root partition from a custom PFS,
including a snapshot.  However, such a PFS label cannot have the colon
(:) symbol, which is used as a field separator.  Therefore, adjust the
162.snapshot-hammer2 script to not name an auto created snapshot with a
colon in the names, so that those snapshots may be used to mount the
real root partition.

Note, the 'vfs.root.realroot' is only necessary to mount an encrypted
root partition or an LVM-based root partition.
DeltaFile
+3-1etc/periodic/daily/162.snapshot-hammer2
+3-11 files

DragonFlyBSD/src 2d22eb5initrd/etc rcmount_crypt rcmount_tcplay, share/man/man7 initrd.7

initrd: Support to specify a PFS label in 'vfs.root.realroot'

The 'vfs.root.realroot' syntax previously didn't support to specify a
PFS label for a HAMMER/HAMMER2 filesystem on an encrypted partition.
There was a hack to work around this limitation by naming the mapped
device with 'd' in the end (e.g., use 'rootd' rather than 'root'), so
the kernel would auto mount the '@ROOT' PFS from it.

However, it was impossible to work around the limitation when the target
PFS uses a custom label, e.g., '@ROOT.20260616'.

This commit fixes the limitation by extending the rcmount_{crypt,tcplay}
scripts to support to directly specify the PFS label in
'vfs.root.realroot'.

Update and improve the initrd(7) man page accordingly.

Reported-by: vjkarbo (via IRC)
DeltaFile
+41-14share/man/man7/initrd.7
+17-7initrd/etc/rcmount_crypt
+15-5initrd/etc/rcmount_tcplay
+73-263 files

DragonFlyBSD/src b452c2anrelease/root/etc rc.conf

nrelease: Add root_rw_mount="NO" to rc.conf to fix ISO boot

The ISO root filesystem is obviously readonly and cannot be remounted to
'rw'.  Without setting 'root_rw_mount=NO', the ISO boot would abort
after failing to remount the root filesystem.

This is a follow-up fix to my previous commit
31b00396377857ebb62259aa944f9351fa62ea44.

Reported-by: Sergey Zigachev (servik)
DeltaFile
+1-1nrelease/root/etc/rc.conf
+1-11 files

DragonFlyBSD/src 1c730f9nrelease Makefile, nrelease/root/boot loader.conf

nrelease: Simplify the adjustments to loader.conf for IMG boot

Use 'sed' similar to fstab adjustments instead of grep+echo to adjust
'boot/loader.conf' to the IMG boot.
DeltaFile
+3-3nrelease/Makefile
+2-1nrelease/root/boot/loader.conf
+5-42 files

DragonFlyBSD/src fac95a3etc/defaults rc.conf, share/man/man5 rc.conf.5

rc.conf: Add and document the missing root_rw_mount=YES

The 'root_rw_mount' variable was missing, and it caused the rc.d/root
script to always ignore the 'mount -u -o rw /' command.  Nevertheless,
the '/' root filesystem was still remounted to be 'rw' because the later
'mount -a' command, according to /etc/fstab.

With this 'root_rw_mount=YES' placed, the '/' entry should now be
optional in /etc/fstab because the '/' root filesystem can be correctly
remounted to be 'rw'.

Obtained-from: FreeBSD (commit 6e1b226)
Reported-by: robstinge (IRC)
DeltaFile
+13-0share/man/man5/rc.conf.5
+1-0etc/defaults/rc.conf
+14-02 files

DragonFlyBSD/src b04512anrelease Makefile, nrelease/root/etc rc.conf

nrelease: Fix up rc.conf to mount root readwrite for IMG boot

While there, remove the obsolete comments in 'etc/rc.conf'.
DeltaFile
+2-6nrelease/root/etc/rc.conf
+2-0nrelease/Makefile
+4-62 files

DragonFlyBSD/src 6e5f9efnrelease Makefile, nrelease/root/etc fstab

nrelease: Adjust fstab and reuse it for IMG boot

The root '/' filesystem is mounted by the kernel, so it can be omitted
from 'etc/fstab'.  This also makes the 'fstab' file be used by the IMG
boot, so just reuse it.
DeltaFile
+0-7nrelease/Makefile
+1-1nrelease/root/etc/fstab
+1-82 files

DragonFlyBSD/src 850d9acnrelease/root/etc fstab

nrelease: Adjust fstab to remove '-C' option for /tmp tmpfs mount

For the /tmp mount, no need to copy the origin contents; also, there
shouldn't be any contents at this early boot stage.
DeltaFile
+1-1nrelease/root/etc/fstab
+1-11 files

DragonFlyBSD/src c726915initrd/etc rcmount_crypt rcmount_tcplay

initrd: Update rcmount_* scripts to report more error info
DeltaFile
+12-3initrd/etc/rcmount_crypt
+8-2initrd/etc/rcmount_tcplay
+4-1initrd/etc/rcmount_local
+24-63 files

DragonFlyBSD/src de9d455initrd/etc rc

initrd: Clean up etc/rc script
DeltaFile
+4-3initrd/etc/rc
+4-31 files

DragonFlyBSD/src 01a3352initrd/etc rc rcmount_local

initrd: Extract 'local' real root handling into rcmount_local script

Similar to the handling of 'crypt' and 'tcplay' types of real root.
DeltaFile
+1-7initrd/etc/rc
+7-0initrd/etc/rcmount_local
+1-1initrd/etc/Makefile
+9-83 files

DragonFlyBSD/src 41de5e2usr.bin/dsynth dsynth.c dsynth.1

dsynth - Add "list-only" directive

This directive generates a list of build dependencies for the requested
ports to the file "build.txt".  Each line is formatted:

port at flavor pkgfilename

Which should be easily parseable with an awk or sed filter.

Example:  dsynth list-only everything

Requested-by: daftaupe
DeltaFile
+23-0usr.bin/dsynth/dsynth.c
+3-0usr.bin/dsynth/dsynth.1
+26-02 files

DragonFlyBSD/src dd963e6sys/sys param.h

Bump __DragonFly_version for struct changes in the last commit

The last commit added 'rm_cpuid' to 'struct u_rman' in <sys/rman.h>, and
added 'dm_cpuid' to 'struct devinfo_rman' in <devinfo.h>.  Both are
public headers to userland, so bump __DragonFly_version for the change.
DeltaFile
+2-1sys/sys/param.h
+2-11 files

DragonFlyBSD/src 069eec1lib/libdevinfo devinfo.h devinfo.3, sys/kern subr_rman.c

devinfo - Print the cpuid of rman resources if it's set.

* This adds the cpuid field to the u_rman and devinfo_rman structs, and
  exports this value from struct rman in the rman sysctl.

* This is meant for IRQ resources, where "devinfo -r" will now print the
  CPU where each IRQ is allocated, which is especially useful for drivers
  that use multiple MSI-X interrupts.
DeltaFile
+5-1usr.sbin/devinfo/devinfo.c
+2-0lib/libdevinfo/devinfo.h
+1-0lib/libdevinfo/devinfo.3
+1-0lib/libdevinfo/devinfo.c
+1-0sys/kern/subr_rman.c
+1-0sys/sys/rman.h
+11-16 files

DragonFlyBSD/src 59b78e4sys/bus/firewire fwohci.c

fix(firewire): fix tcode switch fallthrough on little-endian

The break statements in fwohci_arcv_swap() were inside
#if BYTE_ORDER == BIG_ENDIAN guards, causing all cases to fall
through to the default "Unknown tcode" handler on little-endian
(x86) systems. This meant every received packet was dropped,
breaking bus manager election, split transactions, and all
asynchronous communication.

Move break statements outside the #if guards to match FreeBSD.
DeltaFile
+2-2sys/bus/firewire/fwohci.c
+2-21 files

DragonFlyBSD/src bff3c62usr.sbin/syslogd syslogd.c

fix(syslogd): check f_prevline content instead of array address

f_prevline is a char[] struct member, so its address is always
non-NULL. Check f_prevline[0] to test whether the previous line
buffer contains a message, matching the existing check at line 1010.
DeltaFile
+1-1usr.sbin/syslogd/syslogd.c
+1-11 files

DragonFlyBSD/src 555a82ausr.bin/kcollect kcollect.c

fix(kcollect): mark unused total_count parameter in dump_influxdb()

total_count is required by the function pointer signature but not
used in the influxdb output path. Mark it __unused and remove the
dead ++total_count increment.
DeltaFile
+1-2usr.bin/kcollect/kcollect.c
+1-21 files

DragonFlyBSD/src 3aa6009usr.sbin/iostat iostat.c

fix(iostat): remove unused tflag variable

tflag was set when -t was parsed but never checked; the -t option's
effect is handled entirely by buildmatch().
DeltaFile
+2-3usr.sbin/iostat/iostat.c
+2-31 files