aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/iseries/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/iseries/irq.c')
-rw-r--r--arch/powerpc/platforms/iseries/irq.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c
index 42e978e4897..83442ea7747 100644
--- a/arch/powerpc/platforms/iseries/irq.c
+++ b/arch/powerpc/platforms/iseries/irq.c
@@ -48,6 +48,8 @@
48extern void iSeries_smp_message_recv(struct pt_regs *); 48extern void iSeries_smp_message_recv(struct pt_regs *);
49#endif 49#endif
50 50
51#ifdef CONFIG_PCI
52
51enum pci_event_type { 53enum pci_event_type {
52 pe_bus_created = 0, /* PHB has been created */ 54 pe_bus_created = 0, /* PHB has been created */
53 pe_bus_error = 1, /* PHB has failed */ 55 pe_bus_error = 1, /* PHB has failed */
@@ -147,20 +149,11 @@ static void int_received(struct pci_event *event, struct pt_regs *regs)
147static void pci_event_handler(struct HvLpEvent *event, struct pt_regs *regs) 149static void pci_event_handler(struct HvLpEvent *event, struct pt_regs *regs)
148{ 150{
149 if (event && (event->xType == HvLpEvent_Type_PciIo)) { 151 if (event && (event->xType == HvLpEvent_Type_PciIo)) {
150 switch (event->xFlags.xFunction) { 152 if (hvlpevent_is_int(event))
151 case HvLpEvent_Function_Int:
152 int_received((struct pci_event *)event, regs); 153 int_received((struct pci_event *)event, regs);
153 break; 154 else
154 case HvLpEvent_Function_Ack:
155 printk(KERN_ERR 155 printk(KERN_ERR
156 "pci_event_handler: unexpected ack received\n"); 156 "pci_event_handler: unexpected ack received\n");
157 break;
158 default:
159 printk(KERN_ERR
160 "pci_event_handler: unexpected event function %d\n",
161 (int)event->xFlags.xFunction);
162 break;
163 }
164 } else if (event) 157 } else if (event)
165 printk(KERN_ERR 158 printk(KERN_ERR
166 "pci_event_handler: Unrecognized PCI event type 0x%x\n", 159 "pci_event_handler: Unrecognized PCI event type 0x%x\n",
@@ -334,6 +327,8 @@ int __init iSeries_allocate_IRQ(HvBusNumber bus,
334 return virtirq; 327 return virtirq;
335} 328}
336 329
330#endif /* CONFIG_PCI */
331
337/* 332/*
338 * Get the next pending IRQ. 333 * Get the next pending IRQ.
339 */ 334 */
@@ -353,6 +348,7 @@ int iSeries_get_irq(struct pt_regs *regs)
353 if (hvlpevent_is_pending()) 348 if (hvlpevent_is_pending())
354 process_hvlpevents(regs); 349 process_hvlpevents(regs);
355 350
351#ifdef CONFIG_PCI
356 if (num_pending_irqs) { 352 if (num_pending_irqs) {
357 spin_lock(&pending_irqs_lock); 353 spin_lock(&pending_irqs_lock);
358 for (irq = 0; irq < NR_IRQS; irq++) { 354 for (irq = 0; irq < NR_IRQS; irq++) {
@@ -366,6 +362,7 @@ int iSeries_get_irq(struct pt_regs *regs)
366 if (irq >= NR_IRQS) 362 if (irq >= NR_IRQS)
367 irq = -2; 363 irq = -2;
368 } 364 }
365#endif
369 366
370 return irq; 367 return irq;
371} 368}