[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] arm/vtimer: convert result to ticks when reading CNTPCT register


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Wed, 10 Oct 2012 22:11:25 +0000
  • Delivery-date: Wed, 10 Oct 2012 22:11:35 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1349791539 -3600
# Node ID fcd072eedbb5d927f04f3aabb939bdc9e8ca7ac5
# Parent  1f72d3ae4ccdf5b2c36c7884ee3a4cc4f4754fd9
arm/vtimer: convert result to ticks when reading CNTPCT register

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Tim Deegan <tim@xxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---


diff -r 1f72d3ae4ccd -r fcd072eedbb5 xen/arch/arm/vtimer.c
--- a/xen/arch/arm/vtimer.c     Tue Oct 09 15:05:38 2012 +0100
+++ b/xen/arch/arm/vtimer.c     Tue Oct 09 15:05:39 2012 +0100
@@ -103,6 +103,7 @@ static int vtimer_emulate_64(struct cpu_
     struct hsr_cp64 cp64 = hsr.cp64;
     uint32_t *r1 = &regs->r0 + cp64.reg1;
     uint32_t *r2 = &regs->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_
         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

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.