FreeBSD/src 9038318sys/modules/rtw88 Makefile

rtw88: update module Makefile for v7.0 driver version

Update LINUXKPI_VERSION to reflect that the driver is based on
Linux v7.0.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+1-1sys/modules/rtw88/Makefile
+1-11 files

FreeBSD/src 41b641csys/contrib/dev/rtw88 main.c phy.c

rtw88: update Realtek's rtw88 driver

This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ).

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+37-17sys/contrib/dev/rtw88/main.c
+20-0sys/contrib/dev/rtw88/phy.c
+2-4sys/contrib/dev/rtw88/sdio.c
+3-2sys/contrib/dev/rtw88/usb.c
+2-2sys/contrib/dev/rtw88/util.c
+2-1sys/contrib/dev/rtw88/rtw8822b.c
+66-2610 files not shown
+78-3416 files

FreeBSD/src 480ba21. README.md

README: Update and harmonize

MFC after:      1 week
Reviewed by:    imp, markj, jhb
Differential Revision:  https://reviews.freebsd.org/D56499
DeltaFile
+12-11README.md
+12-111 files

FreeBSD/src d618ba3usr.bin/du/tests du_test.sh

du: Set BLOCKSIZE before running tests

Several testcases assume BLOCKSIZE=K, so set it at the top of the
script.  This fixes an issue where the tests would sometimes fail
when run under sudo.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D56476
DeltaFile
+4-0usr.bin/du/tests/du_test.sh
+4-01 files

FreeBSD/src 8de0fc1sys/net/route route_tables.c

routing: Use a better error number in sysctl_fibs()

ENOTCAPABLE is for capsicum and its use here is inappropriate.  In
particular, note that syscallret() treats this value specially.

Reviewed by:    glebius, pouria, zlei
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56481
DeltaFile
+1-1sys/net/route/route_tables.c
+1-11 files

FreeBSD/src 9899c8dsys/tools kernel-gdb.py

gdb: Print a stack trace if a python command raises an error

MFC after:      1 week
DeltaFile
+2-0sys/tools/kernel-gdb.py
+2-01 files

FreeBSD/src 2b264cbsys/net/route route_tables.c

routing: Initialize V_rt_numfibs earlier during boot

V_rt_numfibs can be set at compile time (with the ROUTETABLES kernel
config option) or boot time (with the net.fibs tunable).
vnet_rtables_init(), running during SI_PROTO_DOMAIN, was checking the
tunable and updating V_rt_numfibs accordingly, but that means that
earlier SYSINITs, such as vnet_mroute_init(), see the compile-time value
for V_rt_numfibs before it gets corrected in vnet_rtables_init().

Fix this by initializing V_rt_numfibs earlier, so that SYSINITs are less
likely to use the wrong value.

Add a comment describing the weird, preexisting semantic of resetting
rt_numfibs to 1 in VNET jails.

PR:             294510
Reviewed by:    glebius, zlei, pouria
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56473
DeltaFile
+16-8sys/net/route/route_tables.c
+16-81 files

FreeBSD/src ba94d75stand/common load_elf.c

stand/common/load_elf: Do kernel module relocations for PPC

reloc_ptr() skips relocations for the kernel module, because on most
platforms the kernel is ET_EXEC and this is not required.  On PPC,
the kernel is ET_DYN and we need to relocate here, otherwise the
module metadata will not be loaded properly and the kernel module
will have an incorrect version, preventing module dependencies from
resolving.

This fixes loading kernel modules from loader.conf on powerpc.

Diagnosed by:   jrtc27
Reviewed by:    jrtc27, adrian
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D56457
DeltaFile
+4-3stand/common/load_elf.c
+4-31 files

FreeBSD/src 25e776asys/compat/linuxkpi/common/include/net cfg80211.h mac80211.h

LinuxKPI: 802.11: add struct/fields and functions for v7.0

Add 802.11 struct fields and functions support for Linux v7.0 based
wireless drivers (at least iwlwifi, rtw88, rtw89).

