From: Ulrich Weigand Date: Fri, 11 Oct 2019 18:21:01 +0000 (+0200) Subject: Cycles: Add support for IBM Z X-Git-Tag: v15.1.0~1250^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b410bb49d101eb9396f5ab37ac80b1691ea1d6b0;p=ceph-ci.git Cycles: Add support for IBM Z Patch provided by Yaakov Selkowitz . Signed-off-by: Ulrich Weigand --- diff --git a/src/common/Cycles.h b/src/common/Cycles.h index bb47d5cb029..16e0aa67fc1 100644 --- a/src/common/Cycles.h +++ b/src/common/Cycles.h @@ -78,6 +78,10 @@ class Cycles { uint32_t lo = 0, hi = 0; asm volatile("mftbu %0; mftb %1" : "=r" (hi), "=r" (lo)); return (((uint64_t)hi << 32) | lo); +#elif defined(__s390__) + uint64_t tsc; + asm volatile("stck %0" : "=Q" (tsc) : : "cc"); + return tsc; #else #warning No high-precision counter available for your OS/arch return 0;