Blob Blame History Raw
From https://bugzilla.redhat.com/show_bug.cgi?id=1182177#c5

Enable the s390x plaform support in the perftest-2.3.1 package by fixing
a typo in the sample_get_cpu_mhz() function call and a couple of typos in
the README file.

Signed-off-by: Alexey Ishchuk <aishchuk@linux.vnet.ibm.com>

[ Rebased and modified to check for __s390__, to cover
  both s390 and s390x. -- mschmidt]
---
 README          | 2 +-
 src/get_clock.c | 6 +++---
 src/get_clock.h | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

Index: perftest-3.4/README
===================================================================
--- perftest-3.4.orig/README
+++ perftest-3.4/README
@@ -237,7 +237,7 @@ Special feature detailed explanation in
     ./configure --disable-verbs_exp
     make
 
- 6. In te x390x platform virtualized environment the results shown by package test applications can be incorrect.
+ 6. In the s390x platform virtualized environment the results shown by package test applications can be incorrect.
 
  7. perftest-2.3 release includes support for dualport VPI test - port1-Ethernet , port2-IB. (in addition to Eth:Eth, IB:IB)
     Currently, running dualport when port1-IB , port2-Ethernet still not working.
Index: perftest-3.4/src/get_clock.c
===================================================================
--- perftest-3.4.orig/src/get_clock.c
+++ perftest-3.4/src/get_clock.c
@@ -133,7 +133,7 @@ static double sample_get_cpu_mhz(void)
 	return b;
 }
 
-#ifndef __s390x__
+#ifndef __s390__
 static double proc_get_cpu_mhz(int no_cpu_freq_warn)
 {
 	FILE* f;
@@ -212,8 +212,8 @@ static double proc_get_cpu_mhz(int no_cp
 
 double get_cpu_mhz(int no_cpu_freq_warn)
 {
-	#ifdef __s390x__
-	return sample_get_cpu_mgz();
+	#ifdef __s390__
+	return sample_get_cpu_mhz();
 	#else
 	double sample, proc, delta;
 	sample = sample_get_cpu_mhz();
Index: perftest-3.4/src/get_clock.h
===================================================================
--- perftest-3.4.orig/src/get_clock.h
+++ perftest-3.4/src/get_clock.h
@@ -70,7 +70,7 @@ static inline cycles_t get_cycles()
 	asm volatile ("mov %0=ar.itc" : "=r" (ret));
 	return ret;
 }
-#elif defined(__s390x__)
+#elif defined(__s390__)
 typedef unsigned long long cycles_t;
 static inline cycles_t get_cycles(void)
 {