[SLP] Cost struct-returning intrinsic calls with a vector library mapping
getVectorCallCosts queried the vector intrinsic cost with a type-based-only
IntrinsicCostAttributes. That path always scalarizes struct-returning
intrinsics (e.g. llvm.sincos), which have no VFDatabase name mapping.
Retry with an argument-aware query when the type-based cost looks scalarized.
Fixes #200644
Reviewers: hiraditya, bababuck, RKSimon
Pull Request: https://github.com/llvm/llvm-project/pull/201389
bcm2835_sdhci: Clean up DMA resources on attach failure
bcm_sdhci_attach() allocates a DMA channel with bcm_dma_allocate()
before creating the bus_dma tag and map. If a later initialization
step fails, the common error path releases the interrupt and memory
resources, but leaves the DMA channel allocated.
Call bcm_dma_free() for cleanup, as it already performs the required
internal checks and can therefore be invoked directly.
Signed-off-by: Haoxiang Li <lihaoxiang at isrc.iscas.ac.cn>
Reviewed by: mhorne
MFC after: 3 days
Pull Request: https://github.com/freebsd/freebsd-src/pull/2241
(cherry picked from commit d1488cd762bee79240a715bf04f3d30e9a121b26)
linux/io: handle memtype_wc mapping for !DMAP range
The amdgpu driver in drm-kmod will attempt to update/reserve certain GPU
VRAM ranges as write-combining. Depending on the system, this address
range may fall outside of FreeBSD's constructed DMAP. We cannot use
pmap_change_attr() in this case.
When INVARIANTS is enabled, this results in the following:
panic: physical address 0x880000000 not covered by the DMAP
Add a guard against triggering the KASSERT in PHYS_TO_DMAP().
This limitation in our implementation of arch_io_reserve_memtype_wc() is
already known in drm-kmod's amdgpu_bo_init(), and errors are ignored
there (see "BSDFIXME"). This change is only to eliminate the preventable
assertion failure within this scheme.
Tested by: kevans
[6 lines not shown]
amd64: Make EFI runtime faults look less like panics
EFI runtime faults may be mistaken for kernel panics, and do not
necessarily represent actual problems. Try to differentiate them some
more by printing "EFI runtime trap" rather than "Fatal trap".
PR: 291193
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56309
(cherry picked from commit ddabf7f3ea4f0497dc5a5ffcbbb1d852ea77a4cd)
netlink: Use unsigned type in nl_process_nbuf
nlmsghdr::nlmsg_len and nl_buf::offset are u_int. Make msglen match.
Reviewed by: pouria, glebius
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57474
(cherry picked from commit 888d9236e2249cb1bda686aca8729fdcc69a10ac)
[SLP] Recompute deps of copyable-modeled operands used directly
An instruction modeled as a copyable element elsewhere can also be used
directly by a later-built node sharing an instruction with the copyable
nodes. The direct use was not counted, so the scheduler over-decremented
the operand and tripped the unscheduled-deps assertion. Defer
recomputation whenever the operand is modeled as a copyable element
anywhere.
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/203342
pmc: add sapphire rapids model
This commit adds the sapphire rapids CPU model to hwpmc_intel.c,
allowing hwpmc to be used on this CPU family.
Reviewed by: mhorne
MFC after: 3 days
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D57263
(cherry picked from commit 03c69dd90122c4ffa91a749f668a2ac8fa6843a2)
bcm2835_sdhci: Clean up DMA resources on attach failure
bcm_sdhci_attach() allocates a DMA channel with bcm_dma_allocate()
before creating the bus_dma tag and map. If a later initialization
step fails, the common error path releases the interrupt and memory
resources, but leaves the DMA channel allocated.
Call bcm_dma_free() for cleanup, as it already performs the required
internal checks and can therefore be invoked directly.
Signed-off-by: Haoxiang Li <lihaoxiang at isrc.iscas.ac.cn>
Reviewed by: mhorne
MFC after: 3 days
Pull Request: https://github.com/freebsd/freebsd-src/pull/2241
(cherry picked from commit d1488cd762bee79240a715bf04f3d30e9a121b26)
linux/io: handle memtype_wc mapping for !DMAP range
The amdgpu driver in drm-kmod will attempt to update/reserve certain GPU
VRAM ranges as write-combining. Depending on the system, this address
range may fall outside of FreeBSD's constructed DMAP. We cannot use
pmap_change_attr() in this case.
When INVARIANTS is enabled, this results in the following:
panic: physical address 0x880000000 not covered by the DMAP
Add a guard against triggering the KASSERT in PHYS_TO_DMAP().
This limitation in our implementation of arch_io_reserve_memtype_wc() is
already known in drm-kmod's amdgpu_bo_init(), and errors are ignored
there (see "BSDFIXME"). This change is only to eliminate the preventable
assertion failure within this scheme.
Tested by: kevans
[6 lines not shown]
if_eqos_starfive: Read MAC address from device tree
u-boot/opensbi determines the ethernet MAC address from ROM and passes
it to the OS in the device tree. This change sets the correct MAC
address from this source. This prevents the eqos class driver from
generating random MAC addresses at each boot.
Tested on Starfive VisionFive 2, riscv64 SBC.
Reviewed by: mhorne
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56782
(cherry picked from commit 351fad05e075c388dece4cd6dd8613494b870bad)
[CIR] Implement bind temporary lvalue (#202755)
This change implements the handling to emit a CXXBindTemporaryExpr
l-value. This is a very direct port from the classic codegen
implementation, leveraging existing functions in CIR.
[CIR] Force emission of static local enclosing functions (#201941)
When getOrCreateStaticVarDecl is called, we need to call
`getAddressOfGlobal` to trigger the emission of the enclosing function.
In most cases this has already happened, but there are cases where the
enclosing function would not otherwise have been emitted. See
https://bugs.llvm.org/show_bug.cgi?id=18020 for details.
It appears that this was mistakenly seen as OpenMP-specific behavior
because of an OpenMP RAII guard that surrounds it in classic codegen,
but that actually is there to skip the behavior when generating OpenMP
device code.
We also needed to insert the static local decl into CIRGenModule's map
by calling `setStaticLocalDeclAddress`. To avoid a duplicate emission.
Assisted-by: Cursor / claude-opus-4.8