mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
[PATCH] Alpha: convert to generic irq framework (generic part)
Thanks to Christoph for doing most of the work. This allows automatic SMP IRQ affinity assignment other than default "all interrupts on all CPUs" which is rather expensive. This might be useful if the hardware can be programmed to distribute interrupts among different CPUs, like Alpha does. Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Christoph Hellwig <hch@lst.de> Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
1fa744e6e9
commit
eee45269b0
3 changed files with 16 additions and 1 deletions
|
|
@ -366,6 +366,8 @@ int request_irq(unsigned int irq,
|
|||
action->next = NULL;
|
||||
action->dev_id = dev_id;
|
||||
|
||||
select_smp_affinity(irq);
|
||||
|
||||
retval = setup_irq(irq, action);
|
||||
if (retval)
|
||||
kfree(action);
|
||||
|
|
|
|||
|
|
@ -68,7 +68,9 @@ static int irq_affinity_write_proc(struct file *file, const char __user *buffer,
|
|||
*/
|
||||
cpus_and(tmp, new_value, cpu_online_map);
|
||||
if (cpus_empty(tmp))
|
||||
return -EINVAL;
|
||||
/* Special case for empty set - allow the architecture
|
||||
code to set default SMP affinity. */
|
||||
return select_smp_affinity(irq) ? -EINVAL : full_count;
|
||||
|
||||
proc_set_irq_affinity(irq, new_value);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue