[tip: perf/core] perf/x86/intel/uncore: Keep PCI PMUs working when MMIO/MSR setup fails
From: tip-bot2 for Zide Chen
Date: Tue Jun 30 2026 - 05:11:30 EST
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 3012af7df3430788eddd30b3c6654d0a0a5f06c6
Gitweb: https://git.kernel.org/tip/3012af7df3430788eddd30b3c6654d0a0a5f06c6
Author: Zide Chen <zide.chen@xxxxxxxxx>
AuthorDate: Thu, 11 Jun 2026 09:00:29 -07:00
Committer: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
CommitterDate: Tue, 30 Jun 2026 10:57:04 +02:00
perf/x86/intel/uncore: Keep PCI PMUs working when MMIO/MSR setup fails
uncore_event_cpu_online() returns -ENOMEM early when both the MSR and
MMIO box allocations fail. This also aborts PCI uncore setup, even
though PCI PMUs are independent of the MSR/MMIO paths.
Remove the early return so PCI uncore setup always runs regardless
of whether MSR or MMIO box allocation succeeds.
Fixes: 3da04b8a00dd ("perf/x86/intel/uncore: Support MMIO type uncore blocks")
Signed-off-by: Zide Chen <zide.chen@xxxxxxxxx>
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>
Reviewed-by: Dapeng Mi <dapeng1.mi@xxxxxxxxxxxxxxx>
Link: https://patch.msgid.link/20260611160033.66760-5-zide.chen@xxxxxxxxx
---
arch/x86/events/intel/uncore.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
index 21c8ed1..eae335d 100644
--- a/arch/x86/events/intel/uncore.c
+++ b/arch/x86/events/intel/uncore.c
@@ -1636,8 +1636,6 @@ static int uncore_event_cpu_online(unsigned int cpu)
die = topology_logical_die_id(cpu);
msr_ret = uncore_box_ref(uncore_msr_uncores, die, cpu);
mmio_ret = uncore_box_ref(uncore_mmio_uncores, die, cpu);
- if (msr_ret && mmio_ret)
- return -ENOMEM;
/*
* Check if there is an online cpu in the package