da5acb446b1ce9871d21e0bed6968974c3449b31
[deliverable/linux.git] / kernel / irq / settings.h
1 /*
2 * Internal header to deal with irq_desc->status which will be renamed
3 * to irq_desc->settings.
4 */
5 enum {
6 _IRQ_DEFAULT_INIT_FLAGS = IRQ_DEFAULT_INIT_FLAGS,
7 _IRQ_PER_CPU = IRQ_PER_CPU,
8 _IRQ_NO_BALANCING = IRQ_NO_BALANCING,
9 _IRQF_MODIFY_MASK = IRQF_MODIFY_MASK,
10 };
11
12 #undef IRQ_INPROGRESS
13 #define IRQ_INPROGRESS GOT_YOU_MORON
14 #undef IRQ_REPLAY
15 #define IRQ_REPLAY GOT_YOU_MORON
16 #undef IRQ_WAITING
17 #define IRQ_WAITING GOT_YOU_MORON
18 #undef IRQ_DISABLED
19 #define IRQ_DISABLED GOT_YOU_MORON
20 #undef IRQ_PENDING
21 #define IRQ_PENDING GOT_YOU_MORON
22 #undef IRQ_MASKED
23 #define IRQ_MASKED GOT_YOU_MORON
24 #undef IRQ_WAKEUP
25 #define IRQ_WAKEUP GOT_YOU_MORON
26 #undef IRQ_MOVE_PENDING
27 #define IRQ_MOVE_PENDING GOT_YOU_MORON
28 #undef IRQ_PER_CPU
29 #define IRQ_PER_CPU GOT_YOU_MORON
30 #undef IRQ_NO_BALANCING
31 #define IRQ_NO_BALANCING GOT_YOU_MORON
32 #undef IRQ_AFFINITY_SET
33 #define IRQ_AFFINITY_SET GOT_YOU_MORON
34 #undef IRQF_MODIFY_MASK
35 #define IRQF_MODIFY_MASK GOT_YOU_MORON
36
37 static inline void
38 irq_settings_clr_and_set(struct irq_desc *desc, u32 clr, u32 set)
39 {
40 desc->status &= ~(clr & _IRQF_MODIFY_MASK);
41 desc->status |= (set & _IRQF_MODIFY_MASK);
42 }
43
44 static inline bool irq_settings_is_per_cpu(struct irq_desc *desc)
45 {
46 return desc->status & _IRQ_PER_CPU;
47 }
48
49 static inline void irq_settings_set_per_cpu(struct irq_desc *desc)
50 {
51 desc->status |= _IRQ_PER_CPU;
52 }
53
54 static inline void irq_settings_set_no_balancing(struct irq_desc *desc)
55 {
56 desc->status |= _IRQ_NO_BALANCING;
57 }
58
59 static inline bool irq_settings_has_no_balance_set(struct irq_desc *desc)
60 {
61 return desc->status & _IRQ_NO_BALANCING;
62 }
This page took 0.032809 seconds and 5 git commands to generate.