debuggers.hg

view xen/arch/ia64/patch/linux-2.6.11/irq_ia64.c @ 4619:5b9e241131fb

bitkeeper revision 1.1329 (42661815u5WPq8d5f4_axi2xWheybA)

Merge firebug.cl.cam.ac.uk:/local/scratch/kaf24/xen-unstable.bk
into firebug.cl.cam.ac.uk:/local/scratch/kaf24/xeno-unstable-ia64.bk
author kaf24@firebug.cl.cam.ac.uk
date Wed Apr 20 08:51:33 2005 +0000 (2005-04-20)
parents 58efb3448933
children ba75d06d25c5 79b7835ac75d
line source
1 irq_ia64.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 1 files changed, 67 insertions(+)
4 Index: linux-2.6.11-xendiffs/arch/ia64/kernel/irq_ia64.c
5 ===================================================================
6 --- linux-2.6.11-xendiffs.orig/arch/ia64/kernel/irq_ia64.c 2005-04-08 13:30:16.777174938 -0500
7 +++ linux-2.6.11-xendiffs/arch/ia64/kernel/irq_ia64.c 2005-04-08 14:15:47.398616472 -0500
8 @@ -17,18 +17,26 @@
9 #include <linux/config.h>
10 #include <linux/module.h>
12 +#ifndef XEN
13 #include <linux/jiffies.h>
14 +#endif
15 #include <linux/errno.h>
16 #include <linux/init.h>
17 #include <linux/interrupt.h>
18 #include <linux/ioport.h>
19 +#ifndef XEN
20 #include <linux/kernel_stat.h>
21 +#endif
22 #include <linux/slab.h>
23 +#ifndef XEN
24 #include <linux/ptrace.h>
25 #include <linux/random.h> /* for rand_initialize_irq() */
26 #include <linux/signal.h>
27 +#endif
28 #include <linux/smp.h>
29 +#ifndef XEN
30 #include <linux/smp_lock.h>
31 +#endif
32 #include <linux/threads.h>
33 #include <linux/bitops.h>
35 @@ -104,6 +112,24 @@ void
36 ia64_handle_irq (ia64_vector vector, struct pt_regs *regs)
37 {
38 unsigned long saved_tpr;
39 +#if 0
40 +//FIXME: For debug only, can be removed
41 + static char firstirq = 1;
42 + static char firsttime[256];
43 + static char firstpend[256];
44 + if (firstirq) {
45 + int i;
46 + for (i=0;i<256;i++) firsttime[i] = 1;
47 + for (i=0;i<256;i++) firstpend[i] = 1;
48 + firstirq = 0;
49 + }
50 + if (firsttime[vector]) {
51 + printf("**** (entry) First received int on vector=%d,itc=%lx\n",
52 + (unsigned long) vector, ia64_get_itc());
53 + firsttime[vector] = 0;
54 + }
55 +#endif
56 +
58 #if IRQ_DEBUG
59 {
60 @@ -148,6 +174,27 @@ ia64_handle_irq (ia64_vector vector, str
61 ia64_setreg(_IA64_REG_CR_TPR, vector);
62 ia64_srlz_d();
64 +#ifdef XEN
65 + if (vector != 0xef) {
66 + extern void vcpu_pend_interrupt(void *, int);
67 +#if 0
68 + if (firsttime[vector]) {
69 + printf("**** (iterate) First received int on vector=%d,itc=%lx\n",
70 + (unsigned long) vector, ia64_get_itc());
71 + firsttime[vector] = 0;
72 + }
73 + if (firstpend[vector]) {
74 + printf("**** First pended int on vector=%d,itc=%lx\n",
75 + (unsigned long) vector,ia64_get_itc());
76 + firstpend[vector] = 0;
77 + }
78 +#endif
79 + //FIXME: TEMPORARY HACK!!!!
80 + vcpu_pend_interrupt(dom0->exec_domain[0],vector);
81 + domain_wake(dom0->exec_domain[0]);
82 + }
83 + else
84 +#endif
85 __do_IRQ(local_vector_to_irq(vector), regs);
87 /*
88 @@ -276,3 +323,23 @@ ia64_send_ipi (int cpu, int vector, int
90 writeq(ipi_data, ipi_addr);
91 }
92 +
93 +/* From linux/kernel/softirq.c */
94 +#ifdef __ARCH_IRQ_EXIT_IRQS_DISABLED
95 +# define invoke_softirq() __do_softirq()
96 +#else
97 +# define invoke_softirq() do_softirq()
98 +#endif
99 +
100 +/*
101 + * Exit an interrupt context. Process softirqs if needed and possible:
102 + */
103 +void irq_exit(void)
104 +{
105 + account_system_vtime(current);
106 + sub_preempt_count(IRQ_EXIT_OFFSET);
107 + if (!in_interrupt() && local_softirq_pending())
108 + invoke_softirq();
109 + preempt_enable_no_resched();
110 +}
111 +/* end from linux/kernel/softirq.c */