diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/pci_irq.c | 5 | ||||
-rw-r--r-- | drivers/char/hpet.c | 4 | ||||
-rw-r--r-- | drivers/parisc/iosapic.c | 6 | ||||
-rw-r--r-- | drivers/pci/hotplug/ibmphp_core.c | 56 | ||||
-rw-r--r-- | drivers/pci/htirq.c | 4 | ||||
-rw-r--r-- | drivers/pci/intr_remapping.c | 15 | ||||
-rw-r--r-- | drivers/pnp/pnpacpi/rsparser.c | 2 | ||||
-rw-r--r-- | drivers/xen/events.c | 14 |
8 files changed, 57 insertions, 49 deletions
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index 51b9f8280f88..2faa9e2ac893 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c | |||
@@ -401,7 +401,8 @@ int acpi_pci_irq_enable(struct pci_dev *dev) | |||
401 | /* Interrupt Line values above 0xF are forbidden */ | 401 | /* Interrupt Line values above 0xF are forbidden */ |
402 | if (dev->irq > 0 && (dev->irq <= 0xF)) { | 402 | if (dev->irq > 0 && (dev->irq <= 0xF)) { |
403 | printk(" - using IRQ %d\n", dev->irq); | 403 | printk(" - using IRQ %d\n", dev->irq); |
404 | acpi_register_gsi(dev->irq, ACPI_LEVEL_SENSITIVE, | 404 | acpi_register_gsi(&dev->dev, dev->irq, |
405 | ACPI_LEVEL_SENSITIVE, | ||
405 | ACPI_ACTIVE_LOW); | 406 | ACPI_ACTIVE_LOW); |
406 | return 0; | 407 | return 0; |
407 | } else { | 408 | } else { |
@@ -410,7 +411,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev) | |||
410 | } | 411 | } |
411 | } | 412 | } |
412 | 413 | ||
413 | rc = acpi_register_gsi(gsi, triggering, polarity); | 414 | rc = acpi_register_gsi(&dev->dev, gsi, triggering, polarity); |
414 | if (rc < 0) { | 415 | if (rc < 0) { |
415 | dev_warn(&dev->dev, "PCI INT %c: failed to register GSI\n", | 416 | dev_warn(&dev->dev, "PCI INT %c: failed to register GSI\n", |
416 | pin_name(pin)); | 417 | pin_name(pin)); |
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 340ba4f9dc54..4a9f3492b921 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c | |||
@@ -224,7 +224,7 @@ static void hpet_timer_set_irq(struct hpet_dev *devp) | |||
224 | break; | 224 | break; |
225 | } | 225 | } |
226 | 226 | ||
227 | gsi = acpi_register_gsi(irq, ACPI_LEVEL_SENSITIVE, | 227 | gsi = acpi_register_gsi(NULL, irq, ACPI_LEVEL_SENSITIVE, |
228 | ACPI_ACTIVE_LOW); | 228 | ACPI_ACTIVE_LOW); |
229 | if (gsi > 0) | 229 | if (gsi > 0) |
230 | break; | 230 | break; |
@@ -939,7 +939,7 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data) | |||
939 | irqp = &res->data.extended_irq; | 939 | irqp = &res->data.extended_irq; |
940 | 940 | ||
941 | for (i = 0; i < irqp->interrupt_count; i++) { | 941 | for (i = 0; i < irqp->interrupt_count; i++) { |
942 | irq = acpi_register_gsi(irqp->interrupts[i], | 942 | irq = acpi_register_gsi(NULL, irqp->interrupts[i], |
943 | irqp->triggering, irqp->polarity); | 943 | irqp->triggering, irqp->polarity); |
944 | if (irq < 0) | 944 | if (irq < 0) |
945 | return AE_ERROR; | 945 | return AE_ERROR; |
diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c index 73348c4047e9..4a9cc92d4d18 100644 --- a/drivers/parisc/iosapic.c +++ b/drivers/parisc/iosapic.c | |||
@@ -702,7 +702,7 @@ static unsigned int iosapic_startup_irq(unsigned int irq) | |||
702 | } | 702 | } |
703 | 703 | ||
704 | #ifdef CONFIG_SMP | 704 | #ifdef CONFIG_SMP |
705 | static void iosapic_set_affinity_irq(unsigned int irq, | 705 | static int iosapic_set_affinity_irq(unsigned int irq, |
706 | const struct cpumask *dest) | 706 | const struct cpumask *dest) |
707 | { | 707 | { |
708 | struct vector_info *vi = iosapic_get_vector(irq); | 708 | struct vector_info *vi = iosapic_get_vector(irq); |
@@ -712,7 +712,7 @@ static void iosapic_set_affinity_irq(unsigned int irq, | |||
712 | 712 | ||
713 | dest_cpu = cpu_check_affinity(irq, dest); | 713 | dest_cpu = cpu_check_affinity(irq, dest); |
714 | if (dest_cpu < 0) | 714 | if (dest_cpu < 0) |
715 | return; | 715 | return -1; |
716 | 716 | ||
717 | cpumask_copy(irq_desc[irq].affinity, cpumask_of(dest_cpu)); | 717 | cpumask_copy(irq_desc[irq].affinity, cpumask_of(dest_cpu)); |
718 | vi->txn_addr = txn_affinity_addr(irq, dest_cpu); | 718 | vi->txn_addr = txn_affinity_addr(irq, dest_cpu); |
@@ -724,6 +724,8 @@ static void iosapic_set_affinity_irq(unsigned int irq, | |||
724 | iosapic_set_irt_data(vi, &dummy_d0, &d1); | 724 | iosapic_set_irt_data(vi, &dummy_d0, &d1); |
725 | iosapic_wr_irt_entry(vi, d0, d1); | 725 | iosapic_wr_irt_entry(vi, d0, d1); |
726 | spin_unlock_irqrestore(&iosapic_lock, flags); | 726 | spin_unlock_irqrestore(&iosapic_lock, flags); |
727 | |||
728 | return 0; | ||
727 | } | 729 | } |
728 | #endif | 730 | #endif |
729 | 731 | ||
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c index dd18f857dfb0..ef53b05a411a 100644 --- a/drivers/pci/hotplug/ibmphp_core.c +++ b/drivers/pci/hotplug/ibmphp_core.c | |||
@@ -153,45 +153,49 @@ int ibmphp_init_devno(struct slot **cur_slot) | |||
153 | return -1; | 153 | return -1; |
154 | } | 154 | } |
155 | for (loop = 0; loop < len; loop++) { | 155 | for (loop = 0; loop < len; loop++) { |
156 | if ((*cur_slot)->number == rtable->slots[loop].slot) { | 156 | if ((*cur_slot)->number == rtable->slots[loop].slot && |
157 | if ((*cur_slot)->bus == rtable->slots[loop].bus) { | 157 | (*cur_slot)->bus == rtable->slots[loop].bus) { |
158 | int ioapic = -1, ioapic_pin = -1; | ||
159 | int triggering, polarity; | ||
160 | |||
158 | (*cur_slot)->device = PCI_SLOT(rtable->slots[loop].devfn); | 161 | (*cur_slot)->device = PCI_SLOT(rtable->slots[loop].devfn); |
159 | for (i = 0; i < 4; i++) | 162 | for (i = 0; i < 4; i++) |
160 | (*cur_slot)->irq[i] = IO_APIC_get_PCI_irq_vector((int) (*cur_slot)->bus, | 163 | (*cur_slot)->irq[i] = IO_APIC_get_PCI_irq_vector((int) (*cur_slot)->bus, |
161 | (int) (*cur_slot)->device, i); | 164 | (int) (*cur_slot)->device, i. |
162 | 165 | &ioapic, &ioapic_pin, | |
163 | debug("(*cur_slot)->irq[0] = %x\n", | 166 | &triggering, &polarity); |
164 | (*cur_slot)->irq[0]); | 167 | |
165 | debug("(*cur_slot)->irq[1] = %x\n", | 168 | debug("(*cur_slot)->irq[0] = %x\n", |
166 | (*cur_slot)->irq[1]); | 169 | (*cur_slot)->irq[0]); |
167 | debug("(*cur_slot)->irq[2] = %x\n", | 170 | debug("(*cur_slot)->irq[1] = %x\n", |
168 | (*cur_slot)->irq[2]); | 171 | (*cur_slot)->irq[1]); |
169 | debug("(*cur_slot)->irq[3] = %x\n", | 172 | debug("(*cur_slot)->irq[2] = %x\n", |
170 | (*cur_slot)->irq[3]); | 173 | (*cur_slot)->irq[2]); |
171 | 174 | debug("(*cur_slot)->irq[3] = %x\n", | |
172 | debug("rtable->exlusive_irqs = %x\n", | 175 | (*cur_slot)->irq[3]); |
176 | |||
177 | debug("rtable->exlusive_irqs = %x\n", | ||
173 | rtable->exclusive_irqs); | 178 | rtable->exclusive_irqs); |
174 | debug("rtable->slots[loop].irq[0].bitmap = %x\n", | 179 | debug("rtable->slots[loop].irq[0].bitmap = %x\n", |
175 | rtable->slots[loop].irq[0].bitmap); | 180 | rtable->slots[loop].irq[0].bitmap); |
176 | debug("rtable->slots[loop].irq[1].bitmap = %x\n", | 181 | debug("rtable->slots[loop].irq[1].bitmap = %x\n", |
177 | rtable->slots[loop].irq[1].bitmap); | 182 | rtable->slots[loop].irq[1].bitmap); |
178 | debug("rtable->slots[loop].irq[2].bitmap = %x\n", | 183 | debug("rtable->slots[loop].irq[2].bitmap = %x\n", |
179 | rtable->slots[loop].irq[2].bitmap); | 184 | rtable->slots[loop].irq[2].bitmap); |
180 | debug("rtable->slots[loop].irq[3].bitmap = %x\n", | 185 | debug("rtable->slots[loop].irq[3].bitmap = %x\n", |
181 | rtable->slots[loop].irq[3].bitmap); | 186 | rtable->slots[loop].irq[3].bitmap); |
182 | 187 | ||
183 | debug("rtable->slots[loop].irq[0].link = %x\n", | 188 | debug("rtable->slots[loop].irq[0].link = %x\n", |
184 | rtable->slots[loop].irq[0].link); | 189 | rtable->slots[loop].irq[0].link); |
185 | debug("rtable->slots[loop].irq[1].link = %x\n", | 190 | debug("rtable->slots[loop].irq[1].link = %x\n", |
186 | rtable->slots[loop].irq[1].link); | 191 | rtable->slots[loop].irq[1].link); |
187 | debug("rtable->slots[loop].irq[2].link = %x\n", | 192 | debug("rtable->slots[loop].irq[2].link = %x\n", |
188 | rtable->slots[loop].irq[2].link); | 193 | rtable->slots[loop].irq[2].link); |
189 | debug("rtable->slots[loop].irq[3].link = %x\n", | 194 | debug("rtable->slots[loop].irq[3].link = %x\n", |
190 | rtable->slots[loop].irq[3].link); | 195 | rtable->slots[loop].irq[3].link); |
191 | debug("end of init_devno\n"); | 196 | debug("end of init_devno\n"); |
192 | kfree(rtable); | 197 | kfree(rtable); |
193 | return 0; | 198 | return 0; |
194 | } | ||
195 | } | 199 | } |
196 | } | 200 | } |
197 | 201 | ||
diff --git a/drivers/pci/htirq.c b/drivers/pci/htirq.c index 6808d8333ecc..737a1c44b07a 100644 --- a/drivers/pci/htirq.c +++ b/drivers/pci/htirq.c | |||
@@ -98,6 +98,7 @@ int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update) | |||
98 | int max_irq; | 98 | int max_irq; |
99 | int pos; | 99 | int pos; |
100 | int irq; | 100 | int irq; |
101 | int node; | ||
101 | 102 | ||
102 | pos = pci_find_ht_capability(dev, HT_CAPTYPE_IRQ); | 103 | pos = pci_find_ht_capability(dev, HT_CAPTYPE_IRQ); |
103 | if (!pos) | 104 | if (!pos) |
@@ -125,7 +126,8 @@ int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update) | |||
125 | cfg->msg.address_lo = 0xffffffff; | 126 | cfg->msg.address_lo = 0xffffffff; |
126 | cfg->msg.address_hi = 0xffffffff; | 127 | cfg->msg.address_hi = 0xffffffff; |
127 | 128 | ||
128 | irq = create_irq(); | 129 | node = dev_to_node(&dev->dev); |
130 | irq = create_irq_nr(0, node); | ||
129 | 131 | ||
130 | if (irq <= 0) { | 132 | if (irq <= 0) { |
131 | kfree(cfg); | 133 | kfree(cfg); |
diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c index 842039e4955b..3a0cb0bb0593 100644 --- a/drivers/pci/intr_remapping.c +++ b/drivers/pci/intr_remapping.c | |||
@@ -31,15 +31,12 @@ struct irq_2_iommu { | |||
31 | }; | 31 | }; |
32 | 32 | ||
33 | #ifdef CONFIG_GENERIC_HARDIRQS | 33 | #ifdef CONFIG_GENERIC_HARDIRQS |
34 | static struct irq_2_iommu *get_one_free_irq_2_iommu(int cpu) | 34 | static struct irq_2_iommu *get_one_free_irq_2_iommu(int node) |
35 | { | 35 | { |
36 | struct irq_2_iommu *iommu; | 36 | struct irq_2_iommu *iommu; |
37 | int node; | ||
38 | |||
39 | node = cpu_to_node(cpu); | ||
40 | 37 | ||
41 | iommu = kzalloc_node(sizeof(*iommu), GFP_ATOMIC, node); | 38 | iommu = kzalloc_node(sizeof(*iommu), GFP_ATOMIC, node); |
42 | printk(KERN_DEBUG "alloc irq_2_iommu on cpu %d node %d\n", cpu, node); | 39 | printk(KERN_DEBUG "alloc irq_2_iommu on node %d\n", node); |
43 | 40 | ||
44 | return iommu; | 41 | return iommu; |
45 | } | 42 | } |
@@ -56,7 +53,7 @@ static struct irq_2_iommu *irq_2_iommu(unsigned int irq) | |||
56 | return desc->irq_2_iommu; | 53 | return desc->irq_2_iommu; |
57 | } | 54 | } |
58 | 55 | ||
59 | static struct irq_2_iommu *irq_2_iommu_alloc_cpu(unsigned int irq, int cpu) | 56 | static struct irq_2_iommu *irq_2_iommu_alloc_node(unsigned int irq, int node) |
60 | { | 57 | { |
61 | struct irq_desc *desc; | 58 | struct irq_desc *desc; |
62 | struct irq_2_iommu *irq_iommu; | 59 | struct irq_2_iommu *irq_iommu; |
@@ -64,7 +61,7 @@ static struct irq_2_iommu *irq_2_iommu_alloc_cpu(unsigned int irq, int cpu) | |||
64 | /* | 61 | /* |
65 | * alloc irq desc if not allocated already. | 62 | * alloc irq desc if not allocated already. |
66 | */ | 63 | */ |
67 | desc = irq_to_desc_alloc_cpu(irq, cpu); | 64 | desc = irq_to_desc_alloc_node(irq, node); |
68 | if (!desc) { | 65 | if (!desc) { |
69 | printk(KERN_INFO "can not get irq_desc for %d\n", irq); | 66 | printk(KERN_INFO "can not get irq_desc for %d\n", irq); |
70 | return NULL; | 67 | return NULL; |
@@ -73,14 +70,14 @@ static struct irq_2_iommu *irq_2_iommu_alloc_cpu(unsigned int irq, int cpu) | |||
73 | irq_iommu = desc->irq_2_iommu; | 70 | irq_iommu = desc->irq_2_iommu; |
74 | 71 | ||
75 | if (!irq_iommu) | 72 | if (!irq_iommu) |
76 | desc->irq_2_iommu = get_one_free_irq_2_iommu(cpu); | 73 | desc->irq_2_iommu = get_one_free_irq_2_iommu(node); |
77 | 74 | ||
78 | return desc->irq_2_iommu; | 75 | return desc->irq_2_iommu; |
79 | } | 76 | } |
80 | 77 | ||
81 | static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq) | 78 | static struct irq_2_iommu *irq_2_iommu_alloc(unsigned int irq) |
82 | { | 79 | { |
83 | return irq_2_iommu_alloc_cpu(irq, boot_cpu_id); | 80 | return irq_2_iommu_alloc_node(irq, cpu_to_node(boot_cpu_id)); |
84 | } | 81 | } |
85 | 82 | ||
86 | #else /* !CONFIG_SPARSE_IRQ */ | 83 | #else /* !CONFIG_SPARSE_IRQ */ |
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index adf17856bacc..7f207f335bec 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c | |||
@@ -123,7 +123,7 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_dev *dev, | |||
123 | } | 123 | } |
124 | 124 | ||
125 | flags = irq_flags(triggering, polarity, shareable); | 125 | flags = irq_flags(triggering, polarity, shareable); |
126 | irq = acpi_register_gsi(gsi, triggering, polarity); | 126 | irq = acpi_register_gsi(&dev->dev, gsi, triggering, polarity); |
127 | if (irq >= 0) | 127 | if (irq >= 0) |
128 | pcibios_penalize_isa_irq(irq, 1); | 128 | pcibios_penalize_isa_irq(irq, 1); |
129 | else | 129 | else |
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 30963af5dba0..be437c2bc942 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
@@ -335,7 +335,7 @@ static int find_unbound_irq(void) | |||
335 | if (irq == nr_irqs) | 335 | if (irq == nr_irqs) |
336 | panic("No available IRQ to bind to: increase nr_irqs!\n"); | 336 | panic("No available IRQ to bind to: increase nr_irqs!\n"); |
337 | 337 | ||
338 | desc = irq_to_desc_alloc_cpu(irq, 0); | 338 | desc = irq_to_desc_alloc_node(irq, 0); |
339 | if (WARN_ON(desc == NULL)) | 339 | if (WARN_ON(desc == NULL)) |
340 | return -1; | 340 | return -1; |
341 | 341 | ||
@@ -688,13 +688,13 @@ void rebind_evtchn_irq(int evtchn, int irq) | |||
688 | } | 688 | } |
689 | 689 | ||
690 | /* Rebind an evtchn so that it gets delivered to a specific cpu */ | 690 | /* Rebind an evtchn so that it gets delivered to a specific cpu */ |
691 | static void rebind_irq_to_cpu(unsigned irq, unsigned tcpu) | 691 | static int rebind_irq_to_cpu(unsigned irq, unsigned tcpu) |
692 | { | 692 | { |
693 | struct evtchn_bind_vcpu bind_vcpu; | 693 | struct evtchn_bind_vcpu bind_vcpu; |
694 | int evtchn = evtchn_from_irq(irq); | 694 | int evtchn = evtchn_from_irq(irq); |
695 | 695 | ||
696 | if (!VALID_EVTCHN(evtchn)) | 696 | if (!VALID_EVTCHN(evtchn)) |
697 | return; | 697 | return -1; |
698 | 698 | ||
699 | /* Send future instances of this interrupt to other vcpu. */ | 699 | /* Send future instances of this interrupt to other vcpu. */ |
700 | bind_vcpu.port = evtchn; | 700 | bind_vcpu.port = evtchn; |
@@ -707,13 +707,15 @@ static void rebind_irq_to_cpu(unsigned irq, unsigned tcpu) | |||
707 | */ | 707 | */ |
708 | if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) >= 0) | 708 | if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_vcpu, &bind_vcpu) >= 0) |
709 | bind_evtchn_to_cpu(evtchn, tcpu); | 709 | bind_evtchn_to_cpu(evtchn, tcpu); |
710 | } | ||
711 | 710 | ||
711 | return 0; | ||
712 | } | ||
712 | 713 | ||
713 | static void set_affinity_irq(unsigned irq, const struct cpumask *dest) | 714 | static int set_affinity_irq(unsigned irq, const struct cpumask *dest) |
714 | { | 715 | { |
715 | unsigned tcpu = cpumask_first(dest); | 716 | unsigned tcpu = cpumask_first(dest); |
716 | rebind_irq_to_cpu(irq, tcpu); | 717 | |
718 | return rebind_irq_to_cpu(irq, tcpu); | ||
717 | } | 719 | } |
718 | 720 | ||
719 | int resend_irq_on_evtchn(unsigned int irq) | 721 | int resend_irq_on_evtchn(unsigned int irq) |