]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sched_clock: document 4Mhz vs 1Mhz decision
authorStephen Boyd <sboyd@codeaurora.org>
Thu, 22 May 2014 00:42:26 +0000 (10:42 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:42:26 +0000 (10:42 +1000)
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 4d23dc4d8139988e13946ee48d37a76333c916c0..5038b4d3b76df319587e290bae400206126c1644 100644 (file)
@@ -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';