Blame SOURCES/perftest-enable-s390x-platform-support.patch

5837d8
From https://bugzilla.redhat.com/show_bug.cgi?id=1182177#c5
5837d8
5837d8
Enable the s390x plaform support in the perftest-2.3.1 package by fixing
5837d8
a typo in the sample_get_cpu_mhz() function call and a couple of typos in
5837d8
the README file.
5837d8
5837d8
Signed-off-by: Alexey Ishchuk <aishchuk@linux.vnet.ibm.com>
5837d8
5837d8
[ Rebased and modified to check for __s390__, to cover
5837d8
  both s390 and s390x. -- mschmidt]
5837d8
---
5837d8
 README          | 2 +-
5837d8
 src/get_clock.c | 6 +++---
5837d8
 src/get_clock.h | 2 +-
5837d8
 3 files changed, 5 insertions(+), 5 deletions(-)
5837d8
678c64
Index: perftest-3.4/README
2933de
===================================================================
678c64
--- perftest-3.4.orig/README
678c64
+++ perftest-3.4/README
2933de
@@ -237,7 +237,7 @@ Special feature detailed explanation in
5837d8
     ./configure --disable-verbs_exp
5837d8
     make
5837d8
 
5837d8
- 6. In te x390x platform virtualized environment the results shown by package test applications can be incorrect.
5837d8
+ 6. In the s390x platform virtualized environment the results shown by package test applications can be incorrect.
5837d8
 
5837d8
  7. perftest-2.3 release includes support for dualport VPI test - port1-Ethernet , port2-IB. (in addition to Eth:Eth, IB:IB)
5837d8
     Currently, running dualport when port1-IB , port2-Ethernet still not working.
678c64
Index: perftest-3.4/src/get_clock.c
2933de
===================================================================
678c64
--- perftest-3.4.orig/src/get_clock.c
678c64
+++ perftest-3.4/src/get_clock.c
5837d8
@@ -133,7 +133,7 @@ static double sample_get_cpu_mhz(void)
5837d8
 	return b;
5837d8
 }
5837d8
 
5837d8
-#ifndef __s390x__
5837d8
+#ifndef __s390__
2933de
 static double proc_get_cpu_mhz(int no_cpu_freq_warn)
5837d8
 {
5837d8
 	FILE* f;
678c64
@@ -212,8 +212,8 @@ static double proc_get_cpu_mhz(int no_cp
5837d8
 
2933de
 double get_cpu_mhz(int no_cpu_freq_warn)
5837d8
 {
5837d8
-	#ifdef __s390x__
5837d8
-	return sample_get_cpu_mgz();
5837d8
+	#ifdef __s390__
5837d8
+	return sample_get_cpu_mhz();
5837d8
 	#else
5837d8
 	double sample, proc, delta;
5837d8
 	sample = sample_get_cpu_mhz();
678c64
Index: perftest-3.4/src/get_clock.h
2933de
===================================================================
678c64
--- perftest-3.4.orig/src/get_clock.h
678c64
+++ perftest-3.4/src/get_clock.h
5837d8
@@ -70,7 +70,7 @@ static inline cycles_t get_cycles()
5837d8
 	asm volatile ("mov %0=ar.itc" : "=r" (ret));
5837d8
 	return ret;
5837d8
 }
5837d8
-#elif defined(__s390x__)
5837d8
+#elif defined(__s390__)
5837d8
 typedef unsigned long long cycles_t;
5837d8
 static inline cycles_t get_cycles(void)
5837d8
 {