All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-fsdevel@vger.kernel.org, linux-next@vger.kernel.org,
	voice.shen@atmel.com,
	Russell King - ARM Linux <linux@arm.linux.org.uk>
Subject: Re: mmotm 2013-08-27-16-51 uploaded
Date: Wed, 28 Aug 2013 11:42:20 -0700	[thread overview]
Message-ID: <20130828184218.GB19754@codeaurora.org> (raw)
In-Reply-To: <20130827182616.f9396ed6.akpm@linux-foundation.org>

On 08/27, Andrew Morton wrote:
> On Tue, 27 Aug 2013 17:50:23 -0700 Stephen Boyd <sboyd@codeaurora.org> wrote:
> 
> > On 08/27/13 16:52, akpm@linux-foundation.org wrote:
> > > * kernel-time-sched_clockc-correct-the-comparison-parameter-of-mhz.patch
> > >
> > 
> > I 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/95
> 
> Well 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 <sboyd@codeaurora.org>
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 <sboyd@codeaurora.org>
---
 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>

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Boyd <sboyd@codeaurora.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-fsdevel@vger.kernel.org, linux-next@vger.kernel.org,
	voice.shen@atmel.com,
	Russell King - ARM Linux <linux@arm.linux.org.uk>
Subject: Re: mmotm 2013-08-27-16-51 uploaded
Date: Wed, 28 Aug 2013 11:42:20 -0700	[thread overview]
Message-ID: <20130828184218.GB19754@codeaurora.org> (raw)
In-Reply-To: <20130827182616.f9396ed6.akpm@linux-foundation.org>

On 08/27, Andrew Morton wrote:
> On Tue, 27 Aug 2013 17:50:23 -0700 Stephen Boyd <sboyd@codeaurora.org> wrote:
> 
> > On 08/27/13 16:52, akpm@linux-foundation.org wrote:
> > > * kernel-time-sched_clockc-correct-the-comparison-parameter-of-mhz.patch
> > >
> > 
> > I 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/95
> 
> Well 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 <sboyd@codeaurora.org>
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 <sboyd@codeaurora.org>
---
 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

  reply	other threads:[~2013-08-28 18:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27 23:52 mmotm 2013-08-27-16-51 uploaded akpm
2013-08-27 23:52 ` akpm
2013-08-28  0:50 ` Stephen Boyd
2013-08-28  0:50   ` Stephen Boyd
2013-08-28  1:26   ` Andrew Morton
2013-08-28  1:26     ` Andrew Morton
2013-08-28 18:42     ` Stephen Boyd [this message]
2013-08-28 18:42       ` Stephen Boyd
2013-08-28  1:39   ` Bo Shen
2013-08-28  1:39     ` Bo Shen
2013-08-28  1:39     ` Bo Shen
2013-08-28 15:35 ` Michal Hocko
2013-08-28 15:35   ` Michal Hocko
2013-09-05 20:05 ` Kevin Hilman
2013-09-05 20:05   ` Kevin Hilman
2013-09-05 20:17   ` Andrew Morton
2013-09-05 20:17     ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2013-08-27 23:52 akpm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130828184218.GB19754@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=voice.shen@atmel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.