DragonFlyBSD/src 646ee3esys/kern subr_cpu_topology.c

kernel - Expand cpu_topology_nodes[] array

* Double the size of the array, which stores nodes as well as leafs
  in the cpu topology tree.  The array was being blown out in early
  boot before if there were more than 128 CPUs.

* Add a KKASSERT() to catch any remaining issue, in case the tree
  winds up being more complex and requires more nodes.

Reported-by: ivadasz
DeltaFile
+4-1sys/kern/subr_cpu_topology.c
+4-11 files

DragonFlyBSD/src 30436b5sys/kern kern_lockf.c, sys/vfs/hammer hammer_vnops.c

kernel - Move primary lockf management into struct vnode

* Move lockf management out of per-filesystem in-memory inodes and
  into the general vnode structure.  This will make follow-on work
  easier and removes unnecessary code from various filesystem
  implementations.

* Remove related implementations from fs code except for smbfs.

* Add optimization to avoid allocating struct lockf for LK_GETLK.
  Allows filesystem lock scans to avoid allocating struct lockf
  unnecessarily.  Suggested by ryao.

* Just enable for existing filesystems that previously implemented it
  in this commit.  There may be a follow-up to enable it in the
  default VOPS for all vnodes.
DeltaFile
+101-42sys/kern/kern_lockf.c
+1-23sys/vfs/nfs/nfs_vnops.c
+1-17sys/vfs/ufs/ufs_vnops.c
+1-16sys/vfs/hammer/hammer_vnops.c
+1-15sys/vfs/hammer2/hammer2_vnops.c
+1-14sys/vfs/tmpfs/tmpfs_vnops.c
+106-12717 files not shown
+132-18123 files

DragonFlyBSD/src e504c45bin/dd extern.h dd.1

dd(1): Sync with FreeBSD

New features:
- Added conv=fsync flag
- Added conv=fdatasync flag
- Added oflag=fsync and oflag=sync flags
- Added iflag=fullblock flag
- Added iflag=direct and oflag=direct flags that set O_DIRECT

Fixes:
- Fixed SIGINT handling.
DeltaFile
+76-43bin/dd/dd.c
+87-16bin/dd/args.c
+40-42bin/dd/dd.h
+55-6bin/dd/misc.c
+47-9bin/dd/dd.1
+7-10bin/dd/extern.h
+312-12618 files not shown
+324-15524 files

DragonFlyBSD/src 75bce37sys/kern kern_slaballoc.c

kern: Clean up malloc_uninit()

* Correct the diagnostic log message by omitting the CPU id, which
  doesn't apply here. The unfreed bytes must be summed from all CPUs.

* Clean up excess INVARIANTS ifdef's by using '__debugvar' instead.
DeltaFile
+3-9sys/kern/kern_slaballoc.c
+3-91 files

DragonFlyBSD/src f52807asys/dev/drm drm_dragonfly.c, sys/dev/raid/vinum vinumconfig.c

kern: Remove the little-use kvasnprintf() and kvasfree()

The kvasnprintf() requires a known max length, so it's basically the
same as kmalloc()+kvsnprintf().  Therefore, it's different to vasprintf()
and is of little use.  Actually, the DRM subsystem implements its
kvasprintf(), the vasprintf() equivalent.

For simplicity, just remove kvasnprintf()+kvasfree() and convert
existing code to either use a buffer array or manually call kmalloc().
DeltaFile
+0-24sys/kern/subr_prf.c
+6-9sys/kern/kern_conf.c
+6-6sys/vfs/devfs/devfs_core.c
+5-4sys/dev/raid/vinum/vinumconfig.c
+2-3sys/dev/drm/drm_dragonfly.c
+0-3sys/sys/systm.h
+19-496 files

DragonFlyBSD/src 01537basys/dev/drm linux_kobject.c

drm: Fix kobject_release() to free kobj->name

While there, adjust kvasprintf() in kobject_init_and_add() to use
'GFP_KERNEL' for consistency.
DeltaFile
+5-1sys/dev/drm/linux_kobject.c
+5-11 files

DragonFlyBSD/src 0c3c903share/mk bsd.dep.mk

bsd.dep.mk: Fix mkdep(1) parameter order

