cad/yosys-ghdl-plugin: Fix build
Fix build to work with current cad/ghdl.
PR: 293156
Approved by: Nico Sonack <nsonack at herrhotzenplotz.de> (maintainer)
arm64: Optimise the repeated TLBI workaround
It has been reported that the overhead of repeating all TLBI
instructions is too large [1]. The Software Developer Errata Notices
(SDEN) for the relevant Arm CPUs have been updated so a single
"tlbi vale1is, xzr" followed by "dsb ish" is sufficient to work around
the issues.
Replace the places we repeat TLBI instructions with the new sequence.
[1] https://lore.kernel.org/linux-arm-kernel/20260218164348.2022831-1-mark.rutland@arm.com/
Reviewed by: kib
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D55646
arm64: Use a canonical address when TBI is enabled
When Top Byte Ignore (TBI) is enabled in a processor we need to pass
a canonical address to the vm subsystem.
Reviewed by: alc, kib
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D55619
build: Retire LLVM_CXXFILT option
The LLVM_CXXFILT option was added when we used ELF Tool Chain tools by
default. ELF Tool Chain's c++filt failed to demangle some symbols, so
we added a special case to install LLVM's version and enabled it by
default.
The rest of the LLVM tools are now used by default, as of commit
9fa94e1c099d ("Turn on WITH_LLVM_CXXFILT by default"). Simplify the
build logic by removing a special case and just include llvm-cxxfilt
with the rest of the LLVM utilities.
Reviewed by: dim
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55654
vm_page.h: Materialize a spare bit
No functional change (intended).
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
(cherry picked from commit d18aaeff8fd314e79642062d95110ad174bd1882)
sys/compat/freebsd32: FF clock struct: Don't pack, use 'ffcounter32'
Packing 'struct ffclock_estimate32', in absence of substitution of
'ffcounter' (some 'uint64_t') by a 32-bit compatible type, was necessary
on amd64 since 'uint64_t' is 8-byte aligned, which leaves a padding gap
of 4-byte between fields 'update_time' and 'update_ffcount'. This gap
does not exist on i386 (or amd64 32-bit mode), as 'uint64_t' there is
only 4-byte aligned.
Change the type of the 'update_ffcount' and 'leapsec_next' fields to the
recently introduced 'freebsd32_uint64_t', and adapt copy-in and copy-out
accordingly. Using `CP()` previously worked due to the '__packed__'
attribute.
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55282
(cherry picked from commit 7c2fc4419db43a8a7d1886b0b8e08aa97bfa31e4)
sys: ELF: Rename SHN_FBSD_CACHED => SHN_FREEBSD_CACHED
All other FreeBSD-specific constants have FREEBSD fully spelled out in
their names. Be consistent.
No functional change (intended).
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55224
(cherry picked from commit 2ce028e8a2655d0e2e3435ae24cb00c1c51b5027)
sys/sysctl.h: Add missing <sys/kassert.h> include
Hopefully, 'sys/sysctl.h' is really self-contained now.
This fixes the GENERIC-NODEBUG compilation error in 'hwpstate_common.c'
after commit 804329587508 (see below).
Fixes: 1a446f765d9c ("sys/sysctl.h: Make it self-contained when included from the kernel")
Fixes: 804329587508 ("hwpstate{_amd,intel}(4): Move common knobs to a separate file")
Sponsored by: The FreeBSD Foundation
(cherry picked from commit bfd50a32ff26067552220c6f08e6025be3603962)
kernel dump: dumpsys_gen_pa_next(): Fix "no more chunks" condition detection
In the (improbable) cases where either:
- All entries in dump_map[] are used, so there is no guard entry filled with zeros.
- Some dump region has size 0.
We would respectively access dump_map[] out-of-bounds or omit further
dump regions when iterating.
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 7e5f4bb3a1c999d1893528faa75559f37365de47)
sys/compat/freebsd32: Fix i386 compilation
The compile assertion now failing is due to the change '__int64_t' =>
'__int32_t' as the type of 'time32_t' on i386, which is the correct
value. The use of 'freebsd32.h' on i386 may seem strange, but it comes
from 'kern_umtx.c' including it unconditionally as it needs 'struct
umutex32'.
Fixes: 87632ddf67b0 ("openzfs sys/types32.h: use abi_compat.h for time32_t")
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 07c4eb506be45a4b836665e14ad63034ef3d573a)
endian.h: Visibility comment: Fix grammar, a typo and punctuation
No functional change.
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 8bdcfc2a3febcd1aade1d9a3a8a87581c7b2928d)
sys/sysctl.h: Make it self-contained when included from the kernel
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 1a446f765d9cb34e8137ffa6dbb71ce551560cc1)
hwpstate{_amd,intel}(4): Move common knobs to a separate file
Reason for doing this right now is to resolve the conflict on
'machdep.hwpstate_pkg_ctrl' between the Intel and AMD drivers, even
though I expect to remove it for hwpstate_amd(4) at some point.
More generally, this is going to be useful for some future code
factorization. Also, the 'debug.hwpstate_verbose' knob was moved there,
as we'll likely want to use it for the Intel driver as well (which is
currently not the case).
Note for MFC: Will be partial, since `hwpstate_amd(4)` does not support
CPPC in stable/15 nor stable/14.
Reviewed by: emaste
Fixes: 3e6e4e4a0d42 ("hwpstate: add CPPC support for pstate driver on AMD")
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D54528
(cherry picked from commit 8043295875083b57a6b7b2dc6826fde4cf4e1ba1)
sys: vt_efifb: EFI not supported on i386; move it back to amd64/NOTES
We do not support EFI boot on i386. Thus:
1. Move (back) 'device vt_efifb' from x86/NOTES to amd64/NOTES.
2. Remove 'device vt_efifb' from i386/MINIMAL.
Reported by: jhb
Fixes: f224591746bd ("Add ASMC_DEBUG make option")
Fixes: 67599eef01f5 ("sys/x86/NOTES: Add vt_efifb")
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 9c25620e57f01d8227f0d53c6b2134ab37a49fdf)
asmc(4): pull 32-bit support for the driver
The asmc(4) driver should work for 32-bit Intel-based Macs, in theory, if
the model details were added to the detection list. That being said,
32-bit Intel Macs were only released and available to the general public
for 8 months [1], so the value in maintaining i386 support in the driver is
reduced due to limited hardware access.
Remove 32-bit support for the driver officially to make it clear its use is
not supported.
This should fix building `NOTES.i386` by proxy as well.
Relnotes: yes
MFC after: 2 weeks
Fixes: f224591746b ("Add ASMC_DEBUG make option")
Fixes: 8342d9f7b5f ("asmc(4): Stop building it on i386, as...")
Differential Revision: https://reviews.freebsd.org/D55544
(cherry picked from commit 1f2f5eba24aa53e180a4eb46b772410e5a782469)
i386: Fix kernel compilation after introduction of ASMC_DEBUG option
Fixes: f224591746bd ("Add ASMC_DEBUG make option")
Sponsored by: The FreeBSD Foundation
(cherry picked from commit fde9fe18219f6e987279a9d042345e7c6fc170d1)
sysutils/Makefile: Remove sysutils/whowatch
Whowatch was designed as a Linux application that relies
on /var/log/wtmp and /var/run/utmp, which are now legacy
on FreeBSD.
Fixing the application for FreeBSD requires rewriting a large part of it.
LinuxKPI: 802.11: change teardown order of disassoc and sta rm
In lkpi_sta_auth_to_scan() we remove the sta from the firmware
for everything supporting (*sta_state).
We used to run into issues here with iwlwifi in that we had to
use a specific order: set vif->cfg.assoc = false, .aid = 0,
then remove the sta, and then send the mac update as otherwise
we would either have the sta silently removed (if we run
(*bss_info_change) first and fail then or silently not have the
sta removed and upon sta add we would trigger the fw crash.
The order of events seem to have changed now and especially BE200
(iwlwifi/mld) is picky about this and would crash the firmware with
something like:
iwlwifi0: 0x20103311 | ADVANCED_SYSASSERT
iwlwifi0: 0x00000000 | umac branchlink1
iwlwifi0: 0xC00808AA | umac branchlink2
[21 lines not shown]
LinuxKPI: 802.11: split (*bss_info_changed) up for more modern drivers
With the advent of MLO some of the updates (*bss_info_changed) would
have done are not per-link. This had (*vif_cfg_changed) and
(*link_conf_changed) introduced which are used by iwlwifi, rtw89,
select mt76 drivers, and ath12k currently it seems.
A driver normally only supports on or the other set.
Factor out the call to (*bss_info_changed) into an internal function.
There split the options up depending on whether they are for the
vif or a link and leave a fallback to (*bss_info_changed) for older
drivers.
Add the mac80211 ops implementations for the two new calls along with
a currently unused backup option for (*bss_info_changed) for each
as I assume we will eventually call the directly rather than from the
internal wrapper function.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days