 Julien Ridoux
 julien@synclab.org
 
-diff -aur --unidirectional-new-file sys/amd64/amd64/tsc.c FreeBSD-CURRENT/amd64/amd64/tsc.c
---- sys/amd64/amd64/tsc.c	2010-12-09 15:46:09.000000000 +1100
-+++ FreeBSD-CURRENT/amd64/amd64/tsc.c	2010-12-09 16:27:51.000000000 +1100
+diff -apur --unidirectional-new-file sys/amd64/amd64/tsc.c FreeBSD-CURRENT/amd64/amd64/tsc.c
+--- sys/amd64/amd64/tsc.c	2010-12-09 17:45:00.000000000 +1100
++++ FreeBSD-CURRENT/amd64/amd64/tsc.c	2010-12-09 17:45:32.000000000 +1100
 @@ -2,6 +2,12 @@
   * Copyright (C) 1998-2003 Poul-Henning Kamp
   * All rights reserved.

  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
diff -aur --unidirectional-new-file sys/kern/kern_tc.c FreeBSD-CURRENT/kern/kern_tc.c
--- sys/kern/kern_tc.c	2010-12-09 15:46:09.000000000 +1100
+++ FreeBSD-CURRENT/kern/kern_tc.c	2010-12-09 16:27:51.000000000 +1100
@@ -5,8 +5,15 @@
  * can do whatever you want with this stuff. If we meet some day, and you think
  * this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp

  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -70,6 +76,18 @@ static void tsc_freq_changing(void *arg,
 static	unsigned tsc_get_timecount(struct timecounter *tc);
 static void tsc_levels_changed(void *arg, int unit);
 
+#ifdef FFCLOCK
+static uint64_t tsc_get_timecount_64(struct timecounter *tc);
+static struct timecounter tsc_timecounter = {
+	.tc_get_timecount = tsc_get_timecount,
+	.tc_poll_pps = 0,
+	.tc_counter_mask = ~0u,
+	.tc_frequency = 0,
+	.tc_name = "TSC",
+	.tc_quality = 800,
+	.tc_get_timecount_64 = &tsc_get_timecount_64
+};
+#else
 static struct timecounter tsc_timecounter = {
 	tsc_get_timecount,	/* get_timecount */
 	0,			/* no poll_pps */
@@ -78,6 +96,7 @@ static struct timecounter tsc_timecounte
 	"TSC",			/* name */
 	800,			/* quality (adjusted in code) */
 };
+#endif
 
 void
 init_TSC(void)
@@ -257,3 +276,11 @@ tsc_get_timecount(struct timecounter *tc
 {
 	return (rdtsc());
 }
+
+#ifdef FFCLOCK
+static uint64_t
+tsc_get_timecount_64(struct timecounter *tc)
+{
+	return (rdtsc());
+}
+#endif
diff -apur --unidirectional-new-file sys/i386/xen/clock.c FreeBSD-CURRENT/i386/xen/clock.c
--- sys/i386/xen/clock.c	2010-12-09 17:45:07.000000000 +1100
+++ FreeBSD-CURRENT/i386/xen/clock.c	2010-12-09 17:45:32.000000000 +1100
@@ -5,6 +5,12 @@
  * This code is derived from software contributed to Berkeley by
  * William Jolitz and Don Ahn.
