aboutsummaryrefslogtreecommitdiffstats
path: root/linux-2.6.9-xen-sparse
diff options
context:
space:
mode:
authorkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>2004-10-30 11:42:28 +0000
committerkaf24@freefall.cl.cam.ac.uk <kaf24@freefall.cl.cam.ac.uk>2004-10-30 11:42:28 +0000
commit1cded7dd3c99c519538b41b76bb3b8ba0947ffbd (patch)
treef8cc11d7abb8e63c471c910d4af1e2be2f00d37a /linux-2.6.9-xen-sparse
parent7ff919fd64d9221390301f31debd0b91b413a612 (diff)
downloadxen-1cded7dd3c99c519538b41b76bb3b8ba0947ffbd.tar.gz
xen-1cded7dd3c99c519538b41b76bb3b8ba0947ffbd.tar.bz2
xen-1cded7dd3c99c519538b41b76bb3b8ba0947ffbd.zip
bitkeeper revision 1.1159.1.312 (41837e24AgGTJo-4Cu3-XiU5i0cX2w)
Some very small time cleanups. Also call cur_timer->init during resume.
Diffstat (limited to 'linux-2.6.9-xen-sparse')
-rw-r--r--linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c27
-rw-r--r--linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c5
2 files changed, 17 insertions, 15 deletions
diff --git a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c
index 9a11137f07..1edc1cbf83 100644
--- a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c
+++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c
@@ -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;
}
/*
diff --git a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c
index 683ad982ca..d4d64de094 100644
--- a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c
+++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c
@@ -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;
}