Unlike x86 and apparently ia64, PowerPC delivers timer interrupts as a
different exception than device interrupts. For PowerPC Xen, we emulate this
exception rather than delivering timer events as virtual IRQs. This patch
introduces no functional changes for x86 and ia64, but is a required change
for xen/arch/ppc.
Compile-tested on x86-32. Please apply.
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
# HG changeset patch
# User hollisb@basalt
# Node ID 686cd624618cead274ea9850f0997d41c6134283
# Parent df0ad1c46f10a1075478b434956fbdb1aad6ebd5
call out to arch code to deliver timer interrupts
diff -r df0ad1c46f10 -r 686cd624618c xen/arch/ia64/xen/xentime.c
--- a/xen/arch/ia64/xen/xentime.c Thu Mar 9 16:03:23 2006 +0100
+++ b/xen/arch/ia64/xen/xentime.c Tue Mar 14 14:56:55 2006 -0600
@@ -258,4 +258,8 @@ int reprogram_timer(s_time_t timeout)
return 1;
}
-
+void arch_send_timer_event(struct vcpu *v)
+{
+ send_guest_virq(v, VIRQ_TIMER);
+}
+
diff -r df0ad1c46f10 -r 686cd624618c xen/arch/x86/time.c
--- a/xen/arch/x86/time.c Thu Mar 9 16:03:23 2006 +0100
+++ b/xen/arch/x86/time.c Tue Mar 14 14:56:55 2006 -0600
@@ -923,6 +923,11 @@ void __init early_time_init(void)
setup_irq(0, &irq0);
}
+void arch_send_timer_event(struct vcpu *v)
+{
+ send_guest_virq(v, VIRQ_TIMER);
+}
+
/*
* Local variables:
* mode: C
diff -r df0ad1c46f10 -r 686cd624618c xen/common/schedule.c
--- a/xen/common/schedule.c Thu Mar 9 16:03:23 2006 +0100
+++ b/xen/common/schedule.c Tue Mar 14 14:56:55 2006 -0600
@@ -465,7 +465,7 @@ static void __enter_scheduler(void)
{
update_dom_time(next);
if ( next->sleep_tick != schedule_data[cpu].tick )
- send_guest_virq(next, VIRQ_TIMER);
+ arch_send_timer_event(next);
}
TRACE_4D(TRC_SCHED_SWITCH,
@@ -501,7 +501,7 @@ static void t_timer_fn(void *unused)
if ( !is_idle_vcpu(v) )
{
update_dom_time(v);
- send_guest_virq(v, VIRQ_TIMER);
+ arch_send_timer_event(v);
}
page_scrub_schedule_work();
@@ -515,7 +515,7 @@ static void dom_timer_fn(void *data)
struct vcpu *v = data;
update_dom_time(v);
- send_guest_virq(v, VIRQ_TIMER);
+ arch_send_timer_event(v);
}
/* Initialise the data structures. */
diff -r df0ad1c46f10 -r 686cd624618c xen/include/xen/time.h
--- a/xen/include/xen/time.h Thu Mar 9 16:03:23 2006 +0100
+++ b/xen/include/xen/time.h Tue Mar 14 14:56:55 2006 -0600
@@ -59,6 +59,8 @@ extern void do_settime(
extern void do_settime(
unsigned long secs, unsigned long nsecs, u64 system_time_base);
+extern void arch_send_timer_event(struct vcpu *v);
+
#endif /* __XEN_TIME_H__ */
/*
--
Hollis Blanchard
IBM Linux Technology Center
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|