From 0e2e205c6198db9277bd64d9c98bb609dcdd7515 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Thu, 22 May 2014 10:42:26 +1000 Subject: [PATCH] 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 --- kernel/time/sched_clock.c | 4 ++++ 1 file changed, 4 insertions(+) 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'; -- 2.39.5