Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[POWERPC] PS3: Interrupt routine fixups.

Fixups for the ps3 interrupt routines to support all HV device
in a generic way.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

Geoff Levand and committed by
Paul Mackerras
dc4f60c2 12828856

+235 -130
+189 -91
arch/powerpc/platforms/ps3/interrupt.c
··· 89 89 90 90 static DEFINE_PER_CPU(struct ps3_private, ps3_private); 91 91 92 - int ps3_alloc_irq(enum ps3_cpu_binding cpu, unsigned long outlet, 92 + /** 93 + * ps3_virq_setup - virq related setup. 94 + * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be 95 + * serviced on. 96 + * @outlet: The HV outlet from the various create outlet routines. 97 + * @virq: The assigned Linux virq. 98 + * 99 + * Calls irq_create_mapping() to get a virq and sets the chip data to 100 + * ps3_private data. 101 + */ 102 + 103 + int ps3_virq_setup(enum ps3_cpu_binding cpu, unsigned long outlet, 93 104 unsigned int *virq) 94 105 { 95 106 int result; ··· 122 111 goto fail_create; 123 112 } 124 113 125 - /* Binds outlet to cpu + virq. */ 126 - 127 - result = lv1_connect_irq_plug_ext(pd->node, pd->cpu, *virq, outlet, 0); 128 - 129 - if (result) { 130 - pr_info("%s:%d: lv1_connect_irq_plug_ext failed: %s\n", 131 - __func__, __LINE__, ps3_result(result)); 132 - result = -EPERM; 133 - goto fail_connect; 134 - } 135 - 136 114 pr_debug("%s:%d: outlet %lu => cpu %u, virq %u\n", __func__, __LINE__, 137 115 outlet, cpu, *virq); 138 116 ··· 136 136 return result; 137 137 138 138 fail_set: 139 - lv1_disconnect_irq_plug_ext(pd->node, pd->cpu, *virq); 140 - fail_connect: 141 139 irq_dispose_mapping(*virq); 142 140 fail_create: 143 141 return result; 144 142 } 145 - EXPORT_SYMBOL_GPL(ps3_alloc_irq); 146 143 147 - int ps3_free_irq(unsigned int virq) 144 + /** 145 + * ps3_virq_destroy - virq related teardown. 146 + * @virq: The assigned Linux virq. 147 + * 148 + * Clears chip data and calls irq_dispose_mapping() for the virq. 149 + */ 150 + 151 + int ps3_virq_destroy(unsigned int virq) 152 + { 153 + const struct ps3_private *pd = get_irq_chip_data(virq); 154 + 155 + pr_debug("%s:%d: node %lu, cpu %d, virq %u\n", __func__, __LINE__, 156 + pd->node, pd->cpu, virq); 157 + 158 + set_irq_chip_data(virq, NULL); 159 + irq_dispose_mapping(virq); 160 + 161 + pr_debug("%s:%d <-\n", __func__, __LINE__); 162 + return 0; 163 + } 164 + 165 + /** 166 + * ps3_irq_plug_setup - Generic outlet and virq related setup. 167 + * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be 168 + * serviced on. 169 + * @outlet: The HV outlet from the various create outlet routines. 170 + * @virq: The assigned Linux virq. 171 + * 172 + * Sets up virq and connects the irq plug. 173 + */ 174 + 175 + int ps3_irq_plug_setup(enum ps3_cpu_binding cpu, unsigned long outlet, 176 + unsigned int *virq) 177 + { 178 + int result; 179 + struct ps3_private *pd; 180 + 181 + result = ps3_virq_setup(cpu, outlet, virq); 182 + 183 + if (result) { 184 + pr_debug("%s:%d: ps3_virq_setup failed\n", __func__, __LINE__); 185 + goto fail_setup; 186 + } 187 + 188 + pd = get_irq_chip_data(*virq); 189 + 190 + /* Binds outlet to cpu + virq. */ 191 + 192 + result = lv1_connect_irq_plug_ext(pd->node, pd->cpu, *virq, outlet, 0); 193 + 194 + if (result) { 195 + pr_info("%s:%d: lv1_connect_irq_plug_ext failed: %s\n", 196 + __func__, __LINE__, ps3_result(result)); 197 + result = -EPERM; 198 + goto fail_connect; 199 + } 200 + 201 + return result; 202 + 203 + fail_connect: 204 + ps3_virq_destroy(*virq); 205 + fail_setup: 206 + return result; 207 + } 208 + EXPORT_SYMBOL_GPL(ps3_irq_plug_setup); 209 + 210 + /** 211 + * ps3_irq_plug_destroy - Generic outlet and virq related teardown. 212 + * @virq: The assigned Linux virq. 213 + * 214 + * Disconnects the irq plug and tears down virq. 215 + * Do not call for system bus event interrupts setup with 216 + * ps3_sb_event_receive_port_setup(). 217 + */ 218 + 219 + int ps3_irq_plug_destroy(unsigned int virq) 148 220 { 149 221 int result; 150 222 const struct ps3_private *pd = get_irq_chip_data(virq); ··· 230 158 pr_info("%s:%d: lv1_disconnect_irq_plug_ext failed: %s\n", 231 159 __func__, __LINE__, ps3_result(result)); 232 160 233 - set_irq_chip_data(virq, NULL); 234 - irq_dispose_mapping(virq); 161 + ps3_virq_destroy(virq); 162 + 235 163 return result; 236 164 } 237 - EXPORT_SYMBOL_GPL(ps3_free_irq); 165 + EXPORT_SYMBOL_GPL(ps3_irq_plug_destroy); 238 166 239 167 /** 240 - * ps3_alloc_io_irq - Assign a virq to a system bus device. 241 - * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be 242 - * serviced on. 243 - * @interrupt_id: The device interrupt id read from the system repository. 244 - * @virq: The assigned Linux virq. 245 - * 246 - * An io irq represents a non-virtualized device interrupt. interrupt_id 247 - * coresponds to the interrupt number of the interrupt controller. 248 - */ 249 - 250 - int ps3_alloc_io_irq(enum ps3_cpu_binding cpu, unsigned int interrupt_id, 251 - unsigned int *virq) 252 - { 253 - int result; 254 - unsigned long outlet; 255 - 256 - result = lv1_construct_io_irq_outlet(interrupt_id, &outlet); 257 - 258 - if (result) { 259 - pr_debug("%s:%d: lv1_construct_io_irq_outlet failed: %s\n", 260 - __func__, __LINE__, ps3_result(result)); 261 - return result; 262 - } 263 - 264 - result = ps3_alloc_irq(cpu, outlet, virq); 265 - BUG_ON(result); 266 - 267 - return result; 268 - } 269 - EXPORT_SYMBOL_GPL(ps3_alloc_io_irq); 270 - 271 - int ps3_free_io_irq(unsigned int virq) 272 - { 273 - int result; 274 - 275 - result = lv1_destruct_io_irq_outlet(virq_to_hw(virq)); 276 - 277 - if (result) 278 - pr_debug("%s:%d: lv1_destruct_io_irq_outlet failed: %s\n", 279 - __func__, __LINE__, ps3_result(result)); 280 - 281 - ps3_free_irq(virq); 282 - 283 - return result; 284 - } 285 - EXPORT_SYMBOL_GPL(ps3_free_io_irq); 286 - 287 - /** 288 - * ps3_alloc_event_irq - Allocate a virq for use with a system event. 168 + * ps3_event_receive_port_setup - Setup an event receive port. 289 169 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be 290 170 * serviced on. 291 171 * @virq: The assigned Linux virq. 292 172 * 293 173 * The virq can be used with lv1_connect_interrupt_event_receive_port() to 294 - * arrange to receive events, or with ps3_send_event_locally() to signal 295 - * events. 174 + * arrange to receive interrupts from system-bus devices, or with 175 + * ps3_send_event_locally() to signal events. 296 176 */ 297 177 298 - int ps3_alloc_event_irq(enum ps3_cpu_binding cpu, unsigned int *virq) 178 + int ps3_event_receive_port_setup(enum ps3_cpu_binding cpu, unsigned int *virq) 299 179 { 300 180 int result; 301 181 unsigned long outlet; ··· 261 237 return result; 262 238 } 263 239 264 - result = ps3_alloc_irq(cpu, outlet, virq); 240 + result = ps3_irq_plug_setup(cpu, outlet, virq); 265 241 BUG_ON(result); 266 242 267 243 return result; 268 244 } 245 + EXPORT_SYMBOL_GPL(ps3_event_receive_port_setup); 269 246 270 - int ps3_free_event_irq(unsigned int virq) 247 + /** 248 + * ps3_event_receive_port_destroy - Destroy an event receive port. 249 + * @virq: The assigned Linux virq. 250 + * 251 + * Since ps3_event_receive_port_destroy destroys the receive port outlet, 252 + * SB devices need to call disconnect_interrupt_event_receive_port() before 253 + * this. 254 + */ 255 + 256 + int ps3_event_receive_port_destroy(unsigned int virq) 271 257 { 272 258 int result; 273 259 274 - pr_debug(" -> %s:%d\n", __func__, __LINE__); 260 + pr_debug(" -> %s:%d virq: %u\n", __func__, __LINE__, virq); 275 261 276 262 result = lv1_destruct_event_receive_port(virq_to_hw(virq)); 277 263 ··· 289 255 pr_debug("%s:%d: lv1_destruct_event_receive_port failed: %s\n", 290 256 __func__, __LINE__, ps3_result(result)); 291 257 292 - ps3_free_irq(virq); 258 + /* lv1_destruct_event_receive_port() destroys the IRQ plug, 259 + * so don't call ps3_irq_plug_destroy() here. 260 + */ 261 + 262 + result = ps3_virq_destroy(virq); 263 + BUG_ON(result); 293 264 294 265 pr_debug(" <- %s:%d\n", __func__, __LINE__); 295 266 return result; 296 267 } 268 + EXPORT_SYMBOL_GPL(ps3_event_receive_port_destroy); 297 269 298 270 int ps3_send_event_locally(unsigned int virq) 299 271 { ··· 307 267 } 308 268 309 269 /** 310 - * ps3_connect_event_irq - Assign a virq to a system bus device. 270 + * ps3_sb_event_receive_port_setup - Setup a system bus event receive port. 311 271 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be 312 272 * serviced on. 313 273 * @did: The HV device identifier read from the system repository. ··· 318 278 * coresponds to the software interrupt number. 319 279 */ 320 280 321 - int ps3_connect_event_irq(enum ps3_cpu_binding cpu, 281 + int ps3_sb_event_receive_port_setup(enum ps3_cpu_binding cpu, 322 282 const struct ps3_device_id *did, unsigned int interrupt_id, 323 283 unsigned int *virq) 324 284 { 285 + /* this should go in system-bus.c */ 286 + 325 287 int result; 326 288 327 - result = ps3_alloc_event_irq(cpu, virq); 289 + result = ps3_event_receive_port_setup(cpu, virq); 328 290 329 291 if (result) 330 292 return result; ··· 338 296 pr_debug("%s:%d: lv1_connect_interrupt_event_receive_port" 339 297 " failed: %s\n", __func__, __LINE__, 340 298 ps3_result(result)); 341 - ps3_free_event_irq(*virq); 299 + ps3_event_receive_port_destroy(*virq); 342 300 *virq = NO_IRQ; 343 301 return result; 344 302 } ··· 348 306 349 307 return 0; 350 308 } 309 + EXPORT_SYMBOL(ps3_sb_event_receive_port_setup); 351 310 352 - int ps3_disconnect_event_irq(const struct ps3_device_id *did, 311 + int ps3_sb_event_receive_port_destroy(const struct ps3_device_id *did, 353 312 unsigned int interrupt_id, unsigned int virq) 354 313 { 314 + /* this should go in system-bus.c */ 315 + 355 316 int result; 356 317 357 318 pr_debug(" -> %s:%d: interrupt_id %u, virq %u\n", __func__, __LINE__, ··· 368 323 " failed: %s\n", __func__, __LINE__, 369 324 ps3_result(result)); 370 325 371 - ps3_free_event_irq(virq); 326 + result = ps3_event_receive_port_destroy(virq); 327 + BUG_ON(result); 372 328 373 329 pr_debug(" <- %s:%d\n", __func__, __LINE__); 374 330 return result; 375 331 } 332 + EXPORT_SYMBOL(ps3_sb_event_receive_port_destroy); 376 333 377 334 /** 378 - * ps3_alloc_vuart_irq - Configure the system virtual uart virq. 335 + * ps3_io_irq_setup - Setup a system bus io irq. 336 + * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be 337 + * serviced on. 338 + * @interrupt_id: The device interrupt id read from the system repository. 339 + * @virq: The assigned Linux virq. 340 + * 341 + * An io irq represents a non-virtualized device interrupt. interrupt_id 342 + * coresponds to the interrupt number of the interrupt controller. 343 + */ 344 + 345 + int ps3_io_irq_setup(enum ps3_cpu_binding cpu, unsigned int interrupt_id, 346 + unsigned int *virq) 347 + { 348 + int result; 349 + unsigned long outlet; 350 + 351 + result = lv1_construct_io_irq_outlet(interrupt_id, &outlet); 352 + 353 + if (result) { 354 + pr_debug("%s:%d: lv1_construct_io_irq_outlet failed: %s\n", 355 + __func__, __LINE__, ps3_result(result)); 356 + return result; 357 + } 358 + 359 + result = ps3_irq_plug_setup(cpu, outlet, virq); 360 + BUG_ON(result); 361 + 362 + return result; 363 + } 364 + EXPORT_SYMBOL_GPL(ps3_io_irq_setup); 365 + 366 + int ps3_io_irq_destroy(unsigned int virq) 367 + { 368 + int result; 369 + 370 + result = lv1_destruct_io_irq_outlet(virq_to_hw(virq)); 371 + 372 + if (result) 373 + pr_debug("%s:%d: lv1_destruct_io_irq_outlet failed: %s\n", 374 + __func__, __LINE__, ps3_result(result)); 375 + 376 + result = ps3_irq_plug_destroy(virq); 377 + BUG_ON(result); 378 + 379 + return result; 380 + } 381 + EXPORT_SYMBOL_GPL(ps3_io_irq_destroy); 382 + 383 + /** 384 + * ps3_vuart_irq_setup - Setup the system virtual uart virq. 379 385 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be 380 386 * serviced on. 381 387 * @virt_addr_bmp: The caller supplied virtual uart interrupt bitmap. ··· 436 340 * freeing the interrupt will return a wrong state error. 437 341 */ 438 342 439 - int ps3_alloc_vuart_irq(enum ps3_cpu_binding cpu, void* virt_addr_bmp, 343 + int ps3_vuart_irq_setup(enum ps3_cpu_binding cpu, void* virt_addr_bmp, 440 344 unsigned int *virq) 441 345 { 442 346 int result; ··· 455 359 return result; 456 360 } 457 361 458 - result = ps3_alloc_irq(cpu, outlet, virq); 362 + result = ps3_irq_plug_setup(cpu, outlet, virq); 459 363 BUG_ON(result); 460 364 461 365 return result; 462 366 } 463 367 464 - int ps3_free_vuart_irq(unsigned int virq) 368 + int ps3_vuart_irq_destroy(unsigned int virq) 465 369 { 466 370 int result; 467 371 ··· 473 377 return result; 474 378 } 475 379 476 - ps3_free_irq(virq); 380 + result = ps3_irq_plug_destroy(virq); 381 + BUG_ON(result); 477 382 478 383 return result; 479 384 } 480 385 481 386 /** 482 - * ps3_alloc_spe_irq - Configure an spe virq. 387 + * ps3_spe_irq_setup - Setup an spe virq. 483 388 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be 484 389 * serviced on. 485 390 * @spe_id: The spe_id returned from lv1_construct_logical_spe(). ··· 489 392 * 490 393 */ 491 394 492 - int ps3_alloc_spe_irq(enum ps3_cpu_binding cpu, unsigned long spe_id, 395 + int ps3_spe_irq_setup(enum ps3_cpu_binding cpu, unsigned long spe_id, 493 396 unsigned int class, unsigned int *virq) 494 397 { 495 398 int result; ··· 505 408 return result; 506 409 } 507 410 508 - result = ps3_alloc_irq(cpu, outlet, virq); 411 + result = ps3_irq_plug_setup(cpu, outlet, virq); 509 412 BUG_ON(result); 510 413 511 414 return result; 512 415 } 513 416 514 - int ps3_free_spe_irq(unsigned int virq) 417 + int ps3_spe_irq_destroy(unsigned int virq) 515 418 { 516 - ps3_free_irq(virq); 419 + int result = ps3_irq_plug_destroy(virq); 420 + BUG_ON(result); 517 421 return 0; 518 422 } 519 423
+4 -2
arch/powerpc/platforms/ps3/smp.c
··· 110 110 BUILD_BUG_ON(PPC_MSG_DEBUGGER_BREAK != 3); 111 111 112 112 for (i = 0; i < MSG_COUNT; i++) { 113 - result = ps3_alloc_event_irq(cpu, &virqs[i]); 113 + result = ps3_event_receive_port_setup(cpu, &virqs[i]); 114 114 115 115 if (result) 116 116 continue; ··· 134 134 int i; 135 135 136 136 DBG(" -> %s:%d: (%d)\n", __func__, __LINE__, cpu); 137 + 137 138 for (i = 0; i < MSG_COUNT; i++) { 138 - ps3_free_event_irq(virqs[i]); 139 139 free_irq(virqs[i], (void*)(long)i); 140 + ps3_event_receive_port_destroy(virqs[i]); 140 141 virqs[i] = NO_IRQ; 141 142 } 143 + 142 144 DBG(" <- %s:%d: (%d)\n", __func__, __LINE__, cpu); 143 145 } 144 146
+8 -8
arch/powerpc/platforms/ps3/spu.c
··· 230 230 { 231 231 int result; 232 232 233 - result = ps3_alloc_spe_irq(PS3_BINDING_CPU_ANY, spu_pdata(spu)->spe_id, 233 + result = ps3_spe_irq_setup(PS3_BINDING_CPU_ANY, spu_pdata(spu)->spe_id, 234 234 0, &spu->irqs[0]); 235 235 236 236 if (result) 237 237 goto fail_alloc_0; 238 238 239 - result = ps3_alloc_spe_irq(PS3_BINDING_CPU_ANY, spu_pdata(spu)->spe_id, 239 + result = ps3_spe_irq_setup(PS3_BINDING_CPU_ANY, spu_pdata(spu)->spe_id, 240 240 1, &spu->irqs[1]); 241 241 242 242 if (result) 243 243 goto fail_alloc_1; 244 244 245 - result = ps3_alloc_spe_irq(PS3_BINDING_CPU_ANY, spu_pdata(spu)->spe_id, 245 + result = ps3_spe_irq_setup(PS3_BINDING_CPU_ANY, spu_pdata(spu)->spe_id, 246 246 2, &spu->irqs[2]); 247 247 248 248 if (result) ··· 251 251 return result; 252 252 253 253 fail_alloc_2: 254 - ps3_free_spe_irq(spu->irqs[1]); 254 + ps3_spe_irq_destroy(spu->irqs[1]); 255 255 fail_alloc_1: 256 - ps3_free_spe_irq(spu->irqs[0]); 256 + ps3_spe_irq_destroy(spu->irqs[0]); 257 257 fail_alloc_0: 258 258 spu->irqs[0] = spu->irqs[1] = spu->irqs[2] = NO_IRQ; 259 259 return result; ··· 301 301 result = lv1_disable_logical_spe(spu_pdata(spu)->spe_id, 0); 302 302 BUG_ON(result); 303 303 304 - ps3_free_spe_irq(spu->irqs[2]); 305 - ps3_free_spe_irq(spu->irqs[1]); 306 - ps3_free_spe_irq(spu->irqs[0]); 304 + ps3_spe_irq_destroy(spu->irqs[2]); 305 + ps3_spe_irq_destroy(spu->irqs[1]); 306 + ps3_spe_irq_destroy(spu->irqs[0]); 307 307 308 308 spu->irqs[0] = spu->irqs[1] = spu->irqs[2] = NO_IRQ; 309 309
+4 -4
drivers/ps3/vuart.c
··· 886 886 887 887 if (++vuart_bus_priv.use_count == 1) { 888 888 889 - result = ps3_alloc_vuart_irq(PS3_BINDING_CPU_ANY, 889 + result = ps3_vuart_irq_setup(PS3_BINDING_CPU_ANY, 890 890 (void*)&vuart_bus_priv.bmp.status, &vuart_bus_priv.virq); 891 891 892 892 if (result) { 893 893 dev_dbg(&dev->core, 894 - "%s:%d: ps3_alloc_vuart_irq failed (%d)\n", 894 + "%s:%d: ps3_vuart_irq_setup failed (%d)\n", 895 895 __func__, __LINE__, result); 896 896 result = -EPERM; 897 897 goto fail_alloc_irq; ··· 937 937 fail_probe: 938 938 ps3_vuart_set_interrupt_mask(dev, 0); 939 939 fail_request_irq: 940 - ps3_free_vuart_irq(vuart_bus_priv.virq); 940 + ps3_vuart_irq_destroy(vuart_bus_priv.virq); 941 941 vuart_bus_priv.virq = NO_IRQ; 942 942 fail_alloc_irq: 943 943 --vuart_bus_priv.use_count; ··· 975 975 if (--vuart_bus_priv.use_count == 0) { 976 976 BUG(); 977 977 free_irq(vuart_bus_priv.virq, &vuart_bus_priv); 978 - ps3_free_vuart_irq(vuart_bus_priv.virq); 978 + ps3_vuart_irq_destroy(vuart_bus_priv.virq); 979 979 vuart_bus_priv.virq = NO_IRQ; 980 980 } 981 981
+2 -2
drivers/usb/host/ehci-ps3.c
··· 104 104 dev_dbg(&dev->core, "%s:%d: mmio mapped_addr %lxh\n", __func__, 105 105 __LINE__, dev->m_region->lpar_addr); 106 106 107 - result = ps3_alloc_io_irq(PS3_BINDING_CPU_ANY, dev->interrupt_id, &virq); 107 + result = ps3_io_irq_setup(PS3_BINDING_CPU_ANY, dev->interrupt_id, &virq); 108 108 109 109 if (result) { 110 110 dev_dbg(&dev->core, "%s:%d: ps3_construct_io_irq(%d) failed.\n", ··· 162 162 fail_ioremap: 163 163 usb_put_hcd(hcd); 164 164 fail_create_hcd: 165 - ps3_free_io_irq(virq); 165 + ps3_io_irq_destroy(virq); 166 166 fail_irq: 167 167 ps3_free_mmio_region(dev->m_region); 168 168 fail_mmio:
+2 -2
drivers/usb/host/ohci-ps3.c
··· 107 107 dev_dbg(&dev->core, "%s:%d: mmio mapped_addr %lxh\n", __func__, 108 108 __LINE__, dev->m_region->lpar_addr); 109 109 110 - result = ps3_alloc_io_irq(PS3_BINDING_CPU_ANY, dev->interrupt_id, &virq); 110 + result = ps3_io_irq_setup(PS3_BINDING_CPU_ANY, dev->interrupt_id, &virq); 111 111 112 112 if (result) { 113 113 dev_dbg(&dev->core, "%s:%d: ps3_construct_io_irq(%d) failed.\n", ··· 165 165 fail_ioremap: 166 166 usb_put_hcd(hcd); 167 167 fail_create_hcd: 168 - ps3_free_io_irq(virq); 168 + ps3_io_irq_destroy(virq); 169 169 fail_irq: 170 170 ps3_free_mmio_region(dev->m_region); 171 171 fail_mmio:
+6 -6
drivers/video/ps3fb.c
··· 885 885 } 886 886 887 887 ps3fb.dev = dev; 888 - error = ps3_alloc_irq(PS3_BINDING_CPU_ANY, dinfo->irq.irq_outlet, 889 - &ps3fb.irq_no); 888 + error = ps3_irq_plug_setup(PS3_BINDING_CPU_ANY, dinfo->irq.irq_outlet, 889 + &ps3fb.irq_no); 890 890 if (error) { 891 891 printk(KERN_ERR "%s: ps3_alloc_irq failed %d\n", __FUNCTION__, 892 892 error); ··· 898 898 if (error) { 899 899 printk(KERN_ERR "%s: request_irq failed %d\n", __FUNCTION__, 900 900 error); 901 - ps3_free_irq(ps3fb.irq_no); 901 + ps3_irq_plug_destroy(ps3fb.irq_no); 902 902 return error; 903 903 } 904 904 ··· 1059 1059 framebuffer_release(info); 1060 1060 err_free_irq: 1061 1061 free_irq(ps3fb.irq_no, ps3fb.dev); 1062 - ps3_free_irq(ps3fb.irq_no); 1062 + ps3_irq_plug_destroy(ps3fb.irq_no); 1063 1063 err_iounmap_dinfo: 1064 1064 iounmap((u8 __iomem *)ps3fb.dinfo); 1065 1065 err_gpu_context_free: ··· 1075 1075 ps3fb_flip_ctl(0); /* flip off */ 1076 1076 ps3fb.dinfo->irq.mask = 0; 1077 1077 free_irq(ps3fb.irq_no, ps3fb.dev); 1078 - ps3_free_irq(ps3fb.irq_no); 1078 + ps3_irq_plug_destroy(ps3fb.irq_no); 1079 1079 iounmap((u8 __iomem *)ps3fb.dinfo); 1080 1080 } 1081 1081 ··· 1085 1085 1086 1086 if (ps3fb.irq_no) { 1087 1087 free_irq(ps3fb.irq_no, ps3fb.dev); 1088 - ps3_free_irq(ps3fb.irq_no); 1088 + ps3_irq_plug_destroy(ps3fb.irq_no); 1089 1089 } 1090 1090 iounmap((u8 __iomem *)ps3fb.dinfo); 1091 1091
+20 -15
include/asm-powerpc/ps3.h
··· 167 167 PS3_BINDING_CPU_1 = 1, 168 168 }; 169 169 170 - int ps3_alloc_io_irq(enum ps3_cpu_binding cpu, unsigned int interrupt_id, 170 + int ps3_virq_setup(enum ps3_cpu_binding cpu, unsigned long outlet, 171 171 unsigned int *virq); 172 - int ps3_free_io_irq(unsigned int virq); 173 - int ps3_alloc_event_irq(enum ps3_cpu_binding cpu, unsigned int *virq); 174 - int ps3_free_event_irq(unsigned int virq); 172 + int ps3_virq_destroy(unsigned int virq); 173 + int ps3_irq_plug_setup(enum ps3_cpu_binding cpu, unsigned long outlet, 174 + unsigned int *virq); 175 + int ps3_irq_plug_destroy(unsigned int virq); 176 + int ps3_event_receive_port_setup(enum ps3_cpu_binding cpu, unsigned int *virq); 177 + int ps3_event_receive_port_destroy(unsigned int virq); 175 178 int ps3_send_event_locally(unsigned int virq); 176 - int ps3_connect_event_irq(enum ps3_cpu_binding cpu, 179 + 180 + int ps3_io_irq_setup(enum ps3_cpu_binding cpu, unsigned int interrupt_id, 181 + unsigned int *virq); 182 + int ps3_io_irq_destroy(unsigned int virq); 183 + int ps3_vuart_irq_setup(enum ps3_cpu_binding cpu, void* virt_addr_bmp, 184 + unsigned int *virq); 185 + int ps3_vuart_irq_destroy(unsigned int virq); 186 + int ps3_spe_irq_setup(enum ps3_cpu_binding cpu, unsigned long spe_id, 187 + unsigned int class, unsigned int *virq); 188 + int ps3_spe_irq_destroy(unsigned int virq); 189 + 190 + int ps3_sb_event_receive_port_setup(enum ps3_cpu_binding cpu, 177 191 const struct ps3_device_id *did, unsigned int interrupt_id, 178 192 unsigned int *virq); 179 - int ps3_disconnect_event_irq(const struct ps3_device_id *did, 193 + int ps3_sb_event_receive_port_destroy(const struct ps3_device_id *did, 180 194 unsigned int interrupt_id, unsigned int virq); 181 - int ps3_alloc_vuart_irq(enum ps3_cpu_binding cpu, void* virt_addr_bmp, 182 - unsigned int *virq); 183 - int ps3_free_vuart_irq(unsigned int virq); 184 - int ps3_alloc_spe_irq(enum ps3_cpu_binding cpu, unsigned long spe_id, 185 - unsigned int class, unsigned int *virq); 186 - int ps3_free_spe_irq(unsigned int virq); 187 - int ps3_alloc_irq(enum ps3_cpu_binding cpu, unsigned long outlet, 188 - unsigned int *virq); 189 - int ps3_free_irq(unsigned int virq); 190 195 191 196 /* lv1 result codes */ 192 197