aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorZachary Amsden <zach@vmware.com>2007-03-05 03:30:41 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-05 10:57:52 -0500
commita9eddc952870d29aa9df96ab862327eb6afa23d9 (patch)
treea878f8579ec8230f1bb627e0d9603b2f0d05271f /arch/i386
parente30fab3ad34aa8bfb55c9f0337d4a92a0595f41f (diff)
[PATCH] vmi: fix nohz compile
More goo from hrtimers integration. We do compile and run properly with NO_HZ enabled. There was a period when we didn't because of a missing export, but that was since fixed. And with the clocksource code now firmly in place, we can get rid of code that fixes up the wallclock, since this is done in the common infrastructure. This actually fixes a timer bug as well, that was caused by do_settimeofday no longer being callable with interrupts disabled due to the use of on_each_cpu(). Signed-off-by: Zachary Amsden <zach@vmware.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/Kconfig2
-rw-r--r--arch/i386/kernel/vmi.c1
-rw-r--r--arch/i386/kernel/vmitime.c15
3 files changed, 2 insertions, 16 deletions
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index 2f7672545fe9..e970887b9e69 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -220,7 +220,7 @@ config PARAVIRT
220 220
221config VMI 221config VMI
222 bool "VMI Paravirt-ops support" 222 bool "VMI Paravirt-ops support"
223 depends on PARAVIRT && !NO_HZ 223 depends on PARAVIRT
224 default y 224 default y
225 help 225 help
226 VMI provides a paravirtualized interface to multiple hypervisors 226 VMI provides a paravirtualized interface to multiple hypervisors
diff --git a/arch/i386/kernel/vmi.c b/arch/i386/kernel/vmi.c
index a8aa57e77029..30e8253e6eef 100644
--- a/arch/i386/kernel/vmi.c
+++ b/arch/i386/kernel/vmi.c
@@ -934,6 +934,7 @@ void __init vmi_init(void)
934#ifdef CONFIG_X86_IO_APIC 934#ifdef CONFIG_X86_IO_APIC
935 no_timer_check = 1; 935 no_timer_check = 1;
936#endif 936#endif
937 no_sync_cmos_clock = 1;
937 938
938 local_irq_restore(flags & X86_EFLAGS_IF); 939 local_irq_restore(flags & X86_EFLAGS_IF);
939} 940}
diff --git a/arch/i386/kernel/vmitime.c b/arch/i386/kernel/vmitime.c
index 4bb218e2eb14..d21779749838 100644
--- a/arch/i386/kernel/vmitime.c
+++ b/arch/i386/kernel/vmitime.c
@@ -153,13 +153,6 @@ static void vmi_get_wallclock_ts(struct timespec *ts)
153 ts->tv_sec = wallclock; 153 ts->tv_sec = wallclock;
154} 154}
155 155
156static void update_xtime_from_wallclock(void)
157{
158 struct timespec ts;
159 vmi_get_wallclock_ts(&ts);
160 do_settimeofday(&ts);
161}
162
163unsigned long vmi_get_wallclock(void) 156unsigned long vmi_get_wallclock(void)
164{ 157{
165 struct timespec ts; 158 struct timespec ts;
@@ -197,18 +190,10 @@ void __init vmi_time_init(void)
197 set_intr_gate(LOCAL_TIMER_VECTOR, apic_vmi_timer_interrupt); 190 set_intr_gate(LOCAL_TIMER_VECTOR, apic_vmi_timer_interrupt);
198#endif 191#endif
199 192
200 no_sync_cmos_clock = 1;
201
202 vmi_get_wallclock_ts(&xtime);
203 set_normalized_timespec(&wall_to_monotonic,
204 -xtime.tv_sec, -xtime.tv_nsec);
205
206 real_cycles_accounted_system = read_real_cycles(); 193 real_cycles_accounted_system = read_real_cycles();
207 update_xtime_from_wallclock();
208 per_cpu(process_times_cycles_accounted_cpu, 0) = read_available_cycles(); 194 per_cpu(process_times_cycles_accounted_cpu, 0) = read_available_cycles();
209 195
210 cycles_per_sec = vmi_timer_ops.get_cycle_frequency(); 196 cycles_per_sec = vmi_timer_ops.get_cycle_frequency();
211
212 cycles_per_jiffy = cycles_per_sec; 197 cycles_per_jiffy = cycles_per_sec;
213 (void)do_div(cycles_per_jiffy, HZ); 198 (void)do_div(cycles_per_jiffy, HZ);
214 cycles_per_alarm = cycles_per_sec; 199 cycles_per_alarm = cycles_per_sec;