Blame SOURCES/libpfm-zseries.patch

e6fbf9
commit dc643f4a460063a628b4bfba57dbbb36673a0789
e6fbf9
Author: Thomas Richter <tmricht@linux.ibm.com>
e6fbf9
Date:   Thu Jul 11 17:48:03 2019 -0700
e6fbf9
e6fbf9
    s390/cpumf: add IBM z14 ZR1 support
e6fbf9
    
e6fbf9
    Add support for machine type 0x3907.
e6fbf9
    
e6fbf9
    Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
e6fbf9
e6fbf9
diff --git a/lib/pfmlib_s390x_cpumf.c b/lib/pfmlib_s390x_cpumf.c
e6fbf9
index 4e03fc4..7566aa0 100644
e6fbf9
--- a/lib/pfmlib_s390x_cpumf.c
e6fbf9
+++ b/lib/pfmlib_s390x_cpumf.c
e6fbf9
@@ -192,6 +192,7 @@ static int pfm_cpumcf_init(void *this)
e6fbf9
 		ext_set_count = LIBPFM_ARRAY_SIZE(cpumcf_z13_counters);
e6fbf9
 		break;
e6fbf9
 	case 3906:  /* IBM z14  */
e6fbf9
+	case 3907:  /* IBM z14 ZR1  */
e6fbf9
 		ext_set = cpumcf_z14_counters;
e6fbf9
 		ext_set_count = LIBPFM_ARRAY_SIZE(cpumcf_z14_counters);
e6fbf9
 		break;
e6fbf9
commit c08003fb085e23f2229e58cc176fcfcf58a3b238
e6fbf9
Author: Thomas Richter <tmricht@linux.ibm.com>
e6fbf9
Date:   Thu Jul 11 17:49:42 2019 -0700
e6fbf9
e6fbf9
    s390/cpumf: add support for counter second version number 6
e6fbf9
    
e6fbf9
    IBM added secound version number 6 in the CPU Measurement
e6fbf9
    Counter facility to indicate additional counters in the
e6fbf9
    crypto counter set.
e6fbf9
    
e6fbf9
    Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
e6fbf9
e6fbf9
diff --git a/lib/events/s390x_cpumf_events.h b/lib/events/s390x_cpumf_events.h
e6fbf9
index 8be1d55..8587a3b 100644
e6fbf9
--- a/lib/events/s390x_cpumf_events.h
e6fbf9
+++ b/lib/events/s390x_cpumf_events.h
e6fbf9
@@ -13,6 +13,8 @@
e6fbf9
 #define CPUMF_CTRSET_EXTENDED           1
e6fbf9
 #define CPUMF_CTRSET_MT_DIAG            32
e6fbf9
 
e6fbf9
+#define CPUMF_SVN6_ECC			4
e6fbf9
+
e6fbf9
 
