# 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
|