While here cleanup some other bits.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+9-4sys/compat/linuxkpi/common/include/net/cfg80211.h
+11-1sys/compat/linuxkpi/common/include/net/mac80211.h
+20-52 files

FreeBSD/src a0112b0sys/compat/linuxkpi/common/include/net cfg80211.h mac80211.h

LinuxKPI: 802.11: Add structures and functions for NAN support

In Linux v7.0 iwlwifi(4) started to add support for Wi-Fi Aware(tm)
also known as Neighbor Awareness Networking (NAN).

Add structures and fields for this as needed so far to keep the driver
compiling.  net80211 has no support for it as a new mode.

We may consider a dedicated header file for these parts in the future
depending on how much more is to come.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+66-0sys/compat/linuxkpi/common/include/net/cfg80211.h
+11-0sys/compat/linuxkpi/common/include/net/mac80211.h
+77-02 files

FreeBSD/src f252ce0sys/compat/linuxkpi/common/include/linux ieee80211.h

LinuxKPI: 802.11: set IEEE80211_MIN_ACTION_SIZE according to struct

IEEE80211_MIN_ACTION_SIZE came up in the mt76 vendor subtree merge
as one of the non-mechanical changes which made me look.
Rather than (incorrectly) hand counting the offset from the beginning
of a frame, use the offset from the beginning of struct ieee80211_mgmt.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+2-2sys/compat/linuxkpi/common/include/linux/ieee80211.h
+2-21 files

FreeBSD/src c39237alib/libmixer mixer.c

mixer(3): Rename _mixer_readvol() to mixer_readvol()

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+3-5lib/libmixer/mixer.c
+3-51 files

FreeBSD/src ec07723sys/dev/sound/pcm sound.h, sys/dev/sound/usb uaudio.h

Revert "sound: Remove some forward declarations from sound.h and uaudio.h"

This reverts commit 602249f033d146d9c731d8b1cb4b2e0899c61ad9.
DeltaFile
+4-1sys/dev/sound/pcm/sound.h
+2-0sys/dev/sound/usb/uaudio.h
+6-12 files

FreeBSD/src 89d68eesys/kern subr_module.c

subr_module: account for MODINFOMD_EFI_ARCH

Fixes:          b538d4911004ca541507166b8ec9689d2e87d1aa
MFC after:      2 weeks

(cherry picked from commit b3d6829f4998ad8ac8c65d39ac9513ba85a9974b)
DeltaFile
+8-0sys/kern/subr_module.c
+8-01 files

FreeBSD/src 0bd9b26share/man/man4 splash.4, stand/common gfx_fb.c bootstrap.h

splash: add shutdown splash

This commit adds a shutdown splash to the existing kernel startup splash(4)
screen feature. It can be customized by providing a PNG image to the
shutdown_splash directive loader.conf(5).

Sponsored by:   Defenso
MFC after:      2 weeks
Reviewed by:    vexeduxr, ziaee, manu
Differential Revision:  https://reviews.freebsd.org/D55140

(cherry picked from commit 4b862c713ac5556ab4bd1828b47c5eb9cb28e067)
DeltaFile
+16-4stand/common/gfx_fb.c
+19-1sys/dev/vt/vt_core.c
+11-3share/man/man4/splash.4
+6-1stand/efi/loader/bootinfo.c
+5-0sys/kern/subr_module.c
+3-1stand/common/bootstrap.h
+60-102 files not shown
+64-118 files

FreeBSD/src 602249fsys/dev/sound/pcm sound.h, sys/dev/sound/usb uaudio.h

sound: Remove some forward declarations from sound.h and uaudio.h

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-4sys/dev/sound/pcm/sound.h
+0-2sys/dev/sound/usb/uaudio.h
+1-62 files

FreeBSD/src 7e9d974contrib/libarchive/test_utils test_main.c

libarchive: Staticize some variables

This code was not being built due to errors in our libarchive
configuration.  Now that those have been addressed, staticize some
variables that trip a “no previous extern declaration” error.  This
is a subset of upstream PR 2962.

