summaryrefslogtreecommitdiff
path: root/crc
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2012-12-09 20:29:00 +0100
committerJens Axboe <axboe@kernel.dk>2012-12-09 20:29:00 +0100
commitfa80feae51331fb170e784459fa1359d7ec3a963 (patch)
treeaa23a345eb99081d44b1afb92bf60c7d4d6eec10 /crc
parent5a90bb5f50f641a65f879ae09dbd65440e0ab2a6 (diff)
downloadfio-fa80feae51331fb170e784459fa1359d7ec3a963.tar.gz
fio-fa80feae51331fb170e784459fa1359d7ec3a963.tar.bz2
Add check for invariant TSC on x86 and use TSC is default clock if reliable
TSC is by far the fastest clock we can use. Check the CPUID bits for whether it is both constant rate AND synced across cores. If it is, we can use it as our default clock source. Fio will default to this clock source on x86 if no other clock source is specifically given with clocksource= in the job file. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'crc')
-rw-r--r--crc/crc32c-intel.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/crc/crc32c-intel.c b/crc/crc32c-intel.c
index 8a6e6dce..8e1cd587 100644
--- a/crc/crc32c-intel.c
+++ b/crc/crc32c-intel.c
@@ -78,22 +78,6 @@ uint32_t crc32c_intel(unsigned char const *data, unsigned long length)
return crc;
}
-static void do_cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx,
- unsigned int *edx)
-{
- int id = *eax;
-
- asm("movl %4, %%eax;"
- "cpuid;"
- "movl %%eax, %0;"
- "movl %%ebx, %1;"
- "movl %%ecx, %2;"
- "movl %%edx, %3;"
- : "=r" (*eax), "=r" (*ebx), "=r" (*ecx), "=r" (*edx)
- : "r" (id)
- : "eax", "ebx", "ecx", "edx");
-}
-
void crc32c_intel_probe(void)
{
if (!crc32c_probed) {