Skip to content

Commit a86740a

Browse files
committed
x86/cpu: Move TSC CPUID leaf definition
Prepare to use the TSC CPUID leaf definition more widely by moving it to the common header. Signed-off-by: Dave Hansen <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Link: https://lore.kernel.org/all/20241213205033.68799E53%40davehans-spike.ostc.intel.com
1 parent 5d82d8e commit a86740a

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

arch/x86/events/intel/pt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <linux/slab.h>
1919
#include <linux/device.h>
2020

21+
#include <asm/cpuid.h>
2122
#include <asm/perf_event.h>
2223
#include <asm/insn.h>
2324
#include <asm/io.h>

arch/x86/events/intel/pt.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ struct topa_entry {
3737
u64 rsvd4 : 12;
3838
};
3939

40-
/* TSC to Core Crystal Clock Ratio */
41-
#define CPUID_TSC_LEAF 0x15
42-
4340
struct pt_pmu {
4441
struct pmu pmu;
4542
u32 caps[PT_CPUID_REGS_NUM * PT_CPUID_LEAVES];

arch/x86/include/asm/cpuid.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ enum cpuid_regs_idx {
2323

2424
#define CPUID_MWAIT_LEAF 0x5
2525
#define CPUID_DCA_LEAF 0x9
26+
#define CPUID_TSC_LEAF 0x15
2627

2728
#ifdef CONFIG_X86_32
2829
bool have_cpuid_p(void);

0 commit comments

Comments
 (0)