[patch 66/75] genirq: Reflect IRQ_MOVE_PCNTXT in irq_data state

From: Thomas Gleixner
Date: Thu Feb 10 2011 - 18:41:32 EST


Required by x86.

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
include/linux/irq.h | 8 ++++++++
kernel/irq/chip.c | 4 +++-
2 files changed, 11 insertions(+), 1 deletion(-)

Index: linux-2.6-tip/include/linux/irq.h
===================================================================
--- linux-2.6-tip.orig/include/linux/irq.h
+++ linux-2.6-tip/include/linux/irq.h
@@ -171,6 +171,8 @@ struct irq_data {
* valid in irq_chip.functions
* IRDQ_INPROGRESS - Interrupt is in progress, only
* valid in irq_chip.functions
+ * IRDQ_MOVE_PCNTXT - Interrupt can be moved in process
+ * context
*/
enum {
IRQD_TRIGGER_MASK = 0xf,
@@ -182,6 +184,7 @@ enum {
IRQD_WAKEUP_STATE = (1 << 14),
IRQD_DISABLED = (1 << 15),
IRQD_INPROGRESS = (1 << 16),
+ IRQD_MOVE_PCNTXT = (1 << 17),
};

static inline bool irqd_is_setaffinity_pending(struct irq_data *d)
@@ -238,6 +241,11 @@ static inline bool irqd_is_disabled(stru
return d->state_use_accessors & IRQD_DISABLED;
}

+static inline bool irqd_can_move_in_process_context(struct irq_data *d)
+{
+ return d->state_use_accessors & IRQD_MOVE_PCNTXT;
+}
+
/**
* struct irq_chip - hardware interrupt chip descriptor
*
Index: linux-2.6-tip/kernel/irq/chip.c
===================================================================
--- linux-2.6-tip.orig/kernel/irq/chip.c
+++ linux-2.6-tip/kernel/irq/chip.c
@@ -740,11 +740,13 @@ void irq_modify_status(unsigned int irq,
irq_settings_clr_and_set(desc, clr, set);

irqd_clear(&desc->irq_data, IRQD_NO_BALANCING | IRQD_PER_CPU |
- IRQD_TRIGGER_MASK | IRQD_LEVEL);
+ IRQD_TRIGGER_MASK | IRQD_LEVEL | IRQD_MOVE_PCNTXT);
if (irq_settings_has_no_balance_set(desc))
irqd_set(&desc->irq_data, IRQD_NO_BALANCING);
if (irq_settings_is_per_cpu(desc))
irqd_set(&desc->irq_data, IRQD_PER_CPU);
+ if (irq_settings_can_move_pcntxt(desc))
+ irqd_set(&desc->irq_data, IRQD_MOVE_PCNTXT);

irqd_set(&desc->irq_data, irq_settings_get_trigger_mask(desc));



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/