]>
git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - kernel/irq/settings.h
2 * Internal header to deal with irq_desc->status which will be renamed
3 * to irq_desc->settings.
6 _IRQ_DEFAULT_INIT_FLAGS
= IRQ_DEFAULT_INIT_FLAGS
,
7 _IRQ_PER_CPU
= IRQ_PER_CPU
,
8 _IRQ_LEVEL
= IRQ_LEVEL
,
9 _IRQ_NO_BALANCING
= IRQ_NO_BALANCING
,
10 _IRQF_MODIFY_MASK
= IRQF_MODIFY_MASK
,
14 #define IRQ_INPROGRESS GOT_YOU_MORON
16 #define IRQ_REPLAY GOT_YOU_MORON
18 #define IRQ_WAITING GOT_YOU_MORON
20 #define IRQ_DISABLED GOT_YOU_MORON
22 #define IRQ_PENDING GOT_YOU_MORON
24 #define IRQ_MASKED GOT_YOU_MORON
26 #define IRQ_WAKEUP GOT_YOU_MORON
27 #undef IRQ_MOVE_PENDING
28 #define IRQ_MOVE_PENDING GOT_YOU_MORON
30 #define IRQ_PER_CPU GOT_YOU_MORON
31 #undef IRQ_NO_BALANCING
32 #define IRQ_NO_BALANCING GOT_YOU_MORON
33 #undef IRQ_AFFINITY_SET
34 #define IRQ_AFFINITY_SET GOT_YOU_MORON
36 #define IRQ_LEVEL GOT_YOU_MORON
37 #undef IRQF_MODIFY_MASK
38 #define IRQF_MODIFY_MASK GOT_YOU_MORON
41 irq_settings_clr_and_set(struct irq_desc
*desc
, u32 clr
, u32 set
)
43 desc
->status
&= ~(clr
& _IRQF_MODIFY_MASK
);
44 desc
->status
|= (set
& _IRQF_MODIFY_MASK
);
47 static inline bool irq_settings_is_per_cpu(struct irq_desc
*desc
)
49 return desc
->status
& _IRQ_PER_CPU
;
52 static inline void irq_settings_set_per_cpu(struct irq_desc
*desc
)
54 desc
->status
|= _IRQ_PER_CPU
;
57 static inline void irq_settings_set_no_balancing(struct irq_desc
*desc
)
59 desc
->status
|= _IRQ_NO_BALANCING
;
62 static inline bool irq_settings_has_no_balance_set(struct irq_desc
*desc
)
64 return desc
->status
& _IRQ_NO_BALANCING
;
67 static inline u32
irq_settings_get_trigger_mask(struct irq_desc
*desc
)
69 return desc
->status
& IRQ_TYPE_SENSE_MASK
;
73 irq_settings_set_trigger_mask(struct irq_desc
*desc
, u32 mask
)
75 desc
->status
&= ~IRQ_TYPE_SENSE_MASK
;
76 desc
->status
|= mask
& IRQ_TYPE_SENSE_MASK
;
79 static inline bool irq_settings_is_level(struct irq_desc
*desc
)
81 return desc
->status
& _IRQ_LEVEL
;
84 static inline void irq_settings_clr_level(struct irq_desc
*desc
)
86 desc
->status
&= ~_IRQ_LEVEL
;
89 static inline void irq_settings_set_level(struct irq_desc
*desc
)
91 desc
->status
|= _IRQ_LEVEL
;