MFC after:      1 week
Reviewed by:    mm
Differential Revision:  https://reviews.freebsd.org/D56471
DeltaFile
+3-3contrib/libarchive/test_utils/test_main.c
+3-31 files

FreeBSD/src 05bbe5elib/libarchive config_freebsd.h

libarchive: Update configuration

PR:             294577
MFC after:      1 week
Reviewed by:    mm
Differential Revision:  https://reviews.freebsd.org/D56468
DeltaFile
+89-37lib/libarchive/config_freebsd.h
+89-371 files

FreeBSD/src 8c94a1esys/sys pipe.h

pipe: retire the unused PIPE_LWANT macro
DeltaFile
+0-1sys/sys/pipe.h
+0-11 files

FreeBSD/src 4ed20e0share/man/man5 src.conf.5, share/mk src.opts.mk

kshim/usb: Add build option.

Add WITH{,OUT}_LOADER_USB to build the kshim usb library. Nothing
in-tree uses it, but this will make it easier to keep building. Updated
src.conf.5 with a few extra changes...

Sponsored by:           Netflix
DeltaFile
+438-7share/man/man5/src.conf.5
+2-1share/mk/src.opts.mk
+2-0tools/build/options/WITH_LOADER_USB
+1-0stand/Makefile
+443-84 files

FreeBSD/src 5f848ebsys/modules/ath10k Makefile, sys/modules/brcm80211/brcmfmac Makefile

LinuxKPI wlan drivers: update makefiles to not use WITH_

Up to now the LinuxKPI wlan drivers were using local variables starting
with a WITH_ prefix in their Makefiles.
That is likely to collide with other mechanisms like WITH_ and WITHOUT_
from src.conf.
Adjust the local variables to use a driver name prefix for now to control
what is built and what is not.
These variables are mainly for the time of development so we can
turn off/on a feature or bus attachment while working on it.  Otherwise
they are there for documentation purposes.  The only reason one would
change them locally would be if someone was to build a very custom
image and not want certain bits (e.g., USB support) being compiled into
the modules.

While here, try to harmonize some parts of the Makefiles.

Suggested by:   imp
Discussed with: imp

    [5 lines not shown]
DeltaFile
+46-40sys/modules/brcm80211/brcmfmac/Makefile
+29-31sys/modules/rtw88/Makefile
+29-28sys/modules/rtw89/Makefile
+26-18sys/modules/mt76/Makefile.inc
+20-18sys/modules/ath10k/Makefile
+20-16sys/modules/mt76/mt7921/Makefile
+170-15111 files not shown
+304-23717 files

FreeBSD/src f5f3c16sys/modules/ath11k Makefile

ath11k: restore module Makefile

During the subtree merge and checking out the updated version of ath12k
parts of the previous ath11k merge were accidentally undone.
Retore the ath11k Makefile as well after 3c4eef5d838b restored the
driver bits.

Fixes:          a96550206e4b ("ath12k: update Atheros/QCA's ath12k ..")
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit f9795615415074b23faf8e5d937c2ef31045d3d0)
DeltaFile
+43-20sys/modules/ath11k/Makefile
+43-201 files

FreeBSD/src 823889ashare/vt/keymaps Makefile

us.intl.acc.kbd: add it to Makefile

This keyboard was implemented but wasn't actually installed to the
system.

Fixes: a049678039e40bdf523230852f78887a12435def
Discussed with: imp
MFC after: 1 day
Relnotes: yes

(cherry picked from commit 3b373d484046a94d050a7901feadc001f35fa97f)
DeltaFile
+1-0share/vt/keymaps/Makefile
+1-01 files

FreeBSD/src ca42bd4share/vt/keymaps Makefile

br.lenovo.kdb: add it to Makefile

This keyboard was implemented but wasn't actually installed to the
system.

Fixes: 9357c694e8dca627c25b15529e8435b2ab3dd48b
MFC after: 1 day
Relnotes: yes

