aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irq.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-08 11:11:03 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-02-19 06:58:20 -0500
commita005677b3dd05decdd8880cf3044ae709856f58f (patch)
tree529d1454940fe8c6723bd54f01e009d9be2ab840 /include/linux/irq.h
parent1ce6068dac1924f7095be5850481e790cbf1b3c1 (diff)
genirq: Mirror IRQ_PER_CPU and IRQ_NO_BALANCING in irq_data.state
That's the right data structure to look at for arch code. Accessor functions are provided. irqd_is_per_cpu(irqdata); irqd_can_balance(irqdata); Coders who access them directly will be tracked down and slapped with stinking trouts. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r--include/linux/irq.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 3f607ad94220..d5312e6fe1aa 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -132,10 +132,14 @@ struct irq_data {
132 * Bit masks for irq_data.state 132 * Bit masks for irq_data.state
133 * 133 *
134 * IRQD_SETAFFINITY_PENDING - Affinity setting is pending 134 * IRQD_SETAFFINITY_PENDING - Affinity setting is pending
135 * IRQD_NO_BALANCING - Balancing disabled for this IRQ
136 * IRQD_PER_CPU - Interrupt is per cpu
135 */ 137 */
136enum { 138enum {
137 /* Bit 0 - 7 reserved for TYPE will use later */ 139 /* Bit 0 - 7 reserved for TYPE will use later */
138 IRQD_SETAFFINITY_PENDING = (1 << 8), 140 IRQD_SETAFFINITY_PENDING = (1 << 8),
141 IRQD_NO_BALANCING = (1 << 10),
142 IRQD_PER_CPU = (1 << 11),
139}; 143};
140 144
141static inline bool irqd_is_setaffinity_pending(struct irq_data *d) 145static inline bool irqd_is_setaffinity_pending(struct irq_data *d)
@@ -143,6 +147,16 @@ static inline bool irqd_is_setaffinity_pending(struct irq_data *d)
143 return d->state_use_accessors & IRQD_SETAFFINITY_PENDING; 147 return d->state_use_accessors & IRQD_SETAFFINITY_PENDING;
144} 148}
145 149
150static inline bool irqd_is_per_cpu(struct irq_data *d)
151{
152 return d->state_use_accessors & IRQD_PER_CPU;
153}
154
155static inline bool irqd_can_balance(struct irq_data *d)
156{
157 return !(d->state_use_accessors & (IRQD_PER_CPU | IRQD_NO_BALANCING));
158}
159
146/** 160/**
147 * struct irq_chip - hardware interrupt chip descriptor 161 * struct irq_chip - hardware interrupt chip descriptor
148 * 162 *