Re: [PATCH V2 4/8] perf/x86/intel/uncore: Keep PCI PMUs working when MMIO/MSR setup fails

From: Mi, Dapeng

Date: Tue Jun 02 2026 - 21:25:04 EST


Reviewed-by: Dapeng Mi <dapeng1.mi@xxxxxxxxxxxxxxx>

On 6/2/2026 1:01 AM, Zide Chen wrote:
> 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")
> Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>
> Signed-off-by: Zide Chen <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 d759888476c3..6df44f69cc5b 100644
> --- a/arch/x86/events/intel/uncore.c
> +++ b/arch/x86/events/intel/uncore.c
> @@ -1633,8 +1633,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