aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irq.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2007-02-16 04:27:25 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-16 11:13:56 -0500
commit771ee3b04eaac6184312825eb600b4c598f027a5 (patch)
treef0db1cca6b9849855c1d2fd6a16828084311e03c /include/linux/irq.h
parent950f4427c2ddc921164088a20f01304cf231437c (diff)
[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>
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r--include/linux/irq.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 8930fb0ac9c7..29f715e71bdd 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -238,11 +238,21 @@ static inline void set_pending_irq(unsigned int irq, cpumask_t mask)
238 238
239#endif /* CONFIG_GENERIC_PENDING_IRQ */ 239#endif /* CONFIG_GENERIC_PENDING_IRQ */
240 240
241extern int irq_set_affinity(unsigned int irq, cpumask_t cpumask);
242extern int irq_can_set_affinity(unsigned int irq);
243
241#else /* CONFIG_SMP */ 244#else /* CONFIG_SMP */
242 245
243#define move_native_irq(x) 246#define move_native_irq(x)
244#define move_masked_irq(x) 247#define move_masked_irq(x)
245 248
249static inline int irq_set_affinity(unsigned int irq, cpumask_t cpumask)
250{
251 return -EINVAL;
252}
253
254static inline int irq_can_set_affinity(unsigned int irq) { return 0; }
255
246#endif /* CONFIG_SMP */ 256#endif /* CONFIG_SMP */
247 257
248#ifdef CONFIG_IRQBALANCE 258#ifdef CONFIG_IRQBALANCE