[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <171924176094.10875.11909867510224496931.tip-bot2@tip-bot2>
Date: Mon, 24 Jun 2024 15:09:20 -0000
From: "tip-bot2 for Kan Liang" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Kan Liang <kan.liang@...ux.intel.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Yunying Sun <yunying.sun@...el.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: perf/core] perf/x86/uncore: Retrieve the unit ID from the unit
control RB tree
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 585463fee64270d4b4d80b1e433d2105ef555bec
Gitweb: https://git.kernel.org/tip/585463fee64270d4b4d80b1e433d2105ef555bec
Author: Kan Liang <kan.liang@...ux.intel.com>
AuthorDate: Fri, 14 Jun 2024 06:46:26 -07:00
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Mon, 17 Jun 2024 17:57:56 +02:00
perf/x86/uncore: Retrieve the unit ID from the unit control RB tree
The box_ids only save the unit ID for the first die. If a unit, e.g., a
CXL unit, doesn't exist in the first die. The unit ID cannot be
retrieved.
The unit control RB tree also stores the unit ID information.
Retrieve the unit ID from the unit control RB tree
Signed-off-by: Kan Liang <kan.liang@...ux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Tested-by: Yunying Sun <yunying.sun@...el.com>
Link: https://lore.kernel.org/r/20240614134631.1092359-4-kan.liang@linux.intel.com
---
arch/x86/events/intel/uncore.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
index f699606..08e85db 100644
--- a/arch/x86/events/intel/uncore.c
+++ b/arch/x86/events/intel/uncore.c
@@ -862,6 +862,9 @@ static const struct attribute_group uncore_pmu_attr_group = {
static inline int uncore_get_box_id(struct intel_uncore_type *type,
struct intel_uncore_pmu *pmu)
{
+ if (type->boxes)
+ return intel_uncore_find_discovery_unit_id(type->boxes, -1, pmu->pmu_idx);
+
return type->box_ids ? type->box_ids[pmu->pmu_idx] : pmu->pmu_idx;
}
Powered by blists - more mailing lists