diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2013-10-31 01:36:54 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-11-06 06:34:29 -0500 |
commit | d1e8f4a8365d16fd179cb8cad5b4d20aafd0a695 (patch) | |
tree | 6ce06073defefec9c2cbc0cfddead8ab0e9a0390 | |
parent | c7e548b45ce85f765f6262149dd60d9956a31d60 (diff) |
perf/x86/intel/uncore: Add filter support for IvyBridge-EP QPI boxes
The encoding for filter registers of IvyBridge-EP uncore QPI boxes is
completely the same as SandyBridge-EP.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: eranian@google.com
Cc: "Yan Zheng" <zheng.z.yan@intel.com>
Link: http://lkml.kernel.org/r/1383197815-17706-1-git-send-email-zheng.z.yan@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel_uncore.c | 61 |
1 files changed, 51 insertions, 10 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index 4118f9f68315..6da399943ac6 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c | |||
@@ -1099,6 +1099,24 @@ static struct attribute *ivt_uncore_qpi_formats_attr[] = { | |||
1099 | &format_attr_umask.attr, | 1099 | &format_attr_umask.attr, |
1100 | &format_attr_edge.attr, | 1100 | &format_attr_edge.attr, |
1101 | &format_attr_thresh8.attr, | 1101 | &format_attr_thresh8.attr, |
1102 | &format_attr_match_rds.attr, | ||
1103 | &format_attr_match_rnid30.attr, | ||
1104 | &format_attr_match_rnid4.attr, | ||
1105 | &format_attr_match_dnid.attr, | ||
1106 | &format_attr_match_mc.attr, | ||
1107 | &format_attr_match_opc.attr, | ||
1108 | &format_attr_match_vnw.attr, | ||
1109 | &format_attr_match0.attr, | ||
1110 | &format_attr_match1.attr, | ||
1111 | &format_attr_mask_rds.attr, | ||
1112 | &format_attr_mask_rnid30.attr, | ||
1113 | &format_attr_mask_rnid4.attr, | ||
1114 | &format_attr_mask_dnid.attr, | ||
1115 | &format_attr_mask_mc.attr, | ||
1116 | &format_attr_mask_opc.attr, | ||
1117 | &format_attr_mask_vnw.attr, | ||
1118 | &format_attr_mask0.attr, | ||
1119 | &format_attr_mask1.attr, | ||
1102 | NULL, | 1120 | NULL, |
1103 | }; | 1121 | }; |
1104 | 1122 | ||
@@ -1312,17 +1330,30 @@ static struct intel_uncore_type ivt_uncore_imc = { | |||
1312 | IVT_UNCORE_PCI_COMMON_INIT(), | 1330 | IVT_UNCORE_PCI_COMMON_INIT(), |
1313 | }; | 1331 | }; |
1314 | 1332 | ||
1333 | static struct intel_uncore_ops ivt_uncore_qpi_ops = { | ||
1334 | .init_box = ivt_uncore_pci_init_box, | ||
1335 | .disable_box = snbep_uncore_pci_disable_box, | ||
1336 | .enable_box = snbep_uncore_pci_enable_box, | ||
1337 | .disable_event = snbep_uncore_pci_disable_event, | ||
1338 | .enable_event = snbep_qpi_enable_event, | ||
1339 | .read_counter = snbep_uncore_pci_read_counter, | ||
1340 | .hw_config = snbep_qpi_hw_config, | ||
1341 | .get_constraint = uncore_get_constraint, | ||
1342 | .put_constraint = uncore_put_constraint, | ||
1343 | }; | ||
1344 | |||
1315 | static struct intel_uncore_type ivt_uncore_qpi = { | 1345 | static struct intel_uncore_type ivt_uncore_qpi = { |
1316 | .name = "qpi", | 1346 | .name = "qpi", |
1317 | .num_counters = 4, | 1347 | .num_counters = 4, |
1318 | .num_boxes = 3, | 1348 | .num_boxes = 3, |
1319 | .perf_ctr_bits = 48, | 1349 | .perf_ctr_bits = 48, |
1320 | .perf_ctr = SNBEP_PCI_PMON_CTR0, | 1350 | .perf_ctr = SNBEP_PCI_PMON_CTR0, |
1321 | .event_ctl = SNBEP_PCI_PMON_CTL0, | 1351 | .event_ctl = SNBEP_PCI_PMON_CTL0, |
1322 | .event_mask = IVT_QPI_PCI_PMON_RAW_EVENT_MASK, | 1352 | .event_mask = IVT_QPI_PCI_PMON_RAW_EVENT_MASK, |
1323 | .box_ctl = SNBEP_PCI_PMON_BOX_CTL, | 1353 | .box_ctl = SNBEP_PCI_PMON_BOX_CTL, |
1324 | .ops = &ivt_uncore_pci_ops, | 1354 | .num_shared_regs = 1, |
1325 | .format_group = &ivt_uncore_qpi_format_group, | 1355 | .ops = &ivt_uncore_qpi_ops, |
1356 | .format_group = &ivt_uncore_qpi_format_group, | ||
1326 | }; | 1357 | }; |
1327 | 1358 | ||
1328 | static struct intel_uncore_type ivt_uncore_r2pcie = { | 1359 | static struct intel_uncore_type ivt_uncore_r2pcie = { |
@@ -1429,6 +1460,16 @@ static DEFINE_PCI_DEVICE_TABLE(ivt_uncore_pci_ids) = { | |||
1429 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe3e), | 1460 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe3e), |
1430 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_R3QPI, 2), | 1461 | .driver_data = UNCORE_PCI_DEV_DATA(IVT_PCI_UNCORE_R3QPI, 2), |
1431 | }, | 1462 | }, |
1463 | { /* QPI Port 0 filter */ | ||
1464 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe86), | ||
1465 | .driver_data = UNCORE_PCI_DEV_DATA(UNCORE_EXTRA_PCI_DEV, | ||
1466 | SNBEP_PCI_QPI_PORT0_FILTER), | ||
1467 | }, | ||
1468 | { /* QPI Port 0 filter */ | ||
1469 | PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xe96), | ||
1470 | .driver_data = UNCORE_PCI_DEV_DATA(UNCORE_EXTRA_PCI_DEV, | ||
1471 | SNBEP_PCI_QPI_PORT1_FILTER), | ||
1472 | }, | ||
1432 | { /* end: all zeroes */ } | 1473 | { /* end: all zeroes */ } |
1433 | }; | 1474 | }; |
1434 | 1475 | ||