diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2007-02-16 01:27:25 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-16 08:13:56 -0800 |
commit | 771ee3b04eaac6184312825eb600b4c598f027a5 (patch) | |
tree | f0db1cca6b9849855c1d2fd6a16828084311e03c /include/linux/irq.h | |
parent | 950f4427c2ddc921164088a20f01304cf231437c (diff) | |
download | kernel_goldelico_gta04-771ee3b04eaac6184312825eb600b4c598f027a5.zip kernel_goldelico_gta04-771ee3b04eaac6184312825eb600b4c598f027a5.tar.gz kernel_goldelico_gta04-771ee3b04eaac6184312825eb600b4c598f027a5.tar.bz2 |
[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.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 8930fb0..29f715e 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) #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 |