[x86-64 patch 10/11] random.c precise timers on x86-64

Vojtech Pavlik (vojtech@suse.cz)
Thu, 13 Sep 2001 18:43:43 +0200


Hi!

This patch adds precise timing support on x86-64 into random.c.

diff -urN linux-x86_64/drivers/char/random.c linux/drivers/char/random.c
--- linux-x86_64/drivers/char/random.c Thu Sep 13 15:17:33 2001
+++ linux/drivers/char/random.c Tue Sep 11 09:49:17 2001
@@ -717,6 +717,10 @@
} else {
time = jiffies;
}
+#elif defined (__x86_64__)
+ __u32 high;
+ rdtsc(time, high);
+ num ^= high;
#else
time = jiffies;
#endif

-- 
Vojtech Pavlik
SuSE Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/