Port-xen archive

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

Re: A Timecounter for Xen



> @@ -220,28 +291,16 @@ inittodr(time_t base)
>               base = CONFIG_TIME;
>       }
>  
> -     s = splclock();
> +     s = splhigh();
>       get_time_values_from_xen();
> +     sts = shadow_ts;
>       splx(s);
>  
> -#if defined(XEN3)
> -     t = (shadow_tv.tv_sec + rtc_offset * 60) * UINT64_C(1000000) +
> -         shadow_tv.tv_usec + processed_system_time / 1000;
> -     time.tv_usec = t % UINT64_C(1000000);
> -     time.tv_sec = t / UINT64_C(1000000);
> -#else /* defined(XEN3) */
> -     time.tv_usec = shadow_tv.tv_usec;
> -     time.tv_sec = shadow_tv.tv_sec + rtc_offset * 60;
> -#endif /* defined(XEN3) */
> -#ifdef XEN_CLOCK_DEBUG
> -     printf("readclock: %ld (%ld)\n", time.tv_sec, base);
> -#endif
> -     /* reset microset, so that the next call to microset() will init */
> -     ci->ci_cc.cc_denom = 0;
> -
> -     if (base != 0 && base < time.tv_sec - 5*SECYR)
> +     tc_setclock(&sts); /* XXX what about rtc_offset? */
> +     
> +     if (base != 0 && base < time_second - 5*SECYR)
>               printf("WARNING: file system time much less than clock time\n");

is it correct for XEN3?
see clock.c rev.1.27 and xen c/s 43564304cf94.

YAMAMOTO Takashi



Home | Main Index | Thread Index | Old Index