Bring in the latest Arm Optimized Routines memcpy/memmove into the
arm64 kernel. As these functions have been merged in the current
version remove the now unneeded memmove.S.
Sponsored by: The FreeBSD Foundation
need to do synchronization by hand when termcap is updated.
Reviewed by: uqs, bapt, imp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D36333
Routing daemons such as bird need to know if they install certain route
so they can clean it up on startup, as a form of achieving consistent
state during the crash recovery.
Currently they use combination of routing flags (RTF_PROTO1) to detect
these routes when interacting via route(4) rtsock protocol.
Netlink protocol has a special "rtm_protocol" field that is filled and
checked by the route originator. To prepare for the upcoming netlink
introduction, add ability to record origing to both nexthops and
nexthop groups via <nhop|nhgrp>_<get|set>_origin() KPI. The actual
calls will be used in the followup commits.
MFC after: 1 month
In 8db2e8fd16c4 ("Remove the secondary_stacks array in arm64 [...]"),
bootstacks was setup to be allocated dynamically. While this is
generally how x86 does it, it inadvertently shrunk each boot stack from
KSTACK_PAGES pages to a single page.
Resize these back up to the expected size using the kstack_pages
tunable, as we'll need larger stacks with upcoming sanitizer work.
Reviewed by: andrew, imp, markj
Fixes: 8db2e8fd16c4 ("Remove the secondary_stacks array [...]")
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D36475
Change RB_INSERT_COLOR and RB_REMOVE_COLOR so that the blocks of code
that are identical except for left and right being exchanged are made
only one block with a variable to indicate left- or right-handedness.
Rename RB macros so that those not intended for external use begin
with an underscore.
Add comments to the balancing code so that another might understand it.
Reviewed by: alc, kib
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D36393
With _RB_DIAGNOSTIC defined, provide an RB_RANK method to compute the
rank of a node in an rb-tree, if the subtree rooted at that node is
rank-balanced, and -1 otherwise.
In rb_test, rewrite a bit to avoid malloc/free and nondeterministic
running times because of randomness. Allocate all the nodes on the
stack, and shuffle a set of keys to get randomness for the testing.
Add a rank-balance check for the completed tree.
Reviewed by: markj
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D36484
This corrects an issue introduced in b4cb3fe0e39a3, where a freshly
allocated `DOS_FS` structure would not be initialized properly before
use in `dos_open`.
In case of FAT32 file systems, this would leave `fs->dirents`
uninitialized and - depending on its content and due to checks in
`parsebs` - prevent mounting the file system successfully.
This particularily impacted the EFI loader, as it was sometimes not
able to read files from a FAT32-formatted EFI partition, including
LoaderEnv (`/efi/freebsd/loader.env`).
Accepted by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36482
Add DLink DWA-182 rev D1 and generic Realtek RTW8821CU entry found on
a Tenda U10 USB WLAN Stick, AC 650 Mbps (and possibly more devices).
The latter first presents itself as a CD device with Windows drivers
(useless on FreeBSD) first so add a quirk for that we get the wireless
device right away.
MFC after: 2 weeks
While here sort some other Realtek entries by DeviceID.
Update the mac80211 ops KPI for (*conf_tx), (*assign_vif_chanctx),
(*unassign_vif_chanctx), (*start_ap), and (*stop_ap), as well as
ieee80211_beacon_get_tim() and ieee80211_beacon_get_template().
Update in-tree drivers iwlwifi and rtw88 accordingly based on upstream
changes (as well as out-of-tree ones). This was triggered by trying to
synchronize more drivers to a common state.
MFC after: 1 week
There are drivers directly accessing napi->state testing for bits
(NAPI_STATE_SCHED encountered so far). Rename the internal _flags
struct field to state and expose our internal state flag bits along
with the one official aliased.
As I left in a comment, I wished Linux would hide these accesses
behind inline functions or by other means and not public expose
the implementation details.
MFC after: 1 week
A (so far out-of-tree) driver update needs
request_partial_firmware_into_buf(). Given we load the full .ko file
using firmware(9) just do that and copy the requeste data into the
buffer (rather than poissibly only reading portions of the firmware
file).
MFC after: 1 week
Update to the full list of action field category values based on
802.11-2020 with 11ax extensions and remove one value Reserved nowadays.
While here annotate them with descriptions.
Also add Spectrum Management and Radio Measurement action field values
needed in LinuxKPI.
No functional changes.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Commit 33721eb991d8 enabled use of "nolockd" for
NFSv4 mounts. This was done primarily to allow its
use with the "intr" mount option.
This patch updates the man page for this.
This is a content change.
Reviewed by: gbe (manpages), karels
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D36462
Occasionally the QEMU package fails to build and isn't available on
-CURRENT using the Latest package set. Move the package installation
to the test script, so that if the package isn't available we at least
still perform a build test.
Sponsored by: The FreeBSD Foundation
This is based off the Linux file sound/hda/intel-dsp-config.c.
Reviewed by: imp (src)
Tested on: HP Spectre x360 16-f0023dx
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D36476
It is now unused and not having it allows further clean ups.
Reviewed by: cy, glebius, kp
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D36452
With addition of clkgen devices to the Armada38x we no longer
need to rely on get_tclk() to get the device frequency.
Leave it as a fallback, just in case.
Reviewed by: manu
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D36465
With the addition of clkgen devices to the Armada38x, there is
no longer any need to use the get_tclk() hack.
Reviewed by: manu
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D36456
This patch introduces basic gate control driver for Armada38x SoC.
Each gate controls coreclk output to a given peripheral.
Reviewed by: manu
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D36455
This patch introduces clkgen driver for Armada38x SoCs.
Clock topology consists of single coreclk which supplies
clock signal to CPU cores and peripherials.
Reviewed by: manu
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D36453
It is stored in the clock-frequency property.
In case of failure, fallback to the harcoded value stored in the
compat data.
Also, while here improve style.
Tested on LS1046ARDB and x86 PC.
Reviewed by: mw
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D36326
Add VM_EXITCODE_IPI to permit returning unhandled IPIs to userland.
INIT and Startup IPIs are now returned to userland. Due to backward
compatibility reasons, a new capability is added for enabling
VM_EXITCODE_IPI.
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D35623
Sponsored by: Beckhoff Automation GmbH & Co. KG
vcpus could be restarted by the guest by sending an INIT SIPI SIPI
sequence to a vcpu. That's not supported by bhyve yet but it will be
supported in a future commit. So, create the vcpu threads only once on
startup to make restarting a vcpu easier.
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D35621
Sponsored by: Beckhoff Automation GmbH & Co. KG
Although originally socket was intended to use with ipfw(4) only, now
it also can be used with pf(4). On a kernel without packet filters,
it still can be used to inject traffic.
Python's socketmodule isn't able to construct sockaddr when it doesn't
recognize the address family. Until this is solved in python let the
tests use the compatibility way to create divert(4) socket.
The SIOCSTAT1 ioctl is only used in ip_auth and is unused in ip_state.
The ip_state version was likely added to support a new statistic yet
to be developed in ipfstat(8) or for some sample userspace application
(similar in fashion to the sample provided for authentication rules).
There is no need to report individual state hash table bucket lengths
to any future userspace application.
If needed for any future debugging purposes a DTrace probe would be a
better vehicle.
This unused ioctl in ip_stat results in a panic.
PR: 266124
Reported by: Robert Morris <rtm@lcs.mit.edu>
MFC after: 3 days
It was possible to cause kernel panic by passing too large args_len
or non-NULL result_nvl.
Though since the /dev/cam/ctl device is accessible only by root and
used only by limited number of tools it was not a big problem.
PR: 266115
PR: 266136
Reported by: Robert Morris <rtm@lcs.mit.edu>
MFC after: 1 week
When something was found wrong with an inode the error message
was always "UNKNOWN FILE TYPE". This error is now used only when
the file type field is wrong. Other errors have their own messages:
"BAD FILE SIZE", "NEGATIVE FILE SIZE", "BAD SPECIAL-FILE RDEV",
"INVALID DIRECT BLOCK", and "INVALID INDIRECT BLOCK".
More complete information about the inode is also provided.
Sponsored by: The FreeBSD Foundation