From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 600B4455162; Sat, 12 Sep 2026 16:02:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789228945; cv=none; b=BidtO63iO6kk/fUoKNDRv+6NfdkU+551NYz8RyCZqkt6KBj0qCtqMH45s2DNyVWWs3k+tFhCN4qa8pnAyvLiE7K4oKH4yqRwXJ0Mf5dVrMfCgYVqd9H2TX/9eTtvk+CYS50mPr97/iJBqA6Ke7bZObeQaR76qss5z/swVnlfx1M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789228945; c=relaxed/simple; bh=UrRe0JRWdDAQEgzoMt+PcMcbtgYUnf97CjR7PvT0pEA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bZCCEjOPcHWH/f3gabzmQUrF1SQwwTHUNLCcCmTP0cnkGlUh4BphOl+ivQEUhhuRQOW/xBvH1N0OOnbatWlRpohJfizSpmhGk1J0zS4VygVaJb8Vp2VNV/+SXVWuHCVvm/XpLRlJCKNNAYGz/jDGIv+geJVcfV6mo6Jy9NnnF9s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=lcosnXRm; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="lcosnXRm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 313F71F000FF; Sat, 12 Sep 2026 16:02:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789228944; bh=r/CUoB2de6T+IrDWzVuaoYPqTos5s7NbNFL/IRf8hFo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=lcosnXRmmsVVAuU/U2iLc0f4DygGOi9lFjh9EZQPJIcCXo/Fr6JHb0Y3Gu78VgeQu xtc5WpvLFU3cP8ctAF80E+bc2pMmn9jSaY5EcUGrxagr7nSL3tMXkJMgCqOMH0xs0x 3/I6blzsWrv0gWDdZLiZxPIytTabvt+cThYAHSXA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Zide Chen , "Peter Zijlstra (Intel)" , Ian Rogers , Dapeng Mi , Sasha Levin Subject: [PATCH 6.1 0489/1191] perf/x86/intel/uncore: Keep PCI PMUs working when MMIO/MSR setup fails Date: Sat, 12 Sep 2026 08:53:37 +0200 Message-ID: <20260912065559.213990936@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065548.086904252@linuxfoundation.org> References: <20260912065548.086904252@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zide Chen [ Upstream commit 3012af7df3430788eddd30b3c6654d0a0a5f06c6 ] 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 Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ian Rogers Reviewed-by: Dapeng Mi Link: https://patch.msgid.link/20260611160033.66760-5-zide.chen@intel.com Signed-off-by: Sasha Levin --- 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 27b34f5b87600..527e6d11af470 100644 --- a/arch/x86/events/intel/uncore.c +++ b/arch/x86/events/intel/uncore.c @@ -1585,8 +1585,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 -- 2.53.0