#define IRQ_DISABLED 0x00000800 /* DEPRECATED */
#define IRQ_PENDING 0x00001000 /* DEPRECATED */
#define IRQ_MASKED 0x00002000 /* DEPRECATED */
+/* DEPRECATED use irq_setaffinity_pending() instead*/
+#define IRQ_MOVE_PENDING 0x00004000
#endif
-#define IRQ_LEVEL 0x00004000 /* IRQ level triggered */
+#define IRQ_LEVEL 0x00008000 /* IRQ level triggered */
#define IRQ_PER_CPU 0x00010000 /* IRQ is per CPU */
#define IRQ_NOPROBE 0x00020000 /* IRQ is not valid for probing */
#define IRQ_NOREQUEST 0x00040000 /* IRQ cannot be requested */
#define IRQ_NOAUTOEN 0x00080000 /* IRQ will not be enabled on request irq */
#define IRQ_WAKEUP 0x00100000 /* IRQ triggers system wakeup */
-#define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */
#define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */
#define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */
#define IRQ_AFFINITY_SET 0x02000000 /* IRQ affinity was set from userspace*/
#endif
};
+/*
+ * Bit masks for irq_data.state
+ *
+ * IRQD_SETAFFINITY_PENDING - Affinity setting is pending
+ */
+enum {
+ /* Bit 0 - 7 reserved for TYPE will use later */
+ IRQD_SETAFFINITY_PENDING = (1 << 8),
+};
+
+static inline bool irqd_is_setaffinity_pending(struct irq_data *d)
+{
+ return d->state_use_accessors & IRQD_SETAFFINITY_PENDING;
+}
+
/**
* struct irq_chip - hardware interrupt chip descriptor
*
{
desc->status &= ~IRQ_MASKED;
}
+static inline void irq_compat_set_move_pending(struct irq_desc *desc)
+{
+ desc->status |= IRQ_MOVE_PENDING;
+}
+
+static inline void irq_compat_clr_move_pending(struct irq_desc *desc)
+{
+ desc->status &= ~IRQ_MOVE_PENDING;
+}
#else
static inline void irq_compat_set_progress(struct irq_desc *desc) { }
static inline void irq_compat_clr_progress(struct irq_desc *desc) { }
static inline void irq_compat_clr_pending(struct irq_desc *desc) { }
static inline void irq_compat_set_masked(struct irq_desc *desc) { }
static inline void irq_compat_clr_masked(struct irq_desc *desc) { }
+static inline void irq_compat_set_move_pending(struct irq_desc *desc) { }
+static inline void irq_compat_clr_move_pending(struct irq_desc *desc) { }
#endif
}
/*
+ * Manipulation functions for irq_data.state
+ */
+static inline void irqd_set_move_pending(struct irq_data *d)
+{
+ d->state_use_accessors |= IRQD_SETAFFINITY_PENDING;
+ irq_compat_set_move_pending(irq_data_to_desc(d));
+}
+
+static inline void irqd_clr_move_pending(struct irq_data *d)
+{
+ d->state_use_accessors &= ~IRQD_SETAFFINITY_PENDING;
+ irq_compat_clr_move_pending(irq_data_to_desc(d));
+}
+
+/*
* Debugging printout:
*/
}
static inline bool irq_move_pending(struct irq_desc *desc)
{
- return desc->status & IRQ_MOVE_PENDING;
+ return irqd_is_setaffinity_pending(&desc->irq_data);
}
static inline void
irq_copy_pending(struct irq_desc *desc, const struct cpumask *mask)
ret = 0;
}
} else {
- desc->status |= IRQ_MOVE_PENDING;
+ irqd_set_move_pending(&desc->irq_data);
irq_copy_pending(desc, mask);
}
struct irq_desc *desc = irq_to_desc(irq);
struct irq_chip *chip = desc->irq_data.chip;
- if (likely(!(desc->status & IRQ_MOVE_PENDING)))
+ if (likely(!irqd_is_setaffinity_pending(&desc->irq_data)))
return;
/*
return;
}
- desc->status &= ~IRQ_MOVE_PENDING;
+ irqd_clr_move_pending(&desc->irq_data);
if (unlikely(cpumask_empty(desc->pending_mask)))
return;
struct irq_desc *desc = irq_to_desc(irq);
bool masked;
- if (likely(!(desc->status & IRQ_MOVE_PENDING)))
+ if (likely(!irqd_is_setaffinity_pending(&desc->irq_data)))
return;
if (unlikely(desc->istate & IRQS_DISABLED))
const struct cpumask *mask = desc->irq_data.affinity;
#ifdef CONFIG_GENERIC_PENDING_IRQ
- if (desc->status & IRQ_MOVE_PENDING)
+ if (irqd_is_setaffinity_pending(&desc->irq_data))
mask = desc->pending_mask;
#endif
seq_cpumask(m, mask);
#define IRQ_MASKED GOT_YOU_MORON
#undef IRQ_WAKEUP
#define IRQ_WAKEUP GOT_YOU_MORON
+#undef IRQ_MOVE_PENDING
+#define IRQ_MOVE_PENDING GOT_YOU_MORON