diff options
author | Max Krasnyansky <maxk@qualcomm.com> | 2008-05-29 14:02:52 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-06-05 09:18:30 -0400 |
commit | 18404756765c713a0be4eb1082920c04822ce588 (patch) | |
tree | ed426f8fe90bff1ffd854074a2e4b370dd6821f8 /arch | |
parent | c3b25b32e8bef526cca748e1ba023c6bdd705a99 (diff) |
genirq: Expose default irq affinity mask (take 3)
Current IRQ affinity interface does not provide a way to set affinity
for the IRQs that will be allocated/activated in the future.
This patch creates /proc/irq/default_smp_affinity that lets users set
default affinity mask for the newly allocated IRQs. Changing the default
does not affect affinity masks for the currently active IRQs, they
have to be changed explicitly.
Updated based on Paul J's comments and added some more documentation.
Signed-off-by: Max Krasnyansky <maxk@qualcomm.com>
Cc: pj@sgi.com
Cc: a.p.zijlstra@chello.nl
Cc: tglx@linutronix.de
Cc: rdunlap@xenotime.net
Cc: mingo@elte.hu
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/alpha/kernel/irq.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c index facf82a5499a..c626a821cdcb 100644 --- a/arch/alpha/kernel/irq.c +++ b/arch/alpha/kernel/irq.c | |||
@@ -42,8 +42,7 @@ void ack_bad_irq(unsigned int irq) | |||
42 | #ifdef CONFIG_SMP | 42 | #ifdef CONFIG_SMP |
43 | static char irq_user_affinity[NR_IRQS]; | 43 | static char irq_user_affinity[NR_IRQS]; |
44 | 44 | ||
45 | int | 45 | int irq_select_affinity(unsigned int irq) |
46 | select_smp_affinity(unsigned int irq) | ||
47 | { | 46 | { |
48 | static int last_cpu; | 47 | static int last_cpu; |
49 | int cpu = last_cpu + 1; | 48 | int cpu = last_cpu + 1; |
@@ -51,7 +50,7 @@ select_smp_affinity(unsigned int irq) | |||
51 | if (!irq_desc[irq].chip->set_affinity || irq_user_affinity[irq]) | 50 | if (!irq_desc[irq].chip->set_affinity || irq_user_affinity[irq]) |
52 | return 1; | 51 | return 1; |
53 | 52 | ||
54 | while (!cpu_possible(cpu)) | 53 | while (!cpu_possible(cpu) || !cpu_isset(cpu, irq_default_affinity)) |
55 | cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0); | 54 | cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0); |
56 | last_cpu = cpu; | 55 | last_cpu = cpu; |
57 | 56 | ||