]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sched_clock: document 4Mhz vs 1Mhz decision
authorStephen Boyd <sboyd@codeaurora.org>
Tue, 5 Nov 2013 05:54:54 +0000 (16:54 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 5 Nov 2013 05:54:54 +0000 (16:54 +1100)
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>
kernel/time/sched_clock.c

index 0b479a6a22bb8fe30e2b9d6c76c2ddb1d5646ae1..f9a28dd3f49422202f7d8177bd5b50b08aa488c9 100644 (file)
@@ -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';