hwpmc: build hwpmc_rapl.c into the i386 module
The module's i386 source list compiles the files that call
pmc_rapl_initialize() and pmc_rapl_finalize() but not the one that defines
them, so the i386 hwpmc.ko has both undefined and cannot be loaded.
Fixes: a99d04f39dab ("hwpmc: add RAPL energy-counter class (AMD + Intel)")
Assisted-by: Claude Code (Opus 5)
hwpmc: do not register RAPL when the unit register reads as zero
An energy status unit of zero means one joule per raw tick, which no part
reports; it is what a hypervisor returns for an MSR it does not implement.
Both energy rows are scaled by that field, so the class would be
registered with counters that read zero forever.
Refuse it, as the class is already refused when no energy MSR responds.
Assisted-by: Claude Code (Opus 5)
hwpmc: probe the RAPL unit MSR instead of faulting on it
The RAPL probe read MSR_RAPL_POWER_UNIT with a bare rdmsr(). RAPL is not
enumerated by CPUID on either vendor and the register is absent on older
Intel and AMD parts and under a hypervisor that does not emulate it, so
the read raises #GP and loading hwpmc panics the machine.
Read it with rdmsr_safe() and return ENXIO when it is not there, as this
function already does for the energy MSRs. Both callers already drop the
class when the probe fails.
Fixes: a99d04f39dab ("hwpmc: add RAPL energy-counter class (AMD + Intel)")
Assisted-by: Claude Code (Opus 5)
[git-clang-format] Don't format the line preceding a deletion (#215946)
`git diff -U0` renders a pure deletion as `@@ -3,3 +2,0 @@`: no new
lines,
anchored at the preceding line. extract_lines coerces that zero count to
one, so clang-format reformats a line the deletion never touched.
Skip such hunks, matching clang-format-diff.py. start_line is 0 only for
deletions at the start of a file, so that check goes away as well.
Aided by Claude Opus 5
[RISCV][NFCI] Introduce Base for Pseudo Expansion Passes (#218170)
This introduces a base class for the Pseudo Instruction Expansion Pass
Implementations, which shares the boiler plate that ensures the function
size estimate does not grow during expansion.
This also makes many of those methods `const`, to more clearly
illustrate how the Impl class works - that per-instruction info is
mostly passed as parameters and not stored in the class members.
This is used to simplify all four of the Pseudo Instruction Expansion
passes. Additionally, many static functions in the Atomic Expand pass
are moved onto the Impl class, so they can directly access the subtarget
and instruction info.
Assisted-by: AI
route/fib_algo: Free leaked radix_masks in radix_lockless
radix_lockless algorithm creates its own radix tree and
allocates its own radix_masks by directly calling rnh_addaddr().
However, during destruction, it only frees the radix_tree without
freeing its allocated radix_masks.
Fix the leak by calling rn_delete() during radix_destroy().
PR: 297339
Reviewed by: melifaro
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D59112
kubectl: update to 1.36.4
Bug or Regression
* Update golang.org/x/text and golang.org/x/net dependencies to include
security updates [SIG API Machinery, Architecture, Auth, CLI, Cloud
Provider, Cluster Lifecycle, Instrumentation, Network, Node, Scheduling,
Security and Storage]
[clang-repl] Don't double-remove extern "C" decls from the IdResolver (#218129)
Regression was introduced in https://github.com/llvm/llvm-project/pull/178648
This is required for the 23 release; the downstream tools CppInterOp & Cppyy will fail otherwise.
[clang][Driver] Fix libc++ include path on FreeBSD (#212725)
`clang++` defaults to `-stdlib=libc++` on FreeBSD. When building with
both `clang` and `libcxx` included, the freshly built `clang++` uses the
system version of the `libc++` headers. However, this is from the
bundled `libc++` 19.1.7, thus inconsistent with the `libc++` being
built.
Similarly to the NetBSD case, FreeBSD has its own version of
`addLibCxxIncludePaths` which just includes `/usr/include/c++/v1`.
This patch removes `FreeBSD::addLibCxxIncludePaths` in favour of the
generic version in `Gnu.cpp`.
Tested on `amd64-pc-freebsd15.1`.
[Verifier] Prevent insertion/extraction of scalable vectors into/from fixed vectors (#215647)
Per LangRef:
> Scalable vectors can only be inserted into other scalable vectors.
> (...)
> Scalable vectors can only be extracted from other scalable vectors.
Add checks to enforce these rules for `llvm.vector.insert` and
`llvm.vector.extract` intrinsics.
[DomTree] Prepend children instead of appending (#218178)
Follow-up to #176409: `AppendPtr` exists only to keep a node's children
in the order they are added, and a lot of code depends on the order.
Implement an altrenative: in `attachNewSubtree`, create nodes in DFS
order and then link them in reverse. Trees built from scratch are
unchanged. Two tests that print an updated tree are adjusted.
[flang][test] Link designator-path test with FortranParser (#218204)
This is the missing build dependency that wasn't added to
https://github.com/llvm/llvm-project/pull/211606.
It should resolve a some of the build bot failures that have been
reported there.