From: Alex Williamson Date: Mon, 10 Mar 2008 17:10:46 +0000 (-0600) Subject: [IA64] get_wallclock also returns NOW value. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14257 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5c49a9b7aace1eb8c1133c57dc7d5b126d0c85a8;p=xen.git [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 --- diff --git a/xen/arch/ia64/vmx/sioemu.c b/xen/arch/ia64/vmx/sioemu.c index fe6b740fd3..6cabe82b37 100644 --- a/xen/arch/ia64/vmx/sioemu.c +++ b/xen/arch/ia64/vmx/sioemu.c @@ -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 --git a/xen/arch/ia64/xen/xentime.c b/xen/arch/ia64/xen/xentime.c index 7579ef569d..710570731d 100644 --- a/xen/arch/ia64/xen/xentime.c +++ b/xen/arch/ia64/xen/xentime.c @@ -253,9 +253,11 @@ struct tm wallclock_time(void) return gmtime(seconds); } -void get_wallclock(uint64_t *sec, uint64_t *nsec) +void get_wallclock(uint64_t *sec, uint64_t *nsec, uint64_t *now) { - uint64_t nano = NOW() + wc_nsec; + 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 --git a/xen/include/asm-ia64/time.h b/xen/include/asm-ia64/time.h index f1d8ce1165..2361901ea6 100644 --- a/xen/include/asm-ia64/time.h +++ b/xen/include/asm-ia64/time.h @@ -7,6 +7,6 @@ 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_ */