[tip:perf/urgent] perf/x86/intel/uncore: Fix Skylake server PCU PMU event format

2017-07-24 Thread tip-bot for Kan Liang
Commit-ID:  bab4e569e80c07ba6fe5e4f2d815adeef26cee94
Gitweb: http://git.kernel.org/tip/bab4e569e80c07ba6fe5e4f2d815adeef26cee94
Author: Kan Liang 
AuthorDate: Thu, 13 Jul 2017 10:35:46 -0700
Committer:  Ingo Molnar 
CommitDate: Mon, 24 Jul 2017 11:13:18 +0200

perf/x86/intel/uncore: Fix Skylake server PCU PMU event format

PCU event format for SKX are different from snbep. Introduce a new
format group for SKX PCU.

Signed-off-by: Kan Liang 
Acked-by: Peter Zijlstra 
Cc: Alexander Shishkin 
Cc: Arnaldo Carvalho de Melo 
Cc: Jiri Olsa 
Cc: Linus Torvalds 
Cc: Stephane Eranian 
Cc: Thomas Gleixner 
Cc: Vince Weaver 
Link: 
http://lkml.kernel.org/r/1499967350-10385-3-git-send-email-kan.li...@intel.com
Signed-off-by: Ingo Molnar 
---
 arch/x86/events/intel/uncore_snbep.c | 22 +-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/arch/x86/events/intel/uncore_snbep.c 
b/arch/x86/events/intel/uncore_snbep.c
index 19a00a7..fbf8f6e 100644
--- a/arch/x86/events/intel/uncore_snbep.c
+++ b/arch/x86/events/intel/uncore_snbep.c
@@ -3492,6 +3492,26 @@ static struct intel_uncore_type skx_uncore_irp = {
.format_group   = _uncore_format_group,
 };
 
+static struct attribute *skx_uncore_pcu_formats_attr[] = {
+   _attr_event.attr,
+   _attr_umask.attr,
+   _attr_edge.attr,
+   _attr_inv.attr,
+   _attr_thresh8.attr,
+   _attr_occ_invert.attr,
+   _attr_occ_edge_det.attr,
+   _attr_filter_band0.attr,
+   _attr_filter_band1.attr,
+   _attr_filter_band2.attr,
+   _attr_filter_band3.attr,
+   NULL,
+};
+
+static struct attribute_group skx_uncore_pcu_format_group = {
+   .name = "format",
+   .attrs = skx_uncore_pcu_formats_attr,
+};
+
 static struct intel_uncore_ops skx_uncore_pcu_ops = {
IVBEP_UNCORE_MSR_OPS_COMMON_INIT(),
.hw_config  = hswep_pcu_hw_config,
@@ -3510,7 +3530,7 @@ static struct intel_uncore_type skx_uncore_pcu = {
.box_ctl= HSWEP_PCU_MSR_PMON_BOX_CTL,
.num_shared_regs= 1,
.ops= _uncore_pcu_ops,
-   .format_group   = _uncore_pcu_format_group,
+   .format_group   = _uncore_pcu_format_group,
 };
 
 static struct intel_uncore_type *skx_msr_uncores[] = {


[tip:perf/urgent] perf/x86/intel/uncore: Fix Skylake server PCU PMU event format

2017-07-24 Thread tip-bot for Kan Liang
Commit-ID:  bab4e569e80c07ba6fe5e4f2d815adeef26cee94
Gitweb: http://git.kernel.org/tip/bab4e569e80c07ba6fe5e4f2d815adeef26cee94
Author: Kan Liang 
AuthorDate: Thu, 13 Jul 2017 10:35:46 -0700
Committer:  Ingo Molnar 
CommitDate: Mon, 24 Jul 2017 11:13:18 +0200

perf/x86/intel/uncore: Fix Skylake server PCU PMU event format

PCU event format for SKX are different from snbep. Introduce a new
format group for SKX PCU.

Signed-off-by: Kan Liang 
Acked-by: Peter Zijlstra 
Cc: Alexander Shishkin 
Cc: Arnaldo Carvalho de Melo 
Cc: Jiri Olsa 
Cc: Linus Torvalds 
Cc: Stephane Eranian 
Cc: Thomas Gleixner 
Cc: Vince Weaver 
Link: 
http://lkml.kernel.org/r/1499967350-10385-3-git-send-email-kan.li...@intel.com
Signed-off-by: Ingo Molnar 
---
 arch/x86/events/intel/uncore_snbep.c | 22 +-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/arch/x86/events/intel/uncore_snbep.c 
b/arch/x86/events/intel/uncore_snbep.c
index 19a00a7..fbf8f6e 100644
--- a/arch/x86/events/intel/uncore_snbep.c
+++ b/arch/x86/events/intel/uncore_snbep.c
@@ -3492,6 +3492,26 @@ static struct intel_uncore_type skx_uncore_irp = {
.format_group   = _uncore_format_group,
 };
 
+static struct attribute *skx_uncore_pcu_formats_attr[] = {
+   _attr_event.attr,
+   _attr_umask.attr,
+   _attr_edge.attr,
+   _attr_inv.attr,
+   _attr_thresh8.attr,
+   _attr_occ_invert.attr,
+   _attr_occ_edge_det.attr,
+   _attr_filter_band0.attr,
+   _attr_filter_band1.attr,
+   _attr_filter_band2.attr,
+   _attr_filter_band3.attr,
+   NULL,
+};
+
+static struct attribute_group skx_uncore_pcu_format_group = {
+   .name = "format",
+   .attrs = skx_uncore_pcu_formats_attr,
+};
+
 static struct intel_uncore_ops skx_uncore_pcu_ops = {
IVBEP_UNCORE_MSR_OPS_COMMON_INIT(),
.hw_config  = hswep_pcu_hw_config,
@@ -3510,7 +3530,7 @@ static struct intel_uncore_type skx_uncore_pcu = {
.box_ctl= HSWEP_PCU_MSR_PMON_BOX_CTL,
.num_shared_regs= 1,
.ops= _uncore_pcu_ops,
-   .format_group   = _uncore_pcu_format_group,
+   .format_group   = _uncore_pcu_format_group,
 };
 
 static struct intel_uncore_type *skx_msr_uncores[] = {