Commit 7f74e79f authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Linus Torvalds

[PATCH] ppc64 iSeries: tidy up irq code after merge

This patch just removes some dead code, fixes messages that referred to the
file this code used to be in and inserts XmPciLpEvent_init into its caller.
Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 89ef68f0
...@@ -105,9 +105,6 @@ static void intReceived(struct XmPciLpEvent *eventParm, ...@@ -105,9 +105,6 @@ static void intReceived(struct XmPciLpEvent *eventParm,
int irq; int irq;
++Pci_Interrupt_Count; ++Pci_Interrupt_Count;
#if 0
PPCDBG(PPCDBG_BUSWALK, "PCI: XmPciLpEvent.c: intReceived\n");
#endif
switch (eventParm->hvLpEvent.xSubtype) { switch (eventParm->hvLpEvent.xSubtype) {
case XmPciLpEvent_SlotInterrupt: case XmPciLpEvent_SlotInterrupt:
...@@ -120,37 +117,37 @@ static void intReceived(struct XmPciLpEvent *eventParm, ...@@ -120,37 +117,37 @@ static void intReceived(struct XmPciLpEvent *eventParm,
break; break;
/* Ignore error recovery events for now */ /* Ignore error recovery events for now */
case XmPciLpEvent_BusCreated: case XmPciLpEvent_BusCreated:
printk(KERN_INFO "XmPciLpEvent.c: system bus %d created\n", printk(KERN_INFO "intReceived: system bus %d created\n",
eventParm->eventData.busCreated.busNumber); eventParm->eventData.busCreated.busNumber);
break; break;
case XmPciLpEvent_BusError: case XmPciLpEvent_BusError:
case XmPciLpEvent_BusFailed: case XmPciLpEvent_BusFailed:
printk(KERN_INFO "XmPciLpEvent.c: system bus %d failed\n", printk(KERN_INFO "intReceived: system bus %d failed\n",
eventParm->eventData.busFailed.busNumber); eventParm->eventData.busFailed.busNumber);
break; break;
case XmPciLpEvent_BusRecovered: case XmPciLpEvent_BusRecovered:
case XmPciLpEvent_UnQuiesceBus: case XmPciLpEvent_UnQuiesceBus:
printk(KERN_INFO "XmPciLpEvent.c: system bus %d recovered\n", printk(KERN_INFO "intReceived: system bus %d recovered\n",
eventParm->eventData.busRecovered.busNumber); eventParm->eventData.busRecovered.busNumber);
break; break;
case XmPciLpEvent_NodeFailed: case XmPciLpEvent_NodeFailed:
case XmPciLpEvent_BridgeError: case XmPciLpEvent_BridgeError:
printk(KERN_INFO printk(KERN_INFO
"XmPciLpEvent.c: multi-adapter bridge %d/%d/%d failed\n", "intReceived: multi-adapter bridge %d/%d/%d failed\n",
eventParm->eventData.nodeFailed.busNumber, eventParm->eventData.nodeFailed.busNumber,
eventParm->eventData.nodeFailed.subBusNumber, eventParm->eventData.nodeFailed.subBusNumber,
eventParm->eventData.nodeFailed.deviceId); eventParm->eventData.nodeFailed.deviceId);
break; break;
case XmPciLpEvent_NodeRecovered: case XmPciLpEvent_NodeRecovered:
printk(KERN_INFO printk(KERN_INFO
"XmPciLpEvent.c: multi-adapter bridge %d/%d/%d recovered\n", "intReceived: multi-adapter bridge %d/%d/%d recovered\n",
eventParm->eventData.nodeRecovered.busNumber, eventParm->eventData.nodeRecovered.busNumber,
eventParm->eventData.nodeRecovered.subBusNumber, eventParm->eventData.nodeRecovered.subBusNumber,
eventParm->eventData.nodeRecovered.deviceId); eventParm->eventData.nodeRecovered.deviceId);
break; break;
default: default:
printk(KERN_ERR printk(KERN_ERR
"XmPciLpEvent.c: unrecognized event subtype 0x%x\n", "intReceived: unrecognized event subtype 0x%x\n",
eventParm->hvLpEvent.xSubtype); eventParm->hvLpEvent.xSubtype);
break; break;
} }
...@@ -160,10 +157,6 @@ static void XmPciLpEvent_handler(struct HvLpEvent *eventParm, ...@@ -160,10 +157,6 @@ static void XmPciLpEvent_handler(struct HvLpEvent *eventParm,
struct pt_regs *regsParm) struct pt_regs *regsParm)
{ {
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
#if 0
PPCDBG(PPCDBG_BUSWALK, "XmPciLpEvent_handler, type 0x%x\n",
eventParm->xType);
#endif
++Pci_Event_Count; ++Pci_Event_Count;
if (eventParm && (eventParm->xType == HvLpEvent_Type_PciIo)) { if (eventParm && (eventParm->xType == HvLpEvent_Type_PciIo)) {
...@@ -173,50 +166,42 @@ static void XmPciLpEvent_handler(struct HvLpEvent *eventParm, ...@@ -173,50 +166,42 @@ static void XmPciLpEvent_handler(struct HvLpEvent *eventParm,
break; break;
case HvLpEvent_Function_Ack: case HvLpEvent_Function_Ack:
printk(KERN_ERR printk(KERN_ERR
"XmPciLpEvent.c: unexpected ack received\n"); "XmPciLpEvent_handler: unexpected ack received\n");
break; break;
default: default:
printk(KERN_ERR printk(KERN_ERR
"XmPciLpEvent.c: unexpected event function %d\n", "XmPciLpEvent_handler: unexpected event function %d\n",
(int)eventParm->xFlags.xFunction); (int)eventParm->xFlags.xFunction);
break; break;
} }
} else if (eventParm) } else if (eventParm)
printk(KERN_ERR printk(KERN_ERR
"XmPciLpEvent.c: Unrecognized PCI event type 0x%x\n", "XmPciLpEvent_handler: Unrecognized PCI event type 0x%x\n",
(int)eventParm->xType); (int)eventParm->xType);
else else
printk(KERN_ERR "XmPciLpEvent.c: NULL event received\n"); printk(KERN_ERR "XmPciLpEvent_handler: NULL event received\n");
#endif #endif
} }
/* This should be called sometime prior to buswalk (init_IRQ would be good) */ /*
int XmPciLpEvent_init() * This is called by init_IRQ. set in ppc_md.init_IRQ by iSeries_setup.c
* It must be called before the bus walk.
*/
void __init iSeries_init_IRQ(void)
{ {
/* Register PCI event handler and open an event path */
int xRc; int xRc;
PPCDBG(PPCDBG_BUSWALK,
"XmPciLpEvent_init, Register Event type 0x%04X\n",
HvLpEvent_Type_PciIo);
xRc = HvLpEvent_registerHandler(HvLpEvent_Type_PciIo, xRc = HvLpEvent_registerHandler(HvLpEvent_Type_PciIo,
&XmPciLpEvent_handler); &XmPciLpEvent_handler);
if (xRc == 0) { if (xRc == 0) {
xRc = HvLpEvent_openPath(HvLpEvent_Type_PciIo, 0); xRc = HvLpEvent_openPath(HvLpEvent_Type_PciIo, 0);
if (xRc != 0) if (xRc != 0)
printk(KERN_ERR "XmPciLpEvent.c: open event path " printk(KERN_ERR "iSeries_init_IRQ: open event path "
"failed with rc 0x%x\n", xRc); "failed with rc 0x%x\n", xRc);
} else } else
printk(KERN_ERR "XmPciLpEvent.c: register handler " printk(KERN_ERR "iSeries_init_IRQ: register handler "
"failed with rc 0x%x\n", xRc); "failed with rc 0x%x\n", xRc);
return xRc;
}
/* This is called by init_IRQ. set in ppc_md.init_IRQ by iSeries_setup.c */
void __init iSeries_init_IRQ(void)
{
/* Register PCI event handler and open an event path */
XmPciLpEvent_init();
} }
#define REAL_IRQ_TO_BUS(irq) ((((irq) >> 6) & 0xff) + 1) #define REAL_IRQ_TO_BUS(irq) ((((irq) >> 6) & 0xff) + 1)
......
...@@ -5,6 +5,4 @@ extern void iSeries_init_IRQ(void); ...@@ -5,6 +5,4 @@ extern void iSeries_init_IRQ(void);
extern int iSeries_allocate_IRQ(HvBusNumber, HvSubBusNumber, HvAgentId); extern int iSeries_allocate_IRQ(HvBusNumber, HvSubBusNumber, HvAgentId);
extern void iSeries_activate_IRQs(void); extern void iSeries_activate_IRQs(void);
extern int XmPciLpEvent_init(void);
#endif /* __ISERIES_IRQ_H__ */ #endif /* __ISERIES_IRQ_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment