summaryrefslogtreecommitdiffstats
path: root/kernel/time/timekeeping.c
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2012-03-22 19:14:46 -0700
committerJohn Stultz <john.stultz@linaro.org>2012-03-23 16:25:16 -0700
commite919cfd42da54d400e7e0385f22cae3672dcf874 (patch)
tree2fad9b552439188e2e48b0d3b0cacce52dc71b95 /kernel/time/timekeeping.c
parentad30dfa94c5cc23931c822922a50bd163ab293a5 (diff)
downloadblackbird-op-linux-e919cfd42da54d400e7e0385f22cae3672dcf874.tar.gz
blackbird-op-linux-e919cfd42da54d400e7e0385f22cae3672dcf874.zip
time: Avoid scary backtraces when warning of > 11% adj
Folks have been getting a number of warnings about time adjustments > 11%. The WARN_ON leaves a big useless backtrace so this patch removes it for a printk_once(). I'm still working to narrow down the cause of the > 11% adjustment. Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'kernel/time/timekeeping.c')
-rw-r--r--kernel/time/timekeeping.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 5d76e09ddd3d..16a175bed355 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -869,13 +869,15 @@ static void timekeeping_adjust(s64 offset)
} else /* No adjustment needed */
return;
- WARN_ONCE(timekeeper.clock->maxadj &&
- (timekeeper.mult + adj > timekeeper.clock->mult +
- timekeeper.clock->maxadj),
- "Adjusting %s more then 11%% (%ld vs %ld)\n",
+ if (unlikely(timekeeper.clock->maxadj &&
+ (timekeeper.mult + adj >
+ timekeeper.clock->mult + timekeeper.clock->maxadj))) {
+ printk_once(KERN_WARNING
+ "Adjusting %s more than 11%% (%ld vs %ld)\n",
timekeeper.clock->name, (long)timekeeper.mult + adj,
(long)timekeeper.clock->mult +
timekeeper.clock->maxadj);
+ }
/*
* So the following can be confusing.
*
OpenPOWER on IntegriCloud