Blame SOURCES/libpfm-zseries.patch

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