Commit 8800eead authored by Ashok Raj's avatar Ashok Raj Committed by David Mosberger

[PATCH] ia64: move move_irq() from iosapic.c to irq.c

This patch moves move_irq() from ioaspic.c to irq.c to make this common
for ia64 subarches.
Signed-off-by: default avatarAshok Raj <ashok.raj@intel.com>
Signed-off-by: default avatarDavid Mosberger <davidm@hpl.hp.com>
parent ac48e787
......@@ -100,7 +100,6 @@
#endif
static spinlock_t iosapic_lock = SPIN_LOCK_UNLOCKED;
extern cpumask_t __cacheline_aligned pending_irq_cpumask[NR_IRQS];
/* These tables map IA-64 vectors to the IOSAPIC pin that generates this vector. */
......@@ -335,21 +334,6 @@ iosapic_set_affinity (unsigned int irq, cpumask_t mask)
#endif
}
static inline void move_irq(int irq)
{
/* note - we hold desc->lock */
cpumask_t tmp;
irq_desc_t *desc = irq_descp(irq);
if (!cpus_empty(pending_irq_cpumask[irq])) {
cpus_and(tmp, pending_irq_cpumask[irq], cpu_online_map);
if (unlikely(!cpus_empty(tmp))) {
desc->handler->set_affinity(irq, pending_irq_cpumask[irq]);
}
cpus_clear(pending_irq_cpumask[irq]);
}
}
/*
* Handlers for level-triggered interrupts.
*/
......
......@@ -1018,6 +1018,22 @@ static int irq_affinity_write_proc (struct file *file, const char *buffer,
return full_count;
}
void move_irq(int irq)
{
/* note - we hold desc->lock */
cpumask_t tmp;
irq_desc_t *desc = irq_descp(irq);
if (!cpus_empty(pending_irq_cpumask[irq])) {
cpus_and(tmp, pending_irq_cpumask[irq], cpu_online_map);
if (unlikely(!cpus_empty(tmp))) {
desc->handler->set_affinity(irq, pending_irq_cpumask[irq]);
}
cpus_clear(pending_irq_cpumask[irq]);
}
}
#endif /* CONFIG_SMP */
#ifdef CONFIG_HOTPLUG_CPU
......
......@@ -30,6 +30,12 @@ extern void disable_irq_nosync (unsigned int);
extern void enable_irq (unsigned int);
extern void set_irq_affinity_info (unsigned int irq, int dest, int redir);
#ifdef CONFIG_SMP
extern void move_irq(int irq);
#else
#define move_irq(irq)
#endif
struct irqaction;
struct pt_regs;
int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment