summaryrefslogtreecommitdiffstats
path: root/include/linux/clocksource.h
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2013-07-18 16:21:14 -0700
committerJohn Stultz <john.stultz@linaro.org>2013-07-30 11:24:20 -0700
commit87d8b9eb7eb6669aad6435a51e9862362141ba76 (patch)
tree904750465607175129393328e299fb9474adb604 /include/linux/clocksource.h
parentad81f0545ef01ea651886dddac4bef6cec930092 (diff)
downloadop-kernel-dev-87d8b9eb7eb6669aad6435a51e9862362141ba76.zip
op-kernel-dev-87d8b9eb7eb6669aad6435a51e9862362141ba76.tar.gz
clocksource: Extract max nsec calculation into separate function
We need to calculate the same number in the clocksource code and the sched_clock code, so extract this code into its own function. We also drop the min_t and just use min() because the two types are the same. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'include/linux/clocksource.h')
-rw-r--r--include/linux/clocksource.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index dbbf8aa..67301a4 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -292,6 +292,8 @@ extern void clocksource_resume(void);
extern struct clocksource * __init __weak clocksource_default_clock(void);
extern void clocksource_mark_unstable(struct clocksource *cs);
+extern u64
+clocks_calc_max_nsecs(u32 mult, u32 shift, u32 maxadj, u64 mask);
extern void
clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec);
OpenPOWER on IntegriCloud