Export SB_OBJROOT for later reference
The build varies MAKEOBJDIRPREFIX at times which
can make it difficult to track the original OBJROOT.
This is easier when we get the original from env as SB_OBJROOT.
If SB_OBJROOT did not come from env, set and export it
the first time we set OBJROOT.
This allows SB_OBJROOT to be used in .MAKE.META.IGNORE* variables
to tweak what should be considered as making a target out-of-date.
Update auto.obj.mk to latest from contrib/bmake - handles relative
objdirs more simply and reliably.
Also update jobs.mk and stage-install.sh
Reviewed by: stevek
Differential Revision: https://reviews.freebsd.org/D50313
linuxkpi: Improve LKPI_80211_TRACE_MO message
The message used to have a prefix of the function and line, followed by
`:_` and the supplied message. Commit 3206587a20de ("LinuxKPI: 802.11:
improve scan handling") changed the prefix to add the CPU, tid, and
ticks. `_` and the caller-supplied message were joined to the ticks
value, resulting in a somewhat odd message. Instead use `: ` to
separate them.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50667
LinuxKPI: 802.11: add ieee80211_purge_tx_queue()
Add ieee80211_purge_tx_queue() dummy function needed by rtw88 SDIO.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
LinuxKPI: skbuff: add dummy skb_copy_header()
There's one case which needs skb_copy_header(); add a dummy function
for now until we get to the code which uses it to test an implementation.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
LinuxKPI: netdev features style, annotate, and add %b decoding mask
Start to sort through the netdevice features to match them with
FreeBSD. Annotate them a bit more verbose though the names are
pretty telling already.
While here adjust style(9) as well.
Lastly add the bit definitions for use with printf(9) %b as names
read easier than bitmasks. We will use that in LinuxKPI 802.11.
No functional changes.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
LinuxKPI: skbuff: make csum_unfold return __wsum
Given the internal field now stores a __wsum csum (after we added
the type) also make sure csum_unfold() returns a __wsum.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Fixes: 59481c7db234
LinuxKPI: 802.11: move rx_nss check to be at least 1 into sync function
We set rx_nss to at least 1 and the sync functions for HT and VHT are
careful not to set it to 0. Rather than relying on that and any
possible future call to lkpi_sta_sync_from_ni() migrate the MAX()
call into the sync function after each standard level went through
to make sure that at the end we at least have rx_nss set to 1.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
LinuxKPI: 802.11: use macros for locking
Rather than using inline functions use macros so we know where we are
taking the lock in the code rather than only recording the inline
function location.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
LinuxKPI: 802.11: switch to m_get3()
Start using m_get3() instead of m_get2() as we may get up to 11K
frames and m_get2() only gives us up to MJUMPAGESIZE (8K).
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Discovered by: adrian with rtwn(4) [see D50049].
LinuxKPI: Implement dma_map_resource/dma_unmap_resource functions
dma_map_resource() and dma_unmap_resource() functions are used to map
and unmap of memory-mapped IO resources so they can be accessed by
the device.
Required by drm-kmod v5.5 to be built.
While for drm-kmod 6.6-lts only amdgpu uses these in one place and
the code apparently has not been exercised a lot it has been around
like this for years. With changing the underlying implementations
bring it into the tree; should we find errors with it they can also
be fixed here.
Bump __FreeBSD version to be able to detect this change.
Obtained from: D30933 (by wulf)
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
[2 lines not shown]
LinuxKPI: 802.11: ensure bandwidth <= channel bandwidth
While we could select our own channel width and station bandwidth
indepedent of net80211 that is not a good idea and will lead to
trouble. Make sure the station bandwidth we select does not
exceed the bandwidth of the channel we are tuned into.
Now that VHT160 work we may locally disable it (-vht160) and the
AP may still support it but we would be on a 80Mhz channel.
Or we do support VHT160 but the AP does not. Again we would be
on a 80Mhz channel and not support 160Mhz.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
LinuxKPI: add missing bus_dmamap_sync() calls or exclude them
Rename linux_dma_unmap() to lkpi_dma_unmap(), and linux_dma_map_phys()
to lkpi_dma_map_phys() so that we get the full set of function
arguments (direction and attributes were missing).
Leave the old functions as wrappers as they are called from drm-kmod
linuxkpi/bsd still, and leaving them also allows us to MFC this
change.
Add missing bus_dmamap_sync() calls. Rather than inlining them
in each inline function push them down to the actual implementation.
From there do not inline them either but call the appropriate
function dealing with the sync so that we do not have the same
code splattered in many places.
Adhere to the DMA_ATTR_SKIP_CPU_SYNC attribute and skip synching
when requested.
A previous, less complete version of this change already allowed
[13 lines not shown]
puc.4: Add a HARDWARE section based off device data from pucdata.c
While here, change applicable uses of "ports" to "adapters" to be more
precise and improve searchability.
This is a 14.3 candate since it affects (positively) the release notes
generated from the hardware secionts.
Approved by: re (cperciva)
MFC After: 3 days
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1663
(cherry picked from commit 794ee43e75066bfcbc00545b5bf600b9cda2d5f1)
(cherry picked from commit 827153d21219f76cf006d50af4cdf85f22b75de0)
puc.4: Add a HARDWARE section based off device data from pucdata.c
While here, change applicable uses of "ports" to "adapters" to be more
precise and improve searchability.
This is a 14.3 candate since it affects (positively) the release notes
generated from the hardware secionts.
MFC After: 3 days
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1663
(cherry picked from commit 794ee43e75066bfcbc00545b5bf600b9cda2d5f1)
newfs: enable newfs to run on plain files without a bsdlabel
For awhile now it's been possible to newfs a plain file...however, newfs
errors out when the file doesn't have a bsdlabel - this commit changes
that.
Reviewed by: mckusick
Differential Revision: https://reviews.freebsd.org/D50562
ppt: Fix panic when configuring unavailable MSI-X vector
In some cases VM may have different idea about number
of available MSI-X vectors then PPT driver. Return
an error when VM requests setup for more vectors
than expected.
It was observed while using SR-IOV on an Intel E810 Ethernet adapter.
VF driver in a VM sees a correct number of available MSI-X vectors,
which depends on num-queues assigned in iovctl.conf, while
pci_msix_count in the PPT driver always returns 1.
Signed-off-by: Krzysztof Galazka <kgalazka at FreeBSD.org>
Reviewed By: #bhyve, jhb
Approved by: erj (mentor), kbowling (mentor)
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D48812
(cherry picked from commit 413197cef9ccbf22831eb914c2ef469880468d97)
libc: Fix glob.c build with GCC
We don't expose the dummy struct pointer in the header file, so
gl_errblk is just a void * when lacking compiler support for blocks and
we need to cast to the former for CALL_BLOCK to work. If blocks support
is present this should be a redundant cast to the type that gl_errblk
already is.
Fixes: 1e0743f54d2d ("glob: Add blocks support")
libc: Allow more complex expressions for CALL_BLOCK first argument
For the case where the compiler supports blocks we only allow the first
expression to have an operator if it has as high precedence as a
function call, which for blocks effectively means member access and
subscripting only, not even a dereference nor a cast. Parenthesise this,
as is the case for the missing compiler support case, so that it's more
general.