summaryrefslogtreecommitdiffstats
path: root/sys/sys
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2010-09-14 08:48:06 +0000
committermav <mav@FreeBSD.org>2010-09-14 08:48:06 +0000
commit6c05aa4db6d1ea20da8eca83a1214b74821b32d8 (patch)
treead6e771c5b5091a633bf1f813ca1f742162ecb96 /sys/sys
parent5864d6e457c81a0a80b2ab3b57ee852e6f62efcb (diff)
downloadFreeBSD-src-6c05aa4db6d1ea20da8eca83a1214b74821b32d8.zip
FreeBSD-src-6c05aa4db6d1ea20da8eca83a1214b74821b32d8.tar.gz
Make kern_tc.c provide minimum frequency of tc_ticktock() calls, required
to handle current timecounter wraps. Make kern_clocksource.c to honor that requirement, scheduling sleeps on first CPU for no more then specified period. Allow other CPUs to sleep up to 1/4 second (for any case).
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/callout.h2
-rw-r--r--sys/sys/timetc.h6
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/sys/callout.h b/sys/sys/callout.h
index 8fcd06e..c0077a8 100644
--- a/sys/sys/callout.h
+++ b/sys/sys/callout.h
@@ -96,7 +96,7 @@ int callout_schedule_on(struct callout *, int, int);
#define callout_stop(c) _callout_stop_safe(c, 0)
int _callout_stop_safe(struct callout *, int);
void callout_tick(void);
-int callout_tickstofirst(void);
+int callout_tickstofirst(int limit);
extern void (*callout_new_inserted)(int cpu, int ticks);
#endif
diff --git a/sys/sys/timetc.h b/sys/sys/timetc.h
index 3249788..dc1dea4 100644
--- a/sys/sys/timetc.h
+++ b/sys/sys/timetc.h
@@ -65,11 +65,15 @@ struct timecounter {
};
extern struct timecounter *timecounter;
+extern int tc_min_ticktock_freq; /*
+ * Minimal tc_ticktock() call frequency,
+ * required to handle counter wraps.
+ */
u_int64_t tc_getfrequency(void);
void tc_init(struct timecounter *tc);
void tc_setclock(struct timespec *ts);
-void tc_ticktock(void);
+void tc_ticktock(int cnt);
void cpu_tick_calibration(void);
#ifdef SYSCTL_DECL
OpenPOWER on IntegriCloud