diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-18 14:25:40 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-18 14:25:40 -0800 |
commit | 62ae144f56b61f541193df4a6465c06ee7eb9096 (patch) | |
tree | 913cc058b162c48e6c72d2b016b9e44201b16cee /drivers/parisc/iosapic.c | |
parent | bcd039b230f738243193ef7dbb03298d967b8370 (diff) | |
parent | 2161558fa5bebfeb272493ae91e836b497029023 (diff) | |
download | kernel_goldelico_gta04-62ae144f56b61f541193df4a6465c06ee7eb9096.zip kernel_goldelico_gta04-62ae144f56b61f541193df4a6465c06ee7eb9096.tar.gz kernel_goldelico_gta04-62ae144f56b61f541193df4a6465c06ee7eb9096.tar.bz2 |
Merge branch 'parisc' of master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
Diffstat (limited to 'drivers/parisc/iosapic.c')
-rw-r--r-- | drivers/parisc/iosapic.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c index a39fbfe..19657ef 100644 --- a/drivers/parisc/iosapic.c +++ b/drivers/parisc/iosapic.c @@ -700,6 +700,28 @@ static unsigned int iosapic_startup_irq(unsigned int irq) return 0; } +#ifdef CONFIG_SMP +static void iosapic_set_affinity_irq(unsigned int irq, cpumask_t dest) +{ + struct vector_info *vi = iosapic_get_vector(irq); + u32 d0, d1, dummy_d0; + unsigned long flags; + + if (cpu_check_affinity(irq, &dest)) + return; + + vi->txn_addr = txn_affinity_addr(irq, first_cpu(dest)); + + spin_lock_irqsave(&iosapic_lock, flags); + /* d1 contains the destination CPU, so only want to set that + * entry */ + iosapic_rd_irt_entry(vi, &d0, &d1); + iosapic_set_irt_data(vi, &dummy_d0, &d1); + iosapic_wr_irt_entry(vi, d0, d1); + spin_unlock_irqrestore(&iosapic_lock, flags); +} +#endif + static struct hw_interrupt_type iosapic_interrupt_type = { .typename = "IO-SAPIC-level", .startup = iosapic_startup_irq, @@ -708,7 +730,9 @@ static struct hw_interrupt_type iosapic_interrupt_type = { .disable = iosapic_disable_irq, .ack = no_ack_irq, .end = iosapic_end_irq, -// .set_affinity = iosapic_set_affinity_irq, +#ifdef CONFIG_SMP + .set_affinity = iosapic_set_affinity_irq, +#endif }; int iosapic_fixup_irq(void *isi_obj, struct pci_dev *pcidev) |