ia64/xen-unstable

view linux-2.4-xen-sparse/include/asm-xen/hw_irq.h @ 6538:84ee014ebd41

Merge xen-vtx-unstable.hg
author adsharma@los-vmm.sc.intel.com
date Wed Aug 17 12:34:38 2005 -0800 (2005-08-17)
parents 23979fb12c49 f294acb25858
children 99914b54f7bf
line source
1 #ifndef _ASM_HW_IRQ_H
2 #define _ASM_HW_IRQ_H
4 /*
5 * linux/include/asm/hw_irq.h
6 *
7 * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar
8 */
10 #include <linux/config.h>
11 #include <linux/smp.h>
12 #include <asm/atomic.h>
13 #include <asm/irq.h>
15 #define SYSCALL_VECTOR 0x80
17 extern int irq_vector[NR_IRQS];
19 extern atomic_t irq_err_count;
20 extern atomic_t irq_mis_count;
22 extern char _stext, _etext;
24 extern unsigned long prof_cpu_mask;
25 extern unsigned int * prof_buffer;
26 extern unsigned long prof_len;
27 extern unsigned long prof_shift;
29 /*
30 * x86 profiling function, SMP safe. We might want to do this in
31 * assembly totally?
32 */
33 static inline void x86_do_profile (unsigned long eip)
34 {
35 if (!prof_buffer)
36 return;
38 /*
39 * Only measure the CPUs specified by /proc/irq/prof_cpu_mask.
40 * (default is all CPUs.)
41 */
42 if (!((1<<smp_processor_id()) & prof_cpu_mask))
43 return;
45 eip -= (unsigned long) &_stext;
46 eip >>= prof_shift;
47 /*
48 * Don't ignore out-of-bounds EIP values silently,
49 * put them into the last histogram slot, so if
50 * present, they will show up as a sharp peak.
51 */
52 if (eip > prof_len-1)
53 eip = prof_len-1;
54 atomic_inc((atomic_t *)&prof_buffer[eip]);
55 }
57 static inline void hw_resend_irq(struct hw_interrupt_type *h,
58 unsigned int i)
59 {}
61 #endif /* _ASM_HW_IRQ_H */