blob: e32446877e78a2edc46e7e36d7da3574d220a084 [file] [log] [blame]
Stephen Rothwell0c3b4f12005-06-21 17:15:49 -07001/*
2 * This module supports the iSeries PCI bus interrupt handling
3 * Copyright (C) 20yy <Robert L Holtorf> <IBM Corp>
Stephen Rothwell89ef68f2005-06-21 17:15:50 -07004 * Copyright (C) 2004-2005 IBM Corporation
Stephen Rothwell0c3b4f12005-06-21 17:15:49 -07005 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the:
18 * Free Software Foundation, Inc.,
19 * 59 Temple Place, Suite 330,
20 * Boston, MA 02111-1307 USA
21 *
22 * Change Activity:
23 * Created, December 13, 2000 by Wayne Holm
24 * End Change Activity
25 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070026#include <linux/pci.h>
27#include <linux/init.h>
28#include <linux/threads.h>
29#include <linux/smp.h>
30#include <linux/param.h>
31#include <linux/string.h>
32#include <linux/bootmem.h>
33#include <linux/ide.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070034#include <linux/irq.h>
35#include <linux/spinlock.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070036
Stephen Rothwelle1995002005-11-16 18:53:29 +110037#include <asm/paca.h>
Kelly Daly1ec65d72005-11-02 13:46:07 +110038#include <asm/iseries/hv_types.h>
Kelly Dalye45423e2005-11-02 12:08:31 +110039#include <asm/iseries/hv_lp_event.h>
Kelly Daly8021b8a2005-11-02 11:41:12 +110040#include <asm/iseries/hv_call_xm.h>
Stephen Rothwelle1995002005-11-16 18:53:29 +110041#include <asm/iseries/it_lp_queue.h>
Stephen Rothwellb08567cb2005-09-28 23:37:01 +100042
43#include "irq.h"
Stephen Rothwell0d177df2006-05-19 16:46:28 +100044#include "pci.h"
Stephen Rothwellc6d2ea92005-10-14 17:16:17 +100045#include "call_pci.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070046
Stephen Rothwelle1995002005-11-16 18:53:29 +110047#if defined(CONFIG_SMP)
48extern void iSeries_smp_message_recv(struct pt_regs *);
49#endif
50
Stephen Rothwellee2cdec2006-01-12 13:54:20 +110051#ifdef CONFIG_PCI
52
Stephen Rothwell60798c6a2005-11-16 17:47:43 +110053enum pci_event_type {
54 pe_bus_created = 0, /* PHB has been created */
55 pe_bus_error = 1, /* PHB has failed */
56 pe_bus_failed = 2, /* Msg to Secondary, Primary failed bus */
57 pe_node_failed = 4, /* Multi-adapter bridge has failed */
58 pe_node_recovered = 5, /* Multi-adapter bridge has recovered */
59 pe_bus_recovered = 12, /* PHB has been recovered */
60 pe_unquiese_bus = 18, /* Secondary bus unqiescing */
61 pe_bridge_error = 21, /* Bridge Error */
62 pe_slot_interrupt = 22 /* Slot interrupt */
Stephen Rothwell89ef68f2005-06-21 17:15:50 -070063};
64
Stephen Rothwell60798c6a2005-11-16 17:47:43 +110065struct pci_event {
66 struct HvLpEvent event;
Stephen Rothwell89ef68f2005-06-21 17:15:50 -070067 union {
Stephen Rothwell60798c6a2005-11-16 17:47:43 +110068 u64 __align; /* Align on an 8-byte boundary */
Stephen Rothwell89ef68f2005-06-21 17:15:50 -070069 struct {
70 u32 fisr;
Stephen Rothwell60798c6a2005-11-16 17:47:43 +110071 HvBusNumber bus_number;
72 HvSubBusNumber sub_bus_number;
73 HvAgentId dev_id;
74 } slot;
75 struct {
76 HvBusNumber bus_number;
77 HvSubBusNumber sub_bus_number;
78 } bus;
79 struct {
80 HvBusNumber bus_number;
81 HvSubBusNumber sub_bus_number;
82 HvAgentId dev_id;
83 } node;
84 } data;
Stephen Rothwell89ef68f2005-06-21 17:15:50 -070085};
86
Stephen Rothwell1d7a6b92005-11-17 18:04:37 +110087static DEFINE_SPINLOCK(pending_irqs_lock);
88static int num_pending_irqs;
89static int pending_irqs[NR_IRQS];
90
Stephen Rothwell60798c6a2005-11-16 17:47:43 +110091static void int_received(struct pci_event *event, struct pt_regs *regs)
Stephen Rothwell89ef68f2005-06-21 17:15:50 -070092{
93 int irq;
94
Stephen Rothwell60798c6a2005-11-16 17:47:43 +110095 switch (event->event.xSubtype) {
96 case pe_slot_interrupt:
97 irq = event->event.xCorrelationToken;
Stephen Rothwell1d7a6b92005-11-17 18:04:37 +110098 if (irq < NR_IRQS) {
99 spin_lock(&pending_irqs_lock);
100 pending_irqs[irq]++;
101 num_pending_irqs++;
102 spin_unlock(&pending_irqs_lock);
103 } else {
104 printk(KERN_WARNING "int_received: bad irq number %d\n",
105 irq);
106 HvCallPci_eoi(event->data.slot.bus_number,
107 event->data.slot.sub_bus_number,
108 event->data.slot.dev_id);
109 }
Stephen Rothwell89ef68f2005-06-21 17:15:50 -0700110 break;
111 /* Ignore error recovery events for now */
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100112 case pe_bus_created:
113 printk(KERN_INFO "int_received: system bus %d created\n",
114 event->data.bus.bus_number);
Stephen Rothwell89ef68f2005-06-21 17:15:50 -0700115 break;
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100116 case pe_bus_error:
117 case pe_bus_failed:
118 printk(KERN_INFO "int_received: system bus %d failed\n",
119 event->data.bus.bus_number);
Stephen Rothwell89ef68f2005-06-21 17:15:50 -0700120 break;
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100121 case pe_bus_recovered:
122 case pe_unquiese_bus:
123 printk(KERN_INFO "int_received: system bus %d recovered\n",
124 event->data.bus.bus_number);
Stephen Rothwell89ef68f2005-06-21 17:15:50 -0700125 break;
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100126 case pe_node_failed:
127 case pe_bridge_error:
Stephen Rothwell89ef68f2005-06-21 17:15:50 -0700128 printk(KERN_INFO
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100129 "int_received: multi-adapter bridge %d/%d/%d failed\n",
130 event->data.node.bus_number,
131 event->data.node.sub_bus_number,
132 event->data.node.dev_id);
Stephen Rothwell89ef68f2005-06-21 17:15:50 -0700133 break;
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100134 case pe_node_recovered:
Stephen Rothwell89ef68f2005-06-21 17:15:50 -0700135 printk(KERN_INFO
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100136 "int_received: multi-adapter bridge %d/%d/%d recovered\n",
137 event->data.node.bus_number,
138 event->data.node.sub_bus_number,
139 event->data.node.dev_id);
Stephen Rothwell89ef68f2005-06-21 17:15:50 -0700140 break;
141 default:
142 printk(KERN_ERR
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100143 "int_received: unrecognized event subtype 0x%x\n",
144 event->event.xSubtype);
Stephen Rothwell89ef68f2005-06-21 17:15:50 -0700145 break;
146 }
147}
148
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100149static void pci_event_handler(struct HvLpEvent *event, struct pt_regs *regs)
Stephen Rothwell89ef68f2005-06-21 17:15:50 -0700150{
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100151 if (event && (event->xType == HvLpEvent_Type_PciIo)) {
Stephen Rothwell677f8c02006-01-12 13:47:43 +1100152 if (hvlpevent_is_int(event))
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100153 int_received((struct pci_event *)event, regs);
Stephen Rothwell677f8c02006-01-12 13:47:43 +1100154 else
Stephen Rothwell89ef68f2005-06-21 17:15:50 -0700155 printk(KERN_ERR
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100156 "pci_event_handler: unexpected ack received\n");
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100157 } else if (event)
Stephen Rothwell89ef68f2005-06-21 17:15:50 -0700158 printk(KERN_ERR
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100159 "pci_event_handler: Unrecognized PCI event type 0x%x\n",
160 (int)event->xType);
Stephen Rothwell89ef68f2005-06-21 17:15:50 -0700161 else
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100162 printk(KERN_ERR "pci_event_handler: NULL event received\n");
Stephen Rothwell89ef68f2005-06-21 17:15:50 -0700163}
164
Stephen Rothwell853f8282005-11-16 18:10:40 +1100165#define REAL_IRQ_TO_SUBBUS(irq) (((irq) >> 14) & 0xff)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700166#define REAL_IRQ_TO_BUS(irq) ((((irq) >> 6) & 0xff) + 1)
167#define REAL_IRQ_TO_IDSEL(irq) ((((irq) >> 3) & 7) + 1)
168#define REAL_IRQ_TO_FUNC(irq) ((irq) & 7)
169
Stephen Rothwell0c3b4f12005-06-21 17:15:49 -0700170/*
171 * This will be called by device drivers (via enable_IRQ)
172 * to enable INTA in the bridge interrupt status register.
173 */
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100174static void iseries_enable_IRQ(unsigned int irq)
Stephen Rothwell0c3b4f12005-06-21 17:15:49 -0700175{
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100176 u32 bus, dev_id, function, mask;
177 const u32 sub_bus = 0;
Benjamin Herrenschmidt0ebfff12006-07-03 21:36:01 +1000178 unsigned int rirq = (unsigned int)irq_map[irq].hwirq;
Stephen Rothwell0c3b4f12005-06-21 17:15:49 -0700179
180 /* The IRQ has already been locked by the caller */
181 bus = REAL_IRQ_TO_BUS(rirq);
182 function = REAL_IRQ_TO_FUNC(rirq);
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100183 dev_id = (REAL_IRQ_TO_IDSEL(rirq) << 4) + function;
Stephen Rothwell0c3b4f12005-06-21 17:15:49 -0700184
185 /* Unmask secondary INTA */
186 mask = 0x80000000;
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100187 HvCallPci_unmaskInterrupts(bus, sub_bus, dev_id, mask);
Stephen Rothwell0c3b4f12005-06-21 17:15:49 -0700188}
189
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100190/* This is called by iseries_activate_IRQs */
191static unsigned int iseries_startup_IRQ(unsigned int irq)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700192{
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100193 u32 bus, dev_id, function, mask;
194 const u32 sub_bus = 0;
Benjamin Herrenschmidt0ebfff12006-07-03 21:36:01 +1000195 unsigned int rirq = (unsigned int)irq_map[irq].hwirq;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700196
197 bus = REAL_IRQ_TO_BUS(rirq);
198 function = REAL_IRQ_TO_FUNC(rirq);
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100199 dev_id = (REAL_IRQ_TO_IDSEL(rirq) << 4) + function;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700200
201 /* Link the IRQ number to the bridge */
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100202 HvCallXm_connectBusUnit(bus, sub_bus, dev_id, irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700203
204 /* Unmask bridge interrupts in the FISR */
205 mask = 0x01010000 << function;
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100206 HvCallPci_unmaskFisr(bus, sub_bus, dev_id, mask);
207 iseries_enable_IRQ(irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700208 return 0;
209}
210
211/*
212 * This is called out of iSeries_fixup to activate interrupt
213 * generation for usable slots
214 */
215void __init iSeries_activate_IRQs()
216{
217 int irq;
218 unsigned long flags;
219
220 for_each_irq (irq) {
221 irq_desc_t *desc = get_irq_desc(irq);
222
Ingo Molnard1bef4e2006-06-29 02:24:36 -0700223 if (desc && desc->chip && desc->chip->startup) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700224 spin_lock_irqsave(&desc->lock, flags);
Ingo Molnard1bef4e2006-06-29 02:24:36 -0700225 desc->chip->startup(irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700226 spin_unlock_irqrestore(&desc->lock, flags);
227 }
Stephen Rothwell0c3b4f12005-06-21 17:15:49 -0700228 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700229}
230
231/* this is not called anywhere currently */
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100232static void iseries_shutdown_IRQ(unsigned int irq)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700233{
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100234 u32 bus, dev_id, function, mask;
235 const u32 sub_bus = 0;
Benjamin Herrenschmidt0ebfff12006-07-03 21:36:01 +1000236 unsigned int rirq = (unsigned int)irq_map[irq].hwirq;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700237
238 /* irq should be locked by the caller */
239 bus = REAL_IRQ_TO_BUS(rirq);
240 function = REAL_IRQ_TO_FUNC(rirq);
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100241 dev_id = (REAL_IRQ_TO_IDSEL(rirq) << 4) + function;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700242
243 /* Invalidate the IRQ number in the bridge */
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100244 HvCallXm_connectBusUnit(bus, sub_bus, dev_id, 0);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700245
246 /* Mask bridge interrupts in the FISR */
247 mask = 0x01010000 << function;
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100248 HvCallPci_maskFisr(bus, sub_bus, dev_id, mask);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700249}
250
251/*
252 * This will be called by device drivers (via disable_IRQ)
253 * to disable INTA in the bridge interrupt status register.
254 */
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100255static void iseries_disable_IRQ(unsigned int irq)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700256{
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100257 u32 bus, dev_id, function, mask;
258 const u32 sub_bus = 0;
Benjamin Herrenschmidt0ebfff12006-07-03 21:36:01 +1000259 unsigned int rirq = (unsigned int)irq_map[irq].hwirq;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700260
261 /* The IRQ has already been locked by the caller */
262 bus = REAL_IRQ_TO_BUS(rirq);
263 function = REAL_IRQ_TO_FUNC(rirq);
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100264 dev_id = (REAL_IRQ_TO_IDSEL(rirq) << 4) + function;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700265
266 /* Mask secondary INTA */
267 mask = 0x80000000;
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100268 HvCallPci_maskInterrupts(bus, sub_bus, dev_id, mask);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700269}
270
Stephen Rothwell60798c6a2005-11-16 17:47:43 +1100271static void iseries_end_IRQ(unsigned int irq)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700272{
Benjamin Herrenschmidt0ebfff12006-07-03 21:36:01 +1000273 unsigned int rirq = (unsigned int)irq_map[irq].hwirq;
Stephen Rothwell853f8282005-11-16 18:10:40 +1100274
275 HvCallPci_eoi(REAL_IRQ_TO_BUS(rirq), REAL_IRQ_TO_SUBBUS(rirq),
276 (REAL_IRQ_TO_IDSEL(rirq) << 4) + REAL_IRQ_TO_FUNC(rirq));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700277}
Stephen Rothwell0c3b4f12005-06-21 17:15:49 -0700278
Benjamin Herrenschmidtb9e5b4e2006-07-03 19:32:51 +1000279static struct irq_chip iseries_pic = {
280 .typename = "iSeries irq controller",
281 .startup = iseries_startup_IRQ,
282 .shutdown = iseries_shutdown_IRQ,
283 .unmask = iseries_enable_IRQ,
284 .mask = iseries_disable_IRQ,
285 .eoi = iseries_end_IRQ
Stephen Rothwell0c3b4f12005-06-21 17:15:49 -0700286};
287
288/*
289 * This is called out of iSeries_scan_slot to allocate an IRQ for an EADS slot
290 * It calculates the irq value for the slot.
Stephen Rothwell853f8282005-11-16 18:10:40 +1100291 * Note that sub_bus is always 0 (at the moment at least).
Stephen Rothwell0c3b4f12005-06-21 17:15:49 -0700292 */
Stephen Rothwell853f8282005-11-16 18:10:40 +1100293int __init iSeries_allocate_IRQ(HvBusNumber bus,
Stephen Rothwell0d177df2006-05-19 16:46:28 +1000294 HvSubBusNumber sub_bus, u32 bsubbus)
Stephen Rothwell0c3b4f12005-06-21 17:15:49 -0700295{
Stephen Rothwelld9ae2ba2005-11-10 18:11:19 +1100296 unsigned int realirq;
Stephen Rothwell0d177df2006-05-19 16:46:28 +1000297 u8 idsel = ISERIES_GET_DEVICE_FROM_SUBBUS(bsubbus);
298 u8 function = ISERIES_GET_FUNCTION_FROM_SUBBUS(bsubbus);
Stephen Rothwell0c3b4f12005-06-21 17:15:49 -0700299
Stephen Rothwell853f8282005-11-16 18:10:40 +1100300 realirq = (((((sub_bus << 8) + (bus - 1)) << 3) + (idsel - 1)) << 3)
301 + function;
Benjamin Herrenschmidt0ebfff12006-07-03 21:36:01 +1000302
Benjamin Herrenschmidt6e99e452006-07-10 04:44:42 -0700303 return irq_create_mapping(NULL, realirq);
Stephen Rothwell0c3b4f12005-06-21 17:15:49 -0700304}
Stephen Rothwelle1995002005-11-16 18:53:29 +1100305
Stephen Rothwellee2cdec2006-01-12 13:54:20 +1100306#endif /* CONFIG_PCI */
307
Stephen Rothwelle1995002005-11-16 18:53:29 +1100308/*
309 * Get the next pending IRQ.
310 */
Benjamin Herrenschmidt0ebfff12006-07-03 21:36:01 +1000311unsigned int iSeries_get_irq(struct pt_regs *regs)
Stephen Rothwelle1995002005-11-16 18:53:29 +1100312{
Benjamin Herrenschmidt0ebfff12006-07-03 21:36:01 +1000313 int irq = NO_IRQ_IGNORE;
Stephen Rothwelle1995002005-11-16 18:53:29 +1100314
Stephen Rothwelle1995002005-11-16 18:53:29 +1100315#ifdef CONFIG_SMP
David Gibson3356bb9f72006-01-13 10:26:42 +1100316 if (get_lppaca()->int_dword.fields.ipi_cnt) {
317 get_lppaca()->int_dword.fields.ipi_cnt = 0;
Stephen Rothwelle1995002005-11-16 18:53:29 +1100318 iSeries_smp_message_recv(regs);
319 }
320#endif /* CONFIG_SMP */
321 if (hvlpevent_is_pending())
322 process_hvlpevents(regs);
323
Stephen Rothwellee2cdec2006-01-12 13:54:20 +1100324#ifdef CONFIG_PCI
Stephen Rothwell1d7a6b92005-11-17 18:04:37 +1100325 if (num_pending_irqs) {
326 spin_lock(&pending_irqs_lock);
327 for (irq = 0; irq < NR_IRQS; irq++) {
328 if (pending_irqs[irq]) {
329 pending_irqs[irq]--;
330 num_pending_irqs--;
331 break;
332 }
333 }
334 spin_unlock(&pending_irqs_lock);
335 if (irq >= NR_IRQS)
Benjamin Herrenschmidt0ebfff12006-07-03 21:36:01 +1000336 irq = NO_IRQ_IGNORE;
Stephen Rothwell1d7a6b92005-11-17 18:04:37 +1100337 }
Stephen Rothwellee2cdec2006-01-12 13:54:20 +1100338#endif
Stephen Rothwell1d7a6b92005-11-17 18:04:37 +1100339
340 return irq;
Stephen Rothwelle1995002005-11-16 18:53:29 +1100341}
Benjamin Herrenschmidt0ebfff12006-07-03 21:36:01 +1000342
343static int iseries_irq_host_map(struct irq_host *h, unsigned int virq,
Benjamin Herrenschmidt6e99e452006-07-10 04:44:42 -0700344 irq_hw_number_t hw)
Benjamin Herrenschmidt0ebfff12006-07-03 21:36:01 +1000345{
346 set_irq_chip_and_handler(virq, &iseries_pic, handle_fasteoi_irq);
347
348 return 0;
349}
350
351static struct irq_host_ops iseries_irq_host_ops = {
352 .map = iseries_irq_host_map,
353};
354
355/*
356 * This is called by init_IRQ. set in ppc_md.init_IRQ by iSeries_setup.c
357 * It must be called before the bus walk.
358 */
359void __init iSeries_init_IRQ(void)
360{
361 /* Register PCI event handler and open an event path */
362 struct irq_host *host;
363 int ret;
364
365 /*
366 * The Hypervisor only allows us up to 256 interrupt
367 * sources (the irq number is passed in a u8).
368 */
369 irq_set_virq_count(256);
370
371 /* Create irq host. No need for a revmap since HV will give us
372 * back our virtual irq number
373 */
374 host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0, &iseries_irq_host_ops, 0);
375 BUG_ON(host == NULL);
376 irq_set_default_host(host);
377
378 ret = HvLpEvent_registerHandler(HvLpEvent_Type_PciIo,
379 &pci_event_handler);
380 if (ret == 0) {
381 ret = HvLpEvent_openPath(HvLpEvent_Type_PciIo, 0);
382 if (ret != 0)
383 printk(KERN_ERR "iseries_init_IRQ: open event path "
384 "failed with rc 0x%x\n", ret);
385 } else
386 printk(KERN_ERR "iseries_init_IRQ: register handler "
387 "failed with rc 0x%x\n", ret);
388}
389