diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2013-11-05 16:54:54 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2013-11-05 16:54:54 +1100 |
commit | be2c0ba7ef6cdfa2b7b3a52c17f941ecbabe604c (patch) | |
tree | cd2a8c20bbc2e0d014c1e0f133fb65461e0baa07 /kernel | |
parent | 7ac9df731266257a06da62dee3b91cde775fa980 (diff) |
sched_clock: document 4Mhz vs 1Mhz decision
Bo Shen sent a patch to change this to 1Mhz instead of 4Mhz but according
to Russell King the use of 4Mhz was intentional. Add a comment to this
effect so that others don't try to change the code as well.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/time/sched_clock.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/time/sched_clock.c b/kernel/time/sched_clock.c index 0b479a6a22bb..f9a28dd3f494 100644 --- a/kernel/time/sched_clock.c +++ b/kernel/time/sched_clock.c @@ -128,6 +128,10 @@ void __init setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate) clocks_calc_mult_shift(&cd.mult, &cd.shift, rate, NSEC_PER_SEC, 0); r = rate; + /* + * Use 4MHz instead of 1MHz so that things like 1.832Mhz show as + * 1832Khz + */ if (r >= 4000000) { r /= 1000000; r_unit = 'M'; |