diff options
-rw-r--r-- | arch/x86/events/intel/uncore_snbep.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c index c98b943e58b4..5bbbbee11879 100644 --- a/arch/x86/events/intel/uncore_snbep.c +++ b/arch/x86/events/intel/uncore_snbep.c | |||
@@ -3028,10 +3028,27 @@ static struct intel_uncore_type bdx_uncore_cbox = { | |||
3028 | .format_group = &hswep_uncore_cbox_format_group, | 3028 | .format_group = &hswep_uncore_cbox_format_group, |
3029 | }; | 3029 | }; |
3030 | 3030 | ||
3031 | static struct intel_uncore_type bdx_uncore_sbox = { | ||
3032 | .name = "sbox", | ||
3033 | .num_counters = 4, | ||
3034 | .num_boxes = 4, | ||
3035 | .perf_ctr_bits = 48, | ||
3036 | .event_ctl = HSWEP_S0_MSR_PMON_CTL0, | ||
3037 | .perf_ctr = HSWEP_S0_MSR_PMON_CTR0, | ||
3038 | .event_mask = HSWEP_S_MSR_PMON_RAW_EVENT_MASK, | ||
3039 | .box_ctl = HSWEP_S0_MSR_PMON_BOX_CTL, | ||
3040 | .msr_offset = HSWEP_SBOX_MSR_OFFSET, | ||
3041 | .ops = &hswep_uncore_sbox_msr_ops, | ||
3042 | .format_group = &hswep_uncore_sbox_format_group, | ||
3043 | }; | ||
3044 | |||
3045 | #define BDX_MSR_UNCORE_SBOX 3 | ||
3046 | |||
3031 | static struct intel_uncore_type *bdx_msr_uncores[] = { | 3047 | static struct intel_uncore_type *bdx_msr_uncores[] = { |
3032 | &bdx_uncore_ubox, | 3048 | &bdx_uncore_ubox, |
3033 | &bdx_uncore_cbox, | 3049 | &bdx_uncore_cbox, |
3034 | &hswep_uncore_pcu, | 3050 | &hswep_uncore_pcu, |
3051 | &bdx_uncore_sbox, | ||
3035 | NULL, | 3052 | NULL, |
3036 | }; | 3053 | }; |
3037 | 3054 | ||
@@ -3047,6 +3064,10 @@ void bdx_uncore_cpu_init(void) | |||
3047 | bdx_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores; | 3064 | bdx_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores; |
3048 | uncore_msr_uncores = bdx_msr_uncores; | 3065 | uncore_msr_uncores = bdx_msr_uncores; |
3049 | 3066 | ||
3067 | /* BDX-DE doesn't have SBOX */ | ||
3068 | if (boot_cpu_data.x86_model == 86) | ||
3069 | uncore_msr_uncores[BDX_MSR_UNCORE_SBOX] = NULL; | ||
3070 | |||
3050 | hswep_uncore_pcu.constraints = bdx_uncore_pcu_constraints; | 3071 | hswep_uncore_pcu.constraints = bdx_uncore_pcu_constraints; |
3051 | } | 3072 | } |
3052 | 3073 | ||