ix(4): Support Total Port Shutdown on E610
Firmware controls the physical link state on E610 adapters, similarly to
X700 and E800 adapters. As a result, running "ifconfig down" does not
disable the physical link unless Total Port Shutdown is enabled.
Read the Link Default Override TLV from NVM to detect when Total
Port Shutdown was enabled for given port in system setup. In that
case, force the link down when the interface is stopped and restore
it during link configuration. Leave link state management unchanged
when the TLV is unavailable or the feature is not enabled.
Co-authored-by: Miłosz Linkiewicz <milosz.linkiewicz at intel.com>
Co-authored-by: Tomasz Lichwala <tomasz.lichwala at intel.com>
Signed-off-by: Krzysztof Galazka <krzysztof.galazka at intel.com>
Tested by: Mateusz Moga <mateusz.moga at intel.com>
MFC after: 1 week
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D60643
[OpenMP][clang] Correctly widen loop iteration calculation
For a loop like `for (uint32_t i = 0; i < (size_t)13; i += 2)`, widen
the `lower - step + 1` calculation to the size of the upper bound type,
aka size_t in this case. Otherwise, we would not caluclate 13 - (-1),
but instead 13 - (0xFFFFFFFF) and get the wrong result.
Fixes https://github.com/llvm/llvm-project/issues/70687.
Claude assisted with this patch.
[AArch64][LSR] Prefer LSR solutions with less pre/post-index (#234264)
In AArch64 CPUs a pre or post indexed load/store typically uses an extra
ALU resource compared to a load/store that uses offset addressing.
Therefore in Loop Strength Reduce we should favor solutions with fewer
of these instructions when the Insns and NumRegs costs are equal.
This currently has no effect, as the preferred addressing mode for
AArch64 is None so LSR assumes pre/post index instructions don't exist,
but I'm planning on changing the addressing mode in the future.
[clang][Lex] Fix assertion on unclosed paren in PP directive (#234992)
Clangd's preamble scan runs the preprocessor in single file parse mode.
If a directive contains an undefined identifier and ends inside a
subexpression (e.g. due to an unclosed parenthesis), PeekTok is already
eod when DiscardUntilEndOfDirective is called. That function lexes one
more token which is eof on the truncated buffer and triggers an
assertion.
Only discard if the current token is not eod, analogous to the other
callers of DiscardUntilEndOfDirective.
Fixes #226555
[lldb] Read Wasm globals through a frame of the stub's own thread (#237195)
This commit fixes an unconditional cast from Thread to ThreadWasm, which
ignores the possibility of an OS plugin, by using the real thread list.
Note that using the qWasmGlobal variant that expects a frame index is
unlikely to succeed in the presence of a custom unwinder that presents a
different view of frames. But at the very least we shouldn't crash by
doing an invalid cast, which this fixes.
[clang][Modules] Keep existing global definition on type mismatch in GetOrCreateLLVMGlobal (#223877)
When a global is requested for definition but a definition with the same
mangled name already exists, return it as is instead of creating a fresh
global and erasing the defined one, even if its type differs from the
requested type.
The type can legitimately differ when the initializer folded to a
different (e.g. anonymous) type, as happens with unions. Erasing the
defined global dangles pointers held by callers, e.g. the
`AssociatedData` of entries in `llvm.global_ctors`, leading to a
use-after-free crash during `EmitCtorList`. This also keeps the
deferred-decls "already emitted" check sound, since it queries with
`IsForDefinition`, which must be non-destructive.
Add a header-unit regression test: an inline variable with an
anonymous-union member, constant-initialized but requiring dynamic
destructor registration, must be emitted exactly once when imported from
header units. The folded initializer has an anonymous type that differs
[8 lines not shown]
[flang][OpenMP] Diagnose NOWAIT used with TASK REDUCTION modifier (#237326)
E.g. OpenMP 6.0 p254
> The task reduction-modifier must not appear in a reduction clause if
> the nowait clause is specified on the same construct.
Assisted-by: Codex
[mlir][SPIR-V] Require DotProductInput4x8Bit only for 4-element i8 vectors (#237711)
Other i8 vector sizes need DotProductInputAll per
SPV_KHR_integer_dot_product