mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
bitkeeper revision 1.1159.1.312 (41837e24AgGTJo-4Cu3-XiU5i0cX2w)
Some very small time cleanups. Also call cur_timer->init during resume.
This commit is contained in:
1 parent
7ff919fd64
commit
1cded7dd3c
2 files changed
+17
-15
No files matched your search
@@ -675,21 +675,26 @@ int set_timeout_timer(void)
|
||||
|
||||
void time_suspend(void)
|
||||
{
|
||||
/* nothing */
|
||||
}
|
||||
|
||||
/* No locking required. We are only CPU running, and interrupts are off. */
|
||||
void time_resume(void)
|
||||
{
|
||||
unsigned long flags;
|
||||
write_seqlock_irqsave(&xtime_lock, flags);
|
||||
/* Get timebases for new environment. */
|
||||
__get_time_values_from_xen();
|
||||
/* Reset our own concept of passage of system time. */
|
||||
processed_system_time = shadow_system_time;
|
||||
/* Accept a warp in UTC (wall-clock) time. */
|
||||
last_seen_tv.tv_sec = 0;
|
||||
/* Make sure we resync UTC time with Xen on next timer interrupt. */
|
||||
last_update_from_xen = 0;
|
||||
write_sequnlock_irqrestore(&xtime_lock, flags);
|
||||
if (cur_timer->init(NULL) != 0)
|
||||
BUG();
|
||||
|
||||
/* Get timebases for new environment. */
|
||||
__get_time_values_from_xen();
|
||||
|
||||
/* Reset our own concept of passage of system time. */
|
||||
processed_system_time = shadow_system_time;
|
||||
|
||||
/* Accept a warp in UTC (wall-clock) time. */
|
||||
last_seen_tv.tv_sec = 0;
|
||||
|
||||
/* Make sure we resync UTC time with Xen on next timer interrupt. */
|
||||
last_update_from_xen = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -332,7 +332,6 @@ static inline void cpufreq_delayed_get(void) { return; }
|
||||
|
||||
static int __init init_tsc(char* override)
|
||||
{
|
||||
unsigned long long alarm;
|
||||
u64 __cpu_khz;
|
||||
|
||||
__cpu_khz = HYPERVISOR_shared_info->cpu_freq;
|
||||
@@ -353,9 +352,7 @@ static int __init init_tsc(char* override)
|
||||
|
||||
set_cyc2ns_scale(cpu_khz/1000);
|
||||
|
||||
rdtscll(alarm);
|
||||
|
||||
use_tsc=1;
|
||||
use_tsc = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||