ia64/xen-unstable

changeset 17200:16f6435a9d07

[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@free.fr>
author Alex Williamson <alex.williamson@hp.com>
date Mon Mar 10 11:10:46 2008 -0600 (2008-03-10)
parents f40a07c00209
children 85d25d01d93f
files xen/arch/ia64/vmx/sioemu.c xen/arch/ia64/xen/xentime.c xen/include/asm-ia64/time.h
line diff
     1.1 --- a/xen/arch/ia64/vmx/sioemu.c	Mon Mar 10 11:08:11 2008 -0600
     1.2 +++ b/xen/arch/ia64/vmx/sioemu.c	Mon Mar 10 11:10:46 2008 -0600
     1.3 @@ -248,9 +248,10 @@ sioemu_hypercall (struct pt_regs *regs)
     1.4          break;
     1.5      case SIOEMU_HYPERCALL_GET_TIME:
     1.6      {
     1.7 -        uint64_t sec, nsec;
     1.8 -        get_wallclock(&sec, &nsec);
     1.9 +        uint64_t sec, nsec, now;
    1.10 +        get_wallclock(&sec, &nsec, &now);
    1.11          regs->r8 = (sec << 30) + nsec;
    1.12 +        regs->r9 = now;
    1.13          break;
    1.14      }
    1.15      case SIOEMU_HYPERCALL_GET_REGS:
    1.16 @@ -272,6 +273,7 @@ sioemu_hypercall (struct pt_regs *regs)
    1.17      case SIOEMU_HYPERCALL_CALLBACK_RETURN:
    1.18          regs->r2 = regs->r27;
    1.19          sioemu_callback_return ();
    1.20 +        vcpu_decrement_iip(current);
    1.21          break;
    1.22      default:
    1.23          panic_domain (NULL, "bad sioemu hypercall %lx\n", regs->r2);
     2.1 --- a/xen/arch/ia64/xen/xentime.c	Mon Mar 10 11:08:11 2008 -0600
     2.2 +++ b/xen/arch/ia64/xen/xentime.c	Mon Mar 10 11:10:46 2008 -0600
     2.3 @@ -253,9 +253,11 @@ struct tm wallclock_time(void)
     2.4      return gmtime(seconds);
     2.5  }
     2.6  
     2.7 -void get_wallclock(uint64_t *sec, uint64_t *nsec)
     2.8 +void get_wallclock(uint64_t *sec, uint64_t *nsec, uint64_t *now)
     2.9  {
    2.10 -    uint64_t nano = NOW() + wc_nsec;
    2.11 +    uint64_t n = NOW();
    2.12 +    uint64_t nano = n + wc_nsec;
    2.13      *sec = wc_sec + nano / NSEC_PER_SEC;
    2.14      *nsec = nano % NSEC_PER_SEC;
    2.15 +    *now = n;
    2.16  }
     3.1 --- a/xen/include/asm-ia64/time.h	Mon Mar 10 11:08:11 2008 -0600
     3.2 +++ b/xen/include/asm-ia64/time.h	Mon Mar 10 11:10:46 2008 -0600
     3.3 @@ -7,6 +7,6 @@
     3.4  struct tm;
     3.5  struct tm wallclock_time(void);
     3.6  
     3.7 -void get_wallclock(uint64_t *sec, uint64_t *nsec);
     3.8 +void get_wallclock(uint64_t *sec, uint64_t *nsec, uint64_t *now);
     3.9  
    3.10  #endif /* _ASM_TIME_H_ */