I'll need to use ${MKDEP} to set extra compiler flags (e.g.,
`-include .../header.h`) in the forthcoming GDB.  This would break the
${_MKDEPSRCDIR} because mkdep(1) would pass all remaining arguments to
${CC} once it comes across an unknown argument.

So move ${MKDEP} after ${_MKDEPSRCDIR} to fix the parameter order.

This is a follow-up fix to commit
dec8bf51d1d328f09ffaaf9e4c5a458a346ef590.
DeltaFile
+6-6share/mk/bsd.dep.mk
+6-61 files

DragonFlyBSD/src 76ebd41lib/libusb libusb.h

libusb(3): Define LIBUSB_API_VERSION

This macro may be used by ports, e.g., emulators/qemu.

Obtained-from: FreeBSD (commit fa6ef1c45f636043d7b0ec164c94db7095c2b113)
DeltaFile
+2-0lib/libusb/libusb.h
+2-01 files

DragonFlyBSD/src c2a9515gnu/usr.bin/mpc Makefile config.h

mpc: Update config.h and makefile
DeltaFile
+23-30gnu/usr.bin/mpc/config.h
+17-15gnu/usr.bin/mpc/Makefile
+40-452 files

DragonFlyBSD/src e840728contrib/mpc README.DELETED README.DRAGONFLY

contrib/mpc: Update README.DELETED and README.DRAGONFLY
DeltaFile
+14-5contrib/mpc/README.DRAGONFLY
+8-8contrib/mpc/README.DELETED
+22-132 files

DragonFlyBSD/src dde5640contrib/mpc/src pow.c log10.c

Merge branch 'vendor/MPC'

Upgrade from 1.0.3 to 1.4.1.
DeltaFile
+710-0contrib/mpc/src/radius.c
+452-32contrib/mpc/src/asin.c
+425-0contrib/mpc/src/balls.c
+399-10contrib/mpc/src/fr_div.c
+121-248contrib/mpc/src/log10.c
+263-104contrib/mpc/src/pow.c
+2,370-39445 files not shown
+4,793-1,44251 files

DragonFlyBSD/src 92a61c6gnu/usr.bin/mpfr mparam.h Makefile

mpfr: Update mparam.h and makefile
DeltaFile
+102-61gnu/usr.bin/mpfr/Makefile
+43-42gnu/usr.bin/mpfr/mparam.h
+145-1032 files

DragonFlyBSD/src 00a9d15contrib/mpfr README.DRAGONFLY README.DELETED

contrib/mpfr: Update README.DELETED and README.DRAGONFLY
DeltaFile
+23-11contrib/mpfr/README.DELETED
+13-7contrib/mpfr/README.DRAGONFLY
+36-182 files

DragonFlyBSD/src ad1b08fcontrib/mpfr/src add1sp.c mpfr.h

Merge branch 'vendor/MPFR'

Upgrade from 3.1.2 to 4.2.2.
DeltaFile
+1,654-490contrib/mpfr/src/sub1sp.c
+1,456-617contrib/mpfr/src/mpfr-impl.h
+1,350-271contrib/mpfr/src/sum.c
+900-495contrib/mpfr/src/vasprintf.c
+740-530contrib/mpfr/src/mpfr.h
+929-221contrib/mpfr/src/add1sp.c
+7,029-2,624291 files not shown
+30,577-11,426297 files

DragonFlyBSD/src 087e70ccontrib/mpfr/src add1sp.c mpfr.h

vendor/MPFR: Upgrade from 3.1.2 to 4.2.2
DeltaFile
+1,654-490contrib/mpfr/src/sub1sp.c
+1,456-617contrib/mpfr/src/mpfr-impl.h
+1,350-271contrib/mpfr/src/sum.c
+901-496contrib/mpfr/src/vasprintf.c
+740-530contrib/mpfr/src/mpfr.h
+929-221contrib/mpfr/src/add1sp.c
+7,030-2,625291 files not shown
+30,578-11,427297 files

DragonFlyBSD/src 073d983contrib/mpc/src pow.c log10.c

vendor/MPC: Upgrade from 1.0.3 to 1.4.1
DeltaFile
+710-0contrib/mpc/src/radius.c
+452-32contrib/mpc/src/asin.c
+425-0contrib/mpc/src/balls.c
+399-10contrib/mpc/src/fr_div.c
+121-248contrib/mpc/src/log10.c
+263-104contrib/mpc/src/pow.c
+2,370-39445 files not shown
+4,793-1,44251 files

