arm64 pmap: Add ATTR_CONTIGUOUS support [Part 3]
Introduce L3C promotion of base page mappings. When the base page size
is 4KB, use ATTR_CONTIGUOUS to promote 16 aligned, contiguous base page
mappings to a 64KB mapping. Alternatively, when the base page size is
16KB, use ATTR_CONTIGUOUS to promote 128 aligned, contiguous base page
mappings to a 2MB mapping.
Given the frequency of L3C counter updates, switch to per-CPU counters
to avoid cache line ping ponging.
Revise the L3C counter descriptions to reflect the fact that the size
of an L3C mapping varies depending on the base page size.
Co-authored-by: Eliot Solomon <ehs3 at rice.edu>
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D44983
sockets: garbage collect PRCOREQUESTS and stale comment
The code deleted predates FreeBSD history. The comment deleted is 99%
outdated. Why KAME decided to use these constants instead of normal ones
also lost in centuries.
nvmecontrol: Fix a sign compare mismatch
Even though mqes (uint16_t) and queue_size (u_int) are both unsigned,
the expression 'mqes + 1' gets promoted to int which is signed. Keep
the value unsigned by explicitly promoting mqes to u_int before
incrementing the value.
Reported by: GCC
nvme: Bump the alignment of struct nvme_health_information_page to 8
This ensures that embedded uint64_t values used for statistics
counters are aligned when allocating a structure on the stack or as
part of a containing structure. In particular this quiets
-Waddress-of-packed-member warnings from GCC when compiling the code
in nvmfd to update the stats.
Reported by: GCC
lib/clang: clean out old llvm/clang Sparc target remnants
The WITH_LLVM_TARGET_ENABLE_SPARC option was removed a long time ago,
but some ifdefs were still laying around, so clean them up.
PR: 276104
Approved by: re (cperciva)
MFC after: 3 days
(cherry picked from commit 6f444019009a55aac18d18054d154155fbf606c9)
(cherry picked from commit 0b8cdac883f5028c8716aa7442c07c68ac1f780b)
lib/clang: clean out old llvm/clang Sparc target remnants
The WITH_LLVM_TARGET_ENABLE_SPARC option was removed a long time ago,
but some ifdefs were still laying around, so clean them up.
PR: 276104
MFC after: 3 days
(cherry picked from commit 6f444019009a55aac18d18054d154155fbf606c9)
Fixup: Merge llvm-project release/18.x llvmorg-18.1.5-0-g617a15a9eac9
Update version numbers, config headers, etc. Git tricked me into losing
these before pushing.
PR: 276104
Fixes: d67fc74b9249
MFC after: 3 days
(cherry picked from commit 894cb08f0d3656fdb81f4d89085bedc4235f3cb6)
lib/clang: clean out old llvm/clang Sparc target remnants
The WITH_LLVM_TARGET_ENABLE_SPARC option was removed a long time ago,
but some ifdefs were still laying around, so clean them up.
PR: 276104
MFC after: 3 days
(cherry picked from commit 6f444019009a55aac18d18054d154155fbf606c9)
Fixup: Merge llvm-project release/18.x llvmorg-18.1.5-0-g617a15a9eac9
Update version numbers, config headers, etc. Git tricked me into losing
these before pushing.
PR: 276104
Fixes: d67fc74b9249
MFC after: 3 days
(cherry picked from commit 894cb08f0d3656fdb81f4d89085bedc4235f3cb6)
Revert "jh7110: Add StarFive JH7110 clock/reset generator drivers"
I did not set the author field properly; revert to fix this.
This reverts commit 5d6d6278979b9eab598a23c804d23e930d2f7268.
busdma: better handling of small segment bouncing
Typically, when a DMA transaction requires bouncing, we will break up
the request into segments that are, at maximum, page-sized.
However, in the atypical case of a driver whose maximum segment size is
smaller than PAGE_SIZE, we end up inefficiently assigning each segment
its own bounce page. For example, the dwmmc driver has a maximum segment
size of 2048 (PAGE_SIZE / 2); a 4-page transfer ends up requiring 8
bounce pages in the current scheme.
We should attempt to batch segments into bounce pages more efficiently.
This is achieved by pushing all considerations of the maximum segment
size into the new _bus_dmamap_addsegs() function, which wraps
_bus_dmamap_addseg(). Thus we allocate the minimal number of bounce
pages required to complete the entire transfer, while still performing
the transfer with smaller-sized transactions.
For most drivers with a segment size >= PAGE_SIZE, this will have no
[8 lines not shown]
jh7110: enable MMC driver
Add a variant of the existing dwmmc driver, and enable it in the GENERIC
kernel.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44026
starfive: add a syscon driver
It serves the purpose of attaching syscon devices as early as possible;
this is required for early attachment of the PLL clock driver.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44270
busdma: deduplicate _bus_dmamap_addseg() function
It is functionally identical in all implementations, so move the
function to subr_busdma_bounce.c. The KASSERT present in the x86 version
is now enabled for all architectures. It should be universally
applicable.
Reviewed by: jhb
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45047
fib_dxr: set fib_data field in struct dxr_aux early enough
Previously it was possible for dxr_build() to return with da->fd
unset in case of range_tbl or x_tbl malloc() failures. This
may have led to NULL ptr dereferencing in dxr_change_rib_batch().
MFC after: 1 week
PR: 278422
boot1.efi: Don't redundantly include devpath.c
devpath.c is on both the comand line and in libefi. This is redundant
and was a mistake in 4cf36aa1017f9. It never should have been here. In
practice, this just means that the devpath.o from libefi.a goes unused.
This will cause problems with some upcoming changes (D44872) to enable
LTO to reduce the size of the binaries, so go ahead and make the change
now to reduce the changeset for that. No functional change indended.
Fixes: 4cf36aa1017f9
Co-authored-by: sobomax
Sponsored by: Netflix
dlopen(3): mention fdlopen for capsicum(4)
Capsicum-sandboxed applications generally cannot use dlopen, as absolute
and cwd-relative paths cannot be accessed. Mention that fdlopen is
useful for sandboxed applications.
PR: 277169
Reviewed by: markj, oshogbo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45108