[PATCH] Add a function to handle interrupt affinity setting

Provide funtions to:
 - check, whether an interrupt can set the affinity
 - pin the interrupt to a given cpu

Necessary for the ability to setup clocksources more flexible (e.g.  use the
different HPET channels per CPU)

[akpm@osdl.org: alpha build fix]
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Thomas Gleixner
2007-02-16 01:27:25 -08:00
committed by Linus Torvalds
parent 950f4427c2
commit 771ee3b04e
3 changed files with 51 additions and 21 deletions

View File

@@ -238,11 +238,21 @@ static inline void set_pending_irq(unsigned int irq, cpumask_t mask)
#endif /* CONFIG_GENERIC_PENDING_IRQ */
extern int irq_set_affinity(unsigned int irq, cpumask_t cpumask);
extern int irq_can_set_affinity(unsigned int irq);
#else /* CONFIG_SMP */
#define move_native_irq(x)
#define move_masked_irq(x)
static inline int irq_set_affinity(unsigned int irq, cpumask_t cpumask)
{
return -EINVAL;
}
static inline int irq_can_set_affinity(unsigned int irq) { return 0; }
#endif /* CONFIG_SMP */
#ifdef CONFIG_IRQBALANCE