Re: mmotm 2013-08-27-16-51 uploaded
From: Stephen Boyd <hidden>
Date: 2013-08-28 18:42:20
Also in:
linux-fsdevel, linux-next, lkml
Subsystem:
the rest · Maintainer:
Linus Torvalds
On 08/27, Andrew Morton wrote:
On Tue, 27 Aug 2013 17:50:23 -0700 Stephen Boyd [off-list ref] wrote:quoted
On 08/27/13 16:52, akpm@linux-foundation.org wrote:quoted
* kernel-time-sched_clockc-correct-the-comparison-parameter-of-mhz.patchI believe Russell nacked this change[1]? This should probably be dropped unless there's been more discussion. Or maybe reworked into a comment in the code that doesn't lead to the same change again. [1] https://lkml.org/lkml/2013/8/7/95Well OK, but the code looks totally wrong. Care to send a comment patch so the next confused person doesn't "fix" it?
Sure, how about this? ---8<---- From: Stephen Boyd <redacted> 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 <redacted> --- 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 a326f27..1e9e298 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';
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>