linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] arm64: vdso: fix coarse clock handling
Date: Wed, 5 Feb 2014 11:54:57 +0000	[thread overview]
Message-ID: <20140205115457.GC7550@arm.com> (raw)
In-Reply-To: <20140205100945.GA28623@mudshark.cambridge.arm.com>

On Wed, Feb 05, 2014 at 10:09:45AM +0000, Will Deacon wrote:
> On Wed, Feb 05, 2014 at 05:53:04AM +0000, Nathan Lynch wrote:
> > When __kernel_clock_gettime is called with a CLOCK_MONOTONIC_COARSE or
> > CLOCK_REALTIME_COARSE clock id, it returns incorrectly to whatever the
> > caller has placed in x2 ("ret x2" to return from the fast path).  Fix
> > this by saving x30/LR to x2 only in code that will call
> > __do_get_tspec, restoring x30 afterward, and using a plain "ret" to
> > return from the routine.
> > 
> > Also: while the resulting tv_nsec value for CLOCK_REALTIME and
> > CLOCK_MONOTONIC must be computed using intermediate values that are
> > left-shifted by cs_shift (x12, set by __do_get_tspec), the results for
> > coarse clocks should be calculated using unshifted values
> > (xtime_coarse_nsec is in units of actual nanoseconds).  The current
> > code shifts intermediate values by x12 unconditionally, but x12 is
> > uninitialized when servicing a coarse clock.  Fix this by setting x12
> > to 0 once we know we are dealing with a coarse clock id.
> > 
> > Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
> > ---
> 
> Thanks for the quick update Nathan!
> 
>   Acked-by: Will Deacon <will.deacon@arm.com>
> 
> Catalin: both of these are candidates for stable.

And by this you mean Cc: stable...

Applied, thanks.

-- 
Catalin

  reply	other threads:[~2014-02-05 11:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-03 19:48 [PATCH 0/2] arm64: vdso fixes for coarse clocks Nathan Lynch
2014-02-03 19:48 ` [PATCH 1/2] arm64: vdso: fix coarse clock handling Nathan Lynch
2014-02-04 18:26   ` Will Deacon
2014-02-05  5:52     ` Nathan Lynch
2014-02-05  5:53   ` [PATCH v2 " Nathan Lynch
2014-02-05 10:09     ` Will Deacon
2014-02-05 11:54       ` Catalin Marinas [this message]
2014-02-03 19:48 ` [PATCH 2/2] arm64: vdso: update wtm fields for CLOCK_MONOTONIC_COARSE Nathan Lynch
2014-02-04 18:28   ` Will Deacon

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=20140205115457.GC7550@arm.com \
    --to=catalin.marinas@arm.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).