(cherry picked from commit 6fb5df548e4a581f958f60544b7fa8ba1716c4c6)
DeltaFile
+1-0share/vt/keymaps/Makefile
+1-01 files

FreeBSD/src 34196ceshare/vt/keymaps Makefile

us.intl.acc.kbd: add it to Makefile

This keyboard was implemented but wasn't actually installed to the
system.

Fixes: a049678039e40bdf523230852f78887a12435def
Discussed with: imp
MFC after: 1 day
Relnotes: yes

(cherry picked from commit 3b373d484046a94d050a7901feadc001f35fa97f)
DeltaFile
+1-0share/vt/keymaps/Makefile
+1-01 files

FreeBSD/src 23eaa98share/vt/keymaps Makefile

br.lenovo.kdb: add it to Makefile

This keyboard was implemented but wasn't actually installed to the
system.

Fixes: 9357c694e8dca627c25b15529e8435b2ab3dd48b
MFC after: 1 day
Relnotes: yes

(cherry picked from commit 6fb5df548e4a581f958f60544b7fa8ba1716c4c6)
DeltaFile
+1-0share/vt/keymaps/Makefile
+1-01 files

FreeBSD/src f1834d0sys/compat/linuxkpi/common/include/linux device.h

LinuxKPI: implement devm_kmemdup_array()

Implement devm_kmemdup_array() using devm_kmemdup() in order to
prepare for Linux v7.0 based drivers.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    dumbbell
Differential Revision: https://reviews.freebsd.org/D56396
DeltaFile
+7-0sys/compat/linuxkpi/common/include/linux/device.h
+7-01 files

FreeBSD/src d2c8525sys/compat/linuxkpi/common/include/linux overflow.h

LinuxKPI: sync overflow.h from Linux v7.0

overflow.h was imported directly from Linux in 3208d4ad2b8320a.
Update the file to the newer version as needed for v7.0 driver updates.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Obtained from:  git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
                028ef9c96e96197026887c0f092424679298aae8 (tag: v7.0)
Reviewed by:    emaste, dumbbell
Differential Revision: https://reviews.freebsd.org/D56394
DeltaFile
+130-14sys/compat/linuxkpi/common/include/linux/overflow.h
+130-141 files

FreeBSD/src c72ac6asys/compat/linuxkpi/common/include/linux slab.h

LinuxKPI: add kmalloc_obj[s], kzalloc_obj[s], and kzalloc_flex

Drivers in Linux v7.0 seem to have changed to the new allocation
macros using a sweep.  Add the ones I encountered with wireless
drivers so far.  They all take an optional argument for a gfp_t,
which default_gfp() deals with.

The plural version "objs" takes an extra nitems argument in addition
to the size.  We use size_mul() to possibly detect overflows.

The "flex" version uses an extra variable to track the variable sized
array allocations and if supported by the compiler will use
__builtin_counted_by_ref() to properly track bounds.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    dumbbell
Differential Revision: https://reviews.freebsd.org/D56395
DeltaFile
+23-1sys/compat/linuxkpi/common/include/linux/slab.h
+23-11 files

FreeBSD/src 524df65sys/compat/linuxkpi/common/include/linux compiler_types.h

LinuxKPI: conditionally add __flex_counter()

__flex_counter() is used by overflow.h and needed for "flex allocations".
It is either a void * typed 0 (NULL) (like this for _Generic checks),
or uses __builtin_counted_by_ref.

The latter was added to gcc and llvm fairly recently and while for gcc
the __has_builtin() check suffices, clang had parts broken until recently
so needs an extra check for the next major version.  The fixed hash is
currently not part of any tag to use, so we play it save (and hope 23
will have it).  It will be a while until we will see the builting to be
used but at least we will be prepared for it.  See inline comments for
the commit hashes and versions which added the feature.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    dumbbell
Differential Revision: https://reviews.freebsd.org/D56393
DeltaFile
+13-0sys/compat/linuxkpi/common/include/linux/compiler_types.h
+13-01 files