e6fbf9
 static const pme_cpumf_ctr_t cpumcf_fvn1_counters[] = {
e6fbf9
 	{
e6fbf9
@@ -270,6 +272,43 @@ static const pme_cpumf_ctr_t cpumcf_svn_generic_counters[] = {
e6fbf9
 			" coprocessor is busy performing a function issued by"
e6fbf9
 			" another CPU",
e6fbf9
 	},
e6fbf9
+	{
e6fbf9
+		.ctrnum = 80,
e6fbf9
+		.ctrset = CPUMF_CTRSET_CRYPTO,
e6fbf9
+		.name = "ECC_FUNCTION_COUNT",
e6fbf9
+		.desc = "This counter counts the"
e6fbf9
+			" total number of the elliptic-curve cryptography (ECC)"
e6fbf9
+			" functions issued by the CPU.",
e6fbf9
+	},
e6fbf9
+	{
e6fbf9
+		.ctrnum = 81,
e6fbf9
+		.ctrset = CPUMF_CTRSET_CRYPTO,
e6fbf9
+		.name = "ECC_CYCLES_COUNT",
e6fbf9
+		.desc = "This counter counts the total"
e6fbf9
+			" number of CPU cycles when the ECC coprocessor is"
e6fbf9
+			" busy performing the elliptic-curve cryptography"
e6fbf9
+			" (ECC) functions issued by the CPU.",
e6fbf9
+	},
e6fbf9
+	{
e6fbf9
+		.ctrnum = 82,
e6fbf9
+		.ctrset = CPUMF_CTRSET_CRYPTO,
e6fbf9
+		.name = "ECC_BLOCKED_FUNCTION_COUNT",
e6fbf9
+		.desc = "This counter counts the total number of the"
e6fbf9
+			" elliptic-curve cryptography (ECC) functions that are"
e6fbf9
+			" issued by the CPU and are blocked because the ECC"
e6fbf9
+			" coprocessor is busy performing a function issued by"
e6fbf9
+			" another CPU.",
e6fbf9
+	},
e6fbf9
+	{
e6fbf9
+		.ctrnum = 83,
e6fbf9
+		.ctrset = CPUMF_CTRSET_CRYPTO,
e6fbf9
+		.name = "ECC_BLOCKED_CYCLES_COUNT",
e6fbf9
+		.desc = "This counter counts the total number of CPU cycles "
e6fbf9
+			" blocked for the elliptic-curve cryptography (ECC) "
e6fbf9
+			" functions issued by the CPU because the ECC"
e6fbf9
+			" coprocessor is busy perform ing a function issued"
e6fbf9
+			" by another CPU.",
e6fbf9
+	},
e6fbf9
 };
e6fbf9
 
e6fbf9
 static const pme_cpumf_ctr_t cpumcf_z10_counters[] = {
e6fbf9
diff --git a/lib/pfmlib_s390x_cpumf.c b/lib/pfmlib_s390x_cpumf.c
e6fbf9
index 7566aa0..e68b000 100644
e6fbf9
--- a/lib/pfmlib_s390x_cpumf.c
e6fbf9
+++ b/lib/pfmlib_s390x_cpumf.c
e6fbf9
@@ -168,6 +168,8 @@ static int pfm_cpumcf_init(void *this)
e6fbf9
 	/* counters based on second version number */
e6fbf9
 	csvn_set = cpumcf_svn_generic_counters;
e6fbf9
 	csvn_set_count = LIBPFM_ARRAY_SIZE(cpumcf_svn_generic_counters);
e6fbf9
+	if (csvn < 6)	/* Crypto counter set enlarged for SVN == 6 */
e6fbf9
+		csvn_set_count -= CPUMF_SVN6_ECC;
e6fbf9
 
e6fbf9
 	/* check and assign a machine-specific extended counter set */
e6fbf9
 	switch (get_machine_type()) {
e6fbf9
commit b831b04254ac7fd1700b20b349799810952ff66e
e6fbf9
Author: Thomas Richter <tmricht@linux.ibm.com>
e6fbf9
Date:   Thu Jul 11 17:51:03 2019 -0700
e6fbf9
e6fbf9
    s390/cpumf: add support for machine type 8561
e6fbf9
    
e6fbf9
    Add extended counter set support for s390 machine types
e6fbf9
    8561 and 8562.
e6fbf9
    
e6fbf9
    Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
e6fbf9
e6fbf9
diff --git a/lib/pfmlib_s390x_cpumf.c b/lib/pfmlib_s390x_cpumf.c
e6fbf9
index e68b000..c11f9d9 100644
e6fbf9
--- a/lib/pfmlib_s390x_cpumf.c
e6fbf9
+++ b/lib/pfmlib_s390x_cpumf.c
e6fbf9
@@ -195,6 +195,8 @@ static int pfm_cpumcf_init(void *this)
e6fbf9
 		break;
e6fbf9
 	case 3906:  /* IBM z14  */
e6fbf9
 	case 3907:  /* IBM z14 ZR1  */
e6fbf9
+	case 8561:  /* IBM Machine types 8561 and 8562 */
e6fbf9
+	case 8562:
e6fbf9
 		ext_set = cpumcf_z14_counters;
e6fbf9
 		ext_set_count = LIBPFM_ARRAY_SIZE(cpumcf_z14_counters);
e6fbf9
 		break;