aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephane Eranian <eranian@google.com>2018-03-23 09:11:29 -0400
committerThomas Gleixner <tglx@linutronix.de>2018-04-20 06:41:17 -0400
commitd7717587ac6deae00e0b66c0113a046be2c6fb1c (patch)
treed6a14900414f2c604a8cc4ceb54400670b4de79b
parent5c8dad48e4f53d6fd0a7e4f95d7c1c983374de88 (diff)
perf/x86/intel/uncore: Revert "Remove SBOX support for Broadwell server"
This reverts commit 3b94a891667c ("perf/x86/intel/uncore: Remove SBOX support for Broadwell server") Revert because there exists a proper workaround for Broadwell-EP servers without SBOX now. Note that BDX-DE does not have a SBOX. Signed-off-by: Stephane Eranian <eranian@google.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Kan Liang <kan.liang@intel.com> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: ak@linux.intel.com Cc: osk@google.com Cc: mark@voidzero.net Link: https://lkml.kernel.org/r/1521810690-2576-1-git-send-email-kan.liang@linux.intel.com
-rw-r--r--arch/x86/events/intel/uncore_snbep.c21
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
3031static 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
3031static struct intel_uncore_type *bdx_msr_uncores[] = { 3047static 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