This patch set contains a number of fixes and improvements for the Tegra23x uncore performance driver, along with one unrelated fix for nvvrs-pseq-rtc
in the NVIDIA out-of-tree kernel modules (nvidia-oot) repository.
I became interested in the tegra23x_perf_uncore
driver while working on pKVM support for Tegra SoCs with a Linux 6.6–based kernel.
Although none of the issues are directly related to pKVM itself, the problems in the out-of-tree driver manifested as the ARM core PMU ceasing to function correctly when both drivers were active.
All the bugs and design flaws addressed here are intrinsic to the nvidia-oot code and would be observable on other kernels as well.
The patches can be grouped as follows:
Patches 1–3 – Correctness and safety fixes
-
Fix a double-free when unloading the module.
-
Stop claiming
PERF_TYPE_HARDWARE
. -
Limit claimed events strictly to those explicitly supported.
Patches 4–5 – CPU association improvements
-
Enforce CPU0 as the default owner and expose a
cpumask
attribute. -
Dynamically pick a designated CPU at runtime instead of relying on static binding.
These changes resolve several subtle bugs and make the driver more robust and portable across CPU topologies.
Patch 6 – Validation improvement
- Reject
NV_INT_*
pseudo-IDs to avoid ambiguous or incorrect behavior.
Patch 7 – Independent cleanup
- Fix an unbalanced
mutex_unlock()
innvvrs-pseq-rtc
, originally found while running the LTP test suite with debug options enabled on my pKVM setup.
All patches apply cleanly to the nvidia-oot tree shipped with Jetson 36.4.4.
They are provided as an attached tarball for convenience.
patches-nvidia-oot.tar.gz (7.4 KB)
Feedback, testing, and review are most welcome.