From: dwalker@fifo99.com (Daniel Walker)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] msm: timer: compensate for timer shift in msm_read_timer_count
Date: Thu, 09 Jun 2011 06:41:50 -0700 [thread overview]
Message-ID: <1307626910.16418.1.camel@m0nster> (raw)
In-Reply-To: <1307591042-2369-1-git-send-email-johlstei@codeaurora.org>
On Wed, 2011-06-08 at 20:44 -0700, Jeff Ohlstein wrote:
> Some msm targets have timers whose lower bits are unreliable. So, we
> present our timers as lower frequency than they actually are, and ignore
> the bottom 5 bits on such targets. This compensation was erroneously
> removed from the msm_read_timer_count function, so restore it.
>
> This was broken by 94790ec25 "msm: timer: SMP timer support for msm".
>
> Change-Id: I8c56bdf82629638748ccf352118ea664f967b87d
Drop this Change-ID ..
> Signed-off-by: Jeff Ohlstein <johlstei@codeaurora.org>
> ---
> arch/arm/mach-msm/timer.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c
> index 38b95e9..b3579fe 100644
> --- a/arch/arm/mach-msm/timer.c
> +++ b/arch/arm/mach-msm/timer.c
> @@ -100,7 +100,7 @@ static cycle_t msm_read_timer_count(struct clocksource *cs)
> {
> struct msm_clock *clk = container_of(cs, struct msm_clock, clocksource);
>
> - return readl(clk->global_counter);
> + return readl(clk->global_counter) >> clk->shift;
> }
Could you comment in the code with something explaining what the shift
is doing.
Daniel
next prev parent reply other threads:[~2011-06-09 13:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-09 3:44 [PATCH] msm: timer: compensate for timer shift in msm_read_timer_count Jeff Ohlstein
2011-06-09 13:41 ` Daniel Walker [this message]
2011-06-09 23:31 ` David Brown
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=1307626910.16418.1.camel@m0nster \
--to=dwalker@fifo99.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).