genirq: Add IRQ_MOVE_PENDING to irq_data.state
chip implementations need to know about it. Keep status in sync until all users are fixed. Accessor function: irqd_is_setaffinity_pending(irqdata) Coders who access them directly will be tracked down and slapped with stinking trouts. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
这个提交包含在:
@@ -37,6 +37,15 @@ static inline void irq_compat_clr_masked(struct irq_desc *desc)
|
||||
{
|
||||
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) { }
|
||||
@@ -46,5 +55,7 @@ static inline void irq_compat_set_pending(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
|
||||
|
||||
|
@@ -124,6 +124,21 @@ static inline void chip_bus_sync_unlock(struct irq_desc *desc)
|
||||
desc->irq_data.chip->irq_bus_sync_unlock(&desc->irq_data);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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:
|
||||
*/
|
||||
|
@@ -107,7 +107,7 @@ static inline bool irq_can_move_pcntxt(struct irq_desc *desc)
|
||||
}
|
||||
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)
|
||||
@@ -156,7 +156,7 @@ int irq_set_affinity(unsigned int irq, const struct cpumask *mask)
|
||||
ret = 0;
|
||||
}
|
||||
} else {
|
||||
desc->status |= IRQ_MOVE_PENDING;
|
||||
irqd_set_move_pending(&desc->irq_data);
|
||||
irq_copy_pending(desc, mask);
|
||||
}
|
||||
|
||||
|
@@ -9,7 +9,7 @@ void move_masked_irq(int irq)
|
||||
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;
|
||||
|
||||
/*
|
||||
@@ -20,7 +20,7 @@ void move_masked_irq(int irq)
|
||||
return;
|
||||
}
|
||||
|
||||
desc->status &= ~IRQ_MOVE_PENDING;
|
||||
irqd_clr_move_pending(&desc->irq_data);
|
||||
|
||||
if (unlikely(cpumask_empty(desc->pending_mask)))
|
||||
return;
|
||||
@@ -58,7 +58,7 @@ void move_native_irq(int irq)
|
||||
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))
|
||||
|
@@ -25,7 +25,7 @@ static int irq_affinity_proc_show(struct seq_file *m, void *v)
|
||||
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);
|
||||
|
@@ -20,3 +20,5 @@ enum {
|
||||
#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
|
||||
|
在新工单中引用
屏蔽一个用户