From: Stephen Boyd Date: Thu, 22 May 2014 00:42:26 +0000 (+1000) Subject: sched_clock: document 4Mhz vs 1Mhz decision X-Git-Tag: next-20140530~2^2~449 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0e2e205c6198db9277bd64d9c98bb609dcdd7515;p=karo-tx-linux.git 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 Cc: Bo Shen Cc: Russell King Cc: Thomas Gleixner Signed-off-by: Andrew Morton --- diff --git a/kernel/time/sched_clock.c b/kernel/time/sched_clock.c index 4d23dc4d8139..5038b4d3b76d 100644 --- a/kernel/time/sched_clock.c +++ b/kernel/time/sched_clock.c @@ -154,6 +154,10 @@ void __init sched_clock_register(u64 (*read)(void), int bits, raw_write_seqcount_end(&cd.seq); r = rate; + /* + * Use 4MHz instead of 1MHz so that things like 1.832Mhz show as + * 1832Khz + */ if (r >= 4000000) { r /= 1000000; r_unit = 'M';