diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-06-21 20:15:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-21 21:46:30 -0400 |
commit | 7f74e79fe749da035cc150446f02aec29938a5c8 (patch) | |
tree | d7952289461c684fd1bab599bf492c4e3a8b4ef9 /arch | |
parent | 89ef68f0be53df6c4f1552fc329fe5abb1d5ed33 (diff) |
[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: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ppc64/kernel/iSeries_irq.c | 51 |
1 files changed, 18 insertions, 33 deletions
diff --git a/arch/ppc64/kernel/iSeries_irq.c b/arch/ppc64/kernel/iSeries_irq.c index 96a1f8cd67e7..77376c1bd611 100644 --- a/arch/ppc64/kernel/iSeries_irq.c +++ b/arch/ppc64/kernel/iSeries_irq.c | |||
@@ -105,9 +105,6 @@ static void intReceived(struct XmPciLpEvent *eventParm, | |||
105 | int irq; | 105 | int irq; |
106 | 106 | ||
107 | ++Pci_Interrupt_Count; | 107 | ++Pci_Interrupt_Count; |
108 | #if 0 | ||
109 | PPCDBG(PPCDBG_BUSWALK, "PCI: XmPciLpEvent.c: intReceived\n"); | ||
110 | #endif | ||
111 | 108 | ||
112 | switch (eventParm->hvLpEvent.xSubtype) { | 109 | switch (eventParm->hvLpEvent.xSubtype) { |
113 | case XmPciLpEvent_SlotInterrupt: | 110 | case XmPciLpEvent_SlotInterrupt: |
@@ -120,37 +117,37 @@ static void intReceived(struct XmPciLpEvent *eventParm, | |||
120 | break; | 117 | break; |
121 | /* Ignore error recovery events for now */ | 118 | /* Ignore error recovery events for now */ |
122 | case XmPciLpEvent_BusCreated: | 119 | case XmPciLpEvent_BusCreated: |
123 | printk(KERN_INFO "XmPciLpEvent.c: system bus %d created\n", | 120 | printk(KERN_INFO "intReceived: system bus %d created\n", |
124 | eventParm->eventData.busCreated.busNumber); | 121 | eventParm->eventData.busCreated.busNumber); |
125 | break; | 122 | break; |
126 | case XmPciLpEvent_BusError: | 123 | case XmPciLpEvent_BusError: |
127 | case XmPciLpEvent_BusFailed: | 124 | case XmPciLpEvent_BusFailed: |
128 | printk(KERN_INFO "XmPciLpEvent.c: system bus %d failed\n", | 125 | printk(KERN_INFO "intReceived: system bus %d failed\n", |
129 | eventParm->eventData.busFailed.busNumber); | 126 | eventParm->eventData.busFailed.busNumber); |
130 | break; | 127 | break; |
131 | case XmPciLpEvent_BusRecovered: | 128 | case XmPciLpEvent_BusRecovered: |
132 | case XmPciLpEvent_UnQuiesceBus: | 129 | case XmPciLpEvent_UnQuiesceBus: |
133 | printk(KERN_INFO "XmPciLpEvent.c: system bus %d recovered\n", | 130 | printk(KERN_INFO "intReceived: system bus %d recovered\n", |
134 | eventParm->eventData.busRecovered.busNumber); | 131 | eventParm->eventData.busRecovered.busNumber); |
135 | break; | 132 | break; |
136 | case XmPciLpEvent_NodeFailed: | 133 | case XmPciLpEvent_NodeFailed: |
137 | case XmPciLpEvent_BridgeError: | 134 | case XmPciLpEvent_BridgeError: |
138 | printk(KERN_INFO | 135 | printk(KERN_INFO |
139 | "XmPciLpEvent.c: multi-adapter bridge %d/%d/%d failed\n", | 136 | "intReceived: multi-adapter bridge %d/%d/%d failed\n", |
140 | eventParm->eventData.nodeFailed.busNumber, | 137 | eventParm->eventData.nodeFailed.busNumber, |
141 | eventParm->eventData.nodeFailed.subBusNumber, | 138 | eventParm->eventData.nodeFailed.subBusNumber, |
142 | eventParm->eventData.nodeFailed.deviceId); | 139 | eventParm->eventData.nodeFailed.deviceId); |
143 | break; | 140 | break; |
144 | case XmPciLpEvent_NodeRecovered: | 141 | case XmPciLpEvent_NodeRecovered: |
145 | printk(KERN_INFO | 142 | printk(KERN_INFO |
146 | "XmPciLpEvent.c: multi-adapter bridge %d/%d/%d recovered\n", | 143 | "intReceived: multi-adapter bridge %d/%d/%d recovered\n", |
147 | eventParm->eventData.nodeRecovered.busNumber, | 144 | eventParm->eventData.nodeRecovered.busNumber, |
148 | eventParm->eventData.nodeRecovered.subBusNumber, | 145 | eventParm->eventData.nodeRecovered.subBusNumber, |
149 | eventParm->eventData.nodeRecovered.deviceId); | 146 | eventParm->eventData.nodeRecovered.deviceId); |
150 | break; | 147 | break; |
151 | default: | 148 | default: |
152 | printk(KERN_ERR | 149 | printk(KERN_ERR |
153 | "XmPciLpEvent.c: unrecognized event subtype 0x%x\n", | 150 | "intReceived: unrecognized event subtype 0x%x\n", |
154 | eventParm->hvLpEvent.xSubtype); | 151 | eventParm->hvLpEvent.xSubtype); |
155 | break; | 152 | break; |
156 | } | 153 | } |
@@ -160,10 +157,6 @@ static void XmPciLpEvent_handler(struct HvLpEvent *eventParm, | |||
160 | struct pt_regs *regsParm) | 157 | struct pt_regs *regsParm) |
161 | { | 158 | { |
162 | #ifdef CONFIG_PCI | 159 | #ifdef CONFIG_PCI |
163 | #if 0 | ||
164 | PPCDBG(PPCDBG_BUSWALK, "XmPciLpEvent_handler, type 0x%x\n", | ||
165 | eventParm->xType); | ||
166 | #endif | ||
167 | ++Pci_Event_Count; | 160 | ++Pci_Event_Count; |
168 | 161 | ||
169 | if (eventParm && (eventParm->xType == HvLpEvent_Type_PciIo)) { | 162 | if (eventParm && (eventParm->xType == HvLpEvent_Type_PciIo)) { |
@@ -173,50 +166,42 @@ static void XmPciLpEvent_handler(struct HvLpEvent *eventParm, | |||
173 | break; | 166 | break; |
174 | case HvLpEvent_Function_Ack: | 167 | case HvLpEvent_Function_Ack: |
175 | printk(KERN_ERR | 168 | printk(KERN_ERR |
176 | "XmPciLpEvent.c: unexpected ack received\n"); | 169 | "XmPciLpEvent_handler: unexpected ack received\n"); |
177 | break; | 170 | break; |
178 | default: | 171 | default: |
179 | printk(KERN_ERR | 172 | printk(KERN_ERR |
180 | "XmPciLpEvent.c: unexpected event function %d\n", | 173 | "XmPciLpEvent_handler: unexpected event function %d\n", |
181 | (int)eventParm->xFlags.xFunction); | 174 | (int)eventParm->xFlags.xFunction); |
182 | break; | 175 | break; |
183 | } | 176 | } |
184 | } else if (eventParm) | 177 | } else if (eventParm) |
185 | printk(KERN_ERR | 178 | printk(KERN_ERR |
186 | "XmPciLpEvent.c: Unrecognized PCI event type 0x%x\n", | 179 | "XmPciLpEvent_handler: Unrecognized PCI event type 0x%x\n", |
187 | (int)eventParm->xType); | 180 | (int)eventParm->xType); |
188 | else | 181 | else |
189 | printk(KERN_ERR "XmPciLpEvent.c: NULL event received\n"); | 182 | printk(KERN_ERR "XmPciLpEvent_handler: NULL event received\n"); |
190 | #endif | 183 | #endif |
191 | } | 184 | } |
192 | 185 | ||
193 | /* This should be called sometime prior to buswalk (init_IRQ would be good) */ | 186 | /* |
194 | int XmPciLpEvent_init() | 187 | * This is called by init_IRQ. set in ppc_md.init_IRQ by iSeries_setup.c |
188 | * It must be called before the bus walk. | ||
189 | */ | ||
190 | void __init iSeries_init_IRQ(void) | ||
195 | { | 191 | { |
192 | /* Register PCI event handler and open an event path */ | ||
196 | int xRc; | 193 | int xRc; |
197 | 194 | ||
198 | PPCDBG(PPCDBG_BUSWALK, | ||
199 | "XmPciLpEvent_init, Register Event type 0x%04X\n", | ||
200 | HvLpEvent_Type_PciIo); | ||
201 | |||
202 | xRc = HvLpEvent_registerHandler(HvLpEvent_Type_PciIo, | 195 | xRc = HvLpEvent_registerHandler(HvLpEvent_Type_PciIo, |
203 | &XmPciLpEvent_handler); | 196 | &XmPciLpEvent_handler); |
204 | if (xRc == 0) { | 197 | if (xRc == 0) { |
205 | xRc = HvLpEvent_openPath(HvLpEvent_Type_PciIo, 0); | 198 | xRc = HvLpEvent_openPath(HvLpEvent_Type_PciIo, 0); |
206 | if (xRc != 0) | 199 | if (xRc != 0) |
207 | printk(KERN_ERR "XmPciLpEvent.c: open event path " | 200 | printk(KERN_ERR "iSeries_init_IRQ: open event path " |
208 | "failed with rc 0x%x\n", xRc); | 201 | "failed with rc 0x%x\n", xRc); |
209 | } else | 202 | } else |
210 | printk(KERN_ERR "XmPciLpEvent.c: register handler " | 203 | printk(KERN_ERR "iSeries_init_IRQ: register handler " |
211 | "failed with rc 0x%x\n", xRc); | 204 | "failed with rc 0x%x\n", xRc); |
212 | return xRc; | ||
213 | } | ||
214 | |||
215 | /* This is called by init_IRQ. set in ppc_md.init_IRQ by iSeries_setup.c */ | ||
216 | void __init iSeries_init_IRQ(void) | ||
217 | { | ||
218 | /* Register PCI event handler and open an event path */ | ||
219 | XmPciLpEvent_init(); | ||
220 | } | 205 | } |
221 | 206 | ||
222 | #define REAL_IRQ_TO_BUS(irq) ((((irq) >> 6) & 0xff) + 1) | 207 | #define REAL_IRQ_TO_BUS(irq) ((((irq) >> 6) & 0xff) + 1) |