From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xen.org
Cc: stefano.stabellini@citrix.com, tim@xen.org,
Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH 3/4] arm/vtimer: convert result to ticks when reading CNTPCT register
Date: Mon, 6 Aug 2012 11:34:59 +0000 [thread overview]
Message-ID: <1344252900-26148-3-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1344252872.11339.27.camel@zakaz.uk.xensource.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
xen/arch/arm/vtimer.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/xen/arch/arm/vtimer.c b/xen/arch/arm/vtimer.c
index 6b1152e..92c385c 100644
--- a/xen/arch/arm/vtimer.c
+++ b/xen/arch/arm/vtimer.c
@@ -103,6 +103,7 @@ static int vtimer_emulate_64(struct cpu_user_regs *regs, union hsr hsr)
struct hsr_cp64 cp64 = hsr.cp64;
uint32_t *r1 = ®s->r0 + cp64.reg1;
uint32_t *r2 = ®s->r0 + cp64.reg2;
+ uint64_t ticks
s_time_t now;
switch ( hsr.bits & HSR_CP64_REGS_MASK )
@@ -111,8 +112,9 @@ static int vtimer_emulate_64(struct cpu_user_regs *regs, union hsr hsr)
if ( cp64.read )
{
now = NOW() - v->arch.vtimer.offset;
- *r1 = (uint32_t)(now & 0xffffffff);
- *r2 = (uint32_t)(now >> 32);
+ ticks = ns_to_ticks(now);
+ *r1 = (uint32_t)(ticks & 0xffffffff);
+ *r2 = (uint32_t)(ticks >> 32);
return 1;
}
else
--
1.7.9.1
next prev parent reply other threads:[~2012-08-06 11:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-06 11:34 [PATCH 0/4] arm: SMP interrupt handling fixes Ian Campbell
2012-08-06 11:34 ` [PATCH 1/4] arm: disable distributor delivery on boot CPU only Ian Campbell
2012-08-06 11:55 ` Tim Deegan
2012-08-06 11:56 ` Ian Campbell
2012-08-06 13:45 ` Ian Campbell
2012-08-07 9:42 ` Tim Deegan
2012-08-09 9:10 ` Ian Campbell
2012-08-09 11:26 ` Tim Deegan
2012-08-09 11:37 ` Ian Campbell
2012-08-06 11:34 ` [PATCH 2/4] arm: don't bother setting up vtimer, vgic etc on idle CPUs Ian Campbell
2012-08-06 11:34 ` Ian Campbell [this message]
2012-08-06 13:46 ` [PATCH 3/4] arm/vtimer: convert result to ticks when reading CNTPCT register Ian Campbell
2012-08-06 11:35 ` [PATCH 4/4] arm: Use per-CPU irq_desc for PPIs and SGIs Ian Campbell
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=1344252900-26148-3-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=stefano.stabellini@citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.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).