DragonFlyBSD/src d1b2f62gnu/usr.bin/gmp Makefile config.h, gnu/usr.bin/gmp/lib Makefile Makefile.src

gmp: Update and rewrite makefiles

* Update the makefiles to build the imported 6.3.0.

* Split the building of file generation tools into a separate makefile
  in the `tools/` subdirectory, and move the library building to the
  `lib/` subdirectory.

* Use <bsd.hostprog.mk> to build the generation tools.

* Keep `gmp.h` at the main directory so there is no `config.h` that
  may possibly confuse the GMP users, such as the case with MPC that's
  got fixed in commit 140e2138b6e2614a71884aa87702138fe3691e53.

* Re-organize the sources in a separate `Makefile.src`. Just copy the
  `mpn_objs_in_libgmp` list from the generated Makefile, and thus
  greatly simplify the makefile rules.

* Adjust cc80/cc120 to use the updated `libgmp.a` location.
DeltaFile
+0-672gnu/usr.bin/gmp/config.h
+672-0gnu/usr.bin/gmp/lib/config.h
+2-276gnu/usr.bin/gmp/Makefile
+130-0gnu/usr.bin/gmp/lib/Makefile.src
+99-0gnu/usr.bin/gmp/lib/Makefile
+10-0gnu/usr.bin/gmp/tools/Makefile
+913-9484 files not shown
+919-95410 files

DragonFlyBSD/src 07429f9gnu/usr.bin/gmp config.h gmp.h

gmp: Update generated headers (gmp.h, config.h)
DeltaFile
+542-485gnu/usr.bin/gmp/gmp.h
+114-37gnu/usr.bin/gmp/config.h
+656-5222 files

DragonFlyBSD/src 0edc264contrib/gmp README.DRAGONFLY README.DELETED

contrib/gmp: Update README.DELETED and README.DRAGONFLY
DeltaFile
+25-15contrib/gmp/README.DELETED
+11-5contrib/gmp/README.DRAGONFLY
+36-202 files

DragonFlyBSD/src 1687ae1contrib/gmp COPYINGv3 longlong.h, contrib/gmp/mini-gmp mini-gmp.c

Merge branch 'vendor/GMP'

Upgrade from 5.0.5 to 6.3.0
DeltaFile
+4,627-0contrib/gmp/mini-gmp/mini-gmp.c
+2,057-1,378contrib/gmp/gmp-impl.h
+0-922contrib/gmp/dumbmp.c
+502-306contrib/gmp/longlong.h
+684-100contrib/gmp/mpz/bin_uiui.c
+674-0contrib/gmp/COPYINGv3
+8,544-2,706549 files not shown
+39,842-18,717555 files

DragonFlyBSD/src fb311ecshare/syscons/mapsmk Makefile, share/syscons/scrnmaps Makefile

share/syscons: Rewrite mapsmk's makefile with new <bsd.hostprog.mk>

While there, clean up scrnmaps's makefile.
DeltaFile
+12-18share/syscons/mapsmk/Makefile
+4-6share/syscons/scrnmaps/Makefile
+16-242 files

DragonFlyBSD/src 8d3e637share/mk bsd.dep.mk bsd.hostprog.mk

bsd.hostprog.mk: Reimplement to support multiple programs

Introduce PROGS and PROGS_CXX together with per-program variables to
support the multiple-program mode, allowing to build multiple programs
with one makefile.  This mode can help simplify the makefiles as well as
the hierarchies.

The original single-program mode is kept backward compatible.
DeltaFile
+105-40share/mk/bsd.hostprog.mk
+1-1share/mk/bsd.dep.mk
+106-412 files

DragonFlyBSD/src 140e213gnu/usr.bin/mpc Makefile

mpc: Fix inclusion paths to correctly include its own 'config.h'

It wrongly included the GMP's 'config.h', as the '../gmp/' directory has
both 'gmp.h' and 'config.h'.
DeltaFile
+2-1gnu/usr.bin/mpc/Makefile
+2-11 files

DragonFlyBSD/src 7afd530contrib/gmp COPYINGv3 longlong.h, contrib/gmp/mini-gmp mini-gmp.c

vendor/GMP: Upgrade from 5.0.5 to 6.3.0
DeltaFile
+4,627-0contrib/gmp/mini-gmp/mini-gmp.c
+2,057-1,378contrib/gmp/gmp-impl.h
+0-922contrib/gmp/dumbmp.c
+502-306contrib/gmp/longlong.h
+684-100contrib/gmp/mpz/bin_uiui.c
+674-0contrib/gmp/COPYINGv3
+8,544-2,706549 files not shown
+39,842-18,717555 files

DragonFlyBSD/src 893cca2lib/libncurses/tic_next Makefile

libncurses: Add a missing 'DPADD' for host program 'tic_next'

LDADD should have a companion DPADD.
DeltaFile
+1-0lib/libncurses/tic_next/Makefile
+1-01 files

DragonFlyBSD/src 576356alib/libncurses/libtic Makefile

libncurses: Remove obsolete targets from libtic's Makefile

The <bsd.hostlib.mk> already handles the 'afterdepend' and 'install'
targets, so no need to manually define them.
DeltaFile
+0-5lib/libncurses/libtic/Makefile
+0-51 files

DragonFlyBSD/src cf643e3bin/csh/gethost Makefile, games/adventure/setup Makefile

world: Remove obsolete 'build-tools' uses for host programs

These host programs (except share/syscons/mapsmk) are built with
<bsd.hostprog.mk>, which has replaced the 'build-tools' target in 2004.
So just remove the obsolete 'build-tools' target as well as the
'install' target.

Also remove the 'build-tools' target from <bsd.sys.mk>.
DeltaFile
+1-7share/syscons/mapsmk/Makefile
+1-5games/fortune/strfile/Makefile
+1-5games/boggle/mkindex/Makefile
+1-5games/boggle/mkdict/Makefile
+1-5games/adventure/setup/Makefile
+0-5bin/csh/gethost/Makefile
+5-3210 files not shown
+6-7816 files

DragonFlyBSD/src ae01cb2. Makefile

Makefile: Remove the obsolete '_build-tools' item

I missed it in commit 606249699fd1df85bcf274bacde6d5ab4e555135.
DeltaFile
+1-1Makefile
+1-11 files

DragonFlyBSD/src c0de80fcontrib/binutils-2.34 README.DRAGONFLY, contrib/binutils-2.34/binutils readelf.c

binutils234: Patch readelf(1) to recognize DragonFly-specific notes

* Define NT_DRAGONFLY_ABI and NT_DRAGONFLY_NOINIT in
  'include/elf/common.h' according to 'lib/csu/common/notes.h'.
* Add process_dragonfly_elf_note() to readelf.c to decode
  DragonFly-specific notes.

Before:
```
% readelf -n /bin/sh

Displaying notes found in: .note.tag
  Owner                Data size        Description
  DragonFly            0x00000004       NT_VERSION (version)
   description data: c8 29 09 00
  DragonFly            0x00000004       Unknown note type: (0x00000020)
   description data: 00 00 00 00
```


    [10 lines not shown]
DeltaFile
+47-0contrib/binutils-2.34/binutils/readelf.c
+5-0contrib/binutils-2.34/include/elf/common.h
+2-0contrib/binutils-2.34/README.DRAGONFLY
+54-03 files

DragonFlyBSD/src c3cb740sys/kern subr_diskgpt.c

kernel: Fix two bugs in gptinit()

* Fix the wrong type for 'table_lba'; should be 'uint64_t' instead of
  'uint32_t', and fix the read to use le64toh().

* Allow the partition table has entries more than 128 (MAX_GPT_ENTRIES).
  The UEFI specification basically has no upper limit, but we limit to
  parsing the first 128 (MAX_GPT_ENTRIES) entries.

  This actually happens with a Proxmox v9.2 ISO, which uses GPT and
  allocates 44 blocks for the partition table, so there are 176 entries.

  For example, here is the gpt(8) of a USB stick written with this ISO:

  ```
  Disk da8: 57.3GB (120225792 512-byte sectors)
      Start    Sectors    Size  Index  Contents
          0          1    512B      -  PMBR
          1          1    512B      -  Primary GPT header

    [13 lines not shown]
DeltaFile
+15-10sys/kern/subr_diskgpt.c
+15-101 files