WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [IA64] get_wallclock also returns NOW val

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] get_wallclock also returns NOW value.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 08 Apr 2008 02:00:40 -0700
Delivery-date: Tue, 08 Apr 2008 02:01:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1205169046 21600
# Node ID 16f6435a9d079b5bab8d4dc0c908e01ac9aca768
# Parent  f40a07c002096d72fb579f101112c80276aaadaa
[IA64] get_wallclock also returns NOW value.

At least sched_poll hypercall needs to have access to the NOW value
(time since boot).  This patch makes NOW available from sioemu.

Signed-off-by: Tristan Gingold <tgingold@xxxxxxx>
---
 xen/arch/ia64/vmx/sioemu.c  |    6 ++++--
 xen/arch/ia64/xen/xentime.c |   10 ++++++----
 xen/include/asm-ia64/time.h |    2 +-
 3 files changed, 11 insertions(+), 7 deletions(-)

diff -r f40a07c00209 -r 16f6435a9d07 xen/arch/ia64/vmx/sioemu.c
--- a/xen/arch/ia64/vmx/sioemu.c        Mon Mar 10 11:08:11 2008 -0600
+++ b/xen/arch/ia64/vmx/sioemu.c        Mon Mar 10 11:10:46 2008 -0600
@@ -248,9 +248,10 @@ sioemu_hypercall (struct pt_regs *regs)
         break;
     case SIOEMU_HYPERCALL_GET_TIME:
     {
-        uint64_t sec, nsec;
-        get_wallclock(&sec, &nsec);
+        uint64_t sec, nsec, now;
+        get_wallclock(&sec, &nsec, &now);
         regs->r8 = (sec << 30) + nsec;
+        regs->r9 = now;
         break;
     }
     case SIOEMU_HYPERCALL_GET_REGS:
@@ -272,6 +273,7 @@ sioemu_hypercall (struct pt_regs *regs)
     case SIOEMU_HYPERCALL_CALLBACK_RETURN:
         regs->r2 = regs->r27;
         sioemu_callback_return ();
+        vcpu_decrement_iip(current);
         break;
     default:
         panic_domain (NULL, "bad sioemu hypercall %lx\n", regs->r2);
diff -r f40a07c00209 -r 16f6435a9d07 xen/arch/ia64/xen/xentime.c
--- a/xen/arch/ia64/xen/xentime.c       Mon Mar 10 11:08:11 2008 -0600
+++ b/xen/arch/ia64/xen/xentime.c       Mon Mar 10 11:10:46 2008 -0600
@@ -253,9 +253,11 @@ struct tm wallclock_time(void)
     return gmtime(seconds);
 }
 
-void get_wallclock(uint64_t *sec, uint64_t *nsec)
-{
-    uint64_t nano = NOW() + wc_nsec;
+void get_wallclock(uint64_t *sec, uint64_t *nsec, uint64_t *now)
+{
+    uint64_t n = NOW();
+    uint64_t nano = n + wc_nsec;
     *sec = wc_sec + nano / NSEC_PER_SEC;
     *nsec = nano % NSEC_PER_SEC;
-}
+    *now = n;
+}
diff -r f40a07c00209 -r 16f6435a9d07 xen/include/asm-ia64/time.h
--- a/xen/include/asm-ia64/time.h       Mon Mar 10 11:08:11 2008 -0600
+++ b/xen/include/asm-ia64/time.h       Mon Mar 10 11:10:46 2008 -0600
@@ -7,6 +7,6 @@ struct tm;
 struct tm;
 struct tm wallclock_time(void);
 
-void get_wallclock(uint64_t *sec, uint64_t *nsec);
+void get_wallclock(uint64_t *sec, uint64_t *nsec, uint64_t *now);
 
 #endif /* _ASM_TIME_H_ */

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] get_wallclock also returns NOW value., Xen patchbot-unstable <=