[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <172838551867.1442.9258188862438365129.tip-bot2@tip-bot2>
Date: Tue, 08 Oct 2024 11:05:18 -0000
From: "tip-bot2 for Dapeng Mi" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Dapeng Mi <dapeng1.mi@...ux.intel.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Kan Liang <kan.liang@...ux.intel.com>, Yongwei Ma <yongwei.ma@...el.com>,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: perf/core] perf/x86: Refine hybrid_pmu_type defination
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 79390db9eb32b2ba63c6be9fb83f12617259011d
Gitweb: https://git.kernel.org/tip/79390db9eb32b2ba63c6be9fb83f12617259011d
Author: Dapeng Mi <dapeng1.mi@...ux.intel.com>
AuthorDate: Tue, 20 Aug 2024 07:38:50
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Mon, 07 Oct 2024 09:28:43 +02:00
perf/x86: Refine hybrid_pmu_type defination
Use macros instead of magic number to define hybrid_pmu_type and remove
X86_HYBRID_NUM_PMUS since it's never used.
Signed-off-by: Dapeng Mi <dapeng1.mi@...ux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Kan Liang <kan.liang@...ux.intel.com>
Tested-by: Yongwei Ma <yongwei.ma@...el.com>
Link: https://lkml.kernel.org/r/20240820073853.1974746-2-dapeng1.mi@linux.intel.com
---
arch/x86/events/perf_event.h | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/arch/x86/events/perf_event.h b/arch/x86/events/perf_event.h
index ac11821..fdd7d03 100644
--- a/arch/x86/events/perf_event.h
+++ b/arch/x86/events/perf_event.h
@@ -674,19 +674,17 @@ enum hybrid_cpu_type {
HYBRID_INTEL_CORE = 0x40,
};
+#define X86_HYBRID_PMU_ATOM_IDX 0
+#define X86_HYBRID_PMU_CORE_IDX 1
+
enum hybrid_pmu_type {
not_hybrid,
- hybrid_small = BIT(0),
- hybrid_big = BIT(1),
+ hybrid_small = BIT(X86_HYBRID_PMU_ATOM_IDX),
+ hybrid_big = BIT(X86_HYBRID_PMU_CORE_IDX),
hybrid_big_small = hybrid_big | hybrid_small, /* only used for matching */
};
-#define X86_HYBRID_PMU_ATOM_IDX 0
-#define X86_HYBRID_PMU_CORE_IDX 1
-
-#define X86_HYBRID_NUM_PMUS 2
-
struct x86_hybrid_pmu {
struct pmu pmu;
const char *name;
Powered by blists - more mailing lists