debuggers.hg

view xen/include/xen/softirq.h @ 13686:32fd32bbf78d

Add RCU support to Xen.
Signed-off-by: Jose Renato Santos <jsantos@hpl.hp.com>
author kaf24@localhost.localdomain
date Fri Jan 26 18:34:36 2007 +0000 (2007-01-26)
parents d603aed5ad6d
children 2a3111016f88
line source
1 #ifndef __XEN_SOFTIRQ_H__
2 #define __XEN_SOFTIRQ_H__
4 /* Common softirqs come first in the following list. */
5 #define TIMER_SOFTIRQ 0
6 #define SCHEDULE_SOFTIRQ 1
7 #define NEW_TLBFLUSH_CLOCK_PERIOD_SOFTIRQ 2
8 #define KEYPRESS_SOFTIRQ 3
9 #define NMI_SOFTIRQ 4
10 #define PAGE_SCRUB_SOFTIRQ 5
11 #define TRACE_SOFTIRQ 6
12 #define RCU_SOFTIRQ 7
14 #define NR_COMMON_SOFTIRQS 8
16 #include <asm/softirq.h>
18 #define NR_SOFTIRQS (NR_COMMON_SOFTIRQS + NR_ARCH_SOFTIRQS)
20 #ifndef __ASSEMBLY__
22 #include <xen/config.h>
23 #include <xen/lib.h>
24 #include <xen/smp.h>
25 #include <asm/bitops.h>
26 #include <asm/current.h>
27 #include <asm/hardirq.h>
29 typedef void (*softirq_handler)(void);
31 asmlinkage void do_softirq(void);
32 extern void open_softirq(int nr, softirq_handler handler);
34 static inline void cpumask_raise_softirq(cpumask_t mask, unsigned int nr)
35 {
36 int cpu;
38 for_each_cpu_mask(cpu, mask)
39 {
40 if ( test_and_set_bit(nr, &softirq_pending(cpu)) )
41 cpu_clear(cpu, mask);
42 }
44 smp_send_event_check_mask(mask);
45 }
47 static inline void cpu_raise_softirq(unsigned int cpu, unsigned int nr)
48 {
49 if ( !test_and_set_bit(nr, &softirq_pending(cpu)) )
50 smp_send_event_check_cpu(cpu);
51 }
53 static inline void raise_softirq(unsigned int nr)
54 {
55 set_bit(nr, &softirq_pending(smp_processor_id()));
56 }
58 #endif /* __ASSEMBLY__ */
60 #endif /* __XEN_SOFTIRQ_H__ */