ia64/xen-unstable

view xen/arch/ia64/xen/xenirq.c @ 9405:29dfadcc5029

[IA64] Followup to xen time cleanup

Clean up to xen time handler. Tristan #if 0 some code because it seems
redundant, which however is actually problematic logic as a reason for
an intermittent timer oops issue of dom0. So delete it now.

Also remove vcpu_wake, since wakeup current has nothing meaningful and
simply waste cpu cycle.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
author awilliam@xenbuild.aw
date Mon Mar 27 15:32:08 2006 -0700 (2006-03-27)
parents 911c04274f14
children db2bd8169e9b
line source
1 /*
2 * Xen irq routines
3 *
4 * Copyright (C) 2005 Hewlett-Packard Co.
5 * Dan Magenheimer (dan.magenheimer@hp.com)
6 *
7 */
9 #include <asm/ptrace.h>
10 #include <asm/hw_irq.h>
11 #include <asm/delay.h>
13 void
14 xen_debug_irq(ia64_vector vector, struct pt_regs *regs)
15 {
16 //FIXME: For debug only, can be removed
17 static char firstirq = 1;
18 static char firsttime[256];
19 static char firstpend[256];
20 if (firstirq) {
21 int i;
22 for (i=0;i<256;i++) firsttime[i] = 1;
23 for (i=0;i<256;i++) firstpend[i] = 1;
24 firstirq = 0;
25 }
26 if (firsttime[vector]) {
27 printf("**** (entry) First received int on vector=%lu,itc=%lx\n",
28 (unsigned long) vector, ia64_get_itc());
29 firsttime[vector] = 0;
30 }
31 }
34 int
35 xen_do_IRQ(ia64_vector vector)
36 {
37 if (vector != IA64_TIMER_VECTOR && vector != IA64_IPI_VECTOR) {
38 extern void vcpu_pend_interrupt(void *, int);
39 #if 0
40 if (firsttime[vector]) {
41 printf("**** (iterate) First received int on vector=%lu,itc=%lx\n",
42 (unsigned long) vector, ia64_get_itc());
43 firsttime[vector] = 0;
44 }
45 if (firstpend[vector]) {
46 printf("**** First pended int on vector=%lu,itc=%lx\n",
47 (unsigned long) vector, ia64_get_itc());
48 firstpend[vector] = 0;
49 }
50 #endif
51 //FIXME: TEMPORARY HACK!!!!
52 vcpu_pend_interrupt(dom0->vcpu[0],vector);
53 vcpu_wake(dom0->vcpu[0]);
54 return(1);
55 }
56 return(0);
57 }
59 /*
60 * Exit an interrupt context. Process softirqs if needed and possible:
61 */
62 void irq_exit(void)
63 {
64 sub_preempt_count(IRQ_EXIT_OFFSET);
65 }
67 /*
68 * ONLY gets called from ia64_leave_kernel
69 * ONLY call with interrupts enabled
70 */
71 void process_soft_irq(void)
72 {
73 if (!in_interrupt() && local_softirq_pending()) {
74 add_preempt_count(SOFTIRQ_OFFSET);
75 do_softirq();
76 sub_preempt_count(SOFTIRQ_OFFSET);
77 }
78 }
80 /* end from linux/kernel/softirq.c */