Skip to content

Commit 457b61e

Browse files
committed
perf/x86: Refine hybrid_pmu_type defination
JIRA: https://issues.redhat.com/browse/RHEL-20094 upstream ======== commit 79390db Author: Dapeng Mi <dapeng1.mi@linux.intel.com> Date: Tue Aug 20 07:38:50 2024 +0000 description =========== 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@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Kan Liang <kan.liang@linux.intel.com> Tested-by: Yongwei Ma <yongwei.ma@intel.com> Link: https://lkml.kernel.org/r/20240820073853.1974746-2-dapeng1.mi@linux.intel.com Signed-off-by: Michael Petlan <mpetlan@redhat.com>
1 parent 302e852 commit 457b61e

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

arch/x86/events/perf_event.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -674,19 +674,17 @@ enum hybrid_cpu_type {
674674
HYBRID_INTEL_CORE = 0x40,
675675
};
676676

677+
#define X86_HYBRID_PMU_ATOM_IDX 0
678+
#define X86_HYBRID_PMU_CORE_IDX 1
679+
677680
enum hybrid_pmu_type {
678681
not_hybrid,
679-
hybrid_small = BIT(0),
680-
hybrid_big = BIT(1),
682+
hybrid_small = BIT(X86_HYBRID_PMU_ATOM_IDX),
683+
hybrid_big = BIT(X86_HYBRID_PMU_CORE_IDX),
681684

682685
hybrid_big_small = hybrid_big | hybrid_small, /* only used for matching */
683686
};
684687

685-
#define X86_HYBRID_PMU_ATOM_IDX 0
686-
#define X86_HYBRID_PMU_CORE_IDX 1
687-
688-
#define X86_HYBRID_NUM_PMUS 2
689-
690688
struct x86_hybrid_pmu {
691689
struct pmu pmu;
692690
const char *name;

0 commit comments

Comments
 (0)