fio: fix cycles_start build issue
There is an issue introduced with "commit 73df3e07 gettime: offset CPU cycle
counter by initial value". For architectures which define
ARCH_CPU_CLOCK_CYCLES_PER_USEC (currently only s390) this causes a build
gettime.c:174:11: error: ‘cycles_start’ undeclared (first use in this
if (t < cycles_start && !cycles_wrap)
To make sure variables and code are only compiled in the same cases I
clock definition called ARCH_CPU_CLOCK_WRAPS. We could merge
ARCH_CPU_CLOCK_WRAPS and the existing ARCH_CPU_CLOCK_CYCLES_PER_USEC
if you prefer, so far nobody else uses it.
To avoid cluttering all architecture headers I enabled it by default in
arch-generic.h, so any arch not needing the wrap handling can undef
ARCH_CPU_CLOCK_WRAPS later in their headers.
Signed-off-by: Christian Ehrhardt <email@example.com>
Signed-off-by: Jens Axboe <firstname.lastname@example.org>
3 files changed