amd64/acpica/acpi_wakeup.c: do not store to WARMBOOT_OFF in efi_boot case
Split acpi_wakeup_cpus() into acpi_wakeup_cpus_bios() and
acpi_wakeup_cpus_efi(). The former needs to manipulate zero page and
CMOS state, the later does not.
Referenced commit left the write to WARMBOOT_OFF in case of
acpi_wakeup_ap() failed.
Fixes: e99255c8a6cae324aeede7f5013d080a2d361e3f
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D55205
sys/event.h: reduce namespace pollution from sys/abi_compat.h
Split out types definitions into sys/abi_types.h, and only include
abi_types.h into sys/event.h.
Tested and reviewed by: bz
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D55202
ath10k: cleanup some bits no longer FreeBSD-specific
We have since I did this port in 2023 added ACPI support to LinuxKPI, so
we can use it. Also there is a linux/of.h header so we no longer need
to guard the #include.
MFC after: 3 days
ath10k: modules Makefile bus attachments
Given USB in theory compiles add it to the Makefile. The upstream
support was never finished and I see little chances it ever will be
so keep USB disabled by default.
MFC after: 3 days
ath10k: usb: make compile using [a future] linuxkpi_usb
Make ath10k usb code compile just to gather more USB bits.
Currently (and likely forever) it is useless as the ath10k USB
implementation never got finished.
At the moment it lacks an entry for the USB bus attachment in
core.c ath10k_hw_params_list[].
ath10k_usb0 on uhub1
ath10k_usb0: <Qualcomm Atheros USBWLAN, rev 2.01/92.10, addr 6> on usbus0
ath10k_usb0: Warning: ath10k USB support is incomplete, don't expect anything to work!
ath10k_usb0: Unsupported hardware version: 0x5020001
ath10k_usb0: could not get hw params (-22)
ath10k_usb0: could not probe fw (-22)
There is another possible hardware [1] which was also never merged
upstream.
[1] https://lists.infradead.org/pipermail/ath10k/2024-August/016037.html
[3 lines not shown]
ath10k: harmonize all MODULE_DEPEND to ath10k
With theoretically multiple bus attachements (unclear if we will ever
support anything but PCI) rename the module name to "ath10k" and use
it consistently. Move the common depends to core.c and lindebugfs
and usb to their respective files.
MFC after: 3 days
rtw88: set .bsddriver.name for USB chipsets
We use the FreeBSD-specifc bsddriver.name to get the device name;
set it everywere consistently.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D55020
ath10k: add sysctl to turn on/off fwlog
FWLOG, if compiled in, was on by default without a way to stop it from
printing everything to the console. Add a modparam to enable it with
it being disabled by default if available.
MFC after: 3 days
ath10k: fix a schedule() call
Using kern_yield does not seem ideal either for polling here; use a
schedule_timeout() call from LinuxKPI instead and use about 100
iterations per second.
Improve an error message to include the error code so we have a better
idea of what happens.
MFC after: 3 days
LinuxKPI: add scoped_guard(), spinlock guard support
The "cleanup.h" implementation got a bit more complicated.
For one we now use a macro to concatenate a prefix, the name, and a
suffix for variable and function declarations. This was triggered
by the fact that the "guard_" prefix we used was confusing. We now
use a generic "cleanup_" which is only encoded in the single place
rather than all over the file.
As already indicated by the comment the DEFINE_LOCK_GUARD_0()
macro got split up and a _1 version which also takes a type got
implemented and is used for a spinlock variant used by rtw89(4)
via the new scoped_guard() bits.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54808
LinuxKPI: mod_devicetable, add comment about [future] LinuxKPI USB
USB structures are defined with the native USB implementation.
Just leave a comment why they are not here.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D54991
LinuxKPI: move MODULE_DEVICE_TABLE from pci.h to module.h
Move the MODULE_DEVICE_TABLE macro to module.h where it belongs
in preparation for different bus (e.g., USB, SDIO) support.
The various struct <bus>_device_id, if not elsewhere, should be
defined in mod_devicetable.h.
This is the next step after 2f5666c1727c.
No functional changes.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste, dumbbell
Differential Revision: https://reviews.freebsd.org/D54900
LinuxKPI: pci: make sure a tailq and lock are initialized
Move the initializations of the tailq and lock from
linux_pci_attach_device() into lkpifill_pci_dev() so that they are
initialized in all cases we create a device (see all the possible
callers of lkpifill_pci_dev()).
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste, dumbbell
Differential Revision: https://reviews.freebsd.org/D54861
LinuxKPI: expand dma_sync_single_for_cpu() in lkpi_dma_unmap()
In case lkpi_dma_unmap() would call dma_sync_single_for_cpu() we get
into a lock recursion which will trigger a panic with debug kernels.
It would be hard to provide an internal "locked" version for
dma_sync_single_for_cpu(). In the old days this would not have
been a problem but (long before we added the missing sync calls)
some locks got folded into one in a6619e8d9c1a3.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Observed with: iwlwifi mld
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D54841
net80211: in net80211_vap_printf() also use vprintf()
While everything else uses vprintf() and net80211_vap_printf()
vlog() the debug output of wlandebug sessions can be weird.
For consistency use vprintf() everywhere to have homogeneous logging.
Sponosred by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D54795
sys/netinet6: switch net.inet6.ip6.use_stableaddr to on by default
This change switches to using RFC 7217 algorithm as the default to
generate SLAAC addresses for IPv6 interfaces configured with
accept_rtadv.
Reviewed by: pouria, glebius, zlei
Approved by: zlei
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D55138
amd64/conf: Remove a config committed by accident
Reported by: kib, kp
Fixes: 350ba9672a7f ("unix: Set O_RESOLVE_BENEATH on fds transferred between jails")
(cherry picked from commit 3ef39f58e5d63a78fd1c37e6c62d599bc68d5e1e)
amd64/conf: Remove a config committed by accident
Reported by: kib, kp
Fixes: 350ba9672a7f ("unix: Set O_RESOLVE_BENEATH on fds transferred between jails")
(cherry picked from commit 3ef39f58e5d63a78fd1c37e6c62d599bc68d5e1e)
ifconfig.8: Start new sentence on new line
This change was forgotten by me in the previous commit to this file.
Reported by: kib
Approved by: implicit (change omitted from previous commit)
Fixes: 31ec8b6407fdd5a87d70265762457c67ce618283
ObsoleteFiles.inc: remove stale allwinner pages
These were moved out of man/man4/arm into man/man4. Add entries to catch
the stale copies.
Fixes: 15c79c6fa608 ("man4: move allwinner pages and logic to a standard place")
riscv: smarter DMAP construction (again)
Extend pmap_bootstrap_dmap() to build the DMAP with 4K-page granularity.
Recently we have been approximating it with 2MB mappings. The motivation
again is the problematic FU540 hardware, which seems to require more
accurate mappings still to avoid triggering its PMP errata.
Although this hardware alone is of little consequence, constructing the
DMAP accurately/correctly may help avoid future surprises.
The implementation contains some repetitive code. This could be
expressed differently, but my guiding principle for these early routines
is that being simple and explicit about what we are doing makes them
easier to comprehend.
See also 762a3224cde6 ("riscv: smarter DMAP construction).
Tested by: Klaus Küchemann <maciphone2 at googlemail.com>
[5 lines not shown]
ahci: Restrict NVMe redirection by BAR size
Attempts to access vendor-specific registers on emulator of older
Intel hardware was reported to confuse one. Since the redirection
obviously require BAR size bigger than normal 2KB of AHCI, add
the condition, similar to what Linux is doing.
Requested by: kib
MFC after: 2 weeks
openzfs sys/types32.h: use abi_compat.h for time32_t
The time32_t typedef leaks into openzfs compilation environment
through sys/event.h. Simultaneously, openzfs provides its own
definition that is only correct for amd64 on FreeBSD.
Try to fix it by using sys/abi_compat.h directly. Since toolchain build
from the make buildworld uses host abi_compat.h, add a preprocessor
symbol __HAVE_TIME32_T to signal consumers that time32_t is typedef'ed.
If not defined, fall back to old and wrong time32_t, which is enough for
bootstraping toolchain.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D55135
sys/compat/freebsd32: ki_pd is missing from struct kinfo_proc32
This is missed by the sizeof(struct kinfo_proc32) assert due to another
bug: namely, the use of uint64_t type that has different alignment on
i386 than on amd64 host.
Fixes: 85078b8573332c2c83a79adea8a61b519fb3b6af
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D55135
sys/abi_compat.h: normalize include guard name
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D55135