genirq: Implement irq_data based move_*_irq() versions
No need to lookup the irq descriptor when calling from a chip callback function which has irq_data already handy. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
77694b408a
commit
a439520f8b
2 changed files with 23 additions and 9 deletions
|
@ -363,9 +363,13 @@ extern void remove_irq(unsigned int irq, struct irqaction *act);
|
||||||
#if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ)
|
#if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ)
|
||||||
void move_native_irq(int irq);
|
void move_native_irq(int irq);
|
||||||
void move_masked_irq(int irq);
|
void move_masked_irq(int irq);
|
||||||
|
void irq_move_irq(struct irq_data *data);
|
||||||
|
void irq_move_masked_irq(struct irq_data *data);
|
||||||
#else
|
#else
|
||||||
static inline void move_native_irq(int irq) { }
|
static inline void move_native_irq(int irq) { }
|
||||||
static inline void move_masked_irq(int irq) { }
|
static inline void move_masked_irq(int irq) { }
|
||||||
|
static inline void irq_move_irq(struct irq_data *data) { }
|
||||||
|
static inline void irq_move_masked_irq(struct irq_data *data) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int no_irq_affinity;
|
extern int no_irq_affinity;
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
|
|
||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
|
|
||||||
void move_masked_irq(int irq)
|
void irq_move_masked_irq(struct irq_data *idata)
|
||||||
{
|
{
|
||||||
struct irq_desc *desc = irq_to_desc(irq);
|
struct irq_desc *desc = irq_data_to_desc(idata);
|
||||||
struct irq_chip *chip = desc->irq_data.chip;
|
struct irq_chip *chip = idata->chip;
|
||||||
|
|
||||||
if (likely(!irqd_is_setaffinity_pending(&desc->irq_data)))
|
if (likely(!irqd_is_setaffinity_pending(&desc->irq_data)))
|
||||||
return;
|
return;
|
||||||
|
@ -53,12 +53,17 @@ void move_masked_irq(int irq)
|
||||||
cpumask_clear(desc->pending_mask);
|
cpumask_clear(desc->pending_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
void move_native_irq(int irq)
|
void move_masked_irq(int irq)
|
||||||
{
|
{
|
||||||
struct irq_desc *desc = irq_to_desc(irq);
|
irq_move_masked_irq(irq_get_irq_data(irq));
|
||||||
|
}
|
||||||
|
|
||||||
|
void irq_move_irq(struct irq_data *idata)
|
||||||
|
{
|
||||||
|
struct irq_desc *desc = irq_data_to_desc(idata);
|
||||||
bool masked;
|
bool masked;
|
||||||
|
|
||||||
if (likely(!irqd_is_setaffinity_pending(&desc->irq_data)))
|
if (likely(!irqd_is_setaffinity_pending(idata)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (unlikely(desc->istate & IRQS_DISABLED))
|
if (unlikely(desc->istate & IRQS_DISABLED))
|
||||||
|
@ -71,8 +76,13 @@ void move_native_irq(int irq)
|
||||||
*/
|
*/
|
||||||
masked = desc->istate & IRQS_MASKED;
|
masked = desc->istate & IRQS_MASKED;
|
||||||
if (!masked)
|
if (!masked)
|
||||||
desc->irq_data.chip->irq_mask(&desc->irq_data);
|
idata->chip->irq_mask(idata);
|
||||||
move_masked_irq(irq);
|
irq_move_masked_irq(idata);
|
||||||
if (!masked)
|
if (!masked)
|
||||||
desc->irq_data.chip->irq_unmask(&desc->irq_data);
|
idata->chip->irq_unmask(idata);
|
||||||
|
}
|
||||||
|
|
||||||
|
void move_native_irq(int irq)
|
||||||
|
{
|
||||||
|
irq_move_irq(irq_get_irq_data(irq));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue