From 65357d573630e6d0298c7314e4d544a1d2a35304 Mon Sep 17 00:00:00 2001 From: Dan Horák Date: Oct 04 2014 10:38:04 +0000 Subject: - Add s390(x) support --- diff --git a/0004-add-s390-x-support.patch b/0004-add-s390-x-support.patch new file mode 100644 index 0000000..ab7508d --- /dev/null +++ b/0004-add-s390-x-support.patch @@ -0,0 +1,48 @@ +From 588dde0cc079f98b5f17d3726972501c2d5725ee Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dan=20Hor=C3=A1k?= +Date: Sat, 4 Oct 2014 12:24:30 +0200 +Subject: [PATCH] add s390(x) support + +--- + configure.ac | 2 ++ + src/ticks_os.h | 4 ++++ + 2 files changed, 6 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 361a182..7c21116 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -31,6 +31,7 @@ case "$host" in + powerpc*-*-rtems*) TARGET=POWERPC; TARGETDIR=powerpc;; + x86_64-*-*) TARGET=X86_64; TARGETDIR=x86;; + aarch64-*-*) TARGET=AARCH64; TARGETDIR=aarch64;; ++ s390*-*-*) TARGET=S390; TARGETDIR=s390;; + esac + + AC_SUBST(AM_RUNTESTFLAGS) +@@ -48,6 +49,7 @@ AM_CONDITIONAL(POWERPC_AIX, test x$TARGET = xPOWERPC_AIX) + AM_CONDITIONAL(POWERPC_DARWIN, test x$TARGET = xPOWERPC_DARWIN) + AM_CONDITIONAL(POWERPC_FREEBSD, test x$TARGET = xPOWERPC_FREEBSD) + AM_CONDITIONAL(AARCH64, test x$TARGET = xAARCH64) ++AM_CONDITIONAL(S390, test x$TARGET = xS390) + + AC_SUBST(TARGET) + AC_SUBST(TARGETDIR) +diff --git a/src/ticks_os.h b/src/ticks_os.h +index 6660016..fa535be 100644 +--- a/src/ticks_os.h ++++ b/src/ticks_os.h +@@ -93,6 +93,10 @@ inline ticks_t os_gettimeoftsc() + unsigned long long ret; + asm volatile ("mftb %0" : "=r" (ret) : ); + return (ticks_t)ret; ++#elif defined (__s390__) ++ unsigned long long ret; ++ asm volatile ("stck %0" : "=Q" (ret) : : "cc"); ++ return (ticks_t)ret; + #elif defined(__arm__) || defined(__aarch64__) + // so the compiler will not complain. for + // arm compile, this inline is not used +-- +1.9.3 + diff --git a/sockperf.spec b/sockperf.spec index a67245f..de8c14d 100644 --- a/sockperf.spec +++ b/sockperf.spec @@ -2,7 +2,7 @@ Name: sockperf %global mainversion 2.5 %global svnversion 244 Version: %{mainversion}.%{svnversion} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Network benchmarking utility for testing latency and throughput License: BSD @@ -15,6 +15,8 @@ Source0: %{name}-%{version}.tar.xz Patch1: 0001-Don-t-throw-away-Fedora-s-CXXFLAGS.patch Patch2: 0002-drop-the-sockperf_-version-copy-of-the-binary.patch Patch3: 0003-doc-installation-fixes.patch +# https://code.google.com/p/sockperf/issues/detail?id=54 +Patch4: 0004-add-s390-x-support.patch BuildRequires: autoconf automake git BuildRequires: doxygen @@ -77,6 +79,9 @@ make %{?_smp_mflags} %changelog +* Sat Oct 04 2014 Dan Horák - 2.5.244-2 +- Add s390(x) support + * Mon Sep 08 2014 Michal Schmidt - 2.5.244-1 - Update to current upstream from SVN. Has aarch64 and ppc64 support. - Simplify svnversion substitution.