call out to arch code to deliver timer interrupts
PATCH 1/1 call out to arch code to deliver timer interrupts
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 <[email protected]>
# HG changeset patch
# User hollisb@basalt
# Node ID 686cd624618cead274ea9850f0997d41c6134283 # Parent df0ad1c46f10a1075478b434956fbdb1aad6ebd5 call out to arch code to deliver timer interrupts
xen/arch/ia64/xen/xentime.c +5 -1
@@ -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 ); +} +
xen/arch/x86/time.c +5 -0
@@ -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
xen/common/schedule.c +3 -3
@@ -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. */
xen/include/xen/time.h +2 -0
@@ -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__ */